From b2b33142054f74e105a3d781d261fedb640f0e64 Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Sun, 17 Dec 2023 08:27:49 +0000 Subject: [PATCH] deploy to github pages 40778513d9068c01079fdd5fe353bd96dccf8cb6 --- css/{app.2ca1af50.css => app.f08e491a.css} | 2 +- index.html | 2 +- js/app.04af034d.js | 2 ++ js/app.04af034d.js.map | 1 + js/app.5103afaf.js | 2 -- js/app.5103afaf.js.map | 1 - service-worker.js.map | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) rename css/{app.2ca1af50.css => app.f08e491a.css} (98%) create mode 100644 js/app.04af034d.js create mode 100644 js/app.04af034d.js.map delete mode 100644 js/app.5103afaf.js delete mode 100644 js/app.5103afaf.js.map diff --git a/css/app.2ca1af50.css b/css/app.f08e491a.css similarity index 98% rename from css/app.2ca1af50.css rename to css/app.f08e491a.css index 99fdc722..a5fd4d04 100644 --- a/css/app.2ca1af50.css +++ b/css/app.f08e491a.css @@ -1 +1 @@ -.message[data-v-2231702e]{max-width:500px}.message+.message[data-v-2231702e]{margin-top:15px}.message-container[data-v-2231702e]{min-width:50px;display:flex;align-items:center;padding:10px;font-size:13px;overflow:hidden;border-radius:2px;box-shadow:0 1px 8px rgba(0,0,0,.15);background:#fff;pointer-events:all;position:relative}.message-container .icons[data-v-2231702e]{display:flex;align-items:center;margin-right:10px}.message-container .title[data-v-2231702e]{font-size:14px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-container .content[data-v-2231702e]{width:100%}.message-container .description[data-v-2231702e]{line-height:1.5;color:#41464b}.message-container .title+.description[data-v-2231702e]{margin-top:5px}.message-container .control[data-v-2231702e]{position:relative;height:100%;margin-left:10px}.message-container .close-btn[data-v-2231702e]{font-size:15px;color:#666;display:flex;align-items:center;cursor:pointer}.message-container .close-btn[data-v-2231702e]:hover{color:#d14424}.message-fade-enter-active[data-v-2231702e]{animation:message-fade-in-down-2231702e .3s}.message-fade-leave-active[data-v-2231702e]{animation:message-fade-out-2231702e .3s}@keyframes message-fade-in-down-2231702e{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes message-fade-out-2231702e{0%{opacity:1;margin-top:0}to{opacity:0;margin-top:-45px}}.hotkey-doc[data-v-a0322054]{height:100%;overflow:auto;font-size:12px;margin:0 -15px;padding:0 15px 15px}.title[data-v-a0322054]{font-size:14px;font-weight:700;border-bottom:1px solid #e5e5e5;padding:25px 0 5px 0}.title[data-v-a0322054]:first-child{padding-top:0}.hotkey-item[data-v-a0322054]{border-bottom:1px solid #e5e5e5;padding:15px 0 5px 0;display:flex;align-items:center}.label[data-v-a0322054]{width:140px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.input[data-v-64bedb34]{display:none}.fullscreen-spin[data-v-a5c6b41c]{top:0;bottom:0;left:0;right:0;z-index:100;background-color:hsla(0,0%,95%,.7)}.fullscreen-spin[data-v-a5c6b41c],.spin[data-v-a5c6b41c]{position:fixed;display:flex;justify-content:center;align-items:center}.spin[data-v-a5c6b41c]{width:200px;height:200px;top:50%;left:50%;margin-top:-100px;margin-left:-100px;flex-direction:column}.spinner[data-v-a5c6b41c]{width:36px;height:36px;border:3px solid #d14424;border-top-color:transparent;border-radius:50%;animation:spinner-a5c6b41c .8s linear infinite}.text[data-v-a5c6b41c]{margin-top:20px;color:#d14424}@keyframes spinner-a5c6b41c{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.drawer[data-v-749dadac]{height:100%;position:fixed;top:0;bottom:0;z-index:5000;background:#fff;display:flex;flex-direction:column}.drawer.left[data-v-749dadac]{left:0;box-shadow:3px 0 6px -4px rgba(0,0,0,.12),9px 0 28px 8px rgba(0,0,0,.05)}.drawer.right[data-v-749dadac]{right:0;box-shadow:-3px 0 6px -4px rgba(0,0,0,.12),-9px 0 28px 8px rgba(0,0,0,.05)}.header[data-v-749dadac]{height:50px;padding:0 15px;position:relative;display:flex;align-items:center}.header .close-btn[data-v-749dadac]{width:20px;height:20px;display:flex;justify-content:center;align-items:center;position:absolute;top:15px;right:15px;cursor:pointer}.content[data-v-749dadac]{padding:0 15px;overflow:auto;flex:1}.drawer-slide-right-enter-active[data-v-749dadac]{animation:drawer-slide-right-enter-749dadac .25s ease both}.drawer-slide-right-leave-active[data-v-749dadac]{animation:drawer-slide-right-leave-749dadac .25s ease both}.drawer-slide-left-enter-active[data-v-749dadac]{animation:drawer-slide-left-enter-749dadac .25s ease both}.drawer-slide-left-leave-active[data-v-749dadac]{animation:drawer-slide-left-leave-749dadac .25s ease both}@keyframes drawer-slide-right-enter-749dadac{0%{transform:translateX(100%)}}@keyframes drawer-slide-right-leave-749dadac{to{transform:translateX(100%)}}@keyframes drawer-slide-left-enter-749dadac{0%{transform:translateX(-100%)}}@keyframes drawer-slide-left-leave-749dadac{to{transform:translateX(-100%)}}.input[data-v-a97ba0dc]{background-color:#fff;border:1px solid #d9d9d9;padding:0 5px;border-radius:2px;transition:border-color .25s;font-size:13px;display:flex}.input input[data-v-a97ba0dc]{min-width:0;height:30px;outline:0;border:0;line-height:30px;vertical-align:top;color:#41464b;padding:0 5px;flex:1;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.input input[data-v-a97ba0dc]::-moz-placeholder{color:#bfbfbf}.input input[data-v-a97ba0dc]::placeholder{color:#bfbfbf}.input.focused[data-v-a97ba0dc],.input[data-v-a97ba0dc]:not(.disabled):hover{border-color:#d14424}.input.disabled[data-v-a97ba0dc]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7}.input .prefix[data-v-a97ba0dc],.input .suffix[data-v-a97ba0dc]{display:flex;justify-content:center;align-items:center;line-height:30px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.popover.center[data-v-70fabe9a]{display:flex;justify-content:center;align-items:center}.popover-content[data-v-70fabe9a]{background-color:#fff;padding:10px;border:1px solid #eee;box-shadow:3px 3px 3px rgba(0,0,0,.15);border-radius:2px;font-size:13px}.tippy-box[data-theme~=popover]{border:0;outline:0}.popover-menu-item[data-v-2f137c4f]{min-width:80px;padding:6px 10px;border-radius:2px;font-size:13px;cursor:pointer}.popover-menu-item.center[data-v-2f137c4f]{text-align:center}.popover-menu-item[data-v-2f137c4f]:hover{background-color:#f1f1f1}.popover-menu-item+.popover-menu-item[data-v-2f137c4f]{margin-top:2px}.editor-header[data-v-0b9f8c7b]{background-color:#fff;-webkit-user-select:none;-moz-user-select:none;user-select:none;border-bottom:1px solid #eee;display:flex;justify-content:space-between;padding:0 5px}.left[data-v-0b9f8c7b],.menu-item[data-v-0b9f8c7b],.right[data-v-0b9f8c7b]{display:flex;justify-content:center;align-items:center}.menu-item[data-v-0b9f8c7b]{height:30px;font-size:14px;padding:0 10px;border-radius:2px;cursor:pointer}.menu-item .icon[data-v-0b9f8c7b]{font-size:18px;color:#666}.menu-item[data-v-0b9f8c7b]:hover{background-color:#f1f1f1}.group-menu-item[data-v-0b9f8c7b]{height:30px;display:flex;margin:0 8px;padding:0 2px;border-radius:2px}.group-menu-item[data-v-0b9f8c7b]:hover{background-color:#f1f1f1}.group-menu-item .menu-item[data-v-0b9f8c7b]{padding:0 3px}.group-menu-item .arrow-btn[data-v-0b9f8c7b]{display:flex;justify-content:center;align-items:center;cursor:pointer}.title[data-v-0b9f8c7b]{height:32px;margin-left:2px;font-size:13px}.title .title-input[data-v-0b9f8c7b]{width:200px;height:100%;padding-left:0;padding-right:0}.title .title-text[data-v-0b9f8c7b]{min-width:20px;max-width:400px;line-height:32px;padding:0 6px;border-radius:2px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.title .title-text[data-v-0b9f8c7b]:hover{background-color:#f1f1f1}.github-link[data-v-0b9f8c7b]{display:inline-block;height:30px}svg[data-v-11836cf8],svg[data-v-35e36256],svg[data-v-6e021ee2]{overflow:visible;position:absolute;z-index:2;top:0;left:0}.image-clip-handler[data-v-5984406b]{width:100%;height:100%;position:relative}.image-clip-handler .bottom-img[data-v-5984406b]{top:0;left:0;width:100%;height:100%;opacity:.5}.image-clip-handler img[data-v-5984406b]{width:100%;height:100%}.image-clip-handler .top-image-content[data-v-5984406b]{position:absolute;overflow:hidden}.image-clip-handler .top-image-content img[data-v-5984406b]{position:absolute}.operate[data-v-5984406b]{position:absolute;width:100%;height:100%;top:0;left:0;cursor:move}.clip-point[data-v-5984406b]{position:absolute;width:16px;height:16px}.clip-point svg[data-v-5984406b]{overflow:visible}.clip-point.left-top[data-v-5984406b]{left:0;top:0}.clip-point.right-top[data-v-5984406b]{left:100%;top:0;transform:rotate(90deg);transform-origin:0 0}.clip-point.left-bottom[data-v-5984406b]{left:0;top:100%;transform:rotate(-90deg);transform-origin:0 0}.clip-point.right-bottom[data-v-5984406b]{left:100%;top:100%;transform:rotate(180deg);transform-origin:0 0}.clip-point.top[data-v-5984406b]{left:50%;top:0;margin-left:-8px}.clip-point.bottom[data-v-5984406b]{left:50%;bottom:0;margin-left:-8px;transform:rotate(180deg)}.clip-point.left[data-v-5984406b]{left:0;top:50%;margin-top:-8px;transform:rotate(-90deg)}.clip-point.right[data-v-5984406b]{right:0;top:50%;margin-top:-8px;transform:rotate(90deg)}.clip-point.bottom.rotate-135[data-v-5984406b],.clip-point.left-bottom.rotate-90[data-v-5984406b],.clip-point.left-top.rotate-0[data-v-5984406b],.clip-point.left.rotate-45[data-v-5984406b],.clip-point.right-bottom.rotate-0[data-v-5984406b],.clip-point.right-top.rotate-90[data-v-5984406b],.clip-point.right.rotate-45[data-v-5984406b],.clip-point.top.rotate-135[data-v-5984406b]{cursor:nwse-resize}.clip-point.bottom.rotate-0[data-v-5984406b],.clip-point.left-bottom.rotate-135[data-v-5984406b],.clip-point.left-top.rotate-45[data-v-5984406b],.clip-point.left.rotate-90[data-v-5984406b],.clip-point.right-bottom.rotate-45[data-v-5984406b],.clip-point.right-top.rotate-135[data-v-5984406b],.clip-point.right.rotate-90[data-v-5984406b],.clip-point.top.rotate-0[data-v-5984406b]{cursor:ns-resize}.clip-point.bottom.rotate-45[data-v-5984406b],.clip-point.left-bottom.rotate-0[data-v-5984406b],.clip-point.left-top.rotate-90[data-v-5984406b],.clip-point.left.rotate-135[data-v-5984406b],.clip-point.right-bottom.rotate-90[data-v-5984406b],.clip-point.right-top.rotate-0[data-v-5984406b],.clip-point.right.rotate-135[data-v-5984406b],.clip-point.top.rotate-45[data-v-5984406b]{cursor:nesw-resize}.clip-point.bottom.rotate-90[data-v-5984406b],.clip-point.left-bottom.rotate-45[data-v-5984406b],.clip-point.left-top.rotate-135[data-v-5984406b],.clip-point.left.rotate-0[data-v-5984406b],.clip-point.right-bottom.rotate-135[data-v-5984406b],.clip-point.right-top.rotate-45[data-v-5984406b],.clip-point.right.rotate-0[data-v-5984406b],.clip-point.top.rotate-90[data-v-5984406b]{cursor:ew-resize}.editable-element-image[data-v-1156b3e1]{position:absolute}.editable-element-image.lock .element-content[data-v-1156b3e1]{cursor:default}.rotate-wrapper[data-v-1156b3e1]{width:100%;height:100%}.element-content[data-v-1156b3e1]{width:100%;height:100%;position:relative;cursor:move}.element-content .image-content[data-v-1156b3e1]{width:100%;height:100%;overflow:hidden;position:relative}.element-content img[data-v-1156b3e1]{position:absolute}.color-mask[data-v-1156b3e1]{position:absolute;top:0;bottom:0;left:0;right:0}svg[data-v-efb76626]{overflow:visible;position:absolute;top:0;left:0}.prosemirror-editor[data-v-653f533c]{cursor:text}.prosemirror-editor.format-painter[data-v-653f533c]{cursor:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTcuMzUuMDEyLS4wNjYuOTk4YTUuMjcxIDUuMjcxIDAgMCAwLTEuMTg0LjA2IDMuOCAzLjggMCAwIDAtLjkzMy40NzJjLS40NC4zNTYtLjc4My44MTEtLjk5OCAxLjMyNGwuMDE4LS4wMzZ2NS4xMmgxLjA0di45OGgtMS4wNGwtLjAwMiA0LjE1Yy4xODcuNDI2LjQ2LjgxLjc5MSAxLjExN2wuMTc1LjE1MmMuMjkzLjIwOC42MTUuMzczLjg5LjQ3Mi40MS4wODIuODMuMTEyIDEuMjQ5LjA5bC4wNTcuOTk5YTYuMDYzIDYuMDYzIDAgMCAxLTEuNTg4LS4xMjkgNC44MzYgNC44MzYgMCAwIDEtMS4yNS0uNjQ3IDQuNDYzIDQuNDYzIDAgMCAxLS44MzgtLjg4M2MtLjIyNC4zMzItLjUuNjQyLS44MjQuOTI3YTQuMTEgNC4xMSAwIDAgMS0xLjMwNS42MzNBNi4xMjYgNi4xMjYgMCAwIDEgMCAxNS45MDlsLjA2OC0uOTk3Yy40MjQuMDI2Ljg1LS4wMDEgMS4yMTctLjA3LjMzNi0uMDk5LjY1MS0uMjU0Ljg5NC0uNDMuNDMtLjM4Ljc2NS0uODQ3Ljk4Mi0xLjM2OGwtLjAwNS4wMTRWOC45M0gyLjExNXYtLjk4aDEuMDRWMi44NjJhMy43NyAzLjc3IDAgMCAwLS43NzQtMS4xNjdsLS4xNjUtLjE1NmEzLjA2NCAzLjA2NCAwIDAgMC0uODgtLjQ0OEE1LjA2MiA1LjA2MiAwIDAgMCAuMDY3IDEuMDFMMCAuMDEyYTYuMTQgNi4xNCAwIDAgMSAxLjU5Mi4xMWMuNDUzLjEzNS44NzcuMzQ1IDEuMjkuNjUuMy4yNjUuNTY1LjU2NC43ODcuODkuMjMzLS4zMzEuNTItLjYzNC44NTMtLjkwNGE0LjgzNSA0LjgzNSAwIDAgMSAxLjMtLjY0OEE2LjE1NSA2LjE1NSAwIDAgMSA3LjM1LjAxMnoiIGZpbGw9IiMwRDBEMEQiLz48cGF0aCBkPSJtMTcuMzUgMTQuNSA0LjUtNC41LTYtNmMtMiAyLTMgMi01LjUgMi41LjQgMy4yIDQuODMzIDYuNjY3IDcgOHptNC41ODgtNC40OTNhLjMuMyAwIDAgMCAuNDI0IDBsLjY4LS42OGExLjUgMS41IDAgMCAwIDAtMi4xMjJMMjEuNjkgNS44NTNsMi4wMjUtMS41ODNhMS42MjkgMS42MjkgMCAxIDAtMi4yNzktMi4yOTZsLTEuNjAzIDIuMDIyLTEuMzU3LTEuMzU3YTEuNSAxLjUgMCAwIDAtMi4xMjEgMGwtLjY4LjY4YS4zLjMgMCAwIDAgMCAuNDI1bDYuMjYzIDYuMjYzeiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xNS44OTIgMy45NjJzLTEuMDMgMS4yMDItMi40OTQgMS44OWMtMS4wMDYuNDc0LTIuMTguNTg2LTIuNzM0LjYyNy0uMi4wMTUtLjM0NC4yMS0uMjc2LjM5OS4yOTIuODIgMS4xMTIgMi44IDIuNjU4IDQuMzQ2IDIuMTI2IDIuMTI3IDMuNjU4IDIuOTY4IDQuMTQyIDMuMjAzLjEuMDQ4LjIxNC4wMy4yOTgtLjA0Mi4zODYtLjMyNSAxLjUtMS4yNzcgMi4yMS0xLjk4Ni44OTItLjg4OSAyLjE4Ny0yLjQ0NyAyLjE4Ny0yLjQ0N20uNDc5LjA1NWEuMy4zIDAgMCAxLS40MjQgMGwtNi4yNjQtNi4yNjNhLjMuMyAwIDAgMSAwLS40MjVsLjY4LS42OGExLjUgMS41IDAgMCAxIDIuMTIyIDBsMS4zNTcgMS4zNTcgMS42MDMtMi4wMjJhMS42MjkgMS42MjkgMCAxIDEgMi4yOCAyLjI5NkwyMS42OSA1Ljg1M2wxLjM1MiAxLjM1MmExLjUgMS41IDAgMCAxIDAgMi4xMjJsLS42OC42OHoiIHN0cm9rZT0iIzMzMyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjwvc3ZnPg==) 2 5,default!important}.editable-element-text[data-v-2a1e49ba]{position:absolute}.editable-element-text.lock .element-content[data-v-2a1e49ba]{cursor:default}.rotate-wrapper[data-v-2a1e49ba]{width:100%;height:100%}.element-content[data-v-2a1e49ba]{position:relative;padding:10px;line-height:1.5;word-break:break-word;cursor:move}.element-content .text[data-v-2a1e49ba]{position:relative}.element-content[data-v-2a1e49ba] a{cursor:text}.drag-handler[data-v-2a1e49ba]{height:10px;position:absolute;left:0;right:0}.drag-handler.top[data-v-2a1e49ba]{top:0}.drag-handler.bottom[data-v-2a1e49ba]{bottom:0}.editable-element-shape[data-v-5d988de2]{position:absolute;pointer-events:none}.editable-element-shape.lock .element-content[data-v-5d988de2]{cursor:default}.editable-element-shape.format-painter .element-content[data-v-5d988de2]{cursor:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNzUgMTMuNzY0VjEuNDIxYS4zLjMgMCAwIDEgLjQ0OC0uMjZsMTAuOTEgNi4xOTdhLjMuMyAwIDAgMS0uMTE2LjU1OWwtNC4xOTYuNDQyIDIuNTgyIDQuNDcyYS4zLjMgMCAwIDEtLjExLjQxbC0zLjE4NCAxLjgzOGEuMy4zIDAgMCAxLS40MS0uMTFsLTIuNTgxLTQuNDcyLTIuODEgMy40NTZhLjMuMyAwIDAgMS0uNTMzLS4xODl6IiBmaWxsPSIjZmZmIiBzdHJva2U9IiMzMzMiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJtMjYgMTQuNSA0LjUtNC41LTYtNmMtMiAyLTMgMi01LjUgMi41LjQgMy4yIDQuODMzIDYuNjY3IDcgOHptNC41ODgtNC40OTRhLjMuMyAwIDAgMCAuNDI0IDBsLjY4LS42OGExLjUgMS41IDAgMCAwIDAtMi4xMjFMMzAuMzQgNS44NTJsMi4wMjYtMS41ODJhMS42MjkgMS42MjkgMCAxIDAtMi4yOC0yLjI5NmwtMS42MDMgMi4wMjEtMS4zNTctMS4zNTZhMS41IDEuNSAwIDAgMC0yLjEyIDBsLS42ODEuNjhhLjMuMyAwIDAgMCAwIC40MjRsNi4yNjMgNi4yNjN6IiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTI0LjU0MyAzLjk2MXMtMS4wMyAxLjIwMi0yLjQ5NCAxLjg5MWMtMS4wMDYuNDc0LTIuMTgxLjU4NS0yLjczNC42MjctLjIuMDE0LS4zNDQuMjA5LS4yNzcuMzk4LjI5My44MiAxLjExMiAyLjgwMSAyLjY1OCA0LjM0NyAyLjEyNiAyLjEyNiAzLjY1OSAyLjk2OCA0LjE0MiAzLjIwMi4xLjA0OC4yMTUuMDMuMjk5LS4wNDEuMzg1LS4zMjYgMS41LTEuMjc3IDIuMjEtMS45ODYuODkxLS44OSAyLjE4Ni0yLjQ0OCAyLjE4Ni0yLjQ0OG0uNDguMDU1YS4zLjMgMCAwIDEtLjQyNSAwbC02LjI2My02LjI2M2EuMy4zIDAgMCAxIDAtLjQyNGwuNjgtLjY4YTEuNSAxLjUgMCAwIDEgMi4xMjIgMGwxLjM1NiAxLjM1NiAxLjYwNC0yLjAyMWExLjYyOSAxLjYyOSAwIDEgMSAyLjI3OSAyLjI5NkwzMC4zNCA1Ljg1MmwxLjM1MyAxLjM1M2ExLjUgMS41IDAgMCAxIDAgMi4xMjFsLS42OC42OHoiIHN0cm9rZT0iIzMzMyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjwvc3ZnPg==) 2 5,default!important}.rotate-wrapper[data-v-5d988de2]{width:100%;height:100%}.element-content[data-v-5d988de2]{width:100%;height:100%;position:relative;cursor:move}.element-content svg[data-v-5d988de2]{transform-origin:0 0;overflow:visible}.element-content .shape-path[data-v-5d988de2]{pointer-events:all}.shape-text[data-v-5d988de2]{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;padding:10px;line-height:1.2;word-break:break-word;pointer-events:none}.shape-text.editable[data-v-5d988de2]{pointer-events:all}.shape-text.top[data-v-5d988de2]{justify-content:flex-start}.shape-text.middle[data-v-5d988de2]{justify-content:center}.shape-text.bottom[data-v-5d988de2]{justify-content:flex-end}.editable-element-shape[data-v-16512454]{position:absolute;pointer-events:none}.editable-element-shape.lock .line-path[data-v-16512454],.editable-element-shape.lock .line-point[data-v-16512454]{cursor:default}.element-content[data-v-16512454]{width:100%;height:100%;position:relative}.element-content svg[data-v-16512454]{transform-origin:0 0;overflow:visible}.line-path[data-v-16512454],.line-point[data-v-16512454]{pointer-events:all;cursor:move}.chart[data-v-ae2a96a6]{display:flex}.chart-content[data-v-ae2a96a6]{transform-origin:0 0}.chart-content{--theme-color-1:#666;--theme-color-2:#666;--theme-color-3:#666;--theme-color-4:#666;--theme-color-5:#666;--theme-color-6:#666;--theme-color-7:#666;--theme-color-8:#666;--theme-color-9:#666;--theme-color-10:#666;--grid-color:rgba(0,0,0,.4)}.chart-content .ct-series-a .ct-line,.chart-content .ct-series-a .ct-point{stroke:var(--theme-color-1)}.chart-content .ct-series-a .ct-area{fill:var(--theme-color-1)}.chart-content .ct-series-a .ct-bar{stroke:var(--theme-color-1)}.chart-content .ct-series-a .ct-slice-pie{fill:var(--theme-color-1)}.chart-content .ct-series-a .ct-slice-donut{stroke:var(--theme-color-1)}.chart-content .ct-series-b .ct-line,.chart-content .ct-series-b .ct-point{stroke:var(--theme-color-2)}.chart-content .ct-series-b .ct-area{fill:var(--theme-color-2)}.chart-content .ct-series-b .ct-bar{stroke:var(--theme-color-2)}.chart-content .ct-series-b .ct-slice-pie{fill:var(--theme-color-2)}.chart-content .ct-series-b .ct-slice-donut{stroke:var(--theme-color-2)}.chart-content .ct-series-c .ct-line,.chart-content .ct-series-c .ct-point{stroke:var(--theme-color-3)}.chart-content .ct-series-c .ct-area{fill:var(--theme-color-3)}.chart-content .ct-series-c .ct-bar{stroke:var(--theme-color-3)}.chart-content .ct-series-c .ct-slice-pie{fill:var(--theme-color-3)}.chart-content .ct-series-c .ct-slice-donut{stroke:var(--theme-color-3)}.chart-content .ct-series-d .ct-line,.chart-content .ct-series-d .ct-point{stroke:var(--theme-color-4)}.chart-content .ct-series-d .ct-area{fill:var(--theme-color-4)}.chart-content .ct-series-d .ct-bar{stroke:var(--theme-color-4)}.chart-content .ct-series-d .ct-slice-pie{fill:var(--theme-color-4)}.chart-content .ct-series-d .ct-slice-donut{stroke:var(--theme-color-4)}.chart-content .ct-series-e .ct-line,.chart-content .ct-series-e .ct-point{stroke:var(--theme-color-5)}.chart-content .ct-series-e .ct-area{fill:var(--theme-color-5)}.chart-content .ct-series-e .ct-bar{stroke:var(--theme-color-5)}.chart-content .ct-series-e .ct-slice-pie{fill:var(--theme-color-5)}.chart-content .ct-series-e .ct-slice-donut{stroke:var(--theme-color-5)}.chart-content .ct-series-f .ct-line,.chart-content .ct-series-f .ct-point{stroke:var(--theme-color-6)}.chart-content .ct-series-f .ct-area{fill:var(--theme-color-6)}.chart-content .ct-series-f .ct-bar{stroke:var(--theme-color-6)}.chart-content .ct-series-f .ct-slice-pie{fill:var(--theme-color-6)}.chart-content .ct-series-f .ct-slice-donut{stroke:var(--theme-color-6)}.chart-content .ct-series-g .ct-line,.chart-content .ct-series-g .ct-point{stroke:var(--theme-color-7)}.chart-content .ct-series-g .ct-area{fill:var(--theme-color-7)}.chart-content .ct-series-g .ct-bar{stroke:var(--theme-color-7)}.chart-content .ct-series-g .ct-slice-pie{fill:var(--theme-color-7)}.chart-content .ct-series-g .ct-slice-donut{stroke:var(--theme-color-7)}.chart-content .ct-series-h .ct-line,.chart-content .ct-series-h .ct-point{stroke:var(--theme-color-8)}.chart-content .ct-series-h .ct-area{fill:var(--theme-color-8)}.chart-content .ct-series-h .ct-bar{stroke:var(--theme-color-8)}.chart-content .ct-series-h .ct-slice-pie{fill:var(--theme-color-8)}.chart-content .ct-series-h .ct-slice-donut{stroke:var(--theme-color-8)}.chart-content .ct-series-i .ct-line,.chart-content .ct-series-i .ct-point{stroke:var(--theme-color-9)}.chart-content .ct-series-i .ct-area{fill:var(--theme-color-9)}.chart-content .ct-series-i .ct-bar{stroke:var(--theme-color-9)}.chart-content .ct-series-i .ct-slice-pie{fill:var(--theme-color-9)}.chart-content .ct-series-i .ct-slice-donut{stroke:var(--theme-color-9)}.chart-content .ct-grid{stroke:var(--grid-color)}.chart-content .ct-label{fill:var(--grid-color);color:var(--grid-color)}.legends{height:20px;justify-content:center;font-size:14px}.legend,.legends{display:flex;align-items:center}.legend+.legend{margin-left:10px}.legend .block{width:10px;height:10px;margin-right:5px}.editable-element-chart[data-v-6fc3de39]{position:absolute}.editable-element-chart.lock .element-content[data-v-6fc3de39]{cursor:default}.rotate-wrapper[data-v-6fc3de39]{width:100%;height:100%}.element-content[data-v-6fc3de39]{width:100%;height:100%;overflow:hidden;cursor:move}.custom-textarea[data-v-7a7222ac]{border:0;outline:0;-webkit-user-modify:read-write-plaintext-only}.editable-table[data-v-0236a619],table[data-v-0236a619]{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}table[data-v-0236a619]{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0;border:0;word-wrap:break-word;--themeColor:$themeColor;--subThemeColor1:$themeColor;--subThemeColor2:$themeColor}table.theme[data-v-0236a619]{background-color:#fff}table.theme tr:nth-child(2n) .cell[data-v-0236a619]{background-color:var(--subThemeColor1)}table.theme tr:nth-child(odd) .cell[data-v-0236a619]{background-color:var(--subThemeColor2)}table.theme.col-footer tr .cell[data-v-0236a619]:last-child,table.theme.col-header tr .cell[data-v-0236a619]:first-child,table.theme.row-footer tr:last-child .cell[data-v-0236a619],table.theme.row-header tr:first-child .cell[data-v-0236a619]{background-color:var(--themeColor)}table .cell[data-v-0236a619]{position:relative;white-space:normal;word-wrap:break-word;vertical-align:middle;font-size:14px;background-clip:padding-box;cursor:default}table .cell.selected[data-v-0236a619]:after{content:"";width:100%;height:100%;position:absolute;top:0;left:0;background-color:hsla(0,0%,40%,.4)}table .cell-text[data-v-0236a619]{padding:5px;line-height:1.5;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:text}table .cell-text.active[data-v-0236a619]{-webkit-user-select:text;-moz-user-select:text;user-select:text}.drag-line[data-v-0236a619]{position:absolute;top:0;bottom:0;width:3px;background-color:#d14424;margin-left:-1px;opacity:0;z-index:2;cursor:col-resize}.editable-element-table[data-v-742a731e]{position:absolute}.editable-element-table.lock .element-content[data-v-742a731e]{cursor:default}.rotate-wrapper[data-v-742a731e]{width:100%;height:100%}.element-content[data-v-742a731e]{width:100%;height:100%;position:relative;cursor:move}.table-mask[data-v-742a731e]{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .2s}.table-mask .mask-tip[data-v-742a731e]{position:absolute;top:5px;left:5px;background-color:rgba(0,0,0,.5);color:#fff;padding:6px 12px;font-size:12px;transform-origin:0 0}.table-mask[data-v-742a731e]:hover:not(.lock){opacity:.9}.editable-element-latex[data-v-35c33b80]{position:absolute}.editable-element-latex.lock .element-content[data-v-35c33b80]{cursor:default}.rotate-wrapper[data-v-35c33b80]{width:100%;height:100%}.element-content[data-v-35c33b80]{width:100%;height:100%;position:relative;cursor:move}.element-content svg[data-v-35c33b80]{transform-origin:0 0;overflow:visible}.video-player[data-v-e55352ca]{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:1;transform-origin:0 0}.video-player.hide-controller[data-v-e55352ca]{cursor:none}.video-player.hide-controller .controller-mask[data-v-e55352ca],.video-player.hide-controller .controller[data-v-e55352ca]{opacity:0;transform:translateY(100%)}.video-wrap[data-v-e55352ca]{position:relative;background:#000;font-size:0;width:100%;height:100%}.video-wrap .video[data-v-e55352ca]{width:100%;height:100%}.controller-mask[data-v-e55352ca]{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) repeat-x bottom;height:98px;width:100%;position:absolute;bottom:0;transition:all .3s ease}.controller[data-v-e55352ca]{position:absolute;bottom:0;left:0;right:0;height:41px;padding:0 20px;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:all .3s ease}.controller .bar-wrap[data-v-e55352ca]{padding:5px 0;cursor:pointer;position:absolute;bottom:33px;width:calc(100% - 40px);height:3px}.controller .bar-wrap:hover .bar .played .thumb[data-v-e55352ca]{transform:scale(1)}.controller .bar-wrap .bar-time[data-v-e55352ca]{position:absolute;left:0;top:-20px;border-radius:4px;padding:5px 7px;background-color:rgba(0,0,0,.62);color:#fff;font-size:12px;text-align:center;opacity:1;transition:opacity .1s ease-in-out;word-wrap:normal;word-break:normal;z-index:2;pointer-events:none}.controller .bar-wrap .bar-time.hidden[data-v-e55352ca]{opacity:0}.controller .bar-wrap .bar[data-v-e55352ca]{position:relative;height:3px;width:100%;background:hsla(0,0%,100%,.2);cursor:pointer}.controller .bar-wrap .bar .loaded[data-v-e55352ca]{position:absolute;left:0;top:0;bottom:0;background:hsla(0,0%,100%,.4);height:3px;transition:all .5s ease;will-change:width}.controller .bar-wrap .bar .played[data-v-e55352ca]{position:absolute;left:0;top:0;bottom:0;height:3px;will-change:width;background-color:#fff}.controller .bar-wrap .bar .played .thumb[data-v-e55352ca]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .icons[data-v-e55352ca]{height:38px;position:absolute;bottom:0;display:flex;align-items:center}.controller .icons.icons-right[data-v-e55352ca]{right:15px}.controller .icons .time[data-v-e55352ca]{line-height:38px;color:#eee;text-shadow:0 0 2px rgba(0,0,0,.5);vertical-align:middle;font-size:13px;cursor:default}.controller .icons .icon[data-v-e55352ca]{width:40px;height:100%;position:relative;cursor:pointer;display:flex;align-items:center;font-size:20px}.controller .icons .icon.play-icon[data-v-e55352ca]{font-size:26px}.controller .icons .icon .icon-content[data-v-e55352ca]{transition:all .2s ease-in-out;opacity:.8;color:#fff}.controller .icons .icon.loop-icon[data-v-e55352ca]{font-size:12px}.controller .icons .icon.loop-icon .icon-content[data-v-e55352ca]{opacity:.5}.controller .icons .icon.speed-icon[data-v-e55352ca]{font-size:12px;position:relative}.controller .icons .icon .speed-menu[data-v-e55352ca]{width:70px;position:absolute;bottom:30px;left:-23px;background-color:#22211b;padding:5px 0;color:#ddd}.controller .icons .icon .speed-menu .speed-menu-item[data-v-e55352ca]{padding:8px 0;text-align:center}.controller .icons .icon .speed-menu .speed-menu-item[data-v-e55352ca]:hover{background-color:#393833;color:#fff}.controller .icons .icon .speed-menu .speed-menu-item.active[data-v-e55352ca]{font-weight:700;color:#fff}.controller .icons .icon.active .icon-content[data-v-e55352ca],.controller .icons .icon:hover .icon-content[data-v-e55352ca]{opacity:1}.controller .icons .volume[data-v-e55352ca]{height:100%;position:relative;cursor:pointer;display:flex;align-items:center}.controller .icons .volume:hover .volume-bar-wrap .volume-bar[data-v-e55352ca]{width:45px}.controller .icons .volume:hover .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-e55352ca]{transform:scale(1)}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar[data-v-e55352ca]{width:45px}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-e55352ca]{transform:scale(1)}.controller .icons .volume-bar-wrap[data-v-e55352ca]{display:inline-block;margin:0 15px 0 -5px;vertical-align:middle;height:100%}.controller .icons .volume-bar[data-v-e55352ca]{position:relative;top:17px;width:0;height:3px;background:#aaa;transition:all .3s ease-in-out}.controller .icons .volume-bar .volume-bar-inner[data-v-e55352ca]{position:absolute;bottom:0;left:0;height:100%;transition:all .1s ease;will-change:width;background-color:#fff}.controller .icons .volume-bar .volume-bar-inner .thumb[data-v-e55352ca]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .icons .loop[data-v-e55352ca]{display:inline-block;height:100%}.bezel[data-v-e55352ca]{position:absolute;left:0;right:0;top:0;bottom:0;font-size:22px;color:#fff;pointer-events:none}.bezel .bezel-icon[data-v-e55352ca]{position:absolute;top:50%;left:50%;margin:-26px 0 0 -26px;height:52px;width:52px;padding:12px;display:flex;justify-content:center;align-items:center;background:rgba(0,0,0,.5);border-radius:50%;opacity:0;pointer-events:none;font-size:40px}.bezel .bezel-icon.bezel-transition[data-v-e55352ca]{animation:bezel-hide-e55352ca .5s linear}@keyframes bezel-hide-e55352ca{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(2)}}.load-error[data-v-e55352ca]{position:absolute;left:0;right:0;top:0;bottom:0;font-size:15px;color:#fff;pointer-events:none;display:flex;justify-content:center;align-items:center}.editable-element-video[data-v-5dc89f2a]{position:absolute}.editable-element-video.lock .handler-border[data-v-5dc89f2a]{cursor:default}.rotate-wrapper[data-v-5dc89f2a]{width:100%;height:100%}.element-content[data-v-5dc89f2a]{width:100%;height:100%;position:relative}.handler-border[data-v-5dc89f2a]{position:absolute;cursor:move}.handler-border.t[data-v-5dc89f2a]{width:100%;height:20px;top:0;left:0}.handler-border.b[data-v-5dc89f2a]{width:100%;height:5px;bottom:0;left:0}.handler-border.l[data-v-5dc89f2a]{width:10px;height:100%;left:0;top:0}.handler-border.r[data-v-5dc89f2a]{width:10px;height:100%;right:0;top:0}.audio-player[data-v-44037f56]{width:280px;height:50px;position:relative;line-height:1;transform-origin:0 0;background:#000}.audio-player[data-v-44037f56],.controller[data-v-44037f56]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.controller[data-v-44037f56]{position:absolute;bottom:0;left:0;right:0;height:41px;padding:0 20px;transition:all .3s ease}.controller .bar-wrap[data-v-44037f56]{padding:5px 0;cursor:pointer;position:absolute;bottom:35px;width:calc(100% - 40px);height:3px}.controller .bar-wrap:hover .bar .played .thumb[data-v-44037f56]{transform:scale(1)}.controller .bar-wrap .bar-time[data-v-44037f56]{position:absolute;left:0;top:-20px;border-radius:4px;padding:5px 7px;background-color:rgba(0,0,0,.62);color:#fff;font-size:12px;text-align:center;opacity:1;transition:opacity .1s ease-in-out;word-wrap:normal;word-break:normal;z-index:2;pointer-events:none}.controller .bar-wrap .bar-time.hidden[data-v-44037f56]{opacity:0}.controller .bar-wrap .bar[data-v-44037f56]{position:relative;height:3px;width:100%;background:hsla(0,0%,100%,.2);cursor:pointer}.controller .bar-wrap .bar .loaded[data-v-44037f56]{position:absolute;left:0;top:0;bottom:0;background:hsla(0,0%,100%,.4);height:3px;transition:all .5s ease;will-change:width}.controller .bar-wrap .bar .played[data-v-44037f56]{position:absolute;left:0;top:0;bottom:0;height:3px;will-change:width;background-color:#fff}.controller .bar-wrap .bar .played .thumb[data-v-44037f56]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .icons[data-v-44037f56]{height:38px;position:absolute;bottom:0;left:14px;display:flex;align-items:center}.controller .icons .icon[data-v-44037f56]{width:36px;height:100%;position:relative;cursor:pointer;display:flex;align-items:center;font-size:20px}.controller .icons .icon.play-icon[data-v-44037f56]{font-size:26px}.controller .icons .icon .icon-content[data-v-44037f56]{transition:all .2s ease-in-out;opacity:.8;color:#fff}.controller .icons .icon.active .icon-content[data-v-44037f56],.controller .icons .icon:hover .icon-content[data-v-44037f56]{opacity:1}.controller .icons .volume[data-v-44037f56]{height:100%;position:relative;cursor:pointer;display:flex;align-items:center}.controller .icons .volume:hover .volume-bar-wrap .volume-bar[data-v-44037f56]{width:45px}.controller .icons .volume:hover .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-44037f56]{transform:scale(1)}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar[data-v-44037f56]{width:45px}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-44037f56]{transform:scale(1)}.controller .icons .volume-bar-wrap[data-v-44037f56]{display:inline-block;margin:0 15px 0 -5px;vertical-align:middle;height:100%}.controller .icons .volume-bar[data-v-44037f56]{position:relative;top:17px;width:0;height:3px;background:#aaa;transition:all .3s ease-in-out}.controller .icons .volume-bar .volume-bar-inner[data-v-44037f56]{position:absolute;bottom:0;left:0;height:100%;transition:all .1s ease;will-change:width;background-color:#fff}.controller .icons .volume-bar .volume-bar-inner .thumb[data-v-44037f56]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .time[data-v-44037f56]{height:38px;position:absolute;right:20px;bottom:0;display:flex;align-items:center;line-height:38px;color:#eee;text-shadow:0 0 2px rgba(0,0,0,.5);vertical-align:middle;font-size:13px;cursor:default}.controller .time .ptime[data-v-44037f56]{margin-right:2px}.controller .time .dtime[data-v-44037f56]{margin-left:2px}.editable-element-audio[data-v-53bdc956]{position:absolute}.editable-element-audio.lock .audio-icon[data-v-53bdc956]{cursor:default}.rotate-wrapper[data-v-53bdc956]{width:100%;height:100%}.element-content[data-v-53bdc956]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.audio-icon[data-v-53bdc956]{cursor:move}.audio-player[data-v-53bdc956]{position:absolute}.mouse-selection[data-v-2c5e1d42]{position:absolute;background-color:rgba(209,68,36,.1);border:1px solid #d14424;z-index:200}.mouse-selection.quadrant-1[data-v-2c5e1d42]{transform-origin:50% 0;transform:rotate(180deg)}.mouse-selection.quadrant-2[data-v-2c5e1d42]{transform-origin:0 0;transform:rotate(180deg)}.mouse-selection.quadrant-3[data-v-2c5e1d42]{transform-origin:0 50%;transform:rotate(180deg)}.mouse-selection.quadrant-4[data-v-2c5e1d42]{transform-origin:0 0;transform:rotate(0deg)}.grid-lines[data-v-05484a24]{width:100%;height:100%;overflow:visible;z-index:999;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}.viewport-background[data-v-b6b18502]{width:100%;height:100%;background-position:50%;position:absolute}.alignment-line[data-v-ed6fc00a]{position:absolute;z-index:100}.alignment-line .line[data-v-ed6fc00a]{width:0;height:0;border:0 dashed #d14424}.alignment-line .line.vertical[data-v-ed6fc00a]{transform:translateY(-.5px);border-left-width:1px}.alignment-line .line.horizontal[data-v-ed6fc00a]{transform:translateX(-.5px);border-top-width:1px}.ruler[data-v-2963c74c]{font-size:12px}.h[data-v-2963c74c]{position:absolute;background-color:#fff;border:1px solid #eee;height:20px;top:5px;display:flex;justify-content:space-between;align-items:center;overflow:hidden}.h .ruler-marker-100[data-v-2963c74c]{height:100%;width:10%;line-height:20px;text-align:right;flex-shrink:0;padding-right:5px;position:relative}.h .ruler-marker-100.hide span[data-v-2963c74c],.h .ruler-marker-100.omit[data-v-2963c74c]:before{display:none}.h .ruler-marker-100[data-v-2963c74c]:not(:last-child):after{content:"";width:.1px;height:12px;position:absolute;right:0;bottom:0;background-color:#999}.h .ruler-marker-100[data-v-2963c74c]:before{content:"";width:.1px;height:8px;position:absolute;right:50%;bottom:0;background-color:#999}.v[data-v-2963c74c]{position:absolute;background-color:#fff;border:1px solid #eee;width:20px;left:5px;overflow:hidden}.v .ruler-marker-100[data-v-2963c74c]{width:100%;line-height:20px;text-align:right;padding-bottom:5px;position:relative;writing-mode:vertical-rl}.v .ruler-marker-100.hide span[data-v-2963c74c],.v .ruler-marker-100.omit[data-v-2963c74c]:before{display:none}.v .ruler-marker-100[data-v-2963c74c]:not(:last-child):after{content:"";height:.1px;width:12px;position:absolute;bottom:0;right:0;background-color:#999}.v .ruler-marker-100[data-v-2963c74c]:before{content:"";height:.1px;width:8px;position:absolute;bottom:50%;right:0;background-color:#999}.element-create-selection[data-v-85b0bbaa]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2;cursor:crosshair}.element-create-selection svg[data-v-85b0bbaa]{overflow:visible}.selection[data-v-85b0bbaa]{position:absolute;opacity:.8}.selection[data-v-85b0bbaa]:not(.line){border:1px solid #d14424}.shape-create-canvas[data-v-224f36be]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2;cursor:crosshair}.shape-create-canvas svg[data-v-224f36be]{width:100%;height:100%;overflow:visible}.resize-handler[data-v-1e66197f]{position:absolute;width:10px;height:10px;left:0;top:0;margin:-5px 0 0 -5px;border:1px solid #d14424;background-color:#fff;border-radius:1px;cursor:pointer}.resize-handler.bottom.rotate-135[data-v-1e66197f],.resize-handler.left-bottom.rotate-90[data-v-1e66197f],.resize-handler.left-top.rotate-0[data-v-1e66197f],.resize-handler.left.rotate-45[data-v-1e66197f],.resize-handler.right-bottom.rotate-0[data-v-1e66197f],.resize-handler.right-top.rotate-90[data-v-1e66197f],.resize-handler.right.rotate-45[data-v-1e66197f],.resize-handler.top.rotate-135[data-v-1e66197f]{cursor:nwse-resize}.resize-handler.bottom.rotate-0[data-v-1e66197f],.resize-handler.left-bottom.rotate-135[data-v-1e66197f],.resize-handler.left-top.rotate-45[data-v-1e66197f],.resize-handler.left.rotate-90[data-v-1e66197f],.resize-handler.right-bottom.rotate-45[data-v-1e66197f],.resize-handler.right-top.rotate-135[data-v-1e66197f],.resize-handler.right.rotate-90[data-v-1e66197f],.resize-handler.top.rotate-0[data-v-1e66197f]{cursor:ns-resize}.resize-handler.bottom.rotate-45[data-v-1e66197f],.resize-handler.left-bottom.rotate-0[data-v-1e66197f],.resize-handler.left-top.rotate-90[data-v-1e66197f],.resize-handler.left.rotate-135[data-v-1e66197f],.resize-handler.right-bottom.rotate-90[data-v-1e66197f],.resize-handler.right-top.rotate-0[data-v-1e66197f],.resize-handler.right.rotate-135[data-v-1e66197f],.resize-handler.top.rotate-45[data-v-1e66197f]{cursor:nesw-resize}.resize-handler.bottom.rotate-90[data-v-1e66197f],.resize-handler.left-bottom.rotate-45[data-v-1e66197f],.resize-handler.left-top.rotate-135[data-v-1e66197f],.resize-handler.left.rotate-0[data-v-1e66197f],.resize-handler.right-bottom.rotate-135[data-v-1e66197f],.resize-handler.right-top.rotate-45[data-v-1e66197f],.resize-handler.right.rotate-0[data-v-1e66197f],.resize-handler.top.rotate-90[data-v-1e66197f]{cursor:ew-resize}.border-line[data-v-8346cf6c]{position:absolute;width:0;height:0;left:0;top:0;border:0 dashed #d14424}.border-line.top[data-v-8346cf6c]{border-top-width:1px}.border-line.bottom[data-v-8346cf6c]{border-bottom-width:1px}.border-line.left[data-v-8346cf6c]{border-left-width:1px}.border-line.right[data-v-8346cf6c]{border-right-width:1px}.border-line.wide[data-v-8346cf6c]:before{content:"";position:absolute;background:transparent;cursor:move}.border-line.wide.top[data-v-8346cf6c]:before{top:-8px;left:-8px;width:calc(100% + 16px);height:16px}.border-line.wide.bottom[data-v-8346cf6c]:before{bottom:-8px;left:-8px;width:calc(100% + 16px);height:16px}.border-line.wide.left[data-v-8346cf6c]:before{top:-8px;left:-8px;width:16px;height:calc(100% + 16px)}.border-line.wide.right[data-v-8346cf6c]:before{top:-8px;right:-8px;width:16px;height:calc(100% + 16px)}.multi-select-operate[data-v-97dc9b9a]{position:absolute;top:0;left:0;z-index:101}.rotate-handler[data-v-b99d8dae]{position:absolute;width:10px;height:10px;top:-25px;margin-left:-5px;border:1px solid #d14424;background-color:#fff;border-radius:1px;cursor:grab}.rotate-handler[data-v-b99d8dae]:active{cursor:grabbing}.image-element-operate.cliping[data-v-7bcad5a9]{visibility:hidden}.operate-keypoint-handler[data-v-52dcdbf8]{position:absolute;width:10px;height:10px;left:0;top:0;margin:-5px 0 0 -5px;border:1px solid #d14424;background-color:#ffe873;border-radius:1px}svg[data-v-3aa5cc44]{position:absolute;left:0;top:0;pointer-events:none;transform-origin:0 0}.anchor-line[data-v-3aa5cc44]{stroke-width:1px;stroke-dasharray:5 5;opacity:.5}.divider.horizontal[data-v-6b66cde8]{width:100%;margin:24px 0;border-block-start:1px solid rgba(5,5,5,.06)}.divider.vertical[data-v-6b66cde8]{position:relative;height:1em;display:inline-block;margin:0 8px;border-inline-start:1px solid rgba(5,5,5,.06)}.link-handler[data-v-316c4664]{height:30px;position:absolute;left:0;font-size:12px;padding:0 10px;background-color:#fff;box-shadow:3px 3px 3px rgba(0,0,0,.15);display:flex;align-items:center;color:#d14424}.link[data-v-316c4664]{max-width:300px;margin-right:20px;word-break:keep-all;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.btns[data-v-316c4664]{display:flex;align-items:center}.btns .btn[data-v-316c4664]{word-break:keep-all;cursor:pointer}.operate[data-v-5ec1ff35]{position:absolute;z-index:100;-webkit-user-select:none;-moz-user-select:none;user-select:none}.operate.multi-select[data-v-5ec1ff35]{opacity:.2}.animation-index[data-v-5ec1ff35]{position:absolute;top:0;left:-24px;font-size:12px}.animation-index .index-item[data-v-5ec1ff35]{width:18px;height:18px;background-color:#fff;color:#d14424;border:1px solid #d14424;display:flex;justify-content:center;align-items:center}.animation-index .index-item+.index-item[data-v-5ec1ff35]{margin-top:5px}.base-element-image[data-v-24fef706]{position:absolute}.rotate-wrapper[data-v-24fef706]{width:100%;height:100%}.element-content[data-v-24fef706]{width:100%;height:100%;position:relative}.element-content .image-content[data-v-24fef706]{width:100%;height:100%;overflow:hidden;position:relative}.element-content img[data-v-24fef706]{position:absolute}.color-mask[data-v-24fef706]{position:absolute;top:0;bottom:0;left:0;right:0}.base-element-text[data-v-52a206f2]{position:absolute}.rotate-wrapper[data-v-52a206f2]{width:100%;height:100%}.element-content[data-v-52a206f2]{position:relative;padding:10px;line-height:1.5;word-break:break-word}.element-content .text[data-v-52a206f2]{position:relative}.base-element-shape[data-v-b13f8fa8]{position:absolute}.rotate-wrapper[data-v-b13f8fa8]{width:100%;height:100%}.element-content[data-v-b13f8fa8]{width:100%;height:100%;position:relative}.element-content svg[data-v-b13f8fa8]{transform-origin:0 0;overflow:visible}.shape-text[data-v-b13f8fa8]{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;padding:10px;line-height:1.2;word-break:break-word}.shape-text.top[data-v-b13f8fa8]{justify-content:flex-start}.shape-text.middle[data-v-b13f8fa8]{justify-content:center}.shape-text.bottom[data-v-b13f8fa8]{justify-content:flex-end}.base-element-line[data-v-443e2f82]{position:absolute}.element-content[data-v-443e2f82]{width:100%;height:100%;position:relative}.element-content svg[data-v-443e2f82]{transform-origin:0 0;overflow:visible}.base-element-chart[data-v-7c03d68d]{position:absolute}.element-content[data-v-7c03d68d],.rotate-wrapper[data-v-7c03d68d]{width:100%;height:100%}.static-table[data-v-5d949d4d],table[data-v-5d949d4d]{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}table[data-v-5d949d4d]{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0;border:0;word-wrap:break-word;--themeColor:$themeColor;--subThemeColor1:$themeColor;--subThemeColor2:$themeColor}table.theme[data-v-5d949d4d]{background-color:#fff}table.theme tr:nth-child(2n) .cell[data-v-5d949d4d]{background-color:var(--subThemeColor1)}table.theme tr:nth-child(odd) .cell[data-v-5d949d4d]{background-color:var(--subThemeColor2)}table.theme.col-footer tr .cell[data-v-5d949d4d]:last-child,table.theme.col-header tr .cell[data-v-5d949d4d]:first-child,table.theme.row-footer tr:last-child .cell[data-v-5d949d4d],table.theme.row-header tr:first-child .cell[data-v-5d949d4d]{background-color:var(--themeColor)}table .cell[data-v-5d949d4d]{position:relative;white-space:normal;word-wrap:break-word;vertical-align:middle;background-clip:padding-box}table .cell-text[data-v-5d949d4d]{padding:5px;line-height:1.5}.base-element-table[data-v-3eff7eba]{position:absolute}.rotate-wrapper[data-v-3eff7eba]{width:100%;height:100%}.element-content[data-v-3eff7eba]{width:100%;height:100%;position:relative}.base-element-latex[data-v-1587280d]{position:absolute}.rotate-wrapper[data-v-1587280d]{width:100%;height:100%}.element-content[data-v-1587280d]{width:100%;height:100%;position:relative}.element-content svg[data-v-1587280d]{transform-origin:0 0;overflow:visible}.base-element-video[data-v-09436dde]{position:absolute}.rotate-wrapper[data-v-09436dde]{width:100%;height:100%}.element-content[data-v-09436dde]{width:100%;height:100%;background-color:#000;background-position:50%;background-size:contain;background-repeat:no-repeat;display:flex;justify-content:center;align-items:center}.icon[data-v-09436dde]{font-size:140px;color:#aaa}.base-element-audio[data-v-5da834d7]{position:absolute}.rotate-wrapper[data-v-5da834d7]{width:100%;height:100%}.element-content[data-v-5da834d7]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.audio-icon[data-v-5da834d7]{cursor:move}.thumbnail-slide[data-v-43dcaa52]{background-color:#fff;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none}.elements[data-v-43dcaa52]{transform-origin:0 0}.background[data-v-43dcaa52]{width:100%;height:100%;background-position:50%;position:absolute}.placeholder[data-v-43dcaa52]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.tabs[data-v-5e3d7626]{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:1}.tabs[data-v-5e3d7626]:not(.card){font-size:13px;align-items:center;justify-content:flex-start;border-bottom:1px solid #eee}.tabs:not(.card).space-around[data-v-5e3d7626]{justify-content:space-around}.tabs:not(.card).space-between[data-v-5e3d7626]{justify-content:space-between}.tabs:not(.card) .tab[data-v-5e3d7626]{text-align:center;border-bottom:2px solid transparent;padding:8px 10px;cursor:pointer}.tabs:not(.card) .tab.active[data-v-5e3d7626]{border-bottom:2px solid var(--color,#d14424)}.tabs.card[data-v-5e3d7626]{height:40px;font-size:12px;flex-shrink:0}.tabs.card .tab[data-v-5e3d7626]{flex:1;display:flex;justify-content:center;align-items:center;background-color:#f9f9f9;border-bottom:1px solid #eee;cursor:pointer}.tabs.card .tab.active[data-v-5e3d7626]{background-color:transparent;border-bottom-color:transparent}.tabs.card .tab+.tab[data-v-5e3d7626]{border-left:1px solid #eee}.button[data-v-52c90330]{height:32px;line-height:32px;outline:0;font-size:13px;padding:0 15px;text-align:center;color:#41464b;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;user-select:none;letter-spacing:1px;cursor:pointer}.button.small[data-v-52c90330]{height:24px;line-height:24px;padding:0 7px;letter-spacing:0}.button.default[data-v-52c90330]{background-color:#fff;border:1px solid #d9d9d9;color:#41464b}.button.default[data-v-52c90330]:hover{color:#d14424;border-color:#d14424}.button.primary[data-v-52c90330]{background-color:#d14424;border:1px solid #d14424;color:#fff}.button.primary[data-v-52c90330]:hover{background-color:#de6949;border-color:#de6949}.button.checkbox[data-v-52c90330],.button.radio[data-v-52c90330]{background-color:#fff;border:1px solid #d9d9d9;color:#41464b}.button.checkbox[data-v-52c90330]:not(.checked):hover,.button.radio[data-v-52c90330]:not(.checked):hover{color:#d14424}.button.checked[data-v-52c90330]{color:#fff;background-color:#d14424;border-color:#d14424}.button.checked[data-v-52c90330]:hover{background-color:#de6949;border-color:#de6949}.button.disabled[data-v-52c90330]{background-color:#f5f5f5;border:1px solid #d9d9d9;color:#b7b7b7;cursor:default}.select[data-v-5bf3b141]{width:100%;height:32px;padding-right:32px;border-radius:2px;transition:border-color .25s;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:#fff;border:1px solid #d9d9d9;position:relative;cursor:pointer}.select[data-v-5bf3b141]:not(.disabled):hover{border-color:#d14424}.select.disabled[data-v-5bf3b141]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7;cursor:default}.select .selector[data-v-5bf3b141]{min-width:50px;height:30px;line-height:30px;padding-left:10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.options[data-v-5bf3b141]{max-height:260px;padding:5px;overflow:auto;text-align:left;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.option[data-v-5bf3b141]{height:32px;line-height:32px;padding:0 5px;border-radius:2px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.option.disabled[data-v-5bf3b141]{color:#b7b7b7;cursor:default}.option[data-v-5bf3b141]:not(.disabled,.selected):hover{background-color:hsla(0,0%,40%,.05)}.option.selected[data-v-5bf3b141]{background-color:rgba(209,68,36,.05)}.icon[data-v-5bf3b141]{width:32px;height:30px;color:#bfbfbf;position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:center}.link-dialog[data-v-cc39ee16]{font-size:13px;line-height:1.675}.input[data-v-cc39ee16]{width:100%;height:32px}.preview[data-v-cc39ee16]{margin-top:12px}.thumbnail[data-v-cc39ee16]{border:1px solid rgba(209,68,36,.15);margin-top:5px}.btns[data-v-cc39ee16]{margin-top:20px;text-align:right}.mask[data-v-fea8edcc],.modal[data-v-fea8edcc]{top:0;left:0;width:100%;height:100%;z-index:5000}.modal[data-v-fea8edcc]{position:fixed;display:flex;justify-content:center;align-items:center;outline:0;border:0}.mask[data-v-fea8edcc]{position:absolute;background:rgba(0,0,0,.25)}.modal-content[data-v-fea8edcc]{z-index:5001;padding:20px;background:#fff;border-radius:2px;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.2);position:relative}.close-btn[data-v-fea8edcc]{width:20px;height:20px;display:flex;justify-content:center;align-items:center;position:absolute;top:16px;right:16px;cursor:pointer}.modal-fade-enter-active[data-v-fea8edcc]{animation:modal-fade-enter-fea8edcc .25s ease-in both}.modal-fade-leave-active[data-v-fea8edcc]{animation:modal-fade-leave-fea8edcc .25s ease-out both}.modal-zoom-enter-active[data-v-fea8edcc]{animation:modal-zoom-enter-fea8edcc .25s cubic-bezier(.4,0,0,1.5) both}.modal-zoom-leave-active[data-v-fea8edcc]{animation:modal-zoom-leave-fea8edcc .25s both}@keyframes modal-fade-enter-fea8edcc{0%{opacity:0}}@keyframes modal-fade-leave-fea8edcc{to{opacity:0}}@keyframes modal-zoom-enter-fea8edcc{0%{transform:scale3d(.3,.3,.3)}}@keyframes modal-zoom-leave-fea8edcc{to{transform:scale3d(.3,.3,.3)}}.canvas[data-v-ce64755c]{height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden;background-color:#f9f9f9;position:relative}.drag-mask[data-v-ce64755c]{cursor:grab;position:absolute;top:0;right:0;bottom:0;left:0}.viewport-wrapper[data-v-ce64755c]{position:absolute;box-shadow:0 0 15px 0 rgba(0,0,0,.1)}.viewport[data-v-ce64755c]{position:absolute;top:0;left:0;transform-origin:0 0}.shape-item-thumbnail[data-v-8603ad34]{position:relative;cursor:pointer}.shape-content[data-v-8603ad34]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center}.shape-content:hover .shape-path[data-v-8603ad34]:not(.outlined){stroke:#d14424}.shape-content:hover .shape-path.outlined[data-v-8603ad34]{fill:#d14424}.shape-content svg[data-v-8603ad34]:not(:root){overflow:visible}.shape-pool[data-v-8b994b42]{width:340px;max-height:520px;overflow:auto;margin-top:-12px;margin-bottom:-12px;margin-right:-12px;padding-right:12px;padding-top:12px}.category-name[data-v-8b994b42]{width:100%;font-size:13px;margin-bottom:10px;border-left:4px solid #aaa;background-color:#eee;padding:2px 0 2px 10px}.shape-list[data-v-8b994b42]{display:flex;flex-wrap:wrap;align-content:flex-start;margin-bottom:10px}.shape-item[data-v-8b994b42]{width:8%;margin-bottom:2.22222%;height:0;padding-bottom:8%;flex-shrink:0}.shape-item[data-v-8b994b42]:not(:nth-child(10n)){margin-right:2.22222%}.line-pool[data-v-554824b6]{width:220px;overflow:auto;margin-bottom:-12px;margin-right:-12px;padding-right:12px}.category-name[data-v-554824b6]{width:100%;font-size:13px;margin-bottom:10px;border-left:4px solid #aaa;background-color:#eee;padding:2px 0 2px 10px}.line-list[data-v-554824b6]{display:flex;flex-wrap:wrap;align-content:flex-start;margin-bottom:10px}.line-item[data-v-554824b6]{width:19%;margin-bottom:1.25%;height:0;padding-bottom:19%;flex-shrink:0;position:relative;cursor:pointer}.line-item[data-v-554824b6]:not(:nth-child(5n)){margin-right:1.25%}.line-content[data-v-554824b6]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;color:#999}.line-content[data-v-554824b6]:hover{color:#d14424}.line-content svg[data-v-554824b6]:not(:root){overflow:visible}.chart-pool[data-v-398f5699]{width:200px;margin-bottom:-5px;display:flex;flex-wrap:wrap;align-content:flex-start}.chart-item[data-v-398f5699]{width:19%;margin-bottom:1.25%;height:0;padding-bottom:19%;flex-shrink:0;position:relative;cursor:pointer}.chart-item[data-v-398f5699]:not(:nth-child(5n)){margin-right:1.25%}.chart-content[data-v-398f5699]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;color:#999}.chart-content[data-v-398f5699]:hover{color:#d14424}.number-input[data-v-268948c2]{background-color:#fff;border:1px solid #d9d9d9;padding:0 0 0 5px;border-radius:2px;transition:border-color .25s;font-size:13px;display:inline-flex}.number-input .input-wrap[data-v-268948c2]{flex:1;color:#41464b;padding:0 0 0 5px;position:relative}.number-input:not(.disabled) .input-wrap:hover .handlers[data-v-268948c2]{opacity:1}.number-input .handlers[data-v-268948c2]{width:20px;position:absolute;top:0;bottom:0;right:0;display:flex;flex-direction:column;font-size:6px;color:#999;opacity:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:opacity .25s}.number-input .handlers .handler[data-v-268948c2]{width:100%;height:50%;display:flex;justify-content:center;align-items:center;border-left:1px solid #d9d9d9;cursor:pointer}.number-input .handlers .handler+.handler[data-v-268948c2]{border-top:1px solid #d9d9d9}.number-input .handlers .handler[data-v-268948c2]:hover{color:#d14424}.number-input input[data-v-268948c2]{width:100%;min-width:0;padding:0;height:30px;line-height:30px;outline:0;border:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.number-input input[data-v-268948c2]::-moz-placeholder{color:#bfbfbf}.number-input input[data-v-268948c2]::placeholder{color:#bfbfbf}.number-input.focused[data-v-268948c2],.number-input[data-v-268948c2]:not(.disabled):hover{border-color:#d14424}.number-input.disabled[data-v-268948c2]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7}.number-input .prefix[data-v-268948c2],.number-input .suffix[data-v-268948c2]{display:flex;justify-content:center;align-items:center;line-height:30px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.table-generator[data-v-372c6730]{width:100%;margin-top:-12px}.title[data-v-372c6730]{height:28px;line-height:28px;background-color:#ededed;margin:0 -12px 12px -12px;padding:0 14px;font-size:12px;display:flex;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;user-select:none}.title .right[data-v-372c6730]{cursor:pointer}.title .right[data-v-372c6730]:hover{color:#d14424}table[data-v-372c6730]{border-collapse:separate}td[data-v-372c6730]{width:23px;height:23px;line-height:23px;border:2px solid #fff;background-color:#f7f7f7}.cell[data-v-372c6730]{width:100%;height:100%;border:1px solid #dcdcdc}.cell.active[data-v-372c6730]{background-color:rgba(209,68,36,.1);border-color:#d14424}.custom[data-v-372c6730]{width:230px}.custom .row[data-v-372c6730]{display:flex;align-items:center}.custom .row+.row[data-v-372c6730]{margin-top:10px}.btns[data-v-372c6730]{margin-top:10px;text-align:right}.btns .btn[data-v-372c6730]{margin-left:10px}.media-input[data-v-35a1214c]{width:480px}.btns[data-v-35a1214c]{margin-top:10px;text-align:right}svg[data-v-567417d3]{overflow:hidden}.textarea[data-v-65d72404]{outline:0;width:100%;background-color:#fff;border:1px solid #d9d9d9;border-radius:2px;padding:10px;transition:border-color .25s;box-sizing:border-box;line-height:1.675;resize:none;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.textarea[data-v-65d72404]:focus{border-color:#d14424;background-color:#fff}.textarea.resizable[data-v-65d72404]{resize:vertical}.textarea.disabled[data-v-65d72404]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7}.textarea[data-v-65d72404]::-moz-placeholder{color:#bfbfbf}.textarea[data-v-65d72404]::placeholder{color:#bfbfbf}.latex-editor[data-v-49a14edf]{height:560px}.container[data-v-49a14edf]{height:calc(100% - 50px);display:flex}.left[data-v-49a14edf]{width:540px;height:100%;display:flex;flex-direction:column;flex-shrink:0}.input-area[data-v-49a14edf]{flex:1}.input-area textarea[data-v-49a14edf]{height:100%!important;border-color:#eee!important;padding:10px!important}.input-area textarea[data-v-49a14edf]:focus{box-shadow:none!important}.preview[data-v-49a14edf]{height:160px;display:flex;justify-content:center;align-items:center;text-align:center;margin-top:20px;border:1px solid #eee;-webkit-user-select:none;-moz-user-select:none;user-select:none}.placeholder[data-v-49a14edf]{color:#888;font-size:13px}.preview-content[data-v-49a14edf]{width:100%;height:100%;padding:10px;display:flex;justify-content:center;align-items:center}.right[data-v-49a14edf]{width:280px;height:100%;margin-left:20px;border:1px solid #eee;background-color:#fff;display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;user-select:none}.content[data-v-49a14edf]{height:calc(100% - 40px);font-size:13px}.formula[data-v-49a14edf]{height:100%;padding:12px;overflow:auto;overflow:overlay}.formula-item+.formula-item[data-v-49a14edf]{margin-top:10px}.formula-item .formula-title[data-v-49a14edf]{margin-bottom:5px}.formula-item .formula-item-content[data-v-49a14edf]{height:60px;padding:5px;display:flex;align-items:center;background-color:#f9f9f9;cursor:pointer}.symbol[data-v-49a14edf]{height:100%;display:flex;flex-direction:column}.symbol-pool[data-v-49a14edf]{display:flex;flex-wrap:wrap;flex:1;padding:12px;overflow:auto;overflow:overlay}.symbol-item[data-v-49a14edf]{display:flex;justify-content:center;align-items:center}.symbol-item[data-v-49a14edf]:hover{background-color:#f9f9f9;cursor:pointer}.footer[data-v-49a14edf]{height:50px;display:flex;justify-content:flex-end;align-items:flex-end}.footer .btn[data-v-49a14edf]{margin-left:10px}.canvas-tool[data-v-7e81f183]{position:relative;border-bottom:1px solid #eee;background-color:#fff;display:flex;justify-content:space-between;padding:0 10px;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.left-handler[data-v-7e81f183]{display:flex;align-items:center}.add-element-handler[data-v-7e81f183]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex}.add-element-handler .handler-item[data-v-7e81f183]{width:32px}.add-element-handler .handler-item[data-v-7e81f183]:not(.group-btn):hover{background-color:#f1f1f1}.add-element-handler .handler-item.active[data-v-7e81f183]{color:#d14424}.add-element-handler .handler-item.group-btn[data-v-7e81f183]{width:auto;margin-right:4px}.add-element-handler .handler-item.group-btn[data-v-7e81f183]:hover{background-color:#f3f3f3}.add-element-handler .handler-item.group-btn .arrow[data-v-7e81f183],.add-element-handler .handler-item.group-btn .icon[data-v-7e81f183]{height:100%;display:flex;justify-content:center;align-items:center}.add-element-handler .handler-item.group-btn .icon[data-v-7e81f183]{width:26px;padding:0 2px}.add-element-handler .handler-item.group-btn .icon[data-v-7e81f183]:hover{background-color:#e9e9e9}.add-element-handler .handler-item.group-btn .icon.active[data-v-7e81f183]{color:#d14424}.add-element-handler .handler-item.group-btn .arrow[data-v-7e81f183]{font-size:12px}.add-element-handler .handler-item.group-btn .arrow[data-v-7e81f183]:hover{background-color:#e9e9e9}.handler-item[data-v-7e81f183]{height:24px;font-size:14px;margin:0 2px;display:flex;justify-content:center;align-items:center;border-radius:2px;overflow:hidden;cursor:pointer}.handler-item.disable[data-v-7e81f183]{opacity:.5}.left-handler .handler-item[data-v-7e81f183],.right-handler .handler-item[data-v-7e81f183]{padding:0 8px}.left-handler .handler-item.active[data-v-7e81f183],.left-handler .handler-item[data-v-7e81f183]:not(.disable):hover,.right-handler .handler-item.active[data-v-7e81f183],.right-handler .handler-item[data-v-7e81f183]:not(.disable):hover{background-color:#f1f1f1}.right-handler[data-v-7e81f183]{display:flex;align-items:center}.right-handler .text[data-v-7e81f183]{display:inline-block;width:40px;text-align:center;cursor:pointer}.right-handler .viewport-size[data-v-7e81f183]{font-size:13px}@media screen and (width <= 1024px){.text[data-v-7e81f183]{display:none}}@media screen and (width <= 1000px){.left-handler[data-v-7e81f183],.right-handler[data-v-7e81f183]{display:none}}.layout-pool[data-v-8ee3e590]{width:394px;height:500px;padding:2px;margin-right:-12px;padding-right:12px;overflow:auto;display:flex;flex-wrap:wrap;align-content:flex-start}.layout-item[data-v-8ee3e590]{width:48%;margin-bottom:4%}.layout-item[data-v-8ee3e590]:not(:nth-child(2n)){margin-right:4%}.layout-item[data-v-8ee3e590]:last-child,.layout-item[data-v-8ee3e590]:nth-last-child(2){margin-bottom:0}.layout-item .thumbnail[data-v-8ee3e590]{outline:1px solid #eee;cursor:pointer}.layout-item .thumbnail[data-v-8ee3e590]:hover{outline-color:#d14424}.thumbnails[data-v-0dbead61]{border-right:1px solid #eee;background-color:#fff;display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;user-select:none}.add-slide[data-v-0dbead61]{height:40px;font-size:12px;display:flex;flex-shrink:0;border-bottom:1px solid #eee;cursor:pointer}.add-slide .btn[data-v-0dbead61]{flex:1;display:flex;justify-content:center;align-items:center}.add-slide .btn[data-v-0dbead61]:hover{background-color:#f9f9f9}.add-slide .select-btn[data-v-0dbead61]{width:30px;height:100%;display:flex;justify-content:center;align-items:center;border-left:1px solid #eee}.add-slide .select-btn[data-v-0dbead61]:hover{background-color:#f9f9f9}.add-slide .icon[data-v-0dbead61]{margin-right:3px;font-size:14px}.thumbnail-list[data-v-0dbead61]{padding:5px 0;flex:1;overflow:auto}.thumbnail-item[data-v-0dbead61]{display:flex;justify-content:center;align-items:center;padding:5px 0}.thumbnail-item .thumbnail[data-v-0dbead61]{outline:2px solid rgba(209,68,36,.15)}.thumbnail-item.active .label[data-v-0dbead61]{color:#d14424}.thumbnail-item.active .thumbnail[data-v-0dbead61],.thumbnail-item.selected .thumbnail[data-v-0dbead61]{outline-color:#d14424}.label[data-v-0dbead61]{font-size:12px;color:#999;width:20px;cursor:grab}.label.offset-left[data-v-0dbead61]{position:relative;left:-4px}.label[data-v-0dbead61]:active{cursor:grabbing}.page-number[data-v-0dbead61]{height:40px;font-size:12px;border-top:1px solid #eee;line-height:40px;text-align:center;color:#666}.slider[data-v-563bd2a0]{width:100%;height:12px;padding:4px 0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.slider.disabled .track[data-v-563bd2a0]{background-color:#b4b4b4}.slider.disabled .thumb[data-v-563bd2a0]{outline:2px solid #b4b4b4}.slider[data-v-563bd2a0]:not(.disabled){cursor:pointer}.slider:not(.disabled) .bar[data-v-563bd2a0]:hover{background-color:#f0f0f0}.slider:not(.disabled) .track[data-v-563bd2a0]:hover{background-color:#de6949}.slider:not(.disabled) .thumb[data-v-563bd2a0]:active,.slider:not(.disabled) .thumb[data-v-563bd2a0]:hover{outline:4px solid #d14424}.bar[data-v-563bd2a0]{width:calc(100% - 10px);margin-left:5px;height:4px;border-radius:2px;position:relative;background-color:#f5f5f5;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:background-color .2s}.track[data-v-563bd2a0]{position:absolute;top:0;left:0;height:100%;background-color:#d14424;transition:background-color .2s}.thumb[data-v-563bd2a0]{position:absolute;top:50%;left:0;width:10px;height:10px;background-color:#fff;outline:2px solid #d14424;transform:translate(-50%,-50%);border-radius:50%;z-index:100}.thumb[data-v-563bd2a0]:active:after,.thumb[data-v-563bd2a0]:active:before,.thumb[data-v-563bd2a0]:hover:after,.thumb[data-v-563bd2a0]:hover:before{display:block}.thumb[data-v-563bd2a0]:before{content:attr(data-tooltip);min-width:28px;bottom:24px;background-color:#262626;text-align:center;color:#fff;border-radius:2px;padding:6px 5px;font-size:12px}.thumb[data-v-563bd2a0]:after,.thumb[data-v-563bd2a0]:before{display:none;position:absolute;left:50%;transform:translateX(-50%)}.thumb[data-v-563bd2a0]:after{content:"";bottom:15px;border:5px solid transparent;border-top-color:#262626}.row[data-v-03715c20]{width:100%;display:flex;align-items:center;margin-bottom:10px}.color-btn[data-v-7fa73bdc]{width:100%;display:flex!important;align-items:center;justify-content:center;padding:0!important}.color-block[data-v-7fa73bdc]{height:20px;margin-left:8px;flex:1;outline:1px dashed hsla(0,0%,40%,.12);background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAEBJREFUOE9jfPbs2X8GIoCkpCQRqhgYGEcNxBlOo2GIM2iGQLL5//8/UTnl+fPnxOWUUQNxhtNoGOLOKYM+2QAAh2Nq10DwkukAAAAASUVORK5CYII=)}.content[data-v-7fa73bdc]{width:100%;height:100%}.color-btn-icon[data-v-7fa73bdc]{width:32px;font-size:13px;color:#bfbfbf}.checkerboard[data-v-fa191ace]{background-size:contain}.alpha-checkboard-wrap[data-v-84628bc8],.alpha[data-v-84628bc8],.checkerboard[data-v-fa191ace]{position:absolute;top:0;right:0;bottom:0;left:0}.alpha-checkboard-wrap[data-v-84628bc8]{overflow:hidden}.alpha-gradient[data-v-84628bc8]{position:absolute;top:0;right:0;bottom:0;left:0}.alpha-container[data-v-84628bc8]{cursor:pointer;position:relative;z-index:2;height:100%;margin:0 3px}.alpha-pointer[data-v-84628bc8]{z-index:2;position:absolute}.alpha-picker[data-v-84628bc8]{cursor:pointer;width:4px;height:8px;box-shadow:0 0 2px rgba(0,0,0,.6);background:#fff;margin-top:1px;transform:translateX(-2px)}.hue[data-v-5711e710]{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);position:absolute;top:0;right:0;bottom:0;left:0}.hue-container[data-v-5711e710]{cursor:pointer;margin:0 2px;position:relative;height:100%}.hue-pointer[data-v-5711e710]{z-index:2;position:absolute;top:0}.hue-picker[data-v-5711e710]{cursor:pointer;margin-top:1px;width:4px;height:8px;box-shadow:0 0 2px rgba(0,0,0,.6);background:#fff;transform:translateX(-2px)}.saturation-black[data-v-c79c0446],.saturation-white[data-v-c79c0446],.saturation[data-v-c79c0446]{position:absolute;top:0;right:0;bottom:0;left:0;cursor:pointer}.saturation-white[data-v-c79c0446]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-c79c0446]{background:linear-gradient(0deg,#000,transparent)}.saturation-pointer[data-v-c79c0446]{cursor:pointer;position:absolute}.saturation-circle[data-v-c79c0446]{width:4px;height:4px;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);border-radius:50%;transform:translate(-2px,-2px)}.editable-input[data-v-65e2913c]{width:100%;position:relative;overflow:hidden;text-align:center;font-size:14px}.editable-input[data-v-65e2913c]:after{content:"#";position:absolute;left:0;top:50%;transform:translateY(-50%);color:#999}.input-content[data-v-65e2913c]{width:100%;padding:3px;border:0;border-bottom:1px solid #ddd;outline:none;text-align:center}.input-label[data-v-65e2913c]{text-transform:capitalize}.color-picker[data-v-fec0b01a]{position:relative;width:240px;background:#fff;-webkit-user-select:none;-moz-user-select:none;user-select:none;margin-bottom:-10px}.picker-saturation-wrap[data-v-fec0b01a]{width:100%;padding-bottom:50%;position:relative;overflow:hidden}.picker-controls[data-v-fec0b01a]{display:flex}.picker-sliders[data-v-fec0b01a]{padding:4px 0;flex:1}.picker-hue-wrap[data-v-fec0b01a]{position:relative;height:10px}.picker-alpha-wrap[data-v-fec0b01a]{position:relative;height:10px;margin-top:4px;overflow:hidden}.picker-color-wrap[data-v-fec0b01a]{width:24px;height:24px;position:relative;margin-top:4px;margin-right:4px;outline:1px dashed hsla(0,0%,40%,.12)}.picker-color-wrap .checkerboard[data-v-fec0b01a]{background-size:auto}.picker-current-color[data-v-fec0b01a]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2}.picker-field[data-v-fec0b01a]{display:flex;margin-bottom:8px}.picker-field .transparent[data-v-fec0b01a]{width:24px;height:24px;margin-top:4px;margin-left:8px;position:relative;cursor:pointer}.picker-field .transparent[data-v-fec0b01a]:after{content:"";width:26px;height:2px;position:absolute;top:11px;left:-1px;transform:rotate(-45deg);background-color:red}.picker-field .transparent .checkerboard[data-v-fec0b01a]{background-size:auto}.picker-field .straw[data-v-fec0b01a]{width:24px;height:24px;margin-top:4px;margin-left:8px;display:flex;justify-content:center;align-items:center;font-size:20px;background-color:#f5f5f5;outline:1px solid #f1f1f1;cursor:pointer}.picker-field .input[data-v-fec0b01a]{flex:1}.picker-presets[data-v-fec0b01a]{display:flex;flex-wrap:wrap;align-content:flex-start}.picker-presets-color[data-v-fec0b01a]{width:7%;margin-bottom:3.33333%;height:0;padding-bottom:7%;flex-shrink:0;position:relative;cursor:pointer}.picker-presets-color[data-v-fec0b01a]:not(:nth-child(10n)){margin-right:3.33333%}.picker-presets-color.alpha[data-v-fec0b01a]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADBJREFUOE9jfPbs2X8GPEBSUhKfNAPjqAHDIgz+//+PNx08f/4cfzoYNYCBceiHAQC5flV5JzgrxQAAAABJRU5ErkJggg==)}.picker-presets-color-content[data-v-fec0b01a]{position:absolute;top:0;right:0;bottom:0;left:0}.picker-gradient-presets[data-v-fec0b01a]{display:flex;flex-wrap:wrap;align-content:flex-start}.picker-gradient-col[data-v-fec0b01a]{width:7%;margin-bottom:3.33333%;display:flex;flex-direction:column}.picker-gradient-col[data-v-fec0b01a]:not(:nth-child(10n)){margin-right:3.33333%}.picker-gradient-color[data-v-fec0b01a]{width:100%;height:16px;position:relative;cursor:pointer}.recent-colors-title[data-v-fec0b01a]{font-size:12px;margin-bottom:4px}.switch[data-v-0566b060]{height:20px;display:inline-block;cursor:pointer}.switch:not(.disabled).active .switch-core[data-v-0566b060]{border-color:#d14424;background-color:#d14424}.switch:not(.disabled).active .switch-core[data-v-0566b060]:after{left:100%;margin-left:-17px}.switch.disabled[data-v-0566b060]{cursor:default}.switch.disabled .switch-core[data-v-0566b060]:after{background-color:#f5f5f5}.switch-core[data-v-0566b060]{margin:0;display:inline-block;position:relative;width:40px;height:20px;border:1px solid #d9d9d9;outline:none;border-radius:10px;box-sizing:border-box;background:#d9d9d9;transition:border-color .3s,background-color .3s;vertical-align:middle}.switch-core[data-v-0566b060]:after{content:"";position:absolute;top:1px;left:1px;border-radius:100%;transition:all .3s;width:16px;height:16px;background-color:#fff}.row[data-v-18fbbd33]{width:100%;height:30px;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-18fbbd33]{text-align:right}.row[data-v-3a267bbc]{width:100%;height:30px;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-3a267bbc]{text-align:right}.text-color-btn[data-v-37449800]{width:100%;display:flex!important;flex-direction:column;justify-content:center;align-items:center;padding:0}.text-color-block[data-v-37449800]{width:17px;height:4px;margin-top:1px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAACdJREFUGFdjfPbs2X8GBgYGSUlJEMXAiCHw//9/sIrnz59DVKALAADNxxVfaiODNQAAAABJRU5ErkJggg==)}.text-color-block .text-color-block-content[data-v-37449800]{width:100%;height:100%}.button-group[data-v-4db942e2]{display:flex;align-items:center}.button-group[data-v-4db942e2] button.button{border-radius:0;border-left-width:1px;border-right-width:0;display:inline-block}.button-group[data-v-4db942e2]:not(.passive) button.button:not(:last-child,.radio,.checkbox):hover{position:relative}.button-group[data-v-4db942e2]:not(.passive) button.button:not(:last-child,.radio,.checkbox):hover:after{content:"";width:1px;height:calc(100% + 2px);background-color:#d14424;position:absolute;top:-1px;right:-1px}.button-group[data-v-4db942e2]:not(.passive) button.button:first-child{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left-width:1px}.button-group[data-v-4db942e2]:not(.passive) button.button:last-child{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right-width:1px}.button-group.passive[data-v-4db942e2] button.button:not(.last,.radio,.checkbox):hover{position:relative}.button-group.passive[data-v-4db942e2] button.button:not(.last,.radio,.checkbox):hover:after{content:"";width:1px;height:calc(100% + 2px);background-color:#d14424;position:absolute;top:-1px;right:-1px}.button-group.passive[data-v-4db942e2] button.button.first{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left-width:1px}.button-group.passive[data-v-4db942e2] button.button.last{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right-width:1px}.select-group[data-v-d2acb09c]{display:flex;align-items:center}.select-group[data-v-d2acb09c] .select-wrap .select{border-radius:0;border-left-width:0;border-right-width:0}.select-group[data-v-d2acb09c] .select-wrap+.select-wrap .select{border-left-width:1px}.select-group[data-v-d2acb09c] .select-wrap:hover+.select-wrap .select{border-left-color:#d14424}.select-group[data-v-d2acb09c] .select-wrap:first-child .select{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left-width:1px}.select-group[data-v-d2acb09c] .select-wrap:last-child .select{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right-width:1px}.text-style-panel[data-v-4cf37a85]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-4cf37a85]{width:100%;display:flex;align-items:center;margin-bottom:10px}.preset-style[data-v-4cf37a85]{display:flex;flex-wrap:wrap;margin-bottom:10px}.preset-style-item[data-v-4cf37a85]{width:50%;height:50px;border:1px solid #d6d6d6;box-sizing:border-box;display:flex;justify-content:center;align-items:center;position:relative;cursor:pointer;transition:all .2s}.preset-style-item[data-v-4cf37a85]:hover{border-color:#d14424;color:#d14424;z-index:1}.preset-style-item[data-v-4cf37a85]:nth-child(2n){margin-left:-1px}.preset-style-item[data-v-4cf37a85]:nth-child(n+3){margin-top:-1px}.font-size-btn[data-v-4cf37a85]{padding:0}.link-popover[data-v-4cf37a85]{width:240px}.link-popover .btns[data-v-4cf37a85]{margin-top:10px;text-align:right}.list-wrap[data-v-4cf37a85]{width:176px;color:#666;padding:8px;margin:-12px;display:flex;flex-wrap:wrap;align-content:flex-start}.list[data-v-4cf37a85]{background-color:#f9f9f9;padding:4px 4px 4px 20px;cursor:pointer}.list[data-v-4cf37a85]:not(:nth-child(3n)){margin-right:8px}.list[data-v-4cf37a85]:nth-child(4),.list[data-v-4cf37a85]:nth-child(5),.list[data-v-4cf37a85]:nth-child(6){margin-top:8px}.list[data-v-4cf37a85]:hover{color:#d14424}.list:hover span[data-v-4cf37a85]{background-color:#d14424}.list-item[data-v-4cf37a85]{width:24px;height:12px;position:relative;font-size:12px;top:-5px}.list-item span[data-v-4cf37a85]{width:100%;height:2px;display:inline-block;position:absolute;top:10px;background-color:#666}.popover-btn[data-v-4cf37a85]{padding:0 3px}.row[data-v-2c8acf3c],.row[data-v-7571b056]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-2c8acf3c]{text-align:right}.filter[data-v-2c8acf3c]{font-size:12px}.filter-item[data-v-2c8acf3c]{padding:6px 0;display:flex;justify-content:center;align-items:center}.filter-item .name[data-v-2c8acf3c]{width:60px}.filter-item .filter-slider[data-v-2c8acf3c]{flex:1;margin:0 6px}.row[data-v-0ae0ff99]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-0ae0ff99]{text-align:right}.row[data-v-080b6de7]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-080b6de7]{text-align:right}.origin-image[data-v-080b6de7]{height:100px;background-size:contain;background-repeat:no-repeat;background-position:50%;background-color:#f9f9f9;margin-bottom:10px}.full-width-btn[data-v-080b6de7]{width:100%;margin-bottom:10px}.btn-icon[data-v-080b6de7]{margin-right:3px}.clip[data-v-080b6de7]{width:260px;font-size:12px}.clip .title[data-v-080b6de7]{margin-bottom:5px}.shape-clip[data-v-080b6de7]{margin-bottom:10px;display:flex;flex-wrap:wrap;align-content:flex-start}.shape-clip-item[data-v-080b6de7]{display:flex;justify-content:center;align-items:center;cursor:pointer;width:16%;margin-bottom:5%}.shape-clip-item[data-v-080b6de7]:not(:nth-child(5n)){margin-right:5%}.shape-clip-item:hover .shape[data-v-080b6de7]{background-color:#ccc}.shape-clip-item .shape[data-v-080b6de7]{width:40px;height:40px;background-color:#e1e1e1}.popover-btn[data-v-080b6de7]{padding:0 3px}.shape-style-panel[data-v-0674f2cf]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-0674f2cf]{width:100%;display:flex;align-items:center;margin-bottom:10px}.font-size-btn[data-v-0674f2cf]{padding:0}.title[data-v-0674f2cf]{display:flex;justify-content:space-between;margin-bottom:10px}.shape-pool[data-v-0674f2cf]{width:235px;height:150px;overflow:auto;padding:5px;padding-right:10px;border:1px solid #eee;margin-bottom:20px}.shape-list[data-v-0674f2cf]{display:flex;flex-wrap:wrap;align-content:flex-start}.shape-item[data-v-0674f2cf]{width:14%;margin-bottom:3.2%;height:0;padding-bottom:14%;flex-shrink:0}.shape-item[data-v-0674f2cf]:not(:nth-child(6n)){margin-right:3.2%}.row[data-v-ae80032c]{width:100%;display:flex;align-items:center;margin-bottom:10px}.line-btn[data-v-ae80032c]{display:flex;align-items:center;justify-content:space-between;padding:0!important}.line-btn .line-wrapper[data-v-ae80032c]{margin-left:8px}.line-wrapper[data-v-ae80032c]{overflow:visible}.line-btn-icon[data-v-ae80032c]{width:30px;font-size:12px;margin-top:2px;color:#bfbfbf}.preset-point-style[data-v-ae80032c]{padding:0 10px}.preset-point-style+.preset-point-style[data-v-ae80032c]{margin-top:10px}.chart-data-editor[data-v-f7b59928]{width:600px;position:relative}.editor-content[data-v-f7b59928]{width:100%;height:360px;position:relative;border-right:1px solid #ccc;border-bottom:1px solid #ccc;overflow:auto;overflow:overlay}.range-box[data-v-f7b59928]{position:absolute;top:0;left:0;z-index:100;-webkit-user-select:none;-moz-user-select:none;user-select:none}.temp-range[data-v-f7b59928]{width:0;height:0;position:absolute;top:0;left:0;background-color:hsla(0,0%,53%,.3)}.range-line[data-v-f7b59928]{width:0;height:0;position:absolute;left:0;top:0;border:0 solid #d14424}.range-line.t[data-v-f7b59928]{border-top-width:1px}.range-line.b[data-v-f7b59928]{border-bottom-width:1px}.range-line.l[data-v-f7b59928]{border-left-width:1px}.range-line.r[data-v-f7b59928]{border-right-width:1px}.resizable[data-v-f7b59928]{position:absolute;width:12px;height:12px;left:0;top:0;margin:-9px 0 0 -9px;cursor:nwse-resize}.resizable[data-v-f7b59928]:after{content:"";position:absolute;width:4px;height:12px;right:0;top:0;background-color:#d14424}.resizable[data-v-f7b59928]:before{content:"";position:absolute;width:12px;height:4px;right:0;bottom:0;background-color:#d14424}table[data-v-f7b59928]{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;table-layout:fixed}table td[data-v-f7b59928]{text-align:center;border:1px solid #ccc;vertical-align:middle;width:100px;height:32px}table td.head[data-v-f7b59928]{background-color:rgba(209,68,36,.1)}table .item[data-v-f7b59928]{width:100%;height:100%;border:0;outline:0;font-size:13px;text-align:center;background-color:transparent}table .item.selected[data-v-f7b59928]{background-color:rgba(209,68,36,.02)}.btns[data-v-f7b59928]{margin-top:10px;display:flex;justify-content:space-between}.checkbox[data-v-26bf4835]{height:20px;display:flex;align-items:center;cursor:pointer}.checkbox:not(.disabled).checked .checkbox-input[data-v-26bf4835]{background-color:#d14424;border-color:#d14424}.checkbox:not(.disabled).checked .checkbox-input[data-v-26bf4835]:after{transform:rotate(45deg) scaleY(1)}.checkbox:not(.disabled).checked .checkbox-label[data-v-26bf4835]{color:#d14424}.checkbox.disabled[data-v-26bf4835]{color:#b7b7b7;cursor:default}.checkbox.disabled .checkbox-input[data-v-26bf4835]{background-color:#f5f5f5}.checkbox-input[data-v-26bf4835]{display:inline-block;position:relative;border:1px solid #d9d9d9;border-radius:2px;width:16px;height:16px;background-color:#fff;vertical-align:middle;transition:border-color .15s cubic-bezier(.71,-.46,.29,1.46),background-color .15s cubic-bezier(.71,-.46,.29,1.46);z-index:1}.checkbox-input[data-v-26bf4835]:after{content:"";border:2px solid #fff;border-left:0;border-top:0;height:9px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:6px;transition:transform .15s ease-in .05s;transform-origin:center}.checkbox-original[data-v-26bf4835]{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.checkbox-label[data-v-26bf4835]{margin-left:5px;line-height:20px;font-size:13px}.chart-style-panel[data-v-45827db6],.checkbox-label[data-v-26bf4835]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-45827db6]{width:100%;display:flex;align-items:center;margin-bottom:10px}.full-width-btn[data-v-45827db6]{width:100%}.btn-icon[data-v-45827db6]{margin-right:3px}.color-btn-wrap[data-v-45827db6]{position:relative}.delete-color-btn[data-v-45827db6]{position:absolute;width:30px;right:2px;top:2px;bottom:2px;display:flex;justify-content:center;align-items:center;background-color:#fff;cursor:pointer}.preset-themes[data-v-45827db6]{width:250px;margin-bottom:-10px;display:flex;flex-wrap:wrap;align-content:flex-start}.preset-theme[data-v-45827db6]{display:flex;cursor:pointer;width:48%;margin-bottom:4%}.preset-theme[data-v-45827db6]:not(:nth-child(2n)){margin-right:4%}.preset-theme-color[data-v-45827db6]{width:20px;height:20px}.preset-theme-color.select[data-v-45827db6]{transform:scale(1.2);transition:transform .1s}.row[data-v-e5523cbc]{width:100%;display:flex;align-items:center;margin-bottom:10px}.theme-switch[data-v-e5523cbc]{margin-bottom:18px}.switch-wrapper[data-v-e5523cbc]{text-align:right}.set-count[data-v-e5523cbc]{display:flex;justify-content:center;align-items:center}.set-count .btn[data-v-e5523cbc]{padding:0 8px}.set-count .count-text[data-v-e5523cbc]{flex:1;text-align:center;margin:0 8px}.row[data-v-3a5ca316],.row[data-v-b3551c8c]{width:100%;display:flex;align-items:center;margin-bottom:10px}.background-image-wrapper[data-v-b3551c8c],.title[data-v-b3551c8c]{margin-bottom:10px}.background-image[data-v-b3551c8c]{height:0;padding-bottom:56.25%;border:1px dashed #eee;border-radius:2px;position:relative;transition:all .2s}.background-image[data-v-b3551c8c]:hover{border-color:#d14424;color:#d14424}.background-image .content[data-v-b3551c8c]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-position:50%;background-size:contain;background-repeat:no-repeat;cursor:pointer}.switch-row[data-v-b3551c8c]{height:32px}.switch-wrapper[data-v-b3551c8c]{text-align:right}.row[data-v-32517bcf]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-row[data-v-32517bcf]{height:32px}.switch-wrapper[data-v-32517bcf]{text-align:right}.row[data-v-80f1bc4e]{width:100%;display:flex;align-items:center;margin-bottom:10px}.font-size-btn[data-v-80f1bc4e]{padding:0}.row[data-v-a2bcea28]{width:100%;display:flex;align-items:center;margin-bottom:10px}.title[data-v-a2bcea28]{margin-bottom:10px}.label[data-v-a2bcea28]{text-align:center}.btn-icon[data-v-a2bcea28]{margin-right:3px}.icon-btn[data-v-a2bcea28]{cursor:pointer}.text-btn[data-v-a2bcea28]{height:30px;line-height:30px;text-align:center;cursor:pointer}.text-btn[data-v-a2bcea28]:hover{background-color:#efefef;border-radius:2px}.element-animation-panel[data-v-5abd2ee4]{height:100%;display:flex;flex-direction:column}.element-animation[data-v-5abd2ee4]{height:32px;display:flex;align-items:center}.element-animation-btn[data-v-5abd2ee4]{width:100%}.config-item[data-v-5abd2ee4]{display:flex;align-items:center}.config-item+.config-item[data-v-5abd2ee4]{margin-top:5px}.tip[data-v-5abd2ee4]{height:32px;display:flex;justify-content:center;align-items:center;font-style:italic}.animation-pool[data-v-5abd2ee4]{width:400px;height:500px;overflow-y:auto;overflow-x:hidden;font-size:12px;margin-right:-10px;padding-right:5px;position:relative}.animation-pool .mask[data-v-5abd2ee4]{position:absolute;top:0;right:0;bottom:0;left:0}.animation-pool.in .type-title[data-v-5abd2ee4]{border-left-color:#68a490;background-color:rgba(104,164,144,.15)}.animation-pool.out .type-title[data-v-5abd2ee4]{border-left-color:#d86344;background-color:rgba(216,99,68,.15)}.animation-pool.attention .type-title[data-v-5abd2ee4]{border-left-color:#e8b76a;background-color:hsla(37,73%,66%,.15)}.pool-type[data-v-5abd2ee4]:not(:last-child){margin-bottom:5px}.type-title[data-v-5abd2ee4]{width:100%;font-size:13px;margin-bottom:10px;border-left:4px solid #aaa;background-color:#eee;padding:4px 0 4px 10px}.pool-item-wrapper[data-v-5abd2ee4]{display:flex;flex-wrap:wrap;align-content:flex-start}.pool-item[data-v-5abd2ee4]{width:24%;margin-bottom:1.33333%;margin-bottom:5px;height:40px;line-height:40px;text-align:center;cursor:pointer}.pool-item[data-v-5abd2ee4]:not(:nth-child(4n)){margin-right:1.33333%}.animation-box[data-v-5abd2ee4]{background-color:#f9f9f9;border-radius:2px}.animation-sequence[data-v-5abd2ee4]{flex:1;padding-right:12px;margin-right:-12px;overflow:auto;overflow:overlay}.sequence-item[data-v-5abd2ee4]{border:1px solid #eee;padding:8px;border-radius:2px;margin-bottom:8px;transition:all .5s}.sequence-item.in.active[data-v-5abd2ee4]{border-color:#68a490}.sequence-item.out.active[data-v-5abd2ee4]{border-color:#d86344}.sequence-item.attention.active[data-v-5abd2ee4]{border-color:#e8b76a}.sequence-item.active[data-v-5abd2ee4]{height:auto}.sequence-item .sequence-content[data-v-5abd2ee4]{display:flex;align-items:center;cursor:grab}.sequence-item .sequence-content[data-v-5abd2ee4]:active{cursor:grabbing}.sequence-item .sequence-content .index[data-v-5abd2ee4]{flex:1}.sequence-item .sequence-content .text[data-v-5abd2ee4]{flex:6}.sequence-item .sequence-content .handler[data-v-5abd2ee4]{flex:2;font-size:15px;text-align:right}.sequence-item .sequence-content .handler-btn[data-v-5abd2ee4]{margin-left:8px;cursor:pointer}.slide-design-panel[data-v-9a96acfa]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-9a96acfa]{width:100%;display:flex;align-items:center;margin-bottom:10px}.title[data-v-9a96acfa]{display:flex;justify-content:space-between;margin-bottom:10px}.title .more[data-v-9a96acfa]{cursor:pointer}.title .more .text[data-v-9a96acfa]{font-size:12px;margin-right:3px}.background-image-wrapper[data-v-9a96acfa]{margin-bottom:10px}.background-image[data-v-9a96acfa]{height:0;padding-bottom:56.25%;border:1px dashed #eee;border-radius:2px;position:relative;transition:all .2s}.background-image[data-v-9a96acfa]:hover{border-color:#d14424;color:#d14424}.background-image .content[data-v-9a96acfa]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-position:50%;background-size:contain;background-repeat:no-repeat;cursor:pointer}.theme-list[data-v-9a96acfa]{display:flex;flex-wrap:wrap;align-content:flex-start}.theme-item[data-v-9a96acfa]{width:48%;margin-bottom:4%;padding-bottom:30%;border-radius:2px;position:relative;cursor:pointer}.theme-item[data-v-9a96acfa]:not(:nth-child(2n)){margin-right:4%}.theme-item .theme-item-content[data-v-9a96acfa]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;justify-content:center;padding:8px;border:1px solid #eee;border-radius:2px}.theme-item .text[data-v-9a96acfa]{font-size:16px}.theme-item .colors[data-v-9a96acfa]{display:flex}.theme-item .color-block[data-v-9a96acfa]{margin-top:8px;width:12px;height:12px;margin-right:2px}.theme-item:hover .btns[data-v-9a96acfa]{display:flex}.theme-item .btns[data-v-9a96acfa]{position:absolute;top:0;right:0;bottom:0;left:0;flex-direction:column;justify-content:center;align-items:center;display:none;background-color:rgba(0,0,0,.25)}.theme-item .btn[data-v-9a96acfa]{width:72px;padding:5px 0;text-align:center;background-color:#d14424;color:#fff;font-size:12px;border-radius:2px}.theme-item .btn[data-v-9a96acfa]:hover{background-color:#de6949}.theme-item .btn+.btn[data-v-9a96acfa]{margin-top:5px}.animation-pool[data-v-0562c530]{display:flex;flex-wrap:wrap;margin-bottom:10px}.animation-item[data-v-0562c530]{width:50%;height:100px;border:1px solid #d6d6d6;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:20px 0 15px 0;position:relative;cursor:pointer}.animation-item.active[data-v-0562c530]{border-color:#d14424;z-index:1}.animation-item[data-v-0562c530]:nth-child(2n){margin-left:-1px}.animation-item[data-v-0562c530]:nth-child(n+3){margin-top:-1px}.animation-block[data-v-0562c530]{width:64px;height:36px;background:#666;position:relative;overflow:hidden}.animation-block.fade[data-v-0562c530]:hover:after{animation:fade-0562c530 .3s linear}.animation-block.fade[data-v-0562c530]:hover:after,.animation-block.slideX[data-v-0562c530]:hover:after{content:"PPTist";width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(209,68,36,.75);color:#fff;display:flex;justify-content:center;align-items:center}.animation-block.slideX[data-v-0562c530]:hover:after{animation:slideX-0562c530 .3s linear}.animation-block.slideY[data-v-0562c530]:hover:after{animation:slideY-0562c530 .3s linear}.animation-block.slideX3D[data-v-0562c530]:hover:after,.animation-block.slideY[data-v-0562c530]:hover:after{content:"PPTist";width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(209,68,36,.75);color:#fff;display:flex;justify-content:center;align-items:center}.animation-block.slideX3D[data-v-0562c530]:hover:after{animation:slideX3D-0562c530 .3s linear}.animation-block.slideY3D[data-v-0562c530]:hover:after{animation:slideY3D-0562c530 .3s linear}.animation-block.rotate[data-v-0562c530]:hover:after,.animation-block.slideY3D[data-v-0562c530]:hover:after{content:"PPTist";width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(209,68,36,.75);color:#fff;display:flex;justify-content:center;align-items:center}.animation-block.rotate[data-v-0562c530]:hover:after{transform-origin:0 0;animation:rotate-0562c530 .3s linear}.animation-block.scaleY[data-v-0562c530]:hover:after{animation:scaleY-0562c530 .3s linear}.animation-block.scaleX[data-v-0562c530]:hover:after,.animation-block.scaleY[data-v-0562c530]:hover:after{content:"PPTist";width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(209,68,36,.75);color:#fff;display:flex;justify-content:center;align-items:center}.animation-block.scaleX[data-v-0562c530]:hover:after{animation:scaleX-0562c530 .3s linear}.animation-block.scale[data-v-0562c530]:hover:after{animation:scale-0562c530 .3s linear}.animation-block.scaleReverse[data-v-0562c530]:hover:after,.animation-block.scale[data-v-0562c530]:hover:after{content:"PPTist";width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(209,68,36,.75);color:#fff;display:flex;justify-content:center;align-items:center}.animation-block.scaleReverse[data-v-0562c530]:hover:after{animation:scaleReverse-0562c530 .3s linear}.animation-text[data-v-0562c530]{font-size:12px;color:#333;text-align:center}@keyframes fade-0562c530{0%{opacity:0}to{opacity:1}}@keyframes slideX-0562c530{0%{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideY-0562c530{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideX3D-0562c530{0%{transform:translateX(100%) scale(.5)}to{transform:translateX(0)}}@keyframes slideY3D-0562c530{0%{transform:translateY(100%) scale(.5)}to{transform:translateY(0)}}@keyframes rotate-0562c530{0%{transform:rotate(-90deg)}to{transform:rotate(0)}}@keyframes scaleY-0562c530{0%{transform:scaleY(.1)}to{transform:scaleY(1)}}@keyframes scaleX-0562c530{0%{transform:scaleX(.1)}to{transform:scaleY(1)}}@keyframes scale-0562c530{0%{transform:scale(.25)}to{transform:scale(1)}}@keyframes scaleReverse-0562c530{0%{transform:scale(2)}to{transform:scale(1)}}.row[data-v-e95a4c6c]{width:100%;display:flex;align-items:center;margin-bottom:10px}.symbol-panel[data-v-2bb5f257]{height:100%;display:flex;flex-direction:column}.symbol-panel .pool[data-v-2bb5f257]{padding:5px 12px;margin:0 -12px;flex:1;font-size:18px;overflow:auto;overflow:overlay;display:flex;flex-wrap:wrap;align-content:flex-start}.symbol-panel .symbol-item[data-v-2bb5f257]{width:18%;margin-bottom:2.5%;height:0;padding-bottom:18%;position:relative;cursor:pointer;border:1px solid #eee}.symbol-panel .symbol-item[data-v-2bb5f257]:not(:nth-child(5n)){margin-right:2.5%}.symbol-panel .symbol-item[data-v-2bb5f257]:hover{color:#d14424}.symbol-panel .symbol-item .symbol[data-v-2bb5f257]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-color:#fff}.toolbar[data-v-6c9ece83]{border-left:1px solid #eee;background-color:#fff;display:flex;flex-direction:column}.content[data-v-6c9ece83]{padding:12px;font-size:13px;overflow:auto;overflow:overlay}.editor[data-v-31d96c24]{height:100%;overflow:auto}.prosemirror-editor[data-v-31d96c24]{height:100%;cursor:text}.prosemirror-editor[data-v-31d96c24] .ProseMirror{height:100%;font-size:12px;overflow:auto;padding:8px;line-height:1.5}.prosemirror-editor[data-v-31d96c24] .ProseMirror>p[data-placeholder]:before{content:attr(data-placeholder);pointer-events:none;position:absolute;font-size:12px;color:hsla(0,0%,40%,.5)}.menu[data-v-31d96c24]{display:flex;background-color:#fff;padding:6px 4px;border-radius:2px;box-shadow:0 0 20px 0 rgba(0,0,0,.15)}.menu button[data-v-31d96c24]{outline:0;border:0;background-color:#fff;padding:3px;border-radius:2px;font-size:16px;margin:0 3px;display:flex;align-items:center;justify-content:center;cursor:pointer}.menu button.active[data-v-31d96c24],.menu button[data-v-31d96c24]:hover{background-color:#d14424;color:#fff}.remark[data-v-458a41b9]{position:relative;border-top:1px solid #eee}.resize-handler[data-v-458a41b9]{height:7px;position:absolute;top:-3px;left:0;right:0;cursor:n-resize;z-index:2}.export-img-dialog[data-v-1df3f398]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.thumbnails-view[data-v-1df3f398],.thumbnails-view[data-v-1df3f398]:after{position:absolute;top:0;right:0;bottom:0;left:0}.thumbnails-view[data-v-1df3f398]:after{content:"";background-color:#fff}.configs[data-v-1df3f398]{width:350px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center;z-index:1}.configs .row[data-v-1df3f398]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-1df3f398]{width:100px;position:relative}.configs .title[data-v-1df3f398]:after{content:attr(data-range);position:absolute;top:20px;left:0}.configs .config-item[data-v-1df3f398]{flex:1}.btns[data-v-1df3f398]{width:300px;height:100px;display:flex;justify-content:center;align-items:center;z-index:1}.btns .export[data-v-1df3f398]{flex:1}.btns .close[data-v-1df3f398]{width:100px;margin-left:10px}.export-json-dialog[data-v-6a7223ca]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.preview[data-v-6a7223ca]{width:100%;height:calc(100% - 100px);background-color:#f9f9f9;color:#0451a5;overflow:auto}pre[data-v-6a7223ca]{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}.btns[data-v-6a7223ca]{width:300px;height:100px;display:flex;justify-content:center;align-items:center}.btns .export[data-v-6a7223ca]{flex:1}.btns .close[data-v-6a7223ca]{width:100px;margin-left:10px}[data-v-6a7223ca]::-webkit-scrollbar{width:10px;height:10px;background-color:#f9f9f9}[data-v-6a7223ca]::-webkit-scrollbar-thumb{background-color:#c1c1c1}.export-pdf-dialog[data-v-1668f898]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.thumbnails-view[data-v-1668f898],.thumbnails-view[data-v-1668f898]:after{position:absolute;top:0;right:0;bottom:0;left:0}.thumbnails-view[data-v-1668f898]:after{content:"";background-color:#fff}.thumbnail.break-page[data-v-1668f898]{-moz-column-break-after:page;break-after:page}.configs[data-v-1668f898]{width:300px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center;z-index:1}.configs .row[data-v-1668f898]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-1668f898]{width:100px}.configs .config-item[data-v-1668f898]{flex:1}.configs .tip[data-v-1668f898]{font-size:12px;color:#aaa;line-height:1.8;margin-top:25px}.btns[data-v-1668f898]{width:300px;height:100px;display:flex;justify-content:center;align-items:center;z-index:1}.btns .export[data-v-1668f898]{flex:1}.btns .close[data-v-1668f898]{width:100px;margin-left:10px}.export-pptx-dialog[data-v-265d4b60]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.configs[data-v-265d4b60]{width:350px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center}.configs .row[data-v-265d4b60]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-265d4b60]{width:100px;position:relative}.configs .title[data-v-265d4b60]:after{content:attr(data-range);position:absolute;top:20px;left:0}.configs .config-item[data-v-265d4b60]{flex:1}.configs .tip[data-v-265d4b60]{font-size:12px;color:#aaa;line-height:1.8;margin-top:10px}.btns[data-v-265d4b60]{width:300px;height:100px;display:flex;justify-content:center;align-items:center}.btns .export[data-v-265d4b60]{flex:1}.btns .close[data-v-265d4b60]{width:100px;margin-left:10px}.export-pptist-dialog[data-v-26422ed7]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.configs[data-v-26422ed7]{width:350px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center}.configs .row[data-v-26422ed7]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-26422ed7]{width:100px;position:relative}.configs .title[data-v-26422ed7]:after{content:attr(data-range);position:absolute;top:20px;left:0}.configs .config-item[data-v-26422ed7]{flex:1}.configs .tip[data-v-26422ed7]{font-size:12px;color:#aaa;line-height:1.8;margin-top:25px}.btns[data-v-26422ed7]{width:300px;height:100px;display:flex;justify-content:center;align-items:center}.btns .export[data-v-26422ed7]{flex:1}.btns .close[data-v-26422ed7]{width:100px;margin-left:10px}.export-dialog[data-v-b20137f0]{margin:-20px}.content[data-v-b20137f0]{height:460px;padding:12px;font-size:13px;overflow:auto;overflow:overlay}.moveable-panel[data-v-fc791e00]{position:fixed;background-color:#fff;box-shadow:0 2px 12px 0 rgba(56,56,56,.15);border:1px solid #eee;border-radius:2px;display:flex;flex-direction:column;z-index:999}.header[data-v-fc791e00]{height:40px;display:flex;align-items:center;border-bottom:1px solid #f0f0f0;cursor:move}.title[data-v-fc791e00]{flex:1;font-size:13px;padding-left:10px}.close-btn[data-v-fc791e00]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;color:#666;font-size:12px;cursor:pointer}.content[data-v-fc791e00]{flex:1;padding:10px;overflow:auto}.select-panel[data-v-15470598]{height:100%;font-size:12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.handler[data-v-15470598]{height:24px;margin-bottom:8px;display:flex;align-items:center;justify-content:space-between}.handler .icon-btns[data-v-15470598]{height:100%;flex:1;display:flex;align-items:center;justify-content:flex-end}.handler .icon-btn[data-v-15470598]{width:16px;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer}.handler .icon-btn[data-v-15470598]:hover{color:#d14424}.element-list[data-v-15470598]{height:calc(100% - 32px);padding-right:10px;margin-right:-10px;overflow:auto}.item[data-v-15470598]{padding:5px;font-size:12px;border-radius:2px;display:flex;align-items:center;cursor:pointer}.item.active[data-v-15470598]{background-color:rgba(209,68,36,.1)}.item.group-active[data-v-15470598]{background-color:rgba(209,68,36,.2)}.item[data-v-15470598]:hover{background-color:rgba(209,68,36,.25)}.item .name[data-v-15470598]{height:18px;line-height:18px;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.item .icons[data-v-15470598]{width:20px;display:flex;align-items:center;justify-content:center;margin-left:5px}.group-els[data-v-15470598]{padding:5px 0}.group-els .group-title[data-v-15470598]{margin-bottom:5px;padding:0 5px}.group-els .item[data-v-15470598]{margin-left:15px}.input[data-v-15470598]{width:100%;height:16px;border:0;outline:0;padding-left:0;padding-right:0;flex:1;font-size:12px;background-color:transparent}.search-panel[data-v-fb93ddde]{font-size:13px}.content[data-v-fb93ddde]{display:flex;flex-direction:column;justify-content:space-between}.input[data-v-fb93ddde]{margin-top:10px}.count[data-v-fb93ddde]{margin-right:8px}.count[data-v-fb93ddde],.ignore-case[data-v-fb93ddde]{font-size:12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ignore-case[data-v-fb93ddde]{cursor:pointer}.ignore-case.active[data-v-fb93ddde]{color:#d14424}.next-btn[data-v-fb93ddde]{width:22px;height:100%;display:flex;justify-content:center;align-items:center;margin:0!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}.next-btn[data-v-fb93ddde]:hover{color:#d14424}.footer[data-v-fb93ddde]{display:flex;justify-content:flex-end;align-items:center;margin-top:10px}.close-btn[data-v-fb93ddde]{width:32px;height:32px;position:absolute;top:8px;right:3px;display:flex;justify-content:center;align-items:center;color:#666;font-size:12px;cursor:pointer}.pptist-editor[data-v-1e00f97b]{height:100%}.layout-header[data-v-1e00f97b]{height:40px}.layout-content[data-v-1e00f97b]{height:calc(100% - 40px);display:flex}.layout-content-left[data-v-1e00f97b]{width:160px;height:100%;flex-shrink:0}.layout-content-center[data-v-1e00f97b]{width:calc(100% - 420px)}.layout-content-center .center-top[data-v-1e00f97b]{height:40px}.layout-content-right[data-v-1e00f97b]{width:260px;height:100%}.screen-element-video[data-v-76bf5b3f]{position:absolute}.element-content[data-v-76bf5b3f],.rotate-wrapper[data-v-76bf5b3f]{width:100%;height:100%}.screen-element-audio[data-v-adf39436]{position:absolute}.rotate-wrapper[data-v-adf39436]{width:100%;height:100%}.element-content[data-v-adf39436]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.element-content:hover .audio-player[data-v-adf39436]{display:block}.audio-icon[data-v-adf39436]{cursor:pointer}.audio-player[data-v-adf39436]{position:absolute;display:none}.link[data-v-2139723a]{cursor:pointer}.screen-slide[data-v-016af5da]{position:absolute;top:0;left:0;transform-origin:0 0;overflow:hidden}.background[data-v-016af5da]{width:100%;height:100%;background-position:50%;position:absolute}.screen-slide-list[data-v-552b63d2]{background:#1d1d1d;position:relative;width:100%;height:100%}.slide-item[data-v-552b63d2]{position:absolute;top:0;left:0;width:100%;height:100%}.slide-item.current[data-v-552b63d2]{z-index:2}.slide-item.hide[data-v-552b63d2]{opacity:0}.slide-item.turning-mode-no.before[data-v-552b63d2]{transform:translateY(-100%)}.slide-item.turning-mode-no.after[data-v-552b63d2]{transform:translateY(100%)}.slide-item.turning-mode-fade[data-v-552b63d2]{transition:opacity .75s}.slide-item.turning-mode-fade.after[data-v-552b63d2],.slide-item.turning-mode-fade.before[data-v-552b63d2]{pointer-events:none;opacity:0}.slide-item.turning-mode-slideX[data-v-552b63d2]{transition:transform .35s}.slide-item.turning-mode-slideX.before[data-v-552b63d2]{transform:translateX(-100%)}.slide-item.turning-mode-slideX.after[data-v-552b63d2]{transform:translateX(100%)}.slide-item.turning-mode-slideY[data-v-552b63d2]{transition:transform .35s}.slide-item.turning-mode-slideY.before[data-v-552b63d2]{transform:translateY(-100%)}.slide-item.turning-mode-slideY.after[data-v-552b63d2]{transform:translateY(100%)}.slide-item.turning-mode-slideX3D[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-slideX3D.before[data-v-552b63d2]{transform:translateX(-100%) scale(.5)}.slide-item.turning-mode-slideX3D.after[data-v-552b63d2]{transform:translateX(100%) scale(.5)}.slide-item.turning-mode-slideY3D[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-slideY3D.before[data-v-552b63d2]{transform:translateY(-100%) scale(.5)}.slide-item.turning-mode-slideY3D.after[data-v-552b63d2]{transform:translateY(100%) scale(.5)}.slide-item.turning-mode-rotate[data-v-552b63d2]{transition:transform .5s;transform-origin:0 0}.slide-item.turning-mode-rotate.before[data-v-552b63d2]{transform:rotate(90deg)}.slide-item.turning-mode-rotate.after[data-v-552b63d2]{transform:rotate(-90deg)}.slide-item.turning-mode-scaleY[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scaleY.after[data-v-552b63d2],.slide-item.turning-mode-scaleY.before[data-v-552b63d2]{transform:scaleY(.1)}.slide-item.turning-mode-scaleX[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scaleX.after[data-v-552b63d2],.slide-item.turning-mode-scaleX.before[data-v-552b63d2]{transform:scaleX(.1)}.slide-item.turning-mode-scale[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scale.after[data-v-552b63d2],.slide-item.turning-mode-scale.before[data-v-552b63d2]{transform:scale(.25)}.slide-item.turning-mode-scaleReverse[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scaleReverse.after[data-v-552b63d2],.slide-item.turning-mode-scaleReverse.before[data-v-552b63d2]{transform:scale(2)}.slide-content[data-v-552b63d2]{background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;justify-content:center;align-items:center}.slide-thumbnails[data-v-15912b32]{width:100%;height:100%;position:fixed;top:0;left:0;background-color:#1a1a1a;z-index:99}.return-button[data-v-15912b32]{height:60px;padding:20px 30px 0}.return-button .icon[data-v-15912b32]{color:#fff;font-size:36px;cursor:pointer}.return-button .icon[data-v-15912b32]:hover{color:#d14424}.slide-thumbnails-content[data-v-15912b32]{height:calc(100% - 100px);padding:20px 30px 30px 30px;display:flex;flex-wrap:wrap;align-content:flex-start;overflow:auto;overflow:overlay}.slide-thumbnails-content .thumbnail[data-v-15912b32]{width:150px;outline:2px solid #aaa;margin-right:12px;margin-bottom:12px}.slide-thumbnails-content .thumbnail[data-v-15912b32]:hover{outline-color:#d14424}.slide-thumbnails-content .thumbnail.active[data-v-15912b32]{outline-width:3px;outline-color:#d14424}.writing-board[data-v-d8027742]{z-index:8;cursor:none;position:absolute;top:0;right:0;bottom:0;left:0}.blackboard[data-v-d8027742]{width:100%;height:100%;background-color:#0f392b}.canvas[data-v-d8027742]{position:absolute;top:0;left:0}.eraser[data-v-d8027742],.pen[data-v-d8027742]{pointer-events:none;position:absolute;z-index:9}.eraser .icon[data-v-d8027742],.pen .icon[data-v-d8027742]{filter:drop-shadow(2px 2px 2px #555)}.eraser[data-v-d8027742]{display:flex;justify-content:center;align-items:center;border-radius:50%;border:4px solid rgba(85,85,85,.15);color:rgba(85,85,85,.75)}.writing-board-tool[data-v-92cd0b5a]{font-size:12px;z-index:10;position:absolute;top:0;right:0;bottom:0;left:0}.writing-board-tool .writing-board-wrap[data-v-92cd0b5a]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.writing-board-tool .tools[data-v-92cd0b5a]{width:100%;height:100%;display:flex;align-items:center;justify-content:space-between}.writing-board-tool .tool-content[data-v-92cd0b5a]{display:flex;align-items:center}.writing-board-tool .btn[data-v-92cd0b5a]{padding:5px 10px;cursor:pointer}.writing-board-tool .btn[data-v-92cd0b5a]:hover{color:#d14424}.writing-board-tool .btn.active[data-v-92cd0b5a]{background-color:rgba(209,68,36,.5);color:#fff}.writing-board-tool .icon[data-v-92cd0b5a]{font-size:20px}.writing-board-tool .colors[data-v-92cd0b5a]{display:flex;padding:0 10px}.writing-board-tool .color[data-v-92cd0b5a]{width:16px;height:16px;border-radius:2px;cursor:pointer}.writing-board-tool .color[data-v-92cd0b5a]:hover{transform:scale(1.15)}.writing-board-tool .color.active[data-v-92cd0b5a]{transform:scale(1.3)}.writing-board-tool .color+.color[data-v-92cd0b5a]{margin-left:8px}.size[data-v-92cd0b5a]{width:200px;display:flex;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:13px}.size .label[data-v-92cd0b5a]{width:70px}.size .size-slider[data-v-92cd0b5a]{flex:1}.countdown-timer[data-v-83a589f0]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.header[data-v-83a589f0]{height:16px;font-size:13px;margin-bottom:16px;display:flex;align-items:center}.header .text-btn[data-v-83a589f0]{margin-right:8px;cursor:pointer}.header .text-btn.active[data-v-83a589f0],.header .text-btn[data-v-83a589f0]:hover{color:#d14424}.content[data-v-83a589f0]{display:flex;justify-content:space-between;padding:0 5px}.timer[data-v-83a589f0]{width:54px;height:54px;border-radius:50%;background-color:rgba(209,68,36,.05);font-size:22px;overflow:hidden}.timer input[data-v-83a589f0]{width:100%;height:100%;border:0;outline:0;background-color:transparent;text-align:center}.colon[data-v-83a589f0]{height:54px;line-height:54px;font-size:22px}.icon-btn[data-v-83a589f0]{width:20px;height:20px;display:flex;justify-content:center;align-items:center;cursor:pointer}.pause[data-v-83a589f0],.play[data-v-83a589f0]{font-size:17px}.reset[data-v-83a589f0]{font-size:12px}.close-btn[data-v-83a589f0]{position:absolute;top:0;right:0;padding:10px;cursor:pointer}.base-view[data-v-e9c1efea]{width:100%;height:100%}.base-view.laser-pen[data-v-e9c1efea]{cursor:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABHNCSVQICAgIfAhkiAAACCJJREFUWIXtmLuO3MYShv/qZl9IzqwXo2BkSAtsIK+z8wwOBcOJ9C56Cr2LlThQcgBnfofVBnswXlgTaLHaIdk3dtcJOKOzd8n2MeDABRDDgKz/m+pudv0N/BN/Luj/kYSZJQBxJR8DKESU/2zuPwTIzAKnpxqHhxUuLir0vYSUAkS0ewA5F7Rtxv7+iNPTEYeHkYjKXwrIzHK9XtultRohaKSkkFIVhqGCEAIxTvm0ZpRSTNOMUGqEUgnGxLX3cblc+t9T2S8GXK1W9dP53OLiwoLZhMtLQ4CiGBVKkchZIOcpn5QMKQuEyKx1YiCZvb0AooD9ff/rZuMPDg7cl+hWn3uAmQWABut1g/PzOnZdTd5bMY6aQtAIQQGQGEd5bYirKgPIZExiY2IKIbK1XpeinzaN2s7b4XPD/iAgM0ucn7fYbNrQ963Juaauq8k5i3E01PcG46iQs0TO1wGlzJAyo6oS2jagqgLGUQNQwTllvJeYzwUz9w8N+b2AzCxwft6i72fBuZkYhnbcbBqKsSbvazhnEIJBzqrEqGQpAlO1AaKShShC6wQpE4UQUNcBKenReyXm8yoIIYwQtNXq7qvkQxVssNm0wbmZuLiYUQgtnGtps2ngfQ3vLaVkEKOmGKcqMtMWkEnKTFonaB3Z+4AQPFmreD6vSAghxpECAFMKY7EoALovBlytVjXW6yb0fSuGoaUQWrq8nKHvW/R9S943xbmavJ+qmNIO8FMFIWXert7A1gYxjprHsSLmaTHt7UF0HYdSilmv82q1ynctnFuAzCzx8aPF+Xltcq7HzaaBcy36vsUwzKjrZhiGRgxDA+8tUjIUgkbOEqVMgEIUkjLDmAjvgwjBI6WKxlHybp5KyVRKMcaMGIb0dLFIzBxvzsdbgOv12i69t7HrpgURY02bTYO+b6nrZui6qZLONdz3jTg5ORDHx0f48OExQpgBAIzp8OjRez46Oi7Pnq1ot5BKETQVgYmosJRj6rrEQNJCxLX3EUB/LyAzC3z8qOGcIe8tOWdpmm81ed9gGJpdJdF1rXz79jucnX1za454P8fZ2ZzOzr6Rx8fvyvPnP38afiEKVVXmqhrJ+wSlIqoqYj73S2s1M7urC0ZcS3x6qhGCDpeXBuOoMY4Gzhl4b4tzNYahgXMNuq4Vb978cCfczTg7+0a8efMDuq6Fcw2GoSnO1fDewjmDcTQYx0kzBI3TU3319euAh4cVUlIEKApBU98bhGAoJSO8N/Dect834u3b73B+/vVn4XZxfv61ePv2O+77Bt5b4b2hlKbcfW8oBE2AQkoKh4fXRvU64MVFhZQqilEhBLX9CCvEqLer1YiTk4MvqtxdlTw5OcAWDDFq5DxphDBtmSlNzcddgMws0fcyDEOFUiQAiZxliVGVGFVJSXEImo6Pj3433Dbo+PiIQ9AlJbXLi5wnrVIm7b6X223wOiAAASkFhBDIWWAcJXKWshQhcpYiZ0k5S3z48PhO9ZcvgV9+ma6XL+8m/PDhMW1ziW1u5Cy3WpO2lOIq11VAAhEhRkLO0z0RgVmAefotRXz6lNyMV6+AxWK6Xr26GzCEGXZb4i7nTifnSXv6Tn7qssTdmf4+cRWQwczQmiHldM/MICogmn6FKDDmzj0Tr18D5+fT9fr13WrGdBCiXMu505Fy0mZmTJYBwPUPdUHOBaUUSFlQVRlS5rzbtqTMJGXGo0fvcXY2vyX+44/T9VA8evSepcy8zcdCFDG1ZBlSTto5FwC3P9RElNG22TTNCCEygAwps9A6Ca2TUCqRMZGPjo4fprg/+OjomIyJQqm0ywspJy0hJu22zVf34+tzcH9/hFIja51gTEJVJUiZoHWEMQFKhfLs2QpPnrz73XRPnrwrz56toFSAMQFaR0g5aRiTWOsEpUbs749XX7u51Y1QKjGQ2JjIbRtgTGClQrE2wFpPbTuU589/xmLx2xfDLRa/lefPf6a2HWCtL9YG3oJy2wY2JjKQoFTC6ekDgIeHEcZEs7cXUFURVTV1wtZ6UdcOTTOgrgfMZn158eKnL6rkkyfvyosXP2E261HXA5pmEHXtYK1HXU9WoKomTWMiDg/j1devbStEVN6/fx+XRIGt9RhHjZQ0Wat4HCsax//1fEQlf//9v8XJyTF9rt1q2+mPtW2PphnY2gHWOrbWcV17ttaDKKy9j4/398u9gACwXC49Pn7UuhQNQI3eT206s2DadptCFEiZqaoS/+tfvnz77X/oRsPKUmYyJpJSAdZ6NM2Aphl4Pu/QND3P5wO0dmo2c5jNHPb3/fKrr/xNnluARJRXq5V/2jQqOKfE1kPsPC8zM1VVLkqNwpiAEAxbq+hGy89SZtq2/MXaIOrasbUDmqZH2/Zo257bdghSOtM07tfNxh/s799yd3d6koODA8fM0ngvw9bgYG9vatOJClfVSFUVYe3UldxhmiBlxtY0kVLTlLHW8Xw+oG17NqYvs1lv6rrHcjkcEN1p5B9ydQPmc2GEoABAdB1TKYWlnDph5wJvbSdPpwvXbCcLUXhrO2FMQF0HttZBa8dtO5TZrDdt26FtewDDfRD3AhJRYeYemKxh2Bqc1HVTm17Xn4y7yFnyDeMurhh33hp3rmuvZjMXpHSmrqehXiz6h04XHjxZIKLMzB0Wi2LW64xhSAwkVFXEOGpo/dmjD2yPPlBVka31mM2caRqH5XLAnz362FUSQLdarfLTxSJpISLmcx8uLw217R8/PLpnzt3S/5KHdvG3Pn67Afr3PMB8APgvOwL+J/5s/BeEBm1u1Gu4+QAAAABJRU5ErkJggg==) 20 20,default!important}.tools-left[data-v-e9c1efea]{position:fixed;bottom:8px;left:8px;font-size:25px;color:#666;z-index:10}.tools-left .tool-btn[data-v-e9c1efea]{opacity:.35;cursor:pointer}.tools-left .tool-btn[data-v-e9c1efea]:hover{opacity:.9}.tools-left .tool-btn+.tool-btn[data-v-e9c1efea]{margin-left:8px}.tools-right[data-v-e9c1efea]{height:66px;position:fixed;bottom:-66px;right:0;z-index:5;padding:8px;transition:bottom .2s}.tools-right.visible[data-v-e9c1efea]{bottom:0}.tools-right[data-v-e9c1efea]:after{content:"";width:100%;height:66px;position:absolute;left:0;top:-66px}.tools-right .content[data-v-e9c1efea]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;border-radius:2px;font-size:25px;background-color:#fff;color:#41464b;padding:8px 10px;box-shadow:0 2px 12px 0 rgba(56,56,56,.2);border:1px solid #e2e6ed}.tools-right .tool-btn[data-v-e9c1efea]{cursor:pointer}.tools-right .tool-btn.active[data-v-e9c1efea],.tools-right .tool-btn[data-v-e9c1efea]:hover{color:#d14424}.tools-right .tool-btn+.tool-btn[data-v-e9c1efea]{margin-left:15px}.tools-right .page-number[data-v-e9c1efea]{font-size:13px;padding:8px 12px;cursor:pointer}.presenter-view[data-v-77a65275]{width:100%;height:100%;display:flex}.toolbar[data-v-77a65275]{width:70px;height:100%;background-color:#fff;border-right:1px solid #eee;font-size:12px;margin:20px 0}.toolbar .tool-btn[data-v-77a65275]{display:flex;flex-direction:column;justify-content:center;align-items:center;cursor:pointer}.toolbar .tool-btn+.tool-btn[data-v-77a65275]{margin-top:22px}.toolbar .tool-btn.active[data-v-77a65275],.toolbar .tool-btn[data-v-77a65275]:hover{color:#d14424}.toolbar .divider[data-v-77a65275]{width:70%;margin:24px 15%!important}.toolbar .tool-icon[data-v-77a65275]{margin-bottom:8px;font-size:22px}.content[data-v-77a65275]{width:calc(100% - 430px);height:100%;background-color:#1d1d1d}.slide-list-wrap[data-v-77a65275]{height:calc(100% - 190px);margin:20px;overflow:hidden;position:relative}.slide-list-wrap.laser-pen[data-v-77a65275]{cursor:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABHNCSVQICAgIfAhkiAAACCJJREFUWIXtmLuO3MYShv/qZl9IzqwXo2BkSAtsIK+z8wwOBcOJ9C56Cr2LlThQcgBnfofVBnswXlgTaLHaIdk3dtcJOKOzd8n2MeDABRDDgKz/m+pudv0N/BN/Luj/kYSZJQBxJR8DKESU/2zuPwTIzAKnpxqHhxUuLir0vYSUAkS0ewA5F7Rtxv7+iNPTEYeHkYjKXwrIzHK9XtultRohaKSkkFIVhqGCEAIxTvm0ZpRSTNOMUGqEUgnGxLX3cblc+t9T2S8GXK1W9dP53OLiwoLZhMtLQ4CiGBVKkchZIOcpn5QMKQuEyKx1YiCZvb0AooD9ff/rZuMPDg7cl+hWn3uAmQWABut1g/PzOnZdTd5bMY6aQtAIQQGQGEd5bYirKgPIZExiY2IKIbK1XpeinzaN2s7b4XPD/iAgM0ucn7fYbNrQ963Juaauq8k5i3E01PcG46iQs0TO1wGlzJAyo6oS2jagqgLGUQNQwTllvJeYzwUz9w8N+b2AzCxwft6i72fBuZkYhnbcbBqKsSbvazhnEIJBzqrEqGQpAlO1AaKShShC6wQpE4UQUNcBKenReyXm8yoIIYwQtNXq7qvkQxVssNm0wbmZuLiYUQgtnGtps2ngfQ3vLaVkEKOmGKcqMtMWkEnKTFonaB3Z+4AQPFmreD6vSAghxpECAFMKY7EoALovBlytVjXW6yb0fSuGoaUQWrq8nKHvW/R9S943xbmavJ+qmNIO8FMFIWXert7A1gYxjprHsSLmaTHt7UF0HYdSilmv82q1ynctnFuAzCzx8aPF+Xltcq7HzaaBcy36vsUwzKjrZhiGRgxDA+8tUjIUgkbOEqVMgEIUkjLDmAjvgwjBI6WKxlHybp5KyVRKMcaMGIb0dLFIzBxvzsdbgOv12i69t7HrpgURY02bTYO+b6nrZui6qZLONdz3jTg5ORDHx0f48OExQpgBAIzp8OjRez46Oi7Pnq1ot5BKETQVgYmosJRj6rrEQNJCxLX3EUB/LyAzC3z8qOGcIe8tOWdpmm81ed9gGJpdJdF1rXz79jucnX1za454P8fZ2ZzOzr6Rx8fvyvPnP38afiEKVVXmqhrJ+wSlIqoqYj73S2s1M7urC0ZcS3x6qhGCDpeXBuOoMY4Gzhl4b4tzNYahgXMNuq4Vb978cCfczTg7+0a8efMDuq6Fcw2GoSnO1fDewjmDcTQYx0kzBI3TU3319euAh4cVUlIEKApBU98bhGAoJSO8N/Dect834u3b73B+/vVn4XZxfv61ePv2O+77Bt5b4b2hlKbcfW8oBE2AQkoKh4fXRvU64MVFhZQqilEhBLX9CCvEqLer1YiTk4MvqtxdlTw5OcAWDDFq5DxphDBtmSlNzcddgMws0fcyDEOFUiQAiZxliVGVGFVJSXEImo6Pj3433Dbo+PiIQ9AlJbXLi5wnrVIm7b6X223wOiAAASkFhBDIWWAcJXKWshQhcpYiZ0k5S3z48PhO9ZcvgV9+ma6XL+8m/PDhMW1ziW1u5Cy3WpO2lOIq11VAAhEhRkLO0z0RgVmAefotRXz6lNyMV6+AxWK6Xr26GzCEGXZb4i7nTifnSXv6Tn7qssTdmf4+cRWQwczQmiHldM/MICogmn6FKDDmzj0Tr18D5+fT9fr13WrGdBCiXMu505Fy0mZmTJYBwPUPdUHOBaUUSFlQVRlS5rzbtqTMJGXGo0fvcXY2vyX+44/T9VA8evSepcy8zcdCFDG1ZBlSTto5FwC3P9RElNG22TTNCCEygAwps9A6Ca2TUCqRMZGPjo4fprg/+OjomIyJQqm0ywspJy0hJu22zVf34+tzcH9/hFIja51gTEJVJUiZoHWEMQFKhfLs2QpPnrz73XRPnrwrz56toFSAMQFaR0g5aRiTWOsEpUbs749XX7u51Y1QKjGQ2JjIbRtgTGClQrE2wFpPbTuU589/xmLx2xfDLRa/lefPf6a2HWCtL9YG3oJy2wY2JjKQoFTC6ekDgIeHEcZEs7cXUFURVTV1wtZ6UdcOTTOgrgfMZn158eKnL6rkkyfvyosXP2E261HXA5pmEHXtYK1HXU9WoKomTWMiDg/j1devbStEVN6/fx+XRIGt9RhHjZQ0Wat4HCsax//1fEQlf//9v8XJyTF9rt1q2+mPtW2PphnY2gHWOrbWcV17ttaDKKy9j4/398u9gACwXC49Pn7UuhQNQI3eT206s2DadptCFEiZqaoS/+tfvnz77X/oRsPKUmYyJpJSAdZ6NM2Aphl4Pu/QND3P5wO0dmo2c5jNHPb3/fKrr/xNnluARJRXq5V/2jQqOKfE1kPsPC8zM1VVLkqNwpiAEAxbq+hGy89SZtq2/MXaIOrasbUDmqZH2/Zo257bdghSOtM07tfNxh/s799yd3d6koODA8fM0ngvw9bgYG9vatOJClfVSFUVYe3UldxhmiBlxtY0kVLTlLHW8Xw+oG17NqYvs1lv6rrHcjkcEN1p5B9ydQPmc2GEoABAdB1TKYWlnDph5wJvbSdPpwvXbCcLUXhrO2FMQF0HttZBa8dtO5TZrDdt26FtewDDfRD3AhJRYeYemKxh2Bqc1HVTm17Xn4y7yFnyDeMurhh33hp3rmuvZjMXpHSmrqehXiz6h04XHjxZIKLMzB0Wi2LW64xhSAwkVFXEOGpo/dmjD2yPPlBVka31mM2caRqH5XLAnz362FUSQLdarfLTxSJpISLmcx8uLw217R8/PLpnzt3S/5KHdvG3Pn67Afr3PMB8APgvOwL+J/5s/BeEBm1u1Gu4+QAAAABJRU5ErkJggg==) 20 20,default!important}.thumbnails[data-v-77a65275]{height:150px;padding:15px;white-space:nowrap;overflow-x:auto;overflow-y:hidden;border-top:1px solid #3a3a3a}.thumbnail[data-v-77a65275]{display:inline-block;outline:2px solid #aaa}.thumbnail+.thumbnail[data-v-77a65275]{margin-left:10px}.thumbnail[data-v-77a65275]:hover{outline-color:#d14424}.thumbnail.active[data-v-77a65275]{outline-width:3px;outline-color:#d14424}.remark[data-v-77a65275]{width:360px;height:100%;position:relative;background-color:#2a2a2a;border-left:1px solid #3a3a3a;color:#fff}.remark .header[data-v-77a65275]{height:60px;padding:0 20px;display:flex;justify-content:space-between;align-items:center;font-size:18px;border-bottom:1px solid #3a3a3a}.remark .remark-content[data-v-77a65275]{height:calc(100% - 60px);padding:20px;line-height:1.5;overflow:auto;overflow:overlay}.remark .remark-scale[data-v-77a65275]{position:absolute;right:5px;bottom:5px;font-size:22px;display:flex}.remark .scale-btn[data-v-77a65275]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}.remark .scale-btn.disable[data-v-77a65275]{color:#666;cursor:no-drop}.remark .scale-btn[data-v-77a65275]:not(.disable):hover{background-color:#333}[data-v-77a65275]::-webkit-scrollbar{width:0;height:0}.pptist-screen[data-v-6bf3d190]{width:100%;height:100%}.mobile-operate[data-v-fd451ff6]{position:absolute;z-index:100;-webkit-user-select:none;-moz-user-select:none;user-select:none}.mobile-thumbnails[data-v-2c80920e]{padding:10px;white-space:nowrap;overflow-x:auto;overflow-y:hidden}.thumbnail-item[data-v-2c80920e]{position:relative;display:inline-block;outline:2px solid #aaa}.thumbnail-item+.thumbnail-item[data-v-2c80920e]{margin-left:10px}.thumbnail-item.active[data-v-2c80920e]{outline-color:#d14424}.thumbnail-item.active .label[data-v-2c80920e]{background-color:#d14424}.thumbnail-item .label[data-v-2c80920e]{min-width:20px;height:14px;line-height:14px;position:absolute;right:-1px;top:-1px;color:#fff;background-color:#aaa;z-index:1;font-size:12px;text-align:center;padding:0 5px}.sortable-chosen[data-v-2c80920e]{top:-5px}[data-v-2c80920e]::-webkit-scrollbar{width:0;height:0}.slide-toolbar[data-v-24150aba]{height:230px;background-color:#fff;box-shadow:0 0 15px 0 rgba(0,0,0,.1);display:flex;flex-direction:column;position:relative;z-index:2}.remark[data-v-24150aba]{position:relative;flex:1;border-bottom:1px solid #eee;line-height:1.5}.remark textarea[data-v-24150aba]{width:100%;height:100%;overflow-y:auto;resize:none;border:0;outline:0;padding:8px 10px;font-size:12px;box-sizing:border-box;position:absolute;top:0;right:0;bottom:0;left:0}.toolbar[data-v-24150aba]{height:90px;border-bottom:1px solid #eee;padding:10px}.row[data-v-24150aba]{width:100%;display:flex;align-items:center;margin-bottom:5px}.row .icon[data-v-24150aba]{margin-right:3px}.element-toolbar[data-v-f3d1ac70]{width:100%;height:240px;position:absolute;z-index:99;bottom:0;left:0;background-color:#fff;box-shadow:0 0 15px 0 rgba(0,0,0,.1);display:flex;flex-direction:column;animation:slideInUp-f3d1ac70 .15s}@keyframes slideInUp-f3d1ac70{0%{transform:translateY(100%)}to{transform:translateY(0)}}.content[data-v-f3d1ac70]{padding:10px;flex:1;overflow:auto}.row[data-v-f3d1ac70]{width:100%;display:flex;align-items:center;margin-bottom:10px}.row .icon[data-v-f3d1ac70]{margin-right:3px}.row-block[data-v-f3d1ac70]{margin-bottom:10px;background-color:#f9f9f9;border-radius:2px;padding:10px}.label[data-v-f3d1ac70]{font-size:13px;margin-bottom:20px;margin-left:6px}.colors[data-v-f3d1ac70]{display:flex;flex-wrap:wrap;align-content:flex-start}.color[data-v-f3d1ac70]{width:12%;margin-bottom:.57143%;padding-bottom:5px;display:flex;justify-content:center;align-items:center}.color[data-v-f3d1ac70]:not(:nth-child(8n)){margin-right:.57143%}.color .color-block[data-v-f3d1ac70]{width:30px;height:30px;border-radius:50%}.mobile-editor-header[data-v-5c34ab81]{height:50px;background-color:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 18px;font-size:13px;box-shadow:0 0 15px 0 rgba(0,0,0,.1);position:relative;z-index:2}.history[data-v-5c34ab81]{display:flex;justify-content:center;align-items:center}.history-item[data-v-5c34ab81]{margin-right:20px}.history-item.disable[data-v-5c34ab81]{opacity:.5}.mobile-editor[data-v-3756d058]{height:100%;position:relative;background-color:#f9f9f9}.content[data-v-3756d058]{height:calc(100% - 280px);display:flex;justify-content:center;align-items:center}.viewport[data-v-3756d058]{transform-origin:0 0}.viewport-wrapper[data-v-3756d058]{position:relative;box-shadow:0 0 15px 0 rgba(0,0,0,.1)}.background[data-v-3756d058]{width:100%;height:100%;background-position:50%;position:absolute}.mobile-player[data-v-62f26eba]{transform-origin:0 0;background-color:#1d1d1d;position:relative}.screen-slide-list[data-v-62f26eba]{position:relative;width:100%;height:100%}.slide-item[data-v-62f26eba]{position:absolute;top:0;left:0;width:100%;height:100%}.slide-item.current[data-v-62f26eba]{z-index:2}.slide-item.hide[data-v-62f26eba]{opacity:0}.slide-item.turning-mode-no.before[data-v-62f26eba]{transform:translateY(-100%)}.slide-item.turning-mode-no.after[data-v-62f26eba]{transform:translateY(100%)}.slide-item.turning-mode-fade[data-v-62f26eba]{transition:opacity .75s}.slide-item.turning-mode-fade.after[data-v-62f26eba],.slide-item.turning-mode-fade.before[data-v-62f26eba]{pointer-events:none;opacity:0}.slide-item.turning-mode-slideX[data-v-62f26eba]{transition:transform .35s}.slide-item.turning-mode-slideX.before[data-v-62f26eba]{transform:translateX(-100%)}.slide-item.turning-mode-slideX.after[data-v-62f26eba]{transform:translateX(100%)}.slide-item.turning-mode-slideY[data-v-62f26eba]{transition:transform .35s}.slide-item.turning-mode-slideY.before[data-v-62f26eba]{transform:translateY(-100%)}.slide-item.turning-mode-slideY.after[data-v-62f26eba]{transform:translateY(100%)}.slide-content[data-v-62f26eba]{background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;justify-content:center;align-items:center}.header[data-v-62f26eba]{width:100%;height:40px;line-height:40px;padding:0 15px;position:absolute;top:0;left:0;z-index:99;background-color:rgba(29,29,29,.7);text-align:right;font-size:13px;color:#fff;animation:slideInDown-62f26eba .15s}.header .back[data-v-62f26eba]{height:100%}.thumbnails[data-v-62f26eba]{width:100%;position:absolute;bottom:0;left:0;z-index:99;background-color:rgba(29,29,29,.7);overflow:auto!important;animation:slideInUp-62f26eba .15s}@keyframes slideInUp-62f26eba{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideInDown-62f26eba{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.mobile-preview[data-v-53dd42dc]{height:100%;background-color:#f9f9f9}.thumbnail-list[data-v-53dd42dc]{height:calc(100% - 50px);padding:10px;overflow:auto}.thumbnail-item[data-v-53dd42dc]{display:flex;justify-content:center;align-items:center;box-shadow:0 0 15px 0 rgba(0,0,0,.1)}.thumbnail-item+.thumbnail-item[data-v-53dd42dc]{margin-top:10px}.menu[data-v-53dd42dc]{height:50px;position:relative;box-shadow:0 -2px 4px 0 rgba(51,51,51,.05);background:#fff;display:flex;justify-content:center;align-items:center}.menu .menu-item[data-v-53dd42dc]{width:50%;height:100%;display:flex;justify-content:center;align-items:center;font-size:13px}.menu .menu-item .icon[data-v-53dd42dc]{margin-right:8px;font-size:18px}#app,.mobile[data-v-9826ff08]{height:100%}.ProseMirror,.ProseMirror-static{outline:0;border:0;font-size:20px;word-break:break-word;white-space:normal}.ProseMirror-static:not(.ProseMirror-static),.ProseMirror:not(.ProseMirror-static){-webkit-user-select:text;-moz-user-select:text;user-select:text}.ProseMirror ::-moz-selection,.ProseMirror-static ::-moz-selection{background-color:rgba(209,68,36,.25);color:inherit}.ProseMirror ::selection,.ProseMirror-static ::selection{background-color:rgba(209,68,36,.25);color:inherit}.ProseMirror p,.ProseMirror-static p{margin-top:var(--paragraphSpace)}.ProseMirror p:first-child,.ProseMirror-static p:first-child{margin-top:0}.ProseMirror ul,.ProseMirror-static ul{list-style-type:disc;padding-inline-start:1.25em}.ProseMirror ul li,.ProseMirror-static ul li{list-style-type:inherit;padding:2px 0}.ProseMirror ol,.ProseMirror-static ol{list-style-type:decimal;padding-inline-start:1.25em}.ProseMirror ol li,.ProseMirror-static ol li{list-style-type:inherit;padding:2px 0}.ProseMirror code,.ProseMirror-static code{background-color:#eee;padding:2px 6px;margin:0 1px;border-radius:4px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}.ProseMirror sup,.ProseMirror-static sup{vertical-align:super;font-size:smaller}.ProseMirror sub,.ProseMirror-static sub{vertical-align:sub;font-size:smaller}.ProseMirror blockquote,.ProseMirror-static blockquote{overflow:hidden;padding-right:1.2em;padding-left:1.2em;margin-left:0;margin-right:0;font-style:italic;border-left:4px solid #ddd}.ProseMirror [data-indent="1"],.ProseMirror-static [data-indent="1"]{padding-left:20px}.ProseMirror [data-indent="2"],.ProseMirror-static [data-indent="2"]{padding-left:40px}.ProseMirror [data-indent="3"],.ProseMirror-static [data-indent="3"]{padding-left:60px}.ProseMirror [data-indent="4"],.ProseMirror-static [data-indent="4"]{padding-left:80px}.ProseMirror [data-indent="5"],.ProseMirror-static [data-indent="5"]{padding-left:100px}.ProseMirror [data-indent="6"],.ProseMirror-static [data-indent="6"]{padding-left:120px}.ProseMirror [data-indent="7"],.ProseMirror-static [data-indent="7"]{padding-left:140px}.ProseMirror [data-indent="8"],.ProseMirror-static [data-indent="8"]{padding-left:160px}.ProseMirror-selectednode{outline:none!important}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline;box-sizing:border-box}:after,:before{box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,html{width:100%;height:100%;overflow:hidden;background-color:#fff;color:#41464b}body{font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}a{text-decoration:none;color:#d14424}img{vertical-align:middle;border-style:none}hr{box-sizing:content-box;height:0;overflow:visible}mark.active{background-color:#ff9632}button,input,optgroup,select,textarea{color:inherit}button,input{overflow:visible}button,select{text-transform:none}textarea{overflow:auto;resize:vertical}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}::-webkit-scrollbar{width:5px;height:5px;background-color:transparent}::-webkit-scrollbar-thumb{background-color:#c1c1c1}@font-face{font-display:swap;font-family:仓耳小丸子;src:url(../fonts/%E4%BB%93%E8%80%B3%E5%B0%8F%E4%B8%B8%E5%AD%90.64a7acb4.woff2) format("woff2")}@font-face{font-display:swap;font-family:优设标题黑;src:url(../fonts/%E4%BC%98%E8%AE%BE%E6%A0%87%E9%A2%98%E9%BB%91.df0c1330.woff2) format("woff2")}@font-face{font-display:swap;font-family:字制区喜脉体;src:url(../fonts/%E5%AD%97%E5%88%B6%E5%8C%BA%E5%96%9C%E8%84%89%E4%BD%93.cb8f58a4.woff2) format("woff2")}@font-face{font-display:swap;font-family:峰广明锐体;src:url(../fonts/%E5%B3%B0%E5%B9%BF%E6%98%8E%E9%94%90%E4%BD%93.8c45ca35.woff2) format("woff2")}@font-face{font-display:swap;font-family:得意黑;src:url(../fonts/%E5%BE%97%E6%84%8F%E9%BB%91.7caef6f6.woff2) format("woff2")}@font-face{font-display:swap;font-family:摄图摩登小方体;src:url(../fonts/%E6%91%84%E5%9B%BE%E6%91%A9%E7%99%BB%E5%B0%8F%E6%96%B9%E4%BD%93.7d229dc8.woff2) format("woff2")}@font-face{font-display:swap;font-family:站酷快乐体;src:url(../fonts/%E7%AB%99%E9%85%B7%E5%BF%AB%E4%B9%90%E4%BD%93.8fd3ebd9.woff2) format("woff2")}@font-face{font-display:swap;font-family:素材集市康康体;src:url(../fonts/%E7%B4%A0%E6%9D%90%E9%9B%86%E5%B8%82%E5%BA%B7%E5%BA%B7%E4%BD%93.ceb20972.woff2) format("woff2")}@font-face{font-display:swap;font-family:素材集市酷方体;src:url(../fonts/%E7%B4%A0%E6%9D%90%E9%9B%86%E5%B8%82%E9%85%B7%E6%96%B9%E4%BD%93.42328465.woff2) format("woff2")}@font-face{font-display:swap;font-family:途牛类圆体;src:url(../fonts/%E9%80%94%E7%89%9B%E7%B1%BB%E5%9C%86%E4%BD%93.a94398b6.woff2) format("woff2")}@font-face{font-display:swap;font-family:锐字真言体;src:url(../fonts/%E9%94%90%E5%AD%97%E7%9C%9F%E8%A8%80%E4%BD%93.487089ad.woff2) format("woff2")}.menu-content[data-v-77e74b43]{width:170px;padding:5px 0;background:#fff;border:1px solid #eee;box-shadow:3px 3px 3px rgba(0,0,0,.15);border-radius:2px;list-style:none;margin:0}.menu-item[data-v-77e74b43]{padding:0 20px;color:#555;font-size:12px;transition:all .1s;white-space:nowrap;height:30px;line-height:30px;background-color:#fff;cursor:pointer}.menu-item:not(.disable):hover>.menu-item-content>.sub-menu[data-v-77e74b43]{display:block}.menu-item:not(.disable):hover>.has-children.has-handler[data-v-77e74b43]:after{transform:scale(1)}.menu-item[data-v-77e74b43]:hover:not(.disable){background-color:rgba(209,68,36,.2)}.menu-item.divider[data-v-77e74b43]{height:1px;overflow:hidden;margin:5px;background-color:#e5e5e5;line-height:0;padding:0}.menu-item.disable[data-v-77e74b43]{color:#b1b1b1;cursor:no-drop}.menu-item-content[data-v-77e74b43]{display:flex;align-items:center;justify-content:space-between;position:relative}.menu-item-content.has-children[data-v-77e74b43]:before{content:"";display:inline-block;width:8px;height:8px;border-width:1px;border-style:solid;border-color:#666 #666 transparent transparent;position:absolute;right:0;top:50%;transform:translateY(-50%) rotate(45deg)}.menu-item-content.has-children.has-handler[data-v-77e74b43]:after{content:"";display:inline-block;width:1px;height:24px;background-color:#f1f1f1;position:absolute;right:18px;top:3px;transform:scale(0);transition:transform .2s}.menu-item-content .sub-text[data-v-77e74b43]{opacity:.6}.menu-item-content .sub-menu[data-v-77e74b43]{width:120px;position:absolute;display:none;left:112%;top:-6px}.mask{position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:9998}.contextmenu{position:fixed;z-index:9999;-webkit-user-select:none;-moz-user-select:none;user-select:none}.tippy-box[data-theme~=tooltip]{background-color:#262626;color:#fff;border-radius:2px;padding:8px;font-size:12px;line-height:1.5}.tippy-box[data-theme~=tooltip] .tippy-arrow{width:12px;height:12px;color:#262626}.tippy-box[data-theme~=tooltip] .tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-box[data-theme~=tooltip][data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-theme~=tooltip][data-placement^=top]>.tippy-arrow:before{bottom:-5px;left:0;border-width:6px 6px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-theme~=tooltip][data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-theme~=tooltip][data-placement^=bottom]>.tippy-arrow:before{top:-5px;left:0;border-width:0 6px 6px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-theme~=tooltip][data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-theme~=tooltip][data-placement^=left]>.tippy-arrow:before{border-width:6px 0 6px 6px;border-left-color:initial;right:-5px;transform-origin:center left}.tippy-box[data-theme~=tooltip][data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-theme~=tooltip][data-placement^=right]>.tippy-arrow:before{left:-5px;border-width:6px 6px 6px 0;border-right-color:initial;transform-origin:center right} \ No newline at end of file +.message[data-v-03d14766]{max-width:600px}.message+.message[data-v-03d14766]{margin-top:15px}.message-container[data-v-03d14766]{min-width:50px;display:flex;align-items:center;padding:10px;font-size:13px;overflow:hidden;border-radius:2px;box-shadow:0 1px 8px rgba(0,0,0,.15);background:#fff;pointer-events:all;position:relative}.message-container .icons[data-v-03d14766]{display:flex;align-items:center;margin-right:10px}.message-container .title[data-v-03d14766]{font-size:14px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-container .content[data-v-03d14766]{width:100%}.message-container .description[data-v-03d14766]{line-height:1.5;color:#41464b}.message-container .title+.description[data-v-03d14766]{margin-top:5px}.message-container .control[data-v-03d14766]{position:relative;height:100%;margin-left:10px}.message-container .close-btn[data-v-03d14766]{font-size:15px;color:#666;display:flex;align-items:center;cursor:pointer}.message-container .close-btn[data-v-03d14766]:hover{color:#d14424}.message-fade-enter-active[data-v-03d14766]{animation:message-fade-in-down-03d14766 .3s}.message-fade-leave-active[data-v-03d14766]{animation:message-fade-out-03d14766 .3s}@keyframes message-fade-in-down-03d14766{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes message-fade-out-03d14766{0%{opacity:1;margin-top:0}to{opacity:0;margin-top:-45px}}.hotkey-doc[data-v-a0322054]{height:100%;overflow:auto;font-size:12px;margin:0 -15px;padding:0 15px 15px}.title[data-v-a0322054]{font-size:14px;font-weight:700;border-bottom:1px solid #e5e5e5;padding:25px 0 5px 0}.title[data-v-a0322054]:first-child{padding-top:0}.hotkey-item[data-v-a0322054]{border-bottom:1px solid #e5e5e5;padding:15px 0 5px 0;display:flex;align-items:center}.label[data-v-a0322054]{width:140px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.input[data-v-64bedb34]{display:none}.fullscreen-spin[data-v-a5c6b41c]{top:0;bottom:0;left:0;right:0;z-index:100;background-color:hsla(0,0%,95%,.7)}.fullscreen-spin[data-v-a5c6b41c],.spin[data-v-a5c6b41c]{position:fixed;display:flex;justify-content:center;align-items:center}.spin[data-v-a5c6b41c]{width:200px;height:200px;top:50%;left:50%;margin-top:-100px;margin-left:-100px;flex-direction:column}.spinner[data-v-a5c6b41c]{width:36px;height:36px;border:3px solid #d14424;border-top-color:transparent;border-radius:50%;animation:spinner-a5c6b41c .8s linear infinite}.text[data-v-a5c6b41c]{margin-top:20px;color:#d14424}@keyframes spinner-a5c6b41c{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.drawer[data-v-749dadac]{height:100%;position:fixed;top:0;bottom:0;z-index:5000;background:#fff;display:flex;flex-direction:column}.drawer.left[data-v-749dadac]{left:0;box-shadow:3px 0 6px -4px rgba(0,0,0,.12),9px 0 28px 8px rgba(0,0,0,.05)}.drawer.right[data-v-749dadac]{right:0;box-shadow:-3px 0 6px -4px rgba(0,0,0,.12),-9px 0 28px 8px rgba(0,0,0,.05)}.header[data-v-749dadac]{height:50px;padding:0 15px;position:relative;display:flex;align-items:center}.header .close-btn[data-v-749dadac]{width:20px;height:20px;display:flex;justify-content:center;align-items:center;position:absolute;top:15px;right:15px;cursor:pointer}.content[data-v-749dadac]{padding:0 15px;overflow:auto;flex:1}.drawer-slide-right-enter-active[data-v-749dadac]{animation:drawer-slide-right-enter-749dadac .25s ease both}.drawer-slide-right-leave-active[data-v-749dadac]{animation:drawer-slide-right-leave-749dadac .25s ease both}.drawer-slide-left-enter-active[data-v-749dadac]{animation:drawer-slide-left-enter-749dadac .25s ease both}.drawer-slide-left-leave-active[data-v-749dadac]{animation:drawer-slide-left-leave-749dadac .25s ease both}@keyframes drawer-slide-right-enter-749dadac{0%{transform:translateX(100%)}}@keyframes drawer-slide-right-leave-749dadac{to{transform:translateX(100%)}}@keyframes drawer-slide-left-enter-749dadac{0%{transform:translateX(-100%)}}@keyframes drawer-slide-left-leave-749dadac{to{transform:translateX(-100%)}}.input[data-v-a97ba0dc]{background-color:#fff;border:1px solid #d9d9d9;padding:0 5px;border-radius:2px;transition:border-color .25s;font-size:13px;display:flex}.input input[data-v-a97ba0dc]{min-width:0;height:30px;outline:0;border:0;line-height:30px;vertical-align:top;color:#41464b;padding:0 5px;flex:1;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.input input[data-v-a97ba0dc]::-moz-placeholder{color:#bfbfbf}.input input[data-v-a97ba0dc]::placeholder{color:#bfbfbf}.input.focused[data-v-a97ba0dc],.input[data-v-a97ba0dc]:not(.disabled):hover{border-color:#d14424}.input.disabled[data-v-a97ba0dc]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7}.input .prefix[data-v-a97ba0dc],.input .suffix[data-v-a97ba0dc]{display:flex;justify-content:center;align-items:center;line-height:30px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.popover.center[data-v-70fabe9a]{display:flex;justify-content:center;align-items:center}.popover-content[data-v-70fabe9a]{background-color:#fff;padding:10px;border:1px solid #eee;box-shadow:3px 3px 3px rgba(0,0,0,.15);border-radius:2px;font-size:13px}.tippy-box[data-theme~=popover]{border:0;outline:0}.popover-menu-item[data-v-2f137c4f]{min-width:80px;padding:6px 10px;border-radius:2px;font-size:13px;cursor:pointer}.popover-menu-item.center[data-v-2f137c4f]{text-align:center}.popover-menu-item[data-v-2f137c4f]:hover{background-color:#f1f1f1}.popover-menu-item+.popover-menu-item[data-v-2f137c4f]{margin-top:2px}.editor-header[data-v-0b9f8c7b]{background-color:#fff;-webkit-user-select:none;-moz-user-select:none;user-select:none;border-bottom:1px solid #eee;display:flex;justify-content:space-between;padding:0 5px}.left[data-v-0b9f8c7b],.menu-item[data-v-0b9f8c7b],.right[data-v-0b9f8c7b]{display:flex;justify-content:center;align-items:center}.menu-item[data-v-0b9f8c7b]{height:30px;font-size:14px;padding:0 10px;border-radius:2px;cursor:pointer}.menu-item .icon[data-v-0b9f8c7b]{font-size:18px;color:#666}.menu-item[data-v-0b9f8c7b]:hover{background-color:#f1f1f1}.group-menu-item[data-v-0b9f8c7b]{height:30px;display:flex;margin:0 8px;padding:0 2px;border-radius:2px}.group-menu-item[data-v-0b9f8c7b]:hover{background-color:#f1f1f1}.group-menu-item .menu-item[data-v-0b9f8c7b]{padding:0 3px}.group-menu-item .arrow-btn[data-v-0b9f8c7b]{display:flex;justify-content:center;align-items:center;cursor:pointer}.title[data-v-0b9f8c7b]{height:32px;margin-left:2px;font-size:13px}.title .title-input[data-v-0b9f8c7b]{width:200px;height:100%;padding-left:0;padding-right:0}.title .title-text[data-v-0b9f8c7b]{min-width:20px;max-width:400px;line-height:32px;padding:0 6px;border-radius:2px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.title .title-text[data-v-0b9f8c7b]:hover{background-color:#f1f1f1}.github-link[data-v-0b9f8c7b]{display:inline-block;height:30px}svg[data-v-11836cf8],svg[data-v-35e36256],svg[data-v-6e021ee2]{overflow:visible;position:absolute;z-index:2;top:0;left:0}.image-clip-handler[data-v-5984406b]{width:100%;height:100%;position:relative}.image-clip-handler .bottom-img[data-v-5984406b]{top:0;left:0;width:100%;height:100%;opacity:.5}.image-clip-handler img[data-v-5984406b]{width:100%;height:100%}.image-clip-handler .top-image-content[data-v-5984406b]{position:absolute;overflow:hidden}.image-clip-handler .top-image-content img[data-v-5984406b]{position:absolute}.operate[data-v-5984406b]{position:absolute;width:100%;height:100%;top:0;left:0;cursor:move}.clip-point[data-v-5984406b]{position:absolute;width:16px;height:16px}.clip-point svg[data-v-5984406b]{overflow:visible}.clip-point.left-top[data-v-5984406b]{left:0;top:0}.clip-point.right-top[data-v-5984406b]{left:100%;top:0;transform:rotate(90deg);transform-origin:0 0}.clip-point.left-bottom[data-v-5984406b]{left:0;top:100%;transform:rotate(-90deg);transform-origin:0 0}.clip-point.right-bottom[data-v-5984406b]{left:100%;top:100%;transform:rotate(180deg);transform-origin:0 0}.clip-point.top[data-v-5984406b]{left:50%;top:0;margin-left:-8px}.clip-point.bottom[data-v-5984406b]{left:50%;bottom:0;margin-left:-8px;transform:rotate(180deg)}.clip-point.left[data-v-5984406b]{left:0;top:50%;margin-top:-8px;transform:rotate(-90deg)}.clip-point.right[data-v-5984406b]{right:0;top:50%;margin-top:-8px;transform:rotate(90deg)}.clip-point.bottom.rotate-135[data-v-5984406b],.clip-point.left-bottom.rotate-90[data-v-5984406b],.clip-point.left-top.rotate-0[data-v-5984406b],.clip-point.left.rotate-45[data-v-5984406b],.clip-point.right-bottom.rotate-0[data-v-5984406b],.clip-point.right-top.rotate-90[data-v-5984406b],.clip-point.right.rotate-45[data-v-5984406b],.clip-point.top.rotate-135[data-v-5984406b]{cursor:nwse-resize}.clip-point.bottom.rotate-0[data-v-5984406b],.clip-point.left-bottom.rotate-135[data-v-5984406b],.clip-point.left-top.rotate-45[data-v-5984406b],.clip-point.left.rotate-90[data-v-5984406b],.clip-point.right-bottom.rotate-45[data-v-5984406b],.clip-point.right-top.rotate-135[data-v-5984406b],.clip-point.right.rotate-90[data-v-5984406b],.clip-point.top.rotate-0[data-v-5984406b]{cursor:ns-resize}.clip-point.bottom.rotate-45[data-v-5984406b],.clip-point.left-bottom.rotate-0[data-v-5984406b],.clip-point.left-top.rotate-90[data-v-5984406b],.clip-point.left.rotate-135[data-v-5984406b],.clip-point.right-bottom.rotate-90[data-v-5984406b],.clip-point.right-top.rotate-0[data-v-5984406b],.clip-point.right.rotate-135[data-v-5984406b],.clip-point.top.rotate-45[data-v-5984406b]{cursor:nesw-resize}.clip-point.bottom.rotate-90[data-v-5984406b],.clip-point.left-bottom.rotate-45[data-v-5984406b],.clip-point.left-top.rotate-135[data-v-5984406b],.clip-point.left.rotate-0[data-v-5984406b],.clip-point.right-bottom.rotate-135[data-v-5984406b],.clip-point.right-top.rotate-45[data-v-5984406b],.clip-point.right.rotate-0[data-v-5984406b],.clip-point.top.rotate-90[data-v-5984406b]{cursor:ew-resize}.editable-element-image[data-v-1156b3e1]{position:absolute}.editable-element-image.lock .element-content[data-v-1156b3e1]{cursor:default}.rotate-wrapper[data-v-1156b3e1]{width:100%;height:100%}.element-content[data-v-1156b3e1]{width:100%;height:100%;position:relative;cursor:move}.element-content .image-content[data-v-1156b3e1]{width:100%;height:100%;overflow:hidden;position:relative}.element-content img[data-v-1156b3e1]{position:absolute}.color-mask[data-v-1156b3e1]{position:absolute;top:0;bottom:0;left:0;right:0}svg[data-v-efb76626]{overflow:visible;position:absolute;top:0;left:0}.prosemirror-editor[data-v-653f533c]{cursor:text}.prosemirror-editor.format-painter[data-v-653f533c]{cursor:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTcuMzUuMDEyLS4wNjYuOTk4YTUuMjcxIDUuMjcxIDAgMCAwLTEuMTg0LjA2IDMuOCAzLjggMCAwIDAtLjkzMy40NzJjLS40NC4zNTYtLjc4My44MTEtLjk5OCAxLjMyNGwuMDE4LS4wMzZ2NS4xMmgxLjA0di45OGgtMS4wNGwtLjAwMiA0LjE1Yy4xODcuNDI2LjQ2LjgxLjc5MSAxLjExN2wuMTc1LjE1MmMuMjkzLjIwOC42MTUuMzczLjg5LjQ3Mi40MS4wODIuODMuMTEyIDEuMjQ5LjA5bC4wNTcuOTk5YTYuMDYzIDYuMDYzIDAgMCAxLTEuNTg4LS4xMjkgNC44MzYgNC44MzYgMCAwIDEtMS4yNS0uNjQ3IDQuNDYzIDQuNDYzIDAgMCAxLS44MzgtLjg4M2MtLjIyNC4zMzItLjUuNjQyLS44MjQuOTI3YTQuMTEgNC4xMSAwIDAgMS0xLjMwNS42MzNBNi4xMjYgNi4xMjYgMCAwIDEgMCAxNS45MDlsLjA2OC0uOTk3Yy40MjQuMDI2Ljg1LS4wMDEgMS4yMTctLjA3LjMzNi0uMDk5LjY1MS0uMjU0Ljg5NC0uNDMuNDMtLjM4Ljc2NS0uODQ3Ljk4Mi0xLjM2OGwtLjAwNS4wMTRWOC45M0gyLjExNXYtLjk4aDEuMDRWMi44NjJhMy43NyAzLjc3IDAgMCAwLS43NzQtMS4xNjdsLS4xNjUtLjE1NmEzLjA2NCAzLjA2NCAwIDAgMC0uODgtLjQ0OEE1LjA2MiA1LjA2MiAwIDAgMCAuMDY3IDEuMDFMMCAuMDEyYTYuMTQgNi4xNCAwIDAgMSAxLjU5Mi4xMWMuNDUzLjEzNS44NzcuMzQ1IDEuMjkuNjUuMy4yNjUuNTY1LjU2NC43ODcuODkuMjMzLS4zMzEuNTItLjYzNC44NTMtLjkwNGE0LjgzNSA0LjgzNSAwIDAgMSAxLjMtLjY0OEE2LjE1NSA2LjE1NSAwIDAgMSA3LjM1LjAxMnoiIGZpbGw9IiMwRDBEMEQiLz48cGF0aCBkPSJtMTcuMzUgMTQuNSA0LjUtNC41LTYtNmMtMiAyLTMgMi01LjUgMi41LjQgMy4yIDQuODMzIDYuNjY3IDcgOHptNC41ODgtNC40OTNhLjMuMyAwIDAgMCAuNDI0IDBsLjY4LS42OGExLjUgMS41IDAgMCAwIDAtMi4xMjJMMjEuNjkgNS44NTNsMi4wMjUtMS41ODNhMS42MjkgMS42MjkgMCAxIDAtMi4yNzktMi4yOTZsLTEuNjAzIDIuMDIyLTEuMzU3LTEuMzU3YTEuNSAxLjUgMCAwIDAtMi4xMjEgMGwtLjY4LjY4YS4zLjMgMCAwIDAgMCAuNDI1bDYuMjYzIDYuMjYzeiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xNS44OTIgMy45NjJzLTEuMDMgMS4yMDItMi40OTQgMS44OWMtMS4wMDYuNDc0LTIuMTguNTg2LTIuNzM0LjYyNy0uMi4wMTUtLjM0NC4yMS0uMjc2LjM5OS4yOTIuODIgMS4xMTIgMi44IDIuNjU4IDQuMzQ2IDIuMTI2IDIuMTI3IDMuNjU4IDIuOTY4IDQuMTQyIDMuMjAzLjEuMDQ4LjIxNC4wMy4yOTgtLjA0Mi4zODYtLjMyNSAxLjUtMS4yNzcgMi4yMS0xLjk4Ni44OTItLjg4OSAyLjE4Ny0yLjQ0NyAyLjE4Ny0yLjQ0N20uNDc5LjA1NWEuMy4zIDAgMCAxLS40MjQgMGwtNi4yNjQtNi4yNjNhLjMuMyAwIDAgMSAwLS40MjVsLjY4LS42OGExLjUgMS41IDAgMCAxIDIuMTIyIDBsMS4zNTcgMS4zNTcgMS42MDMtMi4wMjJhMS42MjkgMS42MjkgMCAxIDEgMi4yOCAyLjI5NkwyMS42OSA1Ljg1M2wxLjM1MiAxLjM1MmExLjUgMS41IDAgMCAxIDAgMi4xMjJsLS42OC42OHoiIHN0cm9rZT0iIzMzMyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjwvc3ZnPg==) 2 5,default!important}.editable-element-text[data-v-2a1e49ba]{position:absolute}.editable-element-text.lock .element-content[data-v-2a1e49ba]{cursor:default}.rotate-wrapper[data-v-2a1e49ba]{width:100%;height:100%}.element-content[data-v-2a1e49ba]{position:relative;padding:10px;line-height:1.5;word-break:break-word;cursor:move}.element-content .text[data-v-2a1e49ba]{position:relative}.element-content[data-v-2a1e49ba] a{cursor:text}.drag-handler[data-v-2a1e49ba]{height:10px;position:absolute;left:0;right:0}.drag-handler.top[data-v-2a1e49ba]{top:0}.drag-handler.bottom[data-v-2a1e49ba]{bottom:0}.editable-element-shape[data-v-5d988de2]{position:absolute;pointer-events:none}.editable-element-shape.lock .element-content[data-v-5d988de2]{cursor:default}.editable-element-shape.format-painter .element-content[data-v-5d988de2]{cursor:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNzUgMTMuNzY0VjEuNDIxYS4zLjMgMCAwIDEgLjQ0OC0uMjZsMTAuOTEgNi4xOTdhLjMuMyAwIDAgMS0uMTE2LjU1OWwtNC4xOTYuNDQyIDIuNTgyIDQuNDcyYS4zLjMgMCAwIDEtLjExLjQxbC0zLjE4NCAxLjgzOGEuMy4zIDAgMCAxLS40MS0uMTFsLTIuNTgxLTQuNDcyLTIuODEgMy40NTZhLjMuMyAwIDAgMS0uNTMzLS4xODl6IiBmaWxsPSIjZmZmIiBzdHJva2U9IiMzMzMiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJtMjYgMTQuNSA0LjUtNC41LTYtNmMtMiAyLTMgMi01LjUgMi41LjQgMy4yIDQuODMzIDYuNjY3IDcgOHptNC41ODgtNC40OTRhLjMuMyAwIDAgMCAuNDI0IDBsLjY4LS42OGExLjUgMS41IDAgMCAwIDAtMi4xMjFMMzAuMzQgNS44NTJsMi4wMjYtMS41ODJhMS42MjkgMS42MjkgMCAxIDAtMi4yOC0yLjI5NmwtMS42MDMgMi4wMjEtMS4zNTctMS4zNTZhMS41IDEuNSAwIDAgMC0yLjEyIDBsLS42ODEuNjhhLjMuMyAwIDAgMCAwIC40MjRsNi4yNjMgNi4yNjN6IiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTI0LjU0MyAzLjk2MXMtMS4wMyAxLjIwMi0yLjQ5NCAxLjg5MWMtMS4wMDYuNDc0LTIuMTgxLjU4NS0yLjczNC42MjctLjIuMDE0LS4zNDQuMjA5LS4yNzcuMzk4LjI5My44MiAxLjExMiAyLjgwMSAyLjY1OCA0LjM0NyAyLjEyNiAyLjEyNiAzLjY1OSAyLjk2OCA0LjE0MiAzLjIwMi4xLjA0OC4yMTUuMDMuMjk5LS4wNDEuMzg1LS4zMjYgMS41LTEuMjc3IDIuMjEtMS45ODYuODkxLS44OSAyLjE4Ni0yLjQ0OCAyLjE4Ni0yLjQ0OG0uNDguMDU1YS4zLjMgMCAwIDEtLjQyNSAwbC02LjI2My02LjI2M2EuMy4zIDAgMCAxIDAtLjQyNGwuNjgtLjY4YTEuNSAxLjUgMCAwIDEgMi4xMjIgMGwxLjM1NiAxLjM1NiAxLjYwNC0yLjAyMWExLjYyOSAxLjYyOSAwIDEgMSAyLjI3OSAyLjI5NkwzMC4zNCA1Ljg1MmwxLjM1MyAxLjM1M2ExLjUgMS41IDAgMCAxIDAgMi4xMjFsLS42OC42OHoiIHN0cm9rZT0iIzMzMyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjwvc3ZnPg==) 2 5,default!important}.rotate-wrapper[data-v-5d988de2]{width:100%;height:100%}.element-content[data-v-5d988de2]{width:100%;height:100%;position:relative;cursor:move}.element-content svg[data-v-5d988de2]{transform-origin:0 0;overflow:visible}.element-content .shape-path[data-v-5d988de2]{pointer-events:all}.shape-text[data-v-5d988de2]{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;padding:10px;line-height:1.2;word-break:break-word;pointer-events:none}.shape-text.editable[data-v-5d988de2]{pointer-events:all}.shape-text.top[data-v-5d988de2]{justify-content:flex-start}.shape-text.middle[data-v-5d988de2]{justify-content:center}.shape-text.bottom[data-v-5d988de2]{justify-content:flex-end}.editable-element-shape[data-v-16512454]{position:absolute;pointer-events:none}.editable-element-shape.lock .line-path[data-v-16512454],.editable-element-shape.lock .line-point[data-v-16512454]{cursor:default}.element-content[data-v-16512454]{width:100%;height:100%;position:relative}.element-content svg[data-v-16512454]{transform-origin:0 0;overflow:visible}.line-path[data-v-16512454],.line-point[data-v-16512454]{pointer-events:all;cursor:move}.chart[data-v-ae2a96a6]{display:flex}.chart-content[data-v-ae2a96a6]{transform-origin:0 0}.chart-content{--theme-color-1:#666;--theme-color-2:#666;--theme-color-3:#666;--theme-color-4:#666;--theme-color-5:#666;--theme-color-6:#666;--theme-color-7:#666;--theme-color-8:#666;--theme-color-9:#666;--theme-color-10:#666;--grid-color:rgba(0,0,0,.4)}.chart-content .ct-series-a .ct-line,.chart-content .ct-series-a .ct-point{stroke:var(--theme-color-1)}.chart-content .ct-series-a .ct-area{fill:var(--theme-color-1)}.chart-content .ct-series-a .ct-bar{stroke:var(--theme-color-1)}.chart-content .ct-series-a .ct-slice-pie{fill:var(--theme-color-1)}.chart-content .ct-series-a .ct-slice-donut{stroke:var(--theme-color-1)}.chart-content .ct-series-b .ct-line,.chart-content .ct-series-b .ct-point{stroke:var(--theme-color-2)}.chart-content .ct-series-b .ct-area{fill:var(--theme-color-2)}.chart-content .ct-series-b .ct-bar{stroke:var(--theme-color-2)}.chart-content .ct-series-b .ct-slice-pie{fill:var(--theme-color-2)}.chart-content .ct-series-b .ct-slice-donut{stroke:var(--theme-color-2)}.chart-content .ct-series-c .ct-line,.chart-content .ct-series-c .ct-point{stroke:var(--theme-color-3)}.chart-content .ct-series-c .ct-area{fill:var(--theme-color-3)}.chart-content .ct-series-c .ct-bar{stroke:var(--theme-color-3)}.chart-content .ct-series-c .ct-slice-pie{fill:var(--theme-color-3)}.chart-content .ct-series-c .ct-slice-donut{stroke:var(--theme-color-3)}.chart-content .ct-series-d .ct-line,.chart-content .ct-series-d .ct-point{stroke:var(--theme-color-4)}.chart-content .ct-series-d .ct-area{fill:var(--theme-color-4)}.chart-content .ct-series-d .ct-bar{stroke:var(--theme-color-4)}.chart-content .ct-series-d .ct-slice-pie{fill:var(--theme-color-4)}.chart-content .ct-series-d .ct-slice-donut{stroke:var(--theme-color-4)}.chart-content .ct-series-e .ct-line,.chart-content .ct-series-e .ct-point{stroke:var(--theme-color-5)}.chart-content .ct-series-e .ct-area{fill:var(--theme-color-5)}.chart-content .ct-series-e .ct-bar{stroke:var(--theme-color-5)}.chart-content .ct-series-e .ct-slice-pie{fill:var(--theme-color-5)}.chart-content .ct-series-e .ct-slice-donut{stroke:var(--theme-color-5)}.chart-content .ct-series-f .ct-line,.chart-content .ct-series-f .ct-point{stroke:var(--theme-color-6)}.chart-content .ct-series-f .ct-area{fill:var(--theme-color-6)}.chart-content .ct-series-f .ct-bar{stroke:var(--theme-color-6)}.chart-content .ct-series-f .ct-slice-pie{fill:var(--theme-color-6)}.chart-content .ct-series-f .ct-slice-donut{stroke:var(--theme-color-6)}.chart-content .ct-series-g .ct-line,.chart-content .ct-series-g .ct-point{stroke:var(--theme-color-7)}.chart-content .ct-series-g .ct-area{fill:var(--theme-color-7)}.chart-content .ct-series-g .ct-bar{stroke:var(--theme-color-7)}.chart-content .ct-series-g .ct-slice-pie{fill:var(--theme-color-7)}.chart-content .ct-series-g .ct-slice-donut{stroke:var(--theme-color-7)}.chart-content .ct-series-h .ct-line,.chart-content .ct-series-h .ct-point{stroke:var(--theme-color-8)}.chart-content .ct-series-h .ct-area{fill:var(--theme-color-8)}.chart-content .ct-series-h .ct-bar{stroke:var(--theme-color-8)}.chart-content .ct-series-h .ct-slice-pie{fill:var(--theme-color-8)}.chart-content .ct-series-h .ct-slice-donut{stroke:var(--theme-color-8)}.chart-content .ct-series-i .ct-line,.chart-content .ct-series-i .ct-point{stroke:var(--theme-color-9)}.chart-content .ct-series-i .ct-area{fill:var(--theme-color-9)}.chart-content .ct-series-i .ct-bar{stroke:var(--theme-color-9)}.chart-content .ct-series-i .ct-slice-pie{fill:var(--theme-color-9)}.chart-content .ct-series-i .ct-slice-donut{stroke:var(--theme-color-9)}.chart-content .ct-grid{stroke:var(--grid-color)}.chart-content .ct-label{fill:var(--grid-color);color:var(--grid-color)}.legends{height:20px;justify-content:center;font-size:14px}.legend,.legends{display:flex;align-items:center}.legend+.legend{margin-left:10px}.legend .block{width:10px;height:10px;margin-right:5px}.editable-element-chart[data-v-6fc3de39]{position:absolute}.editable-element-chart.lock .element-content[data-v-6fc3de39]{cursor:default}.rotate-wrapper[data-v-6fc3de39]{width:100%;height:100%}.element-content[data-v-6fc3de39]{width:100%;height:100%;overflow:hidden;cursor:move}.custom-textarea[data-v-7a7222ac]{border:0;outline:0;-webkit-user-modify:read-write-plaintext-only}.editable-table[data-v-0236a619],table[data-v-0236a619]{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}table[data-v-0236a619]{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0;border:0;word-wrap:break-word;--themeColor:$themeColor;--subThemeColor1:$themeColor;--subThemeColor2:$themeColor}table.theme[data-v-0236a619]{background-color:#fff}table.theme tr:nth-child(2n) .cell[data-v-0236a619]{background-color:var(--subThemeColor1)}table.theme tr:nth-child(odd) .cell[data-v-0236a619]{background-color:var(--subThemeColor2)}table.theme.col-footer tr .cell[data-v-0236a619]:last-child,table.theme.col-header tr .cell[data-v-0236a619]:first-child,table.theme.row-footer tr:last-child .cell[data-v-0236a619],table.theme.row-header tr:first-child .cell[data-v-0236a619]{background-color:var(--themeColor)}table .cell[data-v-0236a619]{position:relative;white-space:normal;word-wrap:break-word;vertical-align:middle;font-size:14px;background-clip:padding-box;cursor:default}table .cell.selected[data-v-0236a619]:after{content:"";width:100%;height:100%;position:absolute;top:0;left:0;background-color:hsla(0,0%,40%,.4)}table .cell-text[data-v-0236a619]{padding:5px;line-height:1.5;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:text}table .cell-text.active[data-v-0236a619]{-webkit-user-select:text;-moz-user-select:text;user-select:text}.drag-line[data-v-0236a619]{position:absolute;top:0;bottom:0;width:3px;background-color:#d14424;margin-left:-1px;opacity:0;z-index:2;cursor:col-resize}.editable-element-table[data-v-742a731e]{position:absolute}.editable-element-table.lock .element-content[data-v-742a731e]{cursor:default}.rotate-wrapper[data-v-742a731e]{width:100%;height:100%}.element-content[data-v-742a731e]{width:100%;height:100%;position:relative;cursor:move}.table-mask[data-v-742a731e]{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .2s}.table-mask .mask-tip[data-v-742a731e]{position:absolute;top:5px;left:5px;background-color:rgba(0,0,0,.5);color:#fff;padding:6px 12px;font-size:12px;transform-origin:0 0}.table-mask[data-v-742a731e]:hover:not(.lock){opacity:.9}.editable-element-latex[data-v-35c33b80]{position:absolute}.editable-element-latex.lock .element-content[data-v-35c33b80]{cursor:default}.rotate-wrapper[data-v-35c33b80]{width:100%;height:100%}.element-content[data-v-35c33b80]{width:100%;height:100%;position:relative;cursor:move}.element-content svg[data-v-35c33b80]{transform-origin:0 0;overflow:visible}.video-player[data-v-e55352ca]{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:1;transform-origin:0 0}.video-player.hide-controller[data-v-e55352ca]{cursor:none}.video-player.hide-controller .controller-mask[data-v-e55352ca],.video-player.hide-controller .controller[data-v-e55352ca]{opacity:0;transform:translateY(100%)}.video-wrap[data-v-e55352ca]{position:relative;background:#000;font-size:0;width:100%;height:100%}.video-wrap .video[data-v-e55352ca]{width:100%;height:100%}.controller-mask[data-v-e55352ca]{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) repeat-x bottom;height:98px;width:100%;position:absolute;bottom:0;transition:all .3s ease}.controller[data-v-e55352ca]{position:absolute;bottom:0;left:0;right:0;height:41px;padding:0 20px;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:all .3s ease}.controller .bar-wrap[data-v-e55352ca]{padding:5px 0;cursor:pointer;position:absolute;bottom:33px;width:calc(100% - 40px);height:3px}.controller .bar-wrap:hover .bar .played .thumb[data-v-e55352ca]{transform:scale(1)}.controller .bar-wrap .bar-time[data-v-e55352ca]{position:absolute;left:0;top:-20px;border-radius:4px;padding:5px 7px;background-color:rgba(0,0,0,.62);color:#fff;font-size:12px;text-align:center;opacity:1;transition:opacity .1s ease-in-out;word-wrap:normal;word-break:normal;z-index:2;pointer-events:none}.controller .bar-wrap .bar-time.hidden[data-v-e55352ca]{opacity:0}.controller .bar-wrap .bar[data-v-e55352ca]{position:relative;height:3px;width:100%;background:hsla(0,0%,100%,.2);cursor:pointer}.controller .bar-wrap .bar .loaded[data-v-e55352ca]{position:absolute;left:0;top:0;bottom:0;background:hsla(0,0%,100%,.4);height:3px;transition:all .5s ease;will-change:width}.controller .bar-wrap .bar .played[data-v-e55352ca]{position:absolute;left:0;top:0;bottom:0;height:3px;will-change:width;background-color:#fff}.controller .bar-wrap .bar .played .thumb[data-v-e55352ca]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .icons[data-v-e55352ca]{height:38px;position:absolute;bottom:0;display:flex;align-items:center}.controller .icons.icons-right[data-v-e55352ca]{right:15px}.controller .icons .time[data-v-e55352ca]{line-height:38px;color:#eee;text-shadow:0 0 2px rgba(0,0,0,.5);vertical-align:middle;font-size:13px;cursor:default}.controller .icons .icon[data-v-e55352ca]{width:40px;height:100%;position:relative;cursor:pointer;display:flex;align-items:center;font-size:20px}.controller .icons .icon.play-icon[data-v-e55352ca]{font-size:26px}.controller .icons .icon .icon-content[data-v-e55352ca]{transition:all .2s ease-in-out;opacity:.8;color:#fff}.controller .icons .icon.loop-icon[data-v-e55352ca]{font-size:12px}.controller .icons .icon.loop-icon .icon-content[data-v-e55352ca]{opacity:.5}.controller .icons .icon.speed-icon[data-v-e55352ca]{font-size:12px;position:relative}.controller .icons .icon .speed-menu[data-v-e55352ca]{width:70px;position:absolute;bottom:30px;left:-23px;background-color:#22211b;padding:5px 0;color:#ddd}.controller .icons .icon .speed-menu .speed-menu-item[data-v-e55352ca]{padding:8px 0;text-align:center}.controller .icons .icon .speed-menu .speed-menu-item[data-v-e55352ca]:hover{background-color:#393833;color:#fff}.controller .icons .icon .speed-menu .speed-menu-item.active[data-v-e55352ca]{font-weight:700;color:#fff}.controller .icons .icon.active .icon-content[data-v-e55352ca],.controller .icons .icon:hover .icon-content[data-v-e55352ca]{opacity:1}.controller .icons .volume[data-v-e55352ca]{height:100%;position:relative;cursor:pointer;display:flex;align-items:center}.controller .icons .volume:hover .volume-bar-wrap .volume-bar[data-v-e55352ca]{width:45px}.controller .icons .volume:hover .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-e55352ca]{transform:scale(1)}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar[data-v-e55352ca]{width:45px}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-e55352ca]{transform:scale(1)}.controller .icons .volume-bar-wrap[data-v-e55352ca]{display:inline-block;margin:0 15px 0 -5px;vertical-align:middle;height:100%}.controller .icons .volume-bar[data-v-e55352ca]{position:relative;top:17px;width:0;height:3px;background:#aaa;transition:all .3s ease-in-out}.controller .icons .volume-bar .volume-bar-inner[data-v-e55352ca]{position:absolute;bottom:0;left:0;height:100%;transition:all .1s ease;will-change:width;background-color:#fff}.controller .icons .volume-bar .volume-bar-inner .thumb[data-v-e55352ca]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .icons .loop[data-v-e55352ca]{display:inline-block;height:100%}.bezel[data-v-e55352ca]{position:absolute;left:0;right:0;top:0;bottom:0;font-size:22px;color:#fff;pointer-events:none}.bezel .bezel-icon[data-v-e55352ca]{position:absolute;top:50%;left:50%;margin:-26px 0 0 -26px;height:52px;width:52px;padding:12px;display:flex;justify-content:center;align-items:center;background:rgba(0,0,0,.5);border-radius:50%;opacity:0;pointer-events:none;font-size:40px}.bezel .bezel-icon.bezel-transition[data-v-e55352ca]{animation:bezel-hide-e55352ca .5s linear}@keyframes bezel-hide-e55352ca{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(2)}}.load-error[data-v-e55352ca]{position:absolute;left:0;right:0;top:0;bottom:0;font-size:15px;color:#fff;pointer-events:none;display:flex;justify-content:center;align-items:center}.editable-element-video[data-v-5dc89f2a]{position:absolute}.editable-element-video.lock .handler-border[data-v-5dc89f2a]{cursor:default}.rotate-wrapper[data-v-5dc89f2a]{width:100%;height:100%}.element-content[data-v-5dc89f2a]{width:100%;height:100%;position:relative}.handler-border[data-v-5dc89f2a]{position:absolute;cursor:move}.handler-border.t[data-v-5dc89f2a]{width:100%;height:20px;top:0;left:0}.handler-border.b[data-v-5dc89f2a]{width:100%;height:5px;bottom:0;left:0}.handler-border.l[data-v-5dc89f2a]{width:10px;height:100%;left:0;top:0}.handler-border.r[data-v-5dc89f2a]{width:10px;height:100%;right:0;top:0}.audio-player[data-v-44037f56]{width:280px;height:50px;position:relative;line-height:1;transform-origin:0 0;background:#000}.audio-player[data-v-44037f56],.controller[data-v-44037f56]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.controller[data-v-44037f56]{position:absolute;bottom:0;left:0;right:0;height:41px;padding:0 20px;transition:all .3s ease}.controller .bar-wrap[data-v-44037f56]{padding:5px 0;cursor:pointer;position:absolute;bottom:35px;width:calc(100% - 40px);height:3px}.controller .bar-wrap:hover .bar .played .thumb[data-v-44037f56]{transform:scale(1)}.controller .bar-wrap .bar-time[data-v-44037f56]{position:absolute;left:0;top:-20px;border-radius:4px;padding:5px 7px;background-color:rgba(0,0,0,.62);color:#fff;font-size:12px;text-align:center;opacity:1;transition:opacity .1s ease-in-out;word-wrap:normal;word-break:normal;z-index:2;pointer-events:none}.controller .bar-wrap .bar-time.hidden[data-v-44037f56]{opacity:0}.controller .bar-wrap .bar[data-v-44037f56]{position:relative;height:3px;width:100%;background:hsla(0,0%,100%,.2);cursor:pointer}.controller .bar-wrap .bar .loaded[data-v-44037f56]{position:absolute;left:0;top:0;bottom:0;background:hsla(0,0%,100%,.4);height:3px;transition:all .5s ease;will-change:width}.controller .bar-wrap .bar .played[data-v-44037f56]{position:absolute;left:0;top:0;bottom:0;height:3px;will-change:width;background-color:#fff}.controller .bar-wrap .bar .played .thumb[data-v-44037f56]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .icons[data-v-44037f56]{height:38px;position:absolute;bottom:0;left:14px;display:flex;align-items:center}.controller .icons .icon[data-v-44037f56]{width:36px;height:100%;position:relative;cursor:pointer;display:flex;align-items:center;font-size:20px}.controller .icons .icon.play-icon[data-v-44037f56]{font-size:26px}.controller .icons .icon .icon-content[data-v-44037f56]{transition:all .2s ease-in-out;opacity:.8;color:#fff}.controller .icons .icon.active .icon-content[data-v-44037f56],.controller .icons .icon:hover .icon-content[data-v-44037f56]{opacity:1}.controller .icons .volume[data-v-44037f56]{height:100%;position:relative;cursor:pointer;display:flex;align-items:center}.controller .icons .volume:hover .volume-bar-wrap .volume-bar[data-v-44037f56]{width:45px}.controller .icons .volume:hover .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-44037f56]{transform:scale(1)}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar[data-v-44037f56]{width:45px}.controller .icons .volume.volume-active .volume-bar-wrap .volume-bar .volume-bar-inner .thumb[data-v-44037f56]{transform:scale(1)}.controller .icons .volume-bar-wrap[data-v-44037f56]{display:inline-block;margin:0 15px 0 -5px;vertical-align:middle;height:100%}.controller .icons .volume-bar[data-v-44037f56]{position:relative;top:17px;width:0;height:3px;background:#aaa;transition:all .3s ease-in-out}.controller .icons .volume-bar .volume-bar-inner[data-v-44037f56]{position:absolute;bottom:0;left:0;height:100%;transition:all .1s ease;will-change:width;background-color:#fff}.controller .icons .volume-bar .volume-bar-inner .thumb[data-v-44037f56]{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;transform:scale(0);background-color:#fff}.controller .time[data-v-44037f56]{height:38px;position:absolute;right:20px;bottom:0;display:flex;align-items:center;line-height:38px;color:#eee;text-shadow:0 0 2px rgba(0,0,0,.5);vertical-align:middle;font-size:13px;cursor:default}.controller .time .ptime[data-v-44037f56]{margin-right:2px}.controller .time .dtime[data-v-44037f56]{margin-left:2px}.editable-element-audio[data-v-53bdc956]{position:absolute}.editable-element-audio.lock .audio-icon[data-v-53bdc956]{cursor:default}.rotate-wrapper[data-v-53bdc956]{width:100%;height:100%}.element-content[data-v-53bdc956]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.audio-icon[data-v-53bdc956]{cursor:move}.audio-player[data-v-53bdc956]{position:absolute}.mouse-selection[data-v-2c5e1d42]{position:absolute;background-color:rgba(209,68,36,.1);border:1px solid #d14424;z-index:200}.mouse-selection.quadrant-1[data-v-2c5e1d42]{transform-origin:50% 0;transform:rotate(180deg)}.mouse-selection.quadrant-2[data-v-2c5e1d42]{transform-origin:0 0;transform:rotate(180deg)}.mouse-selection.quadrant-3[data-v-2c5e1d42]{transform-origin:0 50%;transform:rotate(180deg)}.mouse-selection.quadrant-4[data-v-2c5e1d42]{transform-origin:0 0;transform:rotate(0deg)}.grid-lines[data-v-05484a24]{width:100%;height:100%;overflow:visible;z-index:999;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}.viewport-background[data-v-b6b18502]{width:100%;height:100%;background-position:50%;position:absolute}.alignment-line[data-v-ed6fc00a]{position:absolute;z-index:100}.alignment-line .line[data-v-ed6fc00a]{width:0;height:0;border:0 dashed #d14424}.alignment-line .line.vertical[data-v-ed6fc00a]{transform:translateY(-.5px);border-left-width:1px}.alignment-line .line.horizontal[data-v-ed6fc00a]{transform:translateX(-.5px);border-top-width:1px}.ruler[data-v-2963c74c]{font-size:12px}.h[data-v-2963c74c]{position:absolute;background-color:#fff;border:1px solid #eee;height:20px;top:5px;display:flex;justify-content:space-between;align-items:center;overflow:hidden}.h .ruler-marker-100[data-v-2963c74c]{height:100%;width:10%;line-height:20px;text-align:right;flex-shrink:0;padding-right:5px;position:relative}.h .ruler-marker-100.hide span[data-v-2963c74c],.h .ruler-marker-100.omit[data-v-2963c74c]:before{display:none}.h .ruler-marker-100[data-v-2963c74c]:not(:last-child):after{content:"";width:.1px;height:12px;position:absolute;right:0;bottom:0;background-color:#999}.h .ruler-marker-100[data-v-2963c74c]:before{content:"";width:.1px;height:8px;position:absolute;right:50%;bottom:0;background-color:#999}.v[data-v-2963c74c]{position:absolute;background-color:#fff;border:1px solid #eee;width:20px;left:5px;overflow:hidden}.v .ruler-marker-100[data-v-2963c74c]{width:100%;line-height:20px;text-align:right;padding-bottom:5px;position:relative;writing-mode:vertical-rl}.v .ruler-marker-100.hide span[data-v-2963c74c],.v .ruler-marker-100.omit[data-v-2963c74c]:before{display:none}.v .ruler-marker-100[data-v-2963c74c]:not(:last-child):after{content:"";height:.1px;width:12px;position:absolute;bottom:0;right:0;background-color:#999}.v .ruler-marker-100[data-v-2963c74c]:before{content:"";height:.1px;width:8px;position:absolute;bottom:50%;right:0;background-color:#999}.element-create-selection[data-v-85b0bbaa]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2;cursor:crosshair}.element-create-selection svg[data-v-85b0bbaa]{overflow:visible}.selection[data-v-85b0bbaa]{position:absolute;opacity:.8}.selection[data-v-85b0bbaa]:not(.line){border:1px solid #d14424}.shape-create-canvas[data-v-6dc9876e]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2;cursor:crosshair}.shape-create-canvas svg[data-v-6dc9876e]{width:100%;height:100%;overflow:visible}.resize-handler[data-v-1e66197f]{position:absolute;width:10px;height:10px;left:0;top:0;margin:-5px 0 0 -5px;border:1px solid #d14424;background-color:#fff;border-radius:1px;cursor:pointer}.resize-handler.bottom.rotate-135[data-v-1e66197f],.resize-handler.left-bottom.rotate-90[data-v-1e66197f],.resize-handler.left-top.rotate-0[data-v-1e66197f],.resize-handler.left.rotate-45[data-v-1e66197f],.resize-handler.right-bottom.rotate-0[data-v-1e66197f],.resize-handler.right-top.rotate-90[data-v-1e66197f],.resize-handler.right.rotate-45[data-v-1e66197f],.resize-handler.top.rotate-135[data-v-1e66197f]{cursor:nwse-resize}.resize-handler.bottom.rotate-0[data-v-1e66197f],.resize-handler.left-bottom.rotate-135[data-v-1e66197f],.resize-handler.left-top.rotate-45[data-v-1e66197f],.resize-handler.left.rotate-90[data-v-1e66197f],.resize-handler.right-bottom.rotate-45[data-v-1e66197f],.resize-handler.right-top.rotate-135[data-v-1e66197f],.resize-handler.right.rotate-90[data-v-1e66197f],.resize-handler.top.rotate-0[data-v-1e66197f]{cursor:ns-resize}.resize-handler.bottom.rotate-45[data-v-1e66197f],.resize-handler.left-bottom.rotate-0[data-v-1e66197f],.resize-handler.left-top.rotate-90[data-v-1e66197f],.resize-handler.left.rotate-135[data-v-1e66197f],.resize-handler.right-bottom.rotate-90[data-v-1e66197f],.resize-handler.right-top.rotate-0[data-v-1e66197f],.resize-handler.right.rotate-135[data-v-1e66197f],.resize-handler.top.rotate-45[data-v-1e66197f]{cursor:nesw-resize}.resize-handler.bottom.rotate-90[data-v-1e66197f],.resize-handler.left-bottom.rotate-45[data-v-1e66197f],.resize-handler.left-top.rotate-135[data-v-1e66197f],.resize-handler.left.rotate-0[data-v-1e66197f],.resize-handler.right-bottom.rotate-135[data-v-1e66197f],.resize-handler.right-top.rotate-45[data-v-1e66197f],.resize-handler.right.rotate-0[data-v-1e66197f],.resize-handler.top.rotate-90[data-v-1e66197f]{cursor:ew-resize}.border-line[data-v-8346cf6c]{position:absolute;width:0;height:0;left:0;top:0;border:0 dashed #d14424}.border-line.top[data-v-8346cf6c]{border-top-width:1px}.border-line.bottom[data-v-8346cf6c]{border-bottom-width:1px}.border-line.left[data-v-8346cf6c]{border-left-width:1px}.border-line.right[data-v-8346cf6c]{border-right-width:1px}.border-line.wide[data-v-8346cf6c]:before{content:"";position:absolute;background:transparent;cursor:move}.border-line.wide.top[data-v-8346cf6c]:before{top:-8px;left:-8px;width:calc(100% + 16px);height:16px}.border-line.wide.bottom[data-v-8346cf6c]:before{bottom:-8px;left:-8px;width:calc(100% + 16px);height:16px}.border-line.wide.left[data-v-8346cf6c]:before{top:-8px;left:-8px;width:16px;height:calc(100% + 16px)}.border-line.wide.right[data-v-8346cf6c]:before{top:-8px;right:-8px;width:16px;height:calc(100% + 16px)}.multi-select-operate[data-v-97dc9b9a]{position:absolute;top:0;left:0;z-index:101}.rotate-handler[data-v-b99d8dae]{position:absolute;width:10px;height:10px;top:-25px;margin-left:-5px;border:1px solid #d14424;background-color:#fff;border-radius:1px;cursor:grab}.rotate-handler[data-v-b99d8dae]:active{cursor:grabbing}.image-element-operate.cliping[data-v-7bcad5a9]{visibility:hidden}.operate-keypoint-handler[data-v-52dcdbf8]{position:absolute;width:10px;height:10px;left:0;top:0;margin:-5px 0 0 -5px;border:1px solid #d14424;background-color:#ffe873;border-radius:1px}svg[data-v-3aa5cc44]{position:absolute;left:0;top:0;pointer-events:none;transform-origin:0 0}.anchor-line[data-v-3aa5cc44]{stroke-width:1px;stroke-dasharray:5 5;opacity:.5}.divider.horizontal[data-v-6b66cde8]{width:100%;margin:24px 0;border-block-start:1px solid rgba(5,5,5,.06)}.divider.vertical[data-v-6b66cde8]{position:relative;height:1em;display:inline-block;margin:0 8px;border-inline-start:1px solid rgba(5,5,5,.06)}.link-handler[data-v-316c4664]{height:30px;position:absolute;left:0;font-size:12px;padding:0 10px;background-color:#fff;box-shadow:3px 3px 3px rgba(0,0,0,.15);display:flex;align-items:center;color:#d14424}.link[data-v-316c4664]{max-width:300px;margin-right:20px;word-break:keep-all;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.btns[data-v-316c4664]{display:flex;align-items:center}.btns .btn[data-v-316c4664]{word-break:keep-all;cursor:pointer}.operate[data-v-5ec1ff35]{position:absolute;z-index:100;-webkit-user-select:none;-moz-user-select:none;user-select:none}.operate.multi-select[data-v-5ec1ff35]{opacity:.2}.animation-index[data-v-5ec1ff35]{position:absolute;top:0;left:-24px;font-size:12px}.animation-index .index-item[data-v-5ec1ff35]{width:18px;height:18px;background-color:#fff;color:#d14424;border:1px solid #d14424;display:flex;justify-content:center;align-items:center}.animation-index .index-item+.index-item[data-v-5ec1ff35]{margin-top:5px}.base-element-image[data-v-24fef706]{position:absolute}.rotate-wrapper[data-v-24fef706]{width:100%;height:100%}.element-content[data-v-24fef706]{width:100%;height:100%;position:relative}.element-content .image-content[data-v-24fef706]{width:100%;height:100%;overflow:hidden;position:relative}.element-content img[data-v-24fef706]{position:absolute}.color-mask[data-v-24fef706]{position:absolute;top:0;bottom:0;left:0;right:0}.base-element-text[data-v-52a206f2]{position:absolute}.rotate-wrapper[data-v-52a206f2]{width:100%;height:100%}.element-content[data-v-52a206f2]{position:relative;padding:10px;line-height:1.5;word-break:break-word}.element-content .text[data-v-52a206f2]{position:relative}.base-element-shape[data-v-b13f8fa8]{position:absolute}.rotate-wrapper[data-v-b13f8fa8]{width:100%;height:100%}.element-content[data-v-b13f8fa8]{width:100%;height:100%;position:relative}.element-content svg[data-v-b13f8fa8]{transform-origin:0 0;overflow:visible}.shape-text[data-v-b13f8fa8]{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;padding:10px;line-height:1.2;word-break:break-word}.shape-text.top[data-v-b13f8fa8]{justify-content:flex-start}.shape-text.middle[data-v-b13f8fa8]{justify-content:center}.shape-text.bottom[data-v-b13f8fa8]{justify-content:flex-end}.base-element-line[data-v-443e2f82]{position:absolute}.element-content[data-v-443e2f82]{width:100%;height:100%;position:relative}.element-content svg[data-v-443e2f82]{transform-origin:0 0;overflow:visible}.base-element-chart[data-v-7c03d68d]{position:absolute}.element-content[data-v-7c03d68d],.rotate-wrapper[data-v-7c03d68d]{width:100%;height:100%}.static-table[data-v-5d949d4d],table[data-v-5d949d4d]{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}table[data-v-5d949d4d]{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0;border:0;word-wrap:break-word;--themeColor:$themeColor;--subThemeColor1:$themeColor;--subThemeColor2:$themeColor}table.theme[data-v-5d949d4d]{background-color:#fff}table.theme tr:nth-child(2n) .cell[data-v-5d949d4d]{background-color:var(--subThemeColor1)}table.theme tr:nth-child(odd) .cell[data-v-5d949d4d]{background-color:var(--subThemeColor2)}table.theme.col-footer tr .cell[data-v-5d949d4d]:last-child,table.theme.col-header tr .cell[data-v-5d949d4d]:first-child,table.theme.row-footer tr:last-child .cell[data-v-5d949d4d],table.theme.row-header tr:first-child .cell[data-v-5d949d4d]{background-color:var(--themeColor)}table .cell[data-v-5d949d4d]{position:relative;white-space:normal;word-wrap:break-word;vertical-align:middle;background-clip:padding-box}table .cell-text[data-v-5d949d4d]{padding:5px;line-height:1.5}.base-element-table[data-v-3eff7eba]{position:absolute}.rotate-wrapper[data-v-3eff7eba]{width:100%;height:100%}.element-content[data-v-3eff7eba]{width:100%;height:100%;position:relative}.base-element-latex[data-v-1587280d]{position:absolute}.rotate-wrapper[data-v-1587280d]{width:100%;height:100%}.element-content[data-v-1587280d]{width:100%;height:100%;position:relative}.element-content svg[data-v-1587280d]{transform-origin:0 0;overflow:visible}.base-element-video[data-v-09436dde]{position:absolute}.rotate-wrapper[data-v-09436dde]{width:100%;height:100%}.element-content[data-v-09436dde]{width:100%;height:100%;background-color:#000;background-position:50%;background-size:contain;background-repeat:no-repeat;display:flex;justify-content:center;align-items:center}.icon[data-v-09436dde]{font-size:140px;color:#aaa}.base-element-audio[data-v-5da834d7]{position:absolute}.rotate-wrapper[data-v-5da834d7]{width:100%;height:100%}.element-content[data-v-5da834d7]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.audio-icon[data-v-5da834d7]{cursor:move}.thumbnail-slide[data-v-43dcaa52]{background-color:#fff;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none}.elements[data-v-43dcaa52]{transform-origin:0 0}.background[data-v-43dcaa52]{width:100%;height:100%;background-position:50%;position:absolute}.placeholder[data-v-43dcaa52]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.tabs[data-v-5e3d7626]{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:1}.tabs[data-v-5e3d7626]:not(.card){font-size:13px;align-items:center;justify-content:flex-start;border-bottom:1px solid #eee}.tabs:not(.card).space-around[data-v-5e3d7626]{justify-content:space-around}.tabs:not(.card).space-between[data-v-5e3d7626]{justify-content:space-between}.tabs:not(.card) .tab[data-v-5e3d7626]{text-align:center;border-bottom:2px solid transparent;padding:8px 10px;cursor:pointer}.tabs:not(.card) .tab.active[data-v-5e3d7626]{border-bottom:2px solid var(--color,#d14424)}.tabs.card[data-v-5e3d7626]{height:40px;font-size:12px;flex-shrink:0}.tabs.card .tab[data-v-5e3d7626]{flex:1;display:flex;justify-content:center;align-items:center;background-color:#f9f9f9;border-bottom:1px solid #eee;cursor:pointer}.tabs.card .tab.active[data-v-5e3d7626]{background-color:transparent;border-bottom-color:transparent}.tabs.card .tab+.tab[data-v-5e3d7626]{border-left:1px solid #eee}.button[data-v-52c90330]{height:32px;line-height:32px;outline:0;font-size:13px;padding:0 15px;text-align:center;color:#41464b;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;user-select:none;letter-spacing:1px;cursor:pointer}.button.small[data-v-52c90330]{height:24px;line-height:24px;padding:0 7px;letter-spacing:0}.button.default[data-v-52c90330]{background-color:#fff;border:1px solid #d9d9d9;color:#41464b}.button.default[data-v-52c90330]:hover{color:#d14424;border-color:#d14424}.button.primary[data-v-52c90330]{background-color:#d14424;border:1px solid #d14424;color:#fff}.button.primary[data-v-52c90330]:hover{background-color:#de6949;border-color:#de6949}.button.checkbox[data-v-52c90330],.button.radio[data-v-52c90330]{background-color:#fff;border:1px solid #d9d9d9;color:#41464b}.button.checkbox[data-v-52c90330]:not(.checked):hover,.button.radio[data-v-52c90330]:not(.checked):hover{color:#d14424}.button.checked[data-v-52c90330]{color:#fff;background-color:#d14424;border-color:#d14424}.button.checked[data-v-52c90330]:hover{background-color:#de6949;border-color:#de6949}.button.disabled[data-v-52c90330]{background-color:#f5f5f5;border:1px solid #d9d9d9;color:#b7b7b7;cursor:default}.select[data-v-5bf3b141]{width:100%;height:32px;padding-right:32px;border-radius:2px;transition:border-color .25s;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:#fff;border:1px solid #d9d9d9;position:relative;cursor:pointer}.select[data-v-5bf3b141]:not(.disabled):hover{border-color:#d14424}.select.disabled[data-v-5bf3b141]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7;cursor:default}.select .selector[data-v-5bf3b141]{min-width:50px;height:30px;line-height:30px;padding-left:10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.options[data-v-5bf3b141]{max-height:260px;padding:5px;overflow:auto;text-align:left;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.option[data-v-5bf3b141]{height:32px;line-height:32px;padding:0 5px;border-radius:2px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.option.disabled[data-v-5bf3b141]{color:#b7b7b7;cursor:default}.option[data-v-5bf3b141]:not(.disabled,.selected):hover{background-color:hsla(0,0%,40%,.05)}.option.selected[data-v-5bf3b141]{background-color:rgba(209,68,36,.05)}.icon[data-v-5bf3b141]{width:32px;height:30px;color:#bfbfbf;position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:center}.link-dialog[data-v-cc39ee16]{font-size:13px;line-height:1.675}.input[data-v-cc39ee16]{width:100%;height:32px}.preview[data-v-cc39ee16]{margin-top:12px}.thumbnail[data-v-cc39ee16]{border:1px solid rgba(209,68,36,.15);margin-top:5px}.btns[data-v-cc39ee16]{margin-top:20px;text-align:right}.mask[data-v-fea8edcc],.modal[data-v-fea8edcc]{top:0;left:0;width:100%;height:100%;z-index:5000}.modal[data-v-fea8edcc]{position:fixed;display:flex;justify-content:center;align-items:center;outline:0;border:0}.mask[data-v-fea8edcc]{position:absolute;background:rgba(0,0,0,.25)}.modal-content[data-v-fea8edcc]{z-index:5001;padding:20px;background:#fff;border-radius:2px;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.2);position:relative}.close-btn[data-v-fea8edcc]{width:20px;height:20px;display:flex;justify-content:center;align-items:center;position:absolute;top:16px;right:16px;cursor:pointer}.modal-fade-enter-active[data-v-fea8edcc]{animation:modal-fade-enter-fea8edcc .25s ease-in both}.modal-fade-leave-active[data-v-fea8edcc]{animation:modal-fade-leave-fea8edcc .25s ease-out both}.modal-zoom-enter-active[data-v-fea8edcc]{animation:modal-zoom-enter-fea8edcc .25s cubic-bezier(.4,0,0,1.5) both}.modal-zoom-leave-active[data-v-fea8edcc]{animation:modal-zoom-leave-fea8edcc .25s both}@keyframes modal-fade-enter-fea8edcc{0%{opacity:0}}@keyframes modal-fade-leave-fea8edcc{to{opacity:0}}@keyframes modal-zoom-enter-fea8edcc{0%{transform:scale3d(.3,.3,.3)}}@keyframes modal-zoom-leave-fea8edcc{to{transform:scale3d(.3,.3,.3)}}.canvas[data-v-5294a048]{height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden;background-color:#f9f9f9;position:relative}.drag-mask[data-v-5294a048]{cursor:grab;position:absolute;top:0;right:0;bottom:0;left:0}.viewport-wrapper[data-v-5294a048]{position:absolute;box-shadow:0 0 15px 0 rgba(0,0,0,.1)}.viewport[data-v-5294a048]{position:absolute;top:0;left:0;transform-origin:0 0}.shape-item-thumbnail[data-v-8603ad34]{position:relative;cursor:pointer}.shape-content[data-v-8603ad34]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center}.shape-content:hover .shape-path[data-v-8603ad34]:not(.outlined){stroke:#d14424}.shape-content:hover .shape-path.outlined[data-v-8603ad34]{fill:#d14424}.shape-content svg[data-v-8603ad34]:not(:root){overflow:visible}.shape-pool[data-v-8b994b42]{width:340px;max-height:520px;overflow:auto;margin-top:-12px;margin-bottom:-12px;margin-right:-12px;padding-right:12px;padding-top:12px}.category-name[data-v-8b994b42]{width:100%;font-size:13px;margin-bottom:10px;border-left:4px solid #aaa;background-color:#eee;padding:2px 0 2px 10px}.shape-list[data-v-8b994b42]{display:flex;flex-wrap:wrap;align-content:flex-start;margin-bottom:10px}.shape-item[data-v-8b994b42]{width:8%;margin-bottom:2.22222%;height:0;padding-bottom:8%;flex-shrink:0}.shape-item[data-v-8b994b42]:not(:nth-child(10n)){margin-right:2.22222%}.line-pool[data-v-554824b6]{width:220px;overflow:auto;margin-bottom:-12px;margin-right:-12px;padding-right:12px}.category-name[data-v-554824b6]{width:100%;font-size:13px;margin-bottom:10px;border-left:4px solid #aaa;background-color:#eee;padding:2px 0 2px 10px}.line-list[data-v-554824b6]{display:flex;flex-wrap:wrap;align-content:flex-start;margin-bottom:10px}.line-item[data-v-554824b6]{width:19%;margin-bottom:1.25%;height:0;padding-bottom:19%;flex-shrink:0;position:relative;cursor:pointer}.line-item[data-v-554824b6]:not(:nth-child(5n)){margin-right:1.25%}.line-content[data-v-554824b6]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;color:#999}.line-content[data-v-554824b6]:hover{color:#d14424}.line-content svg[data-v-554824b6]:not(:root){overflow:visible}.chart-pool[data-v-398f5699]{width:200px;margin-bottom:-5px;display:flex;flex-wrap:wrap;align-content:flex-start}.chart-item[data-v-398f5699]{width:19%;margin-bottom:1.25%;height:0;padding-bottom:19%;flex-shrink:0;position:relative;cursor:pointer}.chart-item[data-v-398f5699]:not(:nth-child(5n)){margin-right:1.25%}.chart-content[data-v-398f5699]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;color:#999}.chart-content[data-v-398f5699]:hover{color:#d14424}.number-input[data-v-268948c2]{background-color:#fff;border:1px solid #d9d9d9;padding:0 0 0 5px;border-radius:2px;transition:border-color .25s;font-size:13px;display:inline-flex}.number-input .input-wrap[data-v-268948c2]{flex:1;color:#41464b;padding:0 0 0 5px;position:relative}.number-input:not(.disabled) .input-wrap:hover .handlers[data-v-268948c2]{opacity:1}.number-input .handlers[data-v-268948c2]{width:20px;position:absolute;top:0;bottom:0;right:0;display:flex;flex-direction:column;font-size:6px;color:#999;opacity:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:opacity .25s}.number-input .handlers .handler[data-v-268948c2]{width:100%;height:50%;display:flex;justify-content:center;align-items:center;border-left:1px solid #d9d9d9;cursor:pointer}.number-input .handlers .handler+.handler[data-v-268948c2]{border-top:1px solid #d9d9d9}.number-input .handlers .handler[data-v-268948c2]:hover{color:#d14424}.number-input input[data-v-268948c2]{width:100%;min-width:0;padding:0;height:30px;line-height:30px;outline:0;border:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.number-input input[data-v-268948c2]::-moz-placeholder{color:#bfbfbf}.number-input input[data-v-268948c2]::placeholder{color:#bfbfbf}.number-input.focused[data-v-268948c2],.number-input[data-v-268948c2]:not(.disabled):hover{border-color:#d14424}.number-input.disabled[data-v-268948c2]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7}.number-input .prefix[data-v-268948c2],.number-input .suffix[data-v-268948c2]{display:flex;justify-content:center;align-items:center;line-height:30px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.table-generator[data-v-372c6730]{width:100%;margin-top:-12px}.title[data-v-372c6730]{height:28px;line-height:28px;background-color:#ededed;margin:0 -12px 12px -12px;padding:0 14px;font-size:12px;display:flex;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;user-select:none}.title .right[data-v-372c6730]{cursor:pointer}.title .right[data-v-372c6730]:hover{color:#d14424}table[data-v-372c6730]{border-collapse:separate}td[data-v-372c6730]{width:23px;height:23px;line-height:23px;border:2px solid #fff;background-color:#f7f7f7}.cell[data-v-372c6730]{width:100%;height:100%;border:1px solid #dcdcdc}.cell.active[data-v-372c6730]{background-color:rgba(209,68,36,.1);border-color:#d14424}.custom[data-v-372c6730]{width:230px}.custom .row[data-v-372c6730]{display:flex;align-items:center}.custom .row+.row[data-v-372c6730]{margin-top:10px}.btns[data-v-372c6730]{margin-top:10px;text-align:right}.btns .btn[data-v-372c6730]{margin-left:10px}.media-input[data-v-35a1214c]{width:480px}.btns[data-v-35a1214c]{margin-top:10px;text-align:right}svg[data-v-567417d3]{overflow:hidden}.textarea[data-v-65d72404]{outline:0;width:100%;background-color:#fff;border:1px solid #d9d9d9;border-radius:2px;padding:10px;transition:border-color .25s;box-sizing:border-box;line-height:1.675;resize:none;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.textarea[data-v-65d72404]:focus{border-color:#d14424;background-color:#fff}.textarea.resizable[data-v-65d72404]{resize:vertical}.textarea.disabled[data-v-65d72404]{background-color:#f5f5f5;border-color:#dcdcdc;color:#b7b7b7}.textarea[data-v-65d72404]::-moz-placeholder{color:#bfbfbf}.textarea[data-v-65d72404]::placeholder{color:#bfbfbf}.latex-editor[data-v-49a14edf]{height:560px}.container[data-v-49a14edf]{height:calc(100% - 50px);display:flex}.left[data-v-49a14edf]{width:540px;height:100%;display:flex;flex-direction:column;flex-shrink:0}.input-area[data-v-49a14edf]{flex:1}.input-area textarea[data-v-49a14edf]{height:100%!important;border-color:#eee!important;padding:10px!important}.input-area textarea[data-v-49a14edf]:focus{box-shadow:none!important}.preview[data-v-49a14edf]{height:160px;display:flex;justify-content:center;align-items:center;text-align:center;margin-top:20px;border:1px solid #eee;-webkit-user-select:none;-moz-user-select:none;user-select:none}.placeholder[data-v-49a14edf]{color:#888;font-size:13px}.preview-content[data-v-49a14edf]{width:100%;height:100%;padding:10px;display:flex;justify-content:center;align-items:center}.right[data-v-49a14edf]{width:280px;height:100%;margin-left:20px;border:1px solid #eee;background-color:#fff;display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;user-select:none}.content[data-v-49a14edf]{height:calc(100% - 40px);font-size:13px}.formula[data-v-49a14edf]{height:100%;padding:12px;overflow:auto;overflow:overlay}.formula-item+.formula-item[data-v-49a14edf]{margin-top:10px}.formula-item .formula-title[data-v-49a14edf]{margin-bottom:5px}.formula-item .formula-item-content[data-v-49a14edf]{height:60px;padding:5px;display:flex;align-items:center;background-color:#f9f9f9;cursor:pointer}.symbol[data-v-49a14edf]{height:100%;display:flex;flex-direction:column}.symbol-pool[data-v-49a14edf]{display:flex;flex-wrap:wrap;flex:1;padding:12px;overflow:auto;overflow:overlay}.symbol-item[data-v-49a14edf]{display:flex;justify-content:center;align-items:center}.symbol-item[data-v-49a14edf]:hover{background-color:#f9f9f9;cursor:pointer}.footer[data-v-49a14edf]{height:50px;display:flex;justify-content:flex-end;align-items:flex-end}.footer .btn[data-v-49a14edf]{margin-left:10px}.canvas-tool[data-v-7e81f183]{position:relative;border-bottom:1px solid #eee;background-color:#fff;display:flex;justify-content:space-between;padding:0 10px;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.left-handler[data-v-7e81f183]{display:flex;align-items:center}.add-element-handler[data-v-7e81f183]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex}.add-element-handler .handler-item[data-v-7e81f183]{width:32px}.add-element-handler .handler-item[data-v-7e81f183]:not(.group-btn):hover{background-color:#f1f1f1}.add-element-handler .handler-item.active[data-v-7e81f183]{color:#d14424}.add-element-handler .handler-item.group-btn[data-v-7e81f183]{width:auto;margin-right:4px}.add-element-handler .handler-item.group-btn[data-v-7e81f183]:hover{background-color:#f3f3f3}.add-element-handler .handler-item.group-btn .arrow[data-v-7e81f183],.add-element-handler .handler-item.group-btn .icon[data-v-7e81f183]{height:100%;display:flex;justify-content:center;align-items:center}.add-element-handler .handler-item.group-btn .icon[data-v-7e81f183]{width:26px;padding:0 2px}.add-element-handler .handler-item.group-btn .icon[data-v-7e81f183]:hover{background-color:#e9e9e9}.add-element-handler .handler-item.group-btn .icon.active[data-v-7e81f183]{color:#d14424}.add-element-handler .handler-item.group-btn .arrow[data-v-7e81f183]{font-size:12px}.add-element-handler .handler-item.group-btn .arrow[data-v-7e81f183]:hover{background-color:#e9e9e9}.handler-item[data-v-7e81f183]{height:24px;font-size:14px;margin:0 2px;display:flex;justify-content:center;align-items:center;border-radius:2px;overflow:hidden;cursor:pointer}.handler-item.disable[data-v-7e81f183]{opacity:.5}.left-handler .handler-item[data-v-7e81f183],.right-handler .handler-item[data-v-7e81f183]{padding:0 8px}.left-handler .handler-item.active[data-v-7e81f183],.left-handler .handler-item[data-v-7e81f183]:not(.disable):hover,.right-handler .handler-item.active[data-v-7e81f183],.right-handler .handler-item[data-v-7e81f183]:not(.disable):hover{background-color:#f1f1f1}.right-handler[data-v-7e81f183]{display:flex;align-items:center}.right-handler .text[data-v-7e81f183]{display:inline-block;width:40px;text-align:center;cursor:pointer}.right-handler .viewport-size[data-v-7e81f183]{font-size:13px}@media screen and (width <= 1024px){.text[data-v-7e81f183]{display:none}}@media screen and (width <= 1000px){.left-handler[data-v-7e81f183],.right-handler[data-v-7e81f183]{display:none}}.layout-pool[data-v-8ee3e590]{width:394px;height:500px;padding:2px;margin-right:-12px;padding-right:12px;overflow:auto;display:flex;flex-wrap:wrap;align-content:flex-start}.layout-item[data-v-8ee3e590]{width:48%;margin-bottom:4%}.layout-item[data-v-8ee3e590]:not(:nth-child(2n)){margin-right:4%}.layout-item[data-v-8ee3e590]:last-child,.layout-item[data-v-8ee3e590]:nth-last-child(2){margin-bottom:0}.layout-item .thumbnail[data-v-8ee3e590]{outline:1px solid #eee;cursor:pointer}.layout-item .thumbnail[data-v-8ee3e590]:hover{outline-color:#d14424}.thumbnails[data-v-0dbead61]{border-right:1px solid #eee;background-color:#fff;display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;user-select:none}.add-slide[data-v-0dbead61]{height:40px;font-size:12px;display:flex;flex-shrink:0;border-bottom:1px solid #eee;cursor:pointer}.add-slide .btn[data-v-0dbead61]{flex:1;display:flex;justify-content:center;align-items:center}.add-slide .btn[data-v-0dbead61]:hover{background-color:#f9f9f9}.add-slide .select-btn[data-v-0dbead61]{width:30px;height:100%;display:flex;justify-content:center;align-items:center;border-left:1px solid #eee}.add-slide .select-btn[data-v-0dbead61]:hover{background-color:#f9f9f9}.add-slide .icon[data-v-0dbead61]{margin-right:3px;font-size:14px}.thumbnail-list[data-v-0dbead61]{padding:5px 0;flex:1;overflow:auto}.thumbnail-item[data-v-0dbead61]{display:flex;justify-content:center;align-items:center;padding:5px 0}.thumbnail-item .thumbnail[data-v-0dbead61]{outline:2px solid rgba(209,68,36,.15)}.thumbnail-item.active .label[data-v-0dbead61]{color:#d14424}.thumbnail-item.active .thumbnail[data-v-0dbead61],.thumbnail-item.selected .thumbnail[data-v-0dbead61]{outline-color:#d14424}.label[data-v-0dbead61]{font-size:12px;color:#999;width:20px;cursor:grab}.label.offset-left[data-v-0dbead61]{position:relative;left:-4px}.label[data-v-0dbead61]:active{cursor:grabbing}.page-number[data-v-0dbead61]{height:40px;font-size:12px;border-top:1px solid #eee;line-height:40px;text-align:center;color:#666}.slider[data-v-563bd2a0]{width:100%;height:12px;padding:4px 0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.slider.disabled .track[data-v-563bd2a0]{background-color:#b4b4b4}.slider.disabled .thumb[data-v-563bd2a0]{outline:2px solid #b4b4b4}.slider[data-v-563bd2a0]:not(.disabled){cursor:pointer}.slider:not(.disabled) .bar[data-v-563bd2a0]:hover{background-color:#f0f0f0}.slider:not(.disabled) .track[data-v-563bd2a0]:hover{background-color:#de6949}.slider:not(.disabled) .thumb[data-v-563bd2a0]:active,.slider:not(.disabled) .thumb[data-v-563bd2a0]:hover{outline:4px solid #d14424}.bar[data-v-563bd2a0]{width:calc(100% - 10px);margin-left:5px;height:4px;border-radius:2px;position:relative;background-color:#f5f5f5;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:background-color .2s}.track[data-v-563bd2a0]{position:absolute;top:0;left:0;height:100%;background-color:#d14424;transition:background-color .2s}.thumb[data-v-563bd2a0]{position:absolute;top:50%;left:0;width:10px;height:10px;background-color:#fff;outline:2px solid #d14424;transform:translate(-50%,-50%);border-radius:50%;z-index:100}.thumb[data-v-563bd2a0]:active:after,.thumb[data-v-563bd2a0]:active:before,.thumb[data-v-563bd2a0]:hover:after,.thumb[data-v-563bd2a0]:hover:before{display:block}.thumb[data-v-563bd2a0]:before{content:attr(data-tooltip);min-width:28px;bottom:24px;background-color:#262626;text-align:center;color:#fff;border-radius:2px;padding:6px 5px;font-size:12px}.thumb[data-v-563bd2a0]:after,.thumb[data-v-563bd2a0]:before{display:none;position:absolute;left:50%;transform:translateX(-50%)}.thumb[data-v-563bd2a0]:after{content:"";bottom:15px;border:5px solid transparent;border-top-color:#262626}.row[data-v-03715c20]{width:100%;display:flex;align-items:center;margin-bottom:10px}.color-btn[data-v-7fa73bdc]{width:100%;display:flex!important;align-items:center;justify-content:center;padding:0!important}.color-block[data-v-7fa73bdc]{height:20px;margin-left:8px;flex:1;outline:1px dashed hsla(0,0%,40%,.12);background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAEBJREFUOE9jfPbs2X8GIoCkpCQRqhgYGEcNxBlOo2GIM2iGQLL5//8/UTnl+fPnxOWUUQNxhtNoGOLOKYM+2QAAh2Nq10DwkukAAAAASUVORK5CYII=)}.content[data-v-7fa73bdc]{width:100%;height:100%}.color-btn-icon[data-v-7fa73bdc]{width:32px;font-size:13px;color:#bfbfbf}.checkerboard[data-v-fa191ace]{background-size:contain}.alpha-checkboard-wrap[data-v-84628bc8],.alpha[data-v-84628bc8],.checkerboard[data-v-fa191ace]{position:absolute;top:0;right:0;bottom:0;left:0}.alpha-checkboard-wrap[data-v-84628bc8]{overflow:hidden}.alpha-gradient[data-v-84628bc8]{position:absolute;top:0;right:0;bottom:0;left:0}.alpha-container[data-v-84628bc8]{cursor:pointer;position:relative;z-index:2;height:100%;margin:0 3px}.alpha-pointer[data-v-84628bc8]{z-index:2;position:absolute}.alpha-picker[data-v-84628bc8]{cursor:pointer;width:4px;height:8px;box-shadow:0 0 2px rgba(0,0,0,.6);background:#fff;margin-top:1px;transform:translateX(-2px)}.hue[data-v-5711e710]{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);position:absolute;top:0;right:0;bottom:0;left:0}.hue-container[data-v-5711e710]{cursor:pointer;margin:0 2px;position:relative;height:100%}.hue-pointer[data-v-5711e710]{z-index:2;position:absolute;top:0}.hue-picker[data-v-5711e710]{cursor:pointer;margin-top:1px;width:4px;height:8px;box-shadow:0 0 2px rgba(0,0,0,.6);background:#fff;transform:translateX(-2px)}.saturation-black[data-v-c79c0446],.saturation-white[data-v-c79c0446],.saturation[data-v-c79c0446]{position:absolute;top:0;right:0;bottom:0;left:0;cursor:pointer}.saturation-white[data-v-c79c0446]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-c79c0446]{background:linear-gradient(0deg,#000,transparent)}.saturation-pointer[data-v-c79c0446]{cursor:pointer;position:absolute}.saturation-circle[data-v-c79c0446]{width:4px;height:4px;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);border-radius:50%;transform:translate(-2px,-2px)}.editable-input[data-v-65e2913c]{width:100%;position:relative;overflow:hidden;text-align:center;font-size:14px}.editable-input[data-v-65e2913c]:after{content:"#";position:absolute;left:0;top:50%;transform:translateY(-50%);color:#999}.input-content[data-v-65e2913c]{width:100%;padding:3px;border:0;border-bottom:1px solid #ddd;outline:none;text-align:center}.input-label[data-v-65e2913c]{text-transform:capitalize}.color-picker[data-v-fec0b01a]{position:relative;width:240px;background:#fff;-webkit-user-select:none;-moz-user-select:none;user-select:none;margin-bottom:-10px}.picker-saturation-wrap[data-v-fec0b01a]{width:100%;padding-bottom:50%;position:relative;overflow:hidden}.picker-controls[data-v-fec0b01a]{display:flex}.picker-sliders[data-v-fec0b01a]{padding:4px 0;flex:1}.picker-hue-wrap[data-v-fec0b01a]{position:relative;height:10px}.picker-alpha-wrap[data-v-fec0b01a]{position:relative;height:10px;margin-top:4px;overflow:hidden}.picker-color-wrap[data-v-fec0b01a]{width:24px;height:24px;position:relative;margin-top:4px;margin-right:4px;outline:1px dashed hsla(0,0%,40%,.12)}.picker-color-wrap .checkerboard[data-v-fec0b01a]{background-size:auto}.picker-current-color[data-v-fec0b01a]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2}.picker-field[data-v-fec0b01a]{display:flex;margin-bottom:8px}.picker-field .transparent[data-v-fec0b01a]{width:24px;height:24px;margin-top:4px;margin-left:8px;position:relative;cursor:pointer}.picker-field .transparent[data-v-fec0b01a]:after{content:"";width:26px;height:2px;position:absolute;top:11px;left:-1px;transform:rotate(-45deg);background-color:red}.picker-field .transparent .checkerboard[data-v-fec0b01a]{background-size:auto}.picker-field .straw[data-v-fec0b01a]{width:24px;height:24px;margin-top:4px;margin-left:8px;display:flex;justify-content:center;align-items:center;font-size:20px;background-color:#f5f5f5;outline:1px solid #f1f1f1;cursor:pointer}.picker-field .input[data-v-fec0b01a]{flex:1}.picker-presets[data-v-fec0b01a]{display:flex;flex-wrap:wrap;align-content:flex-start}.picker-presets-color[data-v-fec0b01a]{width:7%;margin-bottom:3.33333%;height:0;padding-bottom:7%;flex-shrink:0;position:relative;cursor:pointer}.picker-presets-color[data-v-fec0b01a]:not(:nth-child(10n)){margin-right:3.33333%}.picker-presets-color.alpha[data-v-fec0b01a]{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADBJREFUOE9jfPbs2X8GPEBSUhKfNAPjqAHDIgz+//+PNx08f/4cfzoYNYCBceiHAQC5flV5JzgrxQAAAABJRU5ErkJggg==)}.picker-presets-color-content[data-v-fec0b01a]{position:absolute;top:0;right:0;bottom:0;left:0}.picker-gradient-presets[data-v-fec0b01a]{display:flex;flex-wrap:wrap;align-content:flex-start}.picker-gradient-col[data-v-fec0b01a]{width:7%;margin-bottom:3.33333%;display:flex;flex-direction:column}.picker-gradient-col[data-v-fec0b01a]:not(:nth-child(10n)){margin-right:3.33333%}.picker-gradient-color[data-v-fec0b01a]{width:100%;height:16px;position:relative;cursor:pointer}.recent-colors-title[data-v-fec0b01a]{font-size:12px;margin-bottom:4px}.switch[data-v-0566b060]{height:20px;display:inline-block;cursor:pointer}.switch:not(.disabled).active .switch-core[data-v-0566b060]{border-color:#d14424;background-color:#d14424}.switch:not(.disabled).active .switch-core[data-v-0566b060]:after{left:100%;margin-left:-17px}.switch.disabled[data-v-0566b060]{cursor:default}.switch.disabled .switch-core[data-v-0566b060]:after{background-color:#f5f5f5}.switch-core[data-v-0566b060]{margin:0;display:inline-block;position:relative;width:40px;height:20px;border:1px solid #d9d9d9;outline:none;border-radius:10px;box-sizing:border-box;background:#d9d9d9;transition:border-color .3s,background-color .3s;vertical-align:middle}.switch-core[data-v-0566b060]:after{content:"";position:absolute;top:1px;left:1px;border-radius:100%;transition:all .3s;width:16px;height:16px;background-color:#fff}.row[data-v-18fbbd33]{width:100%;height:30px;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-18fbbd33]{text-align:right}.row[data-v-3a267bbc]{width:100%;height:30px;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-3a267bbc]{text-align:right}.text-color-btn[data-v-37449800]{width:100%;display:flex!important;flex-direction:column;justify-content:center;align-items:center;padding:0}.text-color-block[data-v-37449800]{width:17px;height:4px;margin-top:1px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAACdJREFUGFdjfPbs2X8GBgYGSUlJEMXAiCHw//9/sIrnz59DVKALAADNxxVfaiODNQAAAABJRU5ErkJggg==)}.text-color-block .text-color-block-content[data-v-37449800]{width:100%;height:100%}.button-group[data-v-4db942e2]{display:flex;align-items:center}.button-group[data-v-4db942e2] button.button{border-radius:0;border-left-width:1px;border-right-width:0;display:inline-block}.button-group[data-v-4db942e2]:not(.passive) button.button:not(:last-child,.radio,.checkbox):hover{position:relative}.button-group[data-v-4db942e2]:not(.passive) button.button:not(:last-child,.radio,.checkbox):hover:after{content:"";width:1px;height:calc(100% + 2px);background-color:#d14424;position:absolute;top:-1px;right:-1px}.button-group[data-v-4db942e2]:not(.passive) button.button:first-child{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left-width:1px}.button-group[data-v-4db942e2]:not(.passive) button.button:last-child{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right-width:1px}.button-group.passive[data-v-4db942e2] button.button:not(.last,.radio,.checkbox):hover{position:relative}.button-group.passive[data-v-4db942e2] button.button:not(.last,.radio,.checkbox):hover:after{content:"";width:1px;height:calc(100% + 2px);background-color:#d14424;position:absolute;top:-1px;right:-1px}.button-group.passive[data-v-4db942e2] button.button.first{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left-width:1px}.button-group.passive[data-v-4db942e2] button.button.last{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right-width:1px}.select-group[data-v-d2acb09c]{display:flex;align-items:center}.select-group[data-v-d2acb09c] .select-wrap .select{border-radius:0;border-left-width:0;border-right-width:0}.select-group[data-v-d2acb09c] .select-wrap+.select-wrap .select{border-left-width:1px}.select-group[data-v-d2acb09c] .select-wrap:hover+.select-wrap .select{border-left-color:#d14424}.select-group[data-v-d2acb09c] .select-wrap:first-child .select{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left-width:1px}.select-group[data-v-d2acb09c] .select-wrap:last-child .select{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right-width:1px}.text-style-panel[data-v-4cf37a85]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-4cf37a85]{width:100%;display:flex;align-items:center;margin-bottom:10px}.preset-style[data-v-4cf37a85]{display:flex;flex-wrap:wrap;margin-bottom:10px}.preset-style-item[data-v-4cf37a85]{width:50%;height:50px;border:1px solid #d6d6d6;box-sizing:border-box;display:flex;justify-content:center;align-items:center;position:relative;cursor:pointer;transition:all .2s}.preset-style-item[data-v-4cf37a85]:hover{border-color:#d14424;color:#d14424;z-index:1}.preset-style-item[data-v-4cf37a85]:nth-child(2n){margin-left:-1px}.preset-style-item[data-v-4cf37a85]:nth-child(n+3){margin-top:-1px}.font-size-btn[data-v-4cf37a85]{padding:0}.link-popover[data-v-4cf37a85]{width:240px}.link-popover .btns[data-v-4cf37a85]{margin-top:10px;text-align:right}.list-wrap[data-v-4cf37a85]{width:176px;color:#666;padding:8px;margin:-12px;display:flex;flex-wrap:wrap;align-content:flex-start}.list[data-v-4cf37a85]{background-color:#f9f9f9;padding:4px 4px 4px 20px;cursor:pointer}.list[data-v-4cf37a85]:not(:nth-child(3n)){margin-right:8px}.list[data-v-4cf37a85]:nth-child(4),.list[data-v-4cf37a85]:nth-child(5),.list[data-v-4cf37a85]:nth-child(6){margin-top:8px}.list[data-v-4cf37a85]:hover{color:#d14424}.list:hover span[data-v-4cf37a85]{background-color:#d14424}.list-item[data-v-4cf37a85]{width:24px;height:12px;position:relative;font-size:12px;top:-5px}.list-item span[data-v-4cf37a85]{width:100%;height:2px;display:inline-block;position:absolute;top:10px;background-color:#666}.popover-btn[data-v-4cf37a85]{padding:0 3px}.row[data-v-2c8acf3c],.row[data-v-7571b056]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-2c8acf3c]{text-align:right}.filter[data-v-2c8acf3c]{font-size:12px}.filter-item[data-v-2c8acf3c]{padding:6px 0;display:flex;justify-content:center;align-items:center}.filter-item .name[data-v-2c8acf3c]{width:60px}.filter-item .filter-slider[data-v-2c8acf3c]{flex:1;margin:0 6px}.row[data-v-0ae0ff99]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-0ae0ff99]{text-align:right}.row[data-v-080b6de7]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-wrapper[data-v-080b6de7]{text-align:right}.origin-image[data-v-080b6de7]{height:100px;background-size:contain;background-repeat:no-repeat;background-position:50%;background-color:#f9f9f9;margin-bottom:10px}.full-width-btn[data-v-080b6de7]{width:100%;margin-bottom:10px}.btn-icon[data-v-080b6de7]{margin-right:3px}.clip[data-v-080b6de7]{width:260px;font-size:12px}.clip .title[data-v-080b6de7]{margin-bottom:5px}.shape-clip[data-v-080b6de7]{margin-bottom:10px;display:flex;flex-wrap:wrap;align-content:flex-start}.shape-clip-item[data-v-080b6de7]{display:flex;justify-content:center;align-items:center;cursor:pointer;width:16%;margin-bottom:5%}.shape-clip-item[data-v-080b6de7]:not(:nth-child(5n)){margin-right:5%}.shape-clip-item:hover .shape[data-v-080b6de7]{background-color:#ccc}.shape-clip-item .shape[data-v-080b6de7]{width:40px;height:40px;background-color:#e1e1e1}.popover-btn[data-v-080b6de7]{padding:0 3px}.shape-style-panel[data-v-0674f2cf]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-0674f2cf]{width:100%;display:flex;align-items:center;margin-bottom:10px}.font-size-btn[data-v-0674f2cf]{padding:0}.title[data-v-0674f2cf]{display:flex;justify-content:space-between;margin-bottom:10px}.shape-pool[data-v-0674f2cf]{width:235px;height:150px;overflow:auto;padding:5px;padding-right:10px;border:1px solid #eee;margin-bottom:20px}.shape-list[data-v-0674f2cf]{display:flex;flex-wrap:wrap;align-content:flex-start}.shape-item[data-v-0674f2cf]{width:14%;margin-bottom:3.2%;height:0;padding-bottom:14%;flex-shrink:0}.shape-item[data-v-0674f2cf]:not(:nth-child(6n)){margin-right:3.2%}.row[data-v-ae80032c]{width:100%;display:flex;align-items:center;margin-bottom:10px}.line-btn[data-v-ae80032c]{display:flex;align-items:center;justify-content:space-between;padding:0!important}.line-btn .line-wrapper[data-v-ae80032c]{margin-left:8px}.line-wrapper[data-v-ae80032c]{overflow:visible}.line-btn-icon[data-v-ae80032c]{width:30px;font-size:12px;margin-top:2px;color:#bfbfbf}.preset-point-style[data-v-ae80032c]{padding:0 10px}.preset-point-style+.preset-point-style[data-v-ae80032c]{margin-top:10px}.chart-data-editor[data-v-f7b59928]{width:600px;position:relative}.editor-content[data-v-f7b59928]{width:100%;height:360px;position:relative;border-right:1px solid #ccc;border-bottom:1px solid #ccc;overflow:auto;overflow:overlay}.range-box[data-v-f7b59928]{position:absolute;top:0;left:0;z-index:100;-webkit-user-select:none;-moz-user-select:none;user-select:none}.temp-range[data-v-f7b59928]{width:0;height:0;position:absolute;top:0;left:0;background-color:hsla(0,0%,53%,.3)}.range-line[data-v-f7b59928]{width:0;height:0;position:absolute;left:0;top:0;border:0 solid #d14424}.range-line.t[data-v-f7b59928]{border-top-width:1px}.range-line.b[data-v-f7b59928]{border-bottom-width:1px}.range-line.l[data-v-f7b59928]{border-left-width:1px}.range-line.r[data-v-f7b59928]{border-right-width:1px}.resizable[data-v-f7b59928]{position:absolute;width:12px;height:12px;left:0;top:0;margin:-9px 0 0 -9px;cursor:nwse-resize}.resizable[data-v-f7b59928]:after{content:"";position:absolute;width:4px;height:12px;right:0;top:0;background-color:#d14424}.resizable[data-v-f7b59928]:before{content:"";position:absolute;width:12px;height:4px;right:0;bottom:0;background-color:#d14424}table[data-v-f7b59928]{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;table-layout:fixed}table td[data-v-f7b59928]{text-align:center;border:1px solid #ccc;vertical-align:middle;width:100px;height:32px}table td.head[data-v-f7b59928]{background-color:rgba(209,68,36,.1)}table .item[data-v-f7b59928]{width:100%;height:100%;border:0;outline:0;font-size:13px;text-align:center;background-color:transparent}table .item.selected[data-v-f7b59928]{background-color:rgba(209,68,36,.02)}.btns[data-v-f7b59928]{margin-top:10px;display:flex;justify-content:space-between}.checkbox[data-v-26bf4835]{height:20px;display:flex;align-items:center;cursor:pointer}.checkbox:not(.disabled).checked .checkbox-input[data-v-26bf4835]{background-color:#d14424;border-color:#d14424}.checkbox:not(.disabled).checked .checkbox-input[data-v-26bf4835]:after{transform:rotate(45deg) scaleY(1)}.checkbox:not(.disabled).checked .checkbox-label[data-v-26bf4835]{color:#d14424}.checkbox.disabled[data-v-26bf4835]{color:#b7b7b7;cursor:default}.checkbox.disabled .checkbox-input[data-v-26bf4835]{background-color:#f5f5f5}.checkbox-input[data-v-26bf4835]{display:inline-block;position:relative;border:1px solid #d9d9d9;border-radius:2px;width:16px;height:16px;background-color:#fff;vertical-align:middle;transition:border-color .15s cubic-bezier(.71,-.46,.29,1.46),background-color .15s cubic-bezier(.71,-.46,.29,1.46);z-index:1}.checkbox-input[data-v-26bf4835]:after{content:"";border:2px solid #fff;border-left:0;border-top:0;height:9px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:6px;transition:transform .15s ease-in .05s;transform-origin:center}.checkbox-original[data-v-26bf4835]{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.checkbox-label[data-v-26bf4835]{margin-left:5px;line-height:20px;font-size:13px}.chart-style-panel[data-v-45827db6],.checkbox-label[data-v-26bf4835]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-45827db6]{width:100%;display:flex;align-items:center;margin-bottom:10px}.full-width-btn[data-v-45827db6]{width:100%}.btn-icon[data-v-45827db6]{margin-right:3px}.color-btn-wrap[data-v-45827db6]{position:relative}.delete-color-btn[data-v-45827db6]{position:absolute;width:30px;right:2px;top:2px;bottom:2px;display:flex;justify-content:center;align-items:center;background-color:#fff;cursor:pointer}.preset-themes[data-v-45827db6]{width:250px;margin-bottom:-10px;display:flex;flex-wrap:wrap;align-content:flex-start}.preset-theme[data-v-45827db6]{display:flex;cursor:pointer;width:48%;margin-bottom:4%}.preset-theme[data-v-45827db6]:not(:nth-child(2n)){margin-right:4%}.preset-theme-color[data-v-45827db6]{width:20px;height:20px}.preset-theme-color.select[data-v-45827db6]{transform:scale(1.2);transition:transform .1s}.row[data-v-e5523cbc]{width:100%;display:flex;align-items:center;margin-bottom:10px}.theme-switch[data-v-e5523cbc]{margin-bottom:18px}.switch-wrapper[data-v-e5523cbc]{text-align:right}.set-count[data-v-e5523cbc]{display:flex;justify-content:center;align-items:center}.set-count .btn[data-v-e5523cbc]{padding:0 8px}.set-count .count-text[data-v-e5523cbc]{flex:1;text-align:center;margin:0 8px}.row[data-v-3a5ca316],.row[data-v-b3551c8c]{width:100%;display:flex;align-items:center;margin-bottom:10px}.background-image-wrapper[data-v-b3551c8c],.title[data-v-b3551c8c]{margin-bottom:10px}.background-image[data-v-b3551c8c]{height:0;padding-bottom:56.25%;border:1px dashed #eee;border-radius:2px;position:relative;transition:all .2s}.background-image[data-v-b3551c8c]:hover{border-color:#d14424;color:#d14424}.background-image .content[data-v-b3551c8c]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-position:50%;background-size:contain;background-repeat:no-repeat;cursor:pointer}.switch-row[data-v-b3551c8c]{height:32px}.switch-wrapper[data-v-b3551c8c]{text-align:right}.row[data-v-32517bcf]{width:100%;display:flex;align-items:center;margin-bottom:10px}.switch-row[data-v-32517bcf]{height:32px}.switch-wrapper[data-v-32517bcf]{text-align:right}.row[data-v-80f1bc4e]{width:100%;display:flex;align-items:center;margin-bottom:10px}.font-size-btn[data-v-80f1bc4e]{padding:0}.row[data-v-a2bcea28]{width:100%;display:flex;align-items:center;margin-bottom:10px}.title[data-v-a2bcea28]{margin-bottom:10px}.label[data-v-a2bcea28]{text-align:center}.btn-icon[data-v-a2bcea28]{margin-right:3px}.icon-btn[data-v-a2bcea28]{cursor:pointer}.text-btn[data-v-a2bcea28]{height:30px;line-height:30px;text-align:center;cursor:pointer}.text-btn[data-v-a2bcea28]:hover{background-color:#efefef;border-radius:2px}.element-animation-panel[data-v-5abd2ee4]{height:100%;display:flex;flex-direction:column}.element-animation[data-v-5abd2ee4]{height:32px;display:flex;align-items:center}.element-animation-btn[data-v-5abd2ee4]{width:100%}.config-item[data-v-5abd2ee4]{display:flex;align-items:center}.config-item+.config-item[data-v-5abd2ee4]{margin-top:5px}.tip[data-v-5abd2ee4]{height:32px;display:flex;justify-content:center;align-items:center;font-style:italic}.animation-pool[data-v-5abd2ee4]{width:400px;height:500px;overflow-y:auto;overflow-x:hidden;font-size:12px;margin-right:-10px;padding-right:5px;position:relative}.animation-pool .mask[data-v-5abd2ee4]{position:absolute;top:0;right:0;bottom:0;left:0}.animation-pool.in .type-title[data-v-5abd2ee4]{border-left-color:#68a490;background-color:rgba(104,164,144,.15)}.animation-pool.out .type-title[data-v-5abd2ee4]{border-left-color:#d86344;background-color:rgba(216,99,68,.15)}.animation-pool.attention .type-title[data-v-5abd2ee4]{border-left-color:#e8b76a;background-color:hsla(37,73%,66%,.15)}.pool-type[data-v-5abd2ee4]:not(:last-child){margin-bottom:5px}.type-title[data-v-5abd2ee4]{width:100%;font-size:13px;margin-bottom:10px;border-left:4px solid #aaa;background-color:#eee;padding:4px 0 4px 10px}.pool-item-wrapper[data-v-5abd2ee4]{display:flex;flex-wrap:wrap;align-content:flex-start}.pool-item[data-v-5abd2ee4]{width:24%;margin-bottom:1.33333%;margin-bottom:5px;height:40px;line-height:40px;text-align:center;cursor:pointer}.pool-item[data-v-5abd2ee4]:not(:nth-child(4n)){margin-right:1.33333%}.animation-box[data-v-5abd2ee4]{background-color:#f9f9f9;border-radius:2px}.animation-sequence[data-v-5abd2ee4]{flex:1;padding-right:12px;margin-right:-12px;overflow:auto;overflow:overlay}.sequence-item[data-v-5abd2ee4]{border:1px solid #eee;padding:8px;border-radius:2px;margin-bottom:8px;transition:all .5s}.sequence-item.in.active[data-v-5abd2ee4]{border-color:#68a490}.sequence-item.out.active[data-v-5abd2ee4]{border-color:#d86344}.sequence-item.attention.active[data-v-5abd2ee4]{border-color:#e8b76a}.sequence-item.active[data-v-5abd2ee4]{height:auto}.sequence-item .sequence-content[data-v-5abd2ee4]{display:flex;align-items:center;cursor:grab}.sequence-item .sequence-content[data-v-5abd2ee4]:active{cursor:grabbing}.sequence-item .sequence-content .index[data-v-5abd2ee4]{flex:1}.sequence-item .sequence-content .text[data-v-5abd2ee4]{flex:6}.sequence-item .sequence-content .handler[data-v-5abd2ee4]{flex:2;font-size:15px;text-align:right}.sequence-item .sequence-content .handler-btn[data-v-5abd2ee4]{margin-left:8px;cursor:pointer}.slide-design-panel[data-v-9a96acfa]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.row[data-v-9a96acfa]{width:100%;display:flex;align-items:center;margin-bottom:10px}.title[data-v-9a96acfa]{display:flex;justify-content:space-between;margin-bottom:10px}.title .more[data-v-9a96acfa]{cursor:pointer}.title .more .text[data-v-9a96acfa]{font-size:12px;margin-right:3px}.background-image-wrapper[data-v-9a96acfa]{margin-bottom:10px}.background-image[data-v-9a96acfa]{height:0;padding-bottom:56.25%;border:1px dashed #eee;border-radius:2px;position:relative;transition:all .2s}.background-image[data-v-9a96acfa]:hover{border-color:#d14424;color:#d14424}.background-image .content[data-v-9a96acfa]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-position:50%;background-size:contain;background-repeat:no-repeat;cursor:pointer}.theme-list[data-v-9a96acfa]{display:flex;flex-wrap:wrap;align-content:flex-start}.theme-item[data-v-9a96acfa]{width:48%;margin-bottom:4%;padding-bottom:30%;border-radius:2px;position:relative;cursor:pointer}.theme-item[data-v-9a96acfa]:not(:nth-child(2n)){margin-right:4%}.theme-item .theme-item-content[data-v-9a96acfa]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;justify-content:center;padding:8px;border:1px solid #eee;border-radius:2px}.theme-item .text[data-v-9a96acfa]{font-size:16px}.theme-item .colors[data-v-9a96acfa]{display:flex}.theme-item .color-block[data-v-9a96acfa]{margin-top:8px;width:12px;height:12px;margin-right:2px}.theme-item:hover .btns[data-v-9a96acfa]{display:flex}.theme-item .btns[data-v-9a96acfa]{position:absolute;top:0;right:0;bottom:0;left:0;flex-direction:column;justify-content:center;align-items:center;display:none;background-color:rgba(0,0,0,.25)}.theme-item .btn[data-v-9a96acfa]{width:72px;padding:5px 0;text-align:center;background-color:#d14424;color:#fff;font-size:12px;border-radius:2px}.theme-item .btn[data-v-9a96acfa]:hover{background-color:#de6949}.theme-item .btn+.btn[data-v-9a96acfa]{margin-top:5px}.animation-pool[data-v-0562c530]{display:flex;flex-wrap:wrap;margin-bottom:10px}.animation-item[data-v-0562c530]{width:50%;height:100px;border:1px solid #d6d6d6;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:20px 0 15px 0;position:relative;cursor:pointer}.animation-item.active[data-v-0562c530]{border-color:#d14424;z-index:1}.animation-item[data-v-0562c530]:nth-child(2n){margin-left:-1px}.animation-item[data-v-0562c530]:nth-child(n+3){margin-top:-1px}.animation-block[data-v-0562c530]{width:64px;height:36px;background:#666;position:relative;overflow:hidden}.animation-block.fade[data-v-0562c530]:hover:after{animation:fade-0562c530 .3s linear}.animation-block.fade[data-v-0562c530]:hover:after,.animation-block.slideX[data-v-0562c530]:hover:after{content:"PPTist";width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(209,68,36,.75);color:#fff;display:flex;justify-content:center;align-items:center}.animation-block.slideX[data-v-0562c530]:hover:after{animation:slideX-0562c530 .3s linear}.animation-block.slideY[data-v-0562c530]:hover:after{animation:slideY-0562c530 .3s linear}.animation-block.slideX3D[data-v-0562c530]:hover:after,.animation-block.slideY[data-v-0562c530]:hover:after{content:"PPTist";width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(209,68,36,.75);color:#fff;display:flex;justify-content:center;align-items:center}.animation-block.slideX3D[data-v-0562c530]:hover:after{animation:slideX3D-0562c530 .3s linear}.animation-block.slideY3D[data-v-0562c530]:hover:after{animation:slideY3D-0562c530 .3s linear}.animation-block.rotate[data-v-0562c530]:hover:after,.animation-block.slideY3D[data-v-0562c530]:hover:after{content:"PPTist";width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(209,68,36,.75);color:#fff;display:flex;justify-content:center;align-items:center}.animation-block.rotate[data-v-0562c530]:hover:after{transform-origin:0 0;animation:rotate-0562c530 .3s linear}.animation-block.scaleY[data-v-0562c530]:hover:after{animation:scaleY-0562c530 .3s linear}.animation-block.scaleX[data-v-0562c530]:hover:after,.animation-block.scaleY[data-v-0562c530]:hover:after{content:"PPTist";width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(209,68,36,.75);color:#fff;display:flex;justify-content:center;align-items:center}.animation-block.scaleX[data-v-0562c530]:hover:after{animation:scaleX-0562c530 .3s linear}.animation-block.scale[data-v-0562c530]:hover:after{animation:scale-0562c530 .3s linear}.animation-block.scaleReverse[data-v-0562c530]:hover:after,.animation-block.scale[data-v-0562c530]:hover:after{content:"PPTist";width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(209,68,36,.75);color:#fff;display:flex;justify-content:center;align-items:center}.animation-block.scaleReverse[data-v-0562c530]:hover:after{animation:scaleReverse-0562c530 .3s linear}.animation-text[data-v-0562c530]{font-size:12px;color:#333;text-align:center}@keyframes fade-0562c530{0%{opacity:0}to{opacity:1}}@keyframes slideX-0562c530{0%{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideY-0562c530{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideX3D-0562c530{0%{transform:translateX(100%) scale(.5)}to{transform:translateX(0)}}@keyframes slideY3D-0562c530{0%{transform:translateY(100%) scale(.5)}to{transform:translateY(0)}}@keyframes rotate-0562c530{0%{transform:rotate(-90deg)}to{transform:rotate(0)}}@keyframes scaleY-0562c530{0%{transform:scaleY(.1)}to{transform:scaleY(1)}}@keyframes scaleX-0562c530{0%{transform:scaleX(.1)}to{transform:scaleY(1)}}@keyframes scale-0562c530{0%{transform:scale(.25)}to{transform:scale(1)}}@keyframes scaleReverse-0562c530{0%{transform:scale(2)}to{transform:scale(1)}}.row[data-v-e95a4c6c]{width:100%;display:flex;align-items:center;margin-bottom:10px}.symbol-panel[data-v-2bb5f257]{height:100%;display:flex;flex-direction:column}.symbol-panel .pool[data-v-2bb5f257]{padding:5px 12px;margin:0 -12px;flex:1;font-size:18px;overflow:auto;overflow:overlay;display:flex;flex-wrap:wrap;align-content:flex-start}.symbol-panel .symbol-item[data-v-2bb5f257]{width:18%;margin-bottom:2.5%;height:0;padding-bottom:18%;position:relative;cursor:pointer;border:1px solid #eee}.symbol-panel .symbol-item[data-v-2bb5f257]:not(:nth-child(5n)){margin-right:2.5%}.symbol-panel .symbol-item[data-v-2bb5f257]:hover{color:#d14424}.symbol-panel .symbol-item .symbol[data-v-2bb5f257]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-color:#fff}.toolbar[data-v-6c9ece83]{border-left:1px solid #eee;background-color:#fff;display:flex;flex-direction:column}.content[data-v-6c9ece83]{padding:12px;font-size:13px;overflow:auto;overflow:overlay}.editor[data-v-31d96c24]{height:100%;overflow:auto}.prosemirror-editor[data-v-31d96c24]{height:100%;cursor:text}.prosemirror-editor[data-v-31d96c24] .ProseMirror{height:100%;font-size:12px;overflow:auto;padding:8px;line-height:1.5}.prosemirror-editor[data-v-31d96c24] .ProseMirror>p[data-placeholder]:before{content:attr(data-placeholder);pointer-events:none;position:absolute;font-size:12px;color:hsla(0,0%,40%,.5)}.menu[data-v-31d96c24]{display:flex;background-color:#fff;padding:6px 4px;border-radius:2px;box-shadow:0 0 20px 0 rgba(0,0,0,.15)}.menu button[data-v-31d96c24]{outline:0;border:0;background-color:#fff;padding:3px;border-radius:2px;font-size:16px;margin:0 3px;display:flex;align-items:center;justify-content:center;cursor:pointer}.menu button.active[data-v-31d96c24],.menu button[data-v-31d96c24]:hover{background-color:#d14424;color:#fff}.remark[data-v-458a41b9]{position:relative;border-top:1px solid #eee}.resize-handler[data-v-458a41b9]{height:7px;position:absolute;top:-3px;left:0;right:0;cursor:n-resize;z-index:2}.export-img-dialog[data-v-1df3f398]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.thumbnails-view[data-v-1df3f398],.thumbnails-view[data-v-1df3f398]:after{position:absolute;top:0;right:0;bottom:0;left:0}.thumbnails-view[data-v-1df3f398]:after{content:"";background-color:#fff}.configs[data-v-1df3f398]{width:350px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center;z-index:1}.configs .row[data-v-1df3f398]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-1df3f398]{width:100px;position:relative}.configs .title[data-v-1df3f398]:after{content:attr(data-range);position:absolute;top:20px;left:0}.configs .config-item[data-v-1df3f398]{flex:1}.btns[data-v-1df3f398]{width:300px;height:100px;display:flex;justify-content:center;align-items:center;z-index:1}.btns .export[data-v-1df3f398]{flex:1}.btns .close[data-v-1df3f398]{width:100px;margin-left:10px}.export-json-dialog[data-v-6a7223ca]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.preview[data-v-6a7223ca]{width:100%;height:calc(100% - 100px);background-color:#f9f9f9;color:#0451a5;overflow:auto}pre[data-v-6a7223ca]{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}.btns[data-v-6a7223ca]{width:300px;height:100px;display:flex;justify-content:center;align-items:center}.btns .export[data-v-6a7223ca]{flex:1}.btns .close[data-v-6a7223ca]{width:100px;margin-left:10px}[data-v-6a7223ca]::-webkit-scrollbar{width:10px;height:10px;background-color:#f9f9f9}[data-v-6a7223ca]::-webkit-scrollbar-thumb{background-color:#c1c1c1}.export-pdf-dialog[data-v-1668f898]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.thumbnails-view[data-v-1668f898],.thumbnails-view[data-v-1668f898]:after{position:absolute;top:0;right:0;bottom:0;left:0}.thumbnails-view[data-v-1668f898]:after{content:"";background-color:#fff}.thumbnail.break-page[data-v-1668f898]{-moz-column-break-after:page;break-after:page}.configs[data-v-1668f898]{width:300px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center;z-index:1}.configs .row[data-v-1668f898]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-1668f898]{width:100px}.configs .config-item[data-v-1668f898]{flex:1}.configs .tip[data-v-1668f898]{font-size:12px;color:#aaa;line-height:1.8;margin-top:25px}.btns[data-v-1668f898]{width:300px;height:100px;display:flex;justify-content:center;align-items:center;z-index:1}.btns .export[data-v-1668f898]{flex:1}.btns .close[data-v-1668f898]{width:100px;margin-left:10px}.export-pptx-dialog[data-v-265d4b60]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.configs[data-v-265d4b60]{width:350px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center}.configs .row[data-v-265d4b60]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-265d4b60]{width:100px;position:relative}.configs .title[data-v-265d4b60]:after{content:attr(data-range);position:absolute;top:20px;left:0}.configs .config-item[data-v-265d4b60]{flex:1}.configs .tip[data-v-265d4b60]{font-size:12px;color:#aaa;line-height:1.8;margin-top:10px}.btns[data-v-265d4b60]{width:300px;height:100px;display:flex;justify-content:center;align-items:center}.btns .export[data-v-265d4b60]{flex:1}.btns .close[data-v-265d4b60]{width:100px;margin-left:10px}.export-pptist-dialog[data-v-26422ed7]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;overflow:hidden}.configs[data-v-26422ed7]{width:350px;height:calc(100% - 100px);display:flex;flex-direction:column;justify-content:center}.configs .row[data-v-26422ed7]{display:flex;justify-content:center;align-items:center;margin-bottom:25px}.configs .title[data-v-26422ed7]{width:100px;position:relative}.configs .title[data-v-26422ed7]:after{content:attr(data-range);position:absolute;top:20px;left:0}.configs .config-item[data-v-26422ed7]{flex:1}.configs .tip[data-v-26422ed7]{font-size:12px;color:#aaa;line-height:1.8;margin-top:25px}.btns[data-v-26422ed7]{width:300px;height:100px;display:flex;justify-content:center;align-items:center}.btns .export[data-v-26422ed7]{flex:1}.btns .close[data-v-26422ed7]{width:100px;margin-left:10px}.export-dialog[data-v-b20137f0]{margin:-20px}.content[data-v-b20137f0]{height:460px;padding:12px;font-size:13px;overflow:auto;overflow:overlay}.moveable-panel[data-v-fc791e00]{position:fixed;background-color:#fff;box-shadow:0 2px 12px 0 rgba(56,56,56,.15);border:1px solid #eee;border-radius:2px;display:flex;flex-direction:column;z-index:999}.header[data-v-fc791e00]{height:40px;display:flex;align-items:center;border-bottom:1px solid #f0f0f0;cursor:move}.title[data-v-fc791e00]{flex:1;font-size:13px;padding-left:10px}.close-btn[data-v-fc791e00]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;color:#666;font-size:12px;cursor:pointer}.content[data-v-fc791e00]{flex:1;padding:10px;overflow:auto}.select-panel[data-v-15470598]{height:100%;font-size:12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.handler[data-v-15470598]{height:24px;margin-bottom:8px;display:flex;align-items:center;justify-content:space-between}.handler .icon-btns[data-v-15470598]{height:100%;flex:1;display:flex;align-items:center;justify-content:flex-end}.handler .icon-btn[data-v-15470598]{width:16px;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer}.handler .icon-btn[data-v-15470598]:hover{color:#d14424}.element-list[data-v-15470598]{height:calc(100% - 32px);padding-right:10px;margin-right:-10px;overflow:auto}.item[data-v-15470598]{padding:5px;font-size:12px;border-radius:2px;display:flex;align-items:center;cursor:pointer}.item.active[data-v-15470598]{background-color:rgba(209,68,36,.1)}.item.group-active[data-v-15470598]{background-color:rgba(209,68,36,.2)}.item[data-v-15470598]:hover{background-color:rgba(209,68,36,.25)}.item .name[data-v-15470598]{height:18px;line-height:18px;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.item .icons[data-v-15470598]{width:20px;display:flex;align-items:center;justify-content:center;margin-left:5px}.group-els[data-v-15470598]{padding:5px 0}.group-els .group-title[data-v-15470598]{margin-bottom:5px;padding:0 5px}.group-els .item[data-v-15470598]{margin-left:15px}.input[data-v-15470598]{width:100%;height:16px;border:0;outline:0;padding-left:0;padding-right:0;flex:1;font-size:12px;background-color:transparent}.search-panel[data-v-fb93ddde]{font-size:13px}.content[data-v-fb93ddde]{display:flex;flex-direction:column;justify-content:space-between}.input[data-v-fb93ddde]{margin-top:10px}.count[data-v-fb93ddde]{margin-right:8px}.count[data-v-fb93ddde],.ignore-case[data-v-fb93ddde]{font-size:12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ignore-case[data-v-fb93ddde]{cursor:pointer}.ignore-case.active[data-v-fb93ddde]{color:#d14424}.next-btn[data-v-fb93ddde]{width:22px;height:100%;display:flex;justify-content:center;align-items:center;margin:0!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}.next-btn[data-v-fb93ddde]:hover{color:#d14424}.footer[data-v-fb93ddde]{display:flex;justify-content:flex-end;align-items:center;margin-top:10px}.close-btn[data-v-fb93ddde]{width:32px;height:32px;position:absolute;top:8px;right:3px;display:flex;justify-content:center;align-items:center;color:#666;font-size:12px;cursor:pointer}.pptist-editor[data-v-1e00f97b]{height:100%}.layout-header[data-v-1e00f97b]{height:40px}.layout-content[data-v-1e00f97b]{height:calc(100% - 40px);display:flex}.layout-content-left[data-v-1e00f97b]{width:160px;height:100%;flex-shrink:0}.layout-content-center[data-v-1e00f97b]{width:calc(100% - 420px)}.layout-content-center .center-top[data-v-1e00f97b]{height:40px}.layout-content-right[data-v-1e00f97b]{width:260px;height:100%}.screen-element-video[data-v-76bf5b3f]{position:absolute}.element-content[data-v-76bf5b3f],.rotate-wrapper[data-v-76bf5b3f]{width:100%;height:100%}.screen-element-audio[data-v-adf39436]{position:absolute}.rotate-wrapper[data-v-adf39436]{width:100%;height:100%}.element-content[data-v-adf39436]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.element-content:hover .audio-player[data-v-adf39436]{display:block}.audio-icon[data-v-adf39436]{cursor:pointer}.audio-player[data-v-adf39436]{position:absolute;display:none}.link[data-v-2139723a]{cursor:pointer}.screen-slide[data-v-016af5da]{position:absolute;top:0;left:0;transform-origin:0 0;overflow:hidden}.background[data-v-016af5da]{width:100%;height:100%;background-position:50%;position:absolute}.screen-slide-list[data-v-552b63d2]{background:#1d1d1d;position:relative;width:100%;height:100%}.slide-item[data-v-552b63d2]{position:absolute;top:0;left:0;width:100%;height:100%}.slide-item.current[data-v-552b63d2]{z-index:2}.slide-item.hide[data-v-552b63d2]{opacity:0}.slide-item.turning-mode-no.before[data-v-552b63d2]{transform:translateY(-100%)}.slide-item.turning-mode-no.after[data-v-552b63d2]{transform:translateY(100%)}.slide-item.turning-mode-fade[data-v-552b63d2]{transition:opacity .75s}.slide-item.turning-mode-fade.after[data-v-552b63d2],.slide-item.turning-mode-fade.before[data-v-552b63d2]{pointer-events:none;opacity:0}.slide-item.turning-mode-slideX[data-v-552b63d2]{transition:transform .35s}.slide-item.turning-mode-slideX.before[data-v-552b63d2]{transform:translateX(-100%)}.slide-item.turning-mode-slideX.after[data-v-552b63d2]{transform:translateX(100%)}.slide-item.turning-mode-slideY[data-v-552b63d2]{transition:transform .35s}.slide-item.turning-mode-slideY.before[data-v-552b63d2]{transform:translateY(-100%)}.slide-item.turning-mode-slideY.after[data-v-552b63d2]{transform:translateY(100%)}.slide-item.turning-mode-slideX3D[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-slideX3D.before[data-v-552b63d2]{transform:translateX(-100%) scale(.5)}.slide-item.turning-mode-slideX3D.after[data-v-552b63d2]{transform:translateX(100%) scale(.5)}.slide-item.turning-mode-slideY3D[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-slideY3D.before[data-v-552b63d2]{transform:translateY(-100%) scale(.5)}.slide-item.turning-mode-slideY3D.after[data-v-552b63d2]{transform:translateY(100%) scale(.5)}.slide-item.turning-mode-rotate[data-v-552b63d2]{transition:transform .5s;transform-origin:0 0}.slide-item.turning-mode-rotate.before[data-v-552b63d2]{transform:rotate(90deg)}.slide-item.turning-mode-rotate.after[data-v-552b63d2]{transform:rotate(-90deg)}.slide-item.turning-mode-scaleY[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scaleY.after[data-v-552b63d2],.slide-item.turning-mode-scaleY.before[data-v-552b63d2]{transform:scaleY(.1)}.slide-item.turning-mode-scaleX[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scaleX.after[data-v-552b63d2],.slide-item.turning-mode-scaleX.before[data-v-552b63d2]{transform:scaleX(.1)}.slide-item.turning-mode-scale[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scale.after[data-v-552b63d2],.slide-item.turning-mode-scale.before[data-v-552b63d2]{transform:scale(.25)}.slide-item.turning-mode-scaleReverse[data-v-552b63d2]{transition:transform .5s}.slide-item.turning-mode-scaleReverse.after[data-v-552b63d2],.slide-item.turning-mode-scaleReverse.before[data-v-552b63d2]{transform:scale(2)}.slide-content[data-v-552b63d2]{background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;justify-content:center;align-items:center}.slide-thumbnails[data-v-15912b32]{width:100%;height:100%;position:fixed;top:0;left:0;background-color:#1a1a1a;z-index:99}.return-button[data-v-15912b32]{height:60px;padding:20px 30px 0}.return-button .icon[data-v-15912b32]{color:#fff;font-size:36px;cursor:pointer}.return-button .icon[data-v-15912b32]:hover{color:#d14424}.slide-thumbnails-content[data-v-15912b32]{height:calc(100% - 100px);padding:20px 30px 30px 30px;display:flex;flex-wrap:wrap;align-content:flex-start;overflow:auto;overflow:overlay}.slide-thumbnails-content .thumbnail[data-v-15912b32]{width:150px;outline:2px solid #aaa;margin-right:12px;margin-bottom:12px}.slide-thumbnails-content .thumbnail[data-v-15912b32]:hover{outline-color:#d14424}.slide-thumbnails-content .thumbnail.active[data-v-15912b32]{outline-width:3px;outline-color:#d14424}.writing-board[data-v-d8027742]{z-index:8;cursor:none;position:absolute;top:0;right:0;bottom:0;left:0}.blackboard[data-v-d8027742]{width:100%;height:100%;background-color:#0f392b}.canvas[data-v-d8027742]{position:absolute;top:0;left:0}.eraser[data-v-d8027742],.pen[data-v-d8027742]{pointer-events:none;position:absolute;z-index:9}.eraser .icon[data-v-d8027742],.pen .icon[data-v-d8027742]{filter:drop-shadow(2px 2px 2px #555)}.eraser[data-v-d8027742]{display:flex;justify-content:center;align-items:center;border-radius:50%;border:4px solid rgba(85,85,85,.15);color:rgba(85,85,85,.75)}.writing-board-tool[data-v-92cd0b5a]{font-size:12px;z-index:10;position:absolute;top:0;right:0;bottom:0;left:0}.writing-board-tool .writing-board-wrap[data-v-92cd0b5a]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.writing-board-tool .tools[data-v-92cd0b5a]{width:100%;height:100%;display:flex;align-items:center;justify-content:space-between}.writing-board-tool .tool-content[data-v-92cd0b5a]{display:flex;align-items:center}.writing-board-tool .btn[data-v-92cd0b5a]{padding:5px 10px;cursor:pointer}.writing-board-tool .btn[data-v-92cd0b5a]:hover{color:#d14424}.writing-board-tool .btn.active[data-v-92cd0b5a]{background-color:rgba(209,68,36,.5);color:#fff}.writing-board-tool .icon[data-v-92cd0b5a]{font-size:20px}.writing-board-tool .colors[data-v-92cd0b5a]{display:flex;padding:0 10px}.writing-board-tool .color[data-v-92cd0b5a]{width:16px;height:16px;border-radius:2px;cursor:pointer}.writing-board-tool .color[data-v-92cd0b5a]:hover{transform:scale(1.15)}.writing-board-tool .color.active[data-v-92cd0b5a]{transform:scale(1.3)}.writing-board-tool .color+.color[data-v-92cd0b5a]{margin-left:8px}.size[data-v-92cd0b5a]{width:200px;display:flex;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:13px}.size .label[data-v-92cd0b5a]{width:70px}.size .size-slider[data-v-92cd0b5a]{flex:1}.countdown-timer[data-v-83a589f0]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.header[data-v-83a589f0]{height:16px;font-size:13px;margin-bottom:16px;display:flex;align-items:center}.header .text-btn[data-v-83a589f0]{margin-right:8px;cursor:pointer}.header .text-btn.active[data-v-83a589f0],.header .text-btn[data-v-83a589f0]:hover{color:#d14424}.content[data-v-83a589f0]{display:flex;justify-content:space-between;padding:0 5px}.timer[data-v-83a589f0]{width:54px;height:54px;border-radius:50%;background-color:rgba(209,68,36,.05);font-size:22px;overflow:hidden}.timer input[data-v-83a589f0]{width:100%;height:100%;border:0;outline:0;background-color:transparent;text-align:center}.colon[data-v-83a589f0]{height:54px;line-height:54px;font-size:22px}.icon-btn[data-v-83a589f0]{width:20px;height:20px;display:flex;justify-content:center;align-items:center;cursor:pointer}.pause[data-v-83a589f0],.play[data-v-83a589f0]{font-size:17px}.reset[data-v-83a589f0]{font-size:12px}.close-btn[data-v-83a589f0]{position:absolute;top:0;right:0;padding:10px;cursor:pointer}.base-view[data-v-e9c1efea]{width:100%;height:100%}.base-view.laser-pen[data-v-e9c1efea]{cursor:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABHNCSVQICAgIfAhkiAAACCJJREFUWIXtmLuO3MYShv/qZl9IzqwXo2BkSAtsIK+z8wwOBcOJ9C56Cr2LlThQcgBnfofVBnswXlgTaLHaIdk3dtcJOKOzd8n2MeDABRDDgKz/m+pudv0N/BN/Luj/kYSZJQBxJR8DKESU/2zuPwTIzAKnpxqHhxUuLir0vYSUAkS0ewA5F7Rtxv7+iNPTEYeHkYjKXwrIzHK9XtultRohaKSkkFIVhqGCEAIxTvm0ZpRSTNOMUGqEUgnGxLX3cblc+t9T2S8GXK1W9dP53OLiwoLZhMtLQ4CiGBVKkchZIOcpn5QMKQuEyKx1YiCZvb0AooD9ff/rZuMPDg7cl+hWn3uAmQWABut1g/PzOnZdTd5bMY6aQtAIQQGQGEd5bYirKgPIZExiY2IKIbK1XpeinzaN2s7b4XPD/iAgM0ucn7fYbNrQ963Juaauq8k5i3E01PcG46iQs0TO1wGlzJAyo6oS2jagqgLGUQNQwTllvJeYzwUz9w8N+b2AzCxwft6i72fBuZkYhnbcbBqKsSbvazhnEIJBzqrEqGQpAlO1AaKShShC6wQpE4UQUNcBKenReyXm8yoIIYwQtNXq7qvkQxVssNm0wbmZuLiYUQgtnGtps2ngfQ3vLaVkEKOmGKcqMtMWkEnKTFonaB3Z+4AQPFmreD6vSAghxpECAFMKY7EoALovBlytVjXW6yb0fSuGoaUQWrq8nKHvW/R9S943xbmavJ+qmNIO8FMFIWXert7A1gYxjprHsSLmaTHt7UF0HYdSilmv82q1ynctnFuAzCzx8aPF+Xltcq7HzaaBcy36vsUwzKjrZhiGRgxDA+8tUjIUgkbOEqVMgEIUkjLDmAjvgwjBI6WKxlHybp5KyVRKMcaMGIb0dLFIzBxvzsdbgOv12i69t7HrpgURY02bTYO+b6nrZui6qZLONdz3jTg5ORDHx0f48OExQpgBAIzp8OjRez46Oi7Pnq1ot5BKETQVgYmosJRj6rrEQNJCxLX3EUB/LyAzC3z8qOGcIe8tOWdpmm81ed9gGJpdJdF1rXz79jucnX1za454P8fZ2ZzOzr6Rx8fvyvPnP38afiEKVVXmqhrJ+wSlIqoqYj73S2s1M7urC0ZcS3x6qhGCDpeXBuOoMY4Gzhl4b4tzNYahgXMNuq4Vb978cCfczTg7+0a8efMDuq6Fcw2GoSnO1fDewjmDcTQYx0kzBI3TU3319euAh4cVUlIEKApBU98bhGAoJSO8N/Dect834u3b73B+/vVn4XZxfv61ePv2O+77Bt5b4b2hlKbcfW8oBE2AQkoKh4fXRvU64MVFhZQqilEhBLX9CCvEqLer1YiTk4MvqtxdlTw5OcAWDDFq5DxphDBtmSlNzcddgMws0fcyDEOFUiQAiZxliVGVGFVJSXEImo6Pj3433Dbo+PiIQ9AlJbXLi5wnrVIm7b6X223wOiAAASkFhBDIWWAcJXKWshQhcpYiZ0k5S3z48PhO9ZcvgV9+ma6XL+8m/PDhMW1ziW1u5Cy3WpO2lOIq11VAAhEhRkLO0z0RgVmAefotRXz6lNyMV6+AxWK6Xr26GzCEGXZb4i7nTifnSXv6Tn7qssTdmf4+cRWQwczQmiHldM/MICogmn6FKDDmzj0Tr18D5+fT9fr13WrGdBCiXMu505Fy0mZmTJYBwPUPdUHOBaUUSFlQVRlS5rzbtqTMJGXGo0fvcXY2vyX+44/T9VA8evSepcy8zcdCFDG1ZBlSTto5FwC3P9RElNG22TTNCCEygAwps9A6Ca2TUCqRMZGPjo4fprg/+OjomIyJQqm0ywspJy0hJu22zVf34+tzcH9/hFIja51gTEJVJUiZoHWEMQFKhfLs2QpPnrz73XRPnrwrz56toFSAMQFaR0g5aRiTWOsEpUbs749XX7u51Y1QKjGQ2JjIbRtgTGClQrE2wFpPbTuU589/xmLx2xfDLRa/lefPf6a2HWCtL9YG3oJy2wY2JjKQoFTC6ekDgIeHEcZEs7cXUFURVTV1wtZ6UdcOTTOgrgfMZn158eKnL6rkkyfvyosXP2E261HXA5pmEHXtYK1HXU9WoKomTWMiDg/j1devbStEVN6/fx+XRIGt9RhHjZQ0Wat4HCsax//1fEQlf//9v8XJyTF9rt1q2+mPtW2PphnY2gHWOrbWcV17ttaDKKy9j4/398u9gACwXC49Pn7UuhQNQI3eT206s2DadptCFEiZqaoS/+tfvnz77X/oRsPKUmYyJpJSAdZ6NM2Aphl4Pu/QND3P5wO0dmo2c5jNHPb3/fKrr/xNnluARJRXq5V/2jQqOKfE1kPsPC8zM1VVLkqNwpiAEAxbq+hGy89SZtq2/MXaIOrasbUDmqZH2/Zo257bdghSOtM07tfNxh/s799yd3d6koODA8fM0ngvw9bgYG9vatOJClfVSFUVYe3UldxhmiBlxtY0kVLTlLHW8Xw+oG17NqYvs1lv6rrHcjkcEN1p5B9ydQPmc2GEoABAdB1TKYWlnDph5wJvbSdPpwvXbCcLUXhrO2FMQF0HttZBa8dtO5TZrDdt26FtewDDfRD3AhJRYeYemKxh2Bqc1HVTm17Xn4y7yFnyDeMurhh33hp3rmuvZjMXpHSmrqehXiz6h04XHjxZIKLMzB0Wi2LW64xhSAwkVFXEOGpo/dmjD2yPPlBVka31mM2caRqH5XLAnz362FUSQLdarfLTxSJpISLmcx8uLw217R8/PLpnzt3S/5KHdvG3Pn67Afr3PMB8APgvOwL+J/5s/BeEBm1u1Gu4+QAAAABJRU5ErkJggg==) 20 20,default!important}.tools-left[data-v-e9c1efea]{position:fixed;bottom:8px;left:8px;font-size:25px;color:#666;z-index:10}.tools-left .tool-btn[data-v-e9c1efea]{opacity:.35;cursor:pointer}.tools-left .tool-btn[data-v-e9c1efea]:hover{opacity:.9}.tools-left .tool-btn+.tool-btn[data-v-e9c1efea]{margin-left:8px}.tools-right[data-v-e9c1efea]{height:66px;position:fixed;bottom:-66px;right:0;z-index:5;padding:8px;transition:bottom .2s}.tools-right.visible[data-v-e9c1efea]{bottom:0}.tools-right[data-v-e9c1efea]:after{content:"";width:100%;height:66px;position:absolute;left:0;top:-66px}.tools-right .content[data-v-e9c1efea]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;border-radius:2px;font-size:25px;background-color:#fff;color:#41464b;padding:8px 10px;box-shadow:0 2px 12px 0 rgba(56,56,56,.2);border:1px solid #e2e6ed}.tools-right .tool-btn[data-v-e9c1efea]{cursor:pointer}.tools-right .tool-btn.active[data-v-e9c1efea],.tools-right .tool-btn[data-v-e9c1efea]:hover{color:#d14424}.tools-right .tool-btn+.tool-btn[data-v-e9c1efea]{margin-left:15px}.tools-right .page-number[data-v-e9c1efea]{font-size:13px;padding:8px 12px;cursor:pointer}.presenter-view[data-v-77a65275]{width:100%;height:100%;display:flex}.toolbar[data-v-77a65275]{width:70px;height:100%;background-color:#fff;border-right:1px solid #eee;font-size:12px;margin:20px 0}.toolbar .tool-btn[data-v-77a65275]{display:flex;flex-direction:column;justify-content:center;align-items:center;cursor:pointer}.toolbar .tool-btn+.tool-btn[data-v-77a65275]{margin-top:22px}.toolbar .tool-btn.active[data-v-77a65275],.toolbar .tool-btn[data-v-77a65275]:hover{color:#d14424}.toolbar .divider[data-v-77a65275]{width:70%;margin:24px 15%!important}.toolbar .tool-icon[data-v-77a65275]{margin-bottom:8px;font-size:22px}.content[data-v-77a65275]{width:calc(100% - 430px);height:100%;background-color:#1d1d1d}.slide-list-wrap[data-v-77a65275]{height:calc(100% - 190px);margin:20px;overflow:hidden;position:relative}.slide-list-wrap.laser-pen[data-v-77a65275]{cursor:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABHNCSVQICAgIfAhkiAAACCJJREFUWIXtmLuO3MYShv/qZl9IzqwXo2BkSAtsIK+z8wwOBcOJ9C56Cr2LlThQcgBnfofVBnswXlgTaLHaIdk3dtcJOKOzd8n2MeDABRDDgKz/m+pudv0N/BN/Luj/kYSZJQBxJR8DKESU/2zuPwTIzAKnpxqHhxUuLir0vYSUAkS0ewA5F7Rtxv7+iNPTEYeHkYjKXwrIzHK9XtultRohaKSkkFIVhqGCEAIxTvm0ZpRSTNOMUGqEUgnGxLX3cblc+t9T2S8GXK1W9dP53OLiwoLZhMtLQ4CiGBVKkchZIOcpn5QMKQuEyKx1YiCZvb0AooD9ff/rZuMPDg7cl+hWn3uAmQWABut1g/PzOnZdTd5bMY6aQtAIQQGQGEd5bYirKgPIZExiY2IKIbK1XpeinzaN2s7b4XPD/iAgM0ucn7fYbNrQ963Juaauq8k5i3E01PcG46iQs0TO1wGlzJAyo6oS2jagqgLGUQNQwTllvJeYzwUz9w8N+b2AzCxwft6i72fBuZkYhnbcbBqKsSbvazhnEIJBzqrEqGQpAlO1AaKShShC6wQpE4UQUNcBKenReyXm8yoIIYwQtNXq7qvkQxVssNm0wbmZuLiYUQgtnGtps2ngfQ3vLaVkEKOmGKcqMtMWkEnKTFonaB3Z+4AQPFmreD6vSAghxpECAFMKY7EoALovBlytVjXW6yb0fSuGoaUQWrq8nKHvW/R9S943xbmavJ+qmNIO8FMFIWXert7A1gYxjprHsSLmaTHt7UF0HYdSilmv82q1ynctnFuAzCzx8aPF+Xltcq7HzaaBcy36vsUwzKjrZhiGRgxDA+8tUjIUgkbOEqVMgEIUkjLDmAjvgwjBI6WKxlHybp5KyVRKMcaMGIb0dLFIzBxvzsdbgOv12i69t7HrpgURY02bTYO+b6nrZui6qZLONdz3jTg5ORDHx0f48OExQpgBAIzp8OjRez46Oi7Pnq1ot5BKETQVgYmosJRj6rrEQNJCxLX3EUB/LyAzC3z8qOGcIe8tOWdpmm81ed9gGJpdJdF1rXz79jucnX1za454P8fZ2ZzOzr6Rx8fvyvPnP38afiEKVVXmqhrJ+wSlIqoqYj73S2s1M7urC0ZcS3x6qhGCDpeXBuOoMY4Gzhl4b4tzNYahgXMNuq4Vb978cCfczTg7+0a8efMDuq6Fcw2GoSnO1fDewjmDcTQYx0kzBI3TU3319euAh4cVUlIEKApBU98bhGAoJSO8N/Dect834u3b73B+/vVn4XZxfv61ePv2O+77Bt5b4b2hlKbcfW8oBE2AQkoKh4fXRvU64MVFhZQqilEhBLX9CCvEqLer1YiTk4MvqtxdlTw5OcAWDDFq5DxphDBtmSlNzcddgMws0fcyDEOFUiQAiZxliVGVGFVJSXEImo6Pj3433Dbo+PiIQ9AlJbXLi5wnrVIm7b6X223wOiAAASkFhBDIWWAcJXKWshQhcpYiZ0k5S3z48PhO9ZcvgV9+ma6XL+8m/PDhMW1ziW1u5Cy3WpO2lOIq11VAAhEhRkLO0z0RgVmAefotRXz6lNyMV6+AxWK6Xr26GzCEGXZb4i7nTifnSXv6Tn7qssTdmf4+cRWQwczQmiHldM/MICogmn6FKDDmzj0Tr18D5+fT9fr13WrGdBCiXMu505Fy0mZmTJYBwPUPdUHOBaUUSFlQVRlS5rzbtqTMJGXGo0fvcXY2vyX+44/T9VA8evSepcy8zcdCFDG1ZBlSTto5FwC3P9RElNG22TTNCCEygAwps9A6Ca2TUCqRMZGPjo4fprg/+OjomIyJQqm0ywspJy0hJu22zVf34+tzcH9/hFIja51gTEJVJUiZoHWEMQFKhfLs2QpPnrz73XRPnrwrz56toFSAMQFaR0g5aRiTWOsEpUbs749XX7u51Y1QKjGQ2JjIbRtgTGClQrE2wFpPbTuU589/xmLx2xfDLRa/lefPf6a2HWCtL9YG3oJy2wY2JjKQoFTC6ekDgIeHEcZEs7cXUFURVTV1wtZ6UdcOTTOgrgfMZn158eKnL6rkkyfvyosXP2E261HXA5pmEHXtYK1HXU9WoKomTWMiDg/j1devbStEVN6/fx+XRIGt9RhHjZQ0Wat4HCsax//1fEQlf//9v8XJyTF9rt1q2+mPtW2PphnY2gHWOrbWcV17ttaDKKy9j4/398u9gACwXC49Pn7UuhQNQI3eT206s2DadptCFEiZqaoS/+tfvnz77X/oRsPKUmYyJpJSAdZ6NM2Aphl4Pu/QND3P5wO0dmo2c5jNHPb3/fKrr/xNnluARJRXq5V/2jQqOKfE1kPsPC8zM1VVLkqNwpiAEAxbq+hGy89SZtq2/MXaIOrasbUDmqZH2/Zo257bdghSOtM07tfNxh/s799yd3d6koODA8fM0ngvw9bgYG9vatOJClfVSFUVYe3UldxhmiBlxtY0kVLTlLHW8Xw+oG17NqYvs1lv6rrHcjkcEN1p5B9ydQPmc2GEoABAdB1TKYWlnDph5wJvbSdPpwvXbCcLUXhrO2FMQF0HttZBa8dtO5TZrDdt26FtewDDfRD3AhJRYeYemKxh2Bqc1HVTm17Xn4y7yFnyDeMurhh33hp3rmuvZjMXpHSmrqehXiz6h04XHjxZIKLMzB0Wi2LW64xhSAwkVFXEOGpo/dmjD2yPPlBVka31mM2caRqH5XLAnz362FUSQLdarfLTxSJpISLmcx8uLw217R8/PLpnzt3S/5KHdvG3Pn67Afr3PMB8APgvOwL+J/5s/BeEBm1u1Gu4+QAAAABJRU5ErkJggg==) 20 20,default!important}.thumbnails[data-v-77a65275]{height:150px;padding:15px;white-space:nowrap;overflow-x:auto;overflow-y:hidden;border-top:1px solid #3a3a3a}.thumbnail[data-v-77a65275]{display:inline-block;outline:2px solid #aaa}.thumbnail+.thumbnail[data-v-77a65275]{margin-left:10px}.thumbnail[data-v-77a65275]:hover{outline-color:#d14424}.thumbnail.active[data-v-77a65275]{outline-width:3px;outline-color:#d14424}.remark[data-v-77a65275]{width:360px;height:100%;position:relative;background-color:#2a2a2a;border-left:1px solid #3a3a3a;color:#fff}.remark .header[data-v-77a65275]{height:60px;padding:0 20px;display:flex;justify-content:space-between;align-items:center;font-size:18px;border-bottom:1px solid #3a3a3a}.remark .remark-content[data-v-77a65275]{height:calc(100% - 60px);padding:20px;line-height:1.5;overflow:auto;overflow:overlay}.remark .remark-scale[data-v-77a65275]{position:absolute;right:5px;bottom:5px;font-size:22px;display:flex}.remark .scale-btn[data-v-77a65275]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}.remark .scale-btn.disable[data-v-77a65275]{color:#666;cursor:no-drop}.remark .scale-btn[data-v-77a65275]:not(.disable):hover{background-color:#333}[data-v-77a65275]::-webkit-scrollbar{width:0;height:0}.pptist-screen[data-v-6bf3d190]{width:100%;height:100%}.mobile-operate[data-v-fd451ff6]{position:absolute;z-index:100;-webkit-user-select:none;-moz-user-select:none;user-select:none}.mobile-thumbnails[data-v-2c80920e]{padding:10px;white-space:nowrap;overflow-x:auto;overflow-y:hidden}.thumbnail-item[data-v-2c80920e]{position:relative;display:inline-block;outline:2px solid #aaa}.thumbnail-item+.thumbnail-item[data-v-2c80920e]{margin-left:10px}.thumbnail-item.active[data-v-2c80920e]{outline-color:#d14424}.thumbnail-item.active .label[data-v-2c80920e]{background-color:#d14424}.thumbnail-item .label[data-v-2c80920e]{min-width:20px;height:14px;line-height:14px;position:absolute;right:-1px;top:-1px;color:#fff;background-color:#aaa;z-index:1;font-size:12px;text-align:center;padding:0 5px}.sortable-chosen[data-v-2c80920e]{top:-5px}[data-v-2c80920e]::-webkit-scrollbar{width:0;height:0}.slide-toolbar[data-v-24150aba]{height:230px;background-color:#fff;box-shadow:0 0 15px 0 rgba(0,0,0,.1);display:flex;flex-direction:column;position:relative;z-index:2}.remark[data-v-24150aba]{position:relative;flex:1;border-bottom:1px solid #eee;line-height:1.5}.remark textarea[data-v-24150aba]{width:100%;height:100%;overflow-y:auto;resize:none;border:0;outline:0;padding:8px 10px;font-size:12px;box-sizing:border-box;position:absolute;top:0;right:0;bottom:0;left:0}.toolbar[data-v-24150aba]{height:90px;border-bottom:1px solid #eee;padding:10px}.row[data-v-24150aba]{width:100%;display:flex;align-items:center;margin-bottom:5px}.row .icon[data-v-24150aba]{margin-right:3px}.element-toolbar[data-v-f3d1ac70]{width:100%;height:240px;position:absolute;z-index:99;bottom:0;left:0;background-color:#fff;box-shadow:0 0 15px 0 rgba(0,0,0,.1);display:flex;flex-direction:column;animation:slideInUp-f3d1ac70 .15s}@keyframes slideInUp-f3d1ac70{0%{transform:translateY(100%)}to{transform:translateY(0)}}.content[data-v-f3d1ac70]{padding:10px;flex:1;overflow:auto}.row[data-v-f3d1ac70]{width:100%;display:flex;align-items:center;margin-bottom:10px}.row .icon[data-v-f3d1ac70]{margin-right:3px}.row-block[data-v-f3d1ac70]{margin-bottom:10px;background-color:#f9f9f9;border-radius:2px;padding:10px}.label[data-v-f3d1ac70]{font-size:13px;margin-bottom:20px;margin-left:6px}.colors[data-v-f3d1ac70]{display:flex;flex-wrap:wrap;align-content:flex-start}.color[data-v-f3d1ac70]{width:12%;margin-bottom:.57143%;padding-bottom:5px;display:flex;justify-content:center;align-items:center}.color[data-v-f3d1ac70]:not(:nth-child(8n)){margin-right:.57143%}.color .color-block[data-v-f3d1ac70]{width:30px;height:30px;border-radius:50%}.mobile-editor-header[data-v-5c34ab81]{height:50px;background-color:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 18px;font-size:13px;box-shadow:0 0 15px 0 rgba(0,0,0,.1);position:relative;z-index:2}.history[data-v-5c34ab81]{display:flex;justify-content:center;align-items:center}.history-item[data-v-5c34ab81]{margin-right:20px}.history-item.disable[data-v-5c34ab81]{opacity:.5}.mobile-editor[data-v-3756d058]{height:100%;position:relative;background-color:#f9f9f9}.content[data-v-3756d058]{height:calc(100% - 280px);display:flex;justify-content:center;align-items:center}.viewport[data-v-3756d058]{transform-origin:0 0}.viewport-wrapper[data-v-3756d058]{position:relative;box-shadow:0 0 15px 0 rgba(0,0,0,.1)}.background[data-v-3756d058]{width:100%;height:100%;background-position:50%;position:absolute}.mobile-player[data-v-62f26eba]{transform-origin:0 0;background-color:#1d1d1d;position:relative}.screen-slide-list[data-v-62f26eba]{position:relative;width:100%;height:100%}.slide-item[data-v-62f26eba]{position:absolute;top:0;left:0;width:100%;height:100%}.slide-item.current[data-v-62f26eba]{z-index:2}.slide-item.hide[data-v-62f26eba]{opacity:0}.slide-item.turning-mode-no.before[data-v-62f26eba]{transform:translateY(-100%)}.slide-item.turning-mode-no.after[data-v-62f26eba]{transform:translateY(100%)}.slide-item.turning-mode-fade[data-v-62f26eba]{transition:opacity .75s}.slide-item.turning-mode-fade.after[data-v-62f26eba],.slide-item.turning-mode-fade.before[data-v-62f26eba]{pointer-events:none;opacity:0}.slide-item.turning-mode-slideX[data-v-62f26eba]{transition:transform .35s}.slide-item.turning-mode-slideX.before[data-v-62f26eba]{transform:translateX(-100%)}.slide-item.turning-mode-slideX.after[data-v-62f26eba]{transform:translateX(100%)}.slide-item.turning-mode-slideY[data-v-62f26eba]{transition:transform .35s}.slide-item.turning-mode-slideY.before[data-v-62f26eba]{transform:translateY(-100%)}.slide-item.turning-mode-slideY.after[data-v-62f26eba]{transform:translateY(100%)}.slide-content[data-v-62f26eba]{background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;justify-content:center;align-items:center}.header[data-v-62f26eba]{width:100%;height:40px;line-height:40px;padding:0 15px;position:absolute;top:0;left:0;z-index:99;background-color:rgba(29,29,29,.7);text-align:right;font-size:13px;color:#fff;animation:slideInDown-62f26eba .15s}.header .back[data-v-62f26eba]{height:100%}.thumbnails[data-v-62f26eba]{width:100%;position:absolute;bottom:0;left:0;z-index:99;background-color:rgba(29,29,29,.7);overflow:auto!important;animation:slideInUp-62f26eba .15s}@keyframes slideInUp-62f26eba{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideInDown-62f26eba{0%{transform:translateY(-100%)}to{transform:translateY(0)}}.mobile-preview[data-v-53dd42dc]{height:100%;background-color:#f9f9f9}.thumbnail-list[data-v-53dd42dc]{height:calc(100% - 50px);padding:10px;overflow:auto}.thumbnail-item[data-v-53dd42dc]{display:flex;justify-content:center;align-items:center;box-shadow:0 0 15px 0 rgba(0,0,0,.1)}.thumbnail-item+.thumbnail-item[data-v-53dd42dc]{margin-top:10px}.menu[data-v-53dd42dc]{height:50px;position:relative;box-shadow:0 -2px 4px 0 rgba(51,51,51,.05);background:#fff;display:flex;justify-content:center;align-items:center}.menu .menu-item[data-v-53dd42dc]{width:50%;height:100%;display:flex;justify-content:center;align-items:center;font-size:13px}.menu .menu-item .icon[data-v-53dd42dc]{margin-right:8px;font-size:18px}#app,.mobile[data-v-9826ff08]{height:100%}.ProseMirror,.ProseMirror-static{outline:0;border:0;font-size:20px;word-break:break-word;white-space:normal}.ProseMirror-static:not(.ProseMirror-static),.ProseMirror:not(.ProseMirror-static){-webkit-user-select:text;-moz-user-select:text;user-select:text}.ProseMirror ::-moz-selection,.ProseMirror-static ::-moz-selection{background-color:rgba(209,68,36,.25);color:inherit}.ProseMirror ::selection,.ProseMirror-static ::selection{background-color:rgba(209,68,36,.25);color:inherit}.ProseMirror p,.ProseMirror-static p{margin-top:var(--paragraphSpace)}.ProseMirror p:first-child,.ProseMirror-static p:first-child{margin-top:0}.ProseMirror ul,.ProseMirror-static ul{list-style-type:disc;padding-inline-start:1.25em}.ProseMirror ul li,.ProseMirror-static ul li{list-style-type:inherit;padding:2px 0}.ProseMirror ol,.ProseMirror-static ol{list-style-type:decimal;padding-inline-start:1.25em}.ProseMirror ol li,.ProseMirror-static ol li{list-style-type:inherit;padding:2px 0}.ProseMirror code,.ProseMirror-static code{background-color:#eee;padding:2px 6px;margin:0 1px;border-radius:4px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}.ProseMirror sup,.ProseMirror-static sup{vertical-align:super;font-size:smaller}.ProseMirror sub,.ProseMirror-static sub{vertical-align:sub;font-size:smaller}.ProseMirror blockquote,.ProseMirror-static blockquote{overflow:hidden;padding-right:1.2em;padding-left:1.2em;margin-left:0;margin-right:0;font-style:italic;border-left:4px solid #ddd}.ProseMirror [data-indent="1"],.ProseMirror-static [data-indent="1"]{padding-left:20px}.ProseMirror [data-indent="2"],.ProseMirror-static [data-indent="2"]{padding-left:40px}.ProseMirror [data-indent="3"],.ProseMirror-static [data-indent="3"]{padding-left:60px}.ProseMirror [data-indent="4"],.ProseMirror-static [data-indent="4"]{padding-left:80px}.ProseMirror [data-indent="5"],.ProseMirror-static [data-indent="5"]{padding-left:100px}.ProseMirror [data-indent="6"],.ProseMirror-static [data-indent="6"]{padding-left:120px}.ProseMirror [data-indent="7"],.ProseMirror-static [data-indent="7"]{padding-left:140px}.ProseMirror [data-indent="8"],.ProseMirror-static [data-indent="8"]{padding-left:160px}.ProseMirror-selectednode{outline:none!important}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline;box-sizing:border-box}:after,:before{box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,html{width:100%;height:100%;overflow:hidden;background-color:#fff;color:#41464b}body{font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}a{text-decoration:none;color:#d14424}img{vertical-align:middle;border-style:none}hr{box-sizing:content-box;height:0;overflow:visible}mark.active{background-color:#ff9632}button,input,optgroup,select,textarea{color:inherit}button,input{overflow:visible}button,select{text-transform:none}textarea{overflow:auto;resize:vertical}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}::-webkit-scrollbar{width:5px;height:5px;background-color:transparent}::-webkit-scrollbar-thumb{background-color:#c1c1c1}@font-face{font-display:swap;font-family:仓耳小丸子;src:url(../fonts/%E4%BB%93%E8%80%B3%E5%B0%8F%E4%B8%B8%E5%AD%90.64a7acb4.woff2) format("woff2")}@font-face{font-display:swap;font-family:优设标题黑;src:url(../fonts/%E4%BC%98%E8%AE%BE%E6%A0%87%E9%A2%98%E9%BB%91.df0c1330.woff2) format("woff2")}@font-face{font-display:swap;font-family:字制区喜脉体;src:url(../fonts/%E5%AD%97%E5%88%B6%E5%8C%BA%E5%96%9C%E8%84%89%E4%BD%93.cb8f58a4.woff2) format("woff2")}@font-face{font-display:swap;font-family:峰广明锐体;src:url(../fonts/%E5%B3%B0%E5%B9%BF%E6%98%8E%E9%94%90%E4%BD%93.8c45ca35.woff2) format("woff2")}@font-face{font-display:swap;font-family:得意黑;src:url(../fonts/%E5%BE%97%E6%84%8F%E9%BB%91.7caef6f6.woff2) format("woff2")}@font-face{font-display:swap;font-family:摄图摩登小方体;src:url(../fonts/%E6%91%84%E5%9B%BE%E6%91%A9%E7%99%BB%E5%B0%8F%E6%96%B9%E4%BD%93.7d229dc8.woff2) format("woff2")}@font-face{font-display:swap;font-family:站酷快乐体;src:url(../fonts/%E7%AB%99%E9%85%B7%E5%BF%AB%E4%B9%90%E4%BD%93.8fd3ebd9.woff2) format("woff2")}@font-face{font-display:swap;font-family:素材集市康康体;src:url(../fonts/%E7%B4%A0%E6%9D%90%E9%9B%86%E5%B8%82%E5%BA%B7%E5%BA%B7%E4%BD%93.ceb20972.woff2) format("woff2")}@font-face{font-display:swap;font-family:素材集市酷方体;src:url(../fonts/%E7%B4%A0%E6%9D%90%E9%9B%86%E5%B8%82%E9%85%B7%E6%96%B9%E4%BD%93.42328465.woff2) format("woff2")}@font-face{font-display:swap;font-family:途牛类圆体;src:url(../fonts/%E9%80%94%E7%89%9B%E7%B1%BB%E5%9C%86%E4%BD%93.a94398b6.woff2) format("woff2")}@font-face{font-display:swap;font-family:锐字真言体;src:url(../fonts/%E9%94%90%E5%AD%97%E7%9C%9F%E8%A8%80%E4%BD%93.487089ad.woff2) format("woff2")}.menu-content[data-v-77e74b43]{width:170px;padding:5px 0;background:#fff;border:1px solid #eee;box-shadow:3px 3px 3px rgba(0,0,0,.15);border-radius:2px;list-style:none;margin:0}.menu-item[data-v-77e74b43]{padding:0 20px;color:#555;font-size:12px;transition:all .1s;white-space:nowrap;height:30px;line-height:30px;background-color:#fff;cursor:pointer}.menu-item:not(.disable):hover>.menu-item-content>.sub-menu[data-v-77e74b43]{display:block}.menu-item:not(.disable):hover>.has-children.has-handler[data-v-77e74b43]:after{transform:scale(1)}.menu-item[data-v-77e74b43]:hover:not(.disable){background-color:rgba(209,68,36,.2)}.menu-item.divider[data-v-77e74b43]{height:1px;overflow:hidden;margin:5px;background-color:#e5e5e5;line-height:0;padding:0}.menu-item.disable[data-v-77e74b43]{color:#b1b1b1;cursor:no-drop}.menu-item-content[data-v-77e74b43]{display:flex;align-items:center;justify-content:space-between;position:relative}.menu-item-content.has-children[data-v-77e74b43]:before{content:"";display:inline-block;width:8px;height:8px;border-width:1px;border-style:solid;border-color:#666 #666 transparent transparent;position:absolute;right:0;top:50%;transform:translateY(-50%) rotate(45deg)}.menu-item-content.has-children.has-handler[data-v-77e74b43]:after{content:"";display:inline-block;width:1px;height:24px;background-color:#f1f1f1;position:absolute;right:18px;top:3px;transform:scale(0);transition:transform .2s}.menu-item-content .sub-text[data-v-77e74b43]{opacity:.6}.menu-item-content .sub-menu[data-v-77e74b43]{width:120px;position:absolute;display:none;left:112%;top:-6px}.mask{position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:9998}.contextmenu{position:fixed;z-index:9999;-webkit-user-select:none;-moz-user-select:none;user-select:none}.tippy-box[data-theme~=tooltip]{background-color:#262626;color:#fff;border-radius:2px;padding:8px;font-size:12px;line-height:1.5}.tippy-box[data-theme~=tooltip] .tippy-arrow{width:12px;height:12px;color:#262626}.tippy-box[data-theme~=tooltip] .tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-box[data-theme~=tooltip][data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-theme~=tooltip][data-placement^=top]>.tippy-arrow:before{bottom:-5px;left:0;border-width:6px 6px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-theme~=tooltip][data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-theme~=tooltip][data-placement^=bottom]>.tippy-arrow:before{top:-5px;left:0;border-width:0 6px 6px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-theme~=tooltip][data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-theme~=tooltip][data-placement^=left]>.tippy-arrow:before{border-width:6px 0 6px 6px;border-left-color:initial;right:-5px;transform-origin:center left}.tippy-box[data-theme~=tooltip][data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-theme~=tooltip][data-placement^=right]>.tippy-arrow:before{left:-5px;border-width:6px 6px 6px 0;border-right-color:initial;transform-origin:center right} \ No newline at end of file diff --git a/index.html b/index.html index 85bc98e5..d01f2e45 100644 --- a/index.html +++ b/index.html @@ -30,4 +30,4 @@ 100% { transform: rotate(360deg); } - }
正在加载中,请稍等 ...
\ No newline at end of file + }
正在加载中,请稍等 ...
\ No newline at end of file diff --git a/js/app.04af034d.js b/js/app.04af034d.js new file mode 100644 index 00000000..e8b2f70f --- /dev/null +++ b/js/app.04af034d.js @@ -0,0 +1,2 @@ +(function(){var e={2078:function(e,t,l){"use strict";var a,n=l(9963),o=l(9876),i=(l(7658),l(6252)),s=l(2262),r=l(3416);(function(e){e["SYMBOL"]="symbol",e["EL_ANIMATION"]="elAnimation",e["EL_STYLE"]="elStyle",e["EL_POSITION"]="elPosition",e["SLIDE_DESIGN"]="slideDesign",e["SLIDE_ANIMATION"]="slideAnimation",e["MULTI_POSITION"]="multiPosition"})(a||(a={}));var u=l(5804);const c=(e,t)=>e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list,d=e=>{const{empty:t}=e.state.selection;t&&(0,u.td)(e.state,e.dispatch)},p=(e,t,l)=>{if(l)e.dispatch(e.state.tr.addMark(l.from,l.to,t));else{const{$from:l,$to:a}=e.state.selection;e.dispatch(e.state.tr.addMark(l.pos,a.pos,t))}},v=(e,t,l,a)=>{let n=t;const o=e=>e.type===a;let i=null,s=null,r=null;while(n<=l){const t=e.nodeAt(n);if(!t||!t.marks)return null;const l=t.marks.find(o);if(!l)return null;if(i&&l!==i)return null;s=s||t,i=i||l,r=t,n++}let u=t,c=l,d=0;n=t-1;while(n>d){const t=e.nodeAt(n),l=t&&t.marks.find(o);if(!l||l!==i)break;u=n,s=t,n--}n=l+1,d=e.nodeSize-2;while(nArray.isArray(e)&&e.indexOf(t.type)>-1||t.type===e,h=(e,t)=>{for(let l=e.depth;l>0;l--){const a=e.node(l);if(t(a))return{pos:l>0?e.before(l):0,start:e.start(l),depth:l,node:a}}},f=e=>t=>h(t.$from,e),g=e=>t=>f((t=>m(e,t)))(t),y=(e,t)=>{const l=t.schema.nodes[e];return!!g(l)(t.selection)},w=e=>e?"text"===e.type.name?e:e.lastChild?w(e.lastChild):null:null,x=e=>{const{selection:t,doc:l}=e.state,{from:a}=t;let n=l.nodeAt(a)||l.nodeAt(a-1);return n=w(n),n?.marks||[]},k=(e,t,l)=>{for(const a of e)if(a.type.name===t&&a.attrs[l])return a.attrs[l];return null},b=(e,t)=>{for(const l of e)if(l.type.name===t)return!0;return!1},_=(e,t)=>{const{from:l,$from:a,to:n,empty:o}=e.selection;return o?t.isInSet(e.storedMarks||a.marks()):e.doc.rangeHasMark(l,n,t)},I=(e,t)=>{const{selection:l,doc:a}=e.state,{from:n,to:o}=l;let i=!0,s="";return a.nodesBetween(n,o,(e=>(i&&e.attrs[t]&&(i=!1,s=e.attrs[t]),i))),s},S={color:"#000",backcolor:"",fontsize:"20px",fontname:"微软雅黑",align:"left"},C=(e,t={})=>{const l={...S,...t},a=x(e),n=b(a,"strong"),o=b(a,"em"),i=b(a,"underline"),s=b(a,"strikethrough"),r=b(a,"superscript"),u=b(a,"subscript"),c=b(a,"code"),d=k(a,"forecolor","color")||l.color,p=k(a,"backcolor","backcolor")||l.backcolor,v=k(a,"fontsize","fontsize")||l.fontsize,m=k(a,"fontname","fontname")||l.fontname,h=k(a,"link","href")||"",f=I(e,"align")||l.align,g=y("bullet_list",e.state),w=y("ordered_list",e.state),_=y("blockquote",e.state);return{bold:n,em:o,underline:i,strikethrough:s,superscript:r,subscript:u,code:c,color:d,backcolor:p,fontsize:v,fontname:m,link:h,align:f,bulletList:g,orderedList:w,blockquote:_}},L=e=>{const t=x(e),l=k(t,"fontsize","fontsize")||S.fontsize;return parseInt(l)},T={bold:!1,em:!1,underline:!1,strikethrough:!1,superscript:!1,subscript:!1,code:!1,color:"#000",backcolor:"",fontsize:"20px",fontname:"微软雅黑",link:"",align:"left",bulletList:!1,orderedList:!1,blockquote:!1},E=[{label:"Arial",value:"Arial"},{label:"微软雅黑",value:"Microsoft Yahei"},{label:"宋体",value:"SimSun"},{label:"黑体",value:"SimHei"},{label:"楷体",value:"KaiTi"},{label:"新宋体",value:"NSimSun"},{label:"仿宋",value:"FangSong"},{label:"苹方",value:"PingFang SC"},{label:"华文黑体",value:"STHeiti"},{label:"华文楷体",value:"STKaiti"},{label:"华文宋体",value:"STSong"},{label:"华文仿宋",value:"STFangSong"},{label:"华文中宋",value:"STZhongSong"},{label:"华文琥珀",value:"STHupo"},{label:"华文新魏",value:"STXinwei"},{label:"华文隶书",value:"STLiti"},{label:"华文行楷",value:"STXingkai"},{label:"冬青黑体",value:"Hiragino Sans GB"},{label:"兰亭黑",value:"Lantinghei SC"},{label:"偏偏体",value:"Hanzipen SC"},{label:"手札体",value:"Hannotate SC"},{label:"宋体",value:"Songti SC"},{label:"娃娃体",value:"Wawati SC"},{label:"行楷",value:"Xingkai SC"},{label:"圆体",value:"Yuanti SC"},{label:"华文细黑",value:"STXihei"},{label:"幼圆",value:"YouYuan"},{label:"隶书",value:"LiSu"}],M=[{label:"得意黑",value:"得意黑"},{label:"仓耳小丸子",value:"仓耳小丸子"},{label:"优设标题黑",value:"优设标题黑"},{label:"峰广明锐体",value:"峰广明锐体"},{label:"摄图摩登小方体",value:"摄图摩登小方体"},{label:"站酷快乐体",value:"站酷快乐体"},{label:"字制区喜脉体",value:"字制区喜脉体"},{label:"素材集市康康体",value:"素材集市康康体"},{label:"素材集市酷方体",value:"素材集市酷方体"},{label:"途牛类圆体",value:"途牛类圆体"},{label:"锐字真言体",value:"锐字真言体"}],U=e=>{if("string"!==typeof e)return!1;const t="Arial";if(e.toLowerCase()===t.toLowerCase())return!0;const l=100,a=100,n=100,o="a",i=document.createElement("canvas"),s=i.getContext("2d",{willReadFrequently:!0});if(!s)return!1;i.width=a,i.height=n,s.textAlign="center",s.fillStyle="black",s.textBaseline="middle";const r=e=>{s.clearRect(0,0,a,n),s.font=`${l}px ${e}, ${t}`,s.fillText(o,a/2,n/2);const i=s.getImageData(0,0,a,n).data;return[].slice.call(i).filter((e=>0!==e))};return r(t).join("")!==r(e).join("")};var W=l(7234),D=l(6486);const H=[{id:"test-slide-1",elements:[{type:"shape",id:"4cbRxp",left:0,top:200,width:546,height:362.5,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"#5b9bd5",fixedRatio:!1,opacity:.7,rotate:0},{type:"shape",id:"ookHrf",left:0,top:0,width:300,height:320,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"#5b9bd5",fixedRatio:!1,flipV:!0,rotate:0},{type:"text",id:"idn7Mx",left:355,top:65.25,width:585,height:188,lineHeight:1.2,content:"

PPTIST

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"

基于 Vue 3.x + TypeScript 的在线演示文稿应用

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"line",id:"FnpZs4",left:361,top:238,start:[0,0],end:[549,0],points:["",""],color:"#5b9bd5",style:"solid",width:2}],background:{type:"solid",color:"#ffffff"}},{id:"test-slide-2",elements:[{type:"text",id:"ptNnUJ",left:145,top:148,width:711,height:77,lineHeight:1.2,content:"

在此处添加标题

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"

在此处添加副标题

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"line",id:"7CQDwc",left:323.09259259259267,top:238.33333333333334,start:[0,0],end:[354.8148148148148,0],points:["",""],color:"#5b9bd5",style:"solid",width:4},{type:"shape",id:"09wqWw",left:-27.648148148148138,top:432.73148148148147,width:1056.2962962962963,height:162.96296296296296,viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"#fff"}},{id:"test-slide-3",elements:[{type:"shape",id:"vSheCJ",left:183.5185185185185,top:175.5092592592593,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0},{type:"shape",id:"Mpwv7x",left:211.29629629629628,top:201.80555555555557,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0,opacity:.7},{type:"text",id:"WQOTAp",left:304.9074074074074,top:198.10185185185182,width:417.9629629629629,height:140,content:"

感谢观看

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333",wordSpace:5}],background:{type:"solid",color:"#fff"}}],F={themeColor:"#5b9bd5",fontColor:"#333",fontName:"Microsoft Yahei",backgroundColor:"#fff",shadow:{h:3,v:3,blur:2,color:"#808080"},outline:{width:2,color:"#525252",style:"solid"}},A=[{id:"template",elements:[{type:"shape",id:"4cbRxp",left:0,top:200,width:546,height:362.5,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"{{themeColor}}",fixedRatio:!1,opacity:.7,rotate:0},{type:"shape",id:"ookHrf",left:0,top:0,width:300,height:320,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"{{themeColor}}",fixedRatio:!1,flipV:!0,rotate:0},{type:"text",id:"AkIh3E",left:355,top:95.11111111111111,width:585,height:116,lineHeight:1.2,content:"

输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:6},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"

请在此处输入副标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"line",id:"FnpZs4",left:361,top:238,start:[0,0],end:[549,0],points:["",""],color:"{{themeColor}}",style:"solid",width:2}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"ptNnUJ",left:145,top:148,width:711,height:77,lineHeight:1.2,content:"

在此处添加标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"

在此处添加副标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"line",id:"7CQDwc",left:323.09259259259267,top:238.33333333333334,start:[0,0],end:[354.8148148148148,0],points:["",""],color:"{{themeColor}}",style:"solid",width:4},{type:"shape",id:"09wqWw",left:-27.648148148148138,top:432.73148148148147,width:1056.2962962962963,height:162.96296296296296,viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"vSheCJ",left:183.5185185185185,top:175.5092592592593,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0},{type:"shape",id:"Mpwv7x",left:211.29629629629628,top:201.80555555555557,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,opacity:.7},{type:"text",id:"WQOTAp",left:304.9074074074074,top:198.10185185185182,width:417.9629629629629,height:140,content:"

感谢观看

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:5}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"MZVO1kkj",elements:[{type:"shape",id:"cql0h8",left:0,top:0,width:352.59259259259255,height:562.5,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0},{type:"shape",id:"_RTaF4",left:171.4814814814814,top:100.13888888888887,width:362.22222222222223,height:362.22222222222223,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"rgba(255,255,255,0)",fixedRatio:!1,rotate:0,outline:{width:10,color:"{{backgroundColor}}",style:"solid"}},{type:"shape",id:"UZfo8N",left:216.66666666666663,top:145.32407407407408,width:271.85185185185185,height:271.85185185185185,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0,text:{content:"

01

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"ysqtBg",left:561.4814814814814,top:100.1388888888889,width:359.25925925925924,height:80,content:"

在此处输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"lXsoHa",left:572.5925925925925,top:202.3611111111111,width:257.77777777777777,height:260,content:"
  1. 在此处输入内容

  2. 在此处输入内容

  3. 在此处输入内容

  4. 在此处输入内容

  5. 在此处输入内容

  6. 在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",lineHeight:2,fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"EBBnTr",left:360.5996472663139,top:141.8496472663139,width:278.80070546737215,height:278.80070546737215,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:0,color:"{{backgroundColor}}",style:"solid"}},{type:"shape",id:"gDIWDH",left:456.4373897707231,top:98.287037037037,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

1

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"DUWT7E",left:317.037037037037,top:237.68738977072314,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

4

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"pbhn38",left:456.43738977072303,top:377.08774250440916,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

3

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"CvMKrO",left:595.8377425044091,top:237.6873897707231,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

2

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"adudHB",left:402.962962962963,top:39.39814814814815,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"9UpDwg",left:402.962962962963,top:473.1018518518518,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"GERdpB",left:111.48148148148151,top:256.25,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"G5qoho",left:691.1111111111111,top:256.25,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"shape",id:"vdZcI6",left:415.18518518518516,top:196.4351851851852,width:169.62962962962962,height:169.62962962962962,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"tYUmrx",left:156.66666666666683,top:149.02777777777771,width:264.4444444444445,height:264.4444444444445,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

01

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"0GVHf8",left:342.2222222222223,top:217.17592592592587,width:128.14814814814812,height:128.14814814814812,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0},{type:"text",id:"BO33Sv",left:378.8888888888889,top:235.24999999999994,width:464.4444444444444,height:92,content:"

在此处添加标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"Hj7ttp",left:69.35185185185185,top:49.21759259259262,width:420,height:63,lineHeight:1.2,content:"

1.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"FmKMNB",left:69.35185185185185,top:129.28240740740745,width:420,height:384,content:"

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"rI7ZeO",left:510.64814814814815,top:49.21759259259262,width:420,height:63,lineHeight:1.2,content:"

2.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"KspwGc",left:510.64814814814815,top:129.28240740740745,width:420,height:384,content:"

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"Rx63Jo",left:69.35185185185179,top:51.71759259259262,width:420,height:58,lineHeight:1.2,content:"

1.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"ulyuzE",left:69.35185185185179,top:131.78240740740745,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"kr35Ca",left:510.6481481481481,top:51.71759259259262,width:420,height:58,lineHeight:1.2,content:"

2.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"BNQSpC",left:510.6481481481481,top:131.78240740740745,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"Vr38Nu",left:69.35185185185185,top:301.71759259259255,width:420,height:58,lineHeight:1.2,content:"

3.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"IwKRSu",left:69.35185185185185,top:381.7824074074074,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"0Opr1v",left:510.64814814814815,top:301.71759259259255,width:420,height:58,lineHeight:1.2,content:"

4.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"4L9Uzz",left:510.64814814814815,top:381.7824074074074,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"GdEGxg",left:134.53703703703704,top:127.25,width:152.77777777777777,height:308,lineHeight:1.8,content:"

请在此处输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:8,fill:"{{themeColor}}"},{type:"text",id:"y5sAfw",left:332.8703703703704,top:127.25,width:532.5925925925926,height:50,content:"

请在此处输入内容1

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"VeuocM",left:332.8703703703704,top:212.0648148148148,width:532.5925925925926,height:50,content:"

请在此处输入内容2

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"RyFWQe",left:332.8703703703704,top:296.8796296296296,width:532.5925925925926,height:50,content:"

请在此处输入内容3

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"Q56viI",left:332.8703703703704,top:381.69444444444446,width:532.5925925925926,height:50,content:"

请在此处输入内容4

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"SUWirT",left:73.8888888888889,top:64.21296296296302,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

1

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"YjzN1M",left:148.70370370370372,top:64.21296296296302,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"fS09I7",left:527.5925925925926,top:64.21296296296302,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

2

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"qCnfB1",left:602.4074074074074,top:64.21296296296302,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"difAAT",left:73.8888888888889,top:221.25000000000003,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

3

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"EUlvMo",left:148.70370370370372,top:221.25000000000003,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"US_9jB",left:527.5925925925926,top:221.25000000000003,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

4

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"243MnQ",left:602.4074074074074,top:221.25000000000003,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"Y_KUj0",left:73.8888888888889,top:378.287037037037,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

5

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"9GglMe",left:148.70370370370372,top:378.287037037037,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"eSInje",left:527.5925925925926,top:378.287037037037,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

6

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"0S3yUg",left:602.4074074074074,top:378.287037037037,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}}],$=(0,o.Q_)("slides",{state:()=>({title:"未命名演示文稿",theme:F,slides:H,slideIndex:0,viewportRatio:.5625}),getters:{currentSlide(e){return e.slides[e.slideIndex]},currentSlideAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const l=t.elements,a=l.map((e=>e.id));return t.animations.filter((e=>a.includes(e.elId)))},formatedAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const l=t.elements,a=l.map((e=>e.id)),n=t.animations.filter((e=>a.includes(e.elId))),o=[];for(const i of n)if("click"!==i.trigger&&o.length){if("meantime"===i.trigger){const e=o[o.length-1];e.animations=e.animations.filter((e=>e.elId!==i.elId)),e.animations.push(i),o[o.length-1]=e}else if("auto"===i.trigger){const e=o[o.length-1];e.autoNext=!0,o[o.length-1]=e,o.push({animations:[i],autoNext:!1})}}else o.push({animations:[i],autoNext:!1});return o},layouts(e){const{themeColor:t,fontColor:l,fontName:a,backgroundColor:n}=e.theme,o=(0,W.Z)(l).isDark()?"rgba(230, 230, 230, 0.5)":"rgba(180, 180, 180, 0.5)",i=JSON.stringify(A).replaceAll("{{themeColor}}",t).replaceAll("{{fontColor}}",l).replaceAll("{{fontName}}",a).replaceAll("{{backgroundColor}}",n).replaceAll("{{subColor}}",o);return JSON.parse(i)}},actions:{setTitle(e){this.title=e||"未命名演示文稿"},setTheme(e){this.theme={...this.theme,...e}},setViewportRatio(e){this.viewportRatio=e},setSlides(e){this.slides=e},addSlide(e){const t=Array.isArray(e)?e:[e],l=this.slideIndex+1;this.slides.splice(l,0,...t),this.slideIndex=l},updateSlide(e){const t=this.slideIndex;this.slides[t]={...this.slides[t],...e}},deleteSlide(e){const t=Array.isArray(e)?e:[e],l=[];for(let o=0;oe.id===t[o]));l.push(e)}let a=Math.min(...l);const n=this.slides.length-t.length-1;a>n&&(a=n),this.slideIndex=a,this.slides=this.slides.filter((e=>!t.includes(e.id)))},updateSlideIndex(e){this.slideIndex=e},addElement(e){const t=Array.isArray(e)?e:[e],l=this.slides[this.slideIndex].elements,a=[...l,...t];this.slides[this.slideIndex].elements=a},deleteElement(e){const t=Array.isArray(e)?e:[e],l=this.slides[this.slideIndex].elements,a=l.filter((e=>!t.includes(e.id)));this.slides[this.slideIndex].elements=a},updateElement(e){const{id:t,props:l,slideId:a}=e,n="string"===typeof t?[t]:t,o=a?this.slides.findIndex((e=>e.id===a)):this.slideIndex,i=this.slides[o],s=i.elements.map((e=>n.includes(e.id)?{...e,...l}:e));this.slides[o].elements=s},removeElementProps(e){const{id:t,propName:l}=e,a="string"===typeof l?[l]:l,n=this.slideIndex,o=this.slides[n],i=o.elements.map((e=>e.id===t?(0,D.omit)(e,a):e));this.slides[n].elements=i}}}),Z=(0,r.kP)("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"),O=Z(10),R=(0,o.Q_)("main",{state:()=>({activeElementIdList:[],handleElementId:"",activeGroupElementId:"",hiddenElementIdList:[],canvasPercentage:90,canvasScale:1,canvasDragged:!1,thumbnailsFocus:!1,editorAreaFocus:!1,disableHotkeys:!1,gridLineSize:0,showRuler:!1,creatingElement:null,creatingCustomShape:!1,availableFonts:E,toolbarState:a.SLIDE_DESIGN,clipingImageElementId:"",richTextAttrs:T,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],dialogForExport:"",databaseId:O,textFormatPainter:null,shapeFormatPainter:null,showSelectPanel:!1,showSearchPanel:!1}),getters:{activeElementList(e){const t=$(),l=t.currentSlide;return l&&l.elements?l.elements.filter((t=>e.activeElementIdList.includes(t.id))):[]},handleElement(e){const t=$(),l=t.currentSlide;return l&&l.elements&&l.elements.find((t=>e.handleElementId===t.id))||null}},actions:{setActiveElementIdList(e){1===e.length?this.handleElementId=e[0]:this.handleElementId="",this.activeElementIdList=e},setHandleElementId(e){this.handleElementId=e},setActiveGroupElementId(e){this.activeGroupElementId=e},setHiddenElementIdList(e){this.hiddenElementIdList=e},setCanvasPercentage(e){this.canvasPercentage=e},setCanvasScale(e){this.canvasScale=e},setCanvasDragged(e){this.canvasDragged=e},setThumbnailsFocus(e){this.thumbnailsFocus=e},setEditorareaFocus(e){this.editorAreaFocus=e},setDisableHotkeysState(e){this.disableHotkeys=e},setGridLineSize(e){this.gridLineSize=e},setRulerState(e){this.showRuler=e},setCreatingElement(e){this.creatingElement=e},setCreatingCustomShapeState(e){this.creatingCustomShape=e},setAvailableFonts(){this.availableFonts=E.filter((e=>U(e.value)))},setToolbarState(e){this.toolbarState=e},setClipingImageElementId(e){this.clipingImageElementId=e},setRichtextAttrs(e){this.richTextAttrs=e},setSelectedTableCells(e){this.selectedTableCells=e},setScalingState(e){this.isScaling=e},updateSelectedSlidesIndex(e){this.selectedSlidesIndex=e},setDialogForExport(e){this.dialogForExport=e},setTextFormatPainter(e){this.textFormatPainter=e},setShapeFormatPainter(e){this.shapeFormatPainter=e},setSelectPanelState(e){this.showSelectPanel=e},setSearchPanelState(e){this.showSearchPanel=e}}});var z=l(7327),P=l(8134);const B="PPTIST_DISCARDED_DB",N="PPTist",j=async()=>{const e=(new Date).getTime(),t=localStorage.getItem(B),l=t?JSON.parse(t):[],a=await P.Z.getDatabaseNames(),n=a.filter((t=>{if(-1===t.indexOf(N))return!1;const[a,n,o]=t.split("_");return a!==N||!n||!o||(!!l.includes(n)||e-+o>=432e5)}));for(const o of n)P.Z.delete(o);localStorage.removeItem(B)};class Y extends P.Z{constructor(){super(`${N}_${O}_${(new Date).getTime()}`),(0,z.Z)(this,"snapshots",void 0),(0,z.Z)(this,"writingBoardImgs",void 0),this.version(1).stores({snapshots:"++id",writingBoardImgs:"++id"}),this.snapshots=this.table("snapshots"),this.writingBoardImgs=this.table("writingBoardImgs")}}const V=new Y,J=(0,o.Q_)("snapshot",{state:()=>({snapshotCursor:-1,snapshotLength:0}),getters:{canUndo(e){return e.snapshotCursor>0},canRedo(e){return e.snapshotCursor=0&&this.snapshotCursoro&&(l.push(t[0]),n--),n>=2&&V.snapshots.update(t[n-2],{index:e.slideIndex}),await V.snapshots.bulkDelete(l),this.setSnapshotCursor(n-1),this.setSnapshotLength(n)},async unDo(){if(this.snapshotCursor<=0)return;const e=$(),t=R(),l=this.snapshotCursor-1,a=await V.snapshots.orderBy("id").toArray(),n=a[l],{index:o,slides:i}=n,s=o>i.length-1?i.length-1:o;e.setSlides(i),e.updateSlideIndex(s),this.setSnapshotCursor(l),t.setActiveElementIdList([])},async reDo(){if(this.snapshotCursor>=this.snapshotLength-1)return;const e=$(),t=R(),l=this.snapshotCursor+1,a=await V.snapshots.orderBy("id").toArray(),n=a[l],{index:o,slides:i}=n,s=o>i.length-1?i.length-1:o;e.setSlides(i),e.updateSlideIndex(s),this.setSnapshotCursor(l),t.setActiveElementIdList([])}}}),q=(0,o.Q_)("keyboard",{state:()=>({ctrlKeyState:!1,shiftKeyState:!1,spaceKeyState:!1}),getters:{ctrlOrShiftKeyActive(e){return e.ctrlKeyState||e.shiftKeyState}},actions:{setCtrlKeyState(e){this.ctrlKeyState=e},setShiftKeyState(e){this.shiftKeyState=e},setSpaceKeyState(e){this.spaceKeyState=e}}}),X=(0,o.Q_)("screen",{state:()=>({screening:!1}),actions:{setScreening(e){this.screening=e}}}),G=(e,t)=>(0,D.padStart)(""+e,t,"0"),K=()=>!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile|BlackBerry|Symbian|Windows Phone)/i);var Q,ee,te,le,ae,ne,oe=l(3577);(function(e){e["UP"]="up",e["DOWN"]="down",e["TOP"]="top",e["BOTTOM"]="bottom"})(Q||(Q={})),function(e){e["TOP"]="top",e["BOTTOM"]="bottom",e["LEFT"]="left",e["RIGHT"]="right",e["VERTICAL"]="vertical",e["HORIZONTAL"]="horizontal",e["CENTER"]="center"}(ee||(ee={})),function(e){e["T"]="top",e["B"]="bottom",e["L"]="left",e["R"]="right"}(te||(te={})),function(e){e["LEFT_TOP"]="left-top",e["TOP"]="top",e["RIGHT_TOP"]="right-top",e["LEFT"]="left",e["RIGHT"]="right",e["LEFT_BOTTOM"]="left-bottom",e["BOTTOM"]="bottom",e["RIGHT_BOTTOM"]="right-bottom"}(le||(le={})),function(e){e["START"]="start",e["END"]="end",e["C"]="ctrl",e["C1"]="ctrl1",e["C2"]="ctrl2"}(ae||(ae={})),function(e){e["C"]="C",e["X"]="X",e["Z"]="Z",e["Y"]="Y",e["A"]="A",e["G"]="G",e["L"]="L",e["F"]="F",e["D"]="D",e["B"]="B",e["P"]="P",e["MINUS"]="-",e["EQUAL"]="=",e["DIGIT_0"]="0",e["DELETE"]="DELETE",e["UP"]="ARROWUP",e["DOWN"]="ARROWDOWN",e["LEFT"]="ARROWLEFT",e["RIGHT"]="ARROWRIGHT",e["ENTER"]="ENTER",e["SPACE"]=" ",e["TAB"]="TAB",e["BACKSPACE"]="BACKSPACE",e["ESC"]="ESCAPE",e["PAGEUP"]="PAGEUP",e["PAGEDOWN"]="PAGEDOWN",e["F5"]="F5"}(ne||(ne={}));const ie=[{type:"通用",children:[{label:"剪切",value:"Ctrl + X"},{label:"复制",value:"Ctrl + C"},{label:"粘贴",value:"Ctrl + V"},{label:"粘贴为纯文本",value:"Ctrl + Shift + V"},{label:"快速复制粘贴",value:"Ctrl + D"},{label:"全选",value:"Ctrl + A"},{label:"撤销",value:"Ctrl + Z"},{label:"恢复",value:"Ctrl + Y"},{label:"删除",value:"Delete / Backspace"},{label:"多选",value:"按住 Ctrl 或 Shift"},{label:"打开搜索替换",value:"Ctrl + F"},{label:"打印",value:"Ctrl + P"},{label:"关闭弹窗",value:"ESC"}]},{type:"幻灯片放映",children:[{label:"从头开始放映幻灯片",value:"F5"},{label:"从当前开始放映幻灯片",value:"Shift + F5"},{label:"切换上一页",value:"↑ / ← / PgUp"},{label:"切换下一页",value:"↓ / → / PgDown"},{label:"切换下一页",value:"Enter / Space"},{label:"退出放映",value:"ESC"}]},{type:"幻灯片编辑",children:[{label:"新建幻灯片",value:"Enter"},{label:"移动画布",value:"Space + 鼠标拖拽"},{label:"缩放画布",value:"Ctrl + 鼠标滚轮"},{label:"放大画布",value:"Ctrl + ="},{label:"缩小画布",value:"Ctrl + -"},{label:"使画布适应当前屏幕",value:"Ctrl + 0"},{label:"上一页(未选中元素)",value:"↑ / ←"},{label:"下一页(未选中元素)",value:"↓ / →"},{label:"上一页",value:"鼠标上滚 / PgUp"},{label:"下一页",value:"鼠标下滚 / PgDown"}]},{type:"元素操作",children:[{label:"移动",value:"↑ / ← / ↓ / →"},{label:"锁定",value:"Ctrl + L"},{label:"组合",value:"Ctrl + G"},{label:"取消组合",value:"Ctrl + Shift + G"},{label:"置顶层",value:"Alt + F"},{label:"置底层",value:"Alt + B"},{label:"锁定宽高比例",value:"按住 Ctrl 或 Shift"},{label:"创建水平 / 垂直线条",value:"按住 Ctrl 或 Shift"},{label:"切换焦点元素",value:"Tab"},{label:"确认图片裁剪",value:"Enter"},{label:"完成自定义形状绘制",value:"Enter"}]},{type:"表格编辑",children:[{label:"聚焦到下一个单元格",value:"Tab"},{label:"在上方插入一行",value:"Ctrl + ↑"},{label:"在下方插入一行",value:"Ctrl + ↓"},{label:"在左侧插入一列",value:"Ctrl + ←"},{label:"在右侧插入一列",value:"Ctrl + →"}]},{type:"图表数据编辑",children:[{label:"聚焦到下一行",value:"Enter"}]},{type:"文本编辑",children:[{label:"加粗",value:"Ctrl + B"},{label:"斜体",value:"Ctrl + I"},{label:"下划线",value:"Ctrl + U"},{label:"行内代码",value:"Ctrl + E"},{label:"上角标",value:"Ctrl + ;"},{label:"下角标",value:"Ctrl + '"},{label:"选中段落",value:"ESC"}]}];var se=l(2152),re=l.n(se),ue=l(1354),ce=l.n(ue);const de="pptist",pe=e=>ce().AES.encrypt(e,de).toString(),ve=e=>{const t=ce().AES.decrypt(e,de);return t.toString(ce().enc.Utf8)},me=e=>new Promise(((t,l)=>{const a=document.createElement("button"),n=new(re())(a,{text:()=>e,action:()=>"copy",container:document.body});n.on("success",(e=>{n.destroy(),t(e)})),n.on("error",(e=>{n.destroy(),l(e)})),document.body.appendChild(a),a.click(),document.body.removeChild(a)})),he=()=>new Promise(((e,t)=>{navigator.clipboard?.readText?navigator.clipboard.readText().then((l=>(l||t("剪贴板为空或者不包含文本"),e(l)))):t("浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V")})),fe=e=>{let t;try{t=JSON.parse(ve(e))}catch{t=e}return t},ge=e=>{const t=e.split("\r\n");""===t[t.length-1]&&t.pop();let l=-1;const a=[];for(const n in t){if(a[n]=t[n].split("\t"),1===a[n].length)return null;if(-1===l)l=a[n].length;else if(l!==a[n].length)return null}return a},ye=e=>{const{left:t,top:l,width:a,height:n,rotate:o=0}=e,i=Math.sqrt(Math.pow(a,2)+Math.pow(n,2))/2,s=180*Math.atan(n/a)/Math.PI,r=(180-o-s)*Math.PI/180,u=(s-o)*Math.PI/180,c=t+a/2,d=l+n/2,p=[c+i*Math.cos(r),c+i*Math.cos(u),c-i*Math.cos(r),c-i*Math.cos(u)],v=[d-i*Math.sin(r),d-i*Math.sin(u),d+i*Math.sin(r),d+i*Math.sin(u)];return{xRange:[Math.min(...p),Math.max(...p)],yRange:[Math.min(...v),Math.max(...v)]}},we=e=>{const{xRange:t,yRange:l}=ye({left:e.left,top:e.top,width:e.width,height:e.height,rotate:0}),{xRange:a,yRange:n}=ye({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});return{offsetX:a[0]-t[0],offsetY:n[0]-l[0]}},xe=e=>{let t,l,a,n;if("line"===e.type)t=e.left,l=e.left+Math.max(e.start[0],e.end[0]),a=e.top,n=e.top+Math.max(e.start[1],e.end[1]);else if("rotate"in e&&e.rotate){const{left:o,top:i,width:s,height:r,rotate:u}=e,{xRange:c,yRange:d}=ye({left:o,top:i,width:s,height:r,rotate:u});t=c[0],l=c[1],a=d[0],n=d[1]}else t=e.left,l=e.left+e.width,a=e.top,n=e.top+e.height;return{minX:t,maxX:l,minY:a,maxY:n}},ke=e=>{const t=[],l=[],a=[],n=[];e.forEach((e=>{const{minX:o,maxX:i,minY:s,maxY:r}=xe(e);t.push(o),l.push(s),a.push(i),n.push(r)}));const o=Math.min(...t),i=Math.max(...a),s=Math.min(...l),r=Math.max(...n);return{minX:o,maxX:i,minY:s,maxY:r}},be=e=>{const t=[];return e.forEach((e=>{const l=t.findIndex((t=>t.value===e.value));if(-1===l)t.push(e);else{const a=t[l],n=Math.min(a.range[0],e.range[0]),o=Math.max(a.range[1],e.range[1]),i=[n,o],s={value:e.value,range:i};t[l]=s}})),t},_e=e=>{const t={};for(const l of e)t[l.id]=(0,r.x0)(10);return t},Ie=e=>{const t={},l={};for(const a of e){const e=a.groupId;e&&!t[e]&&(t[e]=(0,r.x0)(10)),l[a.id]=(0,r.x0)(10)}return{groupIdMap:t,elIdMap:l}},Se=e=>{const t=(0,W.Z)(e);return[t.setAlpha(.3).toRgbString(),t.setAlpha(.1).toRgbString()]},Ce=e=>{const t=e.start.join(","),l=e.end.join(",");if(e.broken){const a=e.broken.join(",");return`M${t} L${a} L${l}`}if(e.curve){const a=e.curve.join(",");return`M${t} Q${a} ${l}`}if(e.cubic){const[a,n]=e.cubic,o=a.join(","),i=n.join(",");return`M${t} C${o} ${i} ${l}`}return`M${t} L${l}`},Le=(e,t)=>{const l=e.getBoundingClientRect(),a=t.getBoundingClientRect();return l.top>=a.top&&l.bottom<=a.bottom};var Te=l(6108),Ee=l(1061),Me=l(8261),Ue=l(9512),We=l(2025),De=l(9872),He=l(1321),Fe=l(2696),Ae=l(3271),$e=l(9015),Ze=l(5761),Oe=l(7559),Re=l(4023),ze=l(4141),Pe=l(5010),Be=l(6492),Ne=l(1094),je=l(2677),Ye=l(683),Ve=l(7259),Je=l(1258),qe=l(9978),Xe=l(597),Ge=l(85),Ke=l(6071),Qe=l(2489),et=l(9925),tt=l(5361),lt=l(3185),at=l(139),nt=l(8461),ot=l(2882),it=l(3862),st=l(3764),rt=l(9371),ut=l(9912),ct=l(3935),dt=l(3735),pt=l(3542),vt=l(7537),mt=l(5314),ht=l(3325),ft=l(3275),gt=l(3317),yt=l(7712),wt=l(9370),xt=l(2778),kt=l(4422),bt=l(4957),_t=l(7872),It=l(5356),St=l(8684),Ct=l(9577),Lt=l(887),Tt=l(6866),Et=l(509),Mt=l(7606),Ut=l(4412),Wt=l(8814),Dt=l(2057),Ht=l(6048),Ft=l(5114),At=l(9917),$t=l(7747),Zt=l(7425),Ot=l(6717),Rt=l(6302),zt=l(3060),Pt=l(7107),Bt=l(2100),Nt=l(5460),jt=l(5268),Yt=l(1432),Vt=l(5193),Jt=l(4566),qt=l(7091),Xt=l(9602),Gt=l(4891),Kt=l(4012),Qt=l(3681),el=l(1440),tl=l(3482),ll=l(646),al=l(8e3),nl=l(4628),ol=l(9141),il=l(1060),sl=l(8389),rl=l(3467),ul=l(6935),cl=l(3590),dl=l(6453),pl=l(5957),vl=l(4467),ml=l(5547),hl=l(5650),fl=l(2790),gl=l(5620),yl=l(3339),wl=l(4666),xl=l(5215),kl=l(904),bl=l(3650),_l=l(4296),Il=l(6519),Sl=l(4790),Cl=l(3260),Ll=l(2146),Tl=l(6755),El=l(2849),Ml=l(6940),Ul=l(6116),Wl=l(5741),Dl=l(2939),Hl=l(9524),Fl=l(6135),Al=l(6821),$l=l(6149);const Zl={IconPlayOne:$l.Z,IconFullScreenPlay:Al.Z,IconLock:Fl.Z,IconUnlock:Hl.Z,IconPpt:Dl.Z,IconFormat:Wl.Z,IconPicture:Ul.Z,IconFullScreen:Ml.Z,IconList:El.Z,IconOrderedList:Tl.Z,IconFlipVertically:Ll.Z,IconFlipHorizontally:Cl.Z,IconFontSize:Sl.Z,IconCode:Il.Z,IconTextBold:_l.Z,IconTextItalic:bl.Z,IconTextUnderline:kl.Z,IconStrikethrough:xl.Z,IconEdit:wl.Z,IconQuote:yl.Z,IconBackgroundColor:gl.Z,IconGroup:fl.Z,IconUngroup:hl.Z,IconBack:ml.Z,IconNext:vl.Z,IconFullwidth:pl.Z,IconAlignTop:dl.Z,IconAlignLeft:cl.Z,IconAlignRight:ul.Z,IconAlignBottom:rl.Z,IconAlignVertically:sl.Z,IconAlignHorizontally:il.Z,IconBringToFront:ol.Z,IconSendToBack:nl.Z,IconAlignTextLeft:al.Z,IconAlignTextRight:ll.Z,IconAlignTextCenter:tl.Z,IconAlignTextBoth:el.Z,IconRowHeight:Qt.Z,IconWrite:Kt.Z,IconInsertTable:Gt.Z,IconAddText:Xt.Z,IconFill:qt.Z,IconTailoring:Jt.Z,IconEffects:Vt.Z,IconColorFilter:Yt.Z,IconUp:jt.Z,IconDown:Nt.Z,IconPlus:Bt.Z,IconMinus:Pt.Z,IconConnection:zt.Z,IconBringToFrontOne:Rt.Z,IconSentToBack:Ot.Z,IconGithub:Zt.Z,IconChartProportion:$t.Z,IconChartHistogram:At.Z,IconChartHistogramOne:Ft.Z,IconChartLineArea:Ht.Z,IconChartRing:Dt.Z,IconChartScatter:Wt.Z,IconChartLine:Ut.Z,IconChartPie:Mt.Z,IconText:Et.Z,IconRotate:Tt.Z,IconLeftTwo:Lt.Z,IconRightTwo:Ct.Z,IconPlatte:St.Z,IconClose:It.Z,IconCloseSmall:_t.Z,IconUndo:bt.Z,IconTransform:kt.Z,IconClick:xt.Z,IconTheme:wt.Z,IconArrowCircleLeft:yt.Z,IconGraphicDesign:gt.Z,IconLogout:ft.Z,IconErase:ht.Z,IconClear:mt.Z,IconAlignTextTopOne:vt.Z,IconAlignTextBottomOne:pt.Z,IconAlignTextMiddleOne:dt.Z,IconPause:ct.Z,IconVolumeMute:ut.Z,IconVolumeNotice:rt.Z,IconVolumeSmall:st.Z,IconVideoTwo:it.Z,IconFormula:ot.Z,IconLinkOne:nt.Z,IconFullScreenOne:at.Z,IconOffScreenOne:lt.Z,IconPower:tt.Z,IconListView:et.Z,IconMagic:Qe.Z,IconHighLight:Ke.Z,IconDownload:Ge.Z,IconIndentLeft:Xe.Z,IconIndentRight:qe.Z,IconVerticalSpacingBetweenItems:Je.Z,IconCopy:Ve.Z,IconDelete:Ye.Z,IconSquare:je.Z,IconRound:Ne.Z,IconNeedle:Be.Z,IconTextRotationNone:Pe.Z,IconTextRotationDown:ze.Z,IconFormatBrush:Re.Z,IconPreviewOpen:Oe.Z,IconPreviewClose:Ze.Z,IconStopwatchStart:$e.Z,IconSearch:Ae.Z,IconLeft:Fe.Z,IconRight:He.Z,IconMoveOne:De.Z,IconHamburgerButton:We.Z,IconAttention:Ue.Z,IconCheckOne:Me.Z,IconCloseOne:Ee.Z,IconInfo:Te.Z};var Ol={install(e){for(const t of Object.keys(Zl))e.component(t,Zl[t])}};const Rl=["id"],zl={class:"icons"},Pl={class:"content"},Bl={key:0,class:"title"},Nl={class:"description"},jl={key:0,class:"control"};var Yl=(0,i.aZ)({__name:"Message",props:{id:{},message:{},type:{default:"success"},title:{default:""},duration:{default:3e3},closable:{type:Boolean,default:!1}},emits:["close","destroy"],setup(e,{expose:t,emit:l}){const{IconAttention:a,IconCheckOne:o,IconCloseOne:r,IconInfo:u,IconCloseSmall:c}=Zl,d=e,p=l,v=(0,s.iH)(!0),m=(0,s.iH)(null),h=()=>{d.duration<=0||(m.value=setTimeout(g,d.duration))},f=()=>{m.value&&clearTimeout(m.value)},g=()=>v.value=!1;return(0,i.wF)((()=>{f()})),(0,i.bv)((()=>{h()})),t({close:g}),(e,t)=>((0,i.wg)(),(0,i.j4)(n.uT,{name:"message-fade",appear:"",mode:"in-out",onBeforeLeave:t[3]||(t[3]=e=>p("close")),onAfterLeave:t[4]||(t[4]=e=>p("destroy"))},{default:(0,i.w5)((()=>[v.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"message",id:e.id},[(0,i._)("div",{class:"message-container",onMouseenter:t[1]||(t[1]=e=>f()),onMouseleave:t[2]||(t[2]=e=>h())},[(0,i._)("div",zl,["warning"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(a),{key:0,theme:"filled",size:"18",fill:"#faad14"})):(0,i.kq)("",!0),"success"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(o),{key:1,theme:"filled",size:"18",fill:"#52c41a"})):(0,i.kq)("",!0),"error"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(r),{key:2,theme:"filled",size:"18",fill:"#ff4d4f"})):(0,i.kq)("",!0),"info"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(u),{key:3,theme:"filled",size:"18",fill:"#1677ff"})):(0,i.kq)("",!0)]),(0,i._)("div",Pl,[e.title?((0,i.wg)(),(0,i.iD)("div",Bl,(0,oe.zw)(e.title),1)):(0,i.kq)("",!0),(0,i._)("div",Nl,(0,oe.zw)(e.message),1)]),e.closable?((0,i.wg)(),(0,i.iD)("div",jl,[(0,i._)("span",{class:"close-btn",onClick:t[0]||(t[0]=e=>g())},[(0,i.Wm)((0,s.SU)(c))])])):(0,i.kq)("",!0)],32)],8,Rl)):(0,i.kq)("",!0)])),_:1}))}}),Vl=l(3744);const Jl=(0,Vl.Z)(Yl,[["__scopeId","data-v-03d14766"]]);var ql=Jl;const Xl=[];let Gl=null,Kl=0;const Ql={duration:3e3},ea=e=>{const t="message-"+Kl++,l={...Ql,...e,id:t};Gl||(Gl=document.createElement("div"),Gl.className="message-wrap",Gl.style.cssText="\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 6000;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: 15px;\n background-color: rgba(255, 255, 255, 0);\n transition: all 1s ease-in-out;\n align-items: center;\n ",document.body.appendChild(Gl));const a=(0,i.Wm)(ql,l,null),o=document.createElement("div");a.appContext=e.ctx||ea._context||null,a.props.onClose=e.onClose,a.props.onDestroy=()=>{Gl&&Gl.childNodes.length<=1&&(Gl.remove(),Gl=null),(0,n.sY)(null,o)},(0,n.sY)(a,o),Gl.appendChild(o.firstElementChild);const s={id:t,close:()=>a?.component?.exposed?.close()};return Xl.push(s),s};ea.success=(e,t)=>ea({...t,type:"success",message:e}),ea.info=(e,t)=>ea({...t,type:"info",message:e}),ea.warning=(e,t)=>ea({...t,type:"warning",message:e}),ea.error=(e,t)=>ea({...t,type:"error",message:e}),ea.closeAll=function(){for(let e=Xl.length-1;e>=0;e--)Xl[e].close()};var ta=ea;const la=e=>{const t=e.replace(/[\n\r]+/g,"
"),l=t.split("
");let a="";for(const n of l)n&&(a+=`
${n}
`);return a},aa=e=>new Promise((t=>{const l=document.createElement("img");l.src=e,l.style.opacity="0",document.body.appendChild(l),l.onload=()=>{const e=l.clientWidth,a=l.clientHeight;l.onload=null,l.onerror=null,document.body.removeChild(l),t({width:e,height:a})},l.onerror=()=>{l.onload=null,l.onerror=null}})),na=e=>new Promise((t=>{const l=new FileReader;l.addEventListener("load",(()=>{t(l.result)})),l.readAsDataURL(e)})),oa=1e3;var ia,sa;(function(e){e["ROUND_RECT"]="roundRect",e["ROUND_RECT_DIAGONAL"]="roundRectDiagonal",e["ROUND_RECT_SINGLE"]="roundRectSingle",e["ROUND_RECT_SAMESIDE"]="roundRectSameSide",e["CUT_RECT_DIAGONAL"]="cutRectDiagonal",e["CUT_RECT_SINGLE"]="cutRectSingle",e["CUT_RECT_SAMESIDE"]="cutRectSameSide",e["CUT_ROUND_RECT"]="cutRoundRect",e["MESSAGE"]="message",e["ROUND_MESSAGE"]="roundMessage",e["L"]="L",e["RING_RECT"]="ringRect",e["PLUS"]="plus",e["TRIANGLE"]="triangle",e["PARALLELOGRAM_LEFT"]="parallelogramLeft",e["PARALLELOGRAM_RIGHT"]="parallelogramRight",e["TRAPEZOID"]="trapezoid",e["BULLET"]="bullet",e["INDICATOR"]="indicator"})(ia||(ia={})),function(e){e["TEXT"]="text",e["IMAGE"]="image",e["SHAPE"]="shape",e["LINE"]="line",e["CHART"]="chart",e["TABLE"]="table",e["LATEX"]="latex",e["VIDEO"]="video",e["AUDIO"]="audio"}(sa||(sa={}));const ra={[ia.ROUND_RECT]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t-a} Q ${e} ${t} ${e-a} ${t} L ${a} ${t} Q 0 ${t} 0 ${t-a} L 0 ${a} Q 0 0 ${a} 0 Z`}},[ia.CUT_RECT_DIAGONAL]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${t-a} L 0 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L ${a} ${t} Z`}},[ia.CUT_RECT_SINGLE]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${t} L 0 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} Z`}},[ia.CUT_RECT_SAMESIDE]:{editable:!0,defaultValue:.2,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${a} L ${a} 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L 0 ${t} Z`}},[ia.ROUND_RECT_DIAGONAL]:{editable:!0,defaultValue:.125,range:[0,1],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e} 0 L ${e} ${t-a} Q ${e} ${t} ${e-a} ${t} L 0 ${t} L 0 ${a} Q 0 0 ${a} 0 Z`}},[ia.ROUND_RECT_SINGLE]:{editable:!0,defaultValue:.125,range:[0,1],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t} L 0 ${t} L 0 0 Z`}},[ia.ROUND_RECT_SAMESIDE]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${a} Q 0 0 ${a} 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t} L 0 ${t} Z`}},[ia.CUT_ROUND_RECT]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L 0 ${t} L 0 ${a} Q 0 0 ${a} 0 Z`}},[ia.MESSAGE]:{formula:(e,t)=>{const l=.2*e,a=.2*t;return`M 0 0 L ${e} 0 L ${e} ${t-a} L ${e/2} ${t-a} L ${e/2-l} ${t} L ${e/2-l} ${t-a} L 0 ${t-a} Z`}},[ia.ROUND_MESSAGE]:{formula:(e,t)=>{const l=.125*Math.min(e,t),a=.2*e,n=.2*t;return`M 0 ${l} Q 0 0 ${l} 0 L ${e-l} 0 Q ${e} 0 ${e} ${l} L ${e} ${t-l-n} Q ${e} ${t-n} ${e-l} ${t-n} L ${e/2} ${t-n} L ${e/2-a} ${t} L ${e/2-a} ${t-n} L ${l} ${t-n} Q 0 ${t-n} 0 ${t-l-n} L 0 ${l} Z`}},[ia.L]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 L 0 ${t} L ${e} ${t} L ${e} ${t-a} L ${a} ${t-a} L ${a} 0 Z`}},[ia.RING_RECT]:{editable:!0,defaultValue:.25,range:[.1,.45],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 ${e} 0 ${e} ${t} L 0 ${t} L 0 0 Z M ${a} ${a} L ${a} ${t-a} L ${e-a} ${t-a} L ${e-a} ${a} Z`}},[ia.PLUS]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"center",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${e/2-a/2} 0 L ${e/2-a/2} ${t/2-a/2} L 0 ${t/2-a/2} L 0 ${t/2+a/2} L ${e/2-a/2} ${t/2+a/2} L ${e/2-a/2} ${t} L ${e/2+a/2} ${t} L ${e/2+a/2} ${t/2+a/2} L ${e} ${t/2+a/2} L ${e} ${t/2-a/2} L ${e/2+a/2} ${t/2-a/2} L ${e/2+a/2} 0 Z`}},[ia.TRIANGLE]:{editable:!0,defaultValue:.5,range:[0,1],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L 0 ${t} L ${e} ${t} Z`}},[ia.PARALLELOGRAM_LEFT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L ${e} 0 L ${e-a} ${t} L 0 ${t} Z`}},[ia.PARALLELOGRAM_RIGHT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"right",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M 0 0 L ${e-a} 0 L ${e} ${t} L ${a} ${t} Z`}},[ia.TRAPEZOID]:{editable:!0,defaultValue:.25,range:[0,.5],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L ${e-a} 0 L ${e} ${t} L 0 ${t} Z`}},[ia.BULLET]:{editable:!0,defaultValue:.2,range:[0,1],relative:"top",getBaseSize:(e,t)=>t,formula:(e,t,l)=>{const a=t*l;return`M ${e/2} 0 L 0 ${a} L 0 ${t} L ${e} ${t} L ${e} ${a} Z`}},[ia.INDICATOR]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${e} ${t/2} L ${e-a} 0 L 0 0 L ${a} ${t/2} L 0 ${t} L ${e-a} ${t} Z`}}},ua=[{type:"矩形",children:[{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",pptxShapeType:"rect"},{viewBox:[200,200],path:"M 50 0 L 150 0 Q 200 0 200 50 L 200 150 Q 200 200 150 200 L 50 200 Q 0 200 0 150 L 0 50 Q 0 0 50 0 Z",pathFormula:ia.ROUND_RECT,pptxShapeType:"roundRect"},{viewBox:[200,200],path:"M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z",pathFormula:ia.CUT_RECT_SINGLE,pptxShapeType:"snip1Rect"},{viewBox:[200,200],path:"M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z",pathFormula:ia.CUT_RECT_SAMESIDE,pptxShapeType:"snip2SameRect"},{viewBox:[200,200],path:"M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z",pathFormula:ia.CUT_RECT_DIAGONAL,pptxShapeType:"snip2DiagRect"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:ia.CUT_ROUND_RECT,pptxShapeType:"snipRoundRect"},{viewBox:[200,200],path:"M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 0 Z",pathFormula:ia.ROUND_RECT_SINGLE,pptxShapeType:"round1Rect"},{viewBox:[200,200],path:"M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 Z",pathFormula:ia.ROUND_RECT_SAMESIDE,pptxShapeType:"round2SameRect"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 200 150 Q 200 200 150 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:ia.ROUND_RECT_DIAGONAL,pptxShapeType:"round2DiagRect"},{viewBox:[200,200],path:"M 0 80 L 60 0 L 100 40 L 180 20 L 200 120 L 160 200 L 0 200 L 60 140 Z",title:"任意多边形"}]},{type:"常用形状",children:[{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",pptxShapeType:"ellipse"},{viewBox:[200,200],path:"M 100 0 L 0 200 L 200 200 L 100 0 Z",pathFormula:ia.TRIANGLE,pptxShapeType:"triangle"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z"},{viewBox:[200,200],path:"M 70 20 L 0 160 Q 0 200 40 200 L 160 200 Q 200 200 200 160 L 130 20 Q 100 -20 70 20 Z"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z",pathFormula:ia.PARALLELOGRAM_LEFT,pptxShapeType:"parallelogram"},{viewBox:[200,200],path:"M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z",pathFormula:ia.PARALLELOGRAM_RIGHT},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z",pathFormula:ia.TRAPEZOID,pptxShapeType:"trapezoid"},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z",pptxShapeType:"diamond"},{viewBox:[200,200],path:"M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z",pathFormula:ia.BULLET},{viewBox:[200,200],path:"M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z",pathFormula:ia.INDICATOR},{viewBox:[200,200],path:"M 0 0 C 80 20 120 20 200 0 C 180 80 180 120 200 200 C 80 180 120 180 0 200 C 20 120 20 80 0 0 Z"},{viewBox:[200,200],path:"M 10 10 C 60 0 140 0 190 10 C 200 60 200 140 190 190 C 140 200 60 200 10 190 C 0 140 0 60 10 10 Z"},{viewBox:[200,200],path:"M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 20 A 100 100 0 1 0 200 100 L 100 100 L 40 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z",pptxShapeType:"pie"},{viewBox:[200,200],path:"M 160 20 A 100 100 0 1 0 200 100 L 100 100 L 160 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z",pptxShapeType:"chord"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z",pptxShapeType:"teardrop"},{viewBox:[200,200],path:"M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 90 L 50 200 L 150 200 L 200 90 L 100 0 Z",pptxShapeType:"pentagon"},{viewBox:[200,200],path:"M 40 0 L 160 0 L 200 100 L 160 200 L 40 200 L 0 100 Z",pptxShapeType:"hexagon"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z"},{viewBox:[200,200],path:"M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z",pptxShapeType:"octagon"},{viewBox:[200,200],path:"M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 50 0 A 25 50 0 1 0 50 200 L 150 200 A 25 50 0 1 0 150 0 L 50 0 Z"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z",pathFormula:ia.L},{viewBox:[200,200],path:"M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z",pathFormula:ia.RING_RECT},{viewBox:[200,200],path:"M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z"},{viewBox:[200,200],path:"M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z",pathFormula:ia.PLUS},{viewBox:[200,200],path:"M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 Z",pathFormula:ia.MESSAGE},{viewBox:[200,200],path:"M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z",pathFormula:ia.ROUND_MESSAGE},{viewBox:[200,200],path:"M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z"},{viewBox:[200,200],path:"M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z"},{viewBox:[200,200],path:"M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z"},{viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z"},{viewBox:[200,200],path:"M 100 0 Q 0 50 0 175 Q 100 225 200 175 Q 200 50 100 0 Z"},{viewBox:[200,200],path:"M 0 100 A 50 50 0 1 1 200 100 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 100 0 L 120 80 L 200 100 L 120 120 L 100 200 L 80 120 L 0 100 L 80 80 L 100 0 Z",pptxShapeType:"star4"},{viewBox:[1024,1024],path:"M1018.67652554 400.05983681l-382.95318779-5.89158658L512 34.78141155 388.27666225 394.16825023l-382.95318779 5.89158658L311.68602415 629.83174977l-117.83174978 365.27842665 312.25413766-223.88032637 312.25413904 223.88032637-117.83175116-365.27842665 318.14572563-229.77191296z",pptxShapeType:"star5",special:!0},{viewBox:[200,200],path:"M 100 0 L 60 60 L 0 100 L 60 140 L 100 200 L 140 140 L 200 100 L 140 60 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 140 60 L 200 60 L 160 100 L 200 140 L 140 140 L 100 200 L 60 140 L 0 140 L 40 100 L 0 60 L 60 60 L 100 0 Z",pptxShapeType:"star6"},{viewBox:[200,200],path:"M 100 0 L 80 40 L 20 20 L 40 80 L 0 100 L 40 120 L 20 180 L 80 160 L 100 200 L 120 160 L 180 180 L 160 120 L 200 100 L 160 80 L 180 20 L 120 40 L 100 0 Z"},{viewBox:[200,200],path:"M 200 0 C 80 40 80 160 200 200 C -60 200 -60 0 200 0 Z"}]},{type:"箭头",children:[{viewBox:[200,200],path:"M 100 0 L 0 100 L 50 100 L 50 200 L 150 200 L 150 100 L 200 100 L 100 0 Z",pptxShapeType:"upArrow"},{viewBox:[200,200],path:"M 100 200 L 200 100 L 150 100 L 150 0 L 50 0 L 50 100 L 0 100 L 100 200 Z",pptxShapeType:"downArrow"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 200 150 L 100 150 L 100 200 L 0 100 Z",pptxShapeType:"leftArrow"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 0 150 L 100 150 L 100 200 L 200 100 Z",pptxShapeType:"rightArrow"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 60 60 L 60 140 L 0 140 L 100 200 L 200 140 L 140 140 L 140 60 L 200 60 L 100 0 Z",pptxShapeType:"upDownArrow"},{viewBox:[200,200],path:"M 0 100 L 60 0 L 60 60 L 140 60 L 140 0 L 200 100 L 140 200 L 140 140 L 60 140 L 60 200 L 0 100 Z",pptxShapeType:"leftRightArrow"},{viewBox:[200,200],path:"M 100 0 L 60 40 L 80 40 L 80 80 L 40 80 L 40 60 L 0 100 L 40 140 L 40 120 L 80 120 L 80 160 L 60 160 L 100 200 L 140 160 L 120 160 L 120 120 L 160 120 L 160 140 L 200 100 L 160 60 L 160 80 L 120 80 L 120 40 L 140 40 L 100 0 Z"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 150 100 L 200 150 L 100 150 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 50 100 L 0 150 L 100 150 L 100 200 L 200 100 Z",pptxShapeType:"notchedRightArrow"},{viewBox:[200,200],path:"M 0 100 L 80 20 L 80 80 L 120 80 L 120 0 L 200 0 L 200 200 L 120 200 L 120 120 L 80 120 L 80 180 L 0 100 Z"},{viewBox:[200,200],path:"M 200 100 L 120 20 L 120 80 L 80 80 L 80 0 L 0 0 L 0 200 L 80 200 L 80 120 L 120 120 L 120 180 L 200 100 Z"},{viewBox:[200,200],path:"M 0 0 L 120 0 L 200 100 L 120 200 L 0 200 L 80 100 L 0 0 Z",pptxShapeType:"chevron"},{viewBox:[200,200],path:"M 80 0 L 200 0 L 120 100 L 200 200 L 80 200 L 0 100 L 80 0 Z"},{viewBox:[200,200],path:"M 0 0 L 140 0 L 200 100 L 140 200 L 0 200 L 0 100 L 0 0 Z",pptxShapeType:"homePlate"},{viewBox:[200,200],path:"M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 0 200 L 60 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 0 100 L 200 200 L 140 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 80 0 L 200 100 L 80 200 L 0 200 L 120 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 120 0 L 0 100 L 120 200 L 200 200 L 80 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 200 L 180 200 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 160 L 0 160 L 0 200 Z"},{viewBox:[200,200],path:"M 0 200 L 0 20 L 160 20 L 160 0 L 200 40 L 160 80 L 160 60 L 40 60 L 40 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 180 L 180 180 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 140 L 40 140 L 40 120 L 0 160 L 40 200 L 40 180 Z"},{viewBox:[1024,1024],path:"M398.208 302.912V64L0 482.112l398.208 418.176V655.36c284.48 0 483.584 95.552 625.792 304.64-56.896-298.688-227.584-597.312-625.792-657.088z",special:!0},{viewBox:[1024,1024],path:"M625.792 302.912V64L1024 482.112l-398.208 418.176V655.36C341.312 655.36 142.208 750.912 0 960c56.896-298.688 227.584-597.312 625.792-657.088z",special:!0}]},{type:"其他形状",children:[{viewBox:[1024,1024],path:"M995.336 243.4016c-15.7584-36.5736-38.3376-69.26639999-66.91440001-97.37280001-28.5768-27.98879999-61.73999999-49.8624-98.78399999-65.26799998-38.22-15.876-78.6744-23.8728-120.4224-23.87280001-57.97680001 0-114.5424 15.876-163.69919999 45.864-11.76 7.17360001-22.932 15.05279999-33.51600001 23.63760001-10.584-8.5848-21.75600001-16.46400001-33.51600001-23.63760001-49.1568-29.98799999-105.7224-45.86399999-163.69919999-45.864-41.74799999 0-82.2024 7.9968-120.4224 23.87280001-36.9264 15.28799999-70.2072 37.27919999-98.78399999 65.26799998-28.6944 28.10640001-51.156 60.79919999-66.91440001 97.37280001-16.34639999 37.9848-24.696 78.3216-24.696 119.83439999 0 39.1608 7.9968 79.96800001 23.8728 121.48080001 13.28880001 34.692 32.34000001 70.67760001 56.6832 107.016 38.57279999 57.5064 91.61040001 117.4824 157.4664 178.28160001 109.1328 100.78319999 217.2072 170.4024 221.79359999 173.22479998l27.87120001 17.8752c12.348 7.8792 28.224 7.8792 40.572 0l27.87119999-17.8752c4.58639999-2.94 112.54319999-72.44159999 221.79360001-173.22479998 65.85599999-60.79919999 118.89359999-120.7752 157.4664-178.28160001 24.3432-36.33839999 43.512-72.324 56.68319999-107.016 15.876-41.5128 23.8728-82.32 23.87280001-121.48080001 0.1176-41.5128-8.232-81.8496-24.5784-119.83439999z",special:!0},{viewBox:[1024,1024],path:"M985.20746667 343.50079998l-303.32586667-44.08319999L546.28693333 24.5248c-3.70346666-7.5264-9.79626667-13.6192-17.32266665-17.32266668-18.87573334-9.3184-41.81333333-1.55306667-51.25120001 17.32266668L342.1184 299.41759999l-303.32586667 44.08319999c-8.36266667 1.19466667-16.00853333 5.13706667-21.8624 11.11040001-14.69440001 15.17226667-14.45546667 39.30453334 0.71679999 54.1184l219.46026668 213.9648-51.84853333 302.1312c-1.43359999 8.24320001-0.11946667 16.8448 3.82293333 24.25173333 9.79626667 18.6368 32.9728 25.92426667 51.6096 16.00853334L512 822.44266665l271.3088 142.64320001c7.40693333 3.9424 16.00853333 5.25653333 24.25173333 3.82293333 20.78719999-3.584 34.7648-23.296 31.1808-44.0832l-51.84853333-302.1312 219.46026668-213.9648c5.97333334-5.85386666 9.91573333-13.49973334 11.11039999-21.8624 3.2256-20.90666667-11.34933333-40.26026667-32.256-43.36640001z",special:!0},{viewBox:[1024,1024],path:"M852.65066667 405.84533333C800.54044445 268.40177778 667.76177778 170.66666667 512.22755555 170.66666667S223.91466667 268.288 171.80444445 405.73155555C74.29688889 431.33155555 2.27555555 520.07822222 2.27555555 625.77777778c0 125.72444445 101.83111111 227.55555555 227.44177778 227.55555555h564.56533334C919.89333333 853.33333333 1021.72444445 751.50222222 1021.72444445 625.77777778c0-105.472-71.79377778-194.21866667-169.07377778-219.93244445z",special:!0},{viewBox:[1024,1024],path:"M926.25224691 323.7371485H654.6457886L898.88200917 15.14388241c5.05486373-6.53433603 0.49315743-16.02761669-7.76722963-16.02761668H418.30008701c-3.45210206 0-6.78091476 1.84934039-8.50696579 4.93157436L90.35039154 555.76772251c-3.82197013 6.53433603 0.86302552 14.7947231 8.50696578 14.79472311h215.01664245l-110.22068713 440.88274851c-2.34249783 9.61657002 9.24670194 16.39748478 16.39748477 9.49328065L933.03316167 340.62779071c6.41104668-6.0411786 2.09591911-16.8906422-6.78091476-16.89064221z",special:!0},{viewBox:[1024,1024],path:"M878.47822222 463.30311111c-22.18666667-49.83466667-53.93066667-93.98044445-94.32177777-131.072l-33.10933334-30.37866666c-4.89244445-4.32355555-12.62933333-2.38933333-14.79111111 3.75466666l-14.79111111 42.43911111c-9.216 26.624-26.16888889 53.81688889-50.176 80.55466667-1.59288889 1.70666667-3.41333333 2.16177778-4.66488889 2.27555556-1.25155555 0.11377778-3.18577778-0.11377778-4.89244445-1.70666667-1.59288889-1.36533333-2.38933333-3.41333333-2.27555555-5.46133333 4.20977778-68.49422222-16.27022222-145.74933333-61.09866667-229.83111112C561.26577778 124.01777778 509.72444445 69.51822222 445.32622222 31.51644445l-46.99022222-27.648c-6.144-3.64088889-13.99466667 1.13777778-13.65333333 8.30577777l2.50311111 54.61333333c1.70666667 37.31911111-2.61688889 70.31466667-12.85688889 97.73511112-12.51555555 33.56444445-30.49244445 64.73955555-53.47555556 92.72888888-16.15644445 19.56977778-34.24711111 37.20533333-54.04444444 52.45155556-47.90044445 36.75022222-87.38133333 84.65066667-114.11911111 138.24C125.72444445 502.10133333 111.50222222 562.74488889 111.50222222 623.50222222c0 53.70311111 10.58133333 105.69955555 31.51644445 154.73777778 20.25244445 47.21777778 49.152 89.77066667 85.90222222 126.17955555 36.864 36.40888889 79.64444445 65.08088889 127.31733333 84.992C405.61777778 1010.11911111 457.95555555 1020.58666667 512 1020.58666667s106.38222222-10.46755555 155.76177778-31.06133334c47.67288889-19.91111111 90.56711111-48.46933333 127.31733333-84.992 36.864-36.40888889 65.76355555-78.96177778 85.90222222-126.17955555 20.93511111-49.03822222 31.51644445-101.03466667 31.51644445-154.73777778 0-55.52355555-11.37777778-109.45422222-34.01955556-160.31288889z",special:!0},{viewBox:[1024,1024],path:"M968.20337778 20.11591112H705.44042667c-22.17301333 0-41.92483556 15.16430222-47.14951111 37.33731555C642.36202666 124.73685332 582.08711111 173.03324444 512 173.03324444s-130.36202666-48.29639112-146.29091556-115.58001777c-5.22467555-22.17301333-24.84906667-37.33731556-47.14951111-37.33731555H55.79662222c-30.96576 0-56.06968889 25.10392889-56.06968888 56.06968888v321.12639999c0 30.96576 25.10392889 56.06968889 56.06968888 56.06968889h95.57333334v494.43271112c0 30.96576 25.10392889 56.06968889 56.06968889 56.06968888h609.1207111c30.96576 0 56.06968889-25.10392889 56.06968889-56.06968888V453.38168888h95.57333334c30.96576 0 56.06968889-25.10392889 56.06968888-56.06968889V76.1856c0-30.96576-25.10392889-56.06968889-56.06968888-56.06968888z",special:!0},{viewBox:[1024,1024],path:"M980.94648889 239.80714666H523.46880001L373.99210666 96.82944c-1.91146667-1.78403556-4.46008889-2.80348444-7.00871111-2.80348445H43.05351111c-22.55530667 0-40.77795555 18.22264888-40.77795555 40.77795557v754.39217776c0 22.55530667 18.22264888 40.77795555 40.77795555 40.77795557h937.89297778c22.55530667 0 40.77795555-18.22264888 40.77795555-40.77795557V280.58510222c0-22.55530667-18.22264888-40.77795555-40.77795555-40.77795556z",special:!0},{viewBox:[1024,1024],path:"M972.60904597 164.57058577L841.30587843 33.39070759c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480282-29.3428675-26.75379095 0-51.90482023 10.47959553-70.76809219 29.3428675L558.60337778 174.68031322c-18.86327195 18.86327195-29.34286748 44.1375906-29.34286749 70.64480283 0 26.75379095 10.47959553 51.90482023 29.34286749 70.76809218l103.31648301 103.31648302c-24.28800376 53.50758189-57.69942011 101.59043198-99.24793416 143.13894603-41.42522469 41.67180341-89.63136414 75.08321976-143.13894603 99.61780223L316.21649759 558.84995649c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480283-29.34286747-26.75379095 0-51.90482023 10.47959553-70.76809217 29.34286747L33.39070759 700.01627278c-18.86327195 18.86327195-29.34286748 44.1375906-29.3428675 70.76809217 0 26.75379095 10.47959553 51.90482023 29.3428675 70.76809219l131.05658883 131.05658883c30.08260365 30.205893 71.63111769 47.34311394 114.28923598 47.34311394 9.00012323 0 17.63037836-0.73973616 26.13734414-2.21920846 166.19405621-27.37023774 331.03192945-115.76870829 464.06114804-248.67463751C901.84095379 636.27567408 990.11613498 471.56109018 1017.85624079 304.87387654c8.38367642-50.91850535-8.50696579-103.31648302-45.24719482-140.30329077z",special:!0},{viewBox:[1024,1024],path:"M910.60451556 640.96028445c-20.38897778-65.49959112-43.83630221-120.54983112-79.89930667-210.64362666C836.31217778 193.67708444 737.93535999 2.27555556 511.36284444 2.27555556 282.24170667 2.27555556 186.03121778 197.50001778 192.14791111 430.31665779c-36.19043555 90.22122667-59.51032888 144.88917333-79.89930667 210.64362666-43.32657778 139.53706668-29.30915556 197.26336001-18.60494222 198.53767111 22.9376 2.80348444 89.32920888-105.00323556 89.32920889-105.00323556 0 62.44124445 32.11264001 143.86972444 101.69002667 202.61546667-33.64181333 10.32192-109.20846222 38.10190221-91.24067556 68.55793777 14.52714667 24.59420444 250.01984 15.67402668 317.94062222 8.02816 67.92078222 7.64586667 303.41347556 16.56604444 317.94062223-8.02816 17.96778667-30.32860444-57.72629333-58.23601779-91.24067555-68.55793777 69.57738667-58.87317334 101.69002667-140.30165333 101.69002667-202.61546667 0 0 66.39160889 107.80672 89.32920888 105.00323556 10.83164445-1.40174222 24.84906667-59.12803556-18.47751111-198.53767111z",special:!0},{viewBox:[1024,1024],path:"M1016.86992592 199.24764445c-37.13706667 16.01991111-77.55093333 27.54939259-119.17842962 32.03982222 42.96248889-25.60758518 75.60912592-66.02145185 91.02222222-114.08118519-39.68568889 23.66577778-84.58998518 41.02068148-131.31472593 50.00154074C819.53374815 126.79395555 765.76995555 101.79318518 706.18074075 101.79318518c-114.688 0-206.92385185 92.96402963-206.92385186 207.04521482 0 16.01991111 1.94180741 32.03982222 5.09724444 47.45291852-171.72859259-8.98085925-324.88865185-91.02222222-426.71217778-216.63288889-17.96171852 30.82619259-28.15620741 66.02145185-28.1562074 104.49351112 0 71.84687408 36.53025185 135.19834075 92.23585185 172.45677036-33.98162963-1.33499259-66.02145185-10.92266667-93.57084445-26.33576296v2.54862222c0 100.6098963 71.1186963 183.98625185 165.90317037 203.1616-17.3549037 4.49042963-35.92343703 7.03905185-54.49197037 7.03905185-13.47128889 0-26.2144-1.33499259-39.07887407-3.15543704C146.69748148 681.90814815 223.03478518 741.49736297 313.93564445 743.43917037c-71.1186963 55.7056-160.19911111 88.4736-256.9253926 88.4736-17.3549037 0-33.37481482-0.60681482-50.00154074-2.54862222C98.75911111 888.22518518 207.62168889 922.20681482 324.85831111 922.20681482 705.45256297 922.20681482 913.71140741 606.90583703 913.71140741 333.23235555c0-8.98085925 0-17.96171852-0.60681482-26.94257777 40.2925037-29.4912 75.60912592-66.02145185 103.76533333-107.04213333z",special:!0},{viewBox:[1024,1024],path:"M917.96720197 1.08889505H106.03279803C53.56084718 1.08889505 9.37393998 45.27580225 9.37393998 97.74775309v5.52336372c0 19.33177108 8.28504494 41.42522469 22.0934536 55.23363205l331.40179753 392.15879462v325.87843379c0 16.57008987 8.28504494 30.37849854 22.09345359 35.90186098l209.88780469 104.94390299 2.76168121 2.76168121c27.61681602 11.04672615 55.23363335-8.28504494 55.23363335-38.66354218V550.66354348l331.40179753-392.15879462c35.90186097-41.42522469 30.37849854-102.18222047-11.04672616-135.32240022-11.04672615-13.80840865-33.14017975-22.0934536-55.23363335-22.09345359z",special:!0},{viewBox:[1024,1024],path:"M491.70164031 97.48884502a25.89076502 25.89076502 0 0 1 40.59671938 0L745.66415762 367.01171317a25.89076502 25.89076502 0 0 0 30.49932208 7.72839349l208.00640948-89.14190458a25.89076502 25.89076502 0 0 1 35.56096592 29.06238339l-115.18801541 554.96855704A103.56306132 103.56306132 0 0 1 803.14165689 952.14301275H220.85834311a103.56306132 103.56306132 0 0 1-101.4011828-82.51387024l-115.18801541-554.96855704a25.89076502 25.89076502 0 0 1 35.54802012-29.06238339l208.01935528 89.14190458a25.89076502 25.89076502 0 0 0 30.49932208-7.72839349l213.36579793-269.52286815z",special:!0},{viewBox:[1024,1024],path:"M643.02466884 387.7801525c19.85376751-88.69205333 33.718272-152.84087467 41.61900049-192.57389433C704.52292267 95.17283515 652.90057916 2.27555515 550.58614084 2.27555515c-92.26012484 0-138.59407685 45.84971417-165.91530666 137.49816969l-0.70087152 2.67605334c-16.40038399 74.13942085-41.47882668 131.61085116-74.6746315 172.73287031a189.06953915 189.06953915 0 0 1-143.04142182 70.44391902l-26.17434983 0.5606965C77.66380049 387.52529067 27.76177817 438.90551468 27.76177817 501.84374084V881.55022182c0 77.4144 62.25009818 140.17422182 139.05282766 140.17422303h492.82707951c101.23127467 0 191.59267516-63.995904 225.93535999-159.98976l102.37815468-286.22301868c26.04691951-72.82688-11.39234134-153.15945284-83.63303784-179.42300483a138.04612267 138.04612267 0 0 0-47.17499733-8.30850884H643.02466884z",special:!0},{viewBox:[1024,1024],path:"M512 512c140.82958222 0 254.86222222-114.03264 254.86222222-254.86222222S652.82958222 2.27555555 512 2.27555555a254.78940445 254.78940445 0 0 0-254.86222222 254.86222223C257.13777778 397.96736 371.17041778 512 512 512z m0 72.81777778c-170.10232889 0-509.72444445 97.57582222-509.72444445 291.27111111v145.63555556h1019.4488889v-145.63555556c0-193.69528889-339.62211555-291.27111111-509.72444445-291.27111111z",special:!0},{viewBox:[1024,1024],path:"M1019.81297778 564.50161779l-138.89991111-472.51456c-8.66531556-25.99594668-29.43658667-43.45400889-57.21656889-43.45400891s-50.33528889 15.67402668-59.00060446 41.66997334l-92.00526221 274.48661334H351.69166222L259.6864 90.33045333c-8.66531556-25.99594668-31.22062222-41.66997333-59.00060444-41.66997332s-50.33528889 17.33063112-57.2165689 43.45400887L4.69674667 564.50161779c-5.22467555 17.33063112 1.78403556 36.44529778 15.67402667 46.89464887l491.11950221 368.27591113 492.77610666-368.27591113c13.76256-10.32192 20.77127111-29.43658667 15.54659557-46.89464887z",special:!0},{viewBox:[1024,1024],path:"M927.78951111 340.39277037c-12.01493333-47.81700741 12.01493333-124.03294815 89.08041481-150.97552592l-82.40545184-4.36906667s-31.19028148-109.22666667-174.27721483-118.9357037c-143.08693333-9.8304-236.65777778-3.64088889-236.65777777-3.6408889s106.07122963 67.47780741 63.5941926 187.74850371c-31.06891852 63.71555555-79.85682963 116.02299259-132.04290371 175.61220741-1.57771852 1.57771852-3.03407408 3.15543703-4.2477037 4.49042962C278.25493333 624.86755555 7.13007408 934.34311111 7.13007408 934.34311111c298.43152592 78.15774815 498.43768889-7.64586667 616.76657777-110.56165926 24.87940741-0.24272592 43.5693037-0.36408889 56.19105185-0.36408888 164.8109037 0 304.13558518-142.72284445 298.43152593-301.4656-3.88361482-109.1053037-38.71478518-133.74198518-50.72971852-181.5589926z",special:!0},{viewBox:[1024,1024],path:"M997.8886764 504.17210418L537.2729208 43.89182982c-13.97838539-13.97838539-36.56745619-13.97838539-50.5458416 0L26.1113236 504.17210418c-13.41924998 13.41924998-21.02349164 31.64706454-21.02349163 50.65766867 0 39.47496036 32.09437288 71.56933323 71.56933324 71.56933323h48.53295408V954.83524937c0 19.79339373 15.99127289 35.78466661 35.78466663 35.78466662H440.43066677V740.12724968h125.24633315v250.49266631h297.34821416c19.79339373 0 35.78466661-15.99127289 35.78466663-35.78466662V626.39910608h48.53295408c19.01060414 0 37.23841869-7.49241457 50.65766869-21.02349163 27.84494371-27.95677079 27.84494371-73.24673948-0.11182708-101.20351027z",special:!0},{viewBox:[1024,1024],path:"M1009.13013121 349.27572283L674.72427717 14.86986879c-8.82158299-8.82158299-20.35749924-13.16451618-31.89341544-13.16451618s-23.07183245 4.34293316-31.89341547 13.16451618L392.29790453 233.6451272c-16.5574327-1.90003326-33.25058207-2.71433322-49.94373146-2.71433324-99.34459624 0-198.68919249 32.70771543-280.25490606 98.12314628-20.90036589 16.69314938-22.52896582 48.04369819-3.66434987 67.04403081l246.59717401 246.59717401-292.33368895 292.06225564c-3.52863319 3.52863319-5.83581644 8.27871636-6.24296642 13.30023282l-4.61436649 50.48659809c-1.22144996 12.75736619 8.95729967 23.6146991 21.57894918 23.6146991 0.6785833 0 1.35716662 0 2.03574992-0.13571666l50.48659809-4.61436649c5.02151649-0.40714999 9.77159962-2.71433322 13.30023282-6.24296643l292.33368896-292.33368896 246.59717402 246.59717401c8.82158299 8.82158299 20.35749924 13.16451618 31.89341544 13.16451618 13.16451618 0 26.19331567-5.70009979 35.15061536-16.82886604 76.40848044-95.40881307 108.16617924-214.83947521 95.27309638-330.33435417l218.63954175-218.63954173c17.50744934-17.37173267 17.50744934-45.8722316 0-63.51539759z",special:!0},{viewBox:[1024,1024],path:"M976.62005979 160.47737905c-0.39452595-0.39452595-80.35178503 78.64217259-239.47725131 237.50462156l-111.6508437-111.65084369 237.89914752-237.89914752c-125.19623464-75.35445635-286.03131335-56.02268482-390.31767264 48.26367449-81.92988882 81.92988882-112.57140424 200.15616502-83.37648398 310.09739626l2.36715569 8.81107954-372.82702222 372.69551356c-8.15353628 8.15353628-8.15353628 21.56741857 0 29.72095487l185.95323084 185.95323084c8.15353628 8.15353628 21.56741857 8.15353628 29.72095485 0l372.56400493-372.56400493 8.81107953 2.3671557c110.07273989 29.32642892 228.29901608-1.18357785 310.36041356-83.24497533 104.41786795-104.2863593 123.74963948-265.12143802 49.97328693-390.05465535z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m220.16 343.26755556l-239.616 332.23111111c-14.44977778 20.13866667-44.37333333 20.13866667-58.82311111 0L291.84 481.16622222c-4.32355555-6.03022222 0-14.44977778 7.39555555-14.44977777h53.36177778c11.60533333 0 22.64177778 5.57511111 29.46844445 15.13244444l81.00977777 112.41244444 178.85866667-248.03555555c6.82666667-9.44355555 17.74933333-15.13244445 29.46844445-15.13244445H724.76444445c7.39555555 0 11.71911111 8.41955555 7.39555555 14.44977778z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h418.70222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m188.18844445 703.37422223l-75.09333334-0.34133333L512 570.48177778l-112.98133333 134.71288889-75.20711112 0.34133333c-5.00622222 0-9.10222222-3.98222222-9.10222222-9.10222222 0-2.16177778 0.79644445-4.20977778 2.16177778-5.91644445l148.02488889-176.35555555L316.87111111 337.92c-1.36533333-1.70666667-2.16177778-3.75466667-2.16177778-5.91644445 0-5.00622222 4.096-9.10222222 9.10222222-9.10222222l75.20711112 0.34133334L512 458.06933333l112.98133333-134.71288888 75.09333334-0.34133334c5.00622222 0 9.10222222 3.98222222 9.10222222 9.10222222 0 2.16177778-0.79644445 4.20977778-2.16177778 5.91644445L559.21777778 514.27555555l147.91111111 176.35555556c1.36533333 1.70666667 2.16177778 3.75466667 2.16177778 5.91644444 0 5.00622222-4.096 9.10222222-9.10222222 9.10222223z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H548.40888889v172.94222222c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222h-54.61333334c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V548.40888889H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h172.94222222V302.64888889c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h54.61333334c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v172.94222222h172.94222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m163.95377778 517.57511112L427.46311111 700.64355555c-1.59288889 1.13777778-3.41333333 1.70666667-5.34755556 1.70666667-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V331.88977778c0-1.93422222 0.56888889-3.75466667 1.70666667-5.34755556 2.95822222-4.096 8.64711111-5.00622222 12.74311111-2.048L675.95377778 505.17333333c0.79644445 0.56888889 1.47911111 1.25155555 2.048 2.048 2.95822222 3.98222222 2.048 9.67111111-2.048 12.62933334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m200.81777778 666.39644445l-32.54044445 44.37333333c-2.95822222 4.096-8.64711111 4.89244445-12.74311111 1.93422222L479.34577778 577.76355555c-2.38933333-1.70666667-3.75466667-4.43733333-3.75466667-7.39555555V257.13777778c0-5.00622222 4.096-9.10222222 9.10222222-9.10222223h54.72711112c5.00622222 0 9.10222222 4.096 9.10222222 9.10222223v281.6l162.24711111 117.30488889c4.096 2.84444445 5.00622222 8.53333333 2.048 12.62933333z",special:!0},{viewBox:[1024,1024],path:"M981.10577778 314.48177778c-25.6-61.09866667-62.464-115.93955555-109.34044445-163.04355556-46.87644445-46.99022222-101.60355555-83.968-162.70222222-109.568C646.59911111 15.58755555 580.38044445 2.27555555 512 2.27555555h-2.27555555c-68.83555555 0.34133333-135.39555555 13.99466667-198.08711112 40.84622223-60.52977778 25.94133333-114.80177778 62.80533333-161.22311111 109.79555555-46.42133333 46.99022222-82.83022222 101.60355555-108.08888889 162.47466667C16.27022222 378.42488889 3.072 445.44 3.41333333 514.38933333c0.34133333 78.96177778 19.22844445 157.35466667 54.49955556 227.44177778v172.94222222c0 28.89955555 23.43822222 52.33777778 52.224 52.33777778h172.71466666c69.97333333 35.38488889 148.13866667 54.272 226.98666667 54.61333334h2.38933333c68.03911111 0 133.91644445-13.19822222 196.03911112-39.02577778 60.75733333-25.37244445 115.37066667-61.78133333 162.13333333-108.31644445 46.87644445-46.53511111 83.74044445-100.92088889 109.568-161.56444444 26.73777778-62.80533333 40.39111111-129.59288889 40.73244445-198.54222223 0.22755555-69.29066667-13.19822222-136.53333333-39.59466667-199.79377777zM284.89955555 566.61333333c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955556 54.61333333-24.34844445 54.61333333-54.49955556 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955556-54.61333333s24.46222222-54.61333333 54.49955556-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM745.4750693 325.8561164l-267.95558363 371.52436096c-16.15876501 22.52048353-49.62140436 22.52048353-65.78016939 0L253.07805667 477.51948567c-4.83490607-6.74342161 0-16.15876501 8.27023406-16.15876499h59.67291961c12.97790576 0 25.31963967 6.23448413 32.95370188 16.92217123l90.59087157 125.70755774 200.01242995-277.37092701c7.63406221-10.56045272 19.84856175-16.92217125 32.95370189-16.92217124H737.20483524c8.27023407 0 13.10514012 9.41534338 8.27023406 16.158765z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h468.2224823c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM720.79160148 697.63494611c5.59831228 6.61618726 0.8906406 16.6677025-7.76129658 16.66770249h-74.94104404c-5.98001539 0-11.70556205-2.67192177-15.64982754-7.25235911L512 575.36271635l-110.43943332 131.68757314c-3.81703111 4.58043732-9.54257777 7.25235911-15.64982754 7.25235911H310.9696951c-8.65193717 0-13.35960887-10.05151525-7.76129658-16.66770249L458.81603326 512 303.20839852 326.36505389c-5.59831228-6.61618726-0.8906406-16.6677025 7.76129658-16.66770249h74.94104404c5.98001539 0 11.70556205 2.67192177 15.64982754 7.25235911L512 448.63728365l110.43943332-131.68757314c3.81703111-4.58043732 9.54257777-7.25235911 15.64982754-7.25235911H713.0303049c8.65193717 0 13.35960887 10.05151525 7.76129658 16.66770249L565.18396674 512l155.60763474 185.63494611z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM677.02297814 523.19662459L423.31764398 722.70011704c-9.41534338 7.37959347-23.28388974 0.76340622-23.28388975-11.19662459V312.62374191c0-11.9600308 13.86854636-18.70345241 23.28388975-11.19662457l253.70533416 199.37625807c7.25235911 5.72554666 7.25235911 16.6677025 0 22.39324918z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H552.71499847v193.39624268c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962h-61.0724977c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962V552.71499847H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h193.39624268V277.88875885c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h61.0724977c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v193.39624268h193.39624268c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M902.67315697 135.41705551L528.62204754 7.94466448C524.10877635 6.40354749 518.05438818 5.63298899 512 5.63298899s-12.10877635 0.7705585-16.62204754 2.31167549L121.32684303 135.41705551c-9.13662215 3.08223399-16.62204754 13.64989334-16.62204753 23.33691443v531.02488283c0 9.68702108 6.27454775 22.45627614 13.87005291 28.51066431L498.0198673 1013.9638196c3.85279247 2.9721542 8.8063828 4.51327118 13.87005291 4.51327118s10.12734022-1.54111698 13.87005291-4.51327118l379.4450189-295.67430252c7.59550517-5.94430839 13.87005291-18.71356345 13.87005291-28.51066431V158.75396994c0.22015956-9.68702108-7.26526581-20.14460066-16.40188796-23.33691443zM712.89560763 323.43332829L478.86598471 645.63685899c-7.04510625 9.68702108-21.57563786 9.68702108-28.6207441 0l-139.14084824-191.5388259c-4.18303182-5.8342286 0-13.9801327 7.15518603-13.9801327h60.76404132c5.61406904 0 11.0079785 2.75199463 14.31037204 7.26526582l71.22162091 97.97100864 166.11039557-228.74579323c3.30239355-4.51327118 8.58622323-7.26526581 14.31037204-7.26526581H705.7404216c7.15518602 0.11007979 11.33821785 8.25598388 7.15518603 14.09021248z",special:!0},{viewBox:[1024,1024],path:"M959.86498307 186.28001231H797.00498922v-101.78749614c0-44.91373267-36.51626425-81.42999692-81.42999691-81.42999693H308.42500769c-44.91373267 0-81.42999692 36.51626425-81.42999691 81.42999693v101.78749614H64.13501693c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499847v40.71499845c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874962h76.8495596l31.42688945 665.43575611c2.03574992 43.38692024 37.91584233 77.61296581 81.30276254 77.6129658h577.64404066c43.5141546 0 79.26701262-34.09881122 81.30276254-77.6129658l31.42688945-665.43575611H990.40123192c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874962v-40.71499845c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499847z m-254.46874039 0H318.60375732v-91.60874653h386.79248536v91.60874653z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 248.62485371H654.50249462V104.85001539c0-22.52048353-18.19451494-40.71499847-40.71499847-40.71499846H94.67126578v-50.89374808c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-71.25124732c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v997.5174623c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h71.25124732c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961V674.85999383h315.54123807v143.77483833c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h529.29497999c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V289.33985217c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846z",special:!0},{viewBox:[1024,1024],path:"M804.63905145 265.16532183V94.67126578h109.42155836c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961H109.93939019c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h109.42155836v170.49405605c0 103.6960117 53.94737296 194.92305513 135.3773699 246.83467817-81.42999692 51.91162303-135.37736988 143.13866646-135.3773699 246.83467817v170.49405605h-109.42155836c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h804.12121962c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-109.42155836V758.83467817c0-103.6960117-53.94737296-194.92305513-135.3773699-246.83467817 81.42999692-51.91162303 135.37736988-143.13866646 135.3773699-246.83467817z",special:!0},{viewBox:[1024,1024],path:"M1020.928 448.44373333l-35.36213334-373.4528c-1.79200001-19.3536-17.2032-34.64533332-36.55679999-36.55679999L575.55626667 3.072h-0.47786666c-3.82293334 0-6.8096 1.19466667-9.07946669 3.46453333L6.53653333 565.99893332c-4.65919999 4.65919999-4.65919999 12.1856 0 16.84480001l434.61973334 434.61973334c2.26986667 2.26986667 5.25653333 3.46453333 8.48213333 3.46453333s6.21226667-1.19466667 8.48213333-3.46453333l559.46239999-559.46239999c2.38933332-2.5088 3.584-5.97333334 3.34506668-9.55733335zM735.40266668 362.66666667c-42.17173333 0-76.45866667-34.28693333-76.45866667-76.45866667s34.28693333-76.45866667 76.45866667-76.45866667 76.45866667 34.28693333 76.45866665 76.45866667-34.28693333 76.45866667-76.45866665 76.45866667z",special:!0}]},{type:"线性",children:[{viewBox:[1024,1024],path:"M1009.55537674 75.96950982l-61.38012212-61.38012214c-4.48769762-4.48769762-11.870684-4.48769762-16.3583816 0L14.44462326 931.67210859c-4.48769762 4.48769762-4.48769762 11.870684 0 16.35838159l61.38012212 61.38012214c4.48769762 4.48769762 11.870684 4.48769762 16.3583816 0L1009.41061232 92.18312698c4.63246205-4.34293316 4.63246205-11.72591956 0.14476442-16.21361716zM210.88996692 419.35075905c114.94296453 0 208.46079213-93.51782759 208.46079213-208.46079213s-93.51782759-208.46079213-208.46079213-208.4607921-208.46079213 93.51782759-208.4607921 208.4607921 93.51782759 208.46079213 208.4607921 208.46079213z m0-312.69118816c57.47148228 0 104.23039605 46.75891379 104.23039607 104.23039603s-46.75891379 104.23039605-104.23039607 104.23039607-104.23039605-46.75891379-104.23039603-104.23039607 46.75891379-104.23039605 104.23039603-104.23039603zM813.11003308 604.64924095c-114.94296453 0-208.46079213 93.51782759-208.46079213 208.46079213s93.51782759 208.46079213 208.46079213 208.4607921 208.46079213-93.51782759 208.4607921-208.4607921-93.51782759-208.46079213-208.4607921-208.46079213z m0 312.69118816c-57.47148228 0-104.23039605-46.75891379-104.23039607-104.23039603s46.75891379-104.23039605 104.23039607-104.23039607 104.23039605 46.75891379 104.23039603 104.23039607-46.75891379 104.23039605-104.23039603 104.23039603z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1004.96017383 478.58365209L483.27851088 25.80594621c-4.00443838-3.45210207-9.11354943-5.3852792-14.49882864-5.38527921h-122.20441284c-10.21822208 0-14.91308089 12.70373557-7.18037228 19.33177152l483.57045622 419.77561022H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672657v82.85044938c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672657h807.92996557L339.25681303 984.24756148c-7.7327086 6.76612003-3.0378498 19.33177153 7.18037229 19.33177152h126.34693531c2.62359757 0 5.24719513-0.96658859 7.18037228-2.76168164L1004.96017383 545.41634791c20.2983601-17.67476253 20.2983601-49.1579333 0-66.83269582z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1011.38217956 558.9924242L545.80649025 22.43713295c-17.81503843-20.62055629-49.79794206-20.62055629-67.75325638 0L12.61782044 558.9924242c-6.31241519 7.29434645-1.12220714 18.51641789 8.41655359 18.51641789h113.62347344c6.45269109 0 12.62483038-2.80551785 16.97338308-7.71517411L458.69516062 215.87758959V1005.77114384c0 6.1721393 5.04993216 11.22207145 11.22207144 11.22207145h84.16553588c6.1721393 0 11.22207145-5.04993216 11.22207144-11.22207145V215.87758959l307.06393007 353.91607839c4.20827679 4.90965626 10.38041608 7.71517413 16.97338308 7.71517411h113.62347344c9.53876074 0 14.72896878-11.22207145 8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1009.1026963 459.52804874H201.17273073l483.57045624-419.77561022c7.7327086-6.76612003 3.0378498-19.33177153-7.18037229-19.33177152h-122.20441283c-5.3852792 0-10.49439025 1.93317715-14.49882866 5.38527921L19.03982617 478.58365209c-20.2983601 17.67476253-20.2983601 49.1579333 0 66.69461175L543.89742302 1000.81765136c2.07126124 1.79509307 4.55677472 2.76168163 7.18037228 2.76168164h126.3469353c10.21822208 0 14.91308089-12.70373557 7.18037228-19.33177152L201.17273073 564.47195126H1009.1026963c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672657v-82.85044938c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672657z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1002.96562597 446.49115791h-113.62347344c-6.45269109 0-12.62483038 2.80551785-16.97338308 7.71517411L565.30483938 808.12241041V18.22885616c0-6.1721393-5.04993216-11.22207145-11.22207144-11.22207145h-84.16553588c-6.1721393 0-11.22207145 5.04993216-11.22207144 11.22207145v789.89355425L151.63123055 454.20633202c-4.20827679-4.90965626-10.38041608-7.71517413-16.97338308-7.71517411h-113.62347344c-9.53876074 0-14.72896878 11.36234735-8.41655359 18.51641789L478.19350975 1001.56286705c17.81503843 20.62055629 49.79794206 20.62055629 67.75325638 0L1011.38217956 465.0075758c6.31241519-7.29434645 1.12220714-18.51641789-8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M975.82443246 622.46726585H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672658v82.85044937c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672659h835.6848661L651.32683905 980.10503902c-5.66144737 7.18037229-0.55233633 17.9509307 8.69929718 17.9509307h100.11095967c6.76612003 0 13.11798782-3.0378498 17.39859437-8.42312903l233.08593092-295.63802022c22.78387358-28.99765728 2.20934532-71.52755463-34.79718873-71.52755462zM1009.1026963 296.58883161H173.4178302l199.25533075-252.69387063c5.66144737-7.18037229 0.55233633-17.9509307-8.69929718-17.9509307h-100.11095967c-6.76612003 0-13.11798782 3.0378498-17.39859437 8.42312903L13.37837881 330.00517953c-22.78387358 28.99765728-2.20934532 71.52755463 34.65910466 71.52755462h961.06521283c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672658v-82.85044937c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1010.75873115 64.13501693H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874964h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874964v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961zM1010.75873115 858.07748691H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874964v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874964zM1010.75873115 461.10625194H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874959v81.42999694c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874959h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874959v-81.42999694c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874959z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M591.98717801 512l405.34042913-483.16579151c6.79427767-8.02960089 1.08090782-20.22841761-9.41933951-20.2284176h-123.22349044c-7.25752386 0-14.20621693 3.24272343-18.99309439 8.80167789L511.38233839 415.95362022 177.07299399 17.40746878c-4.63246205-5.55895447-11.58115512-8.80167789-18.99309439-8.80167789H34.85640916c-10.50024731 0-16.21361717 12.19881672-9.41933952 20.2284176L430.77749876 512 25.43706964 995.16579151c-6.79427767 8.02960089-1.08090782 20.22841761 9.41933952 20.2284176h123.22349044c7.25752386 0 14.20621693-3.24272343 18.99309439-8.80167789l334.3093444-398.54615144 334.30934441 398.54615144c4.63246205 5.55895447 11.58115512 8.80167789 18.99309439 8.80167789h123.22349044c10.50024731 0 16.21361717-12.19881672 9.41933951-20.2284176L591.98717801 512z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M953.5488 832.61667556c-24.08448-57.08913778-58.74574221-108.31644445-102.70947556-152.28017777-43.96373333-43.96373333-95.19104-78.49756444-152.28017777-102.70947558-0.50972445-0.25486222-1.01944888-0.38229333-1.52917334-0.63715555C776.41955556 519.64586667 828.02915556 426.23886221 828.02915556 320.85333332c0-174.58062221-141.44853334-316.02915556-316.02915556-316.02915554S195.97084444 146.27271111 195.97084444 320.85333332c0 105.38552889 51.6096 198.79253333 130.99918223 256.26396447-0.50972445 0.25486222-1.01944888 0.38229333-1.52917334 0.63715555-57.08913778 24.08448-108.31644445 58.61831112-152.28017777 102.70947554-43.96373333 43.96373333-78.49756444 95.19104-102.70947556 152.28017779C46.74901333 888.55893332 34.13333334 947.8144 32.85902222 1008.72647111c-0.12743111 5.7344 4.46008889 10.44935111 10.19448889 10.44935111h76.45866667c5.60696888 0 10.06705778-4.46008889 10.19448889-9.93962666 2.54862221-98.37681778 42.05226667-190.50951112 111.88451555-260.34176001 72.25344-72.25344 168.20906666-112.01194667 270.40881778-112.01194667s198.15537778 39.75850667 270.40881778 112.01194667C852.24106667 818.72668444 891.74471111 910.85937779 894.29333333 1009.23619556c0.12743111 5.60696888 4.58752 9.93962667 10.19448889 9.93962666h76.45866667c5.7344 0 10.32192-4.71495112 10.19448889-10.44935111-1.27431111-60.91207112-13.88999112-120.16753779-37.59217778-176.10979555zM512 540.03484444c-58.49088 0-113.54112-22.81016889-154.95623111-64.22527999S292.81848888 379.34421333 292.81848888 320.85333332c0-58.49088 22.81016889-113.54112 64.22528001-154.9562311S453.50912 101.67182221 512 101.67182221s113.54112 22.81016889 154.95623111 64.22528001S731.18151112 262.36245333 731.18151112 320.85333332c0 58.49088-22.81016889 113.54112-64.22528001 154.95623113S570.49088 540.03484444 512 540.03484444z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 111.50222222H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888889v728.17777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h946.6311111c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V147.91111111c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888889z m-45.5111111 126.06577778V830.57777778H84.19555555V237.568l-31.40266666-24.46222222 44.71466666-57.45777778 48.6968889 37.888h731.70488888l48.69688889-37.888 44.71466667 57.45777778-31.51644444 24.46222222z M877.90933333 193.42222222L512 477.86666667 146.09066667 193.42222222l-48.69688889-37.888-44.71466667 57.45777778 31.40266667 24.46222222 388.66488889 302.19377778c22.98311111 17.86311111 55.18222222 17.86311111 78.16533333 0L939.80444445 237.568l31.40266666-24.46222222-44.71466666-57.45777778-48.58311112 37.77422222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 88.74666667H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888888v564.33777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h432.35555555v127.43111111H275.34222222c-10.01244445 0-18.20444445 8.192-18.20444444 18.20444445v54.61333333c0 5.00622222 4.096 9.10222222 9.10222222 9.10222222h491.52c5.00622222 0 9.10222222-4.096 9.10222222-9.10222222v-54.61333333c0-10.01244445-8.192-18.20444445-18.20444444-18.20444445H552.96V725.90222222h432.35555555c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V125.15555555c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888888z m-45.5111111 555.23555555H84.19555555V170.66666667h855.6088889v473.31555555z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m0 932.97777778c-233.69955555 0-423.25333333-189.55377778-423.25333333-423.25333333 0-101.26222222 35.61244445-194.33244445 95.00444444-267.15022222l595.39911111 595.39911111C706.33244445 899.64088889 613.26222222 935.25333333 512 935.25333333z m328.24888889-156.10311111L244.84977778 183.75111111C317.66755555 124.35911111 410.73777778 88.74666667 512 88.74666667c233.69955555 0 423.25333333 189.55377778 423.25333333 423.25333333 0 101.26222222-35.61244445 194.33244445-95.00444444 267.15022222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M901.80266667 257.82044445L656.95288889 12.97066667c-6.82666667-6.82666667-16.04266667-10.69511111-25.71377778-10.69511112H147.91111111c-20.13866667 0-36.40888889 16.27022222-36.40888889 36.4088889v946.6311111c0 20.13866667 16.27022222 36.40888889 36.40888889 36.4088889h728.17777778c20.13866667 0 36.40888889-16.27022222 36.40888889-36.4088889V283.648c0-9.67111111-3.86844445-19.00088889-10.69511111-25.82755555zM828.52977778 300.37333333H614.4V86.24355555L828.52977778 300.37333333z m2.048 639.43111112H193.42222222V84.19555555h343.60888889v245.76c0 26.39644445 21.39022222 47.78666667 47.78666667 47.78666667h245.76v562.06222223z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M981.07392 55.79662222H42.92608c-31.22062222 0-50.71758221 34.02410666-35.04355556 61.16693334L304.28728889 620.82616888V927.42542221c0 22.55530667 18.09521779 40.77795555 40.52309333 40.77795557h334.37923556c22.42787556 0 40.52309333-18.22264888 40.52309333-40.77795557V620.82616888L1016.24490667 116.96355556c15.54659555-27.14282666-3.95036444-61.16693333-35.17098667-61.16693334zM628.47203556 876.45297779H395.52796444V677.66044445h233.07150222v198.79253334z m12.23338666-301.50200891l-12.10595556 21.15356445h-233.19893332l-12.10595556-21.15356445L130.59868445 147.54702221h762.8026311L640.70542222 574.95096888z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M980.62285431 4.54099753H654.39920987c-4.2719763 0-7.76722963 3.49525333-7.76722962 7.76722964v72.4941432c0 4.2719763 3.49525333 7.76722963 7.76722962 7.76722963h207.64393877L604.04167111 350.57107753c-64.72691358-49.83972347-143.69374815-76.7661195-226.67365136-76.7661195-99.54999309 0-193.27456395 38.83614815-263.5679921 109.25903012S4.54099753 547.08198717 4.54099753 646.63198025s38.83614815 193.27456395 109.25903012 263.5679921C184.09345581 980.62285431 277.81802667 1019.45900247 377.36801975 1019.45900247s193.27456395-38.83614815 263.5679921-109.25903012C711.35889383 839.90654419 750.19504197 746.18197333 750.19504197 646.63198025c0-82.9799032-26.92639605-161.68783013-76.63666567-226.41474372L931.4304 162.34521283V369.60079013c0 4.2719763 3.49525333 7.76722963 7.76722963 7.76722962h72.4941432c4.2719763 0 7.76722963-3.49525333 7.76722964-7.76722962V43.37714569c0-21.35988148-17.47626667-38.83614815-38.83614816-38.83614816zM377.36801975 921.07409383c-151.33152395 0-274.44211358-123.11058963-274.44211358-274.44211358s123.11058963-274.44211358 274.44211358-274.44211358 274.44211358 123.11058963 274.44211358 274.44211358-123.11058963 274.44211358-274.44211358 274.44211358z",special:!0,outlined:!0}]}],ca={bar:"bar",horizontalBar:"bar",line:"line",area:"line",scatter:"line",pie:"pie",ring:"pie"};var da=()=>{const e=J(),t=(0,D.debounce)((function(){e.addSnapshot()}),300,{trailing:!0}),l=(0,D.throttle)((function(){e.reDo()}),100,{leading:!0,trailing:!1}),a=(0,D.throttle)((function(){e.unDo()}),100,{leading:!0,trailing:!1});return{addHistorySnapshot:t,redo:l,undo:a}},pa=()=>{const e=R(),t=$(),{creatingElement:l}=(0,o.Jk)(e),{theme:a,viewportRatio:n}=(0,o.Jk)(t),{addHistorySnapshot:i}=da(),s=(a,n)=>{t.addElement(a),e.setActiveElementIdList([a.id]),l.value&&e.setCreatingElement(null),setTimeout((()=>{e.setEditorareaFocus(!0)}),0),n&&n(),i()},u=e=>{aa(e).then((({width:t,height:l})=>{const a=l/t;aoa?(t=oa,l=t*a):l>oa*n.value&&(l=oa*n.value,t=l/a),s({type:"image",id:(0,r.x0)(10),src:e,width:t,height:l,left:(oa-t)/2,top:(oa*n.value-l)/2,fixedRatio:!0,rotate:0})}))},c=e=>{const t={type:"chart",id:(0,r.x0)(10),chartType:ca[e],left:300,top:81.25,width:400,height:400,rotate:0,themeColor:[a.value.themeColor],gridColor:a.value.fontColor,data:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1"],series:[[12,19,5,2,18]]}},l={..."bar"===e?{horizontalBars:!1,stackBars:!1}:{},..."horizontalBar"===e?{horizontalBars:!0,stackBars:!1}:{},..."line"===e?{showLine:!0,lineSmooth:!0,showArea:!1}:{},..."area"===e?{showLine:!0,lineSmooth:!0,showArea:!0}:{},..."scatter"===e?{showLine:!1,lineSmooth:!0,showArea:!1}:{},..."pie"===e?{donut:!1}:{},..."ring"===e?{donut:!0}:{}};s({...t,options:l})},d=(e,t)=>{const l={fontname:a.value.fontName,color:a.value.fontColor},o=[];for(let a=0;a{const{left:l,top:n,width:o,height:i}=e,u=t?.content||"",c=t?.vertical||!1,d=(0,r.x0)(10);s({type:"text",id:d,left:l,top:n,width:o,height:i,content:u,rotate:0,defaultFontName:a.value.fontName,defaultColor:a.value.fontColor,vertical:c},(()=>{setTimeout((()=>{const e=document.querySelector(`#editable-element-${d} .ProseMirror`);e&&e.focus()}),0)}))},v=(e,t,l={})=>{const{left:n,top:o,width:i,height:u}=e,c={type:"shape",id:(0,r.x0)(10),left:n,top:o,width:i,height:u,viewBox:t.viewBox,path:t.path,fill:a.value.themeColor,fixedRatio:!1,rotate:0,...l};if(t.special&&(c.special=!0),t.pathFormula){c.pathFormula=t.pathFormula,c.viewBox=[i,u];const e=ra[t.pathFormula];"editable"in e?(c.path=e.formula(i,u,e.defaultValue),c.keypoint=e.defaultValue):c.path=e.formula(i,u)}s(c)},m=(e,t)=>{const{left:l,top:n,start:o,end:i}=e,u={type:"line",id:(0,r.x0)(10),left:l,top:n,start:o,end:i,points:t.points,color:a.value.themeColor,style:t.style,width:2};t.isBroken&&(u.broken=[(o[0]+i[0])/2,(o[1]+i[1])/2]),t.isCurve&&(u.curve=[(o[0]+i[0])/2,(o[1]+i[1])/2]),t.isCubic&&(u.cubic=[[(o[0]+i[0])/2,(o[1]+i[1])/2],[(o[0]+i[0])/2,(o[1]+i[1])/2]]),s(u)},h=e=>{s({type:"latex",id:(0,r.x0)(10),width:e.w,height:e.h,rotate:0,left:(oa-e.w)/2,top:(oa*n.value-e.h)/2,path:e.path,latex:e.latex,color:a.value.fontColor,strokeWidth:2,viewBox:[e.w,e.h],fixedRatio:!0})},f=e=>{s({type:"video",id:(0,r.x0)(10),width:500,height:300,rotate:0,left:(oa-500)/2,top:(oa*n.value-300)/2,src:e,autoplay:!1})},g=e=>{s({type:"audio",id:(0,r.x0)(10),width:50,height:50,rotate:0,left:(oa-50)/2,top:(oa*n.value-50)/2,loop:!1,autoplay:!1,fixedRatio:!0,color:a.value.themeColor,src:e})};return{createImageElement:u,createChartElement:c,createTableElement:d,createTextElement:p,createShapeElement:v,createLineElement:m,createLatexElement:h,createVideoElement:f,createAudioElement:g}},va=()=>{const e=R(),t=$(),{currentSlide:l,slides:a}=(0,o.Jk)(t),{addHistorySnapshot:n}=da(),s=a=>{const{groupIdMap:o,elIdMap:i}=Ie(a),s=a[0];let r,u=0;do{r=l.value.elements.find((e=>{if(e.type!==s.type)return!1;const{minX:t,maxX:l,minY:a,maxY:n}=xe(e),{minX:o,maxX:i,minY:r,maxY:c}=xe({...s,left:s.left+u,top:s.top+u});return t===o&&l===i&&a===r&&n===c})),r&&(u+=10)}while(r);for(const e of a)e.id=i[e.id],e.left=e.left+u,e.top=e.top+u,e.groupId&&(e.groupId=o[e.groupId]);t.addElement(a),e.setActiveElementIdList(Object.values(i)),n()},u=e=>{const l=_e(e),a=e.map((e=>{const{groupIdMap:t,elIdMap:a}=Ie(e.elements);for(const n of e.elements)n.id=a[n.id],n.groupId&&(n.groupId=t[n.groupId]),n.link&&"slide"===n.link.type&&(l[n.link.target]?n.link.target=l[n.link.target]:delete n.link);if(e.animations)for(const l of e.animations)l.id=(0,r.x0)(10),l.elId=a[l.elId];return{...e,id:l[e.id]}}));t.addSlide(a),n()},c=(0,i.Fl)((()=>!(a.value.length>1)&&!(a.value[0].elements.length>0)));return{addElementsFromData:s,addSlidesFromData:u,isEmptySlide:c}},ma=()=>{const{createTextElement:e}=pa(),{addElementsFromData:t,addSlidesFromData:l}=va(),a=t=>{e({left:0,top:0,width:600,height:50},{content:t})},n=(e,n)=>{const o=n?.onlySlide||!1,i=n?.onlyElements||!1,s=fe(e);if("object"===typeof s){const{type:e,data:a}=s;"elements"!==e||o?"slides"!==e||i||l(a):t(a)}else if(!i&&!o){const e=la(s);a(e)}};return{pasteTextClipboardData:n}},ha=()=>{const e=R(),t=$(),{selectedSlidesIndex:l,activeElementIdList:a}=(0,o.Jk)(e),{currentSlide:n,slides:s,theme:u,slideIndex:c}=(0,o.Jk)(t),d=(0,i.Fl)((()=>[...l.value,c.value])),p=(0,i.Fl)((()=>s.value.filter(((e,t)=>d.value.includes(t))))),v=(0,i.Fl)((()=>p.value.map((e=>e.id)))),{pasteTextClipboardData:m}=ma(),{addSlidesFromData:h}=va(),{addHistorySnapshot:f}=da(),g=()=>{const l={id:(0,r.x0)(10),elements:[],background:{type:"solid",color:u.value.backgroundColor}};t.updateSlideIndex(0),e.setActiveElementIdList([]),t.setSlides([l])},y=l=>{l===ne.UP&&c.value>0?(a.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(c.value-1)):l===ne.DOWN&&c.value{const t=pe(JSON.stringify({type:"slides",data:p.value}));me(t).then((()=>{e.setThumbnailsFocus(!0)}))},x=()=>{he().then((e=>{m(e,{onlySlide:!0})})).catch((e=>ta.warning(e)))},k=()=>{const l={id:(0,r.x0)(10),elements:[],background:{type:"solid",color:u.value.backgroundColor}};e.setActiveElementIdList([]),t.addSlide(l),f()},b=l=>{const{groupIdMap:a,elIdMap:n}=Ie(l.elements);for(const e of l.elements)e.id=n[e.id],e.groupId&&(e.groupId=a[e.groupId]);const o={...l,id:(0,r.x0)(10)};e.setActiveElementIdList([]),t.addSlide(o),f()},_=()=>{const e=JSON.parse(JSON.stringify(n.value));h([e])},I=(l=v.value)=>{s.value.length===l.length?g():t.deleteSlide(l),e.updateSelectedSlidesIndex([]),f()},S=()=>{const e=[...v.value];w(),I(e)},C=()=>{const t=Array.from(Array(s.value.length),((e,t)=>t));e.setActiveElementIdList([]),e.updateSelectedSlidesIndex(t)},L=(e,l)=>{if(l===e)return;const a=JSON.parse(JSON.stringify(s.value)),n=a[l];a.splice(l,1),a.splice(e,0,n),t.setSlides(a),t.updateSlideIndex(e)};return{resetSlides:g,updateSlideIndex:y,copySlide:w,pasteSlide:x,createSlide:k,createSlideByTemplate:b,copyAndPasteSlide:_,deleteSlide:I,cutSlide:S,selectAllSlide:C,sortSlides:L}},fa=()=>{const e=R(),t=$(),{activeElementIdList:l}=(0,o.Jk)(e),{currentSlide:a}=(0,o.Jk)(t),{addHistorySnapshot:n}=da(),i=()=>{const o=JSON.parse(JSON.stringify(a.value.elements));for(const e of o)l.value.includes(e.id)&&(e.lock=!0);t.updateSlide({elements:o}),e.setActiveElementIdList([]),n()},s=l=>{const o=JSON.parse(JSON.stringify(a.value.elements));if(l.groupId){const a=[];for(const e of o)e.groupId===l.groupId&&(e.lock=!1,a.push(e.id));t.updateSlide({elements:o}),e.setActiveElementIdList(a)}else{for(const e of o)if(e.id===l.id){e.lock=!1;break}t.updateSlide({elements:o}),e.setActiveElementIdList([l.id])}n()};return{lockElement:i,unlockElement:s}},ga=()=>{const e=R(),t=$(),{activeElementIdList:l,activeGroupElementId:a}=(0,o.Jk)(e),{currentSlide:n}=(0,o.Jk)(t),{addHistorySnapshot:i}=da(),s=()=>{if(!l.value.length)return;let o=[];o=a.value?n.value.elements.filter((e=>e.id!==a.value)):n.value.elements.filter((e=>!l.value.includes(e.id))),e.setActiveElementIdList([]),t.updateSlide({elements:o}),i()},r=()=>{n.value.elements.length&&(e.setActiveElementIdList([]),t.updateSlide({elements:[]}),i())};return{deleteElement:s,deleteAllElements:r}},ya=()=>{const e=R(),t=$(),{activeElementIdList:l,activeElementList:a,handleElementId:n}=(0,o.Jk)(e),{currentSlide:s}=(0,o.Jk)(t),{addHistorySnapshot:u}=da(),c=(0,i.Fl)((()=>{if(a.value.length<2)return!1;const e=a.value[0].groupId;if(!e)return!0;const t=a.value.every((t=>(t.groupId&&t.groupId)===e));return!t})),d=()=>{if(!a.value.length)return;let e=JSON.parse(JSON.stringify(s.value.elements));const n=(0,r.x0)(10),o=[];for(const t of e)l.value.includes(t.id)&&(t.groupId=n,o.push(t));const i=e.findIndex((e=>e.id===o[o.length-1].id)),c=o.map((e=>e.id));e=e.filter((e=>!c.includes(e.id)));const d=i-o.length+1;e.splice(d,0,...o),t.updateSlide({elements:e}),u()},p=()=>{if(!a.value.length)return;const o=a.value.some((e=>e.groupId));if(!o)return;const i=JSON.parse(JSON.stringify(s.value.elements));for(const e of i)l.value.includes(e.id)&&e.groupId&&delete e.groupId;t.updateSlide({elements:i});const r=n.value?[n.value]:[];e.setActiveElementIdList(r),u()};return{canCombine:c,combineElements:d,uncombineElements:p}},wa=()=>{const e=R(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(e),{pasteTextClipboardData:a}=ma(),{deleteElement:n}=ga(),i=()=>{if(!t.value.length)return;const a=pe(JSON.stringify({type:"elements",data:l.value}));me(a).then((()=>{e.setEditorareaFocus(!0)}))},s=()=>{i(),n()},r=()=>{he().then((e=>{a(e)})).catch((e=>ta.warning(e)))},u=()=>{i(),r()};return{copyElement:i,cutElement:s,pasteElement:r,quickCopyElement:u}},xa=()=>{const e=R(),{currentSlide:t}=(0,o.Jk)($()),{hiddenElementIdList:l}=(0,o.Jk)(e),a=()=>{const a=t.value.elements.filter((e=>!e.lock&&!l.value.includes(e.id))),n=a.map((e=>e.id));e.setActiveElementIdList(n)};return{selectAllElement:a}},ka=()=>{const e=$(),{activeElementIdList:t,activeGroupElementId:l}=(0,o.Jk)(R()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=da(),i=(o,i=1)=>{let s=[];const r=e=>{let{left:t,top:l}=e;switch(o){case ne.LEFT:t-=i;break;case ne.RIGHT:t+=i;break;case ne.UP:l-=i;break;case ne.DOWN:l+=i;break;default:break}return{...e,left:t,top:l}};s=l.value?a.value.elements.map((e=>l.value===e.id?r(e):e)):a.value.elements.map((e=>t.value.includes(e.id)?r(e):e)),e.updateSlide({elements:s}),n()};return{moveElement:i}},ba=(l(541),()=>{const e=$(),{currentSlide:t}=(0,o.Jk)(e),{addHistorySnapshot:l}=da(),a=(e,t)=>({minLevel:e.findIndex((e=>e.id===t[0].id)),maxLevel:e.findIndex((e=>e.id===t[t.length-1].id))}),n=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o,maxLevel:i}=a(e,n);if(i===e.length-1)return;const s=l[i+1],r=l.splice(o,n.length);if(s.groupId){const e=l.filter((e=>e.groupId===s.groupId));l.splice(o+e.length,0,...r)}else l.splice(o+1,0,...r)}else{const a=e.findIndex((e=>e.id===t.id));if(a===e.length-1)return;const n=l[a+1],o=l.splice(a,1)[0];if(n.groupId){const e=l.filter((e=>e.groupId===n.groupId));l.splice(a+e.length,0,o)}else l.splice(a+1,0,o)}return l},i=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o}=a(e,n);if(0===o)return;const i=l[o-1],s=l.splice(o,n.length);if(i.groupId){const e=l.filter((e=>e.groupId===i.groupId));l.splice(o-e.length,0,...s)}else l.splice(o-1,0,...s)}else{const a=e.findIndex((e=>e.id===t.id));if(0===a)return;const n=l[a-1],o=l.splice(a,1)[0];if(n.groupId){const e=l.filter((e=>e.groupId===n.groupId));l.splice(a-e.length,0,o)}else l.splice(a-1,0,o)}return l},s=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o,maxLevel:i}=a(e,n);if(i===e.length-1)return null;const s=l.splice(o,n.length);l.push(...s)}else{const a=e.findIndex((e=>e.id===t.id));if(a===e.length-1)return null;l.splice(a,1),l.push(t)}return l},r=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o}=a(e,n);if(0===o)return;const i=l.splice(o,n.length);l.unshift(...i)}else{const a=e.findIndex((e=>e.id===t.id));if(0===a)return;l.splice(a,1),l.unshift(t)}return l},u=(a,o)=>{let u;o===Q.UP?u=n(t.value.elements,a):o===Q.DOWN?u=i(t.value.elements,a):o===Q.TOP?u=s(t.value.elements,a):o===Q.BOTTOM&&(u=r(t.value.elements,a)),u&&(e.updateSlide({elements:u}),l())};return{orderElement:u}});const _a=()=>{const e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()},Ia=()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},Sa=()=>{const e=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement;return!!e};var Ca=()=>{const e=X(),t=$(),l=()=>{_a(),e.setScreening(!0)},a=()=>{t.updateSlideIndex(0),l()},n=()=>{e.setScreening(!1),Sa()&&Ia()};return{enterScreening:l,enterScreeningFromStart:a,exitScreening:n}},La=()=>{const e=R(),{canvasPercentage:t,canvasScale:l,canvasDragged:a}=(0,o.Jk)(e),n=(0,i.Fl)((()=>Math.round(100*l.value)+"%")),s=l=>{let a=t.value;const n=5,o=200,i=30;"+"===l&&a<=o&&(a+=n),"-"===l&&a>=i&&(a-=n),e.setCanvasPercentage(a)},r=a=>{const n=Math.round(a/l.value*t.value)/100;e.setCanvasPercentage(n)},u=()=>{e.setCanvasPercentage(90),a&&e.setCanvasDragged(!1)};return{canvasScalePercentage:n,setCanvasScalePercentage:r,scaleCanvas:s,resetCanvas:u}},Ta=()=>{const e=R(),t=q(),{activeElementIdList:l,disableHotkeys:a,handleElement:n,handleElementId:s,editorAreaFocus:r,thumbnailsFocus:u,showSearchPanel:c}=(0,o.Jk)(e),{currentSlide:d}=(0,o.Jk)($()),{ctrlKeyState:p,shiftKeyState:v,spaceKeyState:m}=(0,o.Jk)(t),{updateSlideIndex:h,copySlide:f,createSlide:g,deleteSlide:y,cutSlide:w,copyAndPasteSlide:x,selectAllSlide:k}=ha(),{combineElements:b,uncombineElements:_}=ya(),{deleteElement:I}=ga(),{lockElement:S}=fa(),{copyElement:C,cutElement:L,quickCopyElement:T}=wa(),{selectAllElement:E}=xa(),{moveElement:M}=ka(),{orderElement:U}=ba(),{redo:W,undo:D}=da(),{enterScreening:H,enterScreeningFromStart:F}=Ca(),{scaleCanvas:A,resetCanvas:Z}=La(),O=()=>{l.value.length?C():u.value&&f()},z=()=>{l.value.length?L():u.value&&w()},P=()=>{l.value.length?T():u.value&&x()},B=()=>{r.value&&E(),u.value&&k()},N=()=>{r.value&&S()},j=()=>{r.value&&b()},Y=()=>{r.value&&_()},V=()=>{l.value.length?I():u.value&&y()},J=e=>{l.value.length?M(e):e!==ne.UP&&e!==ne.DOWN||h(e)},X=e=>{e===ne.PAGEUP?h(ne.UP):e===ne.PAGEDOWN&&h(ne.DOWN)},G=e=>{n.value&&U(n.value,e)},K=()=>{u.value&&g()},ee=()=>{if(!d.value.elements.length)return;if(!s.value){const t=d.value.elements[0];return void e.setActiveElementIdList([t.id])}const t=d.value.elements.findIndex((e=>e.id===s.value)),l=t>=d.value.elements.length-1?0:t+1,a=d.value.elements[l].id;e.setActiveElementIdList([a])},te=l=>{const{ctrlKey:n,shiftKey:o,altKey:i,metaKey:s}=l,d=n||s,m=l.key.toUpperCase();if(d&&!p.value&&t.setCtrlKeyState(!0),o&&!v.value&&t.setShiftKeyState(!0),a.value||m!==ne.SPACE||t.setSpaceKeyState(!0),d&&m===ne.P)return l.preventDefault(),void e.setDialogForExport("pdf");if(o&&m===ne.F5)return l.preventDefault(),H(),void t.setShiftKeyState(!1);if(m===ne.F5)return l.preventDefault(),void F();if(n&&m===ne.F)return l.preventDefault(),void e.setSearchPanelState(!c.value);if(r.value||u.value){if(d&&m===ne.C){if(a.value)return;l.preventDefault(),O()}if(d&&m===ne.X){if(a.value)return;l.preventDefault(),z()}if(d&&m===ne.D){if(a.value)return;l.preventDefault(),P()}if(d&&m===ne.Z){if(a.value)return;l.preventDefault(),D()}if(d&&m===ne.Y){if(a.value)return;l.preventDefault(),W()}if(d&&m===ne.A){if(a.value)return;l.preventDefault(),B()}if(d&&m===ne.L){if(a.value)return;l.preventDefault(),N()}if(!o&&d&&m===ne.G){if(a.value)return;l.preventDefault(),j()}if(o&&d&&m===ne.G){if(a.value)return;l.preventDefault(),Y()}if(i&&m===ne.F){if(a.value)return;l.preventDefault(),G(Q.TOP)}if(i&&m===ne.B){if(a.value)return;l.preventDefault(),G(Q.BOTTOM)}if(m===ne.DELETE||m===ne.BACKSPACE){if(a.value)return;l.preventDefault(),V()}if(m===ne.UP){if(a.value)return;l.preventDefault(),J(ne.UP)}if(m===ne.DOWN){if(a.value)return;l.preventDefault(),J(ne.DOWN)}if(m===ne.LEFT){if(a.value)return;l.preventDefault(),J(ne.LEFT)}if(m===ne.RIGHT){if(a.value)return;l.preventDefault(),J(ne.RIGHT)}if(m===ne.PAGEUP){if(a.value)return;l.preventDefault(),X(ne.PAGEUP)}if(m===ne.PAGEDOWN){if(a.value)return;l.preventDefault(),X(ne.PAGEDOWN)}if(m===ne.ENTER){if(a.value)return;l.preventDefault(),K()}if(m===ne.MINUS){if(a.value)return;l.preventDefault(),A("-")}if(m===ne.EQUAL){if(a.value)return;l.preventDefault(),A("+")}if(m===ne.DIGIT_0){if(a.value)return;l.preventDefault(),Z()}if(m===ne.TAB){if(a.value)return;l.preventDefault(),ee()}}},le=()=>{p.value&&t.setCtrlKeyState(!1),v.value&&t.setShiftKeyState(!1),m.value&&t.setSpaceKeyState(!1)};(0,i.bv)((()=>{document.addEventListener("keydown",te),document.addEventListener("keyup",le),window.addEventListener("blur",le)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",te),document.removeEventListener("keyup",le),window.removeEventListener("blur",le)}))},Ea=()=>{const{editorAreaFocus:e,thumbnailsFocus:t,disableHotkeys:l}=(0,o.Jk)(R()),{pasteTextClipboardData:a}=ma(),{createImageElement:n}=pa(),s=e=>{na(e).then((e=>n(e)))},r=n=>{if(!e.value&&!t.value)return;if(l.value)return;if(!n.clipboardData)return;const o=n.clipboardData.items,i=o[0];if(i){for(const e of o)if("file"===e.kind&&-1!==e.type.indexOf("image")){const t=e.getAsFile();return void(t&&s(t))}"string"===i.kind&&"text/plain"===i.type&&i.getAsString((e=>a(e)))}};(0,i.bv)((()=>{document.addEventListener("paste",r)})),(0,i.Ah)((()=>{document.removeEventListener("paste",r)}))},Ma=l(7536),Ua=()=>{const e=$(),{theme:t}=(0,o.Jk)($()),{addSlidesFromData:l,isEmptySlide:a}=va(),n=(0,s.iH)(!1),i=(t,n=!1)=>{const o=t[0],i=new FileReader;i.addEventListener("load",(()=>{try{const t=JSON.parse(ve(i.result));n||a.value?e.setSlides(t):l(t)}catch{ta.error("无法正确读取 / 解析该文件")}})),i.readAsText(o)},u=e=>{let t=[0,0],l=[0,0];return e.isFlipV||e.isFlipH?e.isFlipV&&e.isFlipH?(t=[e.width,e.height],l=[0,0]):e.isFlipV&&!e.isFlipH?(t=[0,e.height],l=[e.width,0]):(t=[e.width,0],l=[0,e.height]):(t=[0,0],l=[e.width,e.height]),{type:"line",id:(0,r.x0)(10),width:e.borderWidth||1,left:e.left,top:e.top,start:t,end:l,style:"solid"===e.borderType?"solid":"dashed",color:e.borderColor,points:["","straightConnector1"===e.shapType?"arrow":""]}},c=o=>{const i=o[0];if(!i)return;n.value=!0;const s=[];for(const e of ua)s.push(...e.children);const c=new FileReader;c.onload=async o=>{const i=await(0,Ma.Q)(o.target.result,{slideFactor:75/914400,fontsizeFactor:100/98}),c=i.size.width,d=oa/c,p=[];for(const e of i.slides){const{type:l,value:a}=e.fill;let n;n="image"===l?{type:"image",image:a.picBase64,imageSize:"cover"}:"gradient"===l?{type:"gradient",gradientType:"linear",gradientColor:[a.colors[0].color,a.colors[a.colors.length-1].color],gradientRotate:a.rot}:{type:"solid",color:a};const o={id:(0,r.x0)(10),elements:[],background:n},i=e=>{for(const l of e)if(l.width=l.width*d,l.height=l.height*d,l.left=l.left*d,l.top=l.top*d,"text"===l.type){const e={type:"text",id:(0,r.x0)(10),width:l.width,height:l.height,left:l.left,top:l.top,rotate:l.rotate,defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,content:l.content,lineHeight:1,outline:{color:l.borderColor,width:l.borderWidth,style:"solid"===l.borderType?"solid":"dashed"},fill:l.fillColor,vertical:l.isVertical};l.shadow&&(e.shadow=l.shadow),o.elements.push(e)}else if("image"===l.type)o.elements.push({type:"image",id:(0,r.x0)(10),src:l.src,width:l.width,height:l.height,left:l.left,top:l.top,fixedRatio:!0,rotate:l.rotate});else if("audio"===l.type)o.elements.push({type:"audio",id:(0,r.x0)(10),src:l.blob,width:l.width,height:l.height,left:l.left,top:l.top,rotate:0,fixedRatio:!1,color:t.value.themeColor,loop:!1,autoplay:!1});else if("video"===l.type)o.elements.push({type:"video",id:(0,r.x0)(10),src:l.blob||l.src,width:l.width,height:l.height,left:l.left,top:l.top,rotate:0,autoplay:!1});else if("shape"===l.type)if("line"===l.shapType||/Connector/.test(l.shapType)){const e=u(l);o.elements.push(e)}else{const e=s.find((e=>e.pptxShapeType===l.shapType)),a={mid:"middle",down:"bottom",up:"top"},n={type:"shape",id:(0,r.x0)(10),width:l.width,height:l.height,left:l.left,top:l.top,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:l.fillColor||"none",fixedRatio:!1,rotate:l.rotate,outline:{color:l.borderColor,width:l.borderWidth,style:"solid"===l.borderType?"solid":"dashed"},text:{content:l.content,defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,align:a[l.vAlign]||"middle"},flipH:l.isFlipH,flipV:l.isFlipV};if(l.shadow&&(n.shadow=l.shadow),e&&(n.path=e.path,n.viewBox=e.viewBox,e.pathFormula)){n.pathFormula=e.pathFormula,n.viewBox=[l.width,l.height];const t=ra[e.pathFormula];"editable"in t?(n.path=t.formula(l.width,l.height,t.defaultValue),n.keypoint=t.defaultValue):n.path=t.formula(l.width,l.height)}"custom"===l.shapType&&(n.special=!0,n.path=l.path,n.viewBox=[l.width,l.height]),o.elements.push(n)}else if("table"===l.type){const e=l.data.length,a=l.data[0].length,n={fontname:t.value.fontName,color:t.value.fontColor},i=[];for(let t=0;te+"")),a=["系列1"],n=[t[1]]}else{const t=l.data;e=Object.values(t[0].xlabels),a=t.map((e=>e.key)),n=t.map((e=>e.values.map((e=>e.y))))}const i={};let s="bar";switch(l.chartType){case"barChart":case"bar3DChart":s="bar","bar"===l.barDir&&(i.horizontalBars=!0),"stacked"!==l.grouping&&"percentStacked"!==l.grouping||(i.stackBars=!0);break;case"lineChart":case"line3DChart":case"areaChart":case"area3DChart":case"scatterChart":case"bubbleChart":s="line","areaChart"!==l.chartType&&"area3DChart"!==l.chartType||(i.showArea=!0),"scatterChart"!==l.chartType&&"bubbleChart"!==l.chartType||(i.showLine=!1);break;case"pieChart":case"pie3DChart":case"doughnutChart":s="pie","doughnutChart"===l.chartType&&(i.donut=!0);break;default:}o.elements.push({type:"chart",id:(0,r.x0)(10),chartType:s,width:l.width,height:l.height,left:l.left,top:l.top,rotate:0,themeColor:[t.value.themeColor],gridColor:t.value.fontColor,data:{labels:e,legends:a,series:n},options:i})}else if("group"===l.type||"diagram"===l.type){const e=l.elements.map((e=>({...e,left:e.left+l.left,top:e.top+l.top})));i(e)}};i(e.elements),p.push(o)}a.value?e.setSlides(p):l(p),n.value=!1},c.readAsArrayBuffer(i)};return{importSpecificFile:i,importPPTXFile:c,exporting:n}};const Wa={class:"hotkey-doc"},Da={class:"title"},Ha={class:"label"},Fa={class:"value"};var Aa=(0,i.aZ)({__name:"HotkeyDoc",setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Wa,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ie),(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.type},[(0,i._)("div",Da,(0,oe.zw)(e.type),1),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"hotkey-item",key:e.label},[(0,i._)("div",Ha,(0,oe.zw)(e.label),1),(0,i._)("div",Fa,(0,oe.zw)(e.value),1)])))),128))],64)))),128))]))}});const $a=(0,Vl.Z)(Aa,[["__scopeId","data-v-a0322054"]]);var Za=$a;const Oa=["accept"];var Ra=(0,i.aZ)({__name:"FileInput",props:{accept:{default:"image/*"}},emits:["change"],setup(e,{emit:t}){const l=t,a=(0,s.iH)(),n=()=>{a.value&&(a.value.value="",a.value.click())},o=e=>{const t=e.target.files;t&&l("change",t)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"file-input",onClick:t[1]||(t[1]=e=>n())},[(0,i.WI)(e.$slots,"default"),(0,i._)("input",{class:"input",type:"file",name:"upload",ref_key:"inputRef",ref:a,accept:e.accept,onChange:t[0]||(t[0]=e=>o(e))},null,40,Oa)]))}});const za=(0,Vl.Z)(Ra,[["__scopeId","data-v-64bedb34"]]);var Pa=za;const Ba=e=>((0,i.dD)("data-v-a5c6b41c"),e=e(),(0,i.Cn)(),e),Na={key:0,class:"fullscreen-spin"},ja={class:"spin"},Ya=Ba((()=>(0,i._)("div",{class:"spinner"},null,-1))),Va={class:"text"};var Ja=(0,i.aZ)({__name:"FullscreenSpin",props:{loading:{type:Boolean,default:!1},tip:{default:""}},setup(e){return(e,t)=>e.loading?((0,i.wg)(),(0,i.iD)("div",Na,[(0,i._)("div",ja,[Ya,(0,i._)("div",Va,(0,oe.zw)(e.tip),1)])])):(0,i.kq)("",!0)}});const qa=(0,Vl.Z)(Ja,[["__scopeId","data-v-a5c6b41c"]]);var Xa=qa;const Ga={class:"header"};var Ka=(0,i.aZ)({__name:"Drawer",props:{visible:{type:Boolean},width:{default:320},contentStyle:{},placement:{default:"right"}},emits:["update:visible"],setup(e,{emit:t}){const l=e,a=t,o=(0,s.iH)(!1),r=(0,i.Fl)((()=>({width:l.width+"px",...l.contentStyle||{}})));return(e,t)=>{const s=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.j4)(i.lR,{to:"body"},[(0,i.Wm)(n.uT,{name:`drawer-slide-${e.placement}`,onAfterLeave:t[1]||(t[1]=e=>o.value=!1),onBeforeEnter:t[2]||(t[2]=e=>o.value=!0)},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:(0,oe.C_)(["drawer",e.placement]),style:(0,oe.j5)({width:l.width+"px"})},[(0,i._)("div",Ga,[(0,i.WI)(e.$slots,"title"),(0,i._)("span",{class:"close-btn",onClick:t[0]||(t[0]=e=>a("update:visible",!1))},[(0,i.Wm)(s)])]),o.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"content",style:(0,oe.j5)(r.value)},[(0,i.WI)(e.$slots,"default")],4)):(0,i.kq)("",!0)],6),[[n.F8,e.visible]])])),_:3},8,["name"])])}}});const Qa=(0,Vl.Z)(Ka,[["__scopeId","data-v-749dadac"]]);var en=Qa;const tn={class:"prefix"},ln=["disabled","value","placeholder"],an={class:"suffix"};var nn=(0,i.aZ)({__name:"Input",props:{value:{},disabled:{type:Boolean,default:!1},placeholder:{default:""}},emits:["update:value","input","change","blur","focus","enter"],setup(e,{expose:t,emit:l}){const a=l,o=(0,s.iH)(!1),r=e=>{a("update:value",e.target.value)},u=e=>{o.value=!1,a("blur",e)},c=e=>{o.value=!0,a("focus",e)},d=(0,s.iH)(),p=()=>{d.value&&d.value.focus()};return t({focus:p}),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["input",{disabled:e.disabled,focused:o.value}])},[(0,i._)("span",tn,[(0,i.WI)(e.$slots,"prefix")]),(0,i._)("input",{type:"text",ref_key:"inputRef",ref:d,disabled:e.disabled,value:e.value,placeholder:e.placeholder,onInput:t[0]||(t[0]=e=>r(e)),onFocus:t[1]||(t[1]=e=>c(e)),onBlur:t[2]||(t[2]=e=>u(e)),onChange:t[3]||(t[3]=e=>a("change",e)),onKeydown:t[4]||(t[4]=(0,n.D2)((e=>a("enter",e)),["enter"]))},null,40,ln),(0,i._)("span",an,[(0,i.WI)(e.$slots,"suffix")])],2))}});const on=(0,Vl.Z)(nn,[["__scopeId","data-v-a97ba0dc"]]);var sn=on,rn=l(6488),un=(l(8627),(0,i.aZ)({__name:"Popover",props:{value:{type:Boolean,default:!1},trigger:{default:"click"},placement:{default:"bottom"},appendTo:{},contentStyle:{},center:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=t,n=(0,s.iH)(),o=(0,s.iH)(),r=(0,s.iH)(),u=(0,s.iH)(!1),c=(0,i.Fl)((()=>l.contentStyle||{}));return(0,i.YP)((()=>l.value),(()=>{n.value&&(l.value?n.value.show():n.value.hide())})),(0,i.bv)((()=>{n.value=(0,rn.ZP)(o.value,{content:r.value,allowHTML:!0,trigger:l.trigger,placement:l.placement,interactive:!0,appendTo:l.appendTo||document.body,maxWidth:"none",offset:[0,8],duration:200,animation:"scale",theme:"popover",onShow(){u.value=!0},onShown(){l.value||a("update:value",!0)},onHidden(){l.value&&a("update:value",!1),u.value=!1}})})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["popover",{center:e.center}]),ref_key:"triggerRef",ref:o},[(0,i._)("div",{class:"popover-content",style:(0,oe.j5)(c.value),ref_key:"contentRef",ref:r},[u.value?(0,i.WI)(e.$slots,"content",{key:0}):(0,i.kq)("",!0)],4),(0,i.WI)(e.$slots,"default")],2))}}));const cn=(0,Vl.Z)(un,[["__scopeId","data-v-70fabe9a"]]);var dn=cn,pn=(0,i.aZ)({__name:"PopoverMenuItem",props:{center:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const l=t;return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["popover-menu-item",{center:e.center}]),onClick:t[0]||(t[0]=e=>l("click"))},[(0,i.WI)(e.$slots,"default")],2))}});const vn=(0,Vl.Z)(pn,[["__scopeId","data-v-2f137c4f"]]);var mn=vn;const hn={class:"editor-header"},fn={class:"left"},gn={class:"menu-item"},yn={class:"title"},wn=["title"],xn={class:"right"},kn={class:"group-menu-item"},bn={class:"arrow-btn"},_n={class:"github-link",href:"https://github.com/pipipi-pikachu/PPTist",target:"_blank"},In={class:"menu-item"};var Sn=(0,i.aZ)({__name:"index",setup(e){const t=R(),l=$(),{title:a}=(0,o.Jk)(l),{enterScreening:n,enterScreeningFromStart:r}=Ca(),{importSpecificFile:u,importPPTXFile:c,exporting:d}=Ua(),{resetSlides:p}=ha(),v=(0,s.iH)(!1),m=(0,s.iH)(!1),h=(0,s.iH)(!1),f=(0,s.iH)(),g=(0,s.iH)(""),y=()=>{g.value=a.value,h.value=!0,(0,i.Y3)((()=>f.value?.focus()))},w=()=>{l.setTitle(g.value),h.value=!1},x=e=>{window.open(e),v.value=!1},k=e=>{t.setDialogForExport(e),v.value=!1};return(e,t)=>{const l=(0,i.up)("IconHamburgerButton"),o=(0,i.up)("IconPpt"),b=(0,i.up)("IconDown"),_=(0,i.up)("IconDownload"),I=(0,i.up)("IconGithub"),S=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",hn,[(0,i._)("div",fn,[(0,i.Wm)(dn,{trigger:"click",placement:"bottom-start",value:v.value,"onUpdate:value":t[7]||(t[7]=e=>v.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Pa,{accept:".pptist",onChange:t[0]||(t[0]=e=>{(0,s.SU)(u)(e),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(mn,null,{default:(0,i.w5)((()=>[(0,i.Uk)("导入 pptist 文件")])),_:1})])),_:1}),(0,i.Wm)(Pa,{accept:"application/vnd.openxmlformats-officedocument.presentationml.presentation",onChange:t[1]||(t[1]=e=>{(0,s.SU)(c)(e),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(mn,null,{default:(0,i.w5)((()=>[(0,i.Uk)("导入 pptx 文件(测试版)")])),_:1})])),_:1}),(0,i.Wm)(mn,{onClick:t[2]||(t[2]=e=>k("pptx"))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出文件")])),_:1}),(0,i.Wm)(mn,{onClick:t[3]||(t[3]=e=>{(0,s.SU)(p)(),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Uk)("重置幻灯片")])),_:1}),(0,i.Wm)(mn,{onClick:t[4]||(t[4]=e=>x("https://github.com/pipipi-pikachu/PPTist/issues"))},{default:(0,i.w5)((()=>[(0,i.Uk)("意见反馈")])),_:1}),(0,i.Wm)(mn,{onClick:t[5]||(t[5]=e=>x("https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Q&A.md"))},{default:(0,i.w5)((()=>[(0,i.Uk)("常见问题")])),_:1}),(0,i.Wm)(mn,{onClick:t[6]||(t[6]=e=>{v.value=!1,m.value=!0})},{default:(0,i.w5)((()=>[(0,i.Uk)("快捷键")])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",gn,[(0,i.Wm)(l,{class:"icon"})])])),_:1},8,["value"]),(0,i._)("div",yn,[h.value?((0,i.wg)(),(0,i.j4)(sn,{key:0,class:"title-input",ref_key:"titleInputRef",ref:f,value:g.value,"onUpdate:value":t[8]||(t[8]=e=>g.value=e),onBlur:t[9]||(t[9]=e=>w())},null,8,["value"])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"title-text",onClick:t[10]||(t[10]=e=>y()),title:(0,s.SU)(a)},(0,oe.zw)((0,s.SU)(a)),9,wn))])]),(0,i._)("div",xn,[(0,i._)("div",kn,[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"menu-item",onClick:t[11]||(t[11]=e=>(0,s.SU)(n)())},[(0,i.Wm)(o,{class:"icon"})])),[[S,"幻灯片放映"]]),(0,i.Wm)(dn,{trigger:"click",center:""},{content:(0,i.w5)((()=>[(0,i.Wm)(mn,{onClick:t[12]||(t[12]=e=>(0,s.SU)(r)())},{default:(0,i.w5)((()=>[(0,i.Uk)("从头开始")])),_:1}),(0,i.Wm)(mn,{onClick:t[13]||(t[13]=e=>(0,s.SU)(n)())},{default:(0,i.w5)((()=>[(0,i.Uk)("从当前页开始")])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",bn,[(0,i.Wm)(b,{class:"arrow"})])])),_:1})]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"menu-item",onClick:t[14]||(t[14]=e=>k("pptx"))},[(0,i.Wm)(_,{class:"icon"})])),[[S,"导出"]]),(0,i._)("a",_n,[(0,i._)("div",In,[(0,i.Wm)(I,{class:"icon"})])])]),(0,i.Wm)(en,{width:320,visible:m.value,"onUpdate:visible":t[15]||(t[15]=e=>m.value=e),placement:"right"},{default:(0,i.w5)((()=>[(0,i.Wm)(Za)])),_:1},8,["visible"]),(0,i.Wm)(Xa,{loading:(0,s.SU)(d),tip:"正在导入..."},null,8,["loading"])])}}});const Cn=(0,Vl.Z)(Sn,[["__scopeId","data-v-0b9f8c7b"]]);var Ln=Cn;const Tn=Symbol(),En=Symbol(),Mn=Symbol(),Un=()=>{const e=window.getSelection();e&&e.removeAllRanges()};var Wn=e=>{const t=(0,s.iH)(0),l=(0,s.iH)(0),a=R(),{canvasPercentage:n,canvasDragged:r}=(0,o.Jk)(a),{viewportRatio:u}=(0,o.Jk)($()),c=()=>{if(!e.value)return;const o=e.value.clientWidth,i=e.value.clientHeight;if(i/o>u.value){const e=o*(n.value/100);a.setCanvasScale(e/oa),t.value=(o-e)/2,l.value=(i-e*u.value)/2}else{const e=i*(n.value/100);a.setCanvasScale(e/(oa*u.value)),t.value=(o-e/u.value)/2,l.value=(i-e)/2}},d=(n,o)=>{if(!e.value)return;const i=e.value.clientWidth,s=e.value.clientHeight,r=i*(n/100),c=i*(o/100),d=s*(n/100),p=s*(o/100);s/i>u.value?a.setCanvasScale(r/oa):a.setCanvasScale(d/(oa*u.value)),t.value=t.value-(r-c)/2,l.value=l.value-(d-p)/2};(0,i.YP)(n,d),(0,i.YP)(u,c),(0,i.YP)(r,(()=>{r.value||c()}));const p=(0,i.Fl)((()=>({width:oa,height:oa*u.value,left:t.value,top:l.value}))),v=new ResizeObserver(c);(0,i.bv)((()=>{e.value&&v.observe(e.value)})),(0,i.Ah)((()=>{e.value&&v.unobserve(e.value)}));const m=e=>{let n=!0;const o=e.pageX,i=e.pageY,s=t.value,r=l.value;document.onmousemove=e=>{if(!n)return;const a=e.pageX,u=e.pageY;t.value=s+(a-o),l.value=r+(u-i)},document.onmouseup=()=>{n=!1,document.onmousemove=null,document.onmouseup=null,a.setCanvasDragged(!0)}};return{viewportStyles:p,dragViewport:m}},Dn=(e,t)=>{const l=R(),{canvasScale:a,hiddenElementIdList:n}=(0,o.Jk)(l),i=(0,s.iH)(!1),r=(0,s.iH)(1),u=(0,s.iH)({top:0,left:0,width:0,height:0}),c=o=>{if(!t.value)return;let s=!0;const c=t.value.getBoundingClientRect(),d=5,p=o.pageX,v=o.pageY,m=(p-c.x)/a.value,h=(v-c.y)/a.value;u.value={top:h,left:m,width:0,height:0},i.value=!1,r.value=4,document.onmousemove=e=>{if(!s)return;const t=e.pageX,l=e.pageY,n=(t-p)/a.value,o=(l-v)/a.value,c=Math.abs(n),m=Math.abs(o);if(c0&&o>0?h=4:n<0&&o<0?h=2:n>0&&o<0?h=1:n<0&&o>0&&(h=3),u.value={...u.value,width:c,height:m},i.value=!0,r.value=h},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,s=!1;let t=[];for(let l=0;lo&&pi&&mo-s&&pi-c&&mo&&pi-c&&mo-s&&pi&&m{if(l.groupId){const a=t.map((e=>e.id)),n=e.value.filter((e=>e.groupId===l.groupId));return n.every((e=>a.includes(e.id)))}return!0}));const a=t.map((e=>e.id));l.setActiveElementIdList(a),i.value=!1}};return{mouseSelection:u,mouseSelectionVisible:i,mouseSelectionQuadrant:r,updateMouseSelection:c}},Hn=e=>{const{disableHotkeys:t}=(0,o.Jk)(R()),{createImageElement:l,createTextElement:a}=pa(),n=e=>{if(!e.dataTransfer||0===e.dataTransfer.items.length)return;const n=e.dataTransfer.items[0];if("file"===n.kind&&-1!==n.type.indexOf("image")){const e=n.getAsFile();e&&na(e).then((e=>l(e)))}else"string"===n.kind&&"text/plain"===n.type&&n.getAsString((e=>{if(t.value)return;const l=la(e);a({left:0,top:0,width:600,height:50},{content:l})}))};(0,i.bv)((()=>{e.value&&e.value.addEventListener("drop",n),document.ondragleave=e=>e.preventDefault(),document.ondrop=e=>e.preventDefault(),document.ondragenter=e=>e.preventDefault(),document.ondragover=e=>e.preventDefault()})),(0,i.Ah)((()=>{e.value&&e.value.removeEventListener("drop",n),document.ondragleave=null,document.ondrop=null,document.ondragenter=null,document.ondragover=null}))};const Fn=(e,t)=>{const l=Math.atan2(e,t),a=180/Math.PI*l;return a};var An=(e,t,l)=>{const a=$(),{addHistorySnapshot:n}=da(),o=(o,i)=>{const s=!(o instanceof MouseEvent);if(s&&(!o.changedTouches||!o.changedTouches[0]))return;let r=!0,u=0;const c=i.rotate||0,d=i.left,p=i.top,v=i.width,m=i.height,h=d+v/2,f=p+m/2;if(!t.value)return;const g=t.value.getBoundingClientRect(),y=t=>{if(!r)return;const a=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,n=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,o=(a-g.left)/l.value,s=(n-g.top)/l.value,c=o-h,d=f-s;u=Fn(c,d);const p=5;Math.abs(u)<=p?u=0:u>0&&Math.abs(u-45)<=p?u-=u-45:u<0&&Math.abs(u+45)<=p?u-=u+45:u>0&&Math.abs(u-90)<=p?u-=u-90:u<0&&Math.abs(u+90)<=p?u-=u+90:u>0&&Math.abs(u-135)<=p?u-=u-135:u<0&&Math.abs(u+135)<=p?u-=u+135:u>0&&Math.abs(u-180)<=p?u-=u-180:u<0&&Math.abs(u+180)<=p&&(u-=u+180),e.value=e.value.map((e=>i.id===e.id?{...e,rotate:u}:e))},w=()=>{r=!1,document.onmousemove=null,document.onmouseup=null,c!==u&&(a.updateSlide({elements:e.value}),n())};s?(document.ontouchmove=y,document.ontouchend=w):(document.onmousemove=y,document.onmouseup=w)};return{rotateElement:o}};const $n={text:"文本",image:"图片",shape:"形状",line:"线条",chart:"图表",table:"表格",video:"视频",audio:"音频",latex:"公式"},Zn={text:20,image:20,shape:15,chart:200,table:20,video:250,audio:20,latex:20},On=(e,t)=>{const{left:l,top:a,width:n,height:o}=e,i=Math.sqrt(Math.pow(n,2)+Math.pow(o,2))/2,s=180*Math.atan(o/n)/Math.PI,r=(180-t-s)*Math.PI/180,u=(s-t)*Math.PI/180,c=(90-t)*Math.PI/180,d=t*Math.PI/180,p=n/2,v=o/2,m=l+p,h=a+v,f={left:m+i*Math.cos(r),top:h-i*Math.sin(r)},g={left:m+v*Math.cos(c),top:h-v*Math.sin(c)},y={left:m+i*Math.cos(u),top:h-i*Math.sin(u)},w={left:m+p*Math.cos(d),top:h+p*Math.sin(d)},x={left:m-i*Math.cos(r),top:h+i*Math.sin(r)},k={left:m-v*Math.sin(d),top:h+v*Math.cos(d)},b={left:m-i*Math.cos(u),top:h+i*Math.sin(u)},_={left:m-p*Math.cos(d),top:h-p*Math.sin(d)};return{leftTopPoint:f,topPoint:g,rightTopPoint:y,rightPoint:w,rightBottomPoint:x,bottomPoint:k,leftBottomPoint:b,leftPoint:_}},Rn=(e,t)=>{const l={[le.RIGHT_BOTTOM]:t.leftTopPoint,[le.LEFT_BOTTOM]:t.rightTopPoint,[le.LEFT_TOP]:t.rightBottomPoint,[le.RIGHT_TOP]:t.leftBottomPoint,[le.TOP]:t.bottomPoint,[le.BOTTOM]:t.topPoint,[le.LEFT]:t.rightPoint,[le.RIGHT]:t.leftPoint};return l[e]};var zn,Pn,Bn=(e,t,l)=>{const a=R(),n=$(),{activeElementIdList:i,activeGroupElementId:s}=(0,o.Jk)(a),{viewportRatio:r}=(0,o.Jk)(n),{ctrlOrShiftKeyActive:u}=(0,o.Jk)(q()),{addHistorySnapshot:c}=da(),d=(o,d,p)=>{const v=!(o instanceof MouseEvent);if(v&&(!o.changedTouches||!o.changedTouches[0]))return;let m=!0;a.setScalingState(!0);const h=d.left,f=d.top,g=d.width,y=d.height,w="table"===d.type?d.cellMinHeight:0,x="rotate"in d&&d.rotate?d.rotate:0,k=Math.PI*x/180,b=u.value||"fixedRatio"in d&&d.fixedRatio,_=g/y,I=v?o.changedTouches[0].pageX:o.pageX,S=v?o.changedTouches[0].pageY:o.pageY,C=Zn[d.type]||20,L=e=>e{const t=C/_;return e{const a=5,n=[];let o=!1,i=!1;const s={offsetX:0,offsetY:0};if(l||0===l)for(let t=0;t{if(!m)return;const a=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,n=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,o=a-I,i=n-S;let s=g,r=y,u=h,c=f;if(x){const e=(Math.cos(k)*o+Math.sin(k)*i)/l.value;let t=(Math.cos(k)*i-Math.sin(k)*o)/l.value;b&&(p!==le.RIGHT_BOTTOM&&p!==le.LEFT_TOP||(t=e/_),p!==le.LEFT_BOTTOM&&p!==le.RIGHT_TOP||(t=-e/_)),p===le.RIGHT_BOTTOM?(s=L(g+e),r=T(y+t)):p===le.LEFT_BOTTOM?(s=L(g-e),r=T(y+t),u=h-(s-g)):p===le.LEFT_TOP?(s=L(g-e),r=T(y-t),u=h-(s-g),c=f-(r-y)):p===le.RIGHT_TOP?(s=L(g+e),r=T(y-t),c=f-(r-y)):p===le.TOP?(r=L(y-t),c=f-(r-y)):p===le.BOTTOM?r=L(y+t):p===le.LEFT?(s=L(g-e),u=h-(s-g)):p===le.RIGHT&&(s=L(g+e));const a=On({width:s,height:r,left:u,top:c},x),n=Rn(p,a),d=n.left,v=n.top,m=d-M,w=v-U;u-=m,c-=w}else{let e=o/l.value,t=i/l.value;if(b&&(p!==le.RIGHT_BOTTOM&&p!==le.LEFT_TOP||(t=e/_),p!==le.LEFT_BOTTOM&&p!==le.RIGHT_TOP||(t=-e/_)),p===le.RIGHT_BOTTOM){const{offsetX:l,offsetY:a}=H(h+g+e,f+y+t);e-=l,t-=a,b&&(a?e=t*_:t=e/_),s=L(g+e),r=T(y+t)}else if(p===le.LEFT_BOTTOM){const{offsetX:l,offsetY:a}=H(h+e,f+y+t);e-=l,t-=a,b&&(a?e=-t*_:t=-e/_),s=L(g-e),r=T(y+t),u=h-(s-g)}else if(p===le.LEFT_TOP){const{offsetX:l,offsetY:a}=H(h+e,f+t);e-=l,t-=a,b&&(a?e=t*_:t=e/_),s=L(g-e),r=T(y-t),u=h-(s-g),c=f-(r-y)}else if(p===le.RIGHT_TOP){const{offsetX:l,offsetY:a}=H(h+g+e,f+t);e-=l,t-=a,b&&(a?e=-t*_:t=-e/_),s=L(g+e),r=T(y-t),c=f-(r-y)}else if(p===le.LEFT){const{offsetX:t}=H(h+e,null);e-=t,s=L(g-e),u=h-(s-g)}else if(p===le.RIGHT){const{offsetX:t}=H(h+g+e,null);e-=t,s=L(g+e)}else if(p===le.TOP){const{offsetY:e}=H(null,f+t);t-=e,r=L(y-t),c=f-(r-y)}else if(p===le.BOTTOM){const{offsetY:e}=H(null,f+y+t);t-=e,r=L(y+t)}}e.value=e.value.map((e=>{if(d.id!==e.id)return e;if("shape"===e.type&&"pathFormula"in e&&e.pathFormula){const t=ra[e.pathFormula];let l="";return l="editable"in t?t.formula(s,r,e.keypoint):t.formula(s,r),{...e,left:u,top:c,width:s,height:r,viewBox:[s,r],path:l}}if("table"===e.type){let t=w+(r-y)/e.data.length;return t=t<36?36:t,t===w?{...e,left:u,width:s}:{...e,left:u,top:c,width:s,height:r,cellMinHeight:t<36?36:t}}return{...e,left:u,top:c,width:s,height:r}}))},A=l=>{m=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const o=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,i=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;I===o&&S===i||(n.updateSlide({elements:e.value}),a.setScalingState(!1),c())};v?(document.ontouchmove=F,document.ontouchend=A):(document.onmousemove=F,document.onmouseup=A)},p=(t,a,o)=>{let s=!0;const{minX:r,maxX:d,minY:p,maxY:v}=a,m=d-r,h=v-p,f=m/h,g=t.pageX,y=t.pageY,w=JSON.parse(JSON.stringify(e.value));document.onmousemove=t=>{if(!s)return;const a=t.pageX,n=t.pageY,c=(a-g)/l.value;let x=(n-y)/l.value;u.value&&(o!==le.RIGHT_BOTTOM&&o!==le.LEFT_TOP||(x=c/f),o!==le.LEFT_BOTTOM&&o!==le.RIGHT_TOP||(x=-c/f));let k=r,b=d,_=p,I=v;o===le.RIGHT_BOTTOM?(b=d+c,I=v+x):o===le.LEFT_BOTTOM?(k=r+c,I=v+x):o===le.LEFT_TOP?(k=r+c,_=p+x):o===le.RIGHT_TOP?(b=d+c,_=p+x):o===le.TOP?_=p+x:o===le.BOTTOM?I=v+x:o===le.LEFT?k=r+c:o===le.RIGHT&&(b=d+c);const S=b-k,C=I-_;let L=S/m,T=C/h;L<=0&&(L=0),T<=0&&(T=0),e.value=e.value.map((e=>{if(("image"===e.type||"shape"===e.type)&&i.value.includes(e.id)){const t=w.find((t=>t.id===e.id));return{...e,width:t.width*L,height:t.height*T,left:k+(t.left-r)*L,top:_+(t.top-p)*T}}return e}))},document.onmouseup=t=>{s=!1,document.onmousemove=null,document.onmouseup=null,g===t.pageX&&y===t.pageY||(n.updateSlide({elements:e.value}),c())}};return{scaleElement:d,scaleMultiElement:p}},Nn=(e,t)=>{const l=R(),{activeElementIdList:a,activeGroupElementId:n,handleElementId:i,editorAreaFocus:s}=(0,o.Jk)(l),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(q()),u=(o,u,c=!0)=>{if(s.value||l.setEditorareaFocus(!0),a.value.includes(u.id)){if(r.value){let t=[];if(u.groupId){const l=[];e.value.forEach((e=>{e.groupId===u.groupId&&l.push(e.id)})),t=a.value.filter((e=>!l.includes(e)))}else t=a.value.filter((e=>e!==u.id));t.length>0&&l.setActiveElementIdList(t)}else if(i.value!==u.id)l.setHandleElementId(u.id);else if(n.value!==u.id){const e=o instanceof MouseEvent?o.pageX:o.changedTouches[0].pageX,t=o instanceof MouseEvent?o.pageY:o.changedTouches[0].pageY;o.target.onmouseup=a=>{const n=a.pageX,o=a.pageY;e===n&&t===o&&(l.setActiveGroupElementId(u.id),a.target.onmouseup=null)}}}else{let t=[];if(t=r.value?[...a.value,u.id]:[u.id],u.groupId){const l=[];e.value.forEach((e=>{e.groupId===u.groupId&&l.push(e.id)})),t=[...t,...l]}l.setActiveElementIdList((0,D.uniq)(t)),l.setHandleElementId(u.id)}c&&t(o,u)};return{selectElement:u}},jn=(e,t,l)=>{const a=$(),{activeElementIdList:n,activeGroupElementId:i}=(0,o.Jk)(R()),{shiftKeyState:s}=(0,o.Jk)(q()),{viewportRatio:r}=(0,o.Jk)(a),{addHistorySnapshot:u}=da(),c=(o,c)=>{const d=!(o instanceof MouseEvent);if(d&&(!o.changedTouches||!o.changedTouches[0]))return;if(!n.value.includes(c.id))return;let p=!0;const v=oa,m=oa*r.value,h=5,f=JSON.parse(JSON.stringify(e.value)),g=f.filter((e=>n.value.includes(e.id))),y=c.left,w=c.top,x=c.width,k="height"in c&&c.height?c.height:0,b="rotate"in c&&c.rotate?c.rotate:0,_=d?o.changedTouches[0].pageX:o.pageX,I=d?o.changedTouches[0].pageY:o.pageY;let S=null;const C=c.id===i.value;let L=[],T=[];for(const t of e.value){if("line"===t.type)continue;if(C&&t.id===c.id)continue;if(!C&&n.value.includes(t.id))continue;let e,l,a,o;if("rotate"in t&&t.rotate){const{xRange:n,yRange:i}=ye({left:t.left,top:t.top,width:t.width,height:t.height,rotate:t.rotate});e=n[0],l=i[0],a=n[1]-n[0],o=i[1]-i[0]}else e=t.left,l=t.top,a=t.width,o=t.height;const i=e+a,s=l+o,r=l+o/2,u=e+a/2,d={value:l,range:[e,i]},p={value:s,range:[e,i]},v={value:r,range:[e,i]},m={value:e,range:[l,s]},h={value:i,range:[l,s]},f={value:u,range:[l,s]};L.push(d,p,v),T.push(m,h,f)}const E={value:0,range:[0,v]},M={value:m,range:[0,v]},U={value:m/2,range:[0,v]},W={value:0,range:[0,m]},D={value:v,range:[0,m]},H={value:v/2,range:[0,m]};L.push(E,M,U),T.push(W,D,H),L=be(L),T=be(T);const F=a=>{const o=a instanceof MouseEvent?a.pageX:a.changedTouches[0].pageX,i=a instanceof MouseEvent?a.pageY:a.changedTouches[0].pageY;if(!1!==S&&(S=Math.abs(_-o)Math.abs(u)&&(u=0),Math.abs(r)e.id===c.id?{...e,left:E,top:M}:e));else{const t=e.value.find((e=>e.id===c.id));if(!t)return;e.value=e.value.map((e=>n.value.includes(e.id)?e.id===c.id?{...e,left:E,top:M}:{...e,left:e.left+(E-t.left),top:e.top+(M-t.top)}:e))}},A=l=>{p=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const n=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,o=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;_===n&&I===o||(a.updateSlide({elements:e.value}),u())};d?(document.ontouchmove=F,document.ontouchend=A):(document.onmousemove=F,document.onmouseup=A)};return{dragElement:c}},Yn=e=>{const t=$(),{canvasScale:l}=(0,o.Jk)(R()),{ctrlOrShiftKeyActive:a}=(0,o.Jk)(q()),{addHistorySnapshot:n}=da(),i=(o,i,s)=>{let r=!0;const u=8,c=o.pageX,d=o.pageY,p=[];for(let t=0;t{if(!r)return;const n=t.pageX,o=t.pageY,v=(n-c)/l.value,m=(o-d)/l.value;let h=i.left+i.start[0],f=i.top+i.start[1],g=i.left+i.end[0],y=i.top+i.end[1];const w=i.broken||i.curve||[0,0];let x=i.left+w[0],k=i.top+w[1];const[b,_]=i.cubic||[[0,0],[0,0]];let I=i.left+b[0],S=i.top+b[1],C=i.left+_[0],L=i.top+_[1];if(s===ae.START){h+=v,f+=m,Math.abs(h-g)g&&(W[0]=M-T,D[0]=0),f>y&&(W[1]=U-E,D[1]=0),e.value=e.value.map((e=>{if(e.id===i.id){const t={...e,left:T,top:E,start:W,end:D};return s===ae.START||s===ae.END?a.value?(i.broken&&(t.broken=[x-T,k-E]),i.curve&&(t.curve=[x-T,k-E]),i.cubic&&(t.cubic=[[I-T,S-E],[C-T,L-E]])):(i.broken&&(t.broken=[(W[0]+D[0])/2,(W[1]+D[1])/2]),i.curve&&(t.curve=[(W[0]+D[0])/2,(W[1]+D[1])/2]),i.cubic&&(t.cubic=[[(W[0]+D[0])/2,(W[1]+D[1])/2],[(W[0]+D[0])/2,(W[1]+D[1])/2]])):s===ae.C?(i.broken&&(t.broken=[x-T,k-E]),i.curve&&(t.curve=[x-T,k-E])):i.cubic&&(t.cubic=[[I-T,S-E],[C-T,L-E]]),t}return e}))},document.onmouseup=l=>{r=!1,document.onmousemove=null,document.onmouseup=null;const a=l.pageX,o=l.pageY;c===a&&d===o||(t.updateSlide({elements:e.value}),n())}};return{dragLineElement:i}},Vn=(e,t)=>{const l=$(),{addHistorySnapshot:a}=da(),n=(n,o)=>{const i=!(n instanceof MouseEvent);if(i&&(!n.changedTouches||!n.changedTouches[0]))return;let s=!0;const r=i?n.changedTouches[0].pageX:n.pageX,u=i?n.changedTouches[0].pageY:n.pageY,c=ra[o.pathFormula];let d=null;if("editable"in c){const e=c.getBaseSize(o.width,o.height),t=e*o.keypoint,[l,a]=c.range,n=c.relative;d={baseSize:e,originPos:t,min:l,max:a,relative:n}}const p=l=>{if(!s)return;const a=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,n=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY,i=(a-r)/t.value,p=(n-u)/t.value;e.value=e.value.map((e=>{if(e.id===o.id&&d){const{baseSize:t,originPos:l,min:a,max:n,relative:o}=d,s=e;let r=0;return"left"===o&&(r=(l+i)/t),"right"===o&&(r=(l-i)/t),"center"===o&&(r=(l-2*i)/t),"top"===o&&(r=(l+p)/t),"bottom"===o&&(r=(l-p)/t),rn&&(r=n),{...e,keypoint:r,path:c.formula(s.width,s.height,r)}}return e}))},v=t=>{s=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null;const n=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,o=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY;r===n&&u===o||(l.updateSlide({elements:e.value}),a())};i?(document.ontouchmove=p,document.ontouchend=v):(document.onmousemove=p,document.onmouseup=v)};return{moveShapeKeypoint:n}},Jn=e=>{const t=R(),{canvasScale:l,creatingElement:a}=(0,o.Jk)(t),n=t=>{const{start:a,end:n}=t;if(!e.value)return;const o=e.value.getBoundingClientRect(),[i,s]=a,[r,u]=n,c=Math.min(i,r),d=Math.max(i,r),p=Math.min(s,u),v=Math.max(s,u),m=(c-o.x)/l.value,h=(p-o.y)/l.value,f=(d-c)/l.value,g=(v-p)/l.value;return{left:m,top:h,width:f,height:g}},i=t=>{const{start:a,end:n}=t;if(!e.value)return;const o=e.value.getBoundingClientRect(),[i,s]=a,[r,u]=n,c=Math.min(i,r),d=Math.max(i,r),p=Math.min(s,u),v=Math.max(s,u),m=(c-o.x)/l.value,h=(p-o.y)/l.value,f=(d-c)/l.value,g=(v-p)/l.value,y=[i===c?0:f,s===p?0:g],w=[r===c?0:f,u===p?0:g];return{left:m,top:h,start:y,end:w}},{createTextElement:s,createShapeElement:r,createLineElement:u}=pa(),c=e=>{if(!a.value)return;const l=a.value.type;if("text"===l){const t=n(e);t&&s(t,{vertical:a.value.vertical})}else if("shape"===l){const t=n(e);t&&r(t,a.value.data)}else if("line"===l){const t=i(e);t&&u(t,a.value.data)}t.setCreatingElement(null)};return{formatCreateSelection:n,insertElementFromCreateSelection:c}},qn=()=>{const e=$(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(R()),{currentSlide:a,viewportRatio:n}=(0,o.Jk)(e),{addHistorySnapshot:i}=da(),s=o=>{const s=oa,r=oa*n.value,{minX:u,maxX:c,minY:d,maxY:p}=ke(l.value),v=JSON.parse(JSON.stringify(a.value.elements));for(const e of v)if(t.value.includes(e.id)){if(o===ee.CENTER){const t=d+(p-d)/2-r/2,l=u+(c-u)/2-s/2;e.top=e.top-t,e.left=e.left-l}if(o===ee.TOP){const t=d-0;e.top=e.top-t}else if(o===ee.VERTICAL){const t=d+(p-d)/2-r/2;e.top=e.top-t}else if(o===ee.BOTTOM){const t=p-r;e.top=e.top-t}else if(o===ee.LEFT){const t=u-0;e.left=e.left-t}else if(o===ee.HORIZONTAL){const t=u+(c-u)/2-s/2;e.left=e.left-t}else if(o===ee.RIGHT){const t=c-s;e.left=e.left-t}}e.updateSlide({elements:v}),i()};return{alignElementToCanvas:s}},Xn=e=>{const t=(0,i.Fl)((()=>{if(e.value){const{h:t,v:l,blur:a,color:n}=e.value;return`${t}px ${l}px ${a}px ${n}`}return""}));return{shadowStyle:t}},Gn=(e,t)=>{const l=(0,i.Fl)((()=>{let l="";return e.value&&t.value?l="rotateX(180deg) rotateY(180deg)":t.value?l="rotateX(180deg)":e.value&&(l="rotateY(180deg)"),l}));return{flipStyle:l}};(function(e){e["RECT"]="rect",e["ELLIPSE"]="ellipse",e["POLYGON"]="polygon"})(zn||(zn={})),function(e){e["RECT"]="rect",e["ROUNDRECT"]="roundRect",e["ELLIPSE"]="ellipse",e["TRIANGLE"]="triangle",e["PENTAGON"]="pentagon",e["RHOMBUS"]="rhombus",e["STAR"]="star"}(Pn||(Pn={}));const Kn={rect:{name:"矩形",type:zn.RECT,radius:"0",style:""},rect2:{name:"矩形2",type:zn.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)",createPath:(e,t)=>`M 0 0 L ${.8*e} 0 L ${e} ${.2*t} L ${e} ${t} L 0 ${t} Z`},rect3:{name:"矩形3",type:zn.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)",createPath:(e,t)=>`M 0 0 L ${.8*e} 0 L ${e} ${.2*t} L ${e} ${t} L ${.2*e} ${t} L 0 ${.8*t} Z`},roundRect:{name:"圆角矩形",type:zn.RECT,radius:"10px",style:"inset(0 0 0 0 round 10px 10px 10px 10px)"},ellipse:{name:"圆形",type:zn.ELLIPSE,style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:zn.POLYGON,style:"polygon(50% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M ${.5*e} 0 L 0 ${t} L ${e} ${t} Z`},triangle2:{name:"三角形2",type:zn.POLYGON,style:"polygon(50% 100%, 0% 0%, 100% 0%)",createPath:(e,t)=>`M ${.5*e} ${t} L 0 0 L ${e} 0 Z`},triangle3:{name:"三角形3",type:zn.POLYGON,style:"polygon(0% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M 0 0 L 0 ${t} L ${e} ${t} Z`},rhombus:{name:"菱形",type:zn.POLYGON,style:"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",createPath:(e,t)=>`M ${.5*e} 0 L ${e} ${.5*t} L ${.5*e} ${t} L 0 ${.5*t} Z`},pentagon:{name:"五边形",type:zn.POLYGON,style:"polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",createPath:(e,t)=>`M ${.5*e} 0 L ${e} ${.38*t} L ${.82*e} ${t} L ${.18*e} ${t} L 0 ${.38*t} Z`},hexagon:{name:"六边形",type:zn.POLYGON,style:"polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)",createPath:(e,t)=>`M ${.2*e} 0 L ${.8*e} 0 L ${e} ${.5*t} L ${.8*e} ${t} L ${.2*e} ${t} L 0 ${.5*t} Z`},heptagon:{name:"七边形",type:zn.POLYGON,style:"polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)",createPath:(e,t)=>`M ${.5*e} 0 L ${.9*e} ${.2*t} L ${e} ${.6*t} L ${.75*e} ${t} L ${.25*e} ${t} L 0 ${.6*t} L ${.1*e} ${.2*t} Z`},octagon:{name:"八边形",type:zn.POLYGON,style:"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)",createPath:(e,t)=>`M ${.3*e} 0 L ${.7*e} 0 L ${e} ${.3*t} L ${e} ${.7*t} L ${.7*e} ${t} L ${.3*e} ${t} L 0 ${.7*t} L 0 ${.3*t} Z`},chevron:{name:"V形",type:zn.POLYGON,style:"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)",createPath:(e,t)=>`M ${.75*e} 0 L ${e} ${.5*t} L ${.75*e} ${t} L 0 ${t} L ${.25*e} ${.5*t} L 0 0 Z`},point:{name:"点",type:zn.POLYGON,style:"polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)",createPath:(e,t)=>`M 0 0 L ${.75*e} 0 L ${e} ${.5*t} L ${.75*e} ${t} L 0 ${t} Z`},arrow:{name:"箭头",type:zn.POLYGON,style:"polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)",createPath:(e,t)=>`M 0 ${.2*t} L ${.6*e} ${.2*t} L ${.6*e} 0 L ${e} ${.5*t} L ${.6*e} ${t} L ${.6*e} ${.8*t} L 0 ${.8*t} Z`},parallelogram:{name:"平行四边形",type:zn.POLYGON,style:"polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)",createPath:(e,t)=>`M ${.3*e} 0 L ${e} 0 L ${.7*e} ${t} L 0 ${t} Z`},parallelogram2:{name:"平行四边形2",type:zn.POLYGON,style:"polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)",createPath:(e,t)=>`M ${.3*e} ${t} L ${e} ${t} L ${.7*e} 0 L 0 0 Z`},trapezoid:{name:"梯形",type:zn.POLYGON,style:"polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",createPath:(e,t)=>`M ${.25*e} 0 L ${.75*e} 0 L ${e} ${t} L 0 ${t} Z`},trapezoid2:{name:"梯形2",type:zn.POLYGON,style:"polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)",createPath:(e,t)=>`M 0 0 L ${e} 0 L ${.75*e} ${t} L ${.25*e} ${t} Z`}};var Qn=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return Kn.rect;const t=e.value.shape||zn.RECT;return Kn[t]})),l=(0,i.Fl)((()=>{if(!e.value)return{top:"0",left:"0",width:"100%",height:"100%"};const[t,l]=e.value.range,a=(l[0]-t[0])/100,n=(l[1]-t[1])/100,o=t[0]/a,i=t[1]/n;return{left:-o+"%",top:-i+"%",width:100/a+"%",height:100/n+"%"}}));return{clipShape:t,imgPosition:l}},eo=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return"";let t="";const l=Object.keys(e.value);for(const a of l)t+=`${a}(${e.value[a]}) `;return t}));return{filter:t}},to=e=>{const t=(0,i.Fl)((()=>e.value?.width??0)),l=(0,i.Fl)((()=>e.value?.style||"solid")),a=(0,i.Fl)((()=>e.value?.color||"#d14424")),n=(0,i.Fl)((()=>{if("dashed"!==l.value)return"0 0";const e=t.value;return e<=6?`${4.5*e} ${2*e}`:`${4*e} ${1.5*e}`}));return{outlineWidth:t,outlineStyle:l,outlineColor:a,strokeDashArray:n}};const lo=["width","height"],ao=["rx","ry","width","height","stroke","stroke-width","stroke-dasharray"];var no=(0,i.aZ)({__name:"ImageRectOutline",props:{width:{},height:{},outline:{},radius:{default:"0"}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=to((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-rect-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("rect",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",rx:e.radius,ry:e.radius,width:e.width,height:e.height,stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,ao)],8,lo)):(0,i.kq)("",!0)}});const oo=(0,Vl.Z)(no,[["__scopeId","data-v-35e36256"]]);var io=oo;const so=["width","height"],ro=["cx","cy","rx","ry","stroke","stroke-width","stroke-dasharray"];var uo=(0,i.aZ)({__name:"ImageEllipseOutline",props:{width:{},height:{},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=to((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-ellipse-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("ellipse",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",cx:e.width/2,cy:e.height/2,rx:e.width/2,ry:e.height/2,stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,ro)],8,so)):(0,i.kq)("",!0)}});const co=(0,Vl.Z)(uo,[["__scopeId","data-v-11836cf8"]]);var po=co;const vo=["width","height"],mo=["d","stroke","stroke-width","stroke-dasharray"];var ho=(0,i.aZ)({__name:"ImagePolygonOutline",props:{width:{},height:{},createPath:{type:Function},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=to((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-polygon-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:e.createPath(e.width,e.height),stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,mo)],8,vo)):(0,i.kq)("",!0)}});const fo=(0,Vl.Z)(ho,[["__scopeId","data-v-6e021ee2"]]);var go=fo;const yo={class:"image-outline"};var wo=(0,i.aZ)({__name:"index",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:a}=Qn(l);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",yo,["rect"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(io,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,radius:(0,s.SU)(a).radius,outline:e.elementInfo.outline},null,8,["width","height","radius","outline"])):"ellipse"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(po,{key:1,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"])):"polygon"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(go,{key:2,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline,createPath:(0,s.SU)(a).createPath},null,8,["width","height","outline","createPath"])):(0,i.kq)("",!0)]))}});const xo=wo;var ko=xo;const bo=e=>((0,i.dD)("data-v-5984406b"),e=e(),(0,i.Cn)(),e),_o=["src"],Io=["src"],So=["onMousedown"],Co=bo((()=>(0,i._)("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[(0,i._)("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 16 L 4 16 L 4 4 L 16 4 L 16 0 Z"})],-1))),Lo=[Co],To=["onMousedown"],Eo=bo((()=>(0,i._)("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[(0,i._)("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 4 L 16 4 Z"})],-1))),Mo=[Eo];var Uo=(0,i.aZ)({__name:"ImageClipHandler",props:{src:{},clipPath:{},width:{},height:{},top:{},left:{},rotate:{},clipData:{}},emits:["clip"],setup(e,{emit:t}){const l=e,a=t,{canvasScale:r}=(0,o.Jk)(R()),{ctrlOrShiftKeyActive:u}=(0,o.Jk)(q()),c=(0,s.iH)({top:"0",left:"0"}),d=(0,s.iH)(!1),p=(0,s.iH)(null),v=()=>{const[e,t]=l.clipData?l.clipData.range:[[0,0],[100,100]],a=(t[0]-e[0])/100,n=(t[1]-e[1])/100,o=e[0]/a,i=e[1]/n;return{widthScale:a,heightScale:n,left:o,top:i}},m=(0,i.Fl)((()=>{const{widthScale:e,heightScale:t,left:l,top:a}=v();return{left:-l,top:-a,width:100/e,height:100/t}})),h=(0,i.Fl)((()=>({top:m.value.top+"%",left:m.value.left+"%",width:m.value.width+"%",height:m.value.height+"%"}))),f=(0,s.iH)({top:0,left:0,width:0,height:0}),g=(0,i.Fl)((()=>{const{top:e,left:t,width:l,height:a}=f.value;return{top:e+"%",left:t+"%",width:l+"%",height:a+"%"}})),y=(0,i.Fl)((()=>{const e=m.value.width,t=m.value.height,{top:l,left:a,width:n,height:o}=f.value;return{left:100/n*-a+"%",top:100/o*-l+"%",width:e/n*100+"%",height:t/o*100+"%"}})),w=()=>{const{left:e,top:t}=v();f.value={left:e,top:t,width:100,height:100},c.value={top:-t+"%",left:-e+"%"}},x=()=>{if(d.value)return;if(!p.value)return void a("clip",null);const{left:e,top:t}=v(),n={left:(f.value.left-e)/100*l.width,top:(f.value.top-t)/100*l.height,width:(f.value.width-100)/100*l.width,height:(f.value.height-100)/100*l.height},o={range:p.value,position:n};a("clip",o)},k=e=>{const t=e.key.toUpperCase();t===ne.ENTER&&x()};(0,i.bv)((()=>{w(),document.addEventListener("keydown",k)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",k)}));const b=()=>{const e={left:parseInt(y.value.left),top:parseInt(y.value.top),width:parseInt(y.value.width),height:parseInt(y.value.height)},t=100/e.width,l=100/e.height,a=[-e.left*t,-e.top*l],n=[100*t+a[0],100*l+a[1]];p.value=[a,n]},_=e=>{d.value=!0;let t=!0;const a=e.pageX,n=e.pageY,o=m.value,i={...f.value};document.onmousemove=e=>{if(!t)return;const s=e.pageX,u=e.pageY;let c=(s-a)/r.value/l.width*100,d=(u-n)/r.value/l.height*100;l.rotate>45&&l.rotate<135&&(c=(u-n)/r.value/l.width*100,d=-(s-a)/r.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(c=-c,d=-d),l.rotate>-135&&l.rotate<-45&&(c=-(u-n)/r.value/l.width*100,d=(s-a)/r.value/l.height*100);let p=i.left+c,v=i.top+d;p<0?p=0:p+i.width>o.width&&(p=o.width-i.width),v<0?v=0:v+i.height>o.height&&(v=o.height-i.height),f.value={...f.value,left:p,top:v}},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null,b(),setTimeout((()=>{d.value=!1}),0)}},I=(e,t)=>{d.value=!0;let a=!0;const n=50/l.width*100,o=50/l.height*100,i=e.pageX,s=e.pageY,c=m.value,p={...f.value},v=f.value.width/f.value.height;document.onmousemove=e=>{if(!a)return;const d=e.pageX,m=e.pageY;let h,g,y,w,x=(d-i)/r.value/l.width*100,k=(m-s)/r.value/l.height*100;l.rotate>45&&l.rotate<135&&(x=(m-s)/r.value/l.width*100,k=-(d-i)/r.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(x=-x,k=-k),l.rotate>-135&&l.rotate<-45&&(x=-(m-s)/r.value/l.width*100,k=(d-i)/r.value/l.height*100),u.value&&(t!==le.RIGHT_BOTTOM&&t!==le.LEFT_TOP||(k=x/v),t!==le.LEFT_BOTTOM&&t!==le.RIGHT_TOP||(k=-x/v)),t===le.LEFT_TOP?(p.left+x<0&&(x=-p.left),p.top+k<0&&(k=-p.top),p.width-xc.width&&(x=c.width-(p.left+p.width)),p.top+k<0&&(k=-p.top),p.width+xc.height&&(k=c.height-(p.top+p.height)),p.width-xc.width&&(x=c.width-(p.left+p.width)),p.top+p.height+k>c.height&&(k=c.height-(p.top+p.height)),p.width+xc.height&&(k=c.height-(p.top+p.height)),p.height+kc.width&&(x=c.width-(p.left+p.width)),p.width+x{a=!1,document.onmousemove=null,document.onmouseup=null,b(),setTimeout((()=>d.value=!1),0)}},S=(0,i.Fl)((()=>{const e="rotate-",t=l.rotate;return t>-22.5&&t<=22.5?e+0:t>22.5&&t<=67.5?e+45:t>67.5&&t<=112.5?e+90:t>112.5&&t<=157.5?e+135:t>157.5||t<=-157.5?e+0:t>-157.5&&t<=-112.5?e+45:t>-112.5&&t<=-67.5?e+90:t>-67.5&&t<=-22.5?e+135:e+0})),C=[le.LEFT_TOP,le.RIGHT_TOP,le.LEFT_BOTTOM,le.RIGHT_BOTTOM],L=[le.TOP,le.BOTTOM,le.LEFT,le.RIGHT];return(e,t)=>{const l=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"image-clip-handler",style:(0,oe.j5)(c.value)},[(0,i._)("img",{class:"bottom-img",src:e.src,draggable:!1,alt:"",style:(0,oe.j5)(h.value)},null,12,_o),(0,i._)("div",{class:"top-image-content",style:(0,oe.j5)({...g.value,clipPath:e.clipPath})},[(0,i._)("img",{class:"top-img",src:e.src,draggable:!1,alt:"",style:(0,oe.j5)(y.value)},null,12,Io)],4),(0,i._)("div",{class:"operate",style:(0,oe.j5)(g.value),onMousedown:t[0]||(t[0]=(0,n.iM)((e=>_(e)),["stop"]))},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(C,(e=>(0,i._)("div",{class:(0,oe.C_)(["clip-point",e,S.value]),key:e,onMousedown:(0,n.iM)((t=>I(t,e)),["stop"])},Lo,42,So))),64)),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(L,(e=>(0,i._)("div",{class:(0,oe.C_)(["clip-point",e,S.value]),key:e,onMousedown:(0,n.iM)((t=>I(t,e)),["stop"])},Mo,42,To))),64))],36)],4)),[[l,x]])}}});const Wo=(0,Vl.Z)(Uo,[["__scopeId","data-v-5984406b"]]);var Do=Wo;const Ho=["src"];var Fo=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=R(),a=$(),{clipingImageElementId:r}=(0,o.Jk)(l),u=(0,i.Fl)((()=>r.value===t.elementInfo.id)),{addHistorySnapshot:c}=da(),d=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:p}=Xn(d),v=(0,i.Fl)((()=>t.elementInfo.flipH)),m=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:h}=Gn(v,m),f=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:g,imgPosition:y}=Qn(f),w=(0,i.Fl)((()=>t.elementInfo.filters)),{filter:x}=eo(w),k=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},b=e=>{if(l.setClipingImageElementId(""),!e)return;const{range:n,position:o}=e,i=t.elementInfo.clip||{shape:"rect",range:[[0,0],[100,100]]},s=t.elementInfo.left+o.left,r=t.elementInfo.top+o.top,u=t.elementInfo.width+o.width,d=t.elementInfo.height+o.height;let p=0,v=0;if(t.elementInfo.rotate){const e=s+u/2-(t.elementInfo.left+t.elementInfo.width/2),l=-(r+d/2-(t.elementInfo.top+t.elementInfo.height/2)),a=-t.elementInfo.rotate*Math.PI/180,n=e*Math.cos(a)-l*Math.sin(a),o=e*Math.sin(a)+l*Math.cos(a);p=n-e,v=-(o-l)}const m={clip:{...i,range:n},left:s+p,top:r+v,width:u,height:d};a.updateElement({id:t.elementInfo.id,props:m}),c()};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-image",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[u.value?((0,i.wg)(),(0,i.j4)(Do,{key:0,src:e.elementInfo.src,clipData:e.elementInfo.clip,width:e.elementInfo.width,height:e.elementInfo.height,top:e.elementInfo.top,left:e.elementInfo.left,rotate:e.elementInfo.rotate,clipPath:(0,s.SU)(g).style,onClip:t[0]||(t[0]=e=>b(e))},null,8,["src","clipData","width","height","top","left","rotate","clipPath"])):(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{key:1,class:"element-content",style:(0,oe.j5)({filter:(0,s.SU)(p)?`drop-shadow(${(0,s.SU)(p)})`:"",transform:(0,s.SU)(h)}),onMousedown:t[2]||(t[2]=e=>k(e)),onTouchstart:t[3]||(t[3]=e=>k(e))},[(0,i.Wm)(ko,{elementInfo:e.elementInfo},null,8,["elementInfo"]),(0,i._)("div",{class:"image-content",style:(0,oe.j5)({clipPath:(0,s.SU)(g).style})},[(0,i._)("img",{src:e.elementInfo.src,draggable:!1,style:(0,oe.j5)({top:(0,s.SU)(y).top,left:(0,s.SU)(y).left,width:(0,s.SU)(y).width,height:(0,s.SU)(y).height,filter:(0,s.SU)(x)}),onDragstart:t[1]||(t[1]=(0,n.iM)((()=>{}),["prevent"])),alt:""},null,44,Ho),e.elementInfo.colorMask?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"color-mask",style:(0,oe.j5)({backgroundColor:e.elementInfo.colorMask})},null,4)):(0,i.kq)("",!0)],4)],36)),[[l,e.contextmenus]])],4)],6)}}});const Ao=(0,Vl.Z)(Fo,[["__scopeId","data-v-1156b3e1"]]);var $o=Ao;const Zo=["width","height"],Oo=["d","stroke","stroke-width","stroke-dasharray"];var Ro=(0,i.aZ)({__name:"ElementOutline",props:{width:{},height:{},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=to((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"element-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:`M0,0 L${e.width},0 L${e.width},${e.height} L0,${e.height} Z`,stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,Oo)],8,Zo)):(0,i.kq)("",!0)}});const zo=(0,Vl.Z)(Ro,[["__scopeId","data-v-efb76626"]]);var Po=zo,Bo=l(2376),No=l(4348),jo=l(2806),Yo=l(728),Vo=l(8463),Jo=l(4251),qo=l(915),Xo=l(3833),Go=l(6912);const Ko=e=>{const t={},l=(e,l)=>t[e]=l;return l("Alt-ArrowUp",u.MI),l("Alt-ArrowDown",u.Ig),l("Mod-z",Vo.Yw),l("Mod-y",Vo.KX),l("Backspace",Go.dU),l("Escape",u.N0),l("Mod-b",(0,u.w9)(e.marks.strong)),l("Mod-i",(0,u.w9)(e.marks.em)),l("Mod-u",(0,u.w9)(e.marks.underline)),l("Mod-d",(0,u.w9)(e.marks.strikethrough)),l("Mod-e",(0,u.w9)(e.marks.code)),l("Mod-;",(0,u.w9)(e.marks.superscript)),l("Mod-'",(0,u.w9)(e.marks.subscript)),l("Enter",(0,u.QF)((0,Xo.s6)(e.nodes.list_item),u.QK,u.mD,u.X0,u.$j)),l("Mod-[",(0,Xo.IB)(e.nodes.list_item)),l("Mod-]",(0,Xo.bw)(e.nodes.list_item)),l("Tab",(0,Xo.bw)(e.nodes.list_item)),t},Qo=e=>(0,Go.S0)(/^\s*>\s$/,e),ei=e=>(0,Go.S0)(/^(\d+)\.\s$/,e,(e=>({order:+e[1]})),((e,t)=>t.childCount+t.attrs.order===+e[1])),ti=e=>(0,Go.S0)(/^\s*([-+*])\s$/,e),li=()=>{const e=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/;return new Go.VK(e,((e,t,l,a)=>{const{schema:n}=e,o=e.tr.insertText(`${t[2]} `,l,a),i=n.marks.code.create();return o.addMark(l,l+t[2].length,i)}))},ai=()=>{const e=/(?:https?:\/\/)?[\w-]+(?:\.[\w-]+)+\.?(?:\d+)?(?:\/\S*)?$/;return new Go.VK(e,((e,t,l,a)=>{const{schema:n}=e,o=e.tr.insertText(t[0],l,a),i=n.marks.link.create({href:t[0],title:t[0]});return o.addMark(l,l+t[0].length,i)}))},ni=e=>{const t=[...Go.yR,Go.LH,Go.pR];return t.push(Qo(e.nodes.blockquote)),t.push(ei(e.nodes.ordered_list)),t.push(ti(e.nodes.bullet_list)),t.push(li()),t.push(ai()),(0,Go.Hw)({rules:t})},oi=e=>"paragraph"===e.type.name&&2===e.nodeSize,ii=e=>new Bo.Sy({props:{decorations(t){const{$from:l}=t.selection;if(oi(l.parent)){const a=No.p.node(l.before(),l.after(),{"data-placeholder":e});return No.EH.create(t.doc,[a])}}}}),si=(e,t)=>{const l=t?.placeholder,a=[ni(e),(0,Yo.h)(Ko(e)),(0,Yo.h)(u.YR),(0,Jo.q)(),(0,qo.d)(),(0,Vo.m8)()];return l&&a.push(ii(l)),a};var ri=l(4073);const ui={attrs:{order:{default:1},listStyleType:{default:""},fontsize:{default:""},color:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:e=>{const t=(e.hasAttribute("start")?e.getAttribute("start"):1)||1,l={order:+t},{listStyleType:a,fontSize:n,color:o}=e.style;return a&&(l["listStyleType"]=a),n&&(l["fontsize"]=n),o&&(l["color"]=o),l}}],toDOM:e=>{const{order:t,listStyleType:l,fontsize:a,color:n}=e.attrs;let o="";l&&(o+=`list-style-type: ${l};`),a&&(o+=`font-size: ${a};`),n&&(o+=`color: ${n};`);const i={style:o};return 1!==t&&(i["start"]=t),["ol",i,0]}},ci={attrs:{listStyleType:{default:""},fontsize:{default:""},color:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ul",getAttrs:e=>{const t={},{listStyleType:l,fontSize:a,color:n}=e.style;return l&&(t["listStyleType"]=l),a&&(t["fontsize"]=a),n&&(t["color"]=n),t}}],toDOM:e=>{const{listStyleType:t,fontsize:l,color:a}=e.attrs;let n="";return t&&(n+=`list-style-type: ${t};`),l&&(n+=`font-size: ${l};`),a&&(n+=`color: ${a};`),["ul",{style:n},0]}},di={...Xo.qb,content:"paragraph block*",group:"block"},pi={attrs:{align:{default:""},indent:{default:0},textIndent:{default:0}},content:"inline*",group:"block",parseDOM:[{tag:"p",getAttrs:e=>{const{textAlign:t,textIndent:l}=e.style;let a=e.getAttribute("align")||t||"";a=/(left|right|center|justify)/.test(a)?a:"";let n=0;l&&(/em/.test(l)?n=parseInt(l):/px/.test(l)&&(n=Math.floor(parseInt(l)/20),n||(n=1)));const o=+(e.getAttribute("data-indent")||0);return{align:a,indent:o,textIndent:n}}},{tag:"img",ignore:!0},{tag:"pre",skip:!0}],toDOM:e=>{const{align:t,indent:l,textIndent:a}=e.attrs;let n="";t&&"left"!==t&&(n+=`text-align: ${t};`),a&&(n+=`text-indent: ${20*a}px;`);const o={style:n};return l&&(o["data-indent"]=l),["p",o,0]}},{doc:vi,blockquote:mi,text:hi}=ri.nodes;var fi={doc:vi,paragraph:pi,blockquote:mi,text:hi,ordered_list:ui,bullet_list:ci,list_item:di};const gi={excludes:"subscript",parseDOM:[{tag:"sub"},{style:"vertical-align",getAttrs:e=>"sub"===e&&null}],toDOM:()=>["sub",0]},yi={excludes:"superscript",parseDOM:[{tag:"sup"},{style:"vertical-align",getAttrs:e=>"super"===e&&null}],toDOM:()=>["sup",0]},wi={parseDOM:[{tag:"strike"},{style:"text-decoration",getAttrs:e=>"line-through"===e&&null},{style:"text-decoration-line",getAttrs:e=>"line-through"===e&&null}],toDOM:()=>["span",{style:"text-decoration-line: line-through;"},0]},xi={parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>"underline"===e&&null},{style:"text-decoration-line",getAttrs:e=>"underline"===e&&null}],toDOM:()=>["span",{style:"text-decoration: underline;"},0]},ki={attrs:{color:{}},inline:!0,group:"inline",parseDOM:[{style:"color",getAttrs:e=>e?{color:e}:{}}],toDOM:e=>{const{color:t}=e.attrs;let l="";return t&&(l+=`color: ${t};`),["span",{style:l},0]}},bi={attrs:{backcolor:{}},inline:!0,group:"inline",parseDOM:[{style:"background-color",getAttrs:e=>e?{backcolor:e}:{}}],toDOM:e=>{const{backcolor:t}=e.attrs;let l="";return t&&(l+=`background-color: ${t};`),["span",{style:l},0]}},_i={attrs:{fontsize:{}},inline:!0,group:"inline",parseDOM:[{style:"font-size",getAttrs:e=>e?{fontsize:e}:{}}],toDOM:e=>{const{fontsize:t}=e.attrs;let l="";return t&&(l+=`font-size: ${t};`),["span",{style:l},0]}},Ii={attrs:{fontname:{}},inline:!0,group:"inline",parseDOM:[{style:"font-family",getAttrs:e=>({fontname:e&&"string"===typeof e?e.replace(/[\"\']/g,""):""})}],toDOM:e=>{const{fontname:t}=e.attrs;let l="";return t&&(l+=`font-family: ${t};`),["span",{style:l},0]}},Si={attrs:{href:{},title:{default:null},target:{default:"_blank"}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href"),l=e.getAttribute("title");return{href:t,title:l}}}],toDOM:e=>["a",e.attrs,0]},Ci={attrs:{index:{default:null}},parseDOM:[{tag:"mark",getAttrs:e=>{const t=e.dataset.index;return{index:t}}}],toDOM:e=>["mark",{"data-index":e.attrs.index},0]},{em:Li,strong:Ti,code:Ei}=ri.marks;var Mi={em:Li,strong:Ti,fontsize:_i,fontname:Ii,code:Ei,forecolor:ki,backcolor:bi,subscript:gi,superscript:yi,strikethrough:wi,underline:xi,link:Si,mark:Ci};const Ui=fi,Wi=Mi,Di=new jo.V_({nodes:Ui,marks:Wi}),Hi=e=>{const t=`
${e}
`,l=new window.DOMParser,a=l.parseFromString(t,"text/html").body.firstElementChild;return jo.aw.fromSchema(Di).parse(a)},Fi=(e,t,l,a)=>new No.tk(e,{state:Bo.yy.create({doc:Hi(t),plugins:si(Di,a)}),...l});var Ai,$i=l(9391);(function(e){e["RICH_TEXT_COMMAND"]="RICH_TEXT_COMMAND",e["SYNC_RICH_TEXT_ATTRS_TO_STORE"]="SYNC_RICH_TEXT_ATTRS_TO_STORE",e["OPEN_CHART_DATA_EDITOR"]="OPEN_CHART_DATA_EDITOR",e["OPEN_LATEX_EDITOR"]="OPEN_LATEX_EDITOR"})(Ai||(Ai={}));const Zi=(0,$i.Z)();var Oi=Zi;const Ri=(e,t,l)=>{const{selection:a,doc:n}=e;if(!a||!n)return e;const{from:o,to:i}=a,{nodes:s}=t,r=s.blockquote,u=s.list_item,c=s.paragraph,d=[];l=l||"";const p=new Set([r,u,c]);return n.nodesBetween(o,i,((e,t)=>{const a=e.type,n=e.attrs.align||"";return n!==l&&p.has(a)&&d.push({node:e,pos:t,nodeType:a}),!0})),d.length?(d.forEach((t=>{const{node:a,pos:n,nodeType:o}=t;let{attrs:i}=a;i=l?{...i,align:l}:{...i,align:null},e=e.setNodeMarkup(n,o,i,a.marks)})),e):e},zi=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=Ri(l.tr.setSelection(n),a,t);e.dispatch(o)};function Pi(e,t,l,a){if(!e.doc)return e;const n=e.doc.nodeAt(t);if(!n)return e;const o=0,i=8;let s=(n.attrs[a]||0)+l;if(si&&(s=i),s===n.attrs[a])return e;const r={...n.attrs,[a]:s};return e.setNodeMarkup(t,n.type,r,n.marks)}const Bi=(e,t,l,a)=>{const{selection:n,doc:o}=e;if(!n||!o)return e;if(!(n instanceof Bo.Bs||n instanceof Bo.C1))return e;const{from:i,to:s}=n;return o.nodesBetween(i,s,((n,o)=>{const i=n.type;return"paragraph"===i.name||"blockquote"===i.name?(e=Pi(e,o,l,a),!1):!c(n,t)})),e},Ni=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=Bi(l.tr.setSelection(n),a,t,"indent");return!!o.docChanged&&(e.dispatch(o),!0)},ji=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=Bi(l.tr.setSelection(n),a,t,"textIndent");return!!o.docChanged&&(e.dispatch(o),!0)},Yi=(e,t,l,a={})=>(n,o)=>{const{schema:i,selection:s}=n,{$from:r,$to:u}=s,d=r.blockRange(u);if(!d)return!1;const p=f((e=>c(e,i)))(s);if(d.depth>=1&&p&&d.depth-p.depth<=1){if(p.node.type===e&&!l)return(0,Xo.IB)(t)(n,o);if(c(p.node,i)&&e.validContent(p.node.content)){const{tr:t}=n,i={...p.node.attrs,...a};return l&&(i.listStyleType=l),t.setNodeMarkup(p.pos,e,i),o&&o(t),!1}}const v={...a};return l&&(v.listStyleType=l),(0,Xo.KI)(e,v)(n,o)},Vi=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=l.tr.setSelection(n),{doc:i}=o;if(!i)return o;const{from:s,to:r}=n;i.nodesBetween(s,r,((e,l)=>{if(c(e,a)&&s-3<=l&&r+3>=l+e.nodeSize){const e=Array.isArray(t)?t:[t];for(const t of e)o.setNodeAttribute(l,t.key,t.value)}return!1})),e.dispatch(o)};var Ji=(0,i.aZ)({__name:"ProsemirrorEditor",props:{elementId:{},defaultColor:{},defaultFontName:{},value:{},editable:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1}},emits:["update","focus","blur","mousedown"],setup(e,{expose:t,emit:l}){const a=e,n=l,r=R(),{handleElementId:c,textFormatPainter:m,richTextAttrs:h}=(0,o.Jk)(r),f=(0,s.iH)();let g;const w=(0,D.debounce)((function(){n("update",g.dom.innerHTML)}),300,{trailing:!0}),x=()=>{r.setDisableHotkeysState(!0),n("focus")},k=()=>{r.setDisableHotkeysState(!1),n("blur")},b=(0,D.debounce)((function(){const e=C(g,{color:a.defaultColor,fontname:a.defaultFontName});r.setRichtextAttrs(e)}),30,{trailing:!0}),I=()=>{w(),b()},S=(0,i.Fl)((()=>a.value));(0,i.YP)(S,(()=>{if(!g)return;if(g.hasFocus())return;const{doc:e,tr:t}=g.state;g.dispatch(t.replaceRangeWith(0,e.content.size,Hi(S.value)))})),(0,i.YP)((()=>a.editable),(()=>{g.setProps({editable:()=>a.editable})}));const T=()=>g.focus();t({focus:T});const E=({target:e,action:t})=>{if(!e&&c.value!==a.elementId)return;if(e&&e!==a.elementId)return;const l="command"in t?[t]:t;for(const a of l)if("fontname"===a.command&&a.value){const e=g.state.schema.marks.fontname.create({fontname:a.value});d(g),p(g,e)}else if("fontsize"===a.command&&a.value){const e=g.state.schema.marks.fontsize.create({fontsize:a.value});d(g),p(g,e),Vi(g,{key:"fontsize",value:a.value})}else if("fontsize-add"===a.command){const e=a.value?+a.value:2;d(g);const t=L(g)+e+"px",l=g.state.schema.marks.fontsize.create({fontsize:t});p(g,l),Vi(g,{key:"fontsize",value:t})}else if("fontsize-reduce"===a.command){const e=a.value?+a.value:2;d(g);let t=L(g)-e;t<12&&(t=12);const l=g.state.schema.marks.fontsize.create({fontsize:t+"px"});p(g,l),Vi(g,{key:"fontsize",value:t+"px"})}else if("color"===a.command&&a.value){const e=g.state.schema.marks.forecolor.create({color:a.value});d(g),p(g,e),Vi(g,{key:"color",value:a.value})}else if("backcolor"===a.command&&a.value){const e=g.state.schema.marks.backcolor.create({backcolor:a.value});d(g),p(g,e)}else if("bold"===a.command)d(g),(0,u.w9)(g.state.schema.marks.strong)(g.state,g.dispatch);else if("em"===a.command)d(g),(0,u.w9)(g.state.schema.marks.em)(g.state,g.dispatch);else if("underline"===a.command)d(g),(0,u.w9)(g.state.schema.marks.underline)(g.state,g.dispatch);else if("strikethrough"===a.command)d(g),(0,u.w9)(g.state.schema.marks.strikethrough)(g.state,g.dispatch);else if("subscript"===a.command)(0,u.w9)(g.state.schema.marks.subscript)(g.state,g.dispatch);else if("superscript"===a.command)(0,u.w9)(g.state.schema.marks.superscript)(g.state,g.dispatch);else if("blockquote"===a.command){const e=y("blockquote",g.state);e?(0,u.xb)(g.state,g.dispatch):(0,u.ym)(g.state.schema.nodes.blockquote)(g.state,g.dispatch)}else if("code"===a.command)(0,u.w9)(g.state.schema.marks.code)(g.state,g.dispatch);else if("align"===a.command&&a.value)zi(g,a.value);else if("indent"===a.command&&a.value)Ni(g,+a.value);else if("textIndent"===a.command&&a.value)ji(g,+a.value);else if("bulletList"===a.command){const e=a.value||"",{bullet_list:t,list_item:l}=g.state.schema.nodes,n={color:h.value.color,fontsize:h.value.fontsize};Yi(t,l,e,n)(g.state,g.dispatch)}else if("orderedList"===a.command){const e=a.value||"",{ordered_list:t,list_item:l}=g.state.schema.nodes,n={color:h.value.color,fontsize:h.value.fontsize};Yi(t,l,e,n)(g.state,g.dispatch)}else if("clear"===a.command){d(g);const{$from:e,$to:t}=g.state.selection;g.dispatch(g.state.tr.removeMark(e.pos,t.pos)),Vi(g,[{key:"fontsize",value:""},{key:"color",value:""}])}else if("link"===a.command){const e=g.state.schema.marks.link,{from:t,to:l}=g.state.selection,n=v(g.state.doc,t,l,e);if(n)if(a.value){const e=g.state.schema.marks.link.create({href:a.value,title:a.value});p(g,e,{from:n.from.pos,to:n.to.pos+1})}else g.dispatch(g.state.tr.removeMark(n.from.pos,n.to.pos+1,e));else if(_(g.state,e))if(a.value){const e=g.state.schema.marks.link.create({href:a.value,title:a.value});p(g,e)}else(0,u.w9)(e)(g.state,g.dispatch);else a.value&&(d(g),(0,u.w9)(e,{href:a.value,title:a.value})(g.state,g.dispatch))}else"insert"===a.command&&a.value&&g.dispatch(g.state.tr.insertText(a.value));g.focus(),w(),b()},M=()=>{if(!m.value)return;const{keep:e,...t}=m.value,l=[{command:"clear"}];for(const a of Object.keys(t)){const e=a,t=m.value[a];!0===t?l.push({command:e}):t&&l.push({command:e,value:t})}E({action:l}),e||r.setTextFormatPainter(null)};(0,i.bv)((()=>{g=Fi(f.value,S.value,{handleDOMEvents:{focus:x,blur:k,keydown:I,click:b,mouseup:M},editable:()=>a.editable}),a.autoFocus&&g.focus()})),(0,i.Ah)((()=>{g&&g.destroy()}));const U=()=>{c.value===a.elementId&&b()};return Oi.on(Ai.RICH_TEXT_COMMAND,E),Oi.on(Ai.SYNC_RICH_TEXT_ATTRS_TO_STORE,U),(0,i.Ah)((()=>{Oi.off(Ai.RICH_TEXT_COMMAND,E),Oi.off(Ai.SYNC_RICH_TEXT_ATTRS_TO_STORE,U)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["prosemirror-editor",{"format-painter":(0,s.SU)(m)}]),ref_key:"editorViewRef",ref:f,onMousedown:t[0]||(t[0]=e=>n("mousedown",e))},null,34))}});const qi=(0,Vl.Z)(Ji,[["__scopeId","data-v-653f533c"]]);var Xi=qi;const Gi=e=>((0,i.dD)("data-v-2a1e49ba"),e=e(),(0,i.Cn)(),e),Ki=Gi((()=>(0,i._)("div",{class:"drag-handler top"},null,-1))),Qi=Gi((()=>(0,i._)("div",{class:"drag-handler bottom"},null,-1)));var es=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=R(),a=$(),{handleElementId:n,isScaling:r}=(0,o.Jk)(l),{addHistorySnapshot:u}=da(),c=(0,s.iH)(),d=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:p}=Xn(d),v=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},m=(0,s.iH)(-1),h=(0,s.iH)(-1);(0,i.YP)(r,(()=>{n.value===t.elementInfo.id&&(r.value||(t.elementInfo.vertical||-1===m.value||(a.updateElement({id:t.elementInfo.id,props:{height:m.value}}),m.value=-1),t.elementInfo.vertical&&-1!==h.value&&(a.updateElement({id:t.elementInfo.id,props:{width:h.value}}),h.value=-1)))}));const f=e=>{const l=e[0].contentRect;if(!c.value)return;const n=l.height+20,o=l.width+20;t.elementInfo.vertical||t.elementInfo.height===n||(r.value?m.value=n:a.updateElement({id:t.elementInfo.id,props:{height:n}})),t.elementInfo.vertical&&t.elementInfo.width!==o&&(r.value?h.value=o:a.updateElement({id:t.elementInfo.id,props:{width:o}}))},g=new ResizeObserver(f);(0,i.bv)((()=>{c.value&&g.observe(c.value)})),(0,i.Ah)((()=>{c.value&&g.unobserve(c.value)}));const y=e=>{a.updateElement({id:t.elementInfo.id,props:{content:e}}),u()},w=(0,D.debounce)((function(){const e=t.elementInfo.content.replaceAll(/<[^>]+>/g,"");e||a.deleteElement(t.elementInfo.id)}),300,{trailing:!0}),x=(0,i.Fl)((()=>n.value===t.elementInfo.id));return(0,i.YP)(x,(()=>{x.value||w()})),(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-text",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",ref_key:"elementRef",ref:c,style:(0,oe.j5)({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:(0,s.SU)(p),lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px",color:e.elementInfo.defaultColor,fontFamily:e.elementInfo.defaultFontName,writingMode:e.elementInfo.vertical?"vertical-rl":"horizontal-tb"}),onMousedown:t[2]||(t[2]=e=>v(e)),onTouchstart:t[3]||(t[3]=e=>v(e))},[(0,i.Wm)(Po,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Xi,{class:"text",elementId:e.elementInfo.id,defaultColor:e.elementInfo.defaultColor,defaultFontName:e.elementInfo.defaultFontName,editable:!e.elementInfo.lock,value:e.elementInfo.content,style:(0,oe.j5)({"--paragraphSpace":`${void 0===e.elementInfo.paragraphSpace?5:e.elementInfo.paragraphSpace}px`}),onUpdate:t[0]||(t[0]=e=>y(e)),onMousedown:t[1]||(t[1]=e=>v(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value","style"]),Ki,Qi],36)),[[l,e.contextmenus]])],4)],6)}}});const ts=(0,Vl.Z)(es,[["__scopeId","data-v-2a1e49ba"]]);var ls=ts;const as=["id","gradientTransform"],ns=["stop-color"],os=["stop-color"],is=["id"],ss=["stop-color"],rs=["stop-color"];var us=(0,i.aZ)({__name:"GradientDefs",props:{id:{},type:{},color1:{},color2:{},rotate:{default:0}},setup(e){return(e,t)=>"linear"===e.type?((0,i.wg)(),(0,i.iD)("linearGradient",{key:0,id:e.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:`rotate(${e.rotate},0.5,0.5)`},[(0,i._)("stop",{offset:"0%","stop-color":e.color1},null,8,ns),(0,i._)("stop",{offset:"100%","stop-color":e.color2},null,8,os)],8,as)):((0,i.wg)(),(0,i.iD)("radialGradient",{key:1,id:e.id},[(0,i._)("stop",{offset:"0%","stop-color":e.color1},null,8,ss),(0,i._)("stop",{offset:"100%","stop-color":e.color2},null,8,rs)],8,is))}});const cs=us;var ds=cs;const ps=["width","height"],vs={key:0},ms=["transform"],hs=["d","fill","stroke","stroke-width","stroke-dasharray"];var fs=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=R(),a=$(),{handleElementId:n,shapeFormatPainter:r}=(0,o.Jk)(l),{addHistorySnapshot:u}=da(),c=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},d=()=>{if(!r.value)return;const{keep:e,...n}=r.value;a.updateElement({id:t.elementInfo.id,props:n}),u(),e||l.setShapeFormatPainter(null)},p=(0,i.Fl)((()=>t.elementInfo.outline)),{outlineWidth:v,outlineColor:m,strokeDashArray:h}=to(p),f=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:g}=Xn(f),y=(0,i.Fl)((()=>t.elementInfo.flipH)),w=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:x}=Gn(y,w),k=(0,s.iH)(!1);(0,i.YP)(n,(()=>{n.value!==t.elementInfo.id&&k.value&&(k.value=!1)}));const b=(0,i.Fl)((()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e})),_=e=>{const l={...b.value,content:e};a.updateElement({id:t.elementInfo.id,props:{text:l}}),u()},I=()=>{if(!t.elementInfo.text)return;const e=t.elementInfo.text.content.replaceAll(/<[^>]+>/g,"");e||(a.removeElementProps({id:t.elementInfo.id,propName:"text"}),u())},S=(0,s.iH)(),C=()=>{k.value=!0,(0,i.Y3)((()=>S.value&&S.value.focus()))};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-shape",{lock:e.elementInfo.lock,"format-painter":(0,s.SU)(r)}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",style:(0,oe.j5)({opacity:e.elementInfo.opacity,filter:(0,s.SU)(g)?`drop-shadow(${(0,s.SU)(g)})`:"",transform:(0,s.SU)(x),color:b.value.defaultColor,fontFamily:b.value.defaultFontName}),onMousedown:t[3]||(t[3]=e=>c(e)),onMouseup:t[4]||(t[4]=e=>d()),onTouchstart:t[5]||(t[5]=e=>c(e)),onDblclick:t[6]||(t[6]=e=>C())},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?((0,i.wg)(),(0,i.iD)("defs",vs,[(0,i.Wm)(ds,{id:`editabel-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,color1:e.elementInfo.gradient.color[0],color2:e.elementInfo.gradient.color[1],rotate:e.elementInfo.gradient.rotate},null,8,["id","type","color1","color2","rotate"])])):(0,i.kq)("",!0),(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{class:"shape-path","vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:e.elementInfo.gradient?`url(#editabel-gradient-${e.elementInfo.id})`:e.elementInfo.fill,stroke:(0,s.SU)(m),"stroke-width":(0,s.SU)(v),"stroke-dasharray":(0,s.SU)(h)},null,8,hs)],8,ms)],8,ps)),(0,i._)("div",{class:(0,oe.C_)(["shape-text",[b.value.align,{editable:k.value||b.value.content}]])},[k.value||b.value.content?((0,i.wg)(),(0,i.j4)(Xi,{key:0,ref_key:"prosemirrorEditorRef",ref:S,elementId:e.elementInfo.id,defaultColor:b.value.defaultColor,defaultFontName:b.value.defaultFontName,editable:!e.elementInfo.lock,value:b.value.content,onUpdate:t[0]||(t[0]=e=>_(e)),onBlur:t[1]||(t[1]=e=>I()),onMousedown:t[2]||(t[2]=e=>c(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value"])):(0,i.kq)("",!0)],2)],36)),[[l,e.contextmenus]])],4)],6)}}});const gs=(0,Vl.Z)(fs,[["__scopeId","data-v-5d988de2"]]);var ys=gs;const ws=["id","markerWidth","markerHeight","refX","refY"],xs=["d","fill","transform"];var ks=(0,i.aZ)({__name:"LinePointMarker",props:{id:{},position:{},type:{},baseSize:{},color:{}},setup(e){const t=e,l={dot:"m0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z",arrow:"M0,0 L10,5 0,10 Z"},a={"arrow-start":180,"arrow-end":0},n=(0,i.Fl)((()=>l[t.type])),o=(0,i.Fl)((()=>a[`${t.type}-${t.position}`]||0)),s=(0,i.Fl)((()=>t.baseSize<2?2:t.baseSize));return(e,t)=>((0,i.wg)(),(0,i.iD)("marker",{id:`${e.id}-${e.type}-${e.position}`,markerUnits:"userSpaceOnUse",orient:"auto",markerWidth:3*s.value,markerHeight:3*s.value,refX:1.5*s.value,refY:1.5*s.value},[(0,i._)("path",{d:n.value,fill:e.color,transform:`scale(${.3*s.value}, ${.3*s.value}) rotate(${o.value}, 5, 5)`},null,8,xs)],8,ws))}});const bs=ks;var _s=bs;const Is=["width","height"],Ss=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],Cs=["d"];var Ls=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:n}=Xn(a),o=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e})),r=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e})),u=(0,i.Fl)((()=>{if("dashed"!==t.elementInfo.style)return"0 0";const e=t.elementInfo.width;return e<=8?`${5*e} ${2.5*e}`:`${5*e} ${1.5*e}`})),c=(0,i.Fl)((()=>Ce(t.elementInfo)));return(e,t)=>{const a=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-shape",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({filter:(0,s.SU)(n)?`drop-shadow(${(0,s.SU)(n)})`:""}),onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e))},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:o.value,height:r.value},[(0,i._)("defs",null,[e.elementInfo.points[0]?((0,i.wg)(),(0,i.j4)(_s,{key:0,id:e.elementInfo.id,position:"start",type:e.elementInfo.points[0],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0),e.elementInfo.points[1]?((0,i.wg)(),(0,i.j4)(_s,{key:1,id:e.elementInfo.id,position:"end",type:e.elementInfo.points[1],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0)]),(0,i._)("path",{class:"line-point",d:c.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":u.value,fill:"none","marker-start":e.elementInfo.points[0]?`url(#${e.elementInfo.id}-${e.elementInfo.points[0]}-start)`:"","marker-end":e.elementInfo.points[1]?`url(#${e.elementInfo.id}-${e.elementInfo.points[1]}-end)`:""},null,8,Ss),(0,i.wy)((0,i._)("path",{class:"line-path",d:c.value,stroke:"transparent","stroke-width":"20",fill:"none"},null,8,Cs),[[a,e.contextmenus]])],8,Is))],36)],6)}}});const Ts=(0,Vl.Z)(Ls,[["__scopeId","data-v-16512454"]]);var Es=Ts,Ms=l(7678),Us=(l(4991),(0,i.aZ)({__name:"Chart",props:{width:{},height:{},type:{},data:{},themeColor:{},legends:{},options:{},gridColor:{},legend:{}},setup(e){const t=e,l=(0,s.iH)(),a=(0,i.f3)(Tn)||(0,s.iH)(1);let n;const o=(0,i.Fl)((()=>t.legend?t.height-20:t.height)),r=()=>({...t.data,series:t.data.series[0]}),u=()=>{const e=t.options||{};return{...e,width:t.width*a.value,height:o.value*a.value}},c=()=>{if(!l.value)return;const e=u();"bar"===t.type&&(n=new Ms.vz(l.value,t.data,e)),"line"===t.type&&(n=new Ms.wW(l.value,t.data,e)),"pie"===t.type&&(n=new Ms.uc(l.value,r(),e))},d=()=>{if(!n)return void c();const e=u(),l="pie"===t.type?r():t.data;n.update(l,e)};(0,i.YP)([()=>t.width,()=>t.height,()=>t.data,()=>t.options,a],d),(0,i.bv)(c);const p=(0,i.Fl)((()=>{let e=[];if(t.themeColor.length>=10)e=t.themeColor;else if(1===t.themeColor.length)e=(0,W.Z)(t.themeColor[0]).analogous(10).map((e=>e.toRgbString()));else{const l=t.themeColor.length,a=(0,W.Z)(t.themeColor[l-1]).analogous(11-l).map((e=>e.toRgbString()));e=[...t.themeColor.slice(0,l-1),...a]}return e})),v=()=>{if(l.value)for(let e=0;e<10;e++)l.value.style.setProperty(`--theme-color-${e+1}`,p.value[e])};(0,i.YP)(p,v),(0,i.bv)(v);const m=()=>{l.value&&t.gridColor&&l.value.style.setProperty("--grid-color",t.gridColor)};return(0,i.YP)((()=>t.gridColor),m),(0,i.bv)(m),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"chart",style:(0,oe.j5)({flexDirection:"top"===e.legend?"column-reverse":"column"})},[(0,i._)("div",{class:"chart-content",ref_key:"chartRef",ref:l,style:(0,oe.j5)({width:e.width+"px",height:o.value+"px",transform:`scale(${1/(0,s.SU)(a)})`})},null,4),e.legend?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"legends",style:(0,oe.j5)({transform:`scale(${1/(0,s.SU)(a)})`})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.legends,((t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"legend",key:l,style:(0,oe.j5)({color:e.gridColor})},[(0,i._)("div",{class:"block",style:(0,oe.j5)({backgroundColor:p.value[l]})},null,4),(0,i.Uk)(" "+(0,oe.zw)(t),1)],4)))),128))],4)):(0,i.kq)("",!0)],4))}}));const Ws=(0,Vl.Z)(Us,[["__scopeId","data-v-ae2a96a6"]]);var Ds=Ws,Hs=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=()=>{Oi.emit(Ai.OPEN_CHART_DATA_EDITOR)};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-chart",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",style:(0,oe.j5)({backgroundColor:e.elementInfo.fill}),onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e)),onDblclick:t[2]||(t[2]=e=>a())},[(0,i.Wm)(Po,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Ds,{width:e.elementInfo.width,height:e.elementInfo.height,type:e.elementInfo.chartType,data:e.elementInfo.data,options:e.elementInfo.options,themeColor:e.elementInfo.themeColor,gridColor:e.elementInfo.gridColor,legends:e.elementInfo.data.legends,legend:e.elementInfo.legend||""},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend"])],36)),[[n,e.contextmenus]])],4)],6)}}});const Fs=(0,Vl.Z)(Hs,[["__scopeId","data-v-6fc3de39"]]);var As=Fs;const $s=e=>{if(!e)return{};const{bold:t,em:l,underline:a,strikethrough:n,color:o,backcolor:i,fontsize:s,fontname:r,align:u}=e;let c=`${a?"underline":""} ${n?"line-through":""}`;return" "===c&&(c="none"),{fontWeight:t?"bold":"normal",fontStyle:l?"italic":"normal",textDecoration:c,color:o||"#000",backgroundColor:i||"",fontSize:s||"14px",fontFamily:r||"微软雅黑",textAlign:u||"left"}},Zs=e=>e.replace(/\n/g,"
").replace(/ /g," ");var Os=e=>{const t=(0,i.Fl)((()=>{const t=[];for(let l=0;l1||n.rowspan>1)for(let a=l;a{const t=(0,s.iH)(["",""]);return(0,i.YP)((()=>e.value),(()=>{e.value&&(t.value=Se(e.value.color))}),{immediate:!0}),{subThemeColor:t}};const zs=["innerHTML"];var Ps=(0,i.aZ)({__name:"CustomTextarea",props:{value:{default:""}},emits:["updateValue","insertExcelData"],setup(e,{emit:t}){const l=e,a=t,n=(0,s.iH)(),o=(0,s.iH)(""),r=(0,s.iH)(!1);(0,i.YP)((()=>l.value),(()=>{r.value||(o.value=l.value,n.value&&(n.value.innerHTML=l.value))}),{immediate:!0});const u=()=>{if(!n.value)return;const e=n.value.innerHTML;a("updateValue",e)},c=()=>{r.value=!0,n.value&&(n.value.onpaste=e=>{if(e.preventDefault(),!e.clipboardData)return;const t=e.clipboardData.items[0];t&&"string"===t.kind&&"text/plain"===t.type&&t.getAsString((e=>{const t=fe(e);if("object"===typeof t)return;const l=ge(e);if(l)return a("insertExcelData",l),void(n.value&&(n.value.innerHTML=l[0][0]));document.execCommand("insertText",!1,e)}))})},d=()=>{r.value=!1,n.value&&(n.value.onpaste=null)};return(0,i.Jd)((()=>{n.value&&(n.value.onpaste=null)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"custom-textarea",ref_key:"textareaRef",ref:n,contenteditable:!0,onFocus:t[0]||(t[0]=e=>c()),onBlur:t[1]||(t[1]=e=>d()),onInput:t[2]||(t[2]=e=>u()),innerHTML:o.value},null,40,zs))}});const Bs=(0,Vl.Z)(Ps,[["__scopeId","data-v-7a7222ac"]]);var Ns=Bs;const js={key:0,class:"handler"},Ys=["onMousedown"],Vs=["width"],Js=["rowspan","colspan","data-cell-index","onMousedown","onMouseenter"],qs=["innerHTML"];var Xs=(0,i.aZ)({__name:"EditableTable",props:{data:{},width:{},cellMinHeight:{},colWidths:{},outline:{},theme:{},editable:{type:Boolean,default:!0}},emits:["change","changeColWidths","changeSelectedCells"],setup(e,{emit:t}){const l=e,a=t,{canvasScale:u}=(0,o.Jk)(R()),c=(0,s.iH)(!1),d=(0,s.iH)([]),p=(0,s.iH)([]),v=(0,i.Fl)({get(){return l.data},set(e){a("change",e)}}),m=(0,i.Fl)((()=>l.theme)),{subThemeColor:h}=Rs(m),f=(0,s.iH)([]),g=(0,i.Fl)((()=>f.value.reduce(((e,t)=>e+t))));(0,i.YP)([()=>l.colWidths,()=>l.width],(()=>{f.value=l.colWidths.map((e=>e*l.width))}),{immediate:!0});const y=()=>{d.value=[],p.value=[]};(0,i.YP)((()=>l.editable),(()=>{l.editable||y()}));const w=(0,i.Fl)((()=>{const e=[];for(let t=1;te+t));e.push(l)}return e})),x=(0,i.Fl)((()=>l.data)),{hideCells:k}=Os(x),b=(0,i.Fl)((()=>{if(!d.value.length)return[];const[e,t]=d.value;if(!p.value.length)return[`${e}_${t}`];const[l,a]=p.value;if(e===l&&t===a)return[`${e}_${t}`];const n=[],o=Math.min(e,l),i=Math.min(t,a),s=Math.max(e,l),r=Math.max(t,a);for(let u=0;u=o&&u<=s&&t>=i&&t<=r&&n.push(`${u}_${t}`)}return n}));(0,i.YP)(b,((e,t)=>{(0,D.isEqual)(e,t)||a("changeSelectedCells",b.value)}));const _=(0,i.Fl)((()=>b.value.length>1?null:b.value[0])),I=()=>c.value=!1,S=(e,t,l)=>{0===e.button&&(p.value=[],c.value=!0,d.value=[t,l])},C=(e,t)=>{c.value&&(p.value=[e,t])};(0,i.bv)((()=>{document.addEventListener("mouseup",I)})),(0,i.Ah)((()=>{document.removeEventListener("mouseup",I)}));const L=(e,t)=>k.value.includes(`${e}_${t}`),T=e=>{const t=v.value.length-1;d.value=[0,e],p.value=[t,e]},E=e=>{const t=v.value[e].length-1;d.value=[e,0],p.value=[e,t]},M=()=>{const e=v.value.length-1,t=v.value[e].length-1;d.value=[0,0],p.value=[e,t]},U=e=>{const t=JSON.parse(JSON.stringify(v.value)),l=v.value[e],a=[];for(let n=0;n=0;l--)if(!L(l,n)){t[l][n].rowspan=t[l][n].rowspan-1;break}t.splice(e,1),v.value=t},W=e=>{const t=JSON.parse(JSON.stringify(v.value)),l=[];for(let a=0;a=0;l--)if(!L(a,l)){t[a][l].colspan=t[a][l].colspan-1;break}v.value=t.map((t=>(t.splice(e,1),t))),f.value.splice(e,1),a("changeColWidths",f.value)},H=e=>{const t=JSON.parse(JSON.stringify(v.value)),l=[];for(let a=0;a{v.value=v.value.map((t=>{const l={colspan:1,rowspan:1,text:"",id:(0,r.x0)(10)};return t.splice(e,0,l),t})),f.value.splice(e,0,100),a("changeColWidths",f.value)},A=(e,t)=>{let l=JSON.parse(JSON.stringify(v.value));const n={colspan:1,rowspan:1,text:""};if(e){const t=[];for(let a=0;a{const l=[];for(let a=0;a{const[e,t]=d.value,[l,a]=p.value,n=Math.min(e,l),o=Math.min(t,a),i=Math.max(e,l),s=Math.max(t,a),r=JSON.parse(JSON.stringify(v.value));r[n][o].rowspan=i-n+1,r[n][o].colspan=s-o+1,v.value=r,y()},Z=(e,t)=>{const l=JSON.parse(JSON.stringify(v.value));l[e][t].rowspan=1,l[e][t].colspan=1,v.value=l,y()},O=(e,t)=>{y();let l=!0;const n=f.value[t],o=e.pageX,i=50;document.onmousemove=e=>{if(!l)return;const a=(e.pageX-o)/u.value,s=n+a{l=!1,document.onmousemove=null,document.onmouseup=null,a("changeColWidths",f.value)}},z=()=>{const e=JSON.parse(JSON.stringify(v.value));for(let t=0;t{const e=(t,l)=>v.value[t]?v.value[t][l]?L(t,l)?e(t,l+1):[t,l]:e(t+1,0):null;p.value=[];const t=d.value[0],l=d.value[1]+1,a=e(t,l);a?d.value=a:(H(t+1),d.value=[t+1,0]),(0,i.Y3)((()=>{const e=document.querySelector(".cell-text.active");e&&e.focus()}))},B=e=>{if(!l.editable||!b.value.length)return;const t=e.key.toUpperCase();if(b.value.length<2){if(t===ne.TAB&&(e.preventDefault(),P()),e.ctrlKey&&t===ne.UP){e.preventDefault();const t=+b.value[0].split("_")[0];H(t)}if(e.ctrlKey&&t===ne.DOWN){e.preventDefault();const t=+b.value[0].split("_")[0];H(t+1)}if(e.ctrlKey&&t===ne.LEFT){e.preventDefault();const t=+b.value[0].split("_")[1];F(t)}if(e.ctrlKey&&t===ne.RIGHT){e.preventDefault();const t=+b.value[0].split("_")[1];F(t+1)}}else t===ne.DELETE&&z()};(0,i.bv)((()=>{document.addEventListener("keydown",B)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",B)}));const N=(0,D.debounce)((function(e,t,l){v.value[t][l].text=e,a("change",v.value)}),300,{trailing:!0}),j=(e,t,l)=>{const n=e.length,o=e[0].length;let s=0,r=0;t+n>v.value.length&&(s=t+n-v.value.length),l+o>v.value[0].length&&(r=l+o-v.value[0].length),(s||r)&&A(s,r),(0,i.Y3)((()=>{for(let a=0;a{const e=[];for(let t=0;t{const e=Y(),t=e.length>1,l=e[0].length>1;return{canDeleteRow:t,canDeleteCol:l}},J=(e,t)=>{const l=b.value.length>1,a=v.value[e][t],n=l,o=!l&&(a.rowspan>1||a.colspan>1);return{canMerge:n,canSplit:o}},q=e=>{const t=e.dataset.cellIndex,l=+t.split("_")[0],a=+t.split("_")[1];b.value.includes(`${l}_${a}`)||(d.value=[l,a],p.value=[]);const{canMerge:n,canSplit:o}=J(l,a),{canDeleteRow:i,canDeleteCol:s}=V();return[{text:"插入列",children:[{text:"到左侧",handler:()=>F(a)},{text:"到右侧",handler:()=>F(a+1)}]},{text:"插入行",children:[{text:"到上方",handler:()=>H(l)},{text:"到下方",handler:()=>H(l+1)}]},{text:"删除列",disable:!s,handler:()=>W(a)},{text:"删除行",disable:!i,handler:()=>U(l)},{divider:!0},{text:"合并单元格",disable:!n,handler:$},{text:"取消合并单元格",disable:!o,handler:()=>Z(l,a)},{divider:!0},{text:"选中当前列",handler:()=>T(a)},{text:"选中当前行",handler:()=>E(l)},{text:"选中全部单元格",handler:M}]};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:"editable-table",style:(0,oe.j5)({width:g.value+"px"})},[e.editable?((0,i.wg)(),(0,i.iD)("div",js,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(w.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"drag-line",key:t,style:(0,oe.j5)({left:e+"px"}),onMousedown:e=>O(e,t)},null,44,Ys)))),128))])):(0,i.kq)("",!0),(0,i._)("table",{class:(0,oe.C_)({theme:m.value,"row-header":m.value?.rowHeader,"row-footer":m.value?.rowFooter,"col-header":m.value?.colHeader,"col-footer":m.value?.colFooter}),style:(0,oe.j5)(`--themeColor: ${m.value?.color}; --subThemeColor1: ${(0,s.SU)(h)[0]}; --subThemeColor2: ${(0,s.SU)(h)[1]}`)},[(0,i._)("colgroup",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(f.value,((e,t)=>((0,i.wg)(),(0,i.iD)("col",{span:"1",key:t,width:e},null,8,Vs)))),128))]),(0,i._)("tbody",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(v.value,((t,a)=>((0,i.wg)(),(0,i.iD)("tr",{key:a,style:(0,oe.j5)({height:e.cellMinHeight+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((t,o)=>(0,i.wy)(((0,i.wg)(),(0,i.iD)("td",{class:(0,oe.C_)(["cell",{selected:b.value.includes(`${a}_${o}`)&&b.value.length>1,active:_.value===`${a}_${o}`}]),style:(0,oe.j5)({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...(0,s.SU)($s)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan,"data-cell-index":`${a}_${o}`,onMousedown:e=>S(e,a,o),onMouseenter:e=>C(a,o)},[_.value===`${a}_${o}`?((0,i.wg)(),(0,i.j4)(Ns,{key:0,class:(0,oe.C_)(["cell-text",{active:_.value===`${a}_${o}`}]),style:(0,oe.j5)({minHeight:e.cellMinHeight-4+"px"}),value:t.text,onUpdateValue:e=>(0,s.SU)(N)(e,a,o),onInsertExcelData:e=>j(e,a,o)},null,8,["class","style","value","onUpdateValue","onInsertExcelData"])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"cell-text",style:(0,oe.j5)({minHeight:e.cellMinHeight-4+"px"}),innerHTML:(0,s.SU)(Zs)(t.text)},null,12,qs))],46,Js)),[[n.F8,!(0,s.SU)(k).includes(`${a}_${o}`)],[l,e=>q(e)]]))),128))],4)))),128))])],6)],4)}}});const Gs=(0,Vl.Z)(Xs,[["__scopeId","data-v-0236a619"]]);var Ks=Gs;const Qs={class:"element-content"};var er=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=R(),a=$(),{canvasScale:r,handleElementId:u,isScaling:c}=(0,o.Jk)(l),d=(0,s.iH)(),{addHistorySnapshot:p}=da(),v=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},m=(0,s.iH)(!1);(0,i.YP)(u,(()=>{u.value!==t.elementInfo.id&&(m.value=!1)})),(0,i.YP)(m,(()=>{l.setDisableHotkeysState(m.value)}));const h=()=>{t.elementInfo.lock||(m.value=!0)},f=(0,s.iH)(-1);(0,i.YP)(c,(()=>{u.value===t.elementInfo.id&&(c.value&&(m.value=!1),c.value||-1===f.value||(a.updateElement({id:t.elementInfo.id,props:{height:f.value}}),f.value=-1))}));const g=e=>{const l=e[0].contentRect;if(!d.value)return;const n=l.height;t.elementInfo.height!==n&&(c.value?f.value=n:a.updateElement({id:t.elementInfo.id,props:{height:n}}))},y=new ResizeObserver(g);(0,i.bv)((()=>{d.value&&y.observe(d.value)})),(0,i.Ah)((()=>{d.value&&y.unobserve(d.value)}));const w=e=>{a.updateElement({id:t.elementInfo.id,props:{data:e}}),p()},x=e=>{const l=e.reduce(((e,t)=>e+t)),n=e.map((e=>e/l));a.updateElement({id:t.elementInfo.id,props:{width:l,colWidths:n}}),p()},k=e=>{(0,i.Y3)((()=>l.setSelectedTableCells(e)))};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-table",{lock:e.elementInfo.lock}]),ref_key:"elementRef",ref:d,style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",Qs,[(0,i.Wm)(Ks,{onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"])),data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme,editable:m.value,onChange:t[1]||(t[1]=e=>w(e)),onChangeColWidths:t[2]||(t[2]=e=>x(e)),onChangeSelectedCells:t[3]||(t[3]=e=>k(e))},null,8,["data","width","cellMinHeight","colWidths","outline","theme","editable"]),!m.value||e.elementInfo.lock?((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,oe.C_)(["table-mask",{lock:e.elementInfo.lock}]),onDblclick:t[4]||(t[4]=e=>h()),onMousedown:t[5]||(t[5]=e=>v(e)),onTouchstart:t[6]||(t[6]=e=>v(e))},[(0,s.SU)(u)===e.elementInfo.id?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"mask-tip",style:(0,oe.j5)({transform:`scale(${1/(0,s.SU)(r)})`})},"双击编辑",4)):(0,i.kq)("",!0)],34)):(0,i.kq)("",!0)])),[[l,e.contextmenus]])],4)],6)}}});const tr=(0,Vl.Z)(er,[["__scopeId","data-v-742a731e"]]);var lr=tr;const ar=["width","height","stroke","stroke-width"],nr=["transform"],or=["d"];var ir=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=()=>{Oi.emit(Ai.OPEN_LATEX_EDITOR)};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-latex",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e)),onDblclick:t[2]||(t[2]=e=>a())},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{d:e.elementInfo.path},null,8,or)],8,nr)],8,ar))],32)),[[n,e.contextmenus]])],4)],6)}}});const sr=(0,Vl.Z)(ir,[["__scopeId","data-v-35c33b80"]]);var rr=sr,ur=(e,t)=>{(0,i.bv)((()=>{if(!t.value)return;let l="normal";if(/m3u8(#|\?|$)/i.exec(e)?l="hls":/.flv(#|\?|$)/i.exec(e)&&(l="flv"),t.value&&"hls"===l&&(t.value.canPlayType("application/x-mpegURL")||t.value.canPlayType("application/vnd.apple.mpegURL"))&&(l="normal"),"hls"===l){const l=window.Hls;if(l&&l.isSupported()){const a=new l;a.loadSource(e),a.attachMedia(t.value)}}else if("flv"===l){const l=window.flvjs;if(l&&l.isSupported()){const a=l.createPlayer({type:"flv",url:e});a.attachMediaElement(t.value),a.load()}}}))};const cr=e=>((0,i.dD)("data-v-e55352ca"),e=e(),(0,i.Cn)(),e),dr={key:0,class:"load-error"},pr=["src","autoplay","poster"],vr={class:"bezel"},mr=cr((()=>(0,i._)("div",{class:"controller-mask"},null,-1))),hr={class:"controller"},fr={class:"icons icons-left"},gr={class:"icon-content"},yr={class:"volume"},wr={class:"icon-content"},xr=cr((()=>(0,i._)("span",{class:"thumb"},null,-1))),kr=[xr],br={class:"time"},_r={class:"ptime"},Ir={class:"dtime"},Sr={class:"icons icons-right"},Cr={class:"speed"},Lr={class:"icon speed-icon"},Tr=["onClick"],Er={class:"icon-content"},Mr={class:"bar"},Ur=cr((()=>(0,i._)("span",{class:"thumb"},null,-1))),Wr=[Ur];var Dr=(0,i.aZ)({__name:"index",props:{width:{},height:{},src:{},poster:{default:""},autoplay:{type:Boolean,default:!1},scale:{default:1}},setup(e){const t=e,l=(e=0)=>{if(0===e||isNaN(e))return"00:00";const t=e=>e<10?"0"+e:""+e,l=Math.floor(e/3600),a=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*a);return(l>0?[l,a,n]:[a,n]).map(t).join(":")},a=e=>e.getBoundingClientRect().left,n=(0,s.iH)(),o=(0,s.iH)(),r=(0,s.iH)(),u=(0,s.iH)(.5),c=(0,s.iH)(!0),d=(0,s.iH)(0),p=(0,s.iH)(0),v=(0,s.iH)(0),m=(0,s.iH)(!1),h=(0,s.iH)(!1),f=(0,s.iH)(1),g=(0,s.iH)(!1),y=(0,s.iH)("00:00"),w=(0,s.iH)("0"),x=(0,i.Fl)((()=>l(d.value))),k=(0,i.Fl)((()=>l(p.value))),b=(0,i.Fl)((()=>d.value/p.value*100+"%")),_=(0,i.Fl)((()=>v.value/p.value*100+"%")),I=(0,i.Fl)((()=>100*u.value+"%")),S=(0,s.iH)(!1),C=[{label:"2x",value:2},{label:"1.5x",value:1.5},{label:"1.25x",value:1.25},{label:"1x",value:1},{label:"0.75x",value:.75},{label:"0.5x",value:.5}],L=e=>{n.value&&(e=Math.max(e,0),e=Math.min(e,p.value),n.value.currentTime=e,d.value=e)},T=()=>{n.value&&(c.value=!1,n.value.play(),h.value=!0)},E=()=>{n.value&&(c.value=!0,n.value.pause(),h.value=!0)},M=()=>{c.value?T():E()},U=e=>{n.value&&(e=Math.max(e,0),e=Math.min(e,1),n.value.volume=e,u.value=e,n.value.muted&&0!==e&&(n.value.muted=!1))},W=e=>{n.value&&(n.value.playbackRate=e),f.value=e},D=()=>{p.value=n.value?.duration||0},H=()=>{d.value=n.value?.currentTime||0},F=()=>{m.value?(L(0),T()):E()},A=()=>{v.value=n.value?.buffered.length?n.value.buffered.end(n.value.buffered.length-1):0},$=(0,s.iH)(!1),Z=()=>$.value=!0,O=e=>{if(!n.value||!o.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-a(o.value))/o.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const i=l*p.value;n.value.currentTime=i,d.value=i},R=e=>{if(!n.value||!o.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-a(o.value))/o.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const i=l*p.value;n.value.currentTime=i,d.value=i,document.removeEventListener("mousemove",O),document.removeEventListener("touchmove",O),document.removeEventListener("mouseup",R),document.removeEventListener("touchend",R)},z=()=>{document.addEventListener("mousemove",O),document.addEventListener("touchmove",O),document.addEventListener("mouseup",R),document.addEventListener("touchend",R)},P=e=>{if(!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-a(r.value))/45;U(l)},B=()=>{document.removeEventListener("mousemove",P),document.removeEventListener("touchmove",P),document.removeEventListener("mouseup",B),document.removeEventListener("touchend",B)},N=()=>{document.addEventListener("mousemove",P),document.addEventListener("touchmove",P),document.addEventListener("mouseup",B),document.addEventListener("touchend",B)},j=e=>{if(!r.value)return;const t=(e.clientX-a(r.value))/45;U(t)},Y=e=>{if(p.value&&o.value){const t=o.value.getBoundingClientRect().left,a=e.clientX-t;if(a<0||a>o.value.offsetWidth)return;const n=p.value*(a/o.value.offsetWidth);w.value=a-(n>=3600?25:20)+"px",y.value=l(n),g.value=!0}},V=()=>{n.value&&(n.value.muted?(n.value.muted=!1,U(.5)):(n.value.muted=!0,U(0)))},J=()=>{m.value=!m.value},q=(0,s.iH)(-1),X=(0,s.iH)(!1),G=()=>{X.value=!1,clearTimeout(q.value),q.value=setTimeout((()=>{n.value?.played.length&&(X.value=!0)}),3e3)};return ur(t.src,n),(e,t)=>{const l=(0,i.up)("IconPause"),a=(0,i.up)("IconPlayOne"),s=(0,i.up)("IconVolumeMute"),d=(0,i.up)("IconVolumeNotice"),p=(0,i.up)("IconVolumeSmall");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["video-player",{"hide-controller":X.value}]),style:(0,oe.j5)({width:e.width*e.scale+"px",height:e.height*e.scale+"px",transform:`scale(${1/e.scale})`}),onMousemove:t[22]||(t[22]=e=>G()),onClick:t[23]||(t[23]=e=>G())},[(0,i._)("div",{class:"video-wrap",onClick:t[8]||(t[8]=e=>M())},[$.value?((0,i.wg)(),(0,i.iD)("div",dr,"视频加载失败")):(0,i.kq)("",!0),(0,i._)("video",{class:"video",ref_key:"videoRef",ref:n,src:e.src,autoplay:e.autoplay,poster:e.poster,"webkit-playsinline":"",playsinline:"",onDurationchange:t[0]||(t[0]=e=>D()),onTimeupdate:t[1]||(t[1]=e=>H()),onEnded:t[2]||(t[2]=e=>F()),onProgress:t[3]||(t[3]=e=>A()),onPlay:t[4]||(t[4]=e=>{G(),c.value=!1}),onPause:t[5]||(t[5]=e=>G()),onError:t[6]||(t[6]=e=>Z())},null,40,pr),(0,i._)("div",vr,[(0,i._)("span",{class:(0,oe.C_)(["bezel-icon",{"bezel-transition":h.value}]),onAnimationend:t[7]||(t[7]=e=>h.value=!1)},[c.value?((0,i.wg)(),(0,i.j4)(l,{key:0})):((0,i.wg)(),(0,i.j4)(a,{key:1}))],34)])]),mr,(0,i._)("div",hr,[(0,i._)("div",fr,[(0,i._)("div",{class:"icon play-icon",onClick:t[9]||(t[9]=e=>M())},[(0,i._)("span",gr,[c.value?((0,i.wg)(),(0,i.j4)(a,{key:0})):((0,i.wg)(),(0,i.j4)(l,{key:1}))])]),(0,i._)("div",yr,[(0,i._)("div",{class:"icon volume-icon",onClick:t[10]||(t[10]=e=>V())},[(0,i._)("span",wr,[0===u.value?((0,i.wg)(),(0,i.j4)(s,{key:0})):1===u.value?((0,i.wg)(),(0,i.j4)(d,{key:1})):((0,i.wg)(),(0,i.j4)(p,{key:2}))])]),(0,i._)("div",{class:"volume-bar-wrap",onMousedown:t[11]||(t[11]=e=>N()),onTouchstart:t[12]||(t[12]=e=>N()),onClick:t[13]||(t[13]=e=>j(e))},[(0,i._)("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:r},[(0,i._)("div",{class:"volume-bar-inner",style:(0,oe.j5)({width:I.value})},kr,4)],512)],32)]),(0,i._)("span",br,[(0,i._)("span",_r,(0,oe.zw)(x.value),1),(0,i.Uk)(" / "),(0,i._)("span",Ir,(0,oe.zw)(k.value),1)])]),(0,i._)("div",Sr,[(0,i._)("div",Cr,[(0,i._)("div",Lr,[(0,i._)("span",{class:"icon-content",onClick:t[14]||(t[14]=e=>S.value=!S.value)},(0,oe.zw)(1===f.value?"倍速":f.value+"x"),1),S.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"speed-menu",onMouseleave:t[15]||(t[15]=e=>S.value=!1)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(C,(e=>(0,i._)("div",{class:(0,oe.C_)(["speed-menu-item",{active:e.value===f.value}]),key:e.label,onClick:t=>W(e.value)},(0,oe.zw)(e.label),11,Tr))),64))],32)):(0,i.kq)("",!0)])]),(0,i._)("div",{class:"loop",onClick:t[16]||(t[16]=e=>J())},[(0,i._)("div",{class:(0,oe.C_)(["icon loop-icon",{active:m.value}])},[(0,i._)("span",Er,"循环"+(0,oe.zw)(m.value?"开":"关"),1)],2)])]),(0,i._)("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:o,onMousedown:t[17]||(t[17]=e=>z()),onTouchstart:t[18]||(t[18]=e=>z()),onMousemove:t[19]||(t[19]=e=>Y(e)),onMouseenter:t[20]||(t[20]=e=>g.value=!0),onMouseleave:t[21]||(t[21]=e=>g.value=!1)},[(0,i._)("div",{class:(0,oe.C_)(["bar-time",{hidden:!g.value}]),style:(0,oe.j5)({left:w.value})},(0,oe.zw)(y.value),7),(0,i._)("div",Mr,[(0,i._)("div",{class:"loaded",style:(0,oe.j5)({width:_.value})},null,4),(0,i._)("div",{class:"played",style:(0,oe.j5)({width:b.value})},Wr,4)])],544)])],38)}}});const Hr=(0,Vl.Z)(Dr,[["__scopeId","data-v-e55352ca"]]);var Fr=Hr,Ar=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-video",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[2]||(t[2]=e=>a(e,!1)),onTouchstart:t[3]||(t[3]=e=>a(e,!1))},[(0,i.Wm)(Fr,{width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,scale:(0,s.SU)(l)},null,8,["width","height","src","poster","scale"]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(["t","b","l","r"],(e=>(0,i._)("div",{class:(0,oe.C_)(["handler-border",e]),key:e,onMousedown:t[0]||(t[0]=e=>a(e)),onTouchstart:t[1]||(t[1]=e=>a(e))},null,34))),64))],32)),[[n,e.contextmenus]])],4)],6)}}});const $r=(0,Vl.Z)(Ar,[["__scopeId","data-v-5dc89f2a"]]);var Zr=$r;const Or=e=>((0,i.dD)("data-v-44037f56"),e=e(),(0,i.Cn)(),e),Rr=["src","autoplay"],zr={class:"controller"},Pr={class:"icons"},Br={class:"icon-content"},Nr={class:"volume"},jr={class:"icon-content"},Yr=Or((()=>(0,i._)("span",{class:"thumb"},null,-1))),Vr=[Yr],Jr={class:"time"},qr={class:"ptime"},Xr={class:"dtime"},Gr={class:"bar"},Kr=Or((()=>(0,i._)("span",{class:"thumb"},null,-1))),Qr=[Kr];var eu=(0,i.aZ)({__name:"AudioPlayer",props:{src:{},loop:{type:Boolean},autoplay:{type:Boolean,default:!1},scale:{default:1}},setup(e,{expose:t}){const l=e,a=(e=0)=>{if(0===e||isNaN(e))return"00:00";const t=e=>e<10?"0"+e:""+e,l=Math.floor(e/3600),a=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*a);return(l>0?[l,a,n]:[a,n]).map(t).join(":")},n=e=>e.getBoundingClientRect().left,o=(0,s.iH)(),r=(0,s.iH)(),u=(0,s.iH)(),c=(0,s.iH)(.5),d=(0,s.iH)(!0),p=(0,s.iH)(0),v=(0,s.iH)(0),m=(0,s.iH)(0),h=(0,s.iH)(!1),f=(0,s.iH)("00:00"),g=(0,s.iH)("0"),y=(0,i.Fl)((()=>a(p.value))),w=(0,i.Fl)((()=>a(v.value))),x=(0,i.Fl)((()=>p.value/v.value*100+"%")),k=(0,i.Fl)((()=>m.value/v.value*100+"%")),b=(0,i.Fl)((()=>100*c.value+"%")),_=e=>{o.value&&(e=Math.max(e,0),e=Math.min(e,v.value),o.value.currentTime=e,p.value=e)},I=()=>{o.value&&(d.value=!1,o.value.play())},S=()=>{o.value&&(d.value=!0,o.value.pause())},C=()=>{d.value?I():S()},L=e=>{o.value&&(e=Math.max(e,0),e=Math.min(e,1),o.value.volume=e,c.value=e,o.value.muted&&0!==e&&(o.value.muted=!1))},T=()=>{v.value=o.value?.duration||0},E=()=>{p.value=o.value?.currentTime||0},M=()=>{d.value=!1},U=()=>{l.loop?(_(0),I()):S()},W=()=>{m.value=o.value?.buffered.length?o.value.buffered.end(o.value.buffered.length-1):0},D=()=>ta.error("视频加载失败"),H=e=>{if(!o.value||!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-n(r.value))/r.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const a=l*v.value;o.value.currentTime=a,p.value=a},F=e=>{if(!o.value||!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-n(r.value))/r.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const a=l*v.value;o.value.currentTime=a,p.value=a,document.removeEventListener("mousemove",H),document.removeEventListener("touchmove",H),document.removeEventListener("mouseup",F),document.removeEventListener("touchend",F)},A=()=>{document.addEventListener("mousemove",H),document.addEventListener("touchmove",H),document.addEventListener("mouseup",F),document.addEventListener("touchend",F)},$=e=>{if(!u.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-n(u.value))/45;L(l)},Z=()=>{document.removeEventListener("mousemove",$),document.removeEventListener("touchmove",$),document.removeEventListener("mouseup",Z),document.removeEventListener("touchend",Z)},O=()=>{document.addEventListener("mousemove",$),document.addEventListener("touchmove",$),document.addEventListener("mouseup",Z),document.addEventListener("touchend",Z)},R=e=>{if(!u.value)return;const t=(e.clientX-n(u.value))/45;L(t)},z=e=>{if(v.value&&r.value){const t=r.value.getBoundingClientRect().left,l=e.clientX-t;if(l<0||l>r.value.offsetWidth)return;const n=v.value*(l/r.value.offsetWidth);g.value=l-(n>=3600?25:20)+"px",f.value=a(n),h.value=!0}},P=()=>{o.value&&(o.value.muted?(o.value.muted=!1,L(.5)):(o.value.muted=!0,L(0)))};return t({toggle:C}),(e,t)=>{const l=(0,i.up)("IconPlayOne"),a=(0,i.up)("IconPause"),n=(0,i.up)("IconVolumeMute"),s=(0,i.up)("IconVolumeNotice"),p=(0,i.up)("IconVolumeSmall");return(0,i.wg)(),(0,i.iD)("div",{class:"audio-player",style:(0,oe.j5)({transform:`scale(${1/e.scale})`})},[(0,i._)("audio",{class:"audio",ref_key:"audioRef",ref:o,src:e.src,autoplay:e.autoplay,onDurationchange:t[0]||(t[0]=e=>T()),onTimeupdate:t[1]||(t[1]=e=>E()),onPlay:t[2]||(t[2]=e=>M()),onEnded:t[3]||(t[3]=e=>U()),onProgress:t[4]||(t[4]=e=>W()),onError:t[5]||(t[5]=e=>D())},null,40,Rr),(0,i._)("div",zr,[(0,i._)("div",Pr,[(0,i._)("div",{class:"icon play-icon",onClick:t[6]||(t[6]=e=>C())},[(0,i._)("span",Br,[d.value?((0,i.wg)(),(0,i.j4)(l,{key:0})):((0,i.wg)(),(0,i.j4)(a,{key:1}))])]),(0,i._)("div",Nr,[(0,i._)("div",{class:"icon volume-icon",onClick:t[7]||(t[7]=e=>P())},[(0,i._)("span",jr,[0===c.value?((0,i.wg)(),(0,i.j4)(n,{key:0})):1===c.value?((0,i.wg)(),(0,i.j4)(s,{key:1})):((0,i.wg)(),(0,i.j4)(p,{key:2}))])]),(0,i._)("div",{class:"volume-bar-wrap",onMousedown:t[8]||(t[8]=e=>O()),onTouchstart:t[9]||(t[9]=e=>O()),onClick:t[10]||(t[10]=e=>R(e))},[(0,i._)("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:u},[(0,i._)("div",{class:"volume-bar-inner",style:(0,oe.j5)({width:b.value})},Vr,4)],512)],32)])]),(0,i._)("span",Jr,[(0,i._)("span",qr,(0,oe.zw)(y.value),1),(0,i.Uk)(" / "),(0,i._)("span",Xr,(0,oe.zw)(w.value),1)]),(0,i._)("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:r,onMousedown:t[11]||(t[11]=e=>A()),onTouchstart:t[12]||(t[12]=e=>A()),onMousemove:t[13]||(t[13]=e=>z(e)),onMouseenter:t[14]||(t[14]=e=>h.value=!0),onMouseleave:t[15]||(t[15]=e=>h.value=!1)},[(0,i._)("div",{class:(0,oe.C_)(["bar-time",{hidden:!h.value}]),style:(0,oe.j5)({left:g.value})},(0,oe.zw)(f.value),7),(0,i._)("div",Gr,[(0,i._)("div",{class:"loaded",style:(0,oe.j5)({width:k.value})},null,4),(0,i._)("div",{class:"played",style:(0,oe.j5)({width:x.value})},Qr,4)])],544)])],4)}}});const tu=(0,Vl.Z)(eu,[["__scopeId","data-v-44037f56"]]);var lu=tu,au=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l,handleElementId:a}=(0,o.Jk)(R()),{viewportRatio:r}=(0,o.Jk)($()),u=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px")),c=(0,i.Fl)((()=>{const e=oa,a=oa*r.value,n=280/l.value,o=50/l.value,i=t.elementInfo.width,s=t.elementInfo.height,u=t.elementInfo.left,c=t.elementInfo.top;let d=0,p=s;return u+n>=e&&(d=i-n),c+s+o>=a&&(p=-o),{left:d+"px",top:p+"px"}})),d=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))};return(e,t)=>{const o=(0,i.up)("IconVolumeNotice"),r=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-audio",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[1]||(t[1]=e=>d(e)),onTouchstart:t[2]||(t[2]=e=>d(e))},[(0,i.Wm)(o,{class:"audio-icon",style:(0,oe.j5)({fontSize:u.value,color:e.elementInfo.color})},null,8,["style"]),(0,s.SU)(a)===e.elementInfo.id?((0,i.wg)(),(0,i.j4)(lu,{key:0,class:"audio-player",style:(0,oe.j5)({...c.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,scale:(0,s.SU)(l),onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"]))},null,8,["style","src","loop","scale"])):(0,i.kq)("",!0)],32)),[[r,e.contextmenus]])],4)],6)}}});const nu=(0,Vl.Z)(au,[["__scopeId","data-v-53bdc956"]]);var ou=nu;const iu=["id"];var su=(0,i.aZ)({__name:"EditableElement",props:{elementInfo:{},elementIndex:{},isMultiSelect:{type:Boolean},selectElement:{type:Function},openLinkDialog:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[sa.IMAGE]:$o,[sa.TEXT]:ls,[sa.SHAPE]:ys,[sa.LINE]:Es,[sa.CHART]:As,[sa.TABLE]:lr,[sa.LATEX]:rr,[sa.VIDEO]:Zr,[sa.AUDIO]:ou};return e[t.elementInfo.type]||null})),{orderElement:a}=ba(),{alignElementToCanvas:n}=qn(),{combineElements:o,uncombineElements:s}=ya(),{deleteElement:r}=ga(),{lockElement:u,unlockElement:c}=fa(),{copyElement:d,pasteElement:p,cutElement:v}=wa(),{selectAllElement:m}=xa(),h=()=>t.elementInfo.lock?[{text:"解锁",handler:()=>c(t.elementInfo)}]:[{text:"剪切",subText:"Ctrl + X",handler:v},{text:"复制",subText:"Ctrl + C",handler:d},{text:"粘贴",subText:"Ctrl + V",handler:p},{divider:!0},{text:"水平居中",handler:()=>n(ee.HORIZONTAL),children:[{text:"水平垂直居中",handler:()=>n(ee.CENTER)},{text:"水平居中",handler:()=>n(ee.HORIZONTAL)},{text:"左对齐",handler:()=>n(ee.LEFT)},{text:"右对齐",handler:()=>n(ee.RIGHT)}]},{text:"垂直居中",handler:()=>n(ee.VERTICAL),children:[{text:"水平垂直居中",handler:()=>n(ee.CENTER)},{text:"垂直居中",handler:()=>n(ee.VERTICAL)},{text:"顶部对齐",handler:()=>n(ee.TOP)},{text:"底部对齐",handler:()=>n(ee.BOTTOM)}]},{divider:!0},{text:"置于顶层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,Q.TOP),children:[{text:"置于顶层",handler:()=>a(t.elementInfo,Q.TOP)},{text:"上移一层",handler:()=>a(t.elementInfo,Q.UP)}]},{text:"置于底层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,Q.BOTTOM),children:[{text:"置于底层",handler:()=>a(t.elementInfo,Q.BOTTOM)},{text:"下移一层",handler:()=>a(t.elementInfo,Q.DOWN)}]},{divider:!0},{text:"设置链接",handler:t.openLinkDialog},{text:t.elementInfo.groupId?"取消组合":"组合",subText:"Ctrl + G",handler:t.elementInfo.groupId?s:o,hide:!t.isMultiSelect},{text:"全选",subText:"Ctrl + A",handler:m},{text:"锁定",subText:"Ctrl + L",handler:u},{text:"删除",subText:"Delete",handler:r}];return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"editable-element",ref:"elementRef",id:`editable-element-${e.elementInfo.id}`,style:(0,oe.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:h},null,8,["elementInfo","selectElement"]))],12,iu))}});const ru=su;var uu=ru,cu=(0,i.aZ)({__name:"MouseSelection",props:{top:{},left:{},width:{},height:{},quadrant:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(`mouse-selection quadrant-${e.quadrant}`),style:(0,oe.j5)({top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"})},null,6))}});const du=(0,Vl.Z)(cu,[["__scopeId","data-v-2c5e1d42"]]);var pu=du;const vu={class:"grid-lines"},mu=["d","stroke"];var hu=(0,i.aZ)({__name:"GridLines",setup(e){const{canvasScale:t,gridLineSize:l}=(0,o.Jk)(R()),{currentSlide:a,viewportRatio:n}=(0,o.Jk)($()),r=(0,i.Fl)((()=>a.value?.background)),u=(0,i.Fl)((()=>{const e=r.value?.color||"#fff",t=["#000","#fff"];return W.Z.mostReadable(e,t,{includeFallbackColors:!0}).setAlpha(.5).toRgbString()})),c=(0,i.Fl)((()=>{const e=oa,t=oa*n.value;let a="";for(let n=0;n<=Math.floor(t/l.value);n++)a+=`M0 ${n*l.value} L${e} ${n*l.value} `;for(let n=0;n<=Math.floor(e/l.value);n++)a+=`M${n*l.value} 0 L${n*l.value} ${t} `;return a}));return(e,l)=>((0,i.wg)(),(0,i.iD)("svg",vu,[(0,i._)("path",{style:(0,oe.j5)({transform:`scale(${(0,s.SU)(t)})`}),d:c.value,fill:"none",stroke:u.value,"stroke-width":"0.3","stroke-dasharray":"5"},null,12,mu)]))}});const fu=(0,Vl.Z)(hu,[["__scopeId","data-v-05484a24"]]);var gu=fu,yu=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return{backgroundColor:"#fff"};const{type:t,color:l,image:a,imageSize:n,gradientColor:o,gradientRotate:i,gradientType:s}=e.value;if("solid"===t)return{backgroundColor:l};if("image"===t)return a?"repeat"===n?{backgroundImage:`url(${a}`,backgroundRepeat:"repeat",backgroundSize:"contain"}:{backgroundImage:`url(${a}`,backgroundRepeat:"no-repeat",backgroundSize:n||"cover"}:{backgroundColor:"#fff"};if("gradient"===t){const e=i||0,t=o?o[0]:"#fff",l=o?o[1]:"#fff";return"radial"===s?{backgroundImage:`radial-gradient(${t}, ${l}`}:{backgroundImage:`linear-gradient(${e}deg, ${t}, ${l}`}}return{backgroundColor:"#fff"}}));return{backgroundStyle:t}},wu=(0,i.aZ)({__name:"ViewportBackground",setup(e){const{gridLineSize:t}=(0,o.Jk)(R()),{currentSlide:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>l.value?.background)),{backgroundStyle:n}=yu(a);return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"viewport-background",style:(0,oe.j5)((0,s.SU)(n))},[(0,s.SU)(t)?((0,i.wg)(),(0,i.j4)(gu,{key:0})):(0,i.kq)("",!0)],4))}});const xu=(0,Vl.Z)(wu,[["__scopeId","data-v-b6b18502"]]);var ku=xu,bu=(0,i.aZ)({__name:"AlignmentLine",props:{type:{},axis:{},length:{},canvasScale:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.axis.x*t.canvasScale+"px")),a=(0,i.Fl)((()=>t.axis.y*t.canvasScale+"px")),n=(0,i.Fl)((()=>"vertical"===t.type?{height:t.length*t.canvasScale+"px"}:{width:t.length*t.canvasScale+"px"}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"alignment-line",style:(0,oe.j5)({left:l.value,top:a.value})},[(0,i._)("div",{class:(0,oe.C_)(["line",e.type]),style:(0,oe.j5)(n.value)},null,6)],4))}});const _u=(0,Vl.Z)(bu,[["__scopeId","data-v-ed6fc00a"]]);var Iu=_u;const Su={class:"ruler"};var Cu=(0,i.aZ)({__name:"Ruler",props:{viewportStyles:{}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>t.viewportStyles.width*l.value/10));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Su,[(0,i._)("div",{class:"h",style:(0,oe.j5)({width:e.viewportStyles.width*(0,s.SU)(l)+"px",left:e.viewportStyles.left+"px"})},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(20,(e=>(0,i._)("div",{class:(0,oe.C_)(["ruler-marker-100",{hide:a.value<36,omit:a.value<72}]),key:`marker-100-${e}`},[(0,i._)("span",null,(0,oe.zw)(e),1)],2))),64))],4),(0,i._)("div",{class:"v",style:(0,oe.j5)({height:e.viewportStyles.height*(0,s.SU)(l)+"px",top:e.viewportStyles.top+"px"})},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(20,(e=>(0,i._)("div",{class:(0,oe.C_)(["ruler-marker-100",{hide:a.value<36,omit:a.value<72}]),key:e,style:(0,oe.j5)({height:a.value+"px"})},[(0,i._)("span",null,(0,oe.zw)(e),1)],6))),64))],4)]))}});const Lu=(0,Vl.Z)(Cu,[["__scopeId","data-v-2963c74c"]]);var Tu=Lu;const Eu=["width","height"],Mu=["d"];var Uu=(0,i.aZ)({__name:"ElementCreateSelection",emits:["created"],setup(e,{emit:t}){const l=t,a=R(),{creatingElement:r}=(0,o.Jk)(a),{ctrlOrShiftKeyActive:u}=(0,o.Jk)(q()),c=(0,s.iH)(),d=(0,s.iH)(),p=(0,s.iH)(),v=(0,s.iH)({x:0,y:0});(0,i.bv)((()=>{if(!p.value)return;const{x:e,y:t}=p.value.getBoundingClientRect();v.value={x:e,y:t}}));const m=e=>{let t=!0;const n=e.pageX,o=e.pageY;c.value=[n,o],document.onmousemove=e=>{if(!r.value||!t)return;let l=e.pageX,a=e.pageY;if(u.value){const e=l-n,t=a-o,i=Math.abs(e),s=Math.abs(t);if("shape"===r.value.type){const r=t>0&&e<0||t<0&&e>0;i>s?a=r?o-e:o+e:l=r?n-t:n+t}else"line"===r.value.type&&(i>s?a=o:l=n)}d.value=[l,a]},document.onmouseup=e=>{if(document.onmousemove=null,document.onmouseup=null,2===e.button)return void setTimeout((()=>a.setCreatingElement(null)),0);t=!1;const i=e.pageX,s=e.pageY,u=30;if("line"===r.value?.type&&(Math.abs(i-n)>=u||Math.abs(s-o)>=u))l("created",{start:c.value,end:d.value});else if("line"!==r.value?.type&&Math.abs(i-n)>=u&&Math.abs(s-o)>=u)l("created",{start:c.value,end:d.value});else{const e=200,t=Math.min(i,n),a=Math.min(s,o),r=Math.max(i,n),c=Math.max(s,o),d=r-t>=u?r-t:e,p=c-a>=u?c-a:e;l("created",{start:[t,a],end:[t+d,a+p]})}}},h=(0,i.Fl)((()=>{if(!c.value||!d.value)return null;if(!r.value||"line"!==r.value.type)return null;const[e,t]=c.value,[l,a]=d.value,n=Math.min(e,l),o=Math.max(e,l),i=Math.min(t,a),s=Math.max(t,a),u=o-n>=24?o-n:24,p=s-i>=24?s-i:24,v=e===n?0:o-n,m=t===i?0:s-i,h=l===n?0:o-n,f=a===i?0:s-i,g=`M${v}, ${m} L${h}, ${f}`;return{svgWidth:u,svgHeight:p,startX:v,startY:m,endX:h,endY:f,path:g}})),f=(0,i.Fl)((()=>{if(!c.value||!d.value)return{};const[e,t]=c.value,[l,a]=d.value,n=Math.min(e,l),o=Math.max(e,l),i=Math.min(t,a),s=Math.max(t,a),r=o-n,u=s-i;return{left:n-v.value.x+"px",top:i-v.value.y+"px",width:r+"px",height:u+"px"}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"element-create-selection",ref_key:"selectionRef",ref:p,onMousedown:t[0]||(t[0]=(0,n.iM)((e=>m(e)),["stop"])),onContextmenu:t[1]||(t[1]=(0,n.iM)((()=>{}),["stop","prevent"]))},[c.value&&d.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,oe.C_)(["selection",(0,s.SU)(r)?.type]),style:(0,oe.j5)(f.value)},["line"===(0,s.SU)(r)?.type&&h.value?((0,i.wg)(),(0,i.iD)("svg",{key:0,overflow:"visible",width:h.value.svgWidth,height:h.value.svgHeight},[(0,i._)("path",{d:h.value.path,stroke:"#d14424",fill:"none","stroke-width":"2"},null,8,Mu)],8,Eu)):(0,i.kq)("",!0)],6)):(0,i.kq)("",!0)],544))}});const Wu=(0,Vl.Z)(Uu,[["__scopeId","data-v-85b0bbaa"]]);var Du=Wu;const Hu={overflow:"visible"},Fu=["d","fill"];var Au=(0,i.aZ)({__name:"ShapeCreateCanvas",emits:["created"],setup(e,{emit:t}){const l=t,a=R(),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(q()),{theme:u}=(0,o.Jk)($()),c=(0,s.iH)(),d=(0,s.iH)(!1),p=(0,s.iH)({x:0,y:0});(0,i.bv)((()=>{if(!c.value)return;const{x:e,y:t}=c.value.getBoundingClientRect();p.value={x:e,y:t}}));const v=(0,s.iH)(null),m=(0,s.iH)([]),h=(0,s.iH)(!1),f=(e,t=!1)=>{let l=e.pageX-p.value.x,a=e.pageY-p.value.y;if(t)return{pageX:l,pageY:a};if(r.value&&m.value.length){const[e,t]=m.value[m.value.length-1];Math.abs(e-l)-Math.abs(t-a)>0?a=t:l=e}return{pageX:l,pageY:a}},g=e=>{if(d.value){const{pageX:t,pageY:l}=f(e,!0);return m.value.push([t,l]),void(v.value=null)}const{pageX:t,pageY:l}=f(e);if(v.value=[t,l],m.value.length>=2){const[e,a]=m.value[0];Math.abs(e-t)<5&&Math.abs(a-l)<5?h.value=!0:h.value=!1}else h.value=!1},y=(0,i.Fl)((()=>{let e="";for(let t=0;t{const t=m.value.map((e=>e[0])),l=m.value.map((e=>e[1])),a=Math.min(...t),n=Math.min(...l),o=Math.max(...t),i=Math.max(...l),s=m.value.map((e=>[e[0]-a,e[1]-n]));let r="";for(let p=0;p{const{pageX:t,pageY:a}=f(e);d.value=!0,h.value?l("created",w()):m.value.push([t,a]),document.onmouseup=()=>{d.value=!1}},k=()=>{a.setCreatingCustomShapeState(!1)},b=()=>{l("created",{...w(!1),fill:"rgba(0, 0, 0, 0)",outline:{width:2,color:u.value.themeColor,style:"solid"}}),k()},_=e=>{const t=e.key.toUpperCase();t===ne.ESC&&k(),t===ne.ENTER&&b()};return(0,i.bv)((()=>{ta.success("点击绘制任意形状,首尾闭合完成绘制,按 ESC 键或鼠标右键取消,按 ENTER 键提前完成",{duration:5e3}),document.addEventListener("keydown",_)})),(0,i.Ah)((()=>document.removeEventListener("keydown",_))),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"shape-create-canvas",ref_key:"shapeCanvasRef",ref:c,onMousedown:t[0]||(t[0]=(0,n.iM)((e=>x(e)),["stop"])),onMousemove:t[1]||(t[1]=e=>g(e)),onContextmenu:t[2]||(t[2]=(0,n.iM)((e=>k()),["stop","prevent"]))},[((0,i.wg)(),(0,i.iD)("svg",Hu,[(0,i._)("path",{d:y.value,stroke:"#d14424",fill:h.value?"rgba(226, 83, 77, 0.15)":"none","stroke-width":"2"},null,8,Fu)]))],544))}});const $u=(0,Vl.Z)(Au,[["__scopeId","data-v-6dc9876e"]]);var Zu=$u,Ou=(e,t)=>{const l=(0,i.Fl)((()=>[{direction:le.LEFT_TOP,style:{}},{direction:le.TOP,style:{left:e.value/2+"px"}},{direction:le.RIGHT_TOP,style:{left:e.value+"px"}},{direction:le.LEFT,style:{top:t.value/2+"px"}},{direction:le.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}},{direction:le.LEFT_BOTTOM,style:{top:t.value+"px"}},{direction:le.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}},{direction:le.RIGHT_BOTTOM,style:{left:e.value+"px",top:t.value+"px"}}])),a=(0,i.Fl)((()=>[{direction:le.LEFT,style:{top:t.value/2+"px"}},{direction:le.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}}])),n=(0,i.Fl)((()=>[{direction:le.TOP,style:{left:e.value/2+"px"}},{direction:le.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}}])),o=(0,i.Fl)((()=>[{type:te.T,style:{width:e.value+"px"}},{type:te.B,style:{top:t.value+"px",width:e.value+"px"}},{type:te.L,style:{height:t.value+"px"}},{type:te.R,style:{left:e.value+"px",height:t.value+"px"}}]));return{resizeHandlers:l,textElementResizeHandlers:a,verticalTextElementResizeHandlers:n,borderLines:o}},Ru=(0,i.aZ)({__name:"ResizeHandler",props:{type:{},rotate:{default:0}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e="rotate-",l=t.rotate;return l>-22.5&&l<=22.5?e+0:l>22.5&&l<=67.5?e+45:l>67.5&&l<=112.5?e+90:l>112.5&&l<=157.5?e+135:l>157.5||l<=-157.5?e+0:l>-157.5&&l<=-112.5?e+45:l>-112.5&&l<=-67.5?e+90:l>-67.5&&l<=-22.5?e+135:e+0}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["resize-handler",l.value,e.type])},null,2))}});const zu=(0,Vl.Z)(Ru,[["__scopeId","data-v-1e66197f"]]);var Pu=zu,Bu=(0,i.aZ)({__name:"BorderLine",props:{type:{},isWide:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["border-line",e.type,{wide:e.isWide}])},null,2))}});const Nu=(0,Vl.Z)(Bu,[["__scopeId","data-v-8346cf6c"]]);var ju=Nu,Yu=(0,i.aZ)({__name:"MultiSelectOperate",props:{elementList:{},scaleMultiElement:{type:Function}},setup(e){const t=e,{activeElementIdList:l,canvasScale:a}=(0,o.Jk)(R()),r=(0,i.Fl)((()=>t.elementList.filter((e=>l.value.includes(e.id))))),u=(0,s.iH)({minX:0,maxX:0,minY:0,maxY:0}),c=(0,i.Fl)((()=>(u.value.maxX-u.value.minX)*a.value)),d=(0,i.Fl)((()=>(u.value.maxY-u.value.minY)*a.value)),{resizeHandlers:p,borderLines:v}=Ou(c,d),m=()=>{const{minX:e,maxX:t,minY:l,maxY:a}=ke(r.value);u.value={minX:e,maxX:t,minY:l,maxY:a}};(0,i.m0)(m);const h=(0,i.Fl)((()=>r.value.some((e=>!!("image"!==e.type&&"shape"!==e.type||e.rotate)))));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"multi-select-operate",style:(0,oe.j5)({left:u.value.minX*(0,s.SU)(a)+"px",top:u.value.minY*(0,s.SU)(a)+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(v),(e=>((0,i.wg)(),(0,i.j4)(ju,{key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),h.value?(0,i.kq)("",!0):((0,i.wg)(!0),(0,i.iD)(i.HY,{key:0},(0,i.Ko)((0,s.SU)(p),(t=>((0,i.wg)(),(0,i.j4)(Pu,{key:t.direction,type:t.direction,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleMultiElement(l,u.value,t.direction)),["stop"])},null,8,["type","style","onMousedown"])))),128))],4))}});const Vu=(0,Vl.Z)(Yu,[["__scopeId","data-v-97dc9b9a"]]);var Ju=Vu;const qu={class:"rotate-handler"};function Xu(e,t){return(0,i.wg)(),(0,i.iD)("div",qu)}const Gu={},Ku=(0,Vl.Z)(Gu,[["render",Xu],["__scopeId","data-v-b99d8dae"]]);var Qu=Ku;const ec={inheritAttrs:!1};var tc=(0,i.aZ)({...ec,__name:"ImageElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l,clipingImageElementId:a}=(0,o.Jk)(R()),r=(0,i.Fl)((()=>a.value===t.elementInfo.id)),u=(0,i.Fl)((()=>t.elementInfo.width*l.value)),c=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:d,borderLines:p}=Ou(u,c);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["image-element-operate",{cliping:r.value}])},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(p),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Qu,{class:"operate-rotate-handler",style:(0,oe.j5)({left:u.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)],2))}});const lc=(0,Vl.Z)(tc,[["__scopeId","data-v-7bcad5a9"]]);var ac=lc;const nc={class:"text-element-operate"},oc={inheritAttrs:!1};var ic=(0,i.aZ)({...oc,__name:"TextElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{textElementResizeHandlers:u,verticalTextElementResizeHandlers:c,borderLines:d}=Ou(a,r),p=(0,i.Fl)((()=>t.elementInfo.vertical?c.value:u.value));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",nc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Qu,{class:"operate-rotate-handler",style:(0,oe.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)]))}});const sc=ic;var rc=sc;const uc={class:"shape-element-operate"},cc={inheritAttrs:!1};var dc=(0,i.aZ)({...cc,__name:"ShapeElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function},moveShapeKeypoint:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:u,borderLines:c}=Ou(a,r),d=(0,i.Fl)((()=>{if(!t.elementInfo.pathFormula||void 0===t.elementInfo.keypoint)return{};const e=ra[t.elementInfo.pathFormula];if("editable"in e){const a=e.getBaseSize(t.elementInfo.width,t.elementInfo.height)*t.elementInfo.keypoint;if("left"===e.relative)return{left:a*l.value+"px"};if("right"===e.relative)return{left:(t.elementInfo.width-a)*l.value+"px"};if("center"===e.relative)return{left:(t.elementInfo.width-a)/2*l.value+"px"};if("top"===e.relative)return{top:a*l.value+"px"};if("bottom"===e.relative)return{top:(t.elementInfo.height-a)*l.value+"px"}}return{}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",uc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(u),(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Qu,{class:"operate-rotate-handler",style:(0,oe.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]),void 0!==e.elementInfo.keypoint?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"operate-keypoint-handler",style:(0,oe.j5)(d.value),onMousedown:t[1]||(t[1]=(0,n.iM)((t=>e.moveShapeKeypoint(t,e.elementInfo)),["stop"]))},null,36)):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0)]))}});const pc=(0,Vl.Z)(dc,[["__scopeId","data-v-52dcdbf8"]]);var vc=pc;const mc={class:"line-element-operate"},hc=["width","height","stroke"],fc={key:0},gc=["x1","y1","x2","y2"],yc=["x1","y1","x2","y2"],wc=["x1","y1","x2","y2"],xc=["x1","y1","x2","y2"],kc={inheritAttrs:!1};var bc=(0,i.aZ)({...kc,__name:"LineElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},dragLineElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>Math.max(t.elementInfo.start[0],t.elementInfo.end[0]))),r=(0,i.Fl)((()=>Math.max(t.elementInfo.start[1],t.elementInfo.end[1]))),u=(0,i.Fl)((()=>{const e=[{handler:ae.START,style:{left:t.elementInfo.start[0]*l.value+"px",top:t.elementInfo.start[1]*l.value+"px"}},{handler:ae.END,style:{left:t.elementInfo.end[0]*l.value+"px",top:t.elementInfo.end[1]*l.value+"px"}}];if(t.elementInfo.curve||t.elementInfo.broken){const a=t.elementInfo.curve||t.elementInfo.broken;e.push({handler:ae.C,style:{left:a[0]*l.value+"px",top:a[1]*l.value+"px"}})}else if(t.elementInfo.cubic){const[a,n]=t.elementInfo.cubic;e.push({handler:ae.C1,style:{left:a[0]*l.value+"px",top:a[1]*l.value+"px"}}),e.push({handler:ae.C2,style:{left:n[0]*l.value+"px",top:n[1]*l.value+"px"}})}return e}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",mc,[e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(u.value,(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.handler,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.dragLineElement(l,e.elementInfo,t.handler)),["stop"])},null,8,["style","onMousedown"])))),128)),((0,i.wg)(),(0,i.iD)("svg",{width:a.value||1,height:r.value||1,stroke:e.elementInfo.color,overflow:"visible",style:(0,oe.j5)({transform:`scale(${(0,s.SU)(l)})`})},[e.elementInfo.curve?((0,i.wg)(),(0,i.iD)("g",fc,[(0,i._)("line",{class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,gc),(0,i._)("line",{class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,yc)])):(0,i.kq)("",!0),e.elementInfo.cubic?((0,i.wg)(!0),(0,i.iD)(i.HY,{key:1},(0,i.Ko)(e.elementInfo.cubic,((t,l)=>((0,i.wg)(),(0,i.iD)("g",{key:l},[0===l?((0,i.wg)(),(0,i.iD)("line",{key:0,class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:t[0],y2:t[1]},null,8,wc)):(0,i.kq)("",!0),1===l?((0,i.wg)(),(0,i.iD)("line",{key:1,class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:t[0],y2:t[1]},null,8,xc)):(0,i.kq)("",!0)])))),128)):(0,i.kq)("",!0)],12,hc))],64)):(0,i.kq)("",!0)]))}});const _c=(0,Vl.Z)(bc,[["__scopeId","data-v-3aa5cc44"]]);var Ic=_c;const Sc={class:"table-element-operate"},Cc={inheritAttrs:!1};var Lc=(0,i.aZ)({...Cc,__name:"TableElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>t.elementInfo.outline.width||1)),r=(0,i.Fl)((()=>(t.elementInfo.width+a.value)*l.value)),u=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:c,borderLines:d}=Ou(r,u);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Sc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Qu,{class:"operate-rotate-handler",style:(0,oe.j5)({left:r.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)]))}});const Tc=Lc;var Ec=Tc;const Mc={class:"common-element-operate"},Uc={inheritAttrs:!1};var Wc=(0,i.aZ)({...Uc,__name:"CommonElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:u,borderLines:c}=Ou(a,r),d=(0,i.Fl)((()=>["chart","video","audio"].includes(t.elementInfo.type)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Mc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(u),(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),d.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.j4)(Qu,{key:0,class:"operate-rotate-handler",style:(0,oe.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]))],64)):(0,i.kq)("",!0)]))}});const Dc=Wc;var Hc=Dc,Fc=()=>{const e=$(),{addHistorySnapshot:t}=da(),l=(l,a)=>{const n=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if("web"===a.type&&!n.test(a.target))return ta.error("不是正确的网页链接地址"),!1;if("slide"===a.type&&!a.target)return ta.error("请先选择链接目标"),!1;const o={link:a};return e.updateElement({id:l.id,props:o}),t(),!0},a=l=>{e.removeElementProps({id:l.id,propName:"link"}),t()};return{setLink:l,removeLink:a}},Ac=(0,i.aZ)({__name:"Divider",props:{type:{default:"horizontal"},margin:{default:0}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["divider",e.type]),style:(0,oe.j5)({margin:"horizontal"===e.type?`${e.margin||24}px 0`:`0 ${e.margin||8}px`})},null,6))}});const $c=(0,Vl.Z)(Ac,[["__scopeId","data-v-6b66cde8"]]);var Zc=$c;const Oc=["href"],Rc={class:"btns"};var zc=(0,i.aZ)({__name:"LinkHandler",props:{elementInfo:{},link:{},openLinkDialog:{type:Function}},setup(e){const t=e,l=R(),a=$(),{canvasScale:n}=(0,o.Jk)(l),{slides:r}=(0,o.Jk)(a),{removeLink:u}=Fc(),c=(0,i.Fl)((()=>"line"===t.elementInfo.type?0:t.elementInfo.height)),d=e=>{const t=r.value.findIndex((t=>t.id===e));-1!==t&&(l.setActiveElementIdList([]),a.updateSlideIndex(t))};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"link-handler",style:(0,oe.j5)({top:c.value*(0,s.SU)(n)+10+"px"})},["web"===e.link.type?((0,i.wg)(),(0,i.iD)("a",{key:0,class:"link",href:e.link.target,target:"_blank"},(0,oe.zw)(e.link.target),9,Oc)):((0,i.wg)(),(0,i.iD)("a",{key:1,class:"link",onClick:t[0]||(t[0]=t=>d(e.link.target))},"幻灯片页面 "+(0,oe.zw)(e.link.target),1)),(0,i._)("div",Rc,[(0,i._)("div",{class:"btn",onClick:t[1]||(t[1]=t=>e.openLinkDialog())},"更换"),(0,i.Wm)(Zc,{type:"vertical"}),(0,i._)("div",{class:"btn",onClick:t[2]||(t[2]=t=>(0,s.SU)(u)(e.elementInfo))},"移除")])],4))}});const Pc=(0,Vl.Z)(zc,[["__scopeId","data-v-316c4664"]]);var Bc=Pc;const Nc={key:1,class:"animation-index"};var jc=(0,i.aZ)({__name:"index",props:{elementInfo:{},isSelected:{type:Boolean},isActive:{type:Boolean},isActiveGroupElement:{type:Boolean},isMultiSelect:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function},dragLineElement:{type:Function},moveShapeKeypoint:{type:Function},openLinkDialog:{type:Function}},setup(e){const t=e,{canvasScale:l,toolbarState:a}=(0,o.Jk)(R()),{formatedAnimations:r}=(0,o.Jk)($()),u=(0,i.Fl)((()=>{const e={[sa.IMAGE]:ac,[sa.TEXT]:rc,[sa.SHAPE]:vc,[sa.LINE]:Ic,[sa.TABLE]:Ec,[sa.CHART]:Hc,[sa.LATEX]:Hc,[sa.VIDEO]:Hc,[sa.AUDIO]:Hc};return e[t.elementInfo.type]||null})),c=(0,i.Fl)((()=>{const e=[];for(let l=0;le.elId));a.includes(t.elementInfo.id)&&e.push(l)}return e})),d=(0,i.Fl)((()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0)),p=(0,i.Fl)((()=>"height"in t.elementInfo?t.elementInfo.height:0));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["operate",{"multi-select":e.isMultiSelect&&!e.isActive}]),style:(0,oe.j5)({top:e.elementInfo.top*(0,s.SU)(l)+"px",left:e.elementInfo.left*(0,s.SU)(l)+"px",transform:`rotate(${d.value}deg)`,transformOrigin:`${e.elementInfo.width*(0,s.SU)(l)/2}px ${p.value*(0,s.SU)(l)/2}px`})},[e.isSelected?((0,i.wg)(),(0,i.j4)((0,i.LL)(u.value),{key:0,elementInfo:e.elementInfo,handlerVisible:!e.elementInfo.lock&&(e.isActiveGroupElement||!e.isMultiSelect),rotateElement:e.rotateElement,scaleElement:e.scaleElement,dragLineElement:e.dragLineElement,moveShapeKeypoint:e.moveShapeKeypoint},null,8,["elementInfo","handlerVisible","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])):(0,i.kq)("",!0),"elAnimation"===(0,s.SU)(a)&&c.value.length?((0,i.wg)(),(0,i.iD)("div",Nc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(c.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"index-item",key:e},(0,oe.zw)(e+1),1)))),128))])):(0,i.kq)("",!0),e.isActive&&e.elementInfo.link?((0,i.wg)(),(0,i.j4)(Bc,{key:2,elementInfo:e.elementInfo,link:e.elementInfo.link,openLinkDialog:e.openLinkDialog,onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"]))},null,8,["elementInfo","link","openLinkDialog"])):(0,i.kq)("",!0)],6))}});const Yc=(0,Vl.Z)(jc,[["__scopeId","data-v-5ec1ff35"]]);var Vc=Yc;const Jc=["src"];var qc=(0,i.aZ)({__name:"BaseImageElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Xn(l),n=(0,i.Fl)((()=>t.elementInfo.flipH)),o=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:r}=Gn(n,o),u=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:c,imgPosition:d}=Qn(u),p=(0,i.Fl)((()=>t.elementInfo.filters)),{filter:v}=eo(p);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-image",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({filter:(0,s.SU)(a)?`drop-shadow(${(0,s.SU)(a)})`:"",transform:(0,s.SU)(r)})},[(0,i.Wm)(ko,{elementInfo:e.elementInfo},null,8,["elementInfo"]),(0,i._)("div",{class:"image-content",style:(0,oe.j5)({clipPath:(0,s.SU)(c).style})},[(0,i._)("img",{src:e.elementInfo.src,draggable:!1,style:(0,oe.j5)({top:(0,s.SU)(d).top,left:(0,s.SU)(d).left,width:(0,s.SU)(d).width,height:(0,s.SU)(d).height,filter:(0,s.SU)(v)}),alt:""},null,12,Jc),e.elementInfo.colorMask?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"color-mask",style:(0,oe.j5)({backgroundColor:e.elementInfo.colorMask})},null,4)):(0,i.kq)("",!0)],4)],4)],4)],4))}});const Xc=(0,Vl.Z)(qc,[["__scopeId","data-v-24fef706"]]);var Gc=Xc;const Kc=["innerHTML"];var Qc=(0,i.aZ)({__name:"BaseTextElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Xn(l);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-text",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:(0,s.SU)(a),lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px",color:e.elementInfo.defaultColor,fontFamily:e.elementInfo.defaultFontName,writingMode:e.elementInfo.vertical?"vertical-rl":"horizontal-tb"})},[(0,i.Wm)(Po,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i._)("div",{class:"text ProseMirror-static",style:(0,oe.j5)({"--paragraphSpace":`${void 0===e.elementInfo.paragraphSpace?5:e.elementInfo.paragraphSpace}px`}),innerHTML:e.elementInfo.content},null,12,Kc)],4)],4)],4))}});const ed=(0,Vl.Z)(Qc,[["__scopeId","data-v-52a206f2"]]);var td=ed;const ld=["width","height"],ad={key:0},nd=["transform"],od=["d","fill","stroke","stroke-width","stroke-dasharray"],id=["innerHTML"];var sd=(0,i.aZ)({__name:"BaseShapeElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.outline)),{outlineWidth:a,outlineColor:n,strokeDashArray:o}=to(l),r=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:u}=Xn(r),c=(0,i.Fl)((()=>t.elementInfo.flipH)),d=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:p}=Gn(c,d),v=(0,i.Fl)((()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-shape",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({opacity:e.elementInfo.opacity,filter:(0,s.SU)(u)?`drop-shadow(${(0,s.SU)(u)})`:"",transform:(0,s.SU)(p),color:v.value.defaultColor,fontFamily:v.value.defaultFontName})},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?((0,i.wg)(),(0,i.iD)("defs",ad,[(0,i.Wm)(ds,{id:`base-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,color1:e.elementInfo.gradient.color[0],color2:e.elementInfo.gradient.color[1],rotate:e.elementInfo.gradient.rotate},null,8,["id","type","color1","color2","rotate"])])):(0,i.kq)("",!0),(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:e.elementInfo.gradient?`url(#base-gradient-${e.elementInfo.id})`:e.elementInfo.fill,stroke:(0,s.SU)(n),"stroke-width":(0,s.SU)(a),"stroke-dasharray":(0,s.SU)(o)},null,8,od)],8,nd)],8,ld)),(0,i._)("div",{class:(0,oe.C_)(["shape-text",v.value.align])},[(0,i._)("div",{class:"ProseMirror-static",innerHTML:v.value.content},null,8,id)],2)],4)],4)],4))}});const rd=(0,Vl.Z)(sd,[["__scopeId","data-v-b13f8fa8"]]);var ud=rd;const cd=["width","height"],dd=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"];var pd=(0,i.aZ)({__name:"BaseLineElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Xn(l),n=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e})),o=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e})),r=(0,i.Fl)((()=>{if("dashed"!==t.elementInfo.style)return"0 0";const e=t.elementInfo.width;return e<=8?`${5*e} ${2.5*e}`:`${5*e} ${1.5*e}`})),u=(0,i.Fl)((()=>Ce(t.elementInfo)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-line",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({filter:(0,s.SU)(a)?`drop-shadow(${(0,s.SU)(a)})`:""})},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:n.value,height:o.value},[(0,i._)("defs",null,[e.elementInfo.points[0]?((0,i.wg)(),(0,i.j4)(_s,{key:0,id:e.elementInfo.id,position:"start",type:e.elementInfo.points[0],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0),e.elementInfo.points[1]?((0,i.wg)(),(0,i.j4)(_s,{key:1,id:e.elementInfo.id,position:"end",type:e.elementInfo.points[1],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0)]),(0,i._)("path",{d:u.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":r.value,fill:"none","marker-start":e.elementInfo.points[0]?`url(#${e.elementInfo.id}-${e.elementInfo.points[0]}-start)`:"","marker-end":e.elementInfo.points[1]?`url(#${e.elementInfo.id}-${e.elementInfo.points[1]}-end)`:""},null,8,dd)],8,cd))],4)],4))}});const vd=(0,Vl.Z)(pd,[["__scopeId","data-v-443e2f82"]]);var md=vd,hd=(0,i.aZ)({__name:"BaseChartElement",props:{elementInfo:{}},setup(e){const t=(0,i.f3)(Tn)||(0,s.iH)(1),l=(0,i.Fl)((()=>t.value<1)),a=(0,i.Fl)((()=>l.value?1/t.value:1));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-chart",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({backgroundColor:e.elementInfo.fill})},[(0,i.Wm)(Po,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Ds,{width:e.elementInfo.width*a.value,height:e.elementInfo.height*a.value,type:e.elementInfo.chartType,data:e.elementInfo.data,options:e.elementInfo.options,themeColor:e.elementInfo.themeColor,gridColor:e.elementInfo.gridColor,legends:e.elementInfo.data.legends,legend:e.elementInfo.legend||"",style:(0,oe.j5)({zoom:1/a.value})},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend","style"])],4)],4)],4))}});const fd=(0,Vl.Z)(hd,[["__scopeId","data-v-7c03d68d"]]);var gd=fd;const yd=["width"],wd=["rowspan","colspan"],xd=["innerHTML"];var kd=(0,i.aZ)({__name:"StaticTable",props:{data:{},width:{},cellMinHeight:{},colWidths:{},outline:{},theme:{},editable:{type:Boolean,default:!0}},setup(e){const t=e,l=(0,s.iH)([]),a=(0,i.Fl)((()=>l.value.reduce(((e,t)=>e+t))));(0,i.YP)([()=>t.colWidths,()=>t.width],(()=>{l.value=t.colWidths.map((e=>e*t.width))}),{immediate:!0});const o=(0,i.Fl)((()=>t.data)),{hideCells:r}=Os(o),u=(0,i.Fl)((()=>t.theme)),{subThemeColor:c}=Rs(u);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"static-table",style:(0,oe.j5)({width:a.value+"px"})},[(0,i._)("table",{class:(0,oe.C_)({theme:u.value,"row-header":u.value?.rowHeader,"row-footer":u.value?.rowFooter,"col-header":u.value?.colHeader,"col-footer":u.value?.colFooter}),style:(0,oe.j5)(`--themeColor: ${u.value?.color}; --subThemeColor1: ${(0,s.SU)(c)[0]}; --subThemeColor2: ${(0,s.SU)(c)[1]}`)},[(0,i._)("colgroup",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.value,((e,t)=>((0,i.wg)(),(0,i.iD)("col",{span:"1",key:t,width:e},null,8,yd)))),128))]),(0,i._)("tbody",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.data,((t,l)=>((0,i.wg)(),(0,i.iD)("tr",{key:l,style:(0,oe.j5)({height:e.cellMinHeight+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((t,a)=>(0,i.wy)(((0,i.wg)(),(0,i.iD)("td",{class:"cell",style:(0,oe.j5)({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...(0,s.SU)($s)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan},[(0,i._)("div",{class:"cell-text",style:(0,oe.j5)({minHeight:e.cellMinHeight-4+"px"}),innerHTML:(0,s.SU)(Zs)(t.text)},null,12,xd)],12,wd)),[[n.F8,!(0,s.SU)(r).includes(`${l}_${a}`)]]))),128))],4)))),128))])],6)],4))}});const bd=(0,Vl.Z)(kd,[["__scopeId","data-v-5d949d4d"]]);var _d=bd;const Id={class:"element-content"};var Sd=(0,i.aZ)({__name:"BaseTableElement",props:{elementInfo:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-table",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",Id,[(0,i.Wm)(_d,{data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme},null,8,["data","width","cellMinHeight","colWidths","outline","theme"])])],4)],4))}});const Cd=(0,Vl.Z)(Sd,[["__scopeId","data-v-3eff7eba"]]);var Ld=Cd;const Td={class:"element-content"},Ed=["width","height","stroke","stroke-width"],Md=["transform"],Ud=["d"];var Wd=(0,i.aZ)({__name:"BaseLatexElement",props:{elementInfo:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-latex",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",Td,[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{d:e.elementInfo.path},null,8,Ud)],8,Md)],8,Ed))])],4)],4))}});const Dd=(0,Vl.Z)(Wd,[["__scopeId","data-v-1587280d"]]);var Hd=Dd,Fd=(0,i.aZ)({__name:"BaseVideoElement",props:{elementInfo:{}},setup(e){return(e,t)=>{const l=(0,i.up)("IconPlayOne");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-video",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({backgroundImage:e.elementInfo.poster?`url(${e.elementInfo.poster})`:""})},[(0,i.Wm)(l,{class:"icon"})],4)],4)],4)}}});const Ad=(0,Vl.Z)(Fd,[["__scopeId","data-v-09436dde"]]);var $d=Ad;const Zd={class:"element-content"};var Od=(0,i.aZ)({__name:"BaseAudioElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"));return(e,t)=>{const a=(0,i.up)("IconVolumeNotice");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-audio",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",Zd,[(0,i.Wm)(a,{class:"audio-icon",style:(0,oe.j5)({fontSize:l.value,color:e.elementInfo.color})},null,8,["style"])])],4)],4)}}});const Rd=(0,Vl.Z)(Od,[["__scopeId","data-v-5da834d7"]]);var zd=Rd,Pd=(0,i.aZ)({__name:"ThumbnailElement",props:{elementInfo:{},elementIndex:{}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[sa.IMAGE]:Gc,[sa.TEXT]:td,[sa.SHAPE]:ud,[sa.LINE]:md,[sa.CHART]:gd,[sa.TABLE]:Ld,[sa.LATEX]:Hd,[sa.VIDEO]:$d,[sa.AUDIO]:zd};return e[t.elementInfo.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["base-element",`base-element-${e.elementInfo.id}`]),style:(0,oe.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,target:"thumbnail"},null,8,["elementInfo"]))],6))}});const Bd=Pd;var Nd=Bd;const jd={key:1,class:"placeholder"};var Yd=(0,i.aZ)({__name:"index",props:{slide:{},size:{},visible:{type:Boolean,default:!0}},setup(e){const t=e,{viewportRatio:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.slide.background)),{backgroundStyle:n}=yu(a),r=(0,i.Fl)((()=>t.size/oa));return(0,i.JJ)(Tn,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"thumbnail-slide",style:(0,oe.j5)({width:e.size+"px",height:e.size*(0,s.SU)(l)+"px"})},[e.visible?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"elements",style:(0,oe.j5)({width:(0,s.SU)(oa)+"px",height:(0,s.SU)(oa)*(0,s.SU)(l)+"px",transform:`scale(${r.value})`})},[(0,i._)("div",{class:"background",style:(0,oe.j5)((0,s.SU)(n))},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.slide.elements,((e,t)=>((0,i.wg)(),(0,i.j4)(Nd,{key:e.id,elementInfo:e,elementIndex:t+1},null,8,["elementInfo","elementIndex"])))),128))],4)):((0,i.wg)(),(0,i.iD)("div",jd,"加载中 ..."))],4))}});const Vd=(0,Vl.Z)(Yd,[["__scopeId","data-v-43dcaa52"]]);var Jd=Vd;const qd=["onClick"];var Xd=(0,i.aZ)({__name:"Tabs",props:{value:{},tabs:{},card:{type:Boolean,default:!1},tabsStyle:{},tabStyle:{},spaceAround:{type:Boolean,default:!1},spaceBetween:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=t;return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["tabs",{card:e.card,"space-around":e.spaceAround,"space-between":e.spaceBetween}]),style:(0,oe.j5)(e.tabsStyle||{})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.tabs,(t=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["tab",{active:t.key===e.value}]),key:t.key,style:(0,oe.j5)({...e.tabStyle||{},"--color":t.color}),onClick:e=>l("update:value",t.key)},(0,oe.zw)(t.label),15,qd)))),128))],6))}});const Gd=(0,Vl.Z)(Xd,[["__scopeId","data-v-5e3d7626"]]);var Kd=Gd,Qd=(0,i.aZ)({__name:"Button",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{default:"default"},size:{default:"normal"},first:{type:Boolean,default:!1},last:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const l=e,a=t,n=()=>{l.disabled||a("click")};return(e,t)=>((0,i.wg)(),(0,i.iD)("button",{class:(0,oe.C_)(["button",{disabled:e.disabled,checked:!e.disabled&&e.checked,default:!e.disabled&&"default"===e.type,primary:!e.disabled&&"primary"===e.type,checkbox:!e.disabled&&"checkbox"===e.type,radio:!e.disabled&&"radio"===e.type,small:"small"===e.size,first:e.first,last:e.last}]),onClick:t[0]||(t[0]=e=>n())},[(0,i.WI)(e.$slots,"default")],2))}});const ep=(0,Vl.Z)(Qd,[["__scopeId","data-v-52c90330"]]);var tp=ep;const lp={key:0,class:"select-wrap"},ap={class:"selector"},np={class:"icon"},op=["onClick"],ip={class:"selector"},sp={class:"icon"};var rp=(0,i.aZ)({__name:"Select",props:{value:{},options:{},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>l.options.find((e=>e.value===l.value))?.label||l.value)),n=t,o=(0,s.iH)(!1),r=(0,s.iH)(),u=(0,s.iH)(0),c=()=>{r.value&&(u.value=r.value.clientWidth)},d=new ResizeObserver(c);(0,i.bv)((()=>{r.value&&d.observe(r.value)})),(0,i.Ah)((()=>{r.value&&d.unobserve(r.value)}));const p=e=>{e.disabled||(n("update:value",e.value),o.value=!1)};return(e,t)=>{const l=(0,i.up)("IconDown");return e.disabled?((0,i.wg)(),(0,i.iD)("div",lp,[(0,i._)("div",{class:"select disabled",ref_key:"selectRef",ref:r},[(0,i._)("div",ap,(0,oe.zw)(e.value),1),(0,i._)("div",np,[(0,i.WI)(e.$slots,"icon",{},(()=>[(0,i.Wm)(l,{size:14})]))])],512)])):((0,i.wg)(),(0,i.j4)(dn,{key:1,class:"select-wrap",trigger:"click",value:o.value,"onUpdate:value":t[0]||(t[0]=e=>o.value=e),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:(0,i.w5)((()=>[(0,i._)("div",{class:"options",style:(0,oe.j5)({width:u.value+2+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.options,(t=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["option",{disabled:t.disabled,selected:t.value===e.value}]),key:t.value,onClick:e=>p(t)},(0,oe.zw)(t.label),11,op)))),128))],4)])),default:(0,i.w5)((()=>[(0,i._)("div",{class:"select",ref_key:"selectRef",ref:r},[(0,i._)("div",ip,(0,oe.zw)(a.value),1),(0,i._)("div",sp,[(0,i.WI)(e.$slots,"icon",{},(()=>[(0,i.Wm)(l,{size:14})]))])],512)])),_:3},8,["value","contentStyle"]))}}});const up=(0,Vl.Z)(rp,[["__scopeId","data-v-5bf3b141"]]);var cp=up;const dp=e=>((0,i.dD)("data-v-cc39ee16"),e=e(),(0,i.Cn)(),e),pp={class:"link-dialog"},vp={key:2,class:"preview"},mp=dp((()=>(0,i._)("div",null,"预览:",-1))),hp={class:"btns"};var fp=(0,i.aZ)({__name:"LinkDialog",emits:["close"],setup(e,{emit:t}){const l=t,{handleElement:a}=(0,o.Jk)(R()),{slides:n,currentSlide:r}=(0,o.Jk)($()),u=(0,s.iH)("web"),c=(0,s.iH)(""),d=(0,s.iH)(""),p=(0,i.Fl)((()=>n.value.map(((e,t)=>({label:`幻灯片 ${t+1}`,value:e.id,disabled:r.value.id===e.id})))));d.value=n.value.find((e=>e.id!==r.value.id))?.id||"";const v=(0,i.Fl)((()=>d.value&&n.value.find((e=>e.id===d.value))||null)),m=[{key:"web",label:"网页链接"},{key:"slide",label:"幻灯片页面"}],{setLink:h}=Fc();(0,i.bv)((()=>{a.value?.link&&("web"===a.value.link.type?c.value=a.value.link.target:"slide"===a.value.link.type&&(d.value=a.value.link.target),u.value=a.value.link.type)}));const f=()=>{const e={type:u.value,target:"web"===u.value?c.value:d.value};if(a.value){const t=h(a.value,e);t?l("close"):c.value=""}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",pp,[(0,i.Wm)(Kd,{tabs:m,value:u.value,"onUpdate:value":t[0]||(t[0]=e=>u.value=e),tabsStyle:{marginBottom:"20px"}},null,8,["value"]),"web"===u.value?((0,i.wg)(),(0,i.j4)(sn,{key:0,class:"input",value:c.value,"onUpdate:value":t[1]||(t[1]=e=>c.value=e),placeholder:"请输入网页链接地址"},null,8,["value"])):(0,i.kq)("",!0),"slide"===u.value?((0,i.wg)(),(0,i.j4)(cp,{key:1,class:"input",value:d.value,"onUpdate:value":t[2]||(t[2]=e=>d.value=e),options:p.value},null,8,["value","options"])):(0,i.kq)("",!0),"slide"===u.value&&v.value?((0,i.wg)(),(0,i.iD)("div",vp,[mp,(0,i.Wm)(Jd,{class:"thumbnail",slide:v.value,size:500},null,8,["slide"])])):(0,i.kq)("",!0),(0,i._)("div",hp,[(0,i.Wm)(tp,{onClick:t[3]||(t[3]=e=>l("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{type:"primary",onClick:t[4]||(t[4]=e=>f())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])]))}});const gp=(0,Vl.Z)(fp,[["__scopeId","data-v-cc39ee16"]]);var yp=gp,wp=(0,i.aZ)({__name:"Modal",props:{visible:{type:Boolean},width:{default:480},closeButton:{type:Boolean,default:!1},closeOnClickMask:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},contentStyle:{}},emits:["update:visible","closed"],setup(e,{emit:t}){const{IconClose:l}=Zl,a=e,o=(0,s.iH)(),r=t,u=(0,s.iH)(!1),c=(0,i.Fl)((()=>({width:a.width+"px",...a.contentStyle||{}})));(0,i.YP)((()=>a.visible),(()=>{a.visible&&(0,i.Y3)((()=>o.value.focus()))}));const d=()=>{r("update:visible",!1),r("closed")},p=()=>{a.visible&&a.closeOnEsc&&d()},v=()=>{a.closeOnClickMask&&d()};return(e,t)=>((0,i.wg)(),(0,i.j4)(i.lR,{to:"body"},[(0,i.Wm)(n.uT,{name:"modal-fade"},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:"modal",ref_key:"modalRef",ref:o,tabindex:"-1",onKeyup:t[4]||(t[4]=(0,n.D2)((e=>p()),["esc"]))},[(0,i._)("div",{class:"mask",onClick:t[0]||(t[0]=e=>v())}),(0,i.Wm)(n.uT,{name:"modal-zoom",onAfterLeave:t[2]||(t[2]=e=>u.value=!1),onBeforeEnter:t[3]||(t[3]=e=>u.value=!0)},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:"modal-content",style:(0,oe.j5)(c.value)},[e.closeButton?((0,i.wg)(),(0,i.iD)("span",{key:0,class:"close-btn",onClick:t[1]||(t[1]=e=>d())},[(0,i.Wm)((0,s.SU)(l))])):(0,i.kq)("",!0),u.value?(0,i.WI)(e.$slots,"default",{key:1}):(0,i.kq)("",!0)],4),[[n.F8,e.visible]])])),_:3})],544),[[n.F8,e.visible]])])),_:3})]))}});const xp=(0,Vl.Z)(wp,[["__scopeId","data-v-fea8edcc"]]);var kp=xp;const bp={class:"operates"},_p={key:2,class:"drag-mask"};var Ip=(0,i.aZ)({__name:"index",setup(e){const t=R(),{activeElementIdList:l,activeGroupElementId:a,handleElementId:r,hiddenElementIdList:u,editorAreaFocus:c,gridLineSize:d,showRuler:p,creatingElement:v,creatingCustomShape:m,canvasScale:h,textFormatPainter:f}=(0,o.Jk)(t),{currentSlide:g}=(0,o.Jk)($()),{ctrlKeyState:y,spaceKeyState:w}=(0,o.Jk)(q()),x=(0,s.iH)(),k=(0,s.iH)([]),b=(0,s.iH)(!1),_=()=>b.value=!0;(0,i.YP)(r,(()=>{t.setActiveGroupElementId("")}));const I=(0,s.iH)([]),S=()=>{I.value=g.value?JSON.parse(JSON.stringify(g.value.elements)):[]};(0,i.m0)(S);const C=(0,s.iH)(),{dragViewport:L,viewportStyles:T}=Wn(C);Hn(C);const{mouseSelection:E,mouseSelectionVisible:M,mouseSelectionQuadrant:U,updateMouseSelection:W}=Dn(I,x),{dragElement:H}=jn(I,k,h),{dragLineElement:F}=Yn(I),{selectElement:A}=Nn(I,H),{scaleElement:Z,scaleMultiElement:O}=Bn(I,k,h),{rotateElement:z}=An(I,x,h),{moveShapeKeypoint:P}=Vn(I,h),{selectAllElement:B}=xa(),{deleteAllElements:N}=ga(),{pasteElement:j}=wa(),{enterScreeningFromStart:Y}=Ca(),{updateSlideIndex:V}=ha(),{createTextElement:J,createShapeElement:X}=pa();(0,i.bv)((()=>{l.value.length&&(0,i.Y3)((()=>t.setActiveElementIdList([])))}));const G=e=>{l.value.length&&t.setActiveElementIdList([]),w.value?L(e):W(e),c.value||t.setEditorareaFocus(!0),f.value&&t.setTextFormatPainter(null),Un()},K=e=>{if(l.value.length||v.value||m.value)return;if(!x.value)return;const t=x.value.getBoundingClientRect(),a=(e.pageX-t.x)/h.value,n=(e.pageY-t.y)/h.value;J({left:a,top:n,width:200/h.value,height:0})};(0,i.Ah)((()=>{f.value&&t.setTextFormatPainter(null)}));const Q=()=>{c.value&&t.setEditorareaFocus(!1)},{scaleCanvas:ee}=La(),te=(0,D.throttle)(ee,100,{leading:!0,trailing:!1}),le=(0,D.throttle)(V,300,{leading:!0,trailing:!1}),ae=e=>{e.preventDefault(),y.value?e.deltaY>0?te("-"):e.deltaY<0&&te("+"):e.deltaY>0?le(ne.DOWN):e.deltaY<0&&le(ne.UP)},ie=()=>{t.setRulerState(!p.value)},{insertElementFromCreateSelection:se,formatCreateSelection:re}=Jn(x),ue=e=>{const{start:l,end:a,path:n,viewBox:o}=e,i=re({start:l,end:a});if(i){const t={};e.fill&&(t.fill=e.fill),e.outline&&(t.outline=e.outline),X(i,{path:n,viewBox:o},t)}t.setCreatingCustomShapeState(!1)},ce=()=>[{text:"粘贴",subText:"Ctrl + V",handler:j},{text:"全选",subText:"Ctrl + A",handler:B},{text:"标尺",subText:p.value?"√":"",handler:ie},{text:"网格线",handler:()=>t.setGridLineSize(d.value?0:50),children:[{text:"无",subText:0===d.value?"√":"",handler:()=>t.setGridLineSize(0)},{text:"小",subText:25===d.value?"√":"",handler:()=>t.setGridLineSize(25)},{text:"中",subText:50===d.value?"√":"",handler:()=>t.setGridLineSize(50)},{text:"大",subText:100===d.value?"√":"",handler:()=>t.setGridLineSize(100)}]},{text:"重置当前页",handler:N},{divider:!0},{text:"幻灯片放映",subText:"F5",handler:Y}];return(0,i.JJ)(Tn,h),(e,t)=>{const o=(0,i.Q2)("contextmenu"),c=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"canvas",ref_key:"canvasRef",ref:C,onWheel:t[4]||(t[4]=e=>ae(e)),onMousedown:t[5]||(t[5]=e=>G(e)),onDblclick:t[6]||(t[6]=e=>K(e))},[(0,s.SU)(v)?((0,i.wg)(),(0,i.j4)(Du,{key:0,onCreated:t[0]||(t[0]=e=>(0,s.SU)(se)(e))})):(0,i.kq)("",!0),(0,s.SU)(m)?((0,i.wg)(),(0,i.j4)(Zu,{key:1,onCreated:t[1]||(t[1]=e=>ue(e))})):(0,i.kq)("",!0),(0,i._)("div",{class:"viewport-wrapper",style:(0,oe.j5)({width:(0,s.SU)(T).width*(0,s.SU)(h)+"px",height:(0,s.SU)(T).height*(0,s.SU)(h)+"px",left:(0,s.SU)(T).left+"px",top:(0,s.SU)(T).top+"px"})},[(0,i._)("div",bp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(k.value,((e,t)=>((0,i.wg)(),(0,i.j4)(Iu,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:(0,s.SU)(h)},null,8,["type","axis","length","canvasScale"])))),128)),(0,s.SU)(l).length>1?((0,i.wg)(),(0,i.j4)(Ju,{key:0,elementList:I.value,scaleMultiElement:(0,s.SU)(O)},null,8,["elementList","scaleMultiElement"])):(0,i.kq)("",!0),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(I.value,(e=>(0,i.wy)(((0,i.wg)(),(0,i.j4)(Vc,{key:e.id,elementInfo:e,isSelected:(0,s.SU)(l).includes(e.id),isActive:(0,s.SU)(r)===e.id,isActiveGroupElement:(0,s.SU)(a)===e.id,isMultiSelect:(0,s.SU)(l).length>1,rotateElement:(0,s.SU)(z),scaleElement:(0,s.SU)(Z),openLinkDialog:_,dragLineElement:(0,s.SU)(F),moveShapeKeypoint:(0,s.SU)(P)},null,8,["elementInfo","isSelected","isActive","isActiveGroupElement","isMultiSelect","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])),[[n.F8,!(0,s.SU)(u).includes(e.id)]]))),128)),(0,i.Wm)(ku)]),(0,i._)("div",{class:"viewport",ref_key:"viewportRef",ref:x,style:(0,oe.j5)({transform:`scale(${(0,s.SU)(h)})`})},[(0,s.SU)(M)?((0,i.wg)(),(0,i.j4)(pu,{key:0,top:(0,s.SU)(E).top,left:(0,s.SU)(E).left,width:(0,s.SU)(E).width,height:(0,s.SU)(E).height,quadrant:(0,s.SU)(U)},null,8,["top","left","width","height","quadrant"])):(0,i.kq)("",!0),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(I.value,((e,t)=>(0,i.wy)(((0,i.wg)(),(0,i.j4)(uu,{key:e.id,elementInfo:e,elementIndex:t+1,isMultiSelect:(0,s.SU)(l).length>1,selectElement:(0,s.SU)(A),openLinkDialog:_},null,8,["elementInfo","elementIndex","isMultiSelect","selectElement"])),[[n.F8,!(0,s.SU)(u).includes(e.id)]]))),128))],4)],4),(0,s.SU)(w)?((0,i.wg)(),(0,i.iD)("div",_p)):(0,i.kq)("",!0),(0,s.SU)(p)?((0,i.wg)(),(0,i.j4)(Tu,{key:3,viewportStyles:(0,s.SU)(T)},null,8,["viewportStyles"])):(0,i.kq)("",!0),(0,i.Wm)(kp,{visible:b.value,"onUpdate:visible":t[3]||(t[3]=e=>b.value=e),width:540},{default:(0,i.w5)((()=>[(0,i.Wm)(yp,{onClose:t[2]||(t[2]=e=>b.value=!1)})])),_:1},8,["visible"])],32)),[[o,ce],[c,Q]])}}});const Sp=(0,Vl.Z)(Ip,[["__scopeId","data-v-5294a048"]]);var Cp=Sp;const Lp={class:"shape-item-thumbnail"},Tp={class:"shape-content"},Ep={overflow:"visible",width:"18",height:"18"},Mp=["transform"],Up=["fill","stroke","d"];var Wp=(0,i.aZ)({__name:"ShapeItemThumbnail",props:{shape:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Lp,[(0,i._)("div",Tp,[((0,i.wg)(),(0,i.iD)("svg",Ep,[(0,i._)("g",{transform:`scale(${18/e.shape.viewBox[0]}, ${18/e.shape.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{class:(0,oe.C_)(["shape-path",{outlined:e.shape.outlined}]),"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:e.shape.outlined?"#999":"transparent",stroke:e.shape.outlined?"transparent":"#999","stroke-width":"2",d:e.shape.path},null,10,Up)],8,Mp)]))])]))}});const Dp=(0,Vl.Z)(Wp,[["__scopeId","data-v-8603ad34"]]);var Hp=Dp;const Fp={class:"shape-pool"},Ap={class:"category-name"},$p={class:"shape-list"};var Zp=(0,i.aZ)({__name:"ShapePool",emits:["select"],setup(e,{emit:t}){const l=t,a=e=>{l("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Fp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ua),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",Ap,(0,oe.zw)(e.type),1),(0,i._)("div",$p,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,t)=>((0,i.wg)(),(0,i.j4)(Hp,{class:"shape-item",key:t,shape:e,onClick:t=>a(e)},null,8,["shape","onClick"])))),128))])])))),128))]))}});const Op=(0,Vl.Z)(Zp,[["__scopeId","data-v-8b994b42"]]);var Rp=Op;const zp=[{type:"直线",children:[{path:"M 0 0 L 20 20",style:"solid",points:["",""]},{path:"M 0 0 L 20 20",style:"dashed",points:["",""]},{path:"M 0 0 L 20 20",style:"solid",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"dashed",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"solid",points:["","dot"]}]},{type:"折线、曲线",children:[{path:"M 0 0 L 0 20 L 20 20",style:"solid",points:["","arrow"],isBroken:!0},{path:"M 0 0 Q 0 20 20 20",style:"solid",points:["","arrow"],isCurve:!0},{path:"M 0 0 C 20 0 0 20 20 20",style:"solid",points:["","arrow"],isCubic:!0}]}],Pp={class:"line-pool"},Bp={class:"category-name"},Np={class:"line-list"},jp=["onClick"],Yp={overflow:"visible",width:"20",height:"20"},Vp=["d","stroke-dasharray","marker-start","marker-end"];var Jp=(0,i.aZ)({__name:"LinePool",emits:["select"],setup(e,{emit:t}){const l=t,a=e=>{l("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Pp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(zp),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",Bp,(0,oe.zw)(e.type),1),(0,i._)("div",Np,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"line-item",key:l},[(0,i._)("div",{class:"line-content",onClick:t=>a(e)},[((0,i.wg)(),(0,i.iD)("svg",Yp,[(0,i._)("defs",null,[e.points[0]?((0,i.wg)(),(0,i.j4)(_s,{key:0,class:"line-marker",id:`preset-line-${t}-${l}`,position:"start",type:e.points[0],color:"currentColor",baseSize:2},null,8,["id","type"])):(0,i.kq)("",!0),e.points[1]?((0,i.wg)(),(0,i.j4)(_s,{key:1,class:"line-marker",id:`preset-line-${t}-${l}`,position:"end",type:e.points[1],color:"currentColor",baseSize:2},null,8,["id","type"])):(0,i.kq)("",!0)]),(0,i._)("path",{class:"line-path",d:e.path,stroke:"currentColor",fill:"none","stroke-width":"2","stroke-dasharray":"solid"===e.style?"0, 0":"4, 1","marker-start":e.points[0]?`url(#preset-line-${t}-${l}-${e.points[0]}-start)`:"","marker-end":e.points[1]?`url(#preset-line-${t}-${l}-${e.points[1]}-end)`:""},null,8,Vp)]))],8,jp)])))),128))])])))),128))]))}});const qp=(0,Vl.Z)(Jp,[["__scopeId","data-v-554824b6"]]);var Xp=qp;const Gp={class:"chart-pool"},Kp=["onClick"];var Qp=(0,i.aZ)({__name:"ChartPool",emits:["select"],setup(e,{emit:t}){const l=t,a=["bar","horizontalBar","line","area","scatter","pie","ring"],n=e=>{l("select",e)};return(e,t)=>{const l=(0,i.up)("IconChartLine"),o=(0,i.up)("IconChartHistogram"),s=(0,i.up)("IconChartPie"),r=(0,i.up)("IconChartHistogramOne"),u=(0,i.up)("IconChartLineArea"),c=(0,i.up)("IconChartRing"),d=(0,i.up)("IconChartScatter");return(0,i.wg)(),(0,i.iD)("ul",Gp,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(a,((e,t)=>(0,i._)("li",{class:"chart-item",key:t},[(0,i._)("div",{class:"chart-content",onClick:t=>n(e)},["line"===e?((0,i.wg)(),(0,i.j4)(l,{key:0,size:"24"})):"bar"===e?((0,i.wg)(),(0,i.j4)(o,{key:1,size:"24"})):"pie"===e?((0,i.wg)(),(0,i.j4)(s,{key:2,size:"24"})):"horizontalBar"===e?((0,i.wg)(),(0,i.j4)(r,{key:3,size:"24"})):"area"===e?((0,i.wg)(),(0,i.j4)(u,{key:4,size:"24"})):"ring"===e?((0,i.wg)(),(0,i.j4)(c,{key:5,size:"24"})):"scatter"===e?((0,i.wg)(),(0,i.j4)(d,{key:6,size:"24"})):(0,i.kq)("",!0)],8,Kp)]))),64))])}}});const ev=(0,Vl.Z)(Qp,[["__scopeId","data-v-398f5699"]]);var tv=ev;const lv=e=>((0,i.dD)("data-v-268948c2"),e=e(),(0,i.Cn)(),e),av={class:"prefix"},nv={class:"input-wrap"},ov=["disabled","placeholder"],iv={class:"handlers"},sv=lv((()=>(0,i._)("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[(0,i._)("path",{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"})],-1))),rv=[sv],uv=lv((()=>(0,i._)("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[(0,i._)("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})],-1))),cv=[uv],dv={class:"suffix"};var pv=(0,i.aZ)({__name:"NumberInput",props:{value:{},disabled:{type:Boolean,default:!1},placeholder:{default:""},min:{default:0},max:{default:1/0},step:{default:1}},emits:["update:value","input","change","blur","focus","enter"],setup(e,{emit:t}){const l=e,a=t,o=(0,s.iH)(0),r=(0,s.iH)(!1);(0,i.YP)((()=>l.value),(()=>{l.value!==o.value&&(o.value=l.value)}),{immediate:!0}),(0,i.YP)(o,(()=>{let e=+o.value;isNaN(e)?e=l.min:e>l.max?e=l.max:e{r.value=!1,a("blur",e)},c=e=>{r.value=!0,a("focus",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["number-input",{disabled:e.disabled,focused:r.value}])},[(0,i._)("span",av,[(0,i.WI)(e.$slots,"prefix")]),(0,i._)("div",nv,[(0,i.wy)((0,i._)("input",{type:"text",disabled:e.disabled,"onUpdate:modelValue":t[0]||(t[0]=e=>o.value=e),placeholder:e.placeholder,onInput:t[1]||(t[1]=e=>a("input",e)),onFocus:t[2]||(t[2]=e=>c(e)),onBlur:t[3]||(t[3]=e=>u(e)),onChange:t[4]||(t[4]=e=>a("change",e)),onKeydown:t[5]||(t[5]=(0,n.D2)((e=>a("enter",e)),["enter"]))},null,40,ov),[[n.nr,o.value]]),(0,i._)("div",iv,[(0,i._)("span",{class:"handler",onClick:t[6]||(t[6]=t=>o.value+=e.step)},rv),(0,i._)("span",{class:"handler",onClick:t[7]||(t[7]=t=>o.value-=e.step)},cv)])]),(0,i._)("span",dv,[(0,i.WI)(e.$slots,"suffix")])],2))}});const vv=(0,Vl.Z)(pv,[["__scopeId","data-v-268948c2"]]);var mv=vv;const hv=e=>((0,i.dD)("data-v-372c6730"),e=e(),(0,i.Cn)(),e),fv={class:"table-generator"},gv={class:"title"},yv={class:"lef"},wv=["onMouseenter"],xv={key:1,class:"custom"},kv={class:"row"},bv=hv((()=>(0,i._)("div",{class:"label",style:{width:"25%"}},"行数:",-1))),_v={class:"row"},Iv=hv((()=>(0,i._)("div",{class:"label",style:{width:"25%"}},"列数:",-1))),Sv={class:"btns"};var Cv=(0,i.aZ)({__name:"TableGenerator",emits:["insert","close"],setup(e,{emit:t}){const l=t,a=(0,s.iH)([]),n=(0,s.iH)(3),o=(0,s.iH)(3),r=(0,s.iH)(!1),u=()=>{if(!a.value.length)return;const[e,t]=a.value;l("insert",{row:e,col:t})},c=()=>n.value<1||n.value>20||o.value<1||o.value>20?ta.warning("行数/列数必须在0~20之间!"):(l("insert",{row:n.value,col:o.value}),void(r.value=!1)),d=()=>{l("close"),r.value=!1};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",fv,[(0,i._)("div",gv,[(0,i._)("div",yv,"表格 "+(0,oe.zw)(a.value.length?`${a.value[0]} x ${a.value[1]}`:""),1),(0,i._)("div",{class:"right",onClick:t[0]||(t[0]=e=>r.value=!r.value)},(0,oe.zw)(r.value?"返回":"自定义"),1)]),r.value?((0,i.wg)(),(0,i.iD)("div",xv,[(0,i._)("div",kv,[bv,(0,i.Wm)(mv,{min:1,max:20,value:n.value,"onUpdate:value":t[3]||(t[3]=e=>n.value=e),style:{width:"75%"}},null,8,["value"])]),(0,i._)("div",_v,[Iv,(0,i.Wm)(mv,{min:1,max:20,value:o.value,"onUpdate:value":t[4]||(t[4]=e=>o.value=e),style:{width:"75%"}},null,8,["value"])]),(0,i._)("div",Sv,[(0,i.Wm)(tp,{class:"btn",onClick:t[5]||(t[5]=e=>d())},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{class:"btn",type:"primary",onClick:t[6]||(t[6]=e=>c())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])):((0,i.wg)(),(0,i.iD)("table",{key:0,onMouseleave:t[1]||(t[1]=e=>a.value=[]),onClick:t[2]||(t[2]=e=>u())},[(0,i._)("tbody",null,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(10,(e=>(0,i._)("tr",{key:e},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(10,(t=>(0,i._)("td",{onMouseenter:l=>a.value=[e,t],key:t},[(0,i._)("div",{class:(0,oe.C_)(["cell",{active:a.value.length&&e<=a.value[0]&&t<=a.value[1]}])},null,2)],40,wv))),64))]))),64))])],32))]))}});const Lv=(0,Vl.Z)(Cv,[["__scopeId","data-v-372c6730"]]);var Tv=Lv;const Ev={class:"media-input"},Mv={class:"btns"},Uv={class:"btns"};var Wv=(0,i.aZ)({__name:"MediaInput",emits:["insertVideo","insertAudio","close"],setup(e,{emit:t}){const l=t,a=(0,s.iH)("video"),n=(0,s.iH)("https://mazwai.com/videvo_files/video/free/2019-01/small_watermarked/181004_04_Dolphins-Whale_06_preview.webm"),o=(0,s.iH)("https://freesound.org/data/previews/614/614107_11861866-lq.mp3"),r=[{key:"video",label:"视频"},{key:"audio",label:"音频"}],u=()=>{if(!n.value)return ta.error("请先输入正确的视频地址");l("insertVideo",n.value)},c=()=>{if(!o.value)return ta.error("请先输入正确的音频地址");l("insertAudio",o.value)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ev,[(0,i.Wm)(Kd,{tabs:r,value:a.value,"onUpdate:value":t[0]||(t[0]=e=>a.value=e),tabsStyle:{marginBottom:"15px"}},null,8,["value"]),"video"===a.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i.Wm)(sn,{value:n.value,"onUpdate:value":t[1]||(t[1]=e=>n.value=e),placeholder:"请输入视频地址,e.g. https://xxx.mp4"},null,8,["value"]),(0,i._)("div",Mv,[(0,i.Wm)(tp,{onClick:t[2]||(t[2]=e=>l("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{type:"primary",onClick:t[3]||(t[3]=e=>u())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])],64)):(0,i.kq)("",!0),"audio"===a.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(sn,{value:o.value,"onUpdate:value":t[4]||(t[4]=e=>o.value=e),placeholder:"请输入音频地址,e.g. https://xxx.mp3"},null,8,["value"]),(0,i._)("div",Uv,[(0,i.Wm)(tp,{onClick:t[5]||(t[5]=e=>l("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{type:"primary",onClick:t[6]||(t[6]=e=>c())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])],64)):(0,i.kq)("",!0)]))}});const Dv=(0,Vl.Z)(Wv,[["__scopeId","data-v-35a1214c"]]);var Hv=Dv,Fv=l(3576);Fv.kh.SUB_SUP_SCALE=.5;const Av=[{label:"高斯公式",latex:"\\int\\int\\int _ { \\Omega } \\left( \\frac { \\partial {P} } { \\partial {x} } + \\frac { \\partial {Q} } { \\partial {y} } + \\frac { \\partial {R} }{ \\partial {z} } \\right) \\mathrm { d } V = \\oint _ { \\partial \\Omega } ( P \\cos \\alpha + Q \\cos \\beta + R \\cos \\gamma ) \\mathrm{ d} S"},{label:"傅里叶级数",latex:"f(x) = \\frac {a_0} 2 + \\sum_{n = 1}^\\infty {({a_n}\\cos {nx} + {b_n}\\sin {nx})}"},{label:"泰勒展开式",latex:"e ^ { x } = 1 + \\frac { x } { 1 ! } + \\frac { x ^ { 2 } } { 2 ! } + \\frac { x ^ { 3 } } { 3 ! } + ... , \\quad - \\infty < x < \\infty"},{label:"定积分",latex:"\\lim_ { n \\rightarrow + \\infty } \\sum _ { i = 1 } ^ { n } f \\left[ a + \\frac { i } { n } ( b - a ) \\right] \\frac { b - a } { n } = \\int _ { a } ^ { b } f ( x ) dx"},{label:"三角恒等式1",latex:"\\sin \\alpha \\pm \\sin \\beta = 2 \\sin \\frac { 1 } { 2 } ( \\alpha \\pm \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha \\mp \\beta )"},{label:"三角恒等式2",latex:"\\cos \\alpha + \\cos \\beta = 2 \\cos \\frac { 1 } { 2 } ( \\alpha + \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha - \\beta )"},{label:"和的展开式",latex:"( 1 + x ) ^ { n } = 1 + \\frac { n x } { 1 ! } + \\frac { n ( n - 1 ) x ^ { 2 } } { 2 ! } + ..."},{label:"欧拉公式",latex:" e^{ix} = \\cos {x} + i\\sin {x}"},{label:"贝努利方程",latex:"\\frac {dy} {dx} + P(x)y = Q(x) y^n ({n} \\not= {0,1})"},{label:"全微分方程",latex:"du(x,y) = P(x,y)dx + Q(x,y)dy = 0"},{label:"非齐次方程",latex:"y = (\\int Q(x) e^{\\int {P(x)dx}}dx + C)e^{-\\int {P(x)dx}}"},{label:"柯西中值定理",latex:"\\frac{{f(b) - f(a)}}{{F(b) - F(a)}} = \\frac{{f'(\\xi )}}{{F'(\\xi )}}"},{label:"拉格朗日中值定理",latex:"f(b) - f(a) = f'(\\xi )(b - a)"},{label:"导数公式",latex:"(\\arcsin x)' = \\frac{1}{{\\sqrt {1 - x^2} }}"},{label:"三角函数积分",latex:"\\int {tgxdx = - \\ln \\left| {\\cos x} \\right| + C}"},{label:"二次曲面",latex:"\\frac{{{x^2}}}{{{a^2}}} + \\frac{{{y^2}}}{{{b^2}}} - \\frac{{{z^2}}}{{{c^2}}} = 1"},{label:"二阶微分",latex:"\\frac {{d^2}y} {dx^2} + P(x) \\frac {dy} {dx} + Q(x)y = f(x)"},{label:"方向导数",latex:"\\frac{{\\partial f}}{{\\partial l}} = \\frac{{\\partial f}}{{\\partial x}}\\cos \\phi + \\frac{{\\partial f}}{{\\partial y}}\\sin \\phi"}],$v=[{type:"operators",label:"数学",children:[{latex:"\\cdot"},{latex:"\\pm"},{latex:"\\mp"},{latex:"+"},{latex:"-"},{latex:"\\times"},{latex:"\\div"},{latex:"<"},{latex:">"},{latex:"="},{latex:"\\neq\\ne"},{latex:"\\leqq"},{latex:"\\geqq"},{latex:"\\leq"},{latex:"\\geq"},{latex:"\\propto"},{latex:"\\sim"},{latex:"\\equiv"},{latex:"\\dagger"},{latex:"\\ddagger"},{latex:"\\ell"},{latex:"\\#"},{latex:"\\$"},{latex:"\\&"},{latex:"\\%"},{latex:"\\langle\\rangle"},{latex:"()"},{latex:"[]"},{latex:"\\{\\}"},{latex:"||"},{latex:"\\|"},{latex:"\\exists"},{latex:"\\in"},{latex:"\\subset"},{latex:"\\supset"},{latex:"\\cup"},{latex:"\\cap"},{latex:"\\infty"},{latex:"\\partial"},{latex:"\\nabla"},{latex:"\\aleph"},{latex:"\\wp"},{latex:"\\therefore"},{latex:"\\mid"},{latex:"\\sum"},{latex:"\\prod"},{latex:"\\bigoplus"},{latex:"\\bigodot"},{latex:"\\int"},{latex:"\\oint"},{latex:"\\oplus"},{latex:"\\odot"},{latex:"\\perp"},{latex:"\\angle"},{latex:"\\triangle"},{latex:"\\Box"},{latex:"\\rightarrow"},{latex:"\\to"},{latex:"\\leftarrow"},{latex:"\\gets"},{latex:"\\circ"},{latex:"\\bigcirc"},{latex:"\\bullet"},{latex:"\\star"},{latex:"\\diamond"},{latex:"\\ast"},{latex:","},{latex:"."},{latex:";"},{latex:"!"}]},{type:"group",label:"组合",children:[{latex:"\\frac{a}{b}"},{latex:"\\frac{dx}{dx}"},{latex:"\\frac{\\partial a}{\\partial b}"},{latex:"\\sqrt{x}"},{latex:"\\sqrt[n]{x}"},{latex:"x^{n}"},{latex:"x_{n}"},{latex:"x_a^b"},{latex:"\\int_{a}^{b}"},{latex:"\\oint_a^b"},{latex:"\\lim_{a \\rightarrow b}"},{latex:"\\prod_a^b"},{latex:"\\sum_a^b"},{latex:"\\left(\\begin{array}a \\\\ b\\end{array}\\right)"},{latex:"\\begin{bmatrix}a & b \\\\ c & d \\end{bmatrix}"},{latex:"\\begin{cases}a & x = 0 \\\\ b & x > 0\\end{cases}"},{latex:"\\hat{a}"},{latex:"\\breve{a}"},{latex:"\\acute{a}"},{latex:"\\grave{a}"},{latex:"\\tilde{a}"},{latex:"\\bar{a}"},{latex:"\\vec{a}"},{latex:"\\underline{a}"},{latex:"\\overline{a}"},{latex:"\\widehat{ab}"},{latex:"\\overleftarrow{ab}"},{latex:"\\overrightarrow{ab}"}]},{type:"verbatim",label:"函数",children:[{latex:"\\log"},{latex:"\\ln"},{latex:"\\exp"},{latex:"\\mod"},{latex:"\\lim"},{latex:"\\sin"},{latex:"\\cos"},{latex:"\\tan"},{latex:"\\csc"},{latex:"\\sec"},{latex:"\\cot"},{latex:"\\sinh"},{latex:"\\cosh"},{latex:"\\tanh"},{latex:"\\csch"},{latex:"\\sech"},{latex:"\\coth"},{latex:"\\arcsin"},{latex:"\\arccos"},{latex:"\\arctan"},{latex:"\\arccsc"},{latex:"\\arcsec"},{latex:"\\arccot"}]},{type:"greek",label:"希腊字母",children:[{latex:"\\alpha"},{latex:"\\beta"},{latex:"\\gamma"},{latex:"\\delta"},{latex:"\\varepsilon"},{latex:"\\zeta"},{latex:"\\eta"},{latex:"\\vartheta"},{latex:"\\iota"},{latex:"\\kappa"},{latex:"\\lambda"},{latex:"\\mu"},{latex:"\\nu"},{latex:"\\xi"},{latex:"\\omicron"},{latex:"\\pi"},{latex:"\\rho"},{latex:"\\sigma"},{latex:"\\tau"},{latex:"\\upsilon"},{latex:"\\varphi"},{latex:"\\chi"},{latex:"\\psi"},{latex:"\\omega"},{latex:"\\epsilon"},{latex:"\\theta"},{latex:"\\phi"},{latex:"\\varsigma"},{latex:"\\Alpha"},{latex:"\\Beta"},{latex:"\\Gamma"},{latex:"\\Delta"},{latex:"\\Epsilon"},{latex:"\\Zeta"},{latex:"\\Eta"},{latex:"\\Theta"},{latex:"\\Iota"},{latex:"\\Kappa"},{latex:"\\Lambda"},{latex:"\\Mu"},{latex:"\\Nu"},{latex:"\\Xi"},{latex:"\\Omicron"},{latex:"\\Pi"},{latex:"\\Rho"},{latex:"\\Sigma"},{latex:"\\Tau"},{latex:"\\Upsilon"},{latex:"\\Phi"},{latex:"\\Chi"},{latex:"\\Psi"},{latex:"\\Omega"}]}],Zv=["width","height"],Ov=["transform"],Rv=["d"];var zv=(0,i.aZ)({__name:"FormulaContent",props:{latex:{},width:{},height:{}},setup(e){const t=e,l=(0,s.iH)({x:0,y:0,w:0,h:0}),a=(0,s.iH)("");(0,i.YP)((()=>t.latex),(()=>{const e=new Fv._q(t.latex);a.value=e.pathd({}),l.value=e.box({})}),{immediate:!0});const n=(0,i.Fl)((()=>{const e=l.value.w+32,a=l.value.h+32;return e>t.width||a>t.height?e/a>t.width/t.height?t.width/e:t.height/a:1}));return(e,t)=>((0,i.wg)(),(0,i.iD)("svg",{class:"formula-content",overflow:"visible",width:l.value.w+32,height:l.value.h+32,stroke:"#000","stroke-width":"1",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[(0,i._)("g",{transform:`scale(${n.value}, ${n.value}) translate(0,0) matrix(1,0,0,1,0,0)`,"transform-origin":"0 50%"},[(0,i._)("path",{d:a.value},null,8,Rv)],8,Ov)],8,Zv))}});const Pv=(0,Vl.Z)(zv,[["__scopeId","data-v-567417d3"]]);var Bv=Pv;const Nv=["innerHTML"];var jv=(0,i.aZ)({__name:"SymbolContent",props:{latex:{}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e=new Fv._q(t.latex);return e.svg({SCALE_X:10,SCALE_Y:10})}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-content",innerHTML:l.value},null,8,Nv))}});const Yv=jv;var Vv=Yv;const Jv=["disabled","value","rows","placeholder"];var qv=(0,i.aZ)({__name:"TextArea",props:{value:{},rows:{default:4},disabled:{type:Boolean,default:!1},resizable:{type:Boolean,default:!1},placeholder:{default:""}},emits:["update:value"],setup(e,{expose:t,emit:l}){const a=l,n=e=>{a("update:value",e.target.value)},o=(0,s.iH)(),r=()=>{o.value&&o.value.focus()};return t({focus:r}),(e,t)=>((0,i.wg)(),(0,i.iD)("textarea",{class:(0,oe.C_)(["textarea",{disabled:e.disabled,resizable:e.resizable}]),ref_key:"textareaRef",ref:o,disabled:e.disabled,value:e.value,rows:e.rows,placeholder:e.placeholder,onInput:t[0]||(t[0]=e=>n(e))},null,42,Jv))}});const Xv=(0,Vl.Z)(qv,[["__scopeId","data-v-65d72404"]]);var Gv=Xv;const Kv={class:"latex-editor"},Qv={class:"container"},em={class:"left"},tm={class:"input-area"},lm={class:"preview"},am={key:0,class:"placeholder"},nm={key:1,class:"preview-content"},om={class:"right"},im={class:"content"},sm={key:0,class:"symbol"},rm={class:"symbol-pool"},um=["onClick"],cm={key:1,class:"formula"},dm={class:"formula-title"},pm=["onClick"],vm={class:"footer"};var mm=(0,i.aZ)({__name:"index",props:{value:{default:""}},emits:["update","close"],setup(e,{emit:t}){const l=[{label:"常用符号",key:"symbol"},{label:"预置公式",key:"formula"}],a=e,n=t,o=Av,r=$v.map((e=>({label:e.label,key:e.type}))),u=(0,s.iH)(""),c=(0,s.iH)("symbol"),d=(0,s.iH)(),p=(0,s.iH)($v[0].type),v=(0,i.Fl)((()=>{const e=$v.find((e=>e.type===p.value));return e?.children||[]}));(0,i.bv)((()=>{a.value&&(u.value=a.value)}));const m=()=>{if(!u.value)return ta.error("公式不能为空");const e=new Fv._q(u.value),t=e.pathd({}),l=e.box({});n("update",{latex:u.value,path:t,w:l.w+32,h:l.h+32})},h=e=>{d.value&&(d.value.focus(),document.execCommand("insertText",!1,e))};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Kv,[(0,i._)("div",Qv,[(0,i._)("div",em,[(0,i._)("div",tm,[(0,i.Wm)(Gv,{value:u.value,"onUpdate:value":t[0]||(t[0]=e=>u.value=e),placeholder:"输入 LaTeX 公式",ref_key:"textAreaRef",ref:d},null,8,["value"])]),(0,i._)("div",lm,[u.value?((0,i.wg)(),(0,i.iD)("div",nm,[(0,i.Wm)(Bv,{width:518,height:138,latex:u.value},null,8,["latex"])])):((0,i.wg)(),(0,i.iD)("div",am,"公式预览"))])]),(0,i._)("div",om,[(0,i.Wm)(Kd,{tabs:l,value:c.value,"onUpdate:value":t[1]||(t[1]=e=>c.value=e),card:""},null,8,["value"]),(0,i._)("div",im,["symbol"===c.value?((0,i.wg)(),(0,i.iD)("div",sm,[(0,i.Wm)(Kd,{tabs:(0,s.SU)(r),value:p.value,"onUpdate:value":t[2]||(t[2]=e=>p.value=e),spaceBetween:"",tabsStyle:{margin:"10px 10px 0"}},null,8,["tabs","value"]),(0,i._)("div",rm,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(v.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-item",key:e.latex,onClick:t=>h(e.latex)},[(0,i.Wm)(Vv,{latex:e.latex},null,8,["latex"])],8,um)))),128))])])):((0,i.wg)(),(0,i.iD)("div",cm,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(o),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"formula-item",key:e.label},[(0,i._)("div",dm,(0,oe.zw)(e.label),1),(0,i._)("div",{class:"formula-item-content",onClick:t=>u.value=e.latex},[(0,i.Wm)(Bv,{width:236,height:60,latex:e.latex},null,8,["latex"])],8,pm)])))),128))]))])])]),(0,i._)("div",vm,[(0,i.Wm)(tp,{class:"btn",onClick:t[3]||(t[3]=e=>n("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{class:"btn",type:"primary",onClick:t[4]||(t[4]=e=>m())},{default:(0,i.w5)((()=>[(0,i.Uk)("确定")])),_:1})])]))}});const hm=(0,Vl.Z)(mm,[["__scopeId","data-v-49a14edf"]]);var fm=hm;const gm={class:"canvas-tool"},ym={class:"left-handler"},wm={class:"add-element-handler"},xm={class:"handler-item group-btn"},km={class:"right-handler"},bm={class:"text"};var _m=(0,i.aZ)({__name:"index",setup(e){const t=R(),{creatingElement:l,creatingCustomShape:a,showSelectPanel:n,showSearchPanel:r}=(0,o.Jk)(t),{canUndo:u,canRedo:c}=(0,o.Jk)(J()),{redo:d,undo:p}=da(),{scaleCanvas:v,setCanvasScalePercentage:m,resetCanvas:h,canvasScalePercentage:f}=La(),g=[200,150,100,80,50],y=(0,s.iH)(!1),w=e=>{m(e),y.value=!1},{createImageElement:x,createChartElement:k,createTableElement:b,createLatexElement:_,createVideoElement:I,createAudioElement:S}=pa(),C=e=>{const t=e[0];t&&na(t).then((e=>x(e)))},L=(0,s.iH)(!1),T=(0,s.iH)(!1),E=(0,s.iH)(!1),M=(0,s.iH)(!1),U=(0,s.iH)(!1),W=(0,s.iH)(!1),D=(0,s.iH)(!1),H=(e=!1)=>{t.setCreatingElement({type:"text",vertical:e})},F=e=>{"任意多边形"===e.title?t.setCreatingCustomShapeState(!0):t.setCreatingElement({type:"shape",data:e}),L.value=!1},A=e=>{t.setCreatingElement({type:"line",data:e}),T.value=!1},$=()=>{t.setSelectPanelState(!n.value)},Z=()=>{t.setSearchPanelState(!r.value)};return(e,t)=>{const o=(0,i.up)("IconBack"),m=(0,i.up)("IconNext"),x=(0,i.up)("IconMoveOne"),O=(0,i.up)("IconSearch"),R=(0,i.up)("IconFontSize"),z=(0,i.up)("IconTextRotationNone"),P=(0,i.up)("IconTextRotationDown"),B=(0,i.up)("IconDown"),N=(0,i.up)("IconPicture"),j=(0,i.up)("IconGraphicDesign"),Y=(0,i.up)("IconConnection"),V=(0,i.up)("IconChartProportion"),J=(0,i.up)("IconInsertTable"),q=(0,i.up)("IconFormula"),X=(0,i.up)("IconVideoTwo"),G=(0,i.up)("IconMinus"),K=(0,i.up)("IconPlus"),Q=(0,i.up)("IconFullScreen"),ee=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",gm,[(0,i._)("div",ym,[(0,i.wy)((0,i.Wm)(o,{class:(0,oe.C_)(["handler-item",{disable:!(0,s.SU)(u)}]),onClick:t[0]||(t[0]=e=>(0,s.SU)(p)())},null,8,["class"]),[[ee,"撤销"]]),(0,i.wy)((0,i.Wm)(m,{class:(0,oe.C_)(["handler-item",{disable:!(0,s.SU)(c)}]),onClick:t[1]||(t[1]=e=>(0,s.SU)(d)())},null,8,["class"]),[[ee,"重做"]]),(0,i.Wm)(Zc,{type:"vertical",style:{height:"20px"}}),(0,i.wy)((0,i.Wm)(x,{class:(0,oe.C_)(["handler-item",{active:(0,s.SU)(n)}]),onClick:t[2]||(t[2]=e=>$())},null,8,["class"]),[[ee,"选择窗格"]]),(0,i.wy)((0,i.Wm)(O,{class:(0,oe.C_)(["handler-item",{active:(0,s.SU)(r)}]),onClick:t[3]||(t[3]=e=>Z())},null,8,["class"]),[[ee,"查找/替换"]])]),(0,i._)("div",wm,[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",xm,[(0,i.Wm)(R,{class:(0,oe.C_)(["icon",{active:"text"===(0,s.SU)(l)?.type}]),onClick:t[4]||(t[4]=e=>H())},null,8,["class"]),(0,i.Wm)(dn,{trigger:"click",value:D.value,"onUpdate:value":t[7]||(t[7]=e=>D.value=e),style:{height:"100%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(mn,{center:"",onClick:t[5]||(t[5]=()=>{H(),D.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(z),(0,i.Uk)(" 横向文本框")])),_:1}),(0,i.Wm)(mn,{center:"",onClick:t[6]||(t[6]=()=>{H(!0),D.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(P),(0,i.Uk)(" 竖向文本框")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(B,{class:"arrow"})])),_:1},8,["value"])])),[[ee,"插入文字"]]),(0,i.Wm)(Pa,{onChange:t[8]||(t[8]=e=>C(e))},{default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(N,{class:"handler-item"},null,512),[[ee,"插入图片"]])])),_:1}),(0,i.Wm)(dn,{trigger:"click",value:L.value,"onUpdate:value":t[10]||(t[10]=e=>L.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Rp,{onSelect:t[9]||(t[9]=e=>F(e))})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(j,{class:(0,oe.C_)(["handler-item",{active:(0,s.SU)(a)||"shape"===(0,s.SU)(l)?.type}])},null,8,["class"]),[[ee,"插入形状"]])])),_:1},8,["value"]),(0,i.Wm)(dn,{trigger:"click",value:T.value,"onUpdate:value":t[12]||(t[12]=e=>T.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Xp,{onSelect:t[11]||(t[11]=e=>A(e))})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(Y,{class:(0,oe.C_)(["handler-item",{active:"line"===(0,s.SU)(l)?.type}])},null,8,["class"]),[[ee,"插入线条"]])])),_:1},8,["value"]),(0,i.Wm)(dn,{trigger:"click",value:E.value,"onUpdate:value":t[14]||(t[14]=e=>E.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(tv,{onSelect:t[13]||(t[13]=e=>{(0,s.SU)(k)(e),E.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(V,{class:"handler-item"},null,512),[[ee,"插入图表"]])])),_:1},8,["value"]),(0,i.Wm)(dn,{trigger:"click",value:M.value,"onUpdate:value":t[17]||(t[17]=e=>M.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Tv,{onClose:t[15]||(t[15]=e=>M.value=!1),onInsert:t[16]||(t[16]=({row:e,col:t})=>{(0,s.SU)(b)(e,t),M.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(J,{class:"handler-item"},null,512),[[ee,"插入表格"]])])),_:1},8,["value"]),(0,i.wy)((0,i.Wm)(q,{class:"handler-item",onClick:t[18]||(t[18]=e=>W.value=!0)},null,512),[[ee,"插入公式"]]),(0,i.Wm)(dn,{trigger:"click",value:U.value,"onUpdate:value":t[22]||(t[22]=e=>U.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Hv,{onClose:t[19]||(t[19]=e=>U.value=!1),onInsertVideo:t[20]||(t[20]=e=>{(0,s.SU)(I)(e),U.value=!1}),onInsertAudio:t[21]||(t[21]=e=>{(0,s.SU)(S)(e),U.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(X,{class:"handler-item"},null,512),[[ee,"插入音视频"]])])),_:1},8,["value"])]),(0,i._)("div",km,[(0,i.Wm)(G,{class:"handler-item viewport-size",onClick:t[23]||(t[23]=e=>(0,s.SU)(v)("-"))}),(0,i.Wm)(dn,{trigger:"click",value:y.value,"onUpdate:value":t[24]||(t[24]=e=>y.value=e)},{content:(0,i.w5)((()=>[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(g,(e=>(0,i.Wm)(mn,{center:"",key:e,onClick:t=>w(e)},{default:(0,i.w5)((()=>[(0,i.Uk)((0,oe.zw)(e)+"%",1)])),_:2},1032,["onClick"]))),64))])),default:(0,i.w5)((()=>[(0,i._)("span",bm,(0,oe.zw)((0,s.SU)(f)),1)])),_:1},8,["value"]),(0,i.Wm)(K,{class:"handler-item viewport-size",onClick:t[25]||(t[25]=e=>(0,s.SU)(v)("+"))}),(0,i.wy)((0,i.Wm)(Q,{class:"handler-item viewport-size-adaptation",onClick:t[26]||(t[26]=e=>(0,s.SU)(h)())},null,512),[[ee,"适应屏幕"]])]),(0,i.Wm)(kp,{visible:W.value,"onUpdate:visible":t[29]||(t[29]=e=>W.value=e),width:880},{default:(0,i.w5)((()=>[(0,i.Wm)(fm,{onClose:t[27]||(t[27]=e=>W.value=!1),onUpdate:t[28]||(t[28]=e=>{(0,s.SU)(_)(e),W.value=!1})})])),_:1},8,["visible"])])}}});const Im=(0,Vl.Z)(_m,[["__scopeId","data-v-7e81f183"]]);var Sm=Im,Cm=()=>{const{slides:e}=(0,o.Jk)($()),t=(0,s.iH)(null),l=(0,s.iH)(50),a=()=>{e.value.length>l.value?t.value=setTimeout((()=>{l.value=l.value+20,a()}),600):l.value=9999};return(0,i.bv)(a),(0,i.Ah)((()=>{t.value&&clearTimeout(t.value)})),{slidesLoadLimit:l}};const Lm={class:"layout-pool"},Tm=["onClick"];var Em=(0,i.aZ)({__name:"LayoutPool",emits:["select"],setup(e,{emit:t}){const l=t,{layouts:a}=(0,o.Jk)($()),n=e=>{l("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Lm,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(a),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"layout-item",key:e.id,onClick:t=>n(e)},[(0,i.Wm)(Jd,{class:"thumbnail",slide:e,size:180},null,8,["slide"])],8,Tm)))),128))]))}});const Mm=(0,Vl.Z)(Em,[["__scopeId","data-v-8ee3e590"]]);var Um=Mm,Wm=l(9980),Dm=l.n(Wm);const Hm={class:"add-slide"},Fm={class:"select-btn"},Am=["onMousedown"],$m={class:"page-number"};var Zm=(0,i.aZ)({__name:"index",setup(e){const t=R(),l=$(),a=q(),{selectedSlidesIndex:n,thumbnailsFocus:r}=(0,o.Jk)(t),{slides:u,slideIndex:c}=(0,o.Jk)(l),{ctrlKeyState:d,shiftKeyState:p}=(0,o.Jk)(a),{slidesLoadLimit:v}=Cm(),m=(0,i.Fl)((()=>[...n.value,c.value])),h=(0,s.iH)(!1),{copySlide:f,pasteSlide:g,createSlide:y,createSlideByTemplate:w,copyAndPasteSlide:x,deleteSlide:k,cutSlide:b,selectAllSlide:_,sortSlides:I}=ha(),S=(0,s.iH)();(0,i.YP)((()=>c.value),(()=>{m.value.length&&t.updateSelectedSlidesIndex([]),(0,i.Y3)((()=>{const e=S.value?.$el?.querySelector(".thumbnail-item.active");S.value&&e&&!Le(e,S.value.$el)&&setTimeout((()=>{e.scrollIntoView({behavior:"smooth"})}),100)}))}));const C=e=>{t.setActiveElementIdList([]),c.value!==e&&l.updateSlideIndex(e)},L=(e,l)=>{const a=m.value.length>1;if(!a||!m.value.includes(l)||0===e.button)if(d.value)if(c.value===l){if(!a)return;const e=m.value.filter((e=>e!==l));t.updateSelectedSlidesIndex(e),C(m.value[0])}else if(m.value.includes(l)){const e=m.value.filter((e=>e!==l));t.updateSelectedSlidesIndex(e)}else{const e=[...m.value,l];t.updateSelectedSlidesIndex(e)}else if(p.value){if(c.value===l&&!a)return;let e=Math.min(...m.value),n=l;l{r.value!==e&&(t.setThumbnailsFocus(e),e||t.updateSelectedSlidesIndex([]))},E=e=>{const{newIndex:t,oldIndex:l}=e;void 0!==t&&void 0!==l&&t!==l&&I(t,l)},{enterScreening:M,enterScreeningFromStart:U}=Ca(),W=()=>[{text:"粘贴",subText:"Ctrl + V",handler:g},{text:"全选",subText:"Ctrl + A",handler:_},{text:"新建页面",subText:"Enter",handler:y},{text:"幻灯片放映",subText:"F5",handler:U}],D=()=>[{text:"剪切",subText:"Ctrl + X",handler:b},{text:"复制",subText:"Ctrl + C",handler:f},{text:"粘贴",subText:"Ctrl + V",handler:g},{text:"全选",subText:"Ctrl + A",handler:_},{divider:!0},{text:"新建页面",subText:"Enter",handler:y},{text:"复制页面",subText:"Ctrl + D",handler:x},{text:"删除页面",subText:"Delete",handler:()=>k()},{divider:!0},{text:"从当前放映",subText:"Shift + F5",handler:M}];return(e,t)=>{const l=(0,i.up)("IconPlus"),a=(0,i.up)("IconDown"),n=(0,i.Q2)("contextmenu"),o=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"thumbnails",onMousedown:t[4]||(t[4]=()=>T(!0))},[(0,i._)("div",Hm,[(0,i._)("div",{class:"btn",onClick:t[0]||(t[0]=e=>(0,s.SU)(y)())},[(0,i.Wm)(l,{class:"icon"}),(0,i.Uk)("添加幻灯片")]),(0,i.Wm)(dn,{trigger:"click",placement:"bottom-start",value:h.value,"onUpdate:value":t[2]||(t[2]=e=>h.value=e),center:""},{content:(0,i.w5)((()=>[(0,i.Wm)(Um,{onSelect:t[1]||(t[1]=e=>{(0,s.SU)(w)(e),h.value=!1})})])),default:(0,i.w5)((()=>[(0,i._)("div",Fm,[(0,i.Wm)(a)])])),_:1},8,["value"])]),(0,i.Wm)((0,s.SU)(Dm()),{class:"thumbnail-list",ref_key:"thumbnailsRef",ref:S,modelValue:(0,s.SU)(u),animation:200,scroll:!0,scrollSensitivity:50,onEnd:E,itemKey:"id"},{item:(0,i.w5)((({element:e,index:l})=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["thumbnail-item",{active:(0,s.SU)(c)===l,selected:m.value.includes(l)}]),onMousedown:e=>L(e,l),onDblclick:t[3]||(t[3]=e=>(0,s.SU)(M)())},[(0,i._)("div",{class:(0,oe.C_)(["label",{"offset-left":l>=99}])},(0,oe.zw)((0,s.SU)(G)(l+1,2)),3),(0,i.Wm)(Jd,{class:"thumbnail",slide:e,size:120,visible:l<(0,s.SU)(v)},null,8,["slide","visible"])],42,Am)),[[n,D]])])),_:1},8,["modelValue"]),(0,i._)("div",$m,"幻灯片 "+(0,oe.zw)((0,s.SU)(c)+1)+" / "+(0,oe.zw)((0,s.SU)(u).length),1)],32)),[[o,()=>T(!1)],[n,W]])}}});const Om=(0,Vl.Z)(Zm,[["__scopeId","data-v-0dbead61"]]);var Rm=Om,zm=()=>{const e=R(),{richTextAttrs:t,textFormatPainter:l}=(0,o.Jk)(e),a=(a=!1)=>{l.value?e.setTextFormatPainter(null):e.setTextFormatPainter({keep:a,bold:t.value.bold,em:t.value.em,underline:t.value.underline,strikethrough:t.value.strikethrough,color:t.value.color,backcolor:t.value.backcolor,fontname:t.value.fontname,fontsize:t.value.fontsize,align:t.value.align})};return{toggleTextFormatPainter:a}},Pm=l(8374);const Bm={class:"bar"},Nm=["data-tooltip"],jm=["data-tooltip"],Ym=["data-tooltip"];var Vm=(0,i.aZ)({__name:"Slider",props:{value:{},disabled:{type:Boolean,default:!1},min:{default:0},max:{default:100},step:{default:1},range:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e=>e.getBoundingClientRect().left,a=e,n=t,o=(0,s.iH)(),r=(0,s.iH)(0),u=(0,s.iH)(0),c=(0,s.iH)(0),d=(0,s.iH)("end"),p=e=>{let t=e/100*(a.max-a.min);if(a.step>=1)t=Math.fround(t);else{const e=a.step.toString(),l=e.match(/^[0.]*([1-9])/);if(l){const a=l[1],n=e.indexOf(a)-1;if(n>0){const e=Math.pow(10,n);t=Math.fround(t*e)/e}}}return Pm.ZP.plus(t,a.min)},v=(0,i.Fl)((()=>p(r.value))),m=(0,i.Fl)((()=>p(u.value))),h=(0,i.Fl)((()=>p(c.value)));(0,i.YP)((()=>a.value),(()=>{a.max!==a.min&&("number"===typeof a.value?r.value=(a.value-a.min)/(a.max-a.min)*100:(u.value=(a.value[0]-a.min)/(a.max-a.min)*100,c.value=(a.value[1]-a.min)/(a.max-a.min)*100))}),{immediate:!0});const f=e=>{if(!o.value)return 0;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let n=(t-l(o.value))/o.value.clientWidth;n=Math.max(n,0),n=Math.min(n,1);let i=100*n;const s=a.step/(a.max-a.min)*100,r=i%s;return r>0&&(r<=s/2?i-=r:i=i-r+s),i},g=e=>{const t=f(e);"start"===d.value?u.value=t:c.value=t},y=e=>{w(e);const t=p(r.value),l=a.value,o="start"===d.value?[t,l[1]]:[l[0],t];o[0]>o[1]&&([o[0],o[1]]=[o[1],o[0]]),n("update:value",o),document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",y),document.removeEventListener("touchend",y)},w=e=>{r.value=f(e)},x=e=>{w(e);const t=p(r.value);n("update:value",t),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",w),document.removeEventListener("mouseup",x),document.removeEventListener("touchend",x)},k=e=>{if(!a.disabled)if(a.range){const t=f(e);Math.abs(t-u.value)((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["slider",{disabled:e.disabled}]),ref_key:"sliderRef",ref:o,onMousedown:t[0]||(t[0]=e=>k(e))},[(0,i._)("div",Bm,[e.range?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i._)("div",{class:"track",style:(0,oe.j5)({width:c.value-u.value+"%",left:`${u.value}%`})},null,4),(0,i._)("div",{class:"thumb",style:(0,oe.j5)({left:`${u.value}%`}),"data-tooltip":m.value},null,12,jm),(0,i._)("div",{class:"thumb",style:(0,oe.j5)({left:`${c.value}%`}),"data-tooltip":h.value},null,12,Ym)],64)):((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",{class:"track",style:(0,oe.j5)({width:`${r.value}%`})},null,4),(0,i._)("div",{class:"thumb",style:(0,oe.j5)({left:`${r.value}%`}),"data-tooltip":v.value},null,12,Nm)],64))])],34))}});const Jm=(0,Vl.Z)(Vm,[["__scopeId","data-v-563bd2a0"]]);var qm=Jm;const Xm=e=>((0,i.dD)("data-v-03715c20"),e=e(),(0,i.Cn)(),e),Gm={class:"element-opacity"},Km={class:"row"},Qm=Xm((()=>(0,i._)("div",{style:{width:"40%"}},"不透明度:",-1)));var eh=(0,i.aZ)({__name:"ElementOpacity",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=(0,s.iH)(1);(0,i.YP)(l,(()=>{l.value&&(a.value="opacity"in l.value&&void 0!==l.value.opacity?l.value.opacity:1)}),{deep:!0,immediate:!0});const{addHistorySnapshot:n}=da(),r=e=>{if(!l.value)return;const a={opacity:e};t.updateElement({id:l.value.id,props:a}),n()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Gm,[(0,i._)("div",Km,[Qm,(0,i.Wm)(qm,{min:0,max:1,step:.1,value:a.value,"onUpdate:value":t[0]||(t[0]=e=>r(e)),style:{width:"60%"}},null,8,["value"])])]))}});const th=(0,Vl.Z)(eh,[["__scopeId","data-v-03715c20"]]);var lh=th;const ah={class:"color-block"};var nh=(0,i.aZ)({__name:"ColorButton",props:{color:{}},setup(e){return(e,t)=>{const l=(0,i.up)("IconPlatte");return(0,i.wg)(),(0,i.j4)(tp,{class:"color-btn"},{default:(0,i.w5)((()=>[(0,i._)("div",ah,[(0,i._)("div",{class:"content",style:(0,oe.j5)({backgroundColor:e.color})},null,4)]),(0,i.Wm)(l,{class:"color-btn-icon"})])),_:1})}}});const oh=(0,Vl.Z)(nh,[["__scopeId","data-v-7fa73bdc"]]);var ih=oh,sh=l(6459),rh=(0,i.aZ)({__name:"Checkboard",props:{size:{default:8},white:{default:"#fff"},grey:{default:"#e6e6e6"}},setup(e){const t=e,l={},a=(e,t,l)=>{const a=document.createElement("canvas");a.width=a.height=2*l;const n=a.getContext("2d");return n?(n.fillStyle=e,n.fillRect(0,0,a.width,a.height),n.fillStyle=t,n.fillRect(0,0,l,l),n.translate(l,l),n.fillRect(0,0,l,l),a.toDataURL()):null},n=(e,t,n)=>{const o=e+","+t+","+n;if(l[o])return l[o];const i=a(e,t,n);return l[o]=i,i},o=(0,i.Fl)((()=>{const e=n(t.white,t.grey,t.size);return{backgroundImage:`url(${e})`}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"checkerboard",style:(0,oe.j5)(o.value)},null,4))}});const uh=(0,Vl.Z)(rh,[["__scopeId","data-v-fa191ace"]]);var ch=uh;const dh=e=>((0,i.dD)("data-v-84628bc8"),e=e(),(0,i.Cn)(),e),ph={class:"alpha"},vh={class:"alpha-checkboard-wrap"},mh=dh((()=>(0,i._)("div",{class:"alpha-picker"},null,-1))),hh=[mh];var fh=(0,i.aZ)({__name:"Alpha",props:{value:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=t,n=(0,i.Fl)((()=>l.value)),o=(0,i.Fl)((()=>{const e=[n.value.r,n.value.g,n.value.b].join(",");return`linear-gradient(to right, rgba(${e}, 0) 0%, rgba(${e}, 1) 100%)`})),r=(0,s.iH)(),u=e=>{if(e.preventDefault(),!r.value)return;const t=r.value.clientWidth,l=r.value.getBoundingClientRect().left+window.pageXOffset,o=e.pageX-l;let i;i=o<0?0:o>t?1:Math.round(100*o/t)/100,n.value.a!==i&&a("colorChange",{r:n.value.r,g:n.value.g,b:n.value.b,a:i})},c=()=>{window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",c)},d=e=>{u(e),window.addEventListener("mousemove",u),window.addEventListener("mouseup",c)};return(0,i.Ah)(c),(e,t)=>((0,i.wg)(),(0,i.iD)("div",ph,[(0,i._)("div",vh,[(0,i.Wm)(ch)]),(0,i._)("div",{class:"alpha-gradient",style:(0,oe.j5)({background:o.value})},null,4),(0,i._)("div",{class:"alpha-container",ref_key:"alphaRef",ref:r,onMousedown:t[0]||(t[0]=e=>d(e))},[(0,i._)("div",{class:"alpha-pointer",style:(0,oe.j5)({left:100*n.value.a+"%"})},hh,4)],544)]))}});const gh=(0,Vl.Z)(fh,[["__scopeId","data-v-84628bc8"]]);var yh=gh;const wh=e=>((0,i.dD)("data-v-5711e710"),e=e(),(0,i.Cn)(),e),xh={class:"hue"},kh=wh((()=>(0,i._)("div",{class:"hue-picker"},null,-1))),bh=[kh];var _h=(0,i.aZ)({__name:"Hue",props:{value:{},hue:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=t,n=(0,s.iH)(0),o=(0,s.iH)(""),r=(0,i.Fl)((()=>{const e=(0,W.Z)(l.value).toHsl();return-1!==l.hue&&(e.h=l.hue),e})),u=(0,i.Fl)((()=>0===r.value.h&&"right"===o.value?"100%":100*r.value.h/360+"%"));(0,i.YP)((()=>l.value),(()=>{const e=(0,W.Z)(l.value).toHsl(),t=0===e.s?l.hue:e.h;0!==t&&t-n.value>0&&(o.value="right"),0!==t&&t-n.value<0&&(o.value="left"),n.value=t}));const c=(0,s.iH)(),d=e=>{if(e.preventDefault(),!c.value)return;const t=c.value.clientWidth,n=c.value.getBoundingClientRect().left+window.pageXOffset,o=e.pageX-n;let i,s;o<0?i=0:o>t?i=360:(s=100*o/t,i=360*s/100),-1!==l.hue&&r.value.h===i||a("colorChange",{h:i,l:r.value.l,s:r.value.s,a:r.value.a})},p=()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",p)},v=e=>{d(e),window.addEventListener("mousemove",d),window.addEventListener("mouseup",p)};return(0,i.Ah)(p),(e,t)=>((0,i.wg)(),(0,i.iD)("div",xh,[(0,i._)("div",{class:"hue-container",ref_key:"hueRef",ref:c,onMousedown:t[0]||(t[0]=e=>v(e))},[(0,i._)("div",{class:"hue-pointer",style:(0,oe.j5)({left:u.value})},bh,4)],544)]))}});const Ih=(0,Vl.Z)(_h,[["__scopeId","data-v-5711e710"]]);var Sh=Ih;const Ch=e=>((0,i.dD)("data-v-c79c0446"),e=e(),(0,i.Cn)(),e),Lh=Ch((()=>(0,i._)("div",{class:"saturation-white"},null,-1))),Th=Ch((()=>(0,i._)("div",{class:"saturation-black"},null,-1))),Eh=Ch((()=>(0,i._)("div",{class:"saturation-circle"},null,-1))),Mh=[Eh];var Uh=(0,i.aZ)({__name:"Saturation",props:{value:{},hue:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=t,n=(0,i.Fl)((()=>{const e=(0,W.Z)(l.value).toHsv();return-1!==l.hue&&(e.h=l.hue),e})),o=(0,i.Fl)((()=>`hsl(${n.value.h}, 100%, 50%)`)),r=(0,i.Fl)((()=>-100*n.value.v+1+100+"%")),u=(0,i.Fl)((()=>100*n.value.s+"%")),c=(0,D.throttle)((function(e){a("colorChange",e)}),20,{leading:!0,trailing:!1}),d=(0,s.iH)(),p=e=>{if(e.preventDefault(),!d.value)return;const t=d.value.clientWidth,l=d.value.clientHeight,a=d.value.getBoundingClientRect().left+window.pageXOffset,o=d.value.getBoundingClientRect().top+window.pageYOffset,i=(0,D.clamp)(e.pageX-a,0,t),s=(0,D.clamp)(e.pageY-o,0,l),r=i/t,u=(0,D.clamp)(-s/l+1,0,1);c({h:n.value.h,s:r,v:u,a:n.value.a})},v=()=>{window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",v)},m=e=>{p(e),window.addEventListener("mousemove",p),window.addEventListener("mouseup",v)};return(0,i.Ah)(v),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"saturation",ref_key:"saturationRef",ref:d,style:(0,oe.j5)({background:o.value}),onMousedown:t[0]||(t[0]=e=>m(e))},[Lh,Th,(0,i._)("div",{class:"saturation-pointer",style:(0,oe.j5)({top:r.value,left:u.value})},Mh,4)],36))}});const Wh=(0,Vl.Z)(Uh,[["__scopeId","data-v-c79c0446"]]);var Dh=Wh;const Hh={class:"editable-input"},Fh=["value"];var Ah=(0,i.aZ)({__name:"EditableInput",props:{value:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=t,n=(0,i.Fl)((()=>{let e="";return e=l.value.a<1?(0,W.Z)(l.value).toHex8String().toUpperCase():(0,W.Z)(l.value).toHexString().toUpperCase(),e.replace("#","")})),o=e=>{const t=e.target.value;if(t.length>=6){const e=(0,W.Z)(t);e.isValid()&&a("colorChange",e.toRgb())}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Hh,[(0,i._)("input",{class:"input-content",value:n.value,onInput:t[0]||(t[0]=e=>o(e))},null,40,Fh)]))}});const $h=(0,Vl.Z)(Ah,[["__scopeId","data-v-65e2913c"]]);var Zh=$h;const Oh={class:"color-picker"},Rh={class:"picker-saturation-wrap"},zh={class:"picker-controls"},Ph={class:"picker-color-wrap"},Bh={class:"picker-sliders"},Nh={class:"picker-hue-wrap"},jh={class:"picker-alpha-wrap"},Yh={class:"picker-field"},Vh={class:"picker-presets"},Jh=["onClick"],qh={class:"picker-gradient-presets"},Xh=["onClick"],Gh={class:"picker-presets"},Kh=["onClick"],Qh={key:0,class:"recent-colors-title"},ef={class:"picker-presets"},tf=["onClick"],lf="RECENT_COLORS";var af=(0,i.aZ)({__name:"index",props:{modelValue:{default:"#e86b99"}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=t,n=[["#7f7f7f","#f2f2f2"],["#0d0d0d","#808080"],["#1c1a10","#ddd8c3"],["#0e243d","#c6d9f0"],["#233f5e","#dae5f0"],["#632623","#f2dbdb"],["#4d602c","#eaf1de"],["#3f3150","#e6e0ec"],["#1e5867","#d9eef3"],["#99490f","#fee9da"]],o=(e,t,l)=>{const a=(0,W.Z)(e).toRgb(),n=(0,W.Z)(t).toRgb(),o=(n.r-a.r)/l,i=(n.g-a.g)/l,s=(n.b-a.b)/l,r=[];for(let u=0;u{const e=[];for(const t of n)e.push(o(t[1],t[0],5));return e},u=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c"],c=["#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57","#00afee","#0071be","#00215f","#72349d"],d=(0,s.iH)(-1),p=(0,s.iH)([]),v=(0,i.Fl)({get(){return(0,W.Z)(l.modelValue).toRgb()},set(e){const t=`rgba(${[e.r,e.g,e.b,e.a].join(",")})`;a("update:modelValue",t)}}),m=r(),h=(0,i.Fl)((()=>`rgba(${[v.value.r,v.value.g,v.value.b,v.value.a].join(",")})`)),f=e=>{d.value=(0,W.Z)(e).toHsl().h,a("update:modelValue",e)},g=(0,D.debounce)((function(){const e=(0,W.Z)(v.value).toRgbString();if(!p.value.includes(e)){p.value=[e,...p.value];const t=10;p.value.length>t&&(p.value=p.value.slice(0,t))}}),300,{trailing:!0});(0,i.bv)((()=>{const e=localStorage.getItem(lf);e&&(p.value=JSON.parse(e))})),(0,i.YP)(p,(()=>{const e=JSON.stringify(p.value);localStorage.setItem(lf,e)}));const y=e=>{"h"in e?(d.value=e.h,v.value=(0,W.Z)(e).toRgb()):(d.value=(0,W.Z)(e).toHsl().h,v.value=e),g()},w=()=>{const e="EyeDropper"in window;e?x():k()},x=()=>{ta.success("按 ESC 键关闭取色吸管");const e=new window.EyeDropper;e.open().then((e=>{const t=(0,W.Z)(e.sRGBHex);d.value=t.toHsl().h,v.value=t.toRgb(),g()})).catch((()=>{ta.success("关闭取色吸管")}))},k=()=>{const e=document.querySelector(".canvas");if(!e)return;const t=document.createElement("div");t.style.cssText="position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 9999; cursor: wait;",document.body.appendChild(t);const l=document.createElement("div");l.style.cssText="position: absolute; top: -100px; left: -100px; width: 16px; height: 16px; border: 1px solid #000; z-index: 999",t.appendChild(l);const{left:a,top:n,width:o,height:i}=e.getBoundingClientRect(),s=e=>(!e.tagName||"FOREIGNOBJECT"!==e.tagName.toUpperCase())&&(!e.classList||!e.classList.contains("operate"));(0,sh.rT)(e,{filter:s,fontEmbedCSS:"",width:o,height:i,canvasWidth:o,canvasHeight:i,pixelRatio:1}).then((e=>{e.style.cssText=`position: absolute; top: ${n}px; left: ${a}px; cursor: crosshair;`,t.style.cursor="default",t.appendChild(e);const o=e.getContext("2d");if(!o)return;let i="";const s=e=>{const t=e.x,s=e.y,r=t-a,u=s-n,[c,d,p,v]=o.getImageData(r,u,1,1).data;i=`rgba(${c}, ${d}, ${p}, ${(v/255).toFixed(2)})`,l.style.left=t+10+"px",l.style.top=s+10+"px",l.style.backgroundColor=i},r=()=>{i="",l.style.left="-100px",l.style.top="-100px",l.style.backgroundColor=""},u=l=>{if(i&&0===l.button){const e=(0,W.Z)(i);d.value=e.toHsl().h,v.value=e.toRgb(),g()}document.body.removeChild(t),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",r),window.removeEventListener("mousedown",u)};e.addEventListener("mousemove",s),e.addEventListener("mouseleave",r),window.addEventListener("mousedown",u)})).catch((()=>{ta.error("取色吸管初始化失败"),document.body.removeChild(t)}))};return(e,t)=>{const l=(0,i.up)("IconNeedle");return(0,i.wg)(),(0,i.iD)("div",Oh,[(0,i._)("div",Rh,[(0,i.Wm)(Dh,{value:v.value,hue:d.value,onColorChange:t[0]||(t[0]=e=>y(e))},null,8,["value","hue"])]),(0,i._)("div",zh,[(0,i._)("div",Ph,[(0,i._)("div",{class:"picker-current-color",style:(0,oe.j5)({background:h.value})},null,4),(0,i.Wm)(ch)]),(0,i._)("div",Bh,[(0,i._)("div",Nh,[(0,i.Wm)(Sh,{value:v.value,hue:d.value,onColorChange:t[1]||(t[1]=e=>y(e))},null,8,["value","hue"])]),(0,i._)("div",jh,[(0,i.Wm)(yh,{value:v.value,onColorChange:t[2]||(t[2]=e=>y(e))},null,8,["value"])])])]),(0,i._)("div",Yh,[(0,i.Wm)(Zh,{class:"input",value:v.value,onColorChange:t[3]||(t[3]=e=>y(e))},null,8,["value"]),(0,i._)("div",{class:"straw",onClick:t[4]||(t[4]=e=>w())},[(0,i.Wm)(l)]),(0,i._)("div",{class:"transparent",onClick:t[5]||(t[5]=e=>f("#00000000"))},[(0,i.Wm)(ch)])]),(0,i._)("div",Vh,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(u,(e=>(0,i._)("div",{class:"picker-presets-color",key:e,style:(0,oe.j5)({background:e}),onClick:t=>f(e)},null,12,Jh))),64))]),(0,i._)("div",qh,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(m),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"picker-gradient-col",key:t},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"picker-gradient-color",key:e,style:(0,oe.j5)({background:e}),onClick:t=>f(e)},null,12,Xh)))),128))])))),128))]),(0,i._)("div",Gh,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(c,(e=>(0,i._)("div",{key:e,class:"picker-presets-color",style:(0,oe.j5)({background:e}),onClick:t=>f(e)},null,12,Kh))),64))]),p.value.length?((0,i.wg)(),(0,i.iD)("div",Qh,"最近使用:")):(0,i.kq)("",!0),(0,i._)("div",ef,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,(e=>((0,i.wg)(),(0,i.iD)("div",{key:e,class:"picker-presets-color alpha",onClick:t=>f(e)},[(0,i._)("div",{class:"picker-presets-color-content",style:(0,oe.j5)({background:e})},null,4)],8,tf)))),128))])])}}});const nf=(0,Vl.Z)(af,[["__scopeId","data-v-fec0b01a"]]);var of=nf;const sf=e=>((0,i.dD)("data-v-0566b060"),e=e(),(0,i.Cn)(),e),rf=sf((()=>(0,i._)("span",{class:"switch-core"},null,-1))),uf=[rf];var cf=(0,i.aZ)({__name:"Switch",props:{value:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=t,n=()=>{l.disabled||a("update:value",!l.value)};return(e,t)=>((0,i.wg)(),(0,i.iD)("span",{class:(0,oe.C_)(["switch",{active:e.value,disabled:e.disabled}]),onClick:t[0]||(t[0]=e=>n())},uf,2))}});const df=(0,Vl.Z)(cf,[["__scopeId","data-v-0566b060"]]);var pf=df;const vf=e=>((0,i.dD)("data-v-18fbbd33"),e=e(),(0,i.Cn)(),e),mf={class:"element-outline"},hf={key:0,class:"row"},ff=vf((()=>(0,i._)("div",{style:{width:"40%"}},"启用边框:",-1))),gf={class:"switch-wrapper",style:{width:"60%"}},yf={class:"row"},wf=vf((()=>(0,i._)("div",{style:{width:"40%"}},"边框样式:",-1))),xf={class:"row"},kf=vf((()=>(0,i._)("div",{style:{width:"40%"}},"边框颜色:",-1))),bf={class:"row"},_f=vf((()=>(0,i._)("div",{style:{width:"40%"}},"边框粗细:",-1)));var If=(0,i.aZ)({__name:"ElementOutline",props:{fixed:{type:Boolean,default:!1}},setup(e){const t=$(),{theme:l}=(0,o.Jk)(t),{handleElement:a}=(0,o.Jk)(R()),n=(0,s.iH)(),r=(0,s.iH)(!1);(0,i.YP)(a,(()=>{a.value&&(n.value="outline"in a.value?a.value.outline:void 0,r.value=!!n.value)}),{deep:!0,immediate:!0});const{addHistorySnapshot:u}=da(),c=e=>{if(!a.value)return;const l={outline:{...n.value,...e}};t.updateElement({id:a.value.id,props:l}),u()},d=e=>{if(a.value){if(e){const e=l.value.outline;t.updateElement({id:a.value.id,props:{outline:e}})}else t.removeElementProps({id:a.value.id,propName:"outline"});u()}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",mf,[e.fixed?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",hf,[ff,(0,i._)("div",gf,[(0,i.Wm)(pf,{value:r.value,"onUpdate:value":t[0]||(t[0]=e=>d(e))},null,8,["value"])])])),r.value&&n.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i._)("div",yf,[wf,(0,i.Wm)(cp,{style:{width:"60%"},value:n.value.style||"","onUpdate:value":t[1]||(t[1]=e=>c({style:e})),options:[{label:"实线边框",value:"solid"},{label:"虚线边框",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",xf,[kf,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:n.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>c({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:n.value.color||"#000"},null,8,["color"])])),_:1})]),(0,i._)("div",bf,[_f,(0,i.Wm)(mv,{value:n.value.width||0,"onUpdate:value":t[3]||(t[3]=e=>c({width:e})),style:{width:"60%"}},null,8,["value"])])],64)):(0,i.kq)("",!0)]))}});const Sf=(0,Vl.Z)(If,[["__scopeId","data-v-18fbbd33"]]);var Cf=Sf;const Lf=e=>((0,i.dD)("data-v-3a267bbc"),e=e(),(0,i.Cn)(),e),Tf={class:"element-shadow"},Ef={class:"row"},Mf=Lf((()=>(0,i._)("div",{style:{width:"40%"}},"启用阴影:",-1))),Uf={class:"switch-wrapper",style:{width:"60%"}},Wf={class:"row"},Df=Lf((()=>(0,i._)("div",{style:{width:"40%"}},"水平阴影:",-1))),Hf={class:"row"},Ff=Lf((()=>(0,i._)("div",{style:{width:"40%"}},"垂直阴影:",-1))),Af={class:"row"},$f=Lf((()=>(0,i._)("div",{style:{width:"40%"}},"模糊距离:",-1))),Zf={class:"row"},Of=Lf((()=>(0,i._)("div",{style:{width:"40%"}},"阴影颜色:",-1)));var Rf=(0,i.aZ)({__name:"ElementShadow",setup(e){const t=$(),{theme:l}=(0,o.Jk)(t),{handleElement:a}=(0,o.Jk)(R()),n=(0,s.iH)(),r=(0,s.iH)(!1);(0,i.YP)(a,(()=>{a.value&&(n.value="shadow"in a.value?a.value.shadow:void 0,r.value=!!n.value)}),{deep:!0,immediate:!0});const{addHistorySnapshot:u}=da(),c=e=>{if(!a.value||!n.value)return;const l={...n.value,...e};t.updateElement({id:a.value.id,props:{shadow:l}}),u()},d=e=>{if(a.value){if(e){const e=l.value.shadow;t.updateElement({id:a.value.id,props:{shadow:e}})}else t.removeElementProps({id:a.value.id,propName:"shadow"});u()}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Tf,[(0,i._)("div",Ef,[Mf,(0,i._)("div",Uf,[(0,i.Wm)(pf,{value:r.value,"onUpdate:value":t[0]||(t[0]=e=>d(e))},null,8,["value"])])]),r.value&&n.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Wf,[Df,(0,i.Wm)(qm,{style:{width:"60%"},min:-10,max:10,step:1,value:n.value.h,"onUpdate:value":t[1]||(t[1]=e=>c({h:e}))},null,8,["value"])]),(0,i._)("div",Hf,[Ff,(0,i.Wm)(qm,{style:{width:"60%"},min:-10,max:10,step:1,value:n.value.v,"onUpdate:value":t[2]||(t[2]=e=>c({v:e}))},null,8,["value"])]),(0,i._)("div",Af,[$f,(0,i.Wm)(qm,{style:{width:"60%"},min:1,max:20,step:1,value:n.value.blur,"onUpdate:value":t[3]||(t[3]=e=>c({blur:e}))},null,8,["value"])]),(0,i._)("div",Zf,[Of,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:n.value.color,"onUpdate:modelValue":t[4]||(t[4]=e=>c({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:n.value.color},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0)]))}});const zf=(0,Vl.Z)(Rf,[["__scopeId","data-v-3a267bbc"]]);var Pf=zf;const Bf={class:"text-color-block"};var Nf=(0,i.aZ)({__name:"TextColorButton",props:{color:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.j4)(tp,{class:"text-color-btn"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default"),(0,i._)("div",Bf,[(0,i._)("div",{class:"text-color-block-content",style:(0,oe.j5)({backgroundColor:e.color})},null,4)])])),_:3}))}});const jf=(0,Vl.Z)(Nf,[["__scopeId","data-v-37449800"]]);var Yf=jf,Vf=(0,i.aZ)({__name:"CheckboxButton",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.j4)(tp,{checked:e.checked,disabled:e.disabled,type:"checkbox"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3},8,["checked","disabled"]))}});const Jf=Vf;var qf=Jf,Xf=(0,i.aZ)({__name:"ButtonGroup",props:{passive:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["button-group",{passive:e.passive}]),ref:"groupRef"},[(0,i.WI)(e.$slots,"default")],2))}});const Gf=(0,Vl.Z)(Xf,[["__scopeId","data-v-4db942e2"]]);var Kf=Gf,Qf=(0,i.aZ)({__name:"RadioButton",props:{value:{},disabled:{type:Boolean,default:!1}},setup(e){const{value:t,updateValue:l}=(0,i.f3)(Mn);return(e,a)=>((0,i.wg)(),(0,i.j4)(tp,{checked:!e.disabled&&(0,s.SU)(t)===e.value,disabled:e.disabled,type:"radio",onClick:a[0]||(a[0]=t=>!e.disabled&&(0,s.SU)(l)(e.value))},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3},8,["checked","disabled"]))}});const eg=Qf;var tg=eg,lg=(0,i.aZ)({__name:"RadioGroup",props:{value:{},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=t,n=e=>{l.disabled||a("update:value",e)},o=(0,i.Fl)((()=>l.value));return(0,i.JJ)(Mn,{value:o,updateValue:n}),(e,t)=>((0,i.wg)(),(0,i.j4)(Kf,{class:"radio-group"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3}))}});const ag=lg;var ng=ag;const og={class:"select-group"};function ig(e,t){return(0,i.wg)(),(0,i.iD)("div",og,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])}const sg={},rg=(0,Vl.Z)(sg,[["render",ig],["__scopeId","data-v-d2acb09c"]]);var ug=rg;const cg=e=>((0,i.dD)("data-v-4cf37a85"),e=e(),(0,i.Cn)(),e),dg={class:"text-style-panel"},pg={class:"preset-style"},vg=["onClick"],mg={class:"link-popover"},hg={class:"btns"},fg={class:"row",passive:""},gg={class:"list-wrap"},yg=["onClick"],wg=cg((()=>(0,i._)("span",null,null,-1))),xg=[wg],kg=cg((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),bg={class:"list-wrap"},_g=["onClick"],Ig=cg((()=>(0,i._)("span",null,null,-1))),Sg=[Ig],Cg={class:"row"},Lg=cg((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Tg={class:"row"},Eg=cg((()=>(0,i._)("div",{style:{width:"40%"}},"行间距:",-1))),Mg={class:"row"},Ug=cg((()=>(0,i._)("div",{style:{width:"40%"}},"段间距:",-1))),Wg={class:"row"},Dg=cg((()=>(0,i._)("div",{style:{width:"40%"}},"字间距:",-1))),Hg={class:"row"},Fg=cg((()=>(0,i._)("div",{style:{width:"40%"}},"文本框填充:",-1)));var Ag=(0,i.aZ)({__name:"TextStylePanel",setup(e){const t=[{label:"大标题",style:{fontSize:"26px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"66px"},{command:"align",value:"center"}]},{label:"小标题",style:{fontSize:"22px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"40px"},{command:"align",value:"center"}]},{label:"正文",style:{fontSize:"20px"},cmd:[{command:"clear"},{command:"fontsize",value:"20px"}]},{label:"正文[小]",style:{fontSize:"18px"},cmd:[{command:"clear"},{command:"fontsize",value:"18px"}]},{label:"注释 1",style:{fontSize:"16px",fontStyle:"italic"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"em"}]},{label:"注释 2",style:{fontSize:"16px",textDecoration:"underline"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"underline"}]}],l=R(),a=$(),{handleElement:n,handleElementId:r,richTextAttrs:u,availableFonts:c,textFormatPainter:d}=(0,o.Jk)(l),{addHistorySnapshot:p}=da(),{toggleTextFormatPainter:v}=zm(),m=e=>{a.updateElement({id:r.value,props:e}),p()},h=(0,s.iH)(!1),f=(0,s.iH)(!1),g=(0,s.iH)(!1),y=(0,s.iH)(!1),w=(0,s.iH)(["disc","circle","square"]),x=(0,s.iH)(["decimal","lower-roman","upper-roman","lower-alpha","upper-alpha","lower-greek"]),k=(0,s.iH)("#000"),b=(0,s.iH)(),_=(0,s.iH)(),I=(0,s.iH)();(0,i.YP)(n,(()=>{n.value&&"text"===n.value.type&&(k.value=n.value.fill||"#fff",b.value=n.value.lineHeight||1.5,_.value=n.value.wordSpace||0,I.value=void 0===n.value.paragraphSpace?5:n.value.paragraphSpace,Oi.emit(Ai.SYNC_RICH_TEXT_ATTRS_TO_STORE))}),{deep:!0,immediate:!0});const S=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],C=[.9,1,1.15,1.2,1.4,1.5,1.8,2,2.5,3],L=[0,1,2,3,4,5,6,8,10],T=[0,5,10,15,20,25,30,40,50,80],E=e=>{m({lineHeight:e})},U=e=>{m({paragraphSpace:e})},W=e=>{m({wordSpace:e})},D=e=>{m({fill:e})},H=(e,t)=>{Oi.emit(Ai.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},F=e=>{Oi.emit(Ai.RICH_TEXT_COMMAND,{action:e})},A=(0,s.iH)(""),Z=(0,s.iH)(!1);(0,i.YP)(u,(()=>Z.value=!1));const O=()=>{A.value=u.value.link},z=e=>{const t=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if(!e||!t.test(e))return ta.error("不是正确的网页链接地址");H("link",e),Z.value=!1};return(e,l)=>{const a=(0,i.up)("IconFontSize"),n=(0,i.up)("IconAddText"),o=(0,i.up)("IconText"),r=(0,i.up)("IconHighLight"),p=(0,i.up)("IconTextBold"),m=(0,i.up)("IconTextItalic"),$=(0,i.up)("IconTextUnderline"),R=(0,i.up)("IconStrikethrough"),P=(0,i.up)("IconCode"),B=(0,i.up)("IconQuote"),N=(0,i.up)("IconFormat"),j=(0,i.up)("IconFormatBrush"),Y=(0,i.up)("IconLinkOne"),V=(0,i.up)("IconAlignTextLeft"),J=(0,i.up)("IconAlignTextCenter"),q=(0,i.up)("IconAlignTextRight"),X=(0,i.up)("IconAlignTextBoth"),G=(0,i.up)("IconList"),K=(0,i.up)("IconDown"),Q=(0,i.up)("IconOrderedList"),ee=(0,i.up)("IconIndentLeft"),te=(0,i.up)("IconIndentRight"),le=(0,i.up)("IconRowHeight"),ae=(0,i.up)("IconVerticalSpacingBetweenItems"),ne=(0,i.up)("IconFullwidth"),ie=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",dg,[(0,i._)("div",pg,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"preset-style-item",key:e.label,style:(0,oe.j5)(e.style),onClick:t=>F(e.cmd)},(0,oe.zw)(e.label),13,vg))),64))]),(0,i.Wm)(Zc),(0,i.Wm)(ug,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(cp,{class:"font-select",style:{width:"60%"},value:(0,s.SU)(u).fontname,"onUpdate:value":l[0]||(l[0]=e=>H("fontname",e)),options:[...(0,s.SU)(c),...(0,s.SU)(M)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"]),(0,i.Wm)(cp,{style:{width:"40%"},value:(0,s.SU)(u).fontsize,"onUpdate:value":l[1]||(l[1]=e=>H("fontsize",e)),options:S.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).color,"onUpdate:modelValue":l[2]||(l[2]=e=>H("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{first:"",color:(0,s.SU)(u).color},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[ie,"文字颜色"]])])),_:1}),(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).backcolor,"onUpdate:modelValue":l[3]||(l[3]=e=>H("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{color:(0,s.SU)(u).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["color"])),[[ie,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{class:"font-size-btn",style:{width:"20%"},onClick:l[4]||(l[4]=e=>H("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("+")])),_:1})),[[ie,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:l[5]||(l[5]=e=>H("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("-")])),_:1})),[[ie,"减小字号"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).bold,onClick:l[6]||(l[6]=e=>H("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p)])),_:1},8,["checked"])),[[ie,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).em,onClick:l[7]||(l[7]=e=>H("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(m)])),_:1},8,["checked"])),[[ie,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).underline,onClick:l[8]||(l[8]=e=>H("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)($)])),_:1},8,["checked"])),[[ie,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).strikethrough,onClick:l[9]||(l[9]=e=>H("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(R)])),_:1},8,["checked"])),[[ie,"删除线"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).superscript,onClick:l[10]||(l[10]=e=>H("superscript"))},{default:(0,i.w5)((()=>[(0,i.Uk)("A²")])),_:1},8,["checked"])),[[ie,"上标"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).subscript,onClick:l[11]||(l[11]=e=>H("subscript"))},{default:(0,i.w5)((()=>[(0,i.Uk)("A₂")])),_:1},8,["checked"])),[[ie,"下标"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).code,onClick:l[12]||(l[12]=e=>H("code"))},{default:(0,i.w5)((()=>[(0,i.Wm)(P)])),_:1},8,["checked"])),[[ie,"行内代码"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).blockquote,onClick:l[13]||(l[13]=e=>H("blockquote"))},{default:(0,i.w5)((()=>[(0,i.Wm)(B)])),_:1},8,["checked"])),[[ie,"引用"]])])),_:1}),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{first:"",style:{flex:"1"},onClick:l[14]||(l[14]=e=>H("clear"))},{default:(0,i.w5)((()=>[(0,i.Wm)(N)])),_:1})),[[ie,"清除格式"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:!!(0,s.SU)(d),onClick:l[15]||(l[15]=e=>(0,s.SU)(v)()),onDblclick:l[16]||(l[16]=e=>(0,s.SU)(v)(!0))},{default:(0,i.w5)((()=>[(0,i.Wm)(j)])),_:1},8,["checked"])),[[ie,"格式刷(双击连续使用)"]]),(0,i.Wm)(dn,{placement:"bottom-end",trigger:"click",value:Z.value,"onUpdate:value":l[21]||(l[21]=e=>Z.value=e),style:{width:"33.33%"}},{content:(0,i.w5)((()=>[(0,i._)("div",mg,[(0,i.Wm)(sn,{value:A.value,"onUpdate:value":l[17]||(l[17]=e=>A.value=e),placeholder:"请输入超链接"},null,8,["value"]),(0,i._)("div",hg,[(0,i.Wm)(tp,{size:"small",disabled:!(0,s.SU)(u).link,onClick:l[18]||(l[18]=e=>z()),style:{"margin-right":"5px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("移除")])),_:1},8,["disabled"]),(0,i.Wm)(tp,{size:"small",type:"primary",onClick:l[19]||(l[19]=e=>z(A.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{last:"",style:{width:"100%"},checked:!!(0,s.SU)(u).link,onClick:l[20]||(l[20]=e=>O())},{default:(0,i.w5)((()=>[(0,i.Wm)(Y)])),_:1},8,["checked"])),[[ie,"超链接"]])])),_:1},8,["value"])])),_:1}),(0,i.Wm)(Zc),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:(0,s.SU)(u).align,"onUpdate:value":l[22]||(l[22]=e=>H("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(V)])),_:1})),[[ie,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(J)])),_:1})),[[ie,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(q)])),_:1})),[[ie,"右对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"justify",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(X)])),_:1})),[[ie,"两端对齐"]])])),_:1},8,["value"]),(0,i._)("div",fg,[(0,i.Wm)(Kf,{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{first:"",type:(0,s.SU)(u).bulletList?"primary":"default",style:{flex:"1"},onClick:l[23]||(l[23]=e=>H("bulletList"))},{default:(0,i.w5)((()=>[(0,i.Wm)(G)])),_:1},8,["type"])),[[ie,"项目符号"]]),(0,i.Wm)(dn,{trigger:"click",value:h.value,"onUpdate:value":l[24]||(l[24]=e=>h.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",gg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(w.value,(e=>((0,i.wg)(),(0,i.iD)("ul",{class:"list",key:e,style:(0,oe.j5)({listStyleType:e}),onClick:t=>H("bulletList",e)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(3,(e=>(0,i._)("li",{class:"list-item",key:e},xg))),64))],12,yg)))),128))])])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1}),kg,(0,i.Wm)(Kf,{style:{flex:"1"},passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{first:"",type:(0,s.SU)(u).orderedList?"primary":"default",style:{flex:"1"},onClick:l[25]||(l[25]=e=>H("orderedList"))},{default:(0,i.w5)((()=>[(0,i.Wm)(Q)])),_:1},8,["type"])),[[ie,"编号"]]),(0,i.Wm)(dn,{trigger:"click",value:f.value,"onUpdate:value":l[26]||(l[26]=e=>f.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",bg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(x.value,(e=>((0,i.wg)(),(0,i.iD)("ul",{class:"list",key:e,style:(0,oe.j5)({listStyleType:e}),onClick:t=>H("orderedList",e)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(3,(e=>(0,i._)("li",{class:"list-item",key:e},Sg))),64))],12,_g)))),128))])])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1})]),(0,i._)("div",Cg,[(0,i.Wm)(Kf,{style:{flex:"1"},passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{first:"",style:{flex:"1"},onClick:l[27]||(l[27]=e=>H("indent","-1"))},{default:(0,i.w5)((()=>[(0,i.Wm)(ee)])),_:1})),[[ie,"减小段落缩进"]]),(0,i.Wm)(dn,{trigger:"click",value:g.value,"onUpdate:value":l[29]||(l[29]=e=>g.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(mn,{onClick:l[28]||(l[28]=e=>H("textIndent","-1"))},{default:(0,i.w5)((()=>[(0,i.Uk)("减小首行缩进")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1}),Lg,(0,i.Wm)(Kf,{style:{flex:"1"},passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{first:"",style:{flex:"1"},onClick:l[30]||(l[30]=e=>H("indent","+1"))},{default:(0,i.w5)((()=>[(0,i.Wm)(te)])),_:1})),[[ie,"增大段落缩进"]]),(0,i.Wm)(dn,{trigger:"click",value:y.value,"onUpdate:value":l[32]||(l[32]=e=>y.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(mn,{onClick:l[31]||(l[31]=e=>H("textIndent","+1"))},{default:(0,i.w5)((()=>[(0,i.Uk)("增大首行缩进")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1})]),(0,i.Wm)(Zc),(0,i._)("div",Tg,[Eg,(0,i.Wm)(cp,{style:{width:"60%"},value:b.value||1,"onUpdate:value":l[33]||(l[33]=e=>E(e)),options:C.map((e=>({label:e+"倍",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(le)])),_:1},8,["value","options"])]),(0,i._)("div",Mg,[Ug,(0,i.Wm)(cp,{style:{width:"60%"},value:I.value||0,"onUpdate:value":l[34]||(l[34]=e=>U(e)),options:T.map((e=>({label:e+"px",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(ae)])),_:1},8,["value","options"])]),(0,i._)("div",Wg,[Dg,(0,i.Wm)(cp,{style:{width:"60%"},value:_.value||0,"onUpdate:value":l[35]||(l[35]=e=>W(e)),options:L.map((e=>({label:e+"px",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(ne)])),_:1},8,["value","options"])]),(0,i._)("div",Hg,[Fg,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:k.value,"onUpdate:modelValue":l[36]||(l[36]=e=>D(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:k.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Zc),(0,i.Wm)(Cf),(0,i.Wm)(Zc),(0,i.Wm)(Pf),(0,i.Wm)(Zc),(0,i.Wm)(lh)])}}});const $g=(0,Vl.Z)(Ag,[["__scopeId","data-v-4cf37a85"]]);var Zg=$g;const Og={class:"element-flip"};var Rg=(0,i.aZ)({__name:"ElementFlip",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=(0,s.iH)(!1),n=(0,s.iH)(!1);(0,i.YP)(l,(()=>{!l.value||"image"!==l.value.type&&"shape"!==l.value.type||(a.value=!!l.value.flipH,n.value=!!l.value.flipV)}),{deep:!0,immediate:!0});const{addHistorySnapshot:r}=da(),u=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),r())};return(e,t)=>{const l=(0,i.up)("IconFlipVertically"),o=(0,i.up)("IconFlipHorizontally");return(0,i.wg)(),(0,i.iD)("div",Og,[(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(qf,{style:{flex:"1"},checked:n.value,onClick:t[0]||(t[0]=e=>u({flipV:!n.value}))},{default:(0,i.w5)((()=>[(0,i.Wm)(l),(0,i.Uk)(" 垂直翻转")])),_:1},8,["checked"]),(0,i.Wm)(qf,{style:{flex:"1"},checked:a.value,onClick:t[1]||(t[1]=e=>u({flipH:!a.value}))},{default:(0,i.w5)((()=>[(0,i.Wm)(o),(0,i.Uk)(" 水平翻转")])),_:1},8,["checked"])])),_:1})])}}});const zg=(0,Vl.Z)(Rg,[["__scopeId","data-v-7571b056"]]);var Pg=zg;const Bg=e=>((0,i.dD)("data-v-2c8acf3c"),e=e(),(0,i.Cn)(),e),Ng={class:"element-filter"},jg={class:"row"},Yg=Bg((()=>(0,i._)("div",{style:{flex:"2"}},"启用滤镜:",-1))),Vg={class:"switch-wrapper",style:{flex:"3"}},Jg={key:0,class:"filter"},qg={class:"name"};var Xg=(0,i.aZ)({__name:"ElementFilter",setup(e){const t=[{label:"模糊",key:"blur",default:0,value:0,unit:"px",max:10,step:1},{label:"亮度",key:"brightness",default:100,value:100,unit:"%",max:200,step:5},{label:"对比度",key:"contrast",default:100,value:100,unit:"%",max:200,step:5},{label:"灰度",key:"grayscale",default:0,value:0,unit:"%",max:100,step:5},{label:"饱和度",key:"saturate",default:100,value:100,unit:"%",max:200,step:5},{label:"色相",key:"hue-rotate",default:0,value:0,unit:"deg",max:360,step:10},{label:"不透明度",key:"opacity",default:100,value:100,unit:"%",max:100,step:5}],l=$(),{handleElement:a,handleElementId:n}=(0,o.Jk)(R()),r=(0,s.iH)(JSON.parse(JSON.stringify(t))),u=(0,s.iH)(!1),{addHistorySnapshot:c}=da();(0,i.YP)(a,(()=>{if(!a.value||"image"!==a.value.type)return;const e=a.value.filters;e?(r.value=t.map((t=>{const l=e[t.key];return l?{...t,value:parseInt(l)}:t})),u.value=!0):(r.value=JSON.parse(JSON.stringify(t)),u.value=!1)}),{deep:!0,immediate:!0});const d=(e,t)=>{const o=a.value,i=o.filters||{},s={...i,[e.key]:`${t}${e.unit}`};l.updateElement({id:n.value,props:{filters:s}}),c()},p=e=>{a.value&&(e?l.updateElement({id:a.value.id,props:{filters:{}}}):l.removeElementProps({id:a.value.id,propName:"filters"}),c())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ng,[(0,i._)("div",jg,[Yg,(0,i._)("div",Vg,[(0,i.Wm)(pf,{value:u.value,"onUpdate:value":t[0]||(t[0]=e=>p(e))},null,8,["value"])])]),u.value?((0,i.wg)(),(0,i.iD)("div",Jg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(r.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"filter-item",key:e.key},[(0,i._)("div",qg,(0,oe.zw)(e.label),1),(0,i.Wm)(qm,{class:"filter-slider",max:e.max,min:0,step:e.step,value:e.value,"onUpdate:value":t=>d(e,t)},null,8,["max","step","value","onUpdate:value"])])))),128))])):(0,i.kq)("",!0)]))}});const Gg=(0,Vl.Z)(Xg,[["__scopeId","data-v-2c8acf3c"]]);var Kg=Gg;const Qg=e=>((0,i.dD)("data-v-0ae0ff99"),e=e(),(0,i.Cn)(),e),ey={class:"element-color-mask"},ty={class:"row"},ly=Qg((()=>(0,i._)("div",{style:{width:"40%"}},"着色(蒙版):",-1))),ay={class:"switch-wrapper",style:{width:"60%"}},ny={key:0,class:"row",style:{"margin-top":"15px"}},oy=Qg((()=>(0,i._)("div",{style:{width:"40%"}},"蒙版颜色:",-1))),iy="rgba(226, 83, 77, 0.5)";var sy=(0,i.aZ)({__name:"ElementColorMask",setup(e){const t=$(),{handleElement:l,handleElementId:a}=(0,o.Jk)(R()),n=(0,s.iH)(iy),r=(0,s.iH)(!1),{addHistorySnapshot:u}=da();(0,i.YP)(l,(()=>{l.value&&"image"===l.value.type&&(l.value.colorMask?(n.value=l.value.colorMask,r.value=!0):r.value=!1)}),{deep:!0,immediate:!0});const c=e=>{l.value&&(e?t.updateElement({id:l.value.id,props:{colorMask:iy}}):t.removeElementProps({id:l.value.id,propName:"colorMask"}),u())},d=e=>{t.updateElement({id:a.value,props:{colorMask:e}}),u()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ey,[(0,i._)("div",ty,[ly,(0,i._)("div",ay,[(0,i.Wm)(pf,{value:r.value,"onUpdate:value":t[0]||(t[0]=e=>c(e))},null,8,["value"])])]),r.value?((0,i.wg)(),(0,i.iD)("div",ny,[oy,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=e=>d(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:n.value},null,8,["color"])])),_:1})])):(0,i.kq)("",!0)]))}});const ry=(0,Vl.Z)(sy,[["__scopeId","data-v-0ae0ff99"]]);var uy=ry;const cy=e=>((0,i.dD)("data-v-080b6de7"),e=e(),(0,i.Cn)(),e),dy={class:"image-style-panel"},py={class:"clip"},vy=cy((()=>(0,i._)("div",{class:"title"},"按形状:",-1))),my={class:"shape-clip"},hy=["onClick"],fy={key:0,class:"title"};var gy=(0,i.aZ)({__name:"ImageStylePanel",setup(e){const t=Kn,l=[{label:"纵横比(正方形)",children:[{key:"1:1",ratio:1}]},{label:"纵横比(纵向)",children:[{key:"2:3",ratio:1.5},{key:"3:4",ratio:4/3},{key:"3:5",ratio:5/3},{key:"4:5",ratio:5/4}]},{label:"纵横比(横向)",children:[{key:"3:2",ratio:2/3},{key:"4:3",ratio:3/4},{key:"5:3",ratio:.6},{key:"5:4",ratio:.8}]},{children:[{key:"16:9",ratio:9/16},{key:"16:10",ratio:.625}]}],a=R(),n=$(),{handleElement:r,handleElementId:u}=(0,o.Jk)(a),{currentSlide:c}=(0,o.Jk)(n),d=r,p=(0,s.iH)(!1),{addHistorySnapshot:v}=da(),m=()=>{a.setClipingImageElementId(u.value),p.value=!1},h=()=>{const e=r.value,t=e.width,l=e.height,a=e.left,n=e.top,o=e.clip?e.clip.range:[[0,0],[100,100]],i=t/((o[1][0]-o[0][0])/100),s=l/((o[1][1]-o[0][1])/100),u=a-i*(o[0][0]/100),c=n-s*(o[0][1]/100);return{originClipRange:o,originWidth:i,originHeight:s,originLeft:u,originTop:c}},f=(e,t=0)=>{const l=r.value,{originClipRange:a,originWidth:o,originHeight:i,originLeft:s,originTop:c}=h();if(t){const a=i/o,r=0,d=100;let p;if(a>t){const e=(1-t/a)/2*100;p=[[r,e],[d,d-e]]}else{const e=(1-a/t)/2*100;p=[[e,r],[d-e,d]]}n.updateElement({id:u.value,props:{clip:{...l.clip,shape:e,range:p},left:s+o*(p[0][0]/100),top:c+i*(p[0][1]/100),width:o*(p[1][0]-p[0][0])/100,height:i*(p[1][1]-p[0][1])/100}})}else n.updateElement({id:u.value,props:{clip:{...l.clip,shape:e,range:a}}});m(),v()},g=e=>{const t=e[0];t&&(na(t).then((e=>{const t={src:e};n.updateElement({id:u.value,props:t})})),v())},y=()=>{const e=r.value;if(e.clip){const{originWidth:e,originHeight:t,originLeft:l,originTop:a}=h();n.updateElement({id:u.value,props:{left:l,top:a,width:e,height:t}})}n.removeElementProps({id:u.value,propName:["clip","outline","flip","shadow","filters","colorMask"]}),v()},w=()=>{const e=r.value,t={...c.value.background,type:"image",image:e.src,imageSize:"cover"};n.updateSlide({background:t}),v()};return(e,a)=>{const n=(0,i.up)("IconTailoring"),o=(0,i.up)("IconDown"),r=(0,i.up)("IconTransform"),u=(0,i.up)("IconUndo"),c=(0,i.up)("IconTheme");return(0,i.wg)(),(0,i.iD)("div",dy,[(0,i._)("div",{class:"origin-image",style:(0,oe.j5)({backgroundImage:`url(${(0,s.SU)(d).src})`})},null,4),(0,i.Wm)(Pg),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{first:"",style:{width:"calc(100% / 6 * 5)"},onClick:a[0]||(a[0]=e=>m())},{default:(0,i.w5)((()=>[(0,i.Wm)(n,{class:"btn-icon"}),(0,i.Uk)(" 裁剪图片")])),_:1}),(0,i.Wm)(dn,{trigger:"click",value:p.value,"onUpdate:value":a[1]||(a[1]=e=>p.value=e),style:{width:"calc(100% / 6)"}},{content:(0,i.w5)((()=>[(0,i._)("div",py,[vy,(0,i._)("div",my,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(t),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"shape-clip-item",key:t,onClick:e=>f(t)},[(0,i._)("div",{class:"shape",style:(0,oe.j5)({clipPath:e.style})},null,4)],8,hy)))),128))]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.label},[e.label?((0,i.wg)(),(0,i.iD)("div",fy,"按"+(0,oe.zw)(e.label)+":",1)):(0,i.kq)("",!0),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,(e=>((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},key:e.key,onClick:t=>f("rect",e.ratio)},{default:(0,i.w5)((()=>[(0,i.Uk)((0,oe.zw)(e.key),1)])),_:2},1032,["onClick"])))),128))])),_:2},1024)],64)))),64))])])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{last:"",class:"popover-btn",style:{width:"100%"}},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1})])),_:1},8,["value"])])),_:1}),(0,i.Wm)(Zc),(0,i.Wm)(uy),(0,i.Wm)(Zc),(0,i.Wm)(Kg),(0,i.Wm)(Zc),(0,i.Wm)(Cf),(0,i.Wm)(Zc),(0,i.Wm)(Pf),(0,i.Wm)(Zc),(0,i.Wm)(Pa,{onChange:a[2]||(a[2]=e=>g(e))},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{class:"full-width-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(r,{class:"btn-icon"}),(0,i.Uk)(" 替换图片")])),_:1})])),_:1}),(0,i.Wm)(tp,{class:"full-width-btn",onClick:a[3]||(a[3]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Wm)(u,{class:"btn-icon"}),(0,i.Uk)(" 重置样式")])),_:1}),(0,i.Wm)(tp,{class:"full-width-btn",onClick:a[4]||(a[4]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Wm)(c,{class:"btn-icon"}),(0,i.Uk)(" 设为背景")])),_:1})])}}});const yy=(0,Vl.Z)(gy,[["__scopeId","data-v-080b6de7"]]);var wy=yy,xy=()=>{const e=R(),{shapeFormatPainter:t,handleElement:l}=(0,o.Jk)(e),a=(a=!1)=>{const n=l.value;t.value?e.setShapeFormatPainter(null):e.setShapeFormatPainter({keep:a,fill:n.fill,gradient:n.gradient,outline:n.outline,opacity:n.opacity,shadow:n.shadow})};return{toggleShapeFormatPainter:a}};const ky=e=>((0,i.dD)("data-v-0674f2cf"),e=e(),(0,i.Cn)(),e),by={class:"shape-style-panel"},_y={class:"title"},Iy=ky((()=>(0,i._)("span",null,"点击替换形状",-1))),Sy={class:"shape-pool"},Cy={class:"shape-list"},Ly={class:"row"},Ty=ky((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Ey={class:"row"},My=ky((()=>(0,i._)("div",{style:{width:"40%"}},"起点颜色:",-1))),Uy={class:"row"},Wy=ky((()=>(0,i._)("div",{style:{width:"40%"}},"终点颜色:",-1))),Dy={key:0,class:"row"},Hy=ky((()=>(0,i._)("div",{style:{width:"40%"}},"渐变角度:",-1))),Fy={class:"row"};var Ay=(0,i.aZ)({__name:"ShapeStylePanel",setup(e){const t=R(),l=$(),{handleElement:a,handleElementId:n,richTextAttrs:r,availableFonts:u,textFormatPainter:c,shapeFormatPainter:d}=(0,o.Jk)(t),p=a,v=(0,s.iH)("#000"),m=(0,s.iH)({type:"linear",rotate:0,color:["#fff","#fff"]}),h=(0,s.iH)("fill"),f=(0,s.iH)("middle");(0,i.YP)(a,(()=>{a.value&&"shape"===a.value.type&&(v.value=a.value.fill||"#fff",m.value=a.value.gradient||{type:"linear",rotate:0,color:[v.value,"#fff"]},h.value=a.value.gradient?"gradient":"fill",f.value=a.value?.text?.align||"middle")}),{deep:!0,immediate:!0});const{addHistorySnapshot:g}=da(),{toggleTextFormatPainter:y}=zm(),{toggleShapeFormatPainter:w}=xy(),x=e=>{l.updateElement({id:n.value,props:e}),g()},k=e=>{"fill"===e?(l.removeElementProps({id:n.value,propName:"gradient"}),g()):x({gradient:m.value})},b=e=>{if(!m.value)return;const t={...m.value,...e};x({gradient:t})},_=e=>{x({fill:e})},I=e=>{const{width:t,height:l}=a.value,n={viewBox:e.viewBox,path:e.path,special:e.special};if(e.pathFormula){n.pathFormula=e.pathFormula,n.viewBox=[t,l];const a=ra[e.pathFormula];"editable"in a?(n.path=a.formula(t,l,a.defaultValue),n.keypoint=a.defaultValue):n.path=a.formula(t,l)}else n.pathFormula=void 0,n.keypoint=void 0;x(n)},S=e=>{const t=a.value,l={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"},n=t.text||l;x({text:{...n,align:e}})},C=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],L=(e,t)=>{Oi.emit(Ai.RICH_TEXT_COMMAND,{action:{command:e,value:t}})};return(e,t)=>{const l=(0,i.up)("IconDown"),a=(0,i.up)("IconFontSize"),n=(0,i.up)("IconAddText"),o=(0,i.up)("IconText"),g=(0,i.up)("IconHighLight"),x=(0,i.up)("IconTextBold"),T=(0,i.up)("IconTextItalic"),E=(0,i.up)("IconTextUnderline"),U=(0,i.up)("IconStrikethrough"),W=(0,i.up)("IconFormat"),D=(0,i.up)("IconFormatBrush"),H=(0,i.up)("IconAlignTextLeft"),F=(0,i.up)("IconAlignTextCenter"),A=(0,i.up)("IconAlignTextRight"),$=(0,i.up)("IconAlignTextTopOne"),Z=(0,i.up)("IconAlignTextMiddleOne"),O=(0,i.up)("IconAlignTextBottomOne"),R=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",by,[(0,i._)("div",_y,[Iy,(0,i.Wm)(l)]),(0,i._)("div",Sy,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ua),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",Cy,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,["任意多边形"!==e.title?((0,i.wg)(),(0,i.j4)(Hp,{class:"shape-item",key:t,shape:e,onClick:t=>I(e)},null,8,["shape","onClick"])):(0,i.kq)("",!0)],64)))),256))])])))),128))]),(0,i._)("div",Ly,[(0,i.Wm)(cp,{style:{flex:"1"},value:h.value,"onUpdate:value":t[0]||(t[0]=e=>k(e)),options:[{label:"纯色填充",value:"fill"},{label:"渐变填充",value:"gradient"}]},null,8,["value"]),Ty,"fill"===h.value?((0,i.wg)(),(0,i.j4)(dn,{key:0,trigger:"click",style:{flex:"1"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:v.value,"onUpdate:modelValue":t[1]||(t[1]=e=>_(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:v.value},null,8,["color"])])),_:1})):((0,i.wg)(),(0,i.j4)(cp,{key:1,style:{flex:"1"},value:m.value.type,"onUpdate:value":t[2]||(t[2]=e=>b({type:e})),options:[{label:"线性渐变",value:"linear"},{label:"径向渐变",value:"radial"}]},null,8,["value"]))]),"gradient"===h.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Ey,[My,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:m.value.color[0],"onUpdate:modelValue":t[3]||(t[3]=e=>b({color:[e,m.value.color[1]]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:m.value.color[0]},null,8,["color"])])),_:1})]),(0,i._)("div",Uy,[Wy,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:m.value.color[1],"onUpdate:modelValue":t[4]||(t[4]=e=>b({color:[m.value.color[0],e]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:m.value.color[1]},null,8,["color"])])),_:1})]),"linear"===m.value.type?((0,i.wg)(),(0,i.iD)("div",Dy,[Hy,(0,i.Wm)(qm,{style:{width:"60%"},min:0,max:360,step:15,value:m.value.rotate,"onUpdate:value":t[5]||(t[5]=e=>b({rotate:e}))},null,8,["value"])])):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0),(0,i.Wm)(Pg),(0,i.Wm)(Zc),(0,s.SU)(p).text?.content?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(ug,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(cp,{class:"font-select",style:{width:"60%"},value:(0,s.SU)(r).fontname,"onUpdate:value":t[6]||(t[6]=e=>L("fontname",e)),options:[...(0,s.SU)(u),...(0,s.SU)(M)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"]),(0,i.Wm)(cp,{style:{width:"40%"},value:(0,s.SU)(r).fontsize,"onUpdate:value":t[7]||(t[7]=e=>L("fontsize",e)),options:C.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(r).color,"onUpdate:modelValue":t[8]||(t[8]=e=>L("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{first:"",color:(0,s.SU)(r).color},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[R,"文字颜色"]])])),_:1}),(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(r).backcolor,"onUpdate:modelValue":t[9]||(t[9]=e=>L("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{color:(0,s.SU)(r).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1},8,["color"])),[[R,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{class:"font-size-btn",style:{width:"20%"},onClick:t[10]||(t[10]=e=>L("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("+")])),_:1})),[[R,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:t[11]||(t[11]=e=>L("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("-")])),_:1})),[[R,"减小字号"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(r).bold,onClick:t[12]||(t[12]=e=>L("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(x)])),_:1},8,["checked"])),[[R,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(r).em,onClick:t[13]||(t[13]=e=>L("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["checked"])),[[R,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(r).underline,onClick:t[14]||(t[14]=e=>L("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(E)])),_:1},8,["checked"])),[[R,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(r).strikethrough,onClick:t[15]||(t[15]=e=>L("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(U)])),_:1},8,["checked"])),[[R,"删除线"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},onClick:t[16]||(t[16]=e=>L("clear"))},{default:(0,i.w5)((()=>[(0,i.Wm)(W)])),_:1})),[[R,"清除格式"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:!!(0,s.SU)(c),onClick:t[17]||(t[17]=e=>(0,s.SU)(y)()),onDblclick:t[18]||(t[18]=e=>(0,s.SU)(y)(!0))},{default:(0,i.w5)((()=>[(0,i.Wm)(D)])),_:1},8,["checked"])),[[R,"格式刷(双击连续使用)"]])])),_:1}),(0,i.Wm)(Zc),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:(0,s.SU)(r).align,"onUpdate:value":t[19]||(t[19]=e=>L("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(H)])),_:1})),[[R,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(F)])),_:1})),[[R,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(A)])),_:1})),[[R,"右对齐"]])])),_:1},8,["value"]),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:f.value,"onUpdate:value":t[20]||(t[20]=e=>S(e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"top",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)($)])),_:1})),[[R,"顶对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"middle",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(Z)])),_:1})),[[R,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"bottom",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(O)])),_:1})),[[R,"底对齐"]])])),_:1},8,["value"]),(0,i.Wm)(Zc)],64)):(0,i.kq)("",!0),(0,i.Wm)(Cf),(0,i.Wm)(Zc),(0,i.Wm)(Pf),(0,i.Wm)(Zc),(0,i.Wm)(lh),(0,i.Wm)(Zc),(0,i._)("div",Fy,[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:!!(0,s.SU)(d),onClick:t[21]||(t[21]=e=>(0,s.SU)(w)()),onDblclick:t[22]||(t[22]=e=>(0,s.SU)(w)(!0))},{default:(0,i.w5)((()=>[(0,i.Wm)(D),(0,i.Uk)(" 形状格式刷")])),_:1},8,["checked"])),[[R,"双击连续使用"]])])])}}});const $y=(0,Vl.Z)(Ay,[["__scopeId","data-v-0674f2cf"]]);var Zy=$y;const Oy=e=>((0,i.dD)("data-v-ae80032c"),e=e(),(0,i.Cn)(),e),Ry={class:"line-style-panel"},zy={class:"row"},Py=Oy((()=>(0,i._)("div",{style:{width:"40%"}},"线条样式:",-1))),By={class:"row"},Ny=Oy((()=>(0,i._)("div",{style:{width:"40%"}},"线条颜色:",-1))),jy={class:"row"},Yy=Oy((()=>(0,i._)("div",{style:{width:"40%"}},"线条宽度:",-1))),Vy={class:"row"},Jy=Oy((()=>(0,i._)("div",{style:{width:"40%"}},"起点样式:",-1))),qy={class:"row"},Xy=Oy((()=>(0,i._)("div",{style:{width:"40%"}},"终点样式:",-1)));var Gy=(0,i.aZ)({__name:"LineStylePanel",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=l,{addHistorySnapshot:n}=da(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ry,[(0,i._)("div",zy,[Py,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(a).style,"onUpdate:value":t[0]||(t[0]=e=>r({style:e})),options:[{label:"实线",value:"solid"},{label:"虚线",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",By,[Ny,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[1]||(t[1]=e=>r({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",jy,[Yy,(0,i.Wm)(mv,{value:(0,s.SU)(a).width,"onUpdate:value":t[2]||(t[2]=e=>r({width:e})),style:{width:"60%"}},null,8,["value"])]),(0,i._)("div",Vy,[Jy,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(a).points[0],"onUpdate:value":t[3]||(t[3]=e=>r({points:[e,(0,s.SU)(a).points[1]]})),options:[{label:"无",value:""},{label:"箭头",value:"arrow"},{label:"圆点",value:"dot"}]},null,8,["value"])]),(0,i._)("div",qy,[Xy,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(a).points[1],"onUpdate:value":t[4]||(t[4]=e=>r({points:[(0,s.SU)(a).points[0],e]})),options:[{label:"无",value:""},{label:"箭头",value:"arrow"},{label:"圆点",value:"dot"}]},null,8,["value"])]),(0,i.Wm)(Zc),(0,i.Wm)(Pf)]))}});const Ky=(0,Vl.Z)(Gy,[["__scopeId","data-v-ae80032c"]]);var Qy=Ky;const ew={class:"chart-data-editor"},tw={class:"editor-content"},lw={class:"range-box"},aw=["id","onFocus","onPaste"],nw={class:"btns"},ow={class:"left"},iw={class:"right"},sw=100,rw=32;var uw=(0,i.aZ)({__name:"ChartDataEditor",props:{data:{}},emits:["save","close"],setup(e,{emit:t}){const l=e,a=t,o=(0,s.iH)([0,0]),r=(0,s.iH)({width:0,height:0}),u=(0,s.iH)(null),c=(0,i.Fl)((()=>{const e=o.value[0]*sw,t=o.value[1]*rw;return[{type:"t",style:{width:e+"px"}},{type:"b",style:{top:t+"px",width:e+"px"}},{type:"l",style:{height:t+"px"}},{type:"r",style:{left:e+"px",height:t+"px"}}]})),d=(0,i.Fl)((()=>{const e=o.value[0]*sw,t=o.value[1]*rw;return{left:e+"px",top:t+"px"}})),p=()=>{const e=[],{labels:t,legends:a,series:n}=l.data,i=t.length,s=n.length;e.push(["",...a]);for(let l=0;l{if(!u.value)return;const[e,t]=u.value,l=document.querySelector(`#cell-${e+1}-${t}`);l&&l.focus()},m=e=>{const t=e.key.toUpperCase();t===ne.ENTER&&v()};(0,i.bv)((()=>{document.addEventListener("keydown",m)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",m)}));const h=()=>{const[e,t]=o.value,l=[],n=[],i=[];for(let a=1;a{for(let e=1;e<31;e++)for(let t=1;t<7;t++){const l=document.querySelector(`#cell-${e}-${t}`);l&&(l.value="")}},g=(e,t,l)=>{if(e.preventDefault(),!e.clipboardData)return;const a=e.clipboardData.items[0];a&&"string"===a.kind&&"text/plain"===a.type&&a.getAsString((e=>{const a=fe(e);if("object"===typeof a)return;const n=ge(e);if(n){const e=t+n.length,a=l+n[0].length;for(let o=t;oa("close"),w=e=>{let t=!0;const l=e.pageX,a=e.pageY,n=o.value[0]*sw,i=o.value[1]*rw;document.onmousemove=e=>{if(!t)return;const o=e.pageX,s=e.pageY,u=o-l,c=s-a,d=n+u,p=i+c;r.value={width:d,height:p}},document.onmouseup=e=>{t=!1,document.onmousemove=null,document.onmouseup=null;const n=e.pageX,i=e.pageY;if(l===n&&a===i)return;let s=r.value.width,u=r.value.height;s%sw>.5*sw&&(s+=sw-s%sw),u%rw>.5*rw&&(u+=rw-u%rw);let c=Math.round(u/rw),d=Math.round(s/sw);c<3&&(c=3),d<2&&(d=2),o.value=[d,c],r.value={width:0,height:0}}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ew,[(0,i._)("div",tw,[(0,i._)("div",lw,[(0,i._)("div",{class:"temp-range",style:(0,oe.j5)({width:r.value.width+"px",height:r.value.height+"px"})},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(c.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["range-line",e.type]),key:e.type,style:(0,oe.j5)(e.style)},null,6)))),128)),(0,i._)("div",{class:"resizable",style:(0,oe.j5)(d.value),onMousedown:t[0]||(t[0]=(0,n.iM)((e=>w(e)),["stop"]))},null,36)]),(0,i._)("table",null,[(0,i._)("tbody",null,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(31,(e=>(0,i._)("tr",{key:e},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(7,(t=>(0,i._)("td",{key:t,class:(0,oe.C_)({head:1===t&&e<=o.value[1]||1===e&&t<=o.value[0]})},[(0,i._)("input",{class:(0,oe.C_)(["item",{selected:e<=o.value[1]&&t<=o.value[0]}]),id:`cell-${e-1}-${t-1}`,autocomplete:"off",onFocus:l=>u.value=[e-1,t-1],onPaste:l=>g(l,e-1,t-1)},null,42,aw)],2))),64))]))),64))])])]),(0,i._)("div",nw,[(0,i._)("div",ow,[(0,i.Wm)(tp,{class:"btn",onClick:t[1]||(t[1]=e=>f())},{default:(0,i.w5)((()=>[(0,i.Uk)("清空")])),_:1})]),(0,i._)("div",iw,[(0,i.Wm)(tp,{class:"btn",onClick:t[2]||(t[2]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{type:"primary",class:"btn",onClick:t[3]||(t[3]=e=>h()),style:{"margin-left":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])]))}});const cw=(0,Vl.Z)(uw,[["__scopeId","data-v-f7b59928"]]);var dw=cw;const pw=e=>((0,i.dD)("data-v-26bf4835"),e=e(),(0,i.Cn)(),e),vw=pw((()=>(0,i._)("span",{class:"checkbox-input"},null,-1))),mw=pw((()=>(0,i._)("input",{class:"checkbox-original",type:"checkbox"},null,-1))),hw={class:"checkbox-label"};var fw=(0,i.aZ)({__name:"Checkbox",props:{value:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=t,n=e=>{l.disabled||a("update:value",e.target.checked)};return(e,t)=>((0,i.wg)(),(0,i.iD)("label",{class:(0,oe.C_)(["checkbox",{checked:e.value,disabled:e.disabled}]),onChange:t[0]||(t[0]=e=>n(e))},[vw,mw,(0,i._)("span",hw,[(0,i.WI)(e.$slots,"default")])],34))}});const gw=(0,Vl.Z)(fw,[["__scopeId","data-v-26bf4835"]]);var yw=gw;const ww=e=>((0,i.dD)("data-v-45827db6"),e=e(),(0,i.Cn)(),e),xw={class:"chart-style-panel"},kw={class:"row"},bw={class:"row"},_w={key:1,class:"row"},Iw={key:2,class:"row"},Sw={class:"row"},Cw=ww((()=>(0,i._)("div",{style:{width:"40%"}},"图例:",-1))),Lw={class:"row"},Tw=ww((()=>(0,i._)("div",{style:{width:"40%"}},"背景填充:",-1))),Ew={class:"row"},Mw=ww((()=>(0,i._)("div",{style:{width:"40%"}},"网格颜色:",-1))),Uw={style:{width:"40%"}},Ww={class:"color-btn-wrap",style:{width:"100%"}},Dw=["onClick"],Hw={class:"preset-themes"},Fw=["onClick","onMouseenter"];var Aw=(0,i.aZ)({__name:"index",setup(e){const t=[["#d87c7c","#919e8b","#d7ab82","#6e7074","#61a0a8","#efa18d"],["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78"],["#516b91","#59c4e6","#edafda","#93b7e3","#a5e7f0","#cbb0e3"],["#893448","#d95850","#eb8146","#ffb248","#f2d643","#ebdba4"],["#4ea397","#22c3aa","#7bd9a5","#d0648a","#f58db2","#f2b3c9"],["#3fb1e3","#6be6c1","#626c91","#a0a7e6","#c4ebad","#96dee8"],["#fc97af","#87f7cf","#f7f494","#72ccff","#f7c5a0","#d4a4eb"],["#c1232b","#27727b","#fcce10","#e87c25","#b5c334","#fe8463"],["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3"],["#e01f54","#001852","#f5e8c8","#b8d2c7","#c6b38e","#a4d8c2"],["#c12e34","#e6b600","#0098d9","#2b821d","#005eaa","#339ca8"],["#8a7ca8","#e098c7","#8fd3e8","#71669e","#cc70af","#7cb4cc"]],l=R(),a=$(),{handleElement:r,handleElementId:u}=(0,o.Jk)(l),{theme:c}=(0,o.Jk)(a),d=r,p=(0,s.iH)(!1),v=(0,s.iH)(!1),m=(0,s.iH)([-1,-1]),{addHistorySnapshot:h}=da(),f=(0,s.iH)("#000"),g=(0,s.iH)([]),y=(0,s.iH)(""),w=(0,s.iH)(""),x=(0,s.iH)(!0),k=(0,s.iH)(!0),b=(0,s.iH)(!1),_=(0,s.iH)(!1),I=(0,s.iH)(!1),S=(0,s.iH)(!1);(0,i.YP)(r,(()=>{if(r.value&&"chart"===r.value.type){if(f.value=r.value.fill||"#fff",r.value.options){const{lineSmooth:e,showLine:t,showArea:l,horizontalBars:a,donut:n,stackBars:o}=r.value.options;x.value=!!e,k.value=!!t,b.value=!!l,_.value=!!a,I.value=!!n,S.value=!!o}g.value=r.value.themeColor,y.value=r.value.gridColor||"#333",w.value=r.value.legend||""}}),{deep:!0,immediate:!0});const C=e=>{a.updateElement({id:u.value,props:e}),h()},L=e=>{p.value=!1,C({data:e})},T=e=>{C({fill:e})},E=e=>{const t=r.value,l={...t.options,...e};C({options:l})},M=(e,t)=>{const l={themeColor:g.value.map(((l,a)=>a===t?e:l))};C(l)},U=()=>{const e={themeColor:[...g.value,c.value.themeColor]};C(e)},W=(e,t)=>{const l=e.slice(0,t+1);C({themeColor:l}),v.value=!1},D=e=>{const t={themeColor:g.value.filter(((t,l)=>l!==e))};C(t)},H=e=>{C({gridColor:e})},F=e=>{C({legend:e})},A=()=>p.value=!0;return Oi.on(Ai.OPEN_CHART_DATA_EDITOR,A),(0,i.Ah)((()=>{Oi.off(Ai.OPEN_CHART_DATA_EDITOR,A)})),(e,l)=>{const a=(0,i.up)("IconEdit"),o=(0,i.up)("IconCloseSmall"),r=(0,i.up)("IconPlus"),u=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",xw,[(0,i.Wm)(tp,{class:"full-width-btn",onClick:l[0]||(l[0]=e=>p.value=!0)},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"btn-icon"}),(0,i.Uk)(" 编辑图表数据 ")])),_:1}),(0,i.Wm)(Zc),"line"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",kw,[(0,i.Wm)(yw,{"onUpdate:value":l[1]||(l[1]=e=>E({showArea:e})),value:b.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("面积图样式")])),_:1},8,["value"]),(0,i.Wm)(yw,{"onUpdate:value":l[2]||(l[2]=e=>E({showLine:e})),value:!k.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("散点图样式")])),_:1},8,["value"])]),(0,i._)("div",bw,[(0,i.Wm)(yw,{"onUpdate:value":l[3]||(l[3]=e=>E({lineSmooth:e})),value:x.value},{default:(0,i.w5)((()=>[(0,i.Uk)("使用平滑曲线")])),_:1},8,["value"])])],64)):(0,i.kq)("",!0),"bar"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)("div",_w,[(0,i.Wm)(yw,{"onUpdate:value":l[4]||(l[4]=e=>E({horizontalBars:e})),value:_.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("条形图样式")])),_:1},8,["value"]),(0,i.Wm)(yw,{"onUpdate:value":l[5]||(l[5]=e=>E({stackBars:e})),value:S.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("堆叠样式")])),_:1},8,["value"])])):(0,i.kq)("",!0),"pie"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)("div",Iw,[(0,i.Wm)(yw,{"onUpdate:value":l[6]||(l[6]=e=>E({donut:e})),value:I.value},{default:(0,i.w5)((()=>[(0,i.Uk)("环形图样式")])),_:1},8,["value"])])):(0,i.kq)("",!0),(0,i.Wm)(Zc),(0,i._)("div",Sw,[Cw,(0,i.Wm)(cp,{style:{width:"60%"},value:w.value,"onUpdate:value":l[7]||(l[7]=e=>F(e)),options:[{label:"不显示",value:""},{label:"显示在上方",value:"top"},{label:"显示在下方",value:"bottom"}]},null,8,["value"])]),(0,i.Wm)(Zc),(0,i._)("div",Lw,[Tw,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:f.value,"onUpdate:modelValue":l[8]||(l[8]=e=>T(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:f.value},null,8,["color"])])),_:1})]),(0,i._)("div",Ew,[Mw,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:y.value,"onUpdate:modelValue":l[9]||(l[9]=e=>H(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:y.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Zc),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(g.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"row",key:t},[(0,i._)("div",Uw,(0,oe.zw)(0===t?"主题配色:":""),1),(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:e,"onUpdate:modelValue":e=>M(e,t)},null,8,["modelValue","onUpdate:modelValue"])])),default:(0,i.w5)((()=>[(0,i._)("div",Ww,[(0,i.Wm)(ih,{color:e},null,8,["color"]),0!==t?(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{key:0,class:"delete-color-btn",onClick:(0,n.iM)((e=>D(t)),["stop"])},[(0,i.Wm)(o)],8,Dw)),[[u,"删除"]]):(0,i.kq)("",!0)])])),_:2},1024)])))),128)),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,{trigger:"click",open:v.value,"onUpdate:open":l[11]||(l[11]=e=>v.value=e),style:{width:"40%"}},{content:(0,i.w5)((()=>[(0,i._)("div",Hw,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((e,t)=>(0,i._)("div",{class:"preset-theme",key:t},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e,((a,n)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["preset-theme-color",{select:m.value[0]===t&&n<=m.value[1]}]),key:a,style:(0,oe.j5)({backgroundColor:a}),onClick:t=>W(e,n),onMouseenter:e=>m.value=[t,n],onMouseleave:l[10]||(l[10]=e=>m.value=[-1,-1])},null,46,Fw)))),128))]))),64))])])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{first:"",style:{width:"100%"}},{default:(0,i.w5)((()=>[(0,i.Uk)("推荐主题")])),_:1})])),_:1},8,["open"]),(0,i.Wm)(tp,{last:"",disabled:g.value.length>=10,style:{width:"60%"},onClick:l[12]||(l[12]=e=>U())},{default:(0,i.w5)((()=>[(0,i.Wm)(r,{class:"btn-icon"}),(0,i.Uk)(" 添加主题色 ")])),_:1},8,["disabled"])])),_:1}),(0,i.Wm)(Zc),(0,i.Wm)(Cf),(0,i.Wm)(kp,{visible:p.value,"onUpdate:visible":l[15]||(l[15]=e=>p.value=e),width:640},{default:(0,i.w5)((()=>[(0,i.Wm)(dw,{data:(0,s.SU)(d).data,onClose:l[13]||(l[13]=e=>p.value=!1),onSave:l[14]||(l[14]=e=>L(e))},null,8,["data"])])),_:1},8,["visible"])])}}});const $w=(0,Vl.Z)(Aw,[["__scopeId","data-v-45827db6"]]);var Zw=$w;const Ow=e=>((0,i.dD)("data-v-e5523cbc"),e=e(),(0,i.Cn)(),e),Rw={class:"table-style-panel"},zw={class:"row"},Pw=Ow((()=>(0,i._)("div",{style:{width:"40%"}},"行数:",-1))),Bw={class:"set-count",style:{width:"60%"}},Nw={class:"count-text"},jw={class:"row"},Yw=Ow((()=>(0,i._)("div",{style:{width:"40%"}},"列数:",-1))),Vw={class:"set-count",style:{width:"60%"}},Jw={class:"count-text"},qw={class:"row theme-switch"},Xw=Ow((()=>(0,i._)("div",{style:{width:"40%"}},"启用主题表格:",-1))),Gw={class:"switch-wrapper",style:{width:"60%"}},Kw={class:"row"},Qw={class:"row"},ex={class:"row"},tx=Ow((()=>(0,i._)("div",{style:{width:"40%"}},"主题颜色:",-1)));var lx=(0,i.aZ)({__name:"TableStylePanel",setup(e){const t=$(),{handleElement:l,handleElementId:a,selectedTableCells:n,availableFonts:u}=(0,o.Jk)(R()),c=(0,i.Fl)((()=>t.theme.themeColor)),d=["12px","14px","16px","18px","20px","22px","24px","28px","32px"],p=(0,s.iH)({bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}),v=(0,s.iH)(),m=(0,s.iH)(!1),h=(0,s.iH)(0),f=(0,s.iH)(0),g=(0,s.iH)(0),y=(0,s.iH)(0);(0,i.YP)(l,(()=>{l.value&&"table"===l.value.type&&(v.value=l.value.theme,m.value=!!v.value,h.value=l.value.data.length,f.value=l.value.data[0].length,g.value=l.value.data.length,y.value=l.value.data[0].length)}),{deep:!0,immediate:!0});const{addHistorySnapshot:w}=da(),x=()=>{if(!l.value||"table"!==l.value.type)return;let e=0,t=0;if(n.value.length){const l=n.value[0];e=+l.split("_")[0],t=+l.split("_")[1]}const a=l.value.data[e][t].style;p.value=a?{bold:!!a.bold,em:!!a.em,underline:!!a.underline,strikethrough:!!a.strikethrough,color:a.color||"#000",backcolor:a.backcolor||"",fontsize:a.fontsize||"12px",fontname:a.fontname||"微软雅黑",align:a.align||"left"}:{bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}};(0,i.bv)((()=>{n.value.length&&x()})),(0,i.YP)(n,x);const k=e=>{t.updateElement({id:a.value,props:e}),w()},b=e=>{const t=l.value,a=JSON.parse(JSON.stringify(t.data));for(let l=0;l{if(!v.value)return;const t={...v.value,...e};k({theme:t})},I=e=>{if(e){const e={theme:{color:c.value,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1}};k(e)}else t.removeElementProps({id:a.value,propName:"theme"}),w()},S=e=>{const t=l.value,a=t.data.length;if(e>a){const l=new Array(f.value).fill({id:(0,r.x0)(10),colspan:1,rowspan:1,text:""}),n=new Array(e-a).fill(l),o=JSON.parse(JSON.stringify(t.data));o.push(...n),k({data:o})}else{const l=t.data.slice(0,e);k({data:l})}},C=e=>{const t=l.value,a=t.data[0].length;let n=t.data,o=t.colWidths.map((e=>e*t.width));if(e>a){n=n.map((t=>{const l=new Array(e-a).fill({id:(0,r.x0)(10),colspan:1,rowspan:1,text:""});return t.push(...l),t}));const t=new Array(e-a).fill(100);o.push(...t)}else n=n.map((t=>t.slice(0,e))),o=o.slice(0,e);const i=o.reduce(((e,t)=>e+t)),s=o.map((e=>e/i)),u={width:i,data:n,colWidths:s};k(u)};return(e,t)=>{const l=(0,i.up)("IconFontSize"),a=(0,i.up)("IconAddText"),n=(0,i.up)("IconText"),o=(0,i.up)("IconFill"),r=(0,i.up)("IconTextBold"),c=(0,i.up)("IconTextItalic"),g=(0,i.up)("IconTextUnderline"),y=(0,i.up)("IconStrikethrough"),w=(0,i.up)("IconAlignTextLeft"),x=(0,i.up)("IconAlignTextCenter"),k=(0,i.up)("IconAlignTextRight"),L=(0,i.up)("IconMinus"),T=(0,i.up)("IconPlus"),E=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Rw,[(0,i.Wm)(ug,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(cp,{style:{width:"50%"},value:p.value.fontname,"onUpdate:value":t[0]||(t[0]=e=>b({fontname:e})),options:[...(0,s.SU)(u),...(0,s.SU)(M)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(l)])),_:1},8,["value","options"]),(0,i.Wm)(cp,{style:{width:"50%"},value:p.value.fontsize,"onUpdate:value":t[1]||(t[1]=e=>b({fontsize:e})),options:d.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,{trigger:"click",style:{width:"50%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:p.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>b({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{first:"",color:p.value.color},{default:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["color"])),[[E,"文字颜色"]])])),_:1}),(0,i.Wm)(dn,{trigger:"click",style:{width:"50%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:p.value.backcolor,"onUpdate:modelValue":t[3]||(t[3]=e=>b({backcolor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{last:"",color:p.value.backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[E,"单元格填充"]])])),_:1})])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:p.value.bold,onClick:t[4]||(t[4]=e=>b({bold:!p.value.bold}))},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["checked"])),[[E,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:p.value.em,onClick:t[5]||(t[5]=e=>b({em:!p.value.em}))},{default:(0,i.w5)((()=>[(0,i.Wm)(c)])),_:1},8,["checked"])),[[E,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:p.value.underline,onClick:t[6]||(t[6]=e=>b({underline:!p.value.underline}))},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1},8,["checked"])),[[E,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:p.value.strikethrough,onClick:t[7]||(t[7]=e=>b({strikethrough:!p.value.strikethrough}))},{default:(0,i.w5)((()=>[(0,i.Wm)(y)])),_:1},8,["checked"])),[[E,"删除线"]])])),_:1}),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:p.value.align,"onUpdate:value":t[8]||(t[8]=e=>b({align:e}))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(w)])),_:1})),[[E,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(x)])),_:1})),[[E,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(k)])),_:1})),[[E,"右对齐"]])])),_:1},8,["value"]),(0,i.Wm)(Zc),(0,i.Wm)(Cf,{fixed:!0}),(0,i.Wm)(Zc),(0,i._)("div",zw,[Pw,(0,i._)("div",Bw,[(0,i.Wm)(tp,{class:"btn",disabled:h.value<=1,onClick:t[9]||(t[9]=e=>S(h.value-1))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1},8,["disabled"]),(0,i._)("div",Nw,(0,oe.zw)(h.value),1),(0,i.Wm)(tp,{class:"btn",disabled:h.value>=30,onClick:t[10]||(t[10]=e=>S(h.value+1))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["disabled"])])]),(0,i._)("div",jw,[Yw,(0,i._)("div",Vw,[(0,i.Wm)(tp,{class:"btn",disabled:f.value<=1,onClick:t[11]||(t[11]=e=>C(f.value-1))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1},8,["disabled"]),(0,i._)("div",Jw,(0,oe.zw)(f.value),1),(0,i.Wm)(tp,{class:"btn",disabled:f.value>=30,onClick:t[12]||(t[12]=e=>C(f.value+1))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["disabled"])])]),(0,i.Wm)(Zc),(0,i._)("div",qw,[Xw,(0,i._)("div",Gw,[(0,i.Wm)(pf,{value:m.value,"onUpdate:value":t[13]||(t[13]=e=>I(e))},null,8,["value"])])]),v.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Kw,[(0,i.Wm)(yw,{"onUpdate:value":t[14]||(t[14]=e=>_({rowHeader:e})),value:v.value.rowHeader,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("标题行")])),_:1},8,["value"]),(0,i.Wm)(yw,{"onUpdate:value":t[15]||(t[15]=e=>_({rowFooter:e})),value:v.value.rowFooter,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("汇总行")])),_:1},8,["value"])]),(0,i._)("div",Qw,[(0,i.Wm)(yw,{"onUpdate:value":t[16]||(t[16]=e=>_({colHeader:e})),value:v.value.colHeader,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("第一列")])),_:1},8,["value"]),(0,i.Wm)(yw,{"onUpdate:value":t[17]||(t[17]=e=>_({colFooter:e})),value:v.value.colFooter,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("最后一列")])),_:1},8,["value"])]),(0,i._)("div",ex,[tx,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:v.value.color,"onUpdate:modelValue":t[18]||(t[18]=e=>_({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:v.value.color},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0)])}}});const ax=(0,Vl.Z)(lx,[["__scopeId","data-v-e5523cbc"]]);var nx=ax;const ox=e=>((0,i.dD)("data-v-3a5ca316"),e=e(),(0,i.Cn)(),e),ix={class:"latex-style-panel"},sx={class:"row"},rx={class:"row"},ux=ox((()=>(0,i._)("div",{style:{width:"40%"}},"颜色:",-1))),cx={class:"row"},dx=ox((()=>(0,i._)("div",{style:{width:"40%"}},"粗细:",-1)));var px=(0,i.aZ)({__name:"LatexStylePanel",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=l,n=(0,s.iH)(!1),{addHistorySnapshot:r}=da(),u=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),r())},c=e=>{u({path:e.path,latex:e.latex,width:e.w,height:e.h,viewBox:[e.w,e.h]})},d=()=>n.value=!0;return Oi.on(Ai.OPEN_LATEX_EDITOR,d),(0,i.Ah)((()=>{Oi.off(Ai.OPEN_LATEX_EDITOR,d)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",ix,[(0,i._)("div",sx,[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[0]||(t[0]=e=>n.value=!0)},{default:(0,i.w5)((()=>[(0,i.Uk)("编辑 LaTeX")])),_:1})]),(0,i.Wm)(Zc),(0,i._)("div",rx,[ux,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[1]||(t[1]=e=>u({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",cx,[dx,(0,i.Wm)(mv,{min:1,max:3,value:(0,s.SU)(a).strokeWidth,"onUpdate:value":t[2]||(t[2]=e=>u({strokeWidth:e})),style:{width:"60%"}},null,8,["value"])]),(0,i.Wm)(kp,{visible:n.value,"onUpdate:visible":t[5]||(t[5]=e=>n.value=e),width:880},{default:(0,i.w5)((()=>[(0,i.Wm)(fm,{value:(0,s.SU)(a).latex,onClose:t[3]||(t[3]=e=>n.value=!1),onUpdate:t[4]||(t[4]=e=>{c(e),n.value=!1})},null,8,["value"])])),_:1},8,["visible"])]))}});const vx=(0,Vl.Z)(px,[["__scopeId","data-v-3a5ca316"]]);var mx=vx;const hx=e=>((0,i.dD)("data-v-b3551c8c"),e=e(),(0,i.Cn)(),e),fx={class:"video-style-panel"},gx=hx((()=>(0,i._)("div",{class:"title"},"视频预览封面",-1))),yx={class:"background-image-wrapper"},wx={class:"background-image"},xx={class:"row"},kx={class:"row switch-row"},bx=hx((()=>(0,i._)("div",{style:{width:"40%"}},"自动播放:",-1))),_x={class:"switch-wrapper",style:{width:"60%"}};var Ix=(0,i.aZ)({__name:"VideoStylePanel",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=l,{addHistorySnapshot:n}=da(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())},u=e=>{const t=e[0];t&&na(t).then((e=>r({poster:e})))};return(e,t)=>{const l=(0,i.up)("IconPlus");return(0,i.wg)(),(0,i.iD)("div",fx,[gx,(0,i._)("div",yx,[(0,i.Wm)(Pa,{onChange:t[0]||(t[0]=e=>u(e))},{default:(0,i.w5)((()=>[(0,i._)("div",wx,[(0,i._)("div",{class:"content",style:(0,oe.j5)({backgroundImage:(0,s.SU)(a).poster?`url(${(0,s.SU)(a).poster})`:""})},[(0,i.Wm)(l)],4)])])),_:1})]),(0,i._)("div",xx,[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>r({poster:""}))},{default:(0,i.w5)((()=>[(0,i.Uk)("重置封面")])),_:1})]),(0,i._)("div",kx,[bx,(0,i._)("div",_x,[(0,i.Wm)(pf,{value:(0,s.SU)(a).autoplay,"onUpdate:value":t[2]||(t[2]=e=>r({autoplay:e}))},null,8,["value"])])])])}}});const Sx=(0,Vl.Z)(Ix,[["__scopeId","data-v-b3551c8c"]]);var Cx=Sx;const Lx=e=>((0,i.dD)("data-v-32517bcf"),e=e(),(0,i.Cn)(),e),Tx={class:"audio-style-panel"},Ex={class:"row"},Mx=Lx((()=>(0,i._)("div",{style:{width:"40%"}},"图标颜色:",-1))),Ux={class:"row switch-row"},Wx=Lx((()=>(0,i._)("div",{style:{width:"40%"}},"自动播放:",-1))),Dx={class:"switch-wrapper",style:{width:"60%"}},Hx={class:"row switch-row"},Fx=Lx((()=>(0,i._)("div",{style:{width:"40%"}},"循环播放:",-1))),Ax={class:"switch-wrapper",style:{width:"60%"}};var $x=(0,i.aZ)({__name:"AudioStylePanel",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=l,{addHistorySnapshot:n}=da(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Tx,[(0,i._)("div",Ex,[Mx,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[0]||(t[0]=e=>r({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",Ux,[Wx,(0,i._)("div",Dx,[(0,i.Wm)(pf,{value:(0,s.SU)(a).autoplay,"onUpdate:value":t[1]||(t[1]=e=>r({autoplay:e}))},null,8,["value"])])]),(0,i._)("div",Hx,[Fx,(0,i._)("div",Ax,[(0,i.Wm)(pf,{value:(0,s.SU)(a).loop,"onUpdate:value":t[2]||(t[2]=e=>r({loop:e}))},null,8,["value"])])])]))}});const Zx=(0,Vl.Z)($x,[["__scopeId","data-v-32517bcf"]]);var Ox=Zx;const Rx=e=>((0,i.dD)("data-v-80f1bc4e"),e=e(),(0,i.Cn)(),e),zx={class:"multi-style-panel"},Px={class:"row"},Bx=Rx((()=>(0,i._)("div",{style:{width:"40%"}},"填充颜色:",-1))),Nx={class:"row"},jx=Rx((()=>(0,i._)("div",{style:{width:"40%"}},"边框样式:",-1))),Yx={class:"row"},Vx=Rx((()=>(0,i._)("div",{style:{width:"40%"}},"边框颜色:",-1))),Jx={class:"row"},qx=Rx((()=>(0,i._)("div",{style:{width:"40%"}},"边框粗细:",-1)));var Xx=(0,i.aZ)({__name:"MultiStylePanel",setup(e){const t=$(),{richTextAttrs:l,availableFonts:a,activeElementList:n}=(0,o.Jk)(R()),{addHistorySnapshot:r}=da(),u=(e,l)=>{t.updateElement({id:e,props:l}),r()},c=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],d=(0,s.iH)("#fff"),p=(0,s.iH)({width:0,color:"#fff",style:"solid"}),v=e=>{for(const t of n.value){if("text"!==t.type&&"shape"!==t.type&&"chart"!==t.type||u(t.id,{fill:e}),"table"===t.type){const l=JSON.parse(JSON.stringify(t.data));for(let t=0;t{for(const t of n.value){if("text"===t.type||"image"===t.type||"shape"===t.type||"table"===t.type||"chart"===t.type){const l=t.outline||{width:2,color:"#000",style:"solid"},a={outline:{...l,...e}};u(t.id,a)}"line"===t.type&&u(t.id,e)}p.value={...p.value,...e}},h=(e,t)=>{for(const l of n.value){if(("text"===l.type||"shape"===l.type&&l.text?.content)&&Oi.emit(Ai.RICH_TEXT_COMMAND,{target:l.id,action:{command:e,value:t}}),"table"===l.type){const a=JSON.parse(JSON.stringify(l.data));for(let l=0;l{const n=(0,i.up)("IconFontSize"),o=(0,i.up)("IconAddText"),r=(0,i.up)("IconText"),u=(0,i.up)("IconHighLight"),f=(0,i.up)("IconAlignTextLeft"),g=(0,i.up)("IconAlignTextCenter"),y=(0,i.up)("IconAlignTextRight"),w=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",zx,[(0,i._)("div",Px,[Bx,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:d.value,"onUpdate:modelValue":t[0]||(t[0]=e=>v(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:d.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Zc),(0,i._)("div",Nx,[jx,(0,i.Wm)(cp,{style:{width:"60%"},value:p.value.style||"","onUpdate:value":t[1]||(t[1]=e=>m({style:e})),options:[{label:"实线边框",value:"solid"},{label:"虚线边框",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",Yx,[Vx,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:p.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>m({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:p.value.color||"#000"},null,8,["color"])])),_:1})]),(0,i._)("div",Jx,[qx,(0,i.Wm)(mv,{value:p.value.width||0,"onUpdate:value":t[3]||(t[3]=e=>m({width:e})),style:{width:"60%"}},null,8,["value"])]),(0,i.Wm)(Zc),(0,i.Wm)(ug,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(l).fontname,"onUpdate:value":t[4]||(t[4]=e=>h("fontname",e)),options:[...(0,s.SU)(a),...(0,s.SU)(M)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"]),(0,i.Wm)(cp,{style:{width:"40%"},value:(0,s.SU)(l).fontsize,"onUpdate:value":t[5]||(t[5]=e=>h("fontsize",e)),options:c.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(l).color,"onUpdate:modelValue":t[6]||(t[6]=e=>h("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{first:"",color:(0,s.SU)(l).color},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["color"])),[[w,"文字颜色"]])])),_:1}),(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(l).backcolor,"onUpdate:modelValue":t[7]||(t[7]=e=>h("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{color:(0,s.SU)(l).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(u)])),_:1},8,["color"])),[[w,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{class:"font-size-btn",style:{width:"20%"},onClick:t[8]||(t[8]=e=>h("fontsize-add","2"))},{default:(0,i.w5)((()=>[(0,i.Wm)(n),(0,i.Uk)("+")])),_:1})),[[w,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:t[9]||(t[9]=e=>h("fontsize-reduce","2"))},{default:(0,i.w5)((()=>[(0,i.Wm)(n),(0,i.Uk)("-")])),_:1})),[[w,"减小字号"]])])),_:1}),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:(0,s.SU)(l).align,"onUpdate:value":t[10]||(t[10]=e=>h("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1})),[[w,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1})),[[w,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(y)])),_:1})),[[w,"右对齐"]])])),_:1},8,["value"])])}}});const Gx=(0,Vl.Z)(Xx,[["__scopeId","data-v-80f1bc4e"]]);var Kx=Gx;const Qx={class:"element-style-panel"};var ek=(0,i.aZ)({__name:"index",setup(e){const t={[sa.TEXT]:Zg,[sa.IMAGE]:wy,[sa.SHAPE]:Zy,[sa.LINE]:Qy,[sa.CHART]:Zw,[sa.TABLE]:nx,[sa.LATEX]:mx,[sa.VIDEO]:Cx,[sa.AUDIO]:Ox},{activeElementIdList:l,activeElementList:a,handleElement:n,activeGroupElementId:s}=(0,o.Jk)(R()),r=(0,i.Fl)((()=>{if(l.value.length>1){if(!s.value)return Kx;const e=a.value.find((e=>e.id===s.value));return e&&t[e.type]||null}return n.value&&t[n.value.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Qx,[((0,i.wg)(),(0,i.j4)((0,i.LL)(r.value)))]))}});const tk=ek;var lk=tk;const ak=e=>((0,i.dD)("data-v-a2bcea28"),e=e(),(0,i.Cn)(),e),nk={class:"element-positopn-panel"},ok=ak((()=>(0,i._)("div",{class:"title"},"层级:",-1))),ik=ak((()=>(0,i._)("div",{class:"title"},"对齐:",-1))),sk={class:"row"},rk=ak((()=>(0,i._)("div",{style:{width:"10%"}},null,-1))),uk={key:0,class:"row"},ck={key:1,style:{width:"10%"}},dk={class:"row"},pk=ak((()=>(0,i._)("div",{style:{width:"7%"}},null,-1)));var vk=(0,i.aZ)({__name:"ElementPositionPanel",setup(e){const t=$(),{handleElement:l,handleElementId:a}=(0,o.Jk)(R()),n=(0,s.iH)(0),r=(0,s.iH)(0),u=(0,s.iH)(0),c=(0,s.iH)(0),d=(0,s.iH)(0),p=(0,s.iH)(!1),v=(0,i.Fl)((()=>l.value&&Zn[l.value.type]||20)),m=(0,i.Fl)((()=>"text"===l.value?.type&&!l.value.vertical)),h=(0,i.Fl)((()=>"text"===l.value?.type&&l.value.vertical));(0,i.YP)(l,(()=>{l.value&&(n.value=(0,D.round)(l.value.left,1),r.value=(0,D.round)(l.value.top,1),p.value="fixedRatio"in l.value&&!!l.value.fixedRatio,"line"!==l.value.type&&(u.value=(0,D.round)(l.value.width,1),c.value=(0,D.round)(l.value.height,1),d.value="rotate"in l.value&&void 0!==l.value.rotate?(0,D.round)(l.value.rotate,1):0))}),{deep:!0,immediate:!0});const{orderElement:f}=ba(),{alignElementToCanvas:g}=qn(),{addHistorySnapshot:y}=da(),w=e=>{const l={left:e};t.updateElement({id:a.value,props:l}),y()},x=e=>{const l={top:e};t.updateElement({id:a.value,props:l}),y()},k=(e,t)=>{if(l.value&&"shape"===l.value.type&&"pathFormula"in l.value&&l.value.pathFormula){const a=ra[l.value.pathFormula];let n="";return n="editable"in a?a.formula(e,t,l.value.keypoint):a.formula(e,t),{viewBox:[e,t],path:n}}return null},b=e=>{let l={width:e};const n=k(e,c.value);n&&(l={...l,...n}),t.updateElement({id:a.value,props:l}),y()},_=e=>{let l={height:e};const n=k(u.value,e);n&&(l={...l,...n}),t.updateElement({id:a.value,props:l}),y()},I=e=>{const l={rotate:e};t.updateElement({id:a.value,props:l}),y()},S=e=>{const l={fixedRatio:e};t.updateElement({id:a.value,props:l}),y()},C=e=>{let l=45*Math.floor(d.value/45);"+"===e?l+=45:"-"===e&&(l-=45),l<-180&&(l=-180),l>180&&(l=180);const n={rotate:l};t.updateElement({id:a.value,props:n}),y()};return(e,t)=>{const a=(0,i.up)("IconSendToBack"),o=(0,i.up)("IconBringToFrontOne"),y=(0,i.up)("IconBringToFront"),k=(0,i.up)("IconSentToBack"),L=(0,i.up)("IconAlignLeft"),T=(0,i.up)("IconAlignVertically"),E=(0,i.up)("IconAlignRight"),M=(0,i.up)("IconAlignTop"),U=(0,i.up)("IconAlignHorizontally"),W=(0,i.up)("IconAlignBottom"),D=(0,i.up)("IconLock"),H=(0,i.up)("IconUnlock"),F=(0,i.up)("IconRotate"),A=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",nk,[ok,(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[0]||(t[0]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(Q).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"btn-icon"}),(0,i.Uk)(" 置顶")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(Q).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:"btn-icon"}),(0,i.Uk)(" 置底")])),_:1})])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[2]||(t[2]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(Q).UP))},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{class:"btn-icon"}),(0,i.Uk)(" 上移")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[3]||(t[3]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(Q).DOWN))},{default:(0,i.w5)((()=>[(0,i.Wm)(k,{class:"btn-icon"}),(0,i.Uk)(" 下移")])),_:1})])),_:1}),(0,i.Wm)(Zc),ik,(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[4]||(t[4]=e=>(0,s.SU)(g)((0,s.SU)(ee).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1})),[[A,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[5]||(t[5]=e=>(0,s.SU)(g)((0,s.SU)(ee).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1})),[[A,"水平居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[6]||(t[6]=e=>(0,s.SU)(g)((0,s.SU)(ee).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(E)])),_:1})),[[A,"右对齐"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[7]||(t[7]=e=>(0,s.SU)(g)((0,s.SU)(ee).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(M)])),_:1})),[[A,"上对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[8]||(t[8]=e=>(0,s.SU)(g)((0,s.SU)(ee).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(U)])),_:1})),[[A,"垂直居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[9]||(t[9]=e=>(0,s.SU)(g)((0,s.SU)(ee).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(W)])),_:1})),[[A,"下对齐"]])])),_:1}),(0,i.Wm)(Zc),(0,i._)("div",sk,[(0,i.Wm)(mv,{step:5,value:n.value,"onUpdate:value":t[10]||(t[10]=e=>w(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 水平: ")])),_:1},8,["value"]),rk,(0,i.Wm)(mv,{step:5,value:r.value,"onUpdate:value":t[11]||(t[11]=e=>x(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 垂直: ")])),_:1},8,["value"])]),"line"!==(0,s.SU)(l).type?((0,i.wg)(),(0,i.iD)("div",uk,[(0,i.Wm)(mv,{min:v.value,max:1500,step:5,disabled:h.value,value:u.value,"onUpdate:value":t[12]||(t[12]=e=>b(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 宽度: ")])),_:1},8,["min","disabled","value"]),["image","shape","audio"].includes((0,s.SU)(l).type)?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[p.value?(0,i.wy)(((0,i.wg)(),(0,i.j4)(D,{key:0,style:{width:"10%"},class:"icon-btn",onClick:t[13]||(t[13]=e=>S(!1))},null,512)),[[A,"解除宽高比锁定"]]):(0,i.wy)(((0,i.wg)(),(0,i.j4)(H,{key:1,style:{width:"10%"},class:"icon-btn",onClick:t[14]||(t[14]=e=>S(!0))},null,512)),[[A,"宽高比锁定"]])],64)):((0,i.wg)(),(0,i.iD)("div",ck)),(0,i.Wm)(mv,{min:v.value,max:800,step:5,disabled:m.value||"table"===(0,s.SU)(l).type,value:c.value,"onUpdate:value":t[15]||(t[15]=e=>_(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 高度: ")])),_:1},8,["min","disabled","value"])])):(0,i.kq)("",!0),["line","video","audio"].includes((0,s.SU)(l).type)?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(Zc),(0,i._)("div",dk,[(0,i.Wm)(mv,{min:-180,max:180,step:5,value:d.value,"onUpdate:value":t[16]||(t[16]=e=>I(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 旋转: ")])),_:1},8,["value"]),pk,(0,i._)("div",{class:"text-btn",onClick:t[17]||(t[17]=e=>C("-")),style:{width:"24%"}},[(0,i.Wm)(F),(0,i.Uk)(" -45°")]),(0,i._)("div",{class:"text-btn",onClick:t[18]||(t[18]=e=>C("+")),style:{width:"24%"}},[(0,i.Wm)(F,{style:(0,oe.j5)({transform:"rotateY(180deg)"})},null,8,["style"]),(0,i.Uk)(" +45°")])])],64))])}}});const mk=(0,Vl.Z)(vk,[["__scopeId","data-v-a2bcea28"]]);var hk=mk;const fk=1e3,gk="click",yk="animate__",wk=[{type:"bounce",name:"弹跳",children:[{name:"弹入",value:"bounceIn"},{name:"向右弹入",value:"bounceInLeft"},{name:"向左弹入",value:"bounceInRight"},{name:"向上弹入",value:"bounceInUp"},{name:"向下弹入",value:"bounceInDown"}]},{type:"fade",name:"浮现",children:[{name:"浮入",value:"fadeIn"},{name:"向下浮入",value:"fadeInDown"},{name:"向下长距浮入",value:"fadeInDownBig"},{name:"向右浮入",value:"fadeInLeft"},{name:"向右长距浮入",value:"fadeInLeftBig"},{name:"向左浮入",value:"fadeInRight"},{name:"向左长距浮入",value:"fadeInRightBig"},{name:"向上浮入",value:"fadeInUp"},{name:"向上长距浮入",value:"fadeInUpBig"},{name:"从左上浮入",value:"fadeInTopLeft"},{name:"从右上浮入",value:"fadeInTopRight"},{name:"从左下浮入",value:"fadeInBottomLeft"},{name:"从右下浮入",value:"fadeInBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转进入",value:"rotateIn"},{name:"绕左下进入",value:"rotateInDownLeft"},{name:"绕右下进入",value:"rotateInDownRight"},{name:"绕左上进入",value:"rotateInUpLeft"},{name:"绕右上进入",value:"rotateInUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"放大进入",value:"zoomIn"},{name:"向下放大进入",value:"zoomInDown"},{name:"从左放大进入",value:"zoomInLeft"},{name:"从右放大进入",value:"zoomInRight"},{name:"向上放大进入",value:"zoomInUp"}]},{type:"slide",name:"滑入",children:[{name:"向下滑入",value:"slideInDown"},{name:"从右滑入",value:"slideInLeft"},{name:"从左滑入",value:"slideInRight"},{name:"向上滑入",value:"slideInUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转进入",value:"flipInX"},{name:"Y轴翻转进入",value:"flipInY"}]},{type:"back",name:"放大滑入",children:[{name:"向下放大滑入",value:"backInDown"},{name:"从左放大滑入",value:"backInLeft"},{name:"从右放大滑入",value:"backInRight"},{name:"向上放大滑入",value:"backInUp"}]},{type:"lightSpeed",name:"飞入",children:[{name:"从右飞入",value:"lightSpeedInRight"},{name:"从左飞入",value:"lightSpeedInLeft"}]}],xk=[{type:"bounce",name:"弹跳",children:[{name:"弹出",value:"bounceOut"},{name:"向左弹出",value:"bounceOutLeft"},{name:"向右弹出",value:"bounceOutRight"},{name:"向上弹出",value:"bounceOutUp"},{name:"向下弹出",value:"bounceOutDown"}]},{type:"fade",name:"浮现",children:[{name:"浮出",value:"fadeOut"},{name:"向下浮出",value:"fadeOutDown"},{name:"向下长距浮出",value:"fadeOutDownBig"},{name:"向左浮出",value:"fadeOutLeft"},{name:"向左长距浮出",value:"fadeOutLeftBig"},{name:"向右浮出",value:"fadeOutRight"},{name:"向右长距浮出",value:"fadeOutRightBig"},{name:"向上浮出",value:"fadeOutUp"},{name:"向上长距浮出",value:"fadeOutUpBig"},{name:"从左上浮出",value:"fadeOutTopLeft"},{name:"从右上浮出",value:"fadeOutTopRight"},{name:"从左下浮出",value:"fadeOutBottomLeft"},{name:"从右下浮出",value:"fadeOutBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转退出",value:"rotateOut"},{name:"绕左下退出",value:"rotateOutDownLeft"},{name:"绕右下退出",value:"rotateOutDownRight"},{name:"绕左上退出",value:"rotateOutUpLeft"},{name:"绕右上退出",value:"rotateOutUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"缩小退出",value:"zoomOut"},{name:"向下缩小退出",value:"zoomOutDown"},{name:"从左缩小退出",value:"zoomOutLeft"},{name:"从右缩小退出",value:"zoomOutRight"},{name:"向上缩小退出",value:"zoomOutUp"}]},{type:"slide",name:"滑出",children:[{name:"向下滑出",value:"slideOutDown"},{name:"从左滑出",value:"slideOutLeft"},{name:"从右滑出",value:"slideOutRight"},{name:"向上滑出",value:"slideOutUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转退出",value:"flipOutX"},{name:"Y轴翻转退出",value:"flipOutY"}]},{type:"back",name:"缩小滑出",children:[{name:"向下缩小滑出",value:"backOutDown"},{name:"从左缩小滑出",value:"backOutLeft"},{name:"从右缩小滑出",value:"backOutRight"},{name:"向上缩小滑出",value:"backOutUp"}]},{type:"lightSpeed",name:"飞出",children:[{name:"从右飞出",value:"lightSpeedOutRight"},{name:"从左飞出",value:"lightSpeedOutLeft"}]}],kk=[{type:"shake",name:"晃动",children:[{name:"左右摇晃",value:"shakeX"},{name:"上下摇晃",value:"shakeY"},{name:"摇头",value:"headShake"},{name:"摆动",value:"swing"},{name:"晃动",value:"wobble"},{name:"惊恐",value:"tada"},{name:"果冻",value:"jello"}]},{type:"other",name:"其他",children:[{name:"弹跳",value:"bounce"},{name:"闪烁",value:"flash"},{name:"脉搏",value:"pulse"},{name:"橡皮筋",value:"rubberBand"},{name:"心跳(快)",value:"heartBeat"}]}],bk=[{label:"无",value:"no"},{label:"随机",value:"random"},{label:"左右推移",value:"slideX"},{label:"上下推移",value:"slideY"},{label:"左右推移(3D)",value:"slideX3D"},{label:"上下推移(3D)",value:"slideY3D"},{label:"淡入淡出",value:"fade"},{label:"旋转",value:"rotate"},{label:"上下展开",value:"scaleY"},{label:"左右展开",value:"scaleX"},{label:"放大",value:"scale"},{label:"缩小",value:"scaleReverse"}],_k=e=>((0,i.dD)("data-v-5abd2ee4"),e=e(),(0,i.Cn)(),e),Ik={class:"element-animation-panel"},Sk={key:0,class:"element-animation"},Ck={class:"type-title"},Lk={class:"pool-item-wrapper"},Tk=["onMouseenter","onClick"],Ek={key:0,class:"mask"},Mk={key:1,class:"tip"},Uk={class:"sequence-content"},Wk={class:"index"},Dk={class:"text"},Hk={class:"handler"},Fk={key:0,class:"configs"},Ak={class:"config-item"},$k=_k((()=>(0,i._)("div",{style:{width:"35%"}},"持续时长:",-1))),Zk={class:"config-item"},Ok=_k((()=>(0,i._)("div",{style:{width:"35%"}},"触发方式:",-1))),Rk={class:"config-item"};var zk=(0,i.aZ)({__name:"ElementAnimationPanel",setup(e){const t={};for(const o of wk)for(const e of o.children)t[e.value]=e.name;for(const o of xk)for(const e of o.children)t[e.value]=e.name;for(const o of kk)for(const e of o.children)t[e.value]=e.name;const l=["in","out","attention"],a=$(),{handleElement:n,handleElementId:u}=(0,o.Jk)(R()),{currentSlide:c,formatedAnimations:d,currentSlideAnimations:p}=(0,o.Jk)(a),v=[{key:"in",label:"入场",color:"#68a490"},{key:"out",label:"退场",color:"#d86344"},{key:"attention",label:"强调",color:"#e8b76a"}],m=(0,s.iH)("in"),h=(0,s.iH)(!1);(0,i.YP)((()=>u.value),(()=>{g.value=!1}));const f=(0,s.iH)(""),g=(0,s.iH)(!1),{addHistorySnapshot:y}=da(),w=(0,i.Fl)((()=>{const e=[];for(let l=0;le.id===o.elId));if(!i)continue;const s=$n[i.type],r=t[o.effect];e.push({...o,index:0===n?l+1:"",elType:s,animationEffect:r})}}return e})),x=(0,i.Fl)((()=>{const e=p.value,t=e.filter((e=>e.elId===u.value));return t||[]})),k=e=>{const t=p.value.filter((t=>t.id!==e));a.updateSlide({animations:t}),y()},b=e=>{const{newIndex:t,oldIndex:l}=e;if(void 0===t||void 0===l||t===l)return;const n=JSON.parse(JSON.stringify(p.value)),o=n[l];n.splice(l,1),n.splice(t,0,o),a.updateSlide({animations:n}),y()},_=(e,t,l)=>{const a=document.querySelector(`#editable-element-${e} [class^=editable-element-]`);if(a){const e=`${yk}${t}`;document.documentElement.style.setProperty("--animate-duration",`${l}ms`),a.classList.add(`${yk}animated`,e);const n=()=>{document.documentElement.style.removeProperty("--animate-duration"),a.classList.remove(`${yk}animated`,e)};a.addEventListener("animationend",n,{once:!0})}},I=async()=>{h.value=!h.value;for(let e=0;esetTimeout(e,t.duration+100))),_(t.elId,t.effect,t.duration),e>=w.value.length-1&&(h.value=!1)}},S=(e,t)=>{if(t<100||t>5e3)return;const l=p.value.map((l=>l.id===e?{...l,duration:t}:l));a.updateSlide({animations:l}),y()},C=(e,t)=>{const l=p.value.map((l=>l.id===e?{...l,trigger:t}:l));a.updateSlide({animations:l}),y()},L=(e,t)=>{const l=p.value.map((l=>l.id===T.value?{...l,type:e,effect:t}:l));a.updateSlide({animations:l}),g.value=!1,y();const n=p.value.find((e=>e.elId===u.value)),o=n?.duration||fk;setTimeout((()=>{_(u.value,t,o)}),0)},T=(0,s.iH)(""),E=(e,t)=>{if(T.value)return void L(e,t);const l=JSON.parse(JSON.stringify(p.value));l.push({id:(0,r.x0)(10),elId:u.value,type:e,effect:t,duration:fk,trigger:gk}),a.updateSlide({animations:l}),g.value=!1,y(),setTimeout((()=>{_(u.value,t,fk)}),0)},M=(0,s.iH)(!1),U=e=>{e?setTimeout((()=>M.value=!0),600):M.value=!1},W=e=>{g.value=!0,T.value=e,U(!0)},D={in:wk,out:xk,attention:kk};return(e,t)=>{const a=(0,i.up)("IconEffects"),o=(0,i.up)("IconClick"),r=(0,i.up)("IconPlayOne"),u=(0,i.up)("IconCloseSmall"),c=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Ik,[(0,s.SU)(n)?((0,i.wg)(),(0,i.iD)("div",Sk,[(0,i.Wm)(dn,{trigger:"click",value:g.value,"onUpdate:value":[t[3]||(t[3]=e=>g.value=e),t[4]||(t[4]=e=>U(e))],style:{width:"100%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(Kd,{tabs:v,value:m.value,"onUpdate:value":t[0]||(t[0]=e=>m.value=e),tabsStyle:{marginBottom:"20px"},tabStyle:{width:"33.333%"},spaceAround:""},null,8,["value"]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>((0,i.wg)(),(0,i.iD)(i.HY,null,[m.value===e?((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["animation-pool",e]),key:e},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(D[e],(l=>((0,i.wg)(),(0,i.iD)("div",{class:"pool-type",key:l.name},[(0,i._)("div",Ck,(0,oe.zw)(l.name)+":",1),(0,i._)("div",Lk,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.children,(l=>((0,i.wg)(),(0,i.iD)("div",{class:"pool-item",key:l.name,onMouseenter:e=>f.value=l.value,onMouseleave:t[1]||(t[1]=e=>f.value=""),onClick:t=>E(e,l.value)},[(0,i._)("div",{class:(0,oe.C_)(["animation-box",[`${(0,s.SU)(yk)}animated`,`${(0,s.SU)(yk)}fast`,f.value===l.value&&`${(0,s.SU)(yk)}${l.value}`]])},(0,oe.zw)(l.name),3)],40,Tk)))),128))])])))),128)),M.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",Ek))],2)):(0,i.kq)("",!0)],64)))),64))])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{class:"element-animation-btn",onClick:t[2]||(t[2]=e=>T.value="")},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{style:{"margin-right":"5px"}}),(0,i.Uk)(" 添加动画 ")])),_:1})])),_:1},8,["value"])])):((0,i.wg)(),(0,i.iD)("div",Mk,[(0,i.Wm)(o,{style:{"margin-right":"5px"}}),(0,i.Uk)(" 选中画布中的元素添加动画")])),(0,i.Wm)(Zc),(0,i.Wm)((0,s.SU)(Dm()),{class:"animation-sequence",modelValue:w.value,animation:200,scroll:!0,scrollSensitivity:50,handle:".sequence-content",itemKey:"id",onEnd:b},{item:(0,i.w5)((({element:e})=>[(0,i._)("div",{class:(0,oe.C_)(["sequence-item",[e.type,{active:(0,s.SU)(n)?.id===e.elId}]])},[(0,i._)("div",Uk,[(0,i._)("div",Wk,(0,oe.zw)(e.index),1),(0,i._)("div",Dk,"【"+(0,oe.zw)(e.elType)+"】"+(0,oe.zw)(e.animationEffect),1),(0,i._)("div",Hk,[(0,i.wy)((0,i.Wm)(r,{class:"handler-btn",onClick:t=>_(e.elId,e.effect,e.duration)},null,8,["onClick"]),[[c,"预览"]]),(0,i.wy)((0,i.Wm)(u,{class:"handler-btn",onClick:t=>k(e.id)},null,8,["onClick"]),[[c,"删除"]])])]),x.value[0]?.elId===e.elId?((0,i.wg)(),(0,i.iD)("div",Fk,[(0,i.Wm)(Zc,{style:{margin:"16px 0"}}),(0,i._)("div",Ak,[$k,(0,i.Wm)(mv,{min:500,max:3e3,step:500,value:e.duration,"onUpdate:value":t=>S(e.id,t),style:{width:"65%"}},null,8,["value","onUpdate:value"])]),(0,i._)("div",Zk,[Ok,(0,i.Wm)(cp,{value:e.trigger,"onUpdate:value":t=>C(e.id,t),style:{width:"65%"},options:[{label:"主动触发",value:"click"},{label:"与上一动画同时",value:"meantime"},{label:"上一动画之后",value:"auto"}]},null,8,["value","onUpdate:value"])]),(0,i._)("div",Rk,[(0,i.Wm)(tp,{style:{width:"100%"},onClick:t=>W(e.id)},{default:(0,i.w5)((()=>[(0,i.Uk)("更换动画")])),_:2},1032,["onClick"])])])):(0,i.kq)("",!0)],2)])),_:1},8,["modelValue"]),w.value.length>=2?((0,i.wg)(),(0,i.iD)(i.HY,{key:2},[(0,i.Wm)(Zc),(0,i.Wm)(tp,{onClick:t[5]||(t[5]=e=>I())},{default:(0,i.w5)((()=>[(0,i.Uk)((0,oe.zw)(h.value?"停止预览":"预览全部"),1)])),_:1})],64)):(0,i.kq)("",!0)])}}});const Pk=(0,Vl.Z)(zk,[["__scopeId","data-v-5abd2ee4"]]);var Bk=Pk;const Nk=[{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#5b9bd5","#ed7d31","#a5a5a5","#ffc000","#4472c4","#70ad47"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#83992a","#3c9670","#44709d","#a23b32","#d87728","#deb340"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#e48312","#bd582c","#865640","#9b8357","#c2bc80","#94a088"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#90c225","#54a121","#e6b91e","#e86618","#c42f19","#918756"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#1cade4","#2683c6","#27ced7","#42ba97","#3e8853","#62a39f"]},{background:"#e9efd6",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#a5300f","#de7e18","#9f8351","#728653","#92aa4c","#6aac91"]},{background:"#17444e",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#b01513","#ea6312","#e6b729","#6bab90","#55839a","#9e5d9d"]},{background:"#36234d",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#b31166","#e33d6f","#e45f3c","#e9943a","#9b6bf2","#d63cd0"]},{background:"#247fad",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#052f61","#a50e82","#14967c","#6a9e1f","#e87d37","#c62324"]},{background:"#103f55",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#40aebd","#97e8d5","#a1cf49","#628f3e","#f2df3a","#fcb01c"]},{background:"#242367",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#ac3ec1","#477bd1","#46b298","#90ba4c","#dd9d31","#e25345"]},{background:"#e4b75e",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#f0a22e","#a5644e","#b58b80","#c3986d","#a19574","#c17529"]},{background:"#333333",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]}];var jk=()=>{const e=$(),{slides:t,currentSlide:l,theme:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=da(),i=e=>{const t=[];for(const l of e.elements){if("shape"===l.type&&0!==(0,W.Z)(l.fill).getAlpha()){const e=(0,W.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("text"===l.type&&l.fill&&0!==(0,W.Z)(l.fill).getAlpha()){const e=(0,W.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("table"===l.type&&l.theme&&0!==(0,W.Z)(l.theme.color).getAlpha()){const e=(0,W.Z)(l.theme.color).toRgbString();t.includes(e)||t.push(e)}if("chart"===l.type&&l.fill&&0!==(0,W.Z)(l.fill).getAlpha()){const e=(0,W.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("line"===l.type&&0!==(0,W.Z)(l.color).getAlpha()){const e=(0,W.Z)(l.color).toRgbString();t.includes(e)||t.push(e)}if("audio"===l.type&&0!==(0,W.Z)(l.color).getAlpha()){const e=(0,W.Z)(l.color).toRgbString();t.includes(e)||t.push(e)}}return t},s=(e,t)=>{const l=i(e),a={};if(l.length>t.length){const e=(0,W.Z)(t[0]).analogous(l.length-t.length+10),a=e.map((e=>e.toHexString())).slice(1);t.push(...a)}for(let n=0;n{const l=s(e,t.colors);e.background&&"image"===e.background.type||(e.background={type:"solid",color:t.background});for(const a of e.elements){if("shape"===a.type&&(a.fill=l[(0,W.Z)(a.fill).toRgbString()]||a.fill,a.gradient&&delete a.gradient),"text"===a.type&&(a.fill&&(a.fill=l[(0,W.Z)(a.fill).toRgbString()]||a.fill),a.defaultColor=t.fontColor,a.defaultFontName=t.fontname),"table"===a.type){a.theme&&(a.theme.color=l[(0,W.Z)(a.theme.color).toRgbString()]||a.theme.color);for(const e of a.data)for(const l of e)l.style&&(l.style.color=t.fontColor,l.style.fontname=t.fontname)}"chart"===a.type&&(a.themeColor=[l[(0,W.Z)(a.themeColor[0]).toRgbString()]]||0,a.gridColor=t.fontColor),"line"===a.type&&(a.color=l[(0,W.Z)(a.color).toRgbString()]||a.color),"audio"===a.type&&(a.color=l[(0,W.Z)(a.color).toRgbString()]||a.color),"latex"===a.type&&(a.color=t.fontColor)}},u=t=>{const a=JSON.parse(JSON.stringify(l.value));r(a,t),e.updateSlide({background:a.background,elements:a.elements}),n()},c=l=>{const a=JSON.parse(JSON.stringify(t.value));for(const e of a)r(e,l);e.setTheme({backgroundColor:l.background,themeColor:l.colors[0],fontColor:l.fontColor,fontName:l.fontname}),e.setSlides(a),n()},d=(l=!1)=>{const o=JSON.parse(JSON.stringify(t.value)),{themeColor:i,backgroundColor:s,fontColor:r,fontName:u,outline:c,shadow:d}=a.value;for(const e of o){e.background&&"image"===e.background.type||(e.background={type:"solid",color:s});for(const t of e.elements)if(l&&("outline"in t&&t.outline&&(t.outline=c),"shadow"in t&&t.shadow&&(t.shadow=d)),"shape"===t.type)t.fill=i;else if("line"===t.type)t.color=i;else if("text"===t.type)t.defaultColor=r,t.defaultFontName=u,t.fill&&(t.fill=i);else if("table"===t.type){t.theme&&(t.theme.color=i);for(const e of t.data)for(const t of e)t.style&&(t.style.color=r,t.style.fontname=u)}else"chart"===t.type?(t.themeColor=[i],t.gridColor=r):"latex"===t.type?t.color=r:"audio"===t.type&&(t.color=i)}e.setSlides(o),n()};return{applyPresetThemeToSingleSlide:u,applyPresetThemeToAllSlides:c,applyThemeToAllSlides:d}};const Yk=e=>((0,i.dD)("data-v-9a96acfa"),e=e(),(0,i.Cn)(),e),Vk={class:"slide-design-panel"},Jk=Yk((()=>(0,i._)("div",{class:"title"},"背景填充",-1))),qk={class:"row"},Xk=Yk((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Gk={key:0,class:"background-image-wrapper"},Kk={class:"background-image"},Qk={key:1,class:"background-gradient-wrapper"},eb={class:"row"},tb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"起点颜色:",-1))),lb={class:"row"},ab=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"终点颜色:",-1))),nb={key:0,class:"row"},ob=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"渐变角度:",-1))),ib={class:"row"},sb={class:"row"},rb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"画布尺寸:",-1))),ub={class:"title"},cb=Yk((()=>(0,i._)("span",null,"全局主题",-1))),db=Yk((()=>(0,i._)("span",{class:"text"},"更多",-1))),pb={class:"row"},vb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"字体:",-1))),mb={class:"row"},hb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"字体颜色:",-1))),fb={class:"row"},gb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"背景颜色:",-1))),yb={class:"row"},wb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"主题色:",-1))),xb={class:"row"},kb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"边框样式:",-1))),bb={class:"row"},_b=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"边框颜色:",-1))),Ib={class:"row"},Sb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"边框粗细:",-1))),Cb={class:"row",style:{height:"30px"}},Lb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"水平阴影:",-1))),Tb={class:"row",style:{height:"30px"}},Eb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"垂直阴影:",-1))),Mb={class:"row",style:{height:"30px"}},Ub=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"模糊距离:",-1))),Wb={class:"row"},Db=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"阴影颜色:",-1))),Hb={class:"row"},Fb=Yk((()=>(0,i._)("div",{class:"title"},"预置主题",-1))),Ab={class:"theme-list"},$b={class:"theme-item-content"},Zb={class:"colors"},Ob={class:"btns"},Rb=["onClick"],zb=["onClick"];var Pb=(0,i.aZ)({__name:"SlideDesignPanel",setup(e){const t=$(),{availableFonts:l}=(0,o.Jk)(R()),{slides:a,currentSlide:n,viewportRatio:r,theme:u}=(0,o.Jk)(t),c=(0,s.iH)(!1),d=(0,i.Fl)((()=>n.value.background?n.value.background:{type:"solid",value:"#fff"})),{addHistorySnapshot:p}=da(),{applyPresetThemeToSingleSlide:v,applyPresetThemeToAllSlides:m,applyThemeToAllSlides:h}=jk(),f=e=>{if("solid"===e){const e={...d.value,type:"solid",color:d.value.color||"#fff"};t.updateSlide({background:e})}else if("image"===e){const e={...d.value,type:"image",image:d.value.image||"",imageSize:d.value.imageSize||"cover"};t.updateSlide({background:e})}else{const e={...d.value,type:"gradient",gradientType:d.value.gradientType||"linear",gradientColor:d.value.gradientColor||["#fff","#fff"],gradientRotate:d.value.gradientRotate||0};t.updateSlide({background:e})}p()},g=e=>{t.updateSlide({background:{...d.value,...e}}),p()},y=e=>{const t=e[0];t&&na(t).then((e=>g({image:e})))},w=()=>{const e=a.value.map((e=>({...e,background:n.value.background})));t.setSlides(e),p()},x=e=>{t.setTheme(e)},k=e=>{t.setViewportRatio(e)};return(e,t)=>{const a=(0,i.up)("IconPlus"),n=(0,i.up)("IconDown"),o=(0,i.up)("IconRight");return(0,i.wg)(),(0,i.iD)("div",Vk,[Jk,(0,i._)("div",qk,[(0,i.Wm)(cp,{style:{flex:"1"},value:d.value.type,"onUpdate:value":t[0]||(t[0]=e=>f(e)),options:[{label:"纯色填充",value:"solid"},{label:"图片填充",value:"image"},{label:"渐变填充",value:"gradient"}]},null,8,["value"]),Xk,"solid"===d.value.type?((0,i.wg)(),(0,i.j4)(dn,{key:0,trigger:"click",style:{flex:"1"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:d.value.color,"onUpdate:modelValue":t[1]||(t[1]=e=>g({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:d.value.color||"#fff"},null,8,["color"])])),_:1})):"image"===d.value.type?((0,i.wg)(),(0,i.j4)(cp,{key:1,style:{flex:"1"},value:d.value.imageSize||"cover","onUpdate:value":t[2]||(t[2]=e=>g({imageSize:e})),options:[{label:"缩放",value:"contain"},{label:"拼贴",value:"repeat"},{label:"缩放铺满",value:"cover"}]},null,8,["value"])):((0,i.wg)(),(0,i.j4)(cp,{key:2,style:{flex:"1"},value:d.value.gradientType||"","onUpdate:value":t[3]||(t[3]=e=>g({gradientType:e})),options:[{label:"线性渐变",value:"linear"},{label:"径向渐变",value:"radial"}]},null,8,["value"]))]),"image"===d.value.type?((0,i.wg)(),(0,i.iD)("div",Gk,[(0,i.Wm)(Pa,{onChange:t[4]||(t[4]=e=>y(e))},{default:(0,i.w5)((()=>[(0,i._)("div",Kk,[(0,i._)("div",{class:"content",style:(0,oe.j5)({backgroundImage:`url(${d.value.image})`})},[(0,i.Wm)(a)],4)])])),_:1})])):(0,i.kq)("",!0),"gradient"===d.value.type?((0,i.wg)(),(0,i.iD)("div",Qk,[(0,i._)("div",eb,[tb,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:d.value.gradientColor[0],"onUpdate:modelValue":t[5]||(t[5]=e=>g({gradientColor:[e,d.value.gradientColor[1]]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:d.value.gradientColor[0]},null,8,["color"])])),_:1})]),(0,i._)("div",lb,[ab,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:d.value.gradientColor[1],"onUpdate:modelValue":t[6]||(t[6]=e=>g({gradientColor:[d.value.gradientColor[0],e]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:d.value.gradientColor[1]},null,8,["color"])])),_:1})]),"linear"===d.value.gradientType?((0,i.wg)(),(0,i.iD)("div",nb,[ob,(0,i.Wm)(qm,{min:0,max:360,step:15,value:d.value.gradientRotate||0,"onUpdate:value":t[7]||(t[7]=e=>g({gradientRotate:e})),style:{width:"60%"}},null,8,["value"])])):(0,i.kq)("",!0)])):(0,i.kq)("",!0),(0,i._)("div",ib,[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[8]||(t[8]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用背景到全部")])),_:1})]),(0,i.Wm)(Zc),(0,i._)("div",sb,[rb,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(r),"onUpdate:value":t[9]||(t[9]=e=>k(e)),options:[{label:"宽屏 16 : 9",value:.5625},{label:"宽屏 16 : 10",value:.625},{label:"标准 4 : 3",value:.75},{label:"纸张 A3 / A4",value:.70710678}]},null,8,["value"])]),(0,i.Wm)(Zc),(0,i._)("div",ub,[cb,(0,i._)("span",{class:"more",onClick:t[10]||(t[10]=e=>c.value=!c.value)},[db,c.value?((0,i.wg)(),(0,i.j4)(n,{key:0})):((0,i.wg)(),(0,i.j4)(o,{key:1}))])]),(0,i._)("div",pb,[vb,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(u).fontName,"onUpdate:value":t[11]||(t[11]=e=>x({fontName:e})),options:[...(0,s.SU)(l),...(0,s.SU)(M)]},null,8,["value","options"])]),(0,i._)("div",mb,[hb,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).fontColor,"onUpdate:modelValue":t[12]||(t[12]=e=>x({fontColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(u).fontColor},null,8,["color"])])),_:1})]),(0,i._)("div",fb,[gb,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).backgroundColor,"onUpdate:modelValue":t[13]||(t[13]=e=>x({backgroundColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(u).backgroundColor},null,8,["color"])])),_:1})]),(0,i._)("div",yb,[wb,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).themeColor,"onUpdate:modelValue":t[14]||(t[14]=e=>x({themeColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(u).themeColor},null,8,["color"])])),_:1})]),c.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:2},[(0,i._)("div",xb,[kb,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(u).outline.style||"","onUpdate:value":t[15]||(t[15]=e=>x({outline:{...(0,s.SU)(u).outline,style:e}})),options:[{label:"实线边框",value:"solid"},{label:"虚线边框",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",bb,[_b,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).outline.color,"onUpdate:modelValue":t[16]||(t[16]=e=>x({outline:{...(0,s.SU)(u).outline,color:e}}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(u).outline.color||"#000"},null,8,["color"])])),_:1})]),(0,i._)("div",Ib,[Sb,(0,i.Wm)(mv,{value:(0,s.SU)(u).outline.width||0,"onUpdate:value":t[17]||(t[17]=e=>x({outline:{...(0,s.SU)(u).outline,width:e}})),style:{width:"60%"}},null,8,["value"])]),(0,i._)("div",Cb,[Lb,(0,i.Wm)(qm,{style:{width:"60%"},min:-10,max:10,step:1,value:(0,s.SU)(u).shadow.h,"onUpdate:value":t[18]||(t[18]=e=>x({shadow:{...(0,s.SU)(u).shadow,h:e}}))},null,8,["value"])]),(0,i._)("div",Tb,[Eb,(0,i.Wm)(qm,{style:{width:"60%"},min:-10,max:10,step:1,value:(0,s.SU)(u).shadow.v,"onUpdate:value":t[19]||(t[19]=e=>x({shadow:{...(0,s.SU)(u).shadow,v:e}}))},null,8,["value"])]),(0,i._)("div",Mb,[Ub,(0,i.Wm)(qm,{style:{width:"60%"},min:1,max:20,step:1,value:(0,s.SU)(u).shadow.blur,"onUpdate:value":t[20]||(t[20]=e=>x({shadow:{...(0,s.SU)(u).shadow,blur:e}}))},null,8,["value"])]),(0,i._)("div",Wb,[Db,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).shadow.color,"onUpdate:modelValue":t[21]||(t[21]=e=>x({shadow:{...(0,s.SU)(u).shadow,color:e}}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(u).shadow.color},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0),(0,i._)("div",Hb,[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[22]||(t[22]=e=>(0,s.SU)(h)(c.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("应用主题到全部")])),_:1})]),(0,i.Wm)(Zc),Fb,(0,i._)("div",Ab,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(Nk),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"theme-item",key:t,style:(0,oe.j5)({backgroundColor:e.background,fontFamily:e.fontname})},[(0,i._)("div",$b,[(0,i._)("div",{class:"text",style:(0,oe.j5)({color:e.fontColor})},"文字 Aa",4),(0,i._)("div",Zb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.colors,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"color-block",key:t,style:(0,oe.j5)({backgroundColor:e})},null,4)))),128))]),(0,i._)("div",Ob,[(0,i._)("div",{class:"btn",onClick:t=>(0,s.SU)(v)(e)},"应用",8,Rb),(0,i._)("div",{class:"btn",onClick:t=>(0,s.SU)(m)(e)},"应用全局",8,zb)])])],4)))),128))])])}}});const Bb=(0,Vl.Z)(Pb,[["__scopeId","data-v-9a96acfa"]]);var Nb=Bb;const jb={class:"slide-animation-panel"},Yb={class:"animation-pool"},Vb=["onClick"],Jb={class:"animation-text"};var qb=(0,i.aZ)({__name:"SlideAnimationPanel",setup(e){const t=$(),{slides:l,currentSlide:a}=(0,o.Jk)(t),n=(0,i.Fl)((()=>a.value.turningMode||"slideY")),r=bk,{addHistorySnapshot:u}=da(),c=e=>{e!==n.value&&(t.updateSlide({turningMode:e}),u())},d=()=>{const e=l.value.map((e=>({...e,turningMode:a.value.turningMode})));t.setSlides(e),ta.success("已应用到全部"),u()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",jb,[(0,i._)("div",Yb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(r),(e=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["animation-item",{active:n.value===e.value}]),key:e.label,onClick:t=>c(e.value)},[(0,i._)("div",{class:(0,oe.C_)(["animation-block",e.value])},null,2),(0,i._)("div",Jb,(0,oe.zw)(e.label),1)],10,Vb)))),128))]),(0,i.Wm)(tp,{style:{width:"100%"},onClick:t[0]||(t[0]=e=>d())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用到全部")])),_:1})]))}});const Xb=(0,Vl.Z)(qb,[["__scopeId","data-v-0562c530"]]);var Gb=Xb,Kb=()=>{const e=$(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(R()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=da(),i=o=>{const{minX:i,maxX:s,minY:r,maxY:u}=ke(l.value),c=JSON.parse(JSON.stringify(a.value.elements)),d={};for(const e of l.value)if(e.groupId&&!d[e.groupId]){const t=l.value.filter((t=>t.groupId===e.groupId));d[e.groupId]=ke(t)}if(o===ee.LEFT)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.minX-i;e.left=e.left-l}else if("rotate"in e&&e.rotate){const{offsetX:t}=we({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=i-t}else e.left=i}));else if(o===ee.RIGHT)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.maxX-s;e.left=e.left-l}else{const t="line"===e.type?Math.max(e.start[0],e.end[0]):e.width;if("rotate"in e&&e.rotate){const{offsetX:l}=we({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=s-t+l}else e.left=s-t}}));else if(o===ee.TOP)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.minY-r;e.top=e.top-l}else if("rotate"in e&&e.rotate){const{offsetY:t}=we({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=r-t}else e.top=r}));else if(o===ee.BOTTOM)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.maxY-u;e.top=e.top-l}else{const t="line"===e.type?Math.max(e.start[1],e.end[1]):e.height;if("rotate"in e&&e.rotate){const{offsetY:l}=we({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=u-t+l}else e.top=u-t}}));else if(o===ee.HORIZONTAL){const e=(i+s)/2;c.forEach((l=>{if(t.value.includes(l.id))if(l.groupId){const t=d[l.groupId],a=(t.maxX+t.minX)/2,n=a-e;l.left=l.left-n}else{const t="line"===l.type?Math.max(l.start[0],l.end[0]):l.width;l.left=e-t/2}}))}else if(o===ee.VERTICAL){const e=(r+u)/2;c.forEach((l=>{if(t.value.includes(l.id))if(l.groupId){const t=d[l.groupId],a=(t.maxY+t.minY)/2,n=a-e;l.top=l.top-n}else{const t="line"===l.type?Math.max(l.start[1],l.end[1]):l.height;l.top=e-t/2}}))}e.updateSlide({elements:c}),n()};return{alignActiveElement:i}},Qb=()=>{const e=$(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(R()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=da(),s=(0,i.Fl)((()=>{let e=0;const t=[];for(const a of l.value)a.groupId?t.includes(a.groupId)||(t.push(a.groupId),e+=1):e+=1;return e})),r=()=>{const{minX:o,maxX:i}=ke(l.value),s=JSON.parse(JSON.stringify(l.value)),r=JSON.parse(JSON.stringify(a.value.elements)),u=[];let c=[];for(const e of s)if(e.groupId){const t=c.find((t=>t.groupId===e.groupId));t?c=c.map((t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t)):c.push({groupId:e.groupId,els:[e]})}else{const{minX:t,maxX:l}=xe(e);u.push({min:t,max:l,el:e})}const d=[];for(const e of c){const{minX:t,maxX:l}=ke(e.els);d.push({min:t,max:l,els:e.els})}const p=[...u,...d];p.sort(((e,t)=>e.min-t.min));let v=0;for(const e of p){const t=e.max-e.min;v+=t}const m=(i-o-v)/(p.length-1),h=[],f=p[0];let g={min:f.min,max:f.max};if("el"in f)h.push({pos:f.min,el:f.el});else for(const e of f.els){const{minX:t}=xe(e);h.push({pos:t,el:e})}for(let e=1;e{const{minY:o,maxY:i}=ke(l.value),s=JSON.parse(JSON.stringify(l.value)),r=JSON.parse(JSON.stringify(a.value.elements)),u=[];let c=[];for(const e of s)if(e.groupId){const t=c.find((t=>t.groupId===e.groupId));t?c=c.map((t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t)):c.push({groupId:e.groupId,els:[e]})}else{const{minY:t,maxY:l}=xe(e);u.push({min:t,max:l,el:e})}const d=[];for(const e of c){const{minY:t,maxY:l}=ke(e.els);d.push({min:t,max:l,els:e.els})}const p=[...u,...d];p.sort(((e,t)=>e.min-t.min));let v=0;for(const e of p){const t=e.max-e.min;v+=t}const m=(i-o-v)/(p.length-1),h=[],f=p[0];let g={min:f.min,max:f.max};if("el"in f)h.push({pos:f.min,el:f.el});else for(const e of f.els){const{minY:t}=xe(e);h.push({pos:t,el:e})}for(let e=1;e{t.value?n(e):o(e)};return(e,n)=>{const o=(0,i.up)("IconAlignLeft"),p=(0,i.up)("IconAlignHorizontally"),v=(0,i.up)("IconAlignRight"),m=(0,i.up)("IconAlignTop"),h=(0,i.up)("IconAlignVertically"),f=(0,i.up)("IconAlignBottom"),g=(0,i.up)("IconGroup"),y=(0,i.up)("IconUngroup"),w=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",e_,[(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[0]||(n[0]=e=>d((0,s.SU)(ee).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1})),[[w,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[1]||(n[1]=e=>d((0,s.SU)(ee).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(p)])),_:1})),[[w,"水平居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[2]||(n[2]=e=>d((0,s.SU)(ee).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(v)])),_:1})),[[w,"右对齐"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[3]||(n[3]=e=>d((0,s.SU)(ee).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(m)])),_:1})),[[w,"上对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[4]||(n[4]=e=>d((0,s.SU)(ee).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(h)])),_:1})),[[w,"垂直居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[5]||(n[5]=e=>d((0,s.SU)(ee).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1})),[[w,"下对齐"]])])),_:1}),(0,s.SU)(r)>2?((0,i.wg)(),(0,i.j4)(Kf,{key:0,class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:n[6]||(n[6]=e=>(0,s.SU)(u)())},{default:(0,i.w5)((()=>[(0,i.Uk)("水平均匀分布")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:n[7]||(n[7]=e=>(0,s.SU)(c)())},{default:(0,i.w5)((()=>[(0,i.Uk)("垂直均匀分布")])),_:1})])),_:1})):(0,i.kq)("",!0),(0,i.Wm)(Zc),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{disabled:!(0,s.SU)(t),onClick:n[8]||(n[8]=e=>(0,s.SU)(l)()),style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(g,{style:{"margin-right":"3px"}}),(0,i.Uk)("组合")])),_:1},8,["disabled"]),(0,i.Wm)(tp,{disabled:(0,s.SU)(t),onClick:n[9]||(n[9]=e=>(0,s.SU)(a)()),style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{style:{"margin-right":"3px"}}),(0,i.Uk)("取消组合")])),_:1},8,["disabled"])])),_:1})])}}});const l_=(0,Vl.Z)(t_,[["__scopeId","data-v-e95a4c6c"]]);var a_=l_;const n_=[{key:"letter",label:"字母",children:["α","β","γ","δ","ϵ","ε","ζ","η","θ","ϑ","ι","κ","λ","μ","ν","ξ","π","ϖ","ρ","ϱ","σ","ς","τ","υ","ϕ","φ","χ","ψ","ω","Γ","Δ","Θ","Λ","Ξ","Π","Σ","Υ","Φ","Ψ","Ω","𝐀","𝐁","𝐂","𝐃","𝐄","𝐅","𝐆","𝐇","𝐈","𝐉","𝐊","𝐋","𝐌","𝐍","𝐎","𝐏","𝐐","𝐑","𝐒","𝐓","𝐔","𝐕","𝐖","𝐗","𝐘","𝐙","𝐚","𝐛","𝐜","𝐝","𝐞","𝐟","𝐠","𝐡","𝐢","𝐣","𝐤","𝐥","𝐦","𝐧","𝐨","𝐩","𝐪","𝐫","𝐬","𝐭","𝐮","𝐯","𝐰","𝐱","𝐲","𝐳","𝓐","𝓑","𝓒","𝓓","𝓔","𝓕","𝓖","𝓗","𝓘","𝓙","𝓚","𝓛","𝓜","𝓝","𝓞","𝓟","𝓠","𝓡","𝓢","𝓣","𝓤","𝓥","𝓦","𝓧","𝓨","𝓩","𝓪","𝓫","𝓬","𝓭","𝓮","𝓯","𝓰","𝓱","𝓲","𝓳","𝓴","𝓵","𝓶","𝓷","𝓸","𝓹","𝓺","𝓻","𝓼","𝓽","𝓾","𝓿","𝔀","𝔁","𝔂","𝔃"]},{key:"number",label:"序号",children:["①","②","③","④","⑤","⑥","⑦","⑧","⑨","⑩","⑪","⑫","⑬","⑭","⑮","⑯","⑰","⑱","⑲","⑳","⑴","⑵","⑶","⑷","⑸","⑹","⑺","⑻","⑼","⑽","⑾","⑿","⒀","⒁","⒂","⒃","⒄","⒅","⒆","⒇","º","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","₀","₁","₂","₃","₄","₅","₆","₇","₈","₉","Ⅰ","Ⅱ","Ⅲ","Ⅳ","Ⅴ","Ⅵ","Ⅶ","Ⅷ","Ⅸ","Ⅹ","Ⅺ","Ⅻ","Ⅼ","Ⅽ","Ⅾ","Ⅿ","ⅰ","ⅱ","ⅲ","ⅳ","ⅴ","ⅵ","ⅶ","ⅷ","ⅸ","ⅹ","ⅺ","ⅻ","ⅼ","ⅽ","ⅾ","ⅿ","ↀ","ↁ","ↂ","㊀","㊁","㊂","㊃","㊄","㊅","㊆","㊇","㊈","㊉","㈠","㈡","㈢","㈣","㈤","㈥","㈦","㈧","㈨","㈩","𝟘","𝟙","𝟚","𝟛","𝟜","𝟝","𝟞","𝟟","𝟠","𝟡"]},{key:"math",label:"数学",children:["+","-","×","÷","=","~","¬","±","%","°","ǃ","‰","‱","½","⅓","⅔","¼","¾","<",">","l","o","g","l","g","l","n","⨂","⨁","⨄","⨃","⨅","⨆","√","∛","∜","∝","∞","∟","∠","∡","∢","∧","∨","∩","∪","∫","∬","∭","∮","∯","∰","∱","∲","∳","∴","∵","∼","∽","∾","∿","≃","≄","≅","≆","≇","≈","≊","≋","≌","≍","≎","≏","≐","≑","≒","≓","≔","≕","≤","≥","≦","≧","≨","≩","≪","≫","≺","≻","≼","≽","≾","≿","⊀","⊁","⊂","⊃","⊄","⊅","⊆","⊇","⊈","⊉","⊊","⊋","⊏","⊐","⊑","⊒","⊓","⊔","⊢","⊣","⊤","⊥","⊦","⊧","⊨","⊩","⊪","⊫","⊬","⊭","⊮","⊯","⊲","⊳","⊴","⊵","⋀","⋁","⋂","⋃","⋉","⋊","⋋","⋌","⟨","⟩","⟪","⟫","⟮","⟯","⧼","⧽","⦰"]},{key:"arrow",label:"箭头",children:["←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿"]},{key:"graph",label:"图形",children:["▢","▣","▤","▥","▦","▧","▨","▩","▭","▮","▯","▰","▱","▲","▷","▼","◁","◈","◉","◍","◐","◑","◒","◓","◔","◕","◧","◨","◩","◪","◫","◬","◭","◮"]}],o_={class:"symbol-panel"},i_={class:"pool"},s_=["onClick"],r_={class:"symbol"};var u_=(0,i.aZ)({__name:"SymbolPanel",setup(e){const t=(0,s.iH)(n_[0].key),l=(0,i.Fl)((()=>{const e=n_.find((e=>e.key===t.value));return e?.children||[]})),a=n_.map((e=>({key:e.key,label:e.label}))),n=e=>{Oi.emit(Ai.RICH_TEXT_COMMAND,{action:{command:"insert",value:e}})};return(e,o)=>((0,i.wg)(),(0,i.iD)("div",o_,[(0,i.Wm)(Kd,{tabs:(0,s.SU)(a),value:t.value,"onUpdate:value":o[0]||(o[0]=e=>t.value=e),tabsStyle:{marginBottom:"8px"},spaceBetween:""},null,8,["tabs","value"]),(0,i._)("div",i_,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-item",key:t,onClick:t=>n(e)},[(0,i._)("div",r_,(0,oe.zw)(e),1)],8,s_)))),128))])]))}});const c_=(0,Vl.Z)(u_,[["__scopeId","data-v-2bb5f257"]]);var d_=c_;const p_={class:"toolbar"},v_={class:"content"};var m_=(0,i.aZ)({__name:"index",setup(e){const t=R(),{activeElementIdList:l,handleElement:n,toolbarState:r}=(0,o.Jk)(t),u=(0,i.Fl)((()=>"text"===n.value?.type?[{label:"样式",key:a.EL_STYLE},{label:"符号",key:a.SYMBOL},{label:"位置",key:a.EL_POSITION},{label:"动画",key:a.EL_ANIMATION}]:[{label:"样式",key:a.EL_STYLE},{label:"位置",key:a.EL_POSITION},{label:"动画",key:a.EL_ANIMATION}])),c=[{label:"设计",key:a.SLIDE_DESIGN},{label:"切换",key:a.SLIDE_ANIMATION},{label:"动画",key:a.EL_ANIMATION}],d=[{label:"样式",key:a.EL_STYLE},{label:"位置",key:a.MULTI_POSITION}],p=e=>{t.setToolbarState(e)},v=(0,i.Fl)((()=>l.value.length?l.value.length>1?d:u.value:c));(0,i.YP)(v,(()=>{const e=v.value.map((e=>e.key));e.includes(r.value)||t.setToolbarState(e[0])}));const m=(0,i.Fl)((()=>{const e={[a.EL_STYLE]:lk,[a.EL_POSITION]:hk,[a.EL_ANIMATION]:Bk,[a.SLIDE_DESIGN]:Nb,[a.SLIDE_ANIMATION]:Gb,[a.MULTI_POSITION]:a_,[a.SYMBOL]:d_};return e[r.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",p_,[(0,i.Wm)(Kd,{tabs:v.value,value:(0,s.SU)(r),card:"","onUpdate:value":t[0]||(t[0]=e=>p(e))},null,8,["tabs","value"]),(0,i._)("div",v_,[((0,i.wg)(),(0,i.j4)((0,i.LL)(m.value)))])]))}});const h_=(0,Vl.Z)(m_,[["__scopeId","data-v-6c9ece83"]]);var f_=h_;const g_={class:"editor"};var y_=(0,i.aZ)({__name:"Editor",props:{value:{}},emits:["update"],setup(e,{expose:t,emit:l}){const a=e,n=l,o=R(),r=(0,s.iH)();let c;const v=(0,s.iH)(),m=(0,s.iH)(),h=(0,s.iH)(),f=()=>{m.value&&m.value.hide()},g=(0,D.debounce)((function(){n("update",c.dom.innerHTML)}),300,{trailing:!0}),y=()=>{o.setDisableHotkeysState(!0)},w=()=>{o.setDisableHotkeysState(!1)},x=()=>{if(!c)return;const{doc:e,tr:t}=c.state;c.dispatch(t.replaceRangeWith(0,e.content.size,Hi(a.value)))};t({updateTextContent:x});const k=()=>{const e=window.getSelection();if(!e||!e.anchorNode||!e.focusNode||e.isCollapsed||"Caret"===e.type||"None"===e.type)return;const t=e.getRangeAt(0);if(m.value){v.value=C(c);const{x:e,y:l,left:a,top:n}=t.getBoundingClientRect();m.value.setProps({getReferenceClientRect:()=>({x:e,y:l,left:a,top:n,height:0,width:0,right:a,bottom:n})}),m.value.show()}},b=(e,t)=>{if("color"===e&&t){const e=c.state.schema.marks.forecolor.create({color:t});d(c),p(c,e)}else if("backcolor"===e&&t){const e=c.state.schema.marks.backcolor.create({backcolor:t});d(c),p(c,e)}else if("bold"===e)d(c),(0,u.w9)(c.state.schema.marks.strong)(c.state,c.dispatch);else if("em"===e)d(c),(0,u.w9)(c.state.schema.marks.em)(c.state,c.dispatch);else if("underline"===e)d(c),(0,u.w9)(c.state.schema.marks.underline)(c.state,c.dispatch);else if("strikethrough"===e)d(c),(0,u.w9)(c.state.schema.marks.strikethrough)(c.state,c.dispatch);else if("bulletList"===e){const{bullet_list:e,list_item:t}=c.state.schema.nodes;Yi(e,t,"")(c.state,c.dispatch)}else if("orderedList"===e){const{ordered_list:e,list_item:t}=c.state.schema.nodes;Yi(e,t,"")(c.state,c.dispatch)}else if("clear"===e){d(c);const{$from:e,$to:t}=c.state.selection;c.dispatch(c.state.tr.removeMark(e.pos,t.pos))}c.focus(),g(),v.value=C(c)};return(0,i.bv)((()=>{c=Fi(r.value,a.value,{handleDOMEvents:{focus:y,blur:w,mouseup:k,mousedown:()=>{window.getSelection()?.removeAllRanges(),f()},keydown:f,input:g}},{placeholder:"点击输入演讲者备注"}),m.value=(0,rn.ZP)(r.value,{duration:0,content:h.value,interactive:!0,trigger:"manual",placement:"top-start",hideOnClick:"toggle",offset:[0,6]})})),(0,i.Ah)((()=>{c&&c.destroy()})),(e,t)=>{const l=(0,i.up)("IconTextBold"),a=(0,i.up)("IconTextItalic"),n=(0,i.up)("IconTextUnderline"),o=(0,i.up)("IconStrikethrough"),s=(0,i.up)("IconText"),u=(0,i.up)("IconHighLight"),c=(0,i.up)("IconList"),d=(0,i.up)("IconOrderedList"),p=(0,i.up)("IconFormat"),m=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",g_,[(0,i._)("div",{class:"prosemirror-editor",ref_key:"editorViewRef",ref:r},null,512),(0,i._)("div",{class:"menu",ref_key:"menuRef",ref:h},[(0,i._)("button",{class:(0,oe.C_)({active:v.value?.bold}),onClick:t[0]||(t[0]=e=>b("bold"))},[(0,i.Wm)(l)],2),(0,i._)("button",{class:(0,oe.C_)({active:v.value?.em}),onClick:t[1]||(t[1]=e=>b("em"))},[(0,i.Wm)(a)],2),(0,i._)("button",{class:(0,oe.C_)({active:v.value?.underline}),onClick:t[2]||(t[2]=e=>b("underline"))},[(0,i.Wm)(n)],2),(0,i._)("button",{class:(0,oe.C_)({active:v.value?.strikethrough}),onClick:t[3]||(t[3]=e=>b("strikethrough"))},[(0,i.Wm)(o)],2),(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:v.value?.color,"onUpdate:modelValue":t[4]||(t[4]=e=>b("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i._)("button",null,[(0,i.Wm)(s)])])),_:1}),(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:v.value?.backcolor,"onUpdate:modelValue":t[5]||(t[5]=e=>b("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i._)("button",null,[(0,i.Wm)(u)])])),_:1}),(0,i._)("button",{class:(0,oe.C_)({active:v.value?.bulletList}),onClick:t[6]||(t[6]=e=>b("bulletList"))},[(0,i.Wm)(c)],2),(0,i._)("button",{class:(0,oe.C_)({active:v.value?.orderedList}),onClick:t[7]||(t[7]=e=>b("orderedList"))},[(0,i.Wm)(d)],2),(0,i._)("button",{onClick:t[8]||(t[8]=e=>b("clear"))},[(0,i.Wm)(p)])],512)])),[[m,f]])}}});const w_=(0,Vl.Z)(y_,[["__scopeId","data-v-31d96c24"]]);var x_=w_;const k_={class:"remark"};var b_=(0,i.aZ)({__name:"index",props:{height:{}},emits:["update:height"],setup(e,{emit:t}){const l=e,a=t,n=$(),{currentSlide:r}=(0,o.Jk)(n),u=(0,s.iH)();(0,i.YP)((()=>r.value.id),(()=>{(0,i.Y3)((()=>{u.value.updateTextContent()}))}),{immediate:!0});const c=(0,i.Fl)((()=>r.value?.remark||"")),d=e=>{n.updateSlide({remark:e})},p=e=>{let t=!0;const n=e.pageY,o=l.height;document.onmousemove=e=>{if(!t)return;const l=e.pageY,i=l-n;let s=-i+o;s<40&&(s=40),s>360&&(s=360),a("update:height",s)},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",k_,[(0,i._)("div",{class:"resize-handler",onMousedown:t[0]||(t[0]=e=>p(e))},null,32),(0,i.Wm)(x_,{value:c.value,ref_key:"editorRef",ref:u,onUpdate:t[1]||(t[1]=e=>d(e))},null,8,["value"])]))}});const __=(0,Vl.Z)(b_,[["__scopeId","data-v-458a41b9"]]);var I_=__,S_=l(3162),C_=l(3907);const L_=["style","script","template"],T_=["html","head","body","p","dt","dd","li","option","thead","th","tbody","tr","td","tfoot","colgroup"],E_={li:["ul","ol","menu"],dt:["dl"],dd:["dl"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table"],td:["table"]},M_=["!doctype","area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],U_=(e,t)=>{const l=t-e.position;W_(e,l)},W_=(e,t)=>{e.position=e.position+t},D_=(e,t)=>{const l=!1;while(!l){const l=e.indexOf("<",t);if(-1===l)return l;const a=e.charAt(l+1);if("/"===a||"!"===a||/[A-Za-z0-9]/.test(a))return l;t=l+1}return-1},H_=e=>{const{str:t}=e;let l=D_(t,e.position);if(l===e.position)return;-1===l&&(l=t.length);const a=t.slice(e.position,l);U_(e,l),e.tokens.push({type:"text",content:a})},F_=e=>{const{str:t}=e;W_(e,4);let l=t.indexOf("--\x3e",e.position),a=l+3;-1===l&&(l=a=t.length);const n=t.slice(e.position,l);U_(e,a),e.tokens.push({type:"comment",content:n})},A_=e=>{const{str:t}=e,l=t.length;let a=e.position;while(a"===e);if(l)break;a++}let n=a+1;while(n"===e);if(!l)break;n++}U_(e,n);const o=t.slice(a,n);return e.tokens.push({type:"tag",content:o}),o},$_=e=>{const{str:t,tokens:l}=e;let a=e.position,n=null,o=a;const i=[],s=t.length;while(a"===e;if(l){a!==o&&i.push(t.slice(o,a));break}const s=/\s/.test(e);if(s){a!==o&&i.push(t.slice(o,a)),o=a+1,a++;continue}const r="'"===e||'"'===e;r?(n=e,a++):a++}U_(e,a);const r="attribute";for(let u=0;u1){const a=e+t;l.push({type:r,content:a}),u+=1;continue}const a=i[u+2];if(u+=1,a){const t=e+"="+a;l.push({type:r,content:t}),u+=1;continue}}}if((0,D.endsWith)(e,"=")){const t=i[u+1];if(t&&-1===t.indexOf("=")){const a=e+t;l.push({type:r,content:a}),u+=1;continue}const a=e.slice(0,-1);l.push({type:r,content:a})}else l.push({type:r,content:e})}},Z_=(e,t)=>{const{str:l,tokens:a}=t,n=e.toLowerCase(),o=l.length;let i=t.position;while(i{const{str:t}=e,l=t.charAt(e.position+1),a="/"===l;W_(e,a?2:1),e.tokens.push({type:"tag-start",close:a});const n=A_(e);$_(e);const o=t.charAt(e.position),i="/"===o;return W_(e,i?2:1),e.tokens.push({type:"tag-end",close:i}),n},R_=e=>{const t=e.str,l=t.length;while(e.position{const t={str:e,position:0,tokens:[]};return R_(t),t.tokens},P_=e=>{const t={tagName:null,children:[]},l={tokens:e,cursor:0,stack:[t]};return j_(l),t.children},B_=(e,t)=>{const l=E_[e];if(l){let a=t.length-1;while(a>=0){const n=t[a].tagName;if(n===e)break;if(n&&l.includes(n))return!0;a--}}return!1},N_=(e,t)=>{e.splice(t)},j_=e=>{const{stack:t,tokens:l}=e;let{cursor:a}=e,n=t[t.length-1].children;const o=l.length;while(a-1)if(t[e].tagName===s){n=!0;break}while(a0){if(s===t[e].tagName){N_(t,e);const l=e-1;n=t[l].children;break}e-=1}}const c=[];let d;while(a{const l=e.indexOf(t);return-1===l?[e]:[e.slice(0,l),e.slice(l+t.length)]},V_=e=>{const t=e.charAt(0),l=e.length-1,a='"'===t||"'"===t;return a&&t===e.charAt(l)?e.slice(1,l):e},J_=e=>e.map((e=>{const t=Y_(e.trim(),"="),l=t[0],a="string"===typeof t[1]?V_(t[1]):null;return{key:l,value:a}})),q_=e=>e.map((e=>{if("element"===e.type){const t=q_(e.children),l={type:"element",tagName:e.tagName.toLowerCase(),attributes:J_(e.attributes),children:t};return l}const t={type:e.type,content:e.content};return t})),X_=e=>{const t=z_(e),l=P_(t);return q_(l)};var G_=l(5851),K_=l(7943);const Q_={1:"Z",2:"M",4:"H",8:"V",16:"L",32:"C",64:"S",128:"Q",256:"T",512:"A"},eI=e=>{const t=new G_.OU(e),l=[];for(const a of t.commands){const e=Q_[a.type];if(2!==a.type&&16!==a.type||l.push({x:a.x,y:a.y,relative:a.relative,type:e}),32===a.type)l.push({x:a.x,y:a.y,curve:{type:"cubic",x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},relative:a.relative,type:e});else if(128===a.type)l.push({x:a.x,y:a.y,curve:{type:"quadratic",x1:a.x1,y1:a.y1},relative:a.relative,type:e});else if(512===a.type){const e=l[l.length-1];if(!["M","L","Q","C"].includes(e.type))continue;const t=(0,K_.Z)({px:e.x,py:e.y,cx:a.x,cy:a.y,rx:a.rX,ry:a.rY,xAxisRotation:a.xRot,largeArcFlag:a.lArcFlag,sweepFlag:a.sweepFlag});for(const a of t)l.push({x:a.x,y:a.y,curve:{type:"cubic",x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},relative:!1,type:"C"})}else{if(1!==a.type)continue;l.push({close:!0,type:e})}}return l},tI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",lI="data:image/svg+xml;base64,",aI=e=>{e=e.replace(/\r\n/g,"\n");let t="";for(let l=0;l127&&a<2048?(t+=String.fromCharCode(a>>6|192),t+=String.fromCharCode(63&a|128)):(t+=String.fromCharCode(a>>12|224),t+=String.fromCharCode(a>>6&63|128),t+=String.fromCharCode(63&a|128))}return t},nI=e=>{let t,l,a,n,o,i,s,r="",u=0;e=aI(e);while(u>2,o=(3&t)<<4|l>>4,i=(15&l)<<2|a>>6,s=63&a,isNaN(l)?i=s=64:isNaN(a)&&(s=64),r=r+tI.charAt(n)+tI.charAt(o)+tI.charAt(i)+tI.charAt(s);return r},oI=e=>{const t=new XMLSerializer,l=t.serializeToString(e);return lI+nI(l)},iI=100,sI=.75;var rI=()=>{const e=$(),{slides:t,theme:l,viewportRatio:a,title:n}=(0,o.Jk)(e),i=(0,s.iH)(!1),r=(e,t,l,a=!0)=>{i.value=!0;const o="png"===t?sh.YM:sh.hi,s=e.querySelectorAll("foreignObject [xmlns]");s.forEach((e=>e.removeAttribute("xmlns"))),setTimeout((()=>{const s={quality:l,width:1600};a&&(s.fontEmbedCSS=""),o(e,s).then((e=>{i.value=!1,(0,S_.saveAs)(e,`${n.value}.${t}`)})).catch((()=>{i.value=!1,ta.error("导出图片失败")}))}),200)},u=e=>{const t=new Blob([pe(JSON.stringify(e))],{type:""});(0,S_.saveAs)(t,`${n.value}.pptist`)},c=()=>{const e=new Blob([JSON.stringify(t.value)],{type:""});(0,S_.saveAs)(e,`${n.value}.json`)},d=e=>{const t=(0,W.Z)(e),l=t.getAlpha(),a=0===l?"#ffffff":t.setAlpha(1).toHexString();return{alpha:l,color:a}},p=e=>{const t=X_(e);let l=!1,a=0;const n=[],o=(e,t={})=>{for(const i of e){const e="tagName"in i&&["div","li","p"].includes(i.tagName);if(e&&n.length){const e=n[n.length-1];e.options||(e.options={}),e.options.breakLine=!0}const s={...t},r="attributes"in i?i.attributes.find((e=>"style"===e.key)):null;if(r&&r.value){const e=r.value.split(";");for(const t of e){const[e,l]=t.split(": "),[a,n]=[(0,D.trim)(e),(0,D.trim)(l)];a&&n&&(s[a]=n)}}if("tagName"in i){if("em"===i.tagName&&(s["font-style"]="italic"),"strong"===i.tagName&&(s["font-weight"]="bold"),"sup"===i.tagName&&(s["vertical-align"]="super"),"sub"===i.tagName&&(s["vertical-align"]="sub"),"a"===i.tagName){const e=i.attributes.find((e=>"href"===e.key));s["href"]=e?.value||""}if("ul"===i.tagName&&(s["list-type"]="ul"),"ol"===i.tagName&&(s["list-type"]="ol"),"li"===i.tagName&&(l=!0),"p"===i.tagName&&"attributes"in i){const e=i.attributes.find((e=>"data-indent"===e.key));e&&e.value&&(a=+e.value)}}if("tagName"in i&&"br"===i.tagName)n.push({text:"",options:{breakLine:!0}});else if("content"in i){const e=i.content.replace(/ /g," ").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,""),t={};s["font-size"]&&(t.fontSize=parseInt(s["font-size"])*sI),s["color"]&&(t.color=d(s["color"]).color),s["background-color"]&&(t.highlight=d(s["background-color"]).color),s["text-decoration-line"]&&(-1!==s["text-decoration-line"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==s["text-decoration-line"].indexOf("line-through")&&(t.strike="sngStrike")),s["text-decoration"]&&(-1!==s["text-decoration"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==s["text-decoration"].indexOf("line-through")&&(t.strike="sngStrike")),s["vertical-align"]&&("super"===s["vertical-align"]&&(t.superscript=!0),"sub"===s["vertical-align"]&&(t.subscript=!0)),s["text-align"]&&(t.align=s["text-align"]),s["font-weight"]&&(t.bold="bold"===s["font-weight"]),s["font-style"]&&(t.italic="italic"===s["font-style"]),s["font-family"]&&(t.fontFace=s["font-family"]),s["href"]&&(t.hyperlink={url:s["href"]}),l&&"ol"===s["list-type"]&&(t.bullet={type:"number",indent:1.25*(t.fontSize||20)},t.paraSpaceBefore=.1,l=!1),l&&"ul"===s["list-type"]&&(t.bullet={indent:1.25*(t.fontSize||20)},t.paraSpaceBefore=.1,l=!1),a&&(t.indentLevel=a,a=0),n.push({text:e,options:t})}else"children"in i&&o(i.children,s)}};return o(t),n},v=(e,t={x:1,y:1})=>e.map((e=>{if(void 0!==e.close)return{close:!0};if("M"===e.type)return{x:e.x/iI*t.x,y:e.y/iI*t.y,moveTo:!0};if(e.curve){if("cubic"===e.curve.type)return{x:e.x/iI*t.x,y:e.y/iI*t.y,curve:{type:"cubic",x1:e.curve.x1/iI*t.x,y1:e.curve.y1/iI*t.y,x2:e.curve.x2/iI*t.x,y2:e.curve.y2/iI*t.y}};if("quadratic"===e.curve.type)return{x:e.x/iI*t.x,y:e.y/iI*t.y,curve:{type:"quadratic",x1:e.curve.x1/iI*t.x,y1:e.curve.y1/iI*t.y}}}return{x:e.x/iI*t.x,y:e.y/iI*t.y}})),m=e=>{const t=d(e.color),{h:l,v:a}=e;let n=4,o=45;return 0===l&&0===a?(n=4,o=45):0===l?a>0?(n=a,o=90):(n=-a,o=270):0===a?l>0?(n=l,o=1):(n=-l,o=180):l>0&&a>0?(n=Math.max(l,a),o=45):l>0&&a<0?(n=Math.max(l,-a),o=315):l<0&&a>0?(n=Math.max(-l,a),o=135):l<0&&a<0&&(n=Math.max(-l,-a),o=225),{type:"outer",color:t.color.replace("#",""),opacity:t.alpha,blur:e.blur*sI,offset:n,angle:o}},h=e=>{const t=d(e?.color||"#000000");return{color:t.color,transparency:100*(1-t.alpha),width:(e.width||1)*sI,dashType:"solid"===e.style?"solid":"dash"}},f=e=>{const{type:l,target:a}=e;if("web"===l)return{url:a};if("slide"===l){const e=t.value.findIndex((e=>e.id===a));if(-1!==e)return{slide:e+1}}return null},g=(e,t,o)=>{i.value=!0;const s=new C_.Z;if(.625===a.value?s.layout="LAYOUT_16x10":.75===a.value?s.layout="LAYOUT_4x3":.70710678===a.value?(s.defineLayout({name:"A3",width:10,height:7.0710678}),s.layout="A3"):s.layout="LAYOUT_16x9",t){const{color:e,alpha:t}=d(l.value.backgroundColor);s.defineSlideMaster({title:"PPTIST_MASTER",background:{color:e,transparency:100*(1-t)}})}for(const l of e){const e=s.addSlide();if(l.background){const t=l.background;if("image"===t.type&&t.image)e.background={data:t.image};else if("solid"===t.type&&t.color){const l=d(t.color);e.background={color:l.color,transparency:100*(1-l.alpha)}}else if("gradient"===t.type&&t.gradientColor){const[l,a]=t.gradientColor,n=W.Z.mix(l,a).toHexString(),o=d(n);e.background={color:o.color,transparency:100*(1-o.alpha)}}}if(l.remark&&e.addNotes(l.remark),l.elements)for(const t of l.elements)if("text"===t.type){const l=p(t.content),a={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,fontSize:20*sI,fontFace:"微软雅黑",color:"#000000",valign:"top",margin:10*sI,paraSpaceBefore:5*sI,lineSpacingMultiple:1.2,autoFit:!0};if(t.rotate&&(a.rotate=t.rotate),t.wordSpace&&(a.charSpacing=t.wordSpace*sI),t.lineHeight&&(a.lineSpacingMultiple=t.lineHeight/1.25),t.fill){const e=d(t.fill),l=void 0===t.opacity?1:t.opacity;a.fill={color:e.color,transparency:100*(1-e.alpha*l)}}t.defaultColor&&(a.color=d(t.defaultColor).color),t.defaultFontName&&(a.fontFace=t.defaultFontName),t.shadow&&(a.shadow=m(t.shadow)),t.outline?.width&&(a.line=h(t.outline)),void 0!==t.opacity&&(a.transparency=100*(1-t.opacity)),void 0!==t.paragraphSpace&&(a.paraSpaceBefore=t.paragraphSpace*sI),t.vertical&&(a.vert="eaVert"),e.addText(l,a)}else if("image"===t.type){const l={path:t.src,x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI};if(t.flipH&&(l.flipH=t.flipH),t.flipV&&(l.flipV=t.flipV),t.rotate&&(l.rotate=t.rotate),t.link){const e=f(t.link);e&&(l.hyperlink=e)}if(t.filters?.opacity&&(l.transparency=100-parseInt(t.filters?.opacity)),t.clip){"ellipse"===t.clip.shape&&(l.rounding=!0);const[e,a]=t.clip.range,[n,o]=e,[i,s]=a,r=t.width/((i-n)/iI),u=t.height/((s-o)/iI);l.w=r/iI,l.h=u/iI,l.sizing={type:"crop",x:n/iI*r/iI,y:o/iI*u/iI,w:(i-n)/iI*r/iI,h:(s-o)/iI*u/iI}}e.addImage(l)}else if("shape"===t.type){if(t.special){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),a=oI(l),n={data:a,x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI};if(t.rotate&&(n.rotate=t.rotate),t.link){const e=f(t.link);e&&(n.hyperlink=e)}e.addImage(n)}else{const l={x:t.width/t.viewBox[0],y:t.height/t.viewBox[1]},a=v(eI(t.path),l),n=d(t.fill),o=void 0===t.opacity?1:t.opacity,i={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,fill:{color:n.color,transparency:100*(1-n.alpha*o)},points:a};if(t.flipH&&(i.flipH=t.flipH),t.flipV&&(i.flipV=t.flipV),t.shadow&&(i.shadow=m(t.shadow)),t.outline?.width&&(i.line=h(t.outline)),t.rotate&&(i.rotate=t.rotate),t.link){const e=f(t.link);e&&(i.hyperlink=e)}e.addShape("custGeom",i)}if(t.text){const l=p(t.text.content),a={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,fontSize:20*sI,fontFace:"微软雅黑",color:"#000000",paraSpaceBefore:5*sI,valign:t.text.align};t.rotate&&(a.rotate=t.rotate),t.text.defaultColor&&(a.color=d(t.text.defaultColor).color),t.text.defaultFontName&&(a.fontFace=t.text.defaultFontName),e.addText(l,a)}}else if("line"===t.type){const l=Ce(t),a=v(eI(l)),{minX:n,maxX:o,minY:i,maxY:s}=xe(t),r=d(t.color),u={x:t.left/iI,y:t.top/iI,w:(o-n)/iI,h:(s-i)/iI,line:{color:r.color,transparency:100*(1-r.alpha),width:t.width*sI,dashType:"solid"===t.style?"solid":"dash",beginArrowType:t.points[0]?"arrow":"none",endArrowType:t.points[1]?"arrow":"none"},points:a};t.shadow&&(u.shadow=m(t.shadow)),e.addShape("custGeom",u)}else if("chart"===t.type){const l=[];for(let e=0;ed(e).color));else if(1===t.themeColor.length)a=(0,W.Z)(t.themeColor[0]).analogous(10).map((e=>d(e.toHexString()).color));else{const e=t.themeColor.length,l=(0,W.Z)(t.themeColor[e-1]).analogous(11-e).map((e=>e.toHexString()));a=[...t.themeColor.slice(0,e-1),...l].map((e=>d(e).color))}const n={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,chartColors:"pie"===t.chartType?a:a.slice(0,t.data.series.length)};t.fill&&(n.plotArea={fill:{color:d(t.fill).color}}),t.legend&&(n.showLegend=!0,n.legendPos="top"===t.legend?"t":"b",n.legendColor=d(t.gridColor||"#000000").color,n.legendFontSize=14*sI);let o=s.ChartType.bar;"bar"===t.chartType?(o=s.ChartType.bar,n.barDir=t.options?.horizontalBars?"bar":"col"):"line"===t.chartType?(t.options?.showArea?o=s.ChartType.area:!1===t.options?.showLine?(o=s.ChartType.scatter,l.unshift({name:"X-Axis",values:Array(t.data.series[0].length).fill(0).map(((e,t)=>t))}),n.lineSize=0):o=s.ChartType.line,t.options?.lineSmooth&&(n.lineSmooth=!0)):"pie"===t.chartType&&(t.options?.donut?(o=s.ChartType.doughnut,n.holeSize=75):o=s.ChartType.pie),e.addChart(o,l,n)}else if("table"===t.type){const l=[];for(let e=0;e1||n.rowspan>1)for(let a=e;ad(e))));for(let e=0;et.width*e/iI))};t.theme&&(s.fill={color:"#ffffff"}),t.outline.width&&t.outline.color&&(s.border={type:"solid"===t.outline.style?"solid":"dash",pt:t.outline.width*sI,color:d(t.outline.color).color}),e.addTable(a,s)}else if("latex"===t.type){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),a=oI(l),n={data:a,x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI};if(t.link){const e=f(t.link);e&&(n.hyperlink=e)}e.addImage(n)}else if(!o&&("video"===t.type||"audio"===t.type)){const l={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,path:t.src,type:t.type};"video"===t.type&&t.poster&&(l.cover=t.poster);const a=t.src.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);a&&a[1]?l.extn=a[1]:t.ext&&(l.extn=t.ext);const n=["avi","mp4","m4v","mov","wmv"],o=["mp3","m4a","mp4","wav","wma"];l.extn&&[...n,...o].includes(l.extn)&&e.addMedia(l)}}setTimeout((()=>{s.writeFile({fileName:`${n.value}.pptx`}).then((()=>i.value=!1)).catch((()=>{i.value=!1,ta.error("导出失败")}))}),200)};return{exporting:i,exportImage:r,exportJSON:c,exportSpecificFile:u,exportPPTX:g}};const uI=e=>((0,i.dD)("data-v-1df3f398"),e=e(),(0,i.Cn)(),e),cI={class:"export-img-dialog"},dI={class:"thumbnails-view"},pI={class:"configs"},vI={class:"row"},mI=uI((()=>(0,i._)("div",{class:"title"},"导出格式:",-1))),hI={class:"row"},fI=uI((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),gI={key:0,class:"row"},yI=["data-range"],wI={class:"row"},xI=uI((()=>(0,i._)("div",{class:"title"},"图片质量:",-1))),kI={class:"row"},bI=uI((()=>(0,i._)("div",{class:"title"},"忽略在线字体:",-1))),_I={class:"config-item"},II={class:"btns"};var SI=(0,i.aZ)({__name:"ExportImage",emits:["close"],setup(e,{emit:t}){const l=t,{slides:a,currentSlide:n}=(0,o.Jk)($()),r=(0,s.iH)(),u=(0,s.iH)("all"),c=(0,s.iH)([1,a.value.length]),d=(0,s.iH)("jpeg"),p=(0,s.iH)(1),v=(0,s.iH)(!0),m=(0,i.Fl)((()=>"all"===u.value?a.value:"current"===u.value?[n.value]:a.value.filter(((e,t)=>{const[l,a]=c.value;return t>=l-1&&t<=a-1})))),{exportImage:h,exporting:f}=rI(),g=()=>{r.value&&h(r.value,d.value,p.value,v.value)};return(e,t)=>{const n=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",cI,[(0,i._)("div",dI,[(0,i._)("div",{class:"thumbnails",ref_key:"imageThumbnailsRef",ref:r},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(m.value,(e=>((0,i.wg)(),(0,i.j4)(Jd,{class:"thumbnail",key:e.id,slide:e,size:1600},null,8,["slide"])))),128))],512)]),(0,i._)("div",pI,[(0,i._)("div",vI,[mI,(0,i.Wm)(ng,{class:"config-item",value:d.value,"onUpdate:value":t[0]||(t[0]=e=>d.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{style:{width:"50%"},value:"jpeg"},{default:(0,i.w5)((()=>[(0,i.Uk)("JPEG")])),_:1}),(0,i.Wm)(tg,{style:{width:"50%"},value:"png"},{default:(0,i.w5)((()=>[(0,i.Uk)("PNG")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",hI,[fI,(0,i.Wm)(ng,{class:"config-item",value:u.value,"onUpdate:value":t[1]||(t[1]=e=>u.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===u.value?((0,i.wg)(),(0,i.iD)("div",gI,[(0,i._)("div",{class:"title","data-range":`(${c.value[0]} ~ ${c.value[1]})`},"自定义范围:",8,yI),(0,i.Wm)(qm,{class:"config-item",range:"",min:1,max:(0,s.SU)(a).length,step:1,value:c.value,"onUpdate:value":t[2]||(t[2]=e=>c.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),(0,i._)("div",wI,[xI,(0,i.Wm)(qm,{class:"config-item",min:0,max:1,step:.1,value:p.value,"onUpdate:value":t[3]||(t[3]=e=>p.value=e)},null,8,["value"])]),(0,i._)("div",kI,[bI,(0,i._)("div",_I,[(0,i.wy)((0,i.Wm)(pf,{value:v.value,"onUpdate:value":t[4]||(t[4]=e=>v.value=e)},null,8,["value"]),[[n,"导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭【忽略在线字体】选项,但要注意这将会增加导出用时。"]])])])]),(0,i._)("div",II,[(0,i.Wm)(tp,{class:"btn export",type:"primary",onClick:t[5]||(t[5]=e=>g())},{default:(0,i.w5)((()=>[(0,i.Uk)("导出图片")])),_:1}),(0,i.Wm)(tp,{class:"btn close",onClick:t[6]||(t[6]=e=>l("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})]),(0,i.Wm)(Xa,{loading:(0,s.SU)(f),tip:"正在导出..."},null,8,["loading"])])}}});const CI=(0,Vl.Z)(SI,[["__scopeId","data-v-1df3f398"]]);var LI=CI;const TI={class:"export-json-dialog"},EI={class:"preview"},MI={class:"btns"};var UI=(0,i.aZ)({__name:"ExportJSON",emits:["close"],setup(e,{emit:t}){const l=t,{slides:a}=(0,o.Jk)($()),{exportJSON:n}=rI();return(e,t)=>((0,i.wg)(),(0,i.iD)("div",TI,[(0,i._)("div",EI,[(0,i._)("pre",null,(0,oe.zw)((0,s.SU)(a)),1)]),(0,i._)("div",MI,[(0,i.Wm)(tp,{class:"btn export",type:"primary",onClick:t[0]||(t[0]=e=>(0,s.SU)(n)())},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 JSON")])),_:1}),(0,i.Wm)(tp,{class:"btn close",onClick:t[1]||(t[1]=e=>l("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const WI=(0,Vl.Z)(UI,[["__scopeId","data-v-6a7223ca"]]);var DI=WI;const HI=()=>{const e=document.createElement("iframe");return e.style.width="0",e.style.height="0",e.style.position="absolute",e.style.right="0",e.style.top="0",e.style.border="0",document.body.appendChild(e),e},FI=(e,t,l)=>{const a="";let n="";const o=document.styleSheets;if(o)for(const d of o)if(d.cssRules)for(const e of d.cssRules)n+=e.cssText;const{width:i,height:s,margin:r}=l,u=`\n \n \n \n `,c=""+t.innerHTML+"";e.open(),e.write(`\n ${a}\n \n ${u}\n ${c}\n \n `),e.close()},AI=(e,t)=>{const l=HI(),a=l.contentWindow;if(!l.contentDocument||!a)return;FI(l.contentDocument,e,t);const n=()=>{a.focus(),a.print()},o=()=>{l.removeEventListener("load",n),a.removeEventListener("afterprint",o),document.body.removeChild(l)};l.addEventListener("load",n),a.addEventListener("afterprint",o)},$I=e=>((0,i.dD)("data-v-1668f898"),e=e(),(0,i.Cn)(),e),ZI={class:"export-pdf-dialog"},OI={class:"thumbnails-view"},RI={class:"configs"},zI={class:"row"},PI=$I((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),BI={class:"row"},NI=$I((()=>(0,i._)("div",{class:"title"},"每页数量:",-1))),jI={class:"row"},YI=$I((()=>(0,i._)("div",{class:"title"},"边缘留白:",-1))),VI={class:"config-item"},JI=$I((()=>(0,i._)("div",{class:"tip"}," 提示:若打印预览与实际样式不一致,请在弹出的打印窗口中勾选【背景图形】选项。 ",-1))),qI={class:"btns"};var XI=(0,i.aZ)({__name:"ExportPDF",emits:["close"],setup(e,{emit:t}){const l=t,{slides:a,currentSlide:n,viewportRatio:r}=(0,o.Jk)($()),u=(0,s.iH)(),c=(0,s.iH)("all"),d=(0,s.iH)(1),p=(0,s.iH)(!0),v=()=>{if(!u.value)return;const e={width:1600,height:"all"===c.value?1600*r.value*d.value:1600*r.value,margin:p.value?50:0};AI(u.value,e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ZI,[(0,i._)("div",OI,[(0,i._)("div",{class:"thumbnails",ref_key:"pdfThumbnailsRef",ref:u},["current"===c.value?((0,i.wg)(),(0,i.j4)(Jd,{key:0,class:"thumbnail",slide:(0,s.SU)(n),size:1600},null,8,["slide"])):((0,i.wg)(!0),(0,i.iD)(i.HY,{key:1},(0,i.Ko)((0,s.SU)(a),((e,t)=>((0,i.wg)(),(0,i.j4)(Jd,{class:(0,oe.C_)(["thumbnail",{"break-page":(t+1)%d.value===0}]),key:e.id,slide:e,size:1600},null,8,["class","slide"])))),128))],512)]),(0,i._)("div",RI,[(0,i._)("div",zI,[PI,(0,i.Wm)(ng,{class:"config-item",value:c.value,"onUpdate:value":t[0]||(t[0]=e=>c.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{style:{width:"50%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(tg,{style:{width:"50%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",BI,[NI,(0,i.Wm)(cp,{class:"config-item",value:d.value,"onUpdate:value":t[1]||(t[1]=e=>d.value=e),options:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3}]},null,8,["value"])]),(0,i._)("div",jI,[YI,(0,i._)("div",VI,[(0,i.Wm)(pf,{value:p.value,"onUpdate:value":t[2]||(t[2]=e=>p.value=e)},null,8,["value"])])]),JI]),(0,i._)("div",qI,[(0,i.Wm)(tp,{class:"btn export",type:"primary",onClick:t[3]||(t[3]=e=>v())},{default:(0,i.w5)((()=>[(0,i.Uk)("打印 / 导出 PDF")])),_:1}),(0,i.Wm)(tp,{class:"btn close",onClick:t[4]||(t[4]=e=>l("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const GI=(0,Vl.Z)(XI,[["__scopeId","data-v-1668f898"]]);var KI=GI;const QI=e=>((0,i.dD)("data-v-265d4b60"),e=e(),(0,i.Cn)(),e),eS={class:"export-pptx-dialog"},tS={class:"configs"},lS={class:"row"},aS=QI((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),nS={key:0,class:"row"},oS=["data-range"],iS={class:"row"},sS=QI((()=>(0,i._)("div",{class:"title"},"忽略音频/视频:",-1))),rS={class:"config-item"},uS={class:"row"},cS=QI((()=>(0,i._)("div",{class:"title"},"覆盖默认母版:",-1))),dS={class:"config-item"},pS={key:1,class:"tip"},vS={class:"btns"};var mS=(0,i.aZ)({__name:"ExportPPTX",emits:["close"],setup(e,{emit:t}){const l=t,{slides:a,currentSlide:n}=(0,o.Jk)($()),{exportPPTX:r,exporting:u}=rI(),c=(0,s.iH)("all"),d=(0,s.iH)([1,a.value.length]),p=(0,s.iH)(!0),v=(0,s.iH)(!0),m=(0,i.Fl)((()=>"all"===c.value?a.value:"current"===c.value?[n.value]:a.value.filter(((e,t)=>{const[l,a]=d.value;return t>=l-1&&t<=a-1}))));return(e,t)=>{const n=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",eS,[(0,i._)("div",tS,[(0,i._)("div",lS,[aS,(0,i.Wm)(ng,{class:"config-item",value:c.value,"onUpdate:value":t[0]||(t[0]=e=>c.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===c.value?((0,i.wg)(),(0,i.iD)("div",nS,[(0,i._)("div",{class:"title","data-range":`(${d.value[0]} ~ ${d.value[1]})`},"自定义范围:",8,oS),(0,i.Wm)(qm,{class:"config-item",range:"",min:1,max:(0,s.SU)(a).length,step:1,value:d.value,"onUpdate:value":t[1]||(t[1]=e=>d.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),(0,i._)("div",iS,[sS,(0,i._)("div",rS,[(0,i.wy)((0,i.Wm)(pf,{value:v.value,"onUpdate:value":t[2]||(t[2]=e=>v.value=e)},null,8,["value"]),[[n,"导出时默认忽略音视频,若您的幻灯片中存在音视频元素,且希望将其导出到PPTX文件中,可选择关闭【忽略音视频】选项,但要注意这将会大幅增加导出用时。"]])])]),(0,i._)("div",uS,[cS,(0,i._)("div",dS,[(0,i.Wm)(pf,{value:p.value,"onUpdate:value":t[3]||(t[3]=e=>p.value=e)},null,8,["value"])])]),v.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",pS," 提示:1. 支持导出格式:avi、mp4、mov、wmv、mp3、wav;2. 跨域资源无法导出。 "))]),(0,i._)("div",vS,[(0,i.Wm)(tp,{class:"btn export",type:"primary",onClick:t[4]||(t[4]=e=>(0,s.SU)(r)(m.value,p.value,v.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 PPTX")])),_:1}),(0,i.Wm)(tp,{class:"btn close",onClick:t[5]||(t[5]=e=>l("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})]),(0,i.Wm)(Xa,{loading:(0,s.SU)(u),tip:"正在导出..."},null,8,["loading"])])}}});const hS=(0,Vl.Z)(mS,[["__scopeId","data-v-265d4b60"]]);var fS=hS;const gS=e=>((0,i.dD)("data-v-26422ed7"),e=e(),(0,i.Cn)(),e),yS={class:"export-pptist-dialog"},wS={class:"configs"},xS={class:"row"},kS=gS((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),bS={key:0,class:"row"},_S=["data-range"],IS=gS((()=>(0,i._)("div",{class:"tip"}," 提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。 ",-1))),SS={class:"btns"};var CS=(0,i.aZ)({__name:"ExportSpecificFile",emits:["close"],setup(e,{emit:t}){const l=t,{slides:a,currentSlide:n}=(0,o.Jk)($()),{exportSpecificFile:r}=rI(),u=(0,s.iH)("all"),c=(0,s.iH)([1,a.value.length]),d=(0,i.Fl)((()=>"all"===u.value?a.value:"current"===u.value?[n.value]:a.value.filter(((e,t)=>{const[l,a]=c.value;return t>=l-1&&t<=a-1}))));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",yS,[(0,i._)("div",wS,[(0,i._)("div",xS,[kS,(0,i.Wm)(ng,{class:"config-item",value:u.value,"onUpdate:value":t[0]||(t[0]=e=>u.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===u.value?((0,i.wg)(),(0,i.iD)("div",bS,[(0,i._)("div",{class:"title","data-range":`(${c.value[0]} ~ ${c.value[1]})`},"自定义范围:",8,_S),(0,i.Wm)(qm,{class:"config-item",range:"",min:1,max:(0,s.SU)(a).length,step:1,value:c.value,"onUpdate:value":t[1]||(t[1]=e=>c.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),IS]),(0,i._)("div",SS,[(0,i.Wm)(tp,{class:"btn export",type:"primary",onClick:t[2]||(t[2]=e=>(0,s.SU)(r)(d.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 .pptist 文件")])),_:1}),(0,i.Wm)(tp,{class:"btn close",onClick:t[3]||(t[3]=e=>l("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const LS=(0,Vl.Z)(CS,[["__scopeId","data-v-26422ed7"]]);var TS=LS;const ES={class:"export-dialog"},MS={class:"content"};var US=(0,i.aZ)({__name:"index",setup(e){const t=R(),{dialogForExport:l}=(0,o.Jk)(t),a=t.setDialogForExport,n=[{key:"pptist",label:"导出 pptist 文件"},{key:"pptx",label:"导出 PPTX"},{key:"image",label:"导出图片"},{key:"json",label:"导出 JSON"},{key:"pdf",label:"打印 / 导出 PDF"}],r=(0,i.Fl)((()=>{const e={image:LI,json:DI,pdf:KI,pptx:fS,pptist:TS};return l.value&&e[l.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ES,[(0,i.Wm)(Kd,{tabs:n,value:(0,s.SU)(l),card:"","onUpdate:value":t[0]||(t[0]=e=>(0,s.SU)(a)(e))},null,8,["value"]),(0,i._)("div",MS,[((0,i.wg)(),(0,i.j4)((0,i.LL)(r.value),{onClose:t[1]||(t[1]=e=>(0,s.SU)(a)(""))},null,32))])]))}});const WS=(0,Vl.Z)(US,[["__scopeId","data-v-b20137f0"]]);var DS=WS;const HS={class:"title"},FS={class:"content"};var AS=(0,i.aZ)({__name:"MoveablePanel",props:{width:{},height:{},left:{default:10},top:{default:10},title:{default:""},moveable:{type:Boolean,default:!0}},emits:["close"],setup(e,{emit:t}){const l=e,a=t,n=(0,s.iH)(0),o=(0,s.iH)(0),r=(0,s.iH)(),u=(0,i.Fl)((()=>l.height?l.height:r.value?.clientHeight||0));(0,i.bv)((()=>{l.left>=0?n.value=l.left:n.value=document.body.clientWidth+l.left-l.width,l.top>=0?o.value=l.top:o.value=document.body.clientHeight+l.top-u.value}));const c=e=>{if(!l.moveable)return;let t=!0;const a=document.body.clientWidth,i=document.body.clientHeight,s=e.pageX,r=e.pageY,c=n.value,d=o.value;document.onmousemove=e=>{if(!t)return;const p=e.pageX-s,v=e.pageY-r;let m=c+p,h=d+v;m<0&&(m=0),h<0&&(h=0),m+l.width>a&&(m=a-l.width),h+u.value>i&&(h=i-u.value),n.value=m,o.value=h},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null}};return(e,t)=>{const l=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.iD)("div",{class:"moveable-panel",ref_key:"moveablePanelRef",ref:r,style:(0,oe.j5)({width:e.width+"px",height:e.height?e.height+"px":"auto",left:n.value+"px",top:o.value+"px"})},[e.title?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",{class:"header",onMousedown:t[1]||(t[1]=e=>c(e))},[(0,i._)("div",HS,(0,oe.zw)(e.title),1),(0,i._)("div",{class:"close-btn",onClick:t[0]||(t[0]=e=>a("close"))},[(0,i.Wm)(l)])],32),(0,i._)("div",FS,[(0,i.WI)(e.$slots,"default")])],64)):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"content",onMousedown:t[2]||(t[2]=e=>c(e))},[(0,i.WI)(e.$slots,"default")],32))],4)}}});const $S=(0,Vl.Z)(AS,[["__scopeId","data-v-fc791e00"]]);var ZS=$S;const OS=e=>((0,i.dD)("data-v-15470598"),e=e(),(0,i.Cn)(),e),RS={key:0,class:"handler"},zS={class:"btns"},PS={key:0,class:"icon-btns"},BS={class:"element-list"},NS={key:0,class:"group-els"},jS=OS((()=>(0,i._)("div",{class:"group-title"},"组合",-1))),YS=["onClick","onDblclick"],VS=["id","value","onBlur","onKeydown"],JS={key:1,class:"name"},qS={class:"icons"},XS=["onClick","onDblclick"],GS=["id","value","onBlur","onKeydown"],KS={key:1,class:"name"},QS={class:"icons"};var eC=(0,i.aZ)({__name:"SelectPanel",setup(e){const t=$(),l=R(),{currentSlide:a}=(0,o.Jk)(t),{handleElement:r,handleElementId:u,activeElementIdList:c,activeGroupElementId:d,hiddenElementIdList:p}=(0,o.Jk)(l),{orderElement:v}=ba(),m=(0,i.Fl)((()=>{const e=[];for(const t of a.value.elements)if(t.groupId){const l=e[e.length-1];l&&"group"===l.type&&l.id&&l.id===t.groupId?l.elements.push(t):e.push({type:"group",id:t.groupId,elements:[t]})}else e.push(t);return e})),h=(e,t)=>{if(u.value===t)return;if(p.value.includes(t))return;const a=e.elements.map((e=>e.id));l.setActiveElementIdList(a),l.setHandleElementId(t),(0,i.Y3)((()=>l.setActiveGroupElementId(t)))},f=e=>{u.value!==e&&(p.value.includes(e)||l.setActiveElementIdList([e]))},g=e=>{p.value.includes(e)?l.setHiddenElementIdList(p.value.filter((t=>t!==e))):l.setHiddenElementIdList([...p.value,e]),c.value.includes(e)&&l.setActiveElementIdList([])},y=()=>{const e=a.value.elements.map((e=>e.id)),t=p.value.filter((t=>!e.includes(t)));l.setHiddenElementIdList(t)},w=()=>{const e=a.value.elements.map((e=>e.id));l.setHiddenElementIdList([...p.value,...e]),c.value.length&&l.setActiveElementIdList([])},x=(0,s.iH)(""),k=(e,l)=>{const a=e.target.value;t.updateElement({id:l,props:{name:a}}),x.value=""},b=e=>{x.value=e,(0,i.Y3)((()=>{const t=document.querySelector(`#input-${e}`);t.focus()}))},_=()=>{l.setSelectPanelState(!1)};return(e,t)=>{const l=(0,i.up)("IconDown"),o=(0,i.up)("IconUp"),u=(0,i.up)("IconPreviewClose"),I=(0,i.up)("IconPreviewOpen");return(0,i.wg)(),(0,i.j4)(ZS,{class:"select-panel",width:200,height:360,title:`选择(${(0,s.SU)(c).length}/${(0,s.SU)(a).elements.length})`,left:-270,top:90,onClose:t[4]||(t[4]=e=>_())},{default:(0,i.w5)((()=>[m.value.length?((0,i.wg)(),(0,i.iD)("div",RS,[(0,i._)("div",zS,[(0,i.Wm)(tp,{size:"small",style:{"margin-right":"5px"},onClick:t[0]||(t[0]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部显示")])),_:1}),(0,i.Wm)(tp,{size:"small",onClick:t[1]||(t[1]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部隐藏")])),_:1})]),(0,s.SU)(r)?((0,i.wg)(),(0,i.iD)("div",PS,[(0,i.Wm)(l,{class:"icon-btn",onClick:t[2]||(t[2]=e=>(0,s.SU)(v)((0,s.SU)(r),(0,s.SU)(Q).UP))}),(0,i.Wm)(o,{class:"icon-btn",onClick:t[3]||(t[3]=e=>(0,s.SU)(v)((0,s.SU)(r),(0,s.SU)(Q).DOWN))})])):(0,i.kq)("",!0)])):(0,i.kq)("",!0),(0,i._)("div",BS,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(m.value,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.id},["group"===e.type?((0,i.wg)(),(0,i.iD)("div",NS,[jS,((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.elements,(t=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["item",{active:(0,s.SU)(c).includes(t.id),"group-active":(0,s.SU)(d).includes(t.id)}]),key:t.id,onClick:l=>h(e,t.id),onDblclick:e=>b(t.id)},[x.value===t.id?((0,i.wg)(),(0,i.iD)("input",{key:0,id:`input-${t.id}`,value:t.name||(0,s.SU)($n)[t.type],class:"input",type:"text",onBlur:e=>k(e,t.id),onKeydown:(0,n.D2)((e=>k(e,t.id)),["enter"])},null,40,VS)):((0,i.wg)(),(0,i.iD)("div",JS,(0,oe.zw)(t.name||(0,s.SU)($n)[t.type]),1)),(0,i._)("div",qS,[(0,s.SU)(p).includes(t.id)?((0,i.wg)(),(0,i.j4)(u,{key:0,style:{"font-size":"17px"},onClick:(0,n.iM)((e=>g(t.id)),["stop"])},null,8,["onClick"])):((0,i.wg)(),(0,i.j4)(I,{key:1,style:{"font-size":"17px"},onClick:(0,n.iM)((e=>g(t.id)),["stop"])},null,8,["onClick"]))])],42,YS)))),128))])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:(0,oe.C_)(["item",{active:(0,s.SU)(c).includes(e.id)}]),onClick:t=>f(e.id),onDblclick:t=>b(e.id)},[x.value===e.id?((0,i.wg)(),(0,i.iD)("input",{key:0,id:`input-${e.id}`,value:e.name||(0,s.SU)($n)[e.type],class:"input",type:"text",onBlur:t=>k(t,e.id),onKeydown:(0,n.D2)((t=>k(t,e.id)),["enter"])},null,40,GS)):((0,i.wg)(),(0,i.iD)("div",KS,(0,oe.zw)(e.name||(0,s.SU)($n)[e.type]),1)),(0,i._)("div",QS,[(0,s.SU)(p).includes(e.id)?((0,i.wg)(),(0,i.j4)(u,{key:0,style:{"font-size":"17px"},onClick:(0,n.iM)((t=>g(e.id)),["stop"])},null,8,["onClick"])):((0,i.wg)(),(0,i.j4)(I,{key:1,style:{"font-size":"17px"},onClick:(0,n.iM)((t=>g(e.id)),["stop"])},null,8,["onClick"]))])],42,XS))],64)))),128))])])),_:1},8,["title"])}}});const tC=(0,Vl.Z)(eC,[["__scopeId","data-v-15470598"]]);var lC=tC,aC=()=>{const e=R(),t=$(),{handleElement:l}=(0,o.Jk)(e),{slides:a,slideIndex:n,currentSlide:r}=(0,o.Jk)(t),u=(0,s.iH)(""),c=(0,s.iH)(""),d=(0,s.iH)([]),p=(0,s.iH)(-1),v=(0,s.iH)("g"),m=()=>{const e=[],t=new RegExp(u.value,v.value),l=/(<([^>]+)>)/g;for(const n of a.value)for(const a of n.elements)if("text"===a.type){const o=a.content.replace(l,""),i=o.match(t);i&&e.push(...new Array(i.length).fill({slideId:n.id,elId:a.id,elType:a.type}))}else if("shape"===a.type&&a.text&&a.text.content){const o=a.text.content.replace(l,""),i=o.match(t);i&&e.push(...new Array(i.length).fill({slideId:n.id,elId:a.id,elType:a.type}))}else if("table"===a.type)for(let o=0;o{const t=[...e.childNodes],l=[];while(t.length){const e=t.shift();e.nodeType===e.TEXT_NODE?e.wholeText&&l.push(e):t.unshift(...e.childNodes)}return l},f=e=>{let t=0;const l=e.map((e=>{const l=t,a=t+e.wholeText.length;return t=a,{text:e.wholeText,startIdx:l,endIdx:a}}));return l},g=(e,t)=>{const l=new RegExp(t,v.value),a=[];let n=l.exec(e);while(n)a.push(n),n=l.exec(e);return a},y=(e,t,l,a)=>{for(let n=l.length-1;n>=0;n--){const o=l[n],i=o.index,s=i+o[0].length;for(let l=0;l=s)break;let c=e[l];const d=Math.max(0,i-r),p=Math.min(u,s)-r-d;d>0&&(c=c.splitText(d)),p{for(const l of e)l.innerHTML=l.innerHTML.replace(new RegExp(u.value,v.value),(()=>`${u.value}`))},x=()=>{const e=document.querySelectorAll(".editable-element mark");for(const t of e)setTimeout((()=>{const e=t.parentNode,l=t.textContent;e.replaceChild(document.createTextNode(l),t)}),0)},k=()=>{x(),setTimeout((()=>{for(let e=0;ee)).join(""),o=g(n,u.value);y(t,l,o,e)}}}),0)},b=()=>{const e=document.querySelectorAll("mark[data-index]");for(const t of e)setTimeout((()=>{const e=t.dataset.index;void 0!==e&&+e===p.value?t.classList.add("active"):t.classList.remove("active")}),0)},_=()=>{if(-1===p.value)return;const e=d.value[p.value];if(e.slideId===r.value.id)setTimeout(b,0);else{const l=a.value.findIndex((t=>t.id===e.slideId));-1!==l&&t.updateSlideIndex(l)}},I=()=>{if(!u.value)return ta.warning("请先输入查找内容");e.setActiveElementIdList([]),-1===p.value?m():p.value{if(!u.value)return ta.warning("请先输入查找内容");e.setActiveElementIdList([]),-1===p.value?m():p.value>0?p.value-=1:p.value=d.value.length-1,_()},C=()=>{if(!u.value)return;if(-1===p.value)return void I();const e=d.value[p.value];let l=null;if("table"===e.elType){const[t,a]=e.cellIndex;l=document.querySelector(`#editable-element-${e.elId} .cell[data-cell-index="${t}_${a}"] .cell-text`)}else l=document.querySelector(`#editable-element-${e.elId} .ProseMirror`);if(!l)return;const a=document.createElement("div");a.innerHTML=l.innerHTML;let n=!1;const o=a.querySelectorAll("mark[data-index]");for(const t of o){const e=t.parentNode;if(t.classList.contains("active"))n?e.removeChild(t):(e.replaceChild(document.createTextNode(c.value),t),n=!0);else{const l=t.textContent;e.replaceChild(document.createTextNode(l),t)}}if("text"===e.elType){const l={content:a.innerHTML};t.updateElement({id:e.elId,props:l})}else if("shape"===e.elType){const l=r.value.elements.find((t=>t.id===e.elId));if(l&&"shape"===l.type&&l.text){const n={text:{...l.text,content:a.innerHTML}};t.updateElement({id:e.elId,props:n})}}else if("table"===e.elType){const l=r.value.elements.find((t=>t.id===e.elId));if(l&&"table"===l.type){const n=l.data.map(((t,l)=>l===e.cellIndex[0]?t.map(((t,l)=>l===e.cellIndex[1]?{...t,text:a.innerHTML}:t)):t)),o={data:n};t.updateElement({id:e.elId,props:o})}}d.value.splice(p.value,1),d.value.length?(p.value>d.value.length-1&&(p.value=0),(0,i.Y3)((()=>{k(),_()}))):p.value=-1},L=()=>{if(u.value)if(-1!==p.value){for(let e=0;ee.id===n.slideId));if(!o)continue;const i=o.elements.find((e=>e.id===n.elId));if(!i)continue;const s=document.createElement("div");if("text"===i.type?s.innerHTML=i.content:"shape"===i.type&&(s.innerHTML=i.text?.content||""),"table"===n.elType){const e=i.data.map((e=>e.map((e=>e.text?{...e,text:e.text.replaceAll(u.value,c.value)}:e)))),l={data:e};t.updateElement({id:n.elId,slideId:n.slideId,props:l})}else{const l=h(s),a=f(l),o=a.map((({text:e})=>e)).join(""),i=g(o,u.value);y(l,a,i,e);const d=s.querySelectorAll("mark[data-index]");let p=-1;for(const e of d){const t=+e.dataset.index,l=e.parentNode;t===p?l.removeChild(e):(l.replaceChild(document.createTextNode(c.value),e),p=t)}if("text"===n.elType){const e={content:s.innerHTML};t.updateElement({id:n.elId,slideId:n.slideId,props:e})}else if("shape"===n.elType){const e=r.value.elements.find((e=>e.id===n.elId));if(e&&"shape"===e.type&&e.text){const l={text:{...e.text,content:s.innerHTML}};t.updateElement({id:n.elId,slideId:n.slideId,props:l})}}}}d.value=[],p.value=-1}else I()},T=()=>{p.value=-1,d.value=[],u.value||x()};(0,i.YP)(u,T),(0,i.YP)(n,(()=>{(0,i.Y3)((()=>{k(),setTimeout(b,0)}))})),(0,i.YP)(l,(()=>{l.value&&(p.value=-1,d.value=[],x())})),(0,i.Jd)(x);const E=()=>{v.value="g"===v.value?"gi":"g",T()};return{searchWord:u,replaceWord:c,searchResults:d,searchIndex:p,modifiers:v,searchNext:I,searchPrev:S,replace:C,replaceAll:L,toggleModifiers:E}};const nC={class:"count"},oC={key:1,class:"footer"};var iC=(0,i.aZ)({__name:"SearchPanel",setup(e){const t=R(),{searchWord:l,replaceWord:a,searchResults:o,searchIndex:r,modifiers:u,searchNext:c,searchPrev:d,replace:p,replaceAll:v,toggleModifiers:m}=aC(),h=(0,s.iH)("search"),f=[{key:"search",label:"查找"},{key:"replace",label:"替换"}],g=()=>{t.setSearchPanelState(!1)},y=(0,s.iH)();return(0,i.bv)((()=>{y.value.focus()})),(0,i.YP)(h,(()=>{(0,i.Y3)((()=>{y.value.focus()}))})),(e,t)=>{const w=(0,i.up)("IconClose"),x=(0,i.up)("IconLeft"),k=(0,i.up)("IconRight"),b=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.j4)(ZS,{class:"search-panel",width:330,height:0,left:-270,top:90},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"close-btn",onClick:t[0]||(t[0]=e=>g()),onMousedown:t[1]||(t[1]=(0,n.iM)((()=>{}),["stop"]))},[(0,i.Wm)(w)],32),(0,i.Wm)(Kd,{tabs:f,value:h.value,"onUpdate:value":t[2]||(t[2]=e=>h.value=e)},null,8,["value"]),(0,i._)("div",{class:(0,oe.C_)(["content",h.value]),onMousedown:t[12]||(t[12]=(0,n.iM)((()=>{}),["stop"]))},[(0,i.Wm)(sn,{class:"input",value:(0,s.SU)(l),"onUpdate:value":t[6]||(t[6]=e=>(0,s.dq)(l)?l.value=e:null),placeholder:"输入查找内容",onEnter:t[7]||(t[7]=e=>(0,s.SU)(c)()),ref_key:"searchInpRef",ref:y},{suffix:(0,i.w5)((()=>[(0,i._)("span",nC,(0,oe.zw)((0,s.SU)(r)+1)+"/"+(0,oe.zw)((0,s.SU)(o).length),1),(0,i.Wm)(Zc,{type:"vertical"}),(0,i.wy)(((0,i.wg)(),(0,i.iD)("span",{class:(0,oe.C_)(["ignore-case",{active:"g"===(0,s.SU)(u)}]),onClick:t[3]||(t[3]=e=>(0,s.SU)(m)())},[(0,i.Uk)("Aa")],2)),[[b,"忽略大小写"]]),(0,i.Wm)(Zc,{type:"vertical"}),(0,i.wy)((0,i.Wm)(x,{class:"next-btn left",onClick:t[4]||(t[4]=e=>(0,s.SU)(d)())},null,512),[[b,"上一个"]]),(0,i.wy)((0,i.Wm)(k,{class:"next-btn right",onClick:t[5]||(t[5]=e=>(0,s.SU)(c)())},null,512),[[b,"下一个"]])])),_:1},8,["value"]),"replace"===h.value?((0,i.wg)(),(0,i.j4)(sn,{key:0,class:"input",value:(0,s.SU)(a),"onUpdate:value":t[8]||(t[8]=e=>(0,s.dq)(a)?a.value=e:null),placeholder:"输入替换内容",onEnter:t[9]||(t[9]=e=>(0,s.SU)(p)())},null,8,["value"])):(0,i.kq)("",!0),"replace"===h.value?((0,i.wg)(),(0,i.iD)("div",oC,[(0,i.Wm)(tp,{disabled:!(0,s.SU)(l),style:{"margin-left":"5px"},onClick:t[10]||(t[10]=e=>(0,s.SU)(p)())},{default:(0,i.w5)((()=>[(0,i.Uk)("替换")])),_:1},8,["disabled"]),(0,i.Wm)(tp,{disabled:!(0,s.SU)(l),type:"primary",style:{"margin-left":"5px"},onClick:t[11]||(t[11]=e=>(0,s.SU)(v)())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部替换")])),_:1},8,["disabled"])])):(0,i.kq)("",!0)],34)])),_:1})}}});const sC=(0,Vl.Z)(iC,[["__scopeId","data-v-fb93ddde"]]);var rC=sC;const uC={class:"pptist-editor"},cC={class:"layout-content"},dC={class:"layout-content-center"};var pC=(0,i.aZ)({__name:"index",setup(e){const t=R(),{dialogForExport:l,showSelectPanel:a,showSearchPanel:n}=(0,o.Jk)(t),r=()=>t.setDialogForExport(""),u=(0,s.iH)(40);return Ta(),Ea(),(e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i._)("div",uC,[(0,i.Wm)(Ln,{class:"layout-header"}),(0,i._)("div",cC,[(0,i.Wm)(Rm,{class:"layout-content-left"}),(0,i._)("div",dC,[(0,i.Wm)(Sm,{class:"center-top"}),(0,i.Wm)(Cp,{class:"center-body",style:(0,oe.j5)({height:`calc(100% - ${u.value+40}px)`})},null,8,["style"]),(0,i.Wm)(I_,{class:"center-bottom",height:u.value,"onUpdate:height":t[0]||(t[0]=e=>u.value=e),style:(0,oe.j5)({height:`${u.value}px`})},null,8,["height","style"])]),(0,i.Wm)(f_,{class:"layout-content-right"})])]),(0,s.SU)(a)?((0,i.wg)(),(0,i.j4)(lC,{key:0})):(0,i.kq)("",!0),(0,s.SU)(n)?((0,i.wg)(),(0,i.j4)(rC,{key:1})):(0,i.kq)("",!0),(0,i.Wm)(kp,{visible:!!(0,s.SU)(l),width:680,onClosed:t[1]||(t[1]=e=>r())},{default:(0,i.w5)((()=>[(0,i.Wm)(DS)])),_:1},8,["visible"])],64))}});const vC=(0,Vl.Z)(pC,[["__scopeId","data-v-1e00f97b"]]);var mC=vC,hC=()=>{const e=$(),{slides:t,slideIndex:l,formatedAnimations:a}=(0,o.Jk)(e),n=(0,s.iH)(0),r=(0,s.iH)(!1),u=(0,s.iH)(l.value),c=()=>{if(r.value)return;const{animations:e,autoNext:t}=a.value[n.value];n.value+=1,r.value=!0;let l=0;for(const a of e){const n=document.querySelector(`#screen-element-${a.elId} [class^=base-element-]`);if(!n){l+=1;continue}const o=`${yk}${a.effect}`;n.style.removeProperty("--animate-duration");for(const e of n.classList)-1!==e.indexOf(yk)&&n.classList.remove(e,`${yk}animated`);n.style.setProperty("--animate-duration",`${a.duration}ms`),n.classList.add(o,`${yk}animated`);const i=()=>{"out"!==a.type&&(n.style.removeProperty("--animate-duration"),n.classList.remove(o,`${yk}animated`)),l+=1,l===e.length&&(r.value=!1,t&&c())};n.addEventListener("animationend",i,{once:!0})}},d=()=>{n.value-=1;const{animations:e}=a.value[n.value];for(const t of e){const e=document.querySelector(`#screen-element-${t.elId} [class^=base-element-]`);if(e){e.style.removeProperty("--animate-duration");for(const t of e.classList)-1!==t.indexOf(yk)&&e.classList.remove(t,`${yk}animated`)}}e.every((e=>"attention"===e.type))&&g()},p=(0,s.iH)(0),v=()=>{p.value&&(clearInterval(p.value),p.value=0)};(0,i.Ah)(v);const m=(0,s.iH)(!1),h=e=>{m.value=e},f=(0,D.throttle)((function(e){ta.success(e)}),1e3,{leading:!0,trailing:!1}),g=()=>{a.value.length&&n.value>0?d():l.value>0?(e.updateSlideIndex(l.value-1),l.value{a.value.length&&n.value{v(),ta.success("开始自动放映"),p.value=setInterval(y,w.value)},k=e=>{v(),w.value=e,x()},b=(0,D.throttle)((function(e){e.deltaY<0?g():e.deltaY>0&&y()}),500,{leading:!0,trailing:!1}),_=(0,s.iH)(null),I=e=>{_.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},S=e=>{if(!_.value)return;const t=Math.abs(_.value.x-e.changedTouches[0].pageX),l=e.changedTouches[0].pageY-_.value.y;Math.abs(l)>t&&Math.abs(l)>50&&(_.value=null,l>0?g():y())},C=e=>{const t=e.key.toUpperCase();t===ne.UP||t===ne.LEFT||t===ne.PAGEUP?g():t!==ne.DOWN&&t!==ne.RIGHT&&t!==ne.SPACE&&t!==ne.ENTER&&t!==ne.PAGEDOWN||y()};(0,i.bv)((()=>document.addEventListener("keydown",C))),(0,i.Ah)((()=>document.removeEventListener("keydown",C)));const L=()=>{e.updateSlideIndex(l.value-1),n.value=0},T=()=>{e.updateSlideIndex(l.value+1),n.value=0},E=t=>{e.updateSlideIndex(t),n.value=0},M=l=>{const a=t.value.findIndex((e=>e.id===l));-1!==a&&(e.updateSlideIndex(a),n.value=0)};return{autoPlayTimer:p,autoPlayInterval:w,setAutoPlayInterval:k,autoPlay:x,closeAutoPlay:v,loopPlay:m,setLoopPlay:h,mousewheelListener:b,touchStartListener:I,touchEndListener:S,turnPrevSlide:L,turnNextSlide:T,turnSlideToIndex:E,turnSlideToId:M,execPrev:g,execNext:y,animationIndex:n}},fC=e=>{const t=$(),{viewportRatio:l}=(0,o.Jk)(t),a=(0,s.iH)(0),n=(0,s.iH)(0),r=()=>{const t=e?.value||document.body,o=t.clientWidth,i=t.clientHeight;let s,r;i/o===l.value?(s=o,r=i):i/o>l.value?(s=o,r=o*l.value):(s=i/l.value,r=i),a.value=s,n.value=r};return(0,i.bv)((()=>{r(),window.addEventListener("resize",r)})),(0,i.Ah)((()=>{window.removeEventListener("resize",r)})),{slideWidth:a,slideHeight:n}},gC=()=>{const e=(0,s.iH)(!0),t=(0,s.iH)(!0),{exitScreening:l}=Ca(),a=()=>{e.value=Sa(),!e.value&&t.value&&l(),t.value=!0};(0,i.bv)((()=>{e.value=Sa(),document.addEventListener("fullscreenchange",a),document.addEventListener("webkitfullscreenchange",a)})),(0,i.Ah)((()=>{document.removeEventListener("fullscreenchange",a),document.removeEventListener("webkitfullscreenchange",a)}));const n=()=>{e.value&&(t.value=!1,Ia())};return{fullscreenState:e,manualExitFullscreen:n}};const yC={class:"element-content"};var wC=(0,i.aZ)({__name:"ScreenVideoElement",props:{elementInfo:{}},setup(e){const{currentSlide:t}=(0,o.Jk)($()),l=(0,i.f3)(Tn)||(0,s.iH)(1),a=(0,i.f3)(En)||(0,s.iH)(""),n=(0,i.Fl)((()=>t.value.id===a.value));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-video screen-element-video",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",yC,[n.value?((0,i.wg)(),(0,i.j4)(Fr,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,autoplay:e.elementInfo.autoplay,scale:(0,s.SU)(l)},null,8,["width","height","src","poster","autoplay","scale"])):(0,i.kq)("",!0)])],4)],4))}});const xC=(0,Vl.Z)(wC,[["__scopeId","data-v-76bf5b3f"]]);var kC=xC;const bC={class:"element-content"};var _C=(0,i.aZ)({__name:"ScreenAudioElement",props:{elementInfo:{}},setup(e){const t=e,{viewportRatio:l,currentSlide:a}=(0,o.Jk)($()),n=(0,i.f3)(Tn)||(0,s.iH)(1),r=(0,i.f3)(En)||(0,s.iH)(""),u=(0,i.Fl)((()=>a.value.id===r.value)),c=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px")),d=(0,i.Fl)((()=>{const e=oa,a=oa*l.value,o=280/n.value,i=50/n.value,s=t.elementInfo.width,r=t.elementInfo.height,u=t.elementInfo.left,c=t.elementInfo.top;let d=0,p=r;return u+o>=e&&(d=s-o),c+r+i>=a&&(p=-i),{left:d+"px",top:p+"px"}})),p=(0,s.iH)(),v=()=>{p.value&&p.value.toggle()};return(e,t)=>{const l=(0,i.up)("IconVolumeNotice");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-audio screen-element-audio",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",bC,[(0,i.Wm)(l,{class:"audio-icon",style:(0,oe.j5)({fontSize:c.value,color:e.elementInfo.color}),onClick:t[0]||(t[0]=e=>v())},null,8,["style"]),u.value?((0,i.wg)(),(0,i.j4)(lu,{key:0,class:"audio-player",ref_key:"audioPlayerRef",ref:p,style:(0,oe.j5)({...d.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,autoplay:e.elementInfo.autoplay,scale:(0,s.SU)(n)},null,8,["style","src","loop","autoplay","scale"])):(0,i.kq)("",!0)])],4)],4)}}});const IC=(0,Vl.Z)(_C,[["__scopeId","data-v-adf39436"]]);var SC=IC;const CC=["id","title"];var LC=(0,i.aZ)({__name:"ScreenElement",props:{elementInfo:{},elementIndex:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[sa.IMAGE]:Gc,[sa.TEXT]:td,[sa.SHAPE]:ud,[sa.LINE]:md,[sa.CHART]:gd,[sa.TABLE]:Ld,[sa.LATEX]:Hd,[sa.VIDEO]:kC,[sa.AUDIO]:SC};return e[t.elementInfo.type]||null})),{formatedAnimations:a,theme:n}=(0,o.Jk)($()),r=(0,i.Fl)((()=>{const e=a.value.findIndex((e=>{const l=e.animations.map((e=>e.elId));return l.includes(t.elementInfo.id)}));if(-1===e)return!1;if(ee.elId===t.elementInfo.id));return"in"===l?.type})),u=()=>{const e=t.elementInfo.link;e&&("web"===e.type?(t.manualExitFullscreen(),window.open(e.target)):"slide"===e.type&&t.turnSlideToId(e.target))};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["screen-element",{link:e.elementInfo.link}]),id:`screen-element-${e.elementInfo.id}`,style:(0,oe.j5)({zIndex:e.elementIndex,color:(0,s.SU)(n).fontColor,fontFamily:(0,s.SU)(n).fontName,visibility:r.value?"hidden":"visible"}),title:e.elementInfo.link?.target||"",onClick:t[0]||(t[0]=e=>u())},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo},null,8,["elementInfo"]))],14,CC))}});const TC=(0,Vl.Z)(LC,[["__scopeId","data-v-2139723a"]]);var EC=TC,MC=(0,i.aZ)({__name:"ScreenSlide",props:{slide:{},scale:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{viewportRatio:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.slide.background)),{backgroundStyle:n}=yu(a),r=(0,i.Fl)((()=>t.slide.id));return(0,i.JJ)(En,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"screen-slide",style:(0,oe.j5)({width:(0,s.SU)(oa)+"px",height:(0,s.SU)(oa)*(0,s.SU)(l)+"px",transform:`scale(${e.scale})`})},[(0,i._)("div",{class:"background",style:(0,oe.j5)({...(0,s.SU)(n)})},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.slide.elements,((t,l)=>((0,i.wg)(),(0,i.j4)(EC,{key:t.id,elementInfo:t,elementIndex:l+1,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["elementInfo","elementIndex","animationIndex","turnSlideToId","manualExitFullscreen"])))),128))],4))}});const UC=(0,Vl.Z)(MC,[["__scopeId","data-v-016af5da"]]);var WC=UC;const DC={class:"screen-slide-list"};var HC=(0,i.aZ)({__name:"ScreenSlideList",props:{slideWidth:{},slideHeight:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a}=(0,o.Jk)($()),n=(0,i.Fl)((()=>l.value.map((e=>{let t=e.turningMode;if(t||(t="slideY"),"random"===t){const e=bk.filter((e=>!["random","no"].includes(e.value))).map((e=>e.value));t=e[Math.floor(Math.random()*e.length)]}return{...e,turningMode:t}})))),r=(0,i.Fl)((()=>t.slideWidth/oa));return(0,i.JJ)(Tn,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",DC,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(n.value,((t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["slide-item",`turning-mode-${t.turningMode}`,{current:l===(0,s.SU)(a),before:l<(0,s.SU)(a),after:l>(0,s.SU)(a),hide:(l===(0,s.SU)(a)-1||l===(0,s.SU)(a)+1)&&t.turningMode!==n.value[(0,s.SU)(a)].turningMode}]),key:t.id},[Math.abs((0,s.SU)(a)-l)<2||t.animations?.length?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"slide-content",style:(0,oe.j5)({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[(0,i.Wm)(WC,{slide:t,scale:r.value,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["slide","scale","animationIndex","turnSlideToId","manualExitFullscreen"])],4)):(0,i.kq)("",!0)],2)))),128))]))}});const FC=(0,Vl.Z)(HC,[["__scopeId","data-v-552b63d2"]]);var AC=FC;const $C={class:"slide-thumbnails"},ZC={class:"return-button"},OC={class:"slide-thumbnails-content"},RC=["onClick"];var zC=(0,i.aZ)({__name:"SlideThumbnails",props:{turnSlideToIndex:{type:Function}},emits:["close"],setup(e,{emit:t}){const l=e,a=t,{slides:n,slideIndex:r}=(0,o.Jk)($()),{slidesLoadLimit:u}=Cm(),c=e=>{l.turnSlideToIndex(e),a("close")};return(e,t)=>{const l=(0,i.up)("IconArrowCircleLeft");return(0,i.wg)(),(0,i.iD)("div",$C,[(0,i._)("div",ZC,[(0,i.Wm)(l,{class:"icon",onClick:t[0]||(t[0]=e=>a("close"))})]),(0,i._)("div",OC,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(n),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["thumbnail",{active:t===(0,s.SU)(r)}]),key:e.id,onClick:e=>c(t)},[(0,i.Wm)(Jd,{slide:e,size:150,visible:t<(0,s.SU)(u)},null,8,["slide","visible"])],10,RC)))),128))])])}}});const PC=(0,Vl.Z)(zC,[["__scopeId","data-v-15912b32"]]);var BC=PC;const NC={key:0,class:"blackboard"};var jC=(0,i.aZ)({__name:"WritingBoard",props:{color:{default:"#ffcc00"},model:{default:"pen"},blackboard:{type:Boolean,default:!1},penSize:{default:6},markSize:{default:24},rubberSize:{default:80}},emits:["end"],setup(e,{expose:t,emit:l}){const a=e,n=l;let o=null;const r=(0,s.iH)(),u=(0,s.iH)();let c={x:0,y:0},d=!1,p=0,v=-1;const m=(0,s.iH)({x:0,y:0}),h=(0,s.iH)(!1),f=(0,s.iH)(0),g=(0,s.iH)(0),y=(0,i.Fl)((()=>u.value?f.value/u.value.width:1)),w=(0,i.Fl)((()=>u.value?g.value/u.value.height:1)),x=()=>{r.value&&(f.value=r.value.clientWidth,g.value=r.value.clientHeight)},k=new ResizeObserver(x);(0,i.bv)((()=>{r.value&&k.observe(r.value)})),(0,i.Ah)((()=>{r.value&&k.unobserve(r.value)}));const b=()=>{u.value&&r.value&&(o=u.value.getContext("2d"),o&&(u.value.width=r.value.clientWidth,u.value.height=r.value.clientHeight,o.lineCap="round",o.lineJoin="round"))};(0,i.bv)(b);const _=()=>{o&&("mark"===a.model?(o.globalCompositeOperation="xor",o.globalAlpha=.5):"pen"===a.model&&(o.globalCompositeOperation="source-over",o.globalAlpha=1))};(0,i.YP)((()=>a.model),_);const I=(e,t,l)=>{if(!o)return;const n=c.x,i=c.y;o.lineWidth=l,o.strokeStyle=a.color,o.beginPath(),o.moveTo(n,i),o.lineTo(e,t),o.stroke(),o.closePath()},S=(e,t)=>{if(!o||!u.value)return;const l=c.x,n=c.y,i=a.rubberSize/2,s=i*Math.sin(Math.atan((t-n)/(e-l))),r=i*Math.cos(Math.atan((t-n)/(e-l))),d=[l+s,n-r],p=[l-s,n+r],v=[e+s,t-r],m=[e-s,t+r];o.save(),o.beginPath(),o.arc(e,t,i,0,2*Math.PI),o.clip(),o.clearRect(0,0,u.value.width,u.value.height),o.restore(),o.save(),o.beginPath(),o.moveTo(...d),o.lineTo(...v),o.lineTo(...m),o.lineTo(...p),o.closePath(),o.clip(),o.clearRect(0,0,u.value.width,u.value.height),o.restore()},C=(e,t)=>{const l=c.x,a=c.y;return Math.sqrt((e-l)*(e-l)+(t-a)*(t-a))},L=(e,t)=>{const l=10,n=.1,o=a.penSize,i=3,s=e/t;let r;return r=s<=n?o:s>=l?i:o-s/l*o,-1===v?r:1*r/3+2*v/3},T=(e,t)=>{const l=(new Date).getTime();if("pen"===a.model){const a=C(e,t),n=l-p,o=L(a,n);I(e,t,o),v=o}else"mark"===a.model?I(e,t,a.markSize):S(e,t);c={x:e,y:t},p=(new Date).getTime()},E=e=>{if(!u.value)return[0,0];const t=e instanceof MouseEvent?e:e.changedTouches[0],l=u.value.getBoundingClientRect(),a=t.pageX-l.x,n=t.pageY-l.y;return[a,n]},M=e=>{const[t,l]=E(e),a=t/y.value,n=l/w.value;d=!0,c={x:a,y:n},p=(new Date).getTime(),e instanceof MouseEvent||(m.value={x:t,y:l},h.value=!0)},U=e=>{const[t,l]=E(e),a=t/y.value,n=l/w.value;m.value={x:t,y:l},d&&T(a,n)},W=()=>{d&&(d=!1,n("end"))},D=()=>{o&&u.value&&(o.clearRect(0,0,u.value.width,u.value.height),n("end"))},H=()=>u.value?.toDataURL(),F=e=>{if(o&&u.value&&(o.clearRect(0,0,u.value.width,u.value.height),e)){o.globalCompositeOperation="source-over",o.globalAlpha=1;const t=new Image;t.src=e,t.onload=()=>{o.drawImage(t,0,0),_()}}};return t({clearCanvas:D,getImageDataURL:H,setImageDataURL:F}),(e,t)=>{const l=(0,i.up)("IconWrite"),a=(0,i.up)("IconHighLight");return(0,i.wg)(),(0,i.iD)("div",{class:"writing-board",ref_key:"writingBoardRef",ref:r},[e.blackboard?((0,i.wg)(),(0,i.iD)("div",NC)):(0,i.kq)("",!0),(0,i._)("canvas",{class:"canvas",ref_key:"canvasRef",ref:u,style:(0,oe.j5)({width:f.value+"px",height:g.value+"px"}),onMousedown:t[0]||(t[0]=e=>M(e)),onMousemove:t[1]||(t[1]=e=>U(e)),onMouseup:t[2]||(t[2]=e=>W()),onTouchstart:t[3]||(t[3]=e=>M(e)),onTouchmove:t[4]||(t[4]=e=>U(e)),onTouchend:t[5]||(t[5]=e=>{W(),h.value=!1}),onMouseleave:t[6]||(t[6]=e=>{W(),h.value=!1}),onMouseenter:t[7]||(t[7]=e=>h.value=!0)},null,36),h.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},["eraser"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"eraser",style:(0,oe.j5)({left:m.value.x-e.rubberSize/2+"px",top:m.value.y-e.rubberSize/2+"px",width:e.rubberSize+"px",height:e.rubberSize+"px"})},null,4)):(0,i.kq)("",!0),"pen"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:1,class:"pen",style:(0,oe.j5)({left:m.value.x-e.penSize/2+"px",top:m.value.y-6*e.penSize+e.penSize/2+"px",color:e.color})},["pen"===e.model?((0,i.wg)(),(0,i.j4)(l,{key:0,class:"icon",size:6*e.penSize},null,8,["size"])):(0,i.kq)("",!0)],4)):(0,i.kq)("",!0),"mark"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:2,class:"pen",style:(0,oe.j5)({left:m.value.x-e.markSize/2+"px",top:m.value.y+"px",color:e.color})},["mark"===e.model?((0,i.wg)(),(0,i.j4)(a,{key:0,class:"icon",size:1.5*e.markSize},null,8,["size"])):(0,i.kq)("",!0)],4)):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0)],512)}}});const YC=(0,Vl.Z)(jC,[["__scopeId","data-v-d8027742"]]);var VC=YC;const JC=e=>((0,i.dD)("data-v-92cd0b5a"),e=e(),(0,i.Cn)(),e),qC={class:"writing-board-tool"},XC={class:"tool-content"},GC={class:"size"},KC=JC((()=>(0,i._)("div",{class:"label"},"墨迹粗细:",-1))),QC={class:"size"},eL=JC((()=>(0,i._)("div",{class:"label"},"墨迹粗细:",-1))),tL={class:"size"},lL=JC((()=>(0,i._)("div",{class:"label"},"橡皮大小:",-1))),aL={class:"colors"},nL=["onClick"];var oL=(0,i.aZ)({__name:"WritingBoardTool",props:{slideWidth:{},slideHeight:{},left:{default:-5},top:{default:-5}},emits:["close"],setup(e,{emit:t}){const l=["#000000","#ffffff","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#ffff3a"],a=t,{currentSlide:r}=(0,o.Jk)($()),u=(0,s.iH)(),c=(0,s.iH)("#e2534d"),d=(0,s.iH)("pen"),p=(0,s.iH)(!1),v=(0,s.iH)(""),m=(0,s.iH)(6),h=(0,s.iH)(24),f=(0,s.iH)(80),g=e=>{d.value===e?v.value=v.value===e?"":e:(v.value&&(v.value=""),d.value=e)},y=()=>{u.value.clearCanvas()},w=e=>{"eraser"===d.value&&(d.value="pen"),c.value=e},x=()=>{a("close")};(0,i.YP)(r,(()=>{V.writingBoardImgs.where("id").equals(r.value.id).toArray().then((e=>{const t=e[0];u.value.setImageDataURL(t?.dataURL||"")}))}),{immediate:!0});const k=()=>{const e=u.value.getImageDataURL();e&&V.writingBoardImgs.where("id").equals(r.value.id).toArray().then((t=>{const l=t[0];l?V.writingBoardImgs.update(l,{dataURL:e}):V.writingBoardImgs.add({id:r.value.id,dataURL:e})}))};return(e,t)=>{const a=(0,i.up)("IconWrite"),o=(0,i.up)("IconHighLight"),s=(0,i.up)("IconErase"),r=(0,i.up)("IconClear"),b=(0,i.up)("IconFill"),_=(0,i.up)("IconClose"),I=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",qC,[(0,i._)("div",{class:"writing-board-wrap",style:(0,oe.j5)({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[(0,i.Wm)(VC,{ref_key:"writingBoardRef",ref:u,color:c.value,blackboard:p.value,model:d.value,penSize:m.value,markSize:h.value,rubberSize:f.value,onEnd:t[0]||(t[0]=e=>k())},null,8,["color","blackboard","model","penSize","markSize","rubberSize"])],4),(0,i.Wm)(ZS,{class:"tools-panel",width:520,height:50,left:e.left,top:e.top,moveable:""===v.value},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"tools",onMousedown:t[10]||(t[10]=(0,n.iM)((()=>{}),["stop"]))},[(0,i._)("div",XC,[(0,i.Wm)(dn,{trigger:"manual",value:"pen"===v.value},{content:(0,i.w5)((()=>[(0,i._)("div",GC,[KC,(0,i.Wm)(qm,{class:"size-slider",min:4,max:10,step:2,value:m.value,"onUpdate:value":t[1]||(t[1]=e=>m.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["btn",{active:"pen"===d.value}]),onClick:t[2]||(t[2]=e=>g("pen"))},[(0,i.Wm)(a,{class:"icon"})],2)),[[I,"画笔"]])])),_:1},8,["value"]),(0,i.Wm)(dn,{trigger:"manual",value:"mark"===v.value},{content:(0,i.w5)((()=>[(0,i._)("div",QC,[eL,(0,i.Wm)(qm,{class:"size-slider",min:16,max:40,step:4,value:h.value,"onUpdate:value":t[3]||(t[3]=e=>h.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["btn",{active:"mark"===d.value}]),onClick:t[4]||(t[4]=e=>g("mark"))},[(0,i.Wm)(o,{class:"icon"})],2)),[[I,"荧光笔"]])])),_:1},8,["value"]),(0,i.Wm)(dn,{trigger:"manual",value:"eraser"===v.value},{content:(0,i.w5)((()=>[(0,i._)("div",tL,[lL,(0,i.Wm)(qm,{class:"size-slider",min:20,max:200,step:20,value:f.value,"onUpdate:value":t[5]||(t[5]=e=>f.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["btn",{active:"eraser"===d.value}]),onClick:t[6]||(t[6]=e=>g("eraser"))},[(0,i.Wm)(s,{class:"icon"})],2)),[[I,"橡皮擦"]])])),_:1},8,["value"]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"btn",onClick:t[7]||(t[7]=e=>y())},[(0,i.Wm)(r,{class:"icon"})])),[[I,"清除墨迹"]]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["btn",{active:p.value}]),onClick:t[8]||(t[8]=e=>p.value=!p.value)},[(0,i.Wm)(b,{class:"icon"})],2)),[[I,"黑板"]]),(0,i._)("div",aL,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>(0,i._)("div",{class:(0,oe.C_)(["color",{active:e===c.value}]),key:e,style:(0,oe.j5)({backgroundColor:e}),onClick:t=>w(e)},null,14,nL))),64))])]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"btn",onClick:t[9]||(t[9]=e=>x())},[(0,i.Wm)(_,{class:"icon"})])),[[I,"关闭画笔"]])],32)])),_:1},8,["left","top","moveable"])])}}});const iL=(0,Vl.Z)(oL,[["__scopeId","data-v-92cd0b5a"]]);var sL=iL;const rL=e=>((0,i.dD)("data-v-83a589f0"),e=e(),(0,i.Cn)(),e),uL={class:"header"},cL={class:"content"},dL={class:"timer"},pL=["value","disabled"],vL=rL((()=>(0,i._)("div",{class:"colon"},":",-1))),mL={class:"timer"},hL=["value","disabled"];var fL=(0,i.aZ)({__name:"CountdownTimer",props:{left:{default:5},top:{default:5}},emits:["close"],setup(e,{emit:t}){const l=t,a=(0,s.iH)(null),o=(0,s.iH)(!1),r=(0,s.iH)(!1),u=(0,s.iH)(0),c=(0,i.Fl)((()=>Math.floor(u.value/60))),d=(0,i.Fl)((()=>u.value%60)),p=(0,i.Fl)((()=>!r.value||o.value)),v=()=>{a.value&&clearInterval(a.value)};(0,i.Ah)(v);const m=()=>{v(),o.value=!1},h=()=>{v(),o.value=!1,r.value?u.value=600:u.value=0},f=()=>{v(),r.value?a.value=setInterval((()=>{u.value=u.value-1,u.value<=0&&h()}),1e3):a.value=setInterval((()=>{u.value=u.value+1,u.value>36e3&&m()}),1e3),o.value=!0},g=()=>{o.value?m():f()},y=()=>{r.value=!r.value,h()},w=(e,t)=>{const l=e.target;let a=l.value;const n=/^(\d)+$/.test(a);n?("second"===t&&+a>=60&&(a="59"),u.value="minute"===t?60*+a+d.value:+a+60*c.value):l.value=G("minute"===t?c.value:d.value,2)};return(e,t)=>{const a=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.j4)(ZS,{class:"countdown-timer",width:180,height:110,left:e.left,top:e.top},{default:(0,i.w5)((()=>[(0,i._)("div",uL,[(0,i._)("span",{class:"text-btn",onClick:t[0]||(t[0]=e=>g())},(0,oe.zw)(o.value?"暂停":"开始"),1),(0,i._)("span",{class:"text-btn",onClick:t[1]||(t[1]=e=>h())},"重置"),(0,i._)("span",{class:(0,oe.C_)(["text-btn",{active:r.value}]),onClick:t[2]||(t[2]=e=>y())},"倒计时",2)]),(0,i._)("div",cL,[(0,i._)("div",dL,[(0,i._)("input",{type:"text",value:(0,s.SU)(G)(c.value,2),maxlength:3,disabled:p.value,onMousedown:t[3]||(t[3]=(0,n.iM)((()=>{}),["stop"])),onBlur:t[4]||(t[4]=e=>w(e,"minute")),onKeydown:[t[5]||(t[5]=(0,n.iM)((()=>{}),["stop"])),t[6]||(t[6]=(0,n.D2)((0,n.iM)((e=>w(e,"minute")),["stop"]),["enter"]))]},null,40,pL)]),vL,(0,i._)("div",mL,[(0,i._)("input",{type:"text",value:(0,s.SU)(G)(d.value,2),maxlength:3,disabled:p.value,onMousedown:t[7]||(t[7]=(0,n.iM)((()=>{}),["stop"])),onBlur:t[8]||(t[8]=e=>w(e,"second")),onKeydown:[t[9]||(t[9]=(0,n.iM)((()=>{}),["stop"])),t[10]||(t[10]=(0,n.D2)((0,n.iM)((e=>w(e,"second")),["stop"]),["enter"]))]},null,40,hL)])]),(0,i._)("div",{class:"close-btn",onClick:t[11]||(t[11]=e=>l("close"))},[(0,i.Wm)(a,{class:"icon"})])])),_:1},8,["left","top"])}}});const gL=(0,Vl.Z)(fL,[["__scopeId","data-v-83a589f0"]]);var yL=gL;const wL={class:"tools-left"},xL={class:"content"};var kL=(0,i.aZ)({__name:"BaseView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a}=(0,o.Jk)($()),{autoPlayTimer:n,autoPlay:r,closeAutoPlay:u,autoPlayInterval:c,setAutoPlayInterval:d,loopPlay:p,setLoopPlay:v,mousewheelListener:m,touchStartListener:h,touchEndListener:f,turnPrevSlide:g,turnNextSlide:y,turnSlideToIndex:w,turnSlideToId:x,execPrev:k,execNext:b,animationIndex:_}=hC(),{slideWidth:I,slideHeight:S}=fC(),{exitScreening:C}=Ca(),{fullscreenState:L,manualExitFullscreen:T}=gC(),E=(0,s.iH)(!1),M=(0,s.iH)(!1),U=(0,s.iH)(!1),W=(0,s.iH)(!1),D=(0,s.iH)(!1),H=()=>[{text:"上一页",subText:"↑ ←",disable:a.value<=0,handler:()=>g()},{text:"下一页",subText:"↓ →",disable:a.value>=l.value.length-1,handler:()=>y()},{text:"第一页",disable:0===a.value,handler:()=>w(0)},{text:"最后一页",disable:a.value===l.value.length-1,handler:()=>w(l.value.length-1)},{divider:!0},{text:n.value?"取消自动放映":"自动放映",handler:n.value?u:r,children:[{text:"2.5秒",subText:2500===c.value?"√":"",handler:()=>d(2500)},{text:"5秒",subText:5e3===c.value?"√":"",handler:()=>d(5e3)},{text:"7.5秒",subText:7500===c.value?"√":"",handler:()=>d(7500)},{text:"10秒",subText:1e4===c.value?"√":"",handler:()=>d(1e4)}]},{text:"循环放映",subText:p.value?"√":"",handler:()=>v(!p.value)},{divider:!0},{text:"显示工具栏",handler:()=>E.value=!0},{text:"查看所有幻灯片",handler:()=>W.value=!0},{text:"画笔工具",handler:()=>M.value=!0},{text:"演讲者视图",handler:()=>t.changeViewMode("presenter")},{divider:!0},{text:"结束放映",subText:"ESC",handler:C}];return(e,t)=>{const n=(0,i.up)("IconLeftTwo"),o=(0,i.up)("IconRightTwo"),r=(0,i.up)("IconWrite"),u=(0,i.up)("IconMagic"),c=(0,i.up)("IconStopwatchStart"),d=(0,i.up)("IconListView"),p=(0,i.up)("IconOffScreenOne"),v=(0,i.up)("IconFullScreenOne"),g=(0,i.up)("IconPower"),y=(0,i.Q2)("contextmenu"),F=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["base-view",{"laser-pen":D.value}])},[(0,i.wy)((0,i.Wm)(AC,{slideWidth:(0,s.SU)(I),slideHeight:(0,s.SU)(S),animationIndex:(0,s.SU)(_),turnSlideToId:(0,s.SU)(x),manualExitFullscreen:(0,s.SU)(T),onWheel:t[0]||(t[0]=e=>(0,s.SU)(m)(e)),onTouchstart:t[1]||(t[1]=e=>(0,s.SU)(h)(e)),onTouchend:t[2]||(t[2]=e=>(0,s.SU)(f)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[y,H]]),W.value?((0,i.wg)(),(0,i.j4)(BC,{key:0,turnSlideToIndex:(0,s.SU)(w),onClose:t[3]||(t[3]=e=>W.value=!1)},null,8,["turnSlideToIndex"])):(0,i.kq)("",!0),M.value?((0,i.wg)(),(0,i.j4)(sL,{key:1,slideWidth:(0,s.SU)(I),slideHeight:(0,s.SU)(S),onClose:t[4]||(t[4]=e=>M.value=!1)},null,8,["slideWidth","slideHeight"])):(0,i.kq)("",!0),U.value?((0,i.wg)(),(0,i.j4)(yL,{key:2,onClose:t[5]||(t[5]=e=>U.value=!1)})):(0,i.kq)("",!0),(0,i._)("div",wL,[(0,i.Wm)(n,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:t[6]||(t[6]=e=>(0,s.SU)(k)())}),(0,i.Wm)(o,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:t[7]||(t[7]=e=>(0,s.SU)(b)())})]),(0,i._)("div",{class:(0,oe.C_)(["tools-right",{visible:E.value}]),onMouseleave:t[16]||(t[16]=e=>E.value=!1),onMouseenter:t[17]||(t[17]=e=>E.value=!0)},[(0,i._)("div",xL,[(0,i._)("div",{class:"tool-btn page-number",onClick:t[8]||(t[8]=e=>W.value=!0)},"幻灯片 "+(0,oe.zw)((0,s.SU)(a)+1)+" / "+(0,oe.zw)((0,s.SU)(l).length),1),(0,i.wy)((0,i.Wm)(r,{class:"tool-btn",onClick:t[9]||(t[9]=e=>M.value=!0)},null,512),[[F,"画笔工具"]]),(0,i.wy)((0,i.Wm)(u,{class:(0,oe.C_)(["tool-btn",{active:D.value}]),onClick:t[10]||(t[10]=e=>D.value=!D.value)},null,8,["class"]),[[F,"激光笔"]]),(0,i.wy)((0,i.Wm)(c,{class:(0,oe.C_)(["tool-btn",{active:U.value}]),onClick:t[11]||(t[11]=e=>U.value=!U.value)},null,8,["class"]),[[F,"计时器"]]),(0,i.wy)((0,i.Wm)(d,{class:"tool-btn",onClick:t[12]||(t[12]=t=>e.changeViewMode("presenter"))},null,512),[[F,"演讲者视图"]]),(0,s.SU)(L)?(0,i.wy)(((0,i.wg)(),(0,i.j4)(p,{key:0,class:"tool-btn",onClick:t[13]||(t[13]=e=>(0,s.SU)(T)())},null,512)),[[F,"退出全屏"]]):(0,i.wy)(((0,i.wg)(),(0,i.j4)(v,{key:1,class:"tool-btn",onClick:t[14]||(t[14]=e=>(0,s.SU)(_a)())},null,512)),[[F,"进入全屏"]]),(0,i.wy)((0,i.Wm)(g,{class:"tool-btn",onClick:t[15]||(t[15]=e=>(0,s.SU)(C)())},null,512),[[F,"结束放映"]])])],34)],2)}}});const bL=(0,Vl.Z)(kL,[["__scopeId","data-v-e9c1efea"]]);var _L=bL;const IL=e=>((0,i.dD)("data-v-77a65275"),e=e(),(0,i.Cn)(),e),SL={class:"presenter-view"},CL={class:"toolbar"},LL=IL((()=>(0,i._)("span",null,"普通视图",-1))),TL=IL((()=>(0,i._)("span",null,"画笔",-1))),EL=IL((()=>(0,i._)("span",null,"激光笔",-1))),ML=IL((()=>(0,i._)("span",null,"计时器",-1))),UL=IL((()=>(0,i._)("span",null,"结束放映",-1))),WL={class:"content"},DL=["onClick"],HL={class:"remark"},FL={class:"header"},AL=IL((()=>(0,i._)("span",null,"演讲者备注",-1))),$L=["innerHTML"],ZL={class:"remark-scale"};var OL=(0,i.aZ)({__name:"PresenterView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a,viewportRatio:r,currentSlide:u}=(0,o.Jk)($()),c=(0,s.iH)(),d=(0,s.iH)(),p=(0,s.iH)(!1),v=(0,s.iH)(!1),m=(0,s.iH)(!1),{mousewheelListener:h,touchStartListener:f,touchEndListener:g,turnPrevSlide:y,turnNextSlide:w,turnSlideToIndex:x,turnSlideToId:k,animationIndex:b}=hC(),{slideWidth:_,slideHeight:I}=fC(c),{exitScreening:S}=Ca(),{slidesLoadLimit:C}=Cm(),{fullscreenState:L,manualExitFullscreen:T}=gC(),E=(0,s.iH)(16),M=(0,i.Fl)((()=>la(u.value.remark||"无备注"))),U=e=>{d.value&&d.value.scrollBy(e.deltaY,0)},W=e=>{e<12||e>40||(E.value=e)};(0,i.YP)(a,(()=>{(0,i.Y3)((()=>{if(!d.value)return;const e=d.value.querySelector(".thumbnail.active");if(!e)return;const t=d.value.offsetWidth,l=e.offsetLeft;d.value.scrollTo({left:l-t/2,behavior:"smooth"})}))}));const D=()=>[{text:"上一页",subText:"↑ ←",disable:a.value<=0,handler:()=>y()},{text:"下一页",subText:"↓ →",disable:a.value>=l.value.length-1,handler:()=>w()},{text:"第一页",disable:0===a.value,handler:()=>x(0)},{text:"最后一页",disable:a.value===l.value.length-1,handler:()=>x(l.value.length-1)},{divider:!0},{text:"画笔工具",handler:()=>p.value=!0},{text:"普通视图",handler:()=>t.changeViewMode("base")},{divider:!0},{text:"结束放映",subText:"ESC",handler:S}];return(e,t)=>{const o=(0,i.up)("IconListView"),u=(0,i.up)("IconWrite"),y=(0,i.up)("IconMagic"),w=(0,i.up)("IconStopwatchStart"),H=(0,i.up)("IconOffScreenOne"),F=(0,i.up)("IconPower"),A=(0,i.up)("IconMinus"),$=(0,i.up)("IconPlus"),Z=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",SL,[(0,i._)("div",CL,[(0,i._)("div",{class:"tool-btn",onClick:t[0]||(t[0]=t=>e.changeViewMode("base"))},[(0,i.Wm)(o,{class:"tool-icon"}),LL]),(0,i._)("div",{class:(0,oe.C_)(["tool-btn",{active:p.value}]),onClick:t[1]||(t[1]=e=>p.value=!p.value)},[(0,i.Wm)(u,{class:"tool-icon"}),TL],2),(0,i._)("div",{class:(0,oe.C_)(["tool-btn",{active:m.value}]),onClick:t[2]||(t[2]=e=>m.value=!m.value)},[(0,i.Wm)(y,{class:"tool-icon"}),EL],2),(0,i._)("div",{class:(0,oe.C_)(["tool-btn",{active:v.value}]),onClick:t[3]||(t[3]=e=>v.value=!v.value)},[(0,i.Wm)(w,{class:"tool-icon"}),ML],2),(0,i._)("div",{class:"tool-btn",onClick:t[4]||(t[4]=()=>(0,s.SU)(L)?(0,s.SU)(T)():(0,s.SU)(_a)())},[(0,s.SU)(L)?((0,i.wg)(),(0,i.j4)(H,{key:0,class:"tool-icon"})):((0,i.wg)(),(0,i.j4)(H,{key:1,class:"tool-icon"})),(0,i._)("span",null,(0,oe.zw)((0,s.SU)(L)?"退出全屏":"全屏"),1)]),(0,i.Wm)(Zc,{class:"divider"}),(0,i._)("div",{class:"tool-btn",onClick:t[5]||(t[5]=e=>(0,s.SU)(S)())},[(0,i.Wm)(F,{class:"tool-icon"}),UL])]),(0,i._)("div",WL,[(0,i._)("div",{class:(0,oe.C_)(["slide-list-wrap",{"laser-pen":m.value}]),ref_key:"slideListWrapRef",ref:c},[(0,i.wy)((0,i.Wm)(AC,{slideWidth:(0,s.SU)(_),slideHeight:(0,s.SU)(I),animationIndex:(0,s.SU)(b),turnSlideToId:(0,s.SU)(k),manualExitFullscreen:(0,s.SU)(T),onWheel:t[6]||(t[6]=e=>(0,s.SU)(h)(e)),onTouchstart:t[7]||(t[7]=e=>(0,s.SU)(f)(e)),onTouchend:t[8]||(t[8]=e=>(0,s.SU)(g)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[Z,D]]),p.value?((0,i.wg)(),(0,i.j4)(sL,{key:0,slideWidth:(0,s.SU)(_),slideHeight:(0,s.SU)(I),left:-365,top:-155,onClose:t[9]||(t[9]=e=>p.value=!1)},null,8,["slideWidth","slideHeight"])):(0,i.kq)("",!0),v.value?((0,i.wg)(),(0,i.j4)(yL,{key:1,left:75,onClose:t[10]||(t[10]=e=>v.value=!1)})):(0,i.kq)("",!0)],2),(0,i._)("div",{class:"thumbnails",ref_key:"thumbnailsRef",ref:d,onWheel:t[11]||(t[11]=(0,n.iM)((e=>U(e)),["prevent"]))},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["thumbnail",{active:t===(0,s.SU)(a)}]),key:e.id,onClick:e=>(0,s.SU)(x)(t)},[(0,i.Wm)(Jd,{slide:e,size:120/(0,s.SU)(r),visible:t<(0,s.SU)(C)},null,8,["slide","size","visible"])],10,DL)))),128))],544)]),(0,i._)("div",HL,[(0,i._)("div",FL,[AL,(0,i._)("span",null,"P "+(0,oe.zw)((0,s.SU)(a)+1)+" / "+(0,oe.zw)((0,s.SU)(l).length),1)]),(0,i._)("div",{class:"remark-content ProseMirror-static",style:(0,oe.j5)({fontSize:E.value+"px"}),innerHTML:M.value},null,12,$L),(0,i._)("div",ZL,[(0,i._)("div",{class:(0,oe.C_)(["scale-btn",{disable:12===E.value}]),onClick:t[12]||(t[12]=e=>W(E.value-2))},[(0,i.Wm)(A)],2),(0,i._)("div",{class:(0,oe.C_)(["scale-btn",{disable:40===E.value}]),onClick:t[13]||(t[13]=e=>W(E.value+2))},[(0,i.Wm)($)],2)])])])}}});const RL=(0,Vl.Z)(OL,[["__scopeId","data-v-77a65275"]]);var zL=RL;const PL={class:"pptist-screen"};var BL=(0,i.aZ)({__name:"index",setup(e){const t=(0,s.iH)("base"),l=e=>{t.value=e},{exitScreening:a}=Ca(),n=e=>{const t=e.key.toUpperCase();t===ne.ESC&&a()};return(0,i.bv)((()=>document.addEventListener("keydown",n))),(0,i.Ah)((()=>document.removeEventListener("keydown",n))),(e,a)=>((0,i.wg)(),(0,i.iD)("div",PL,["base"===t.value?((0,i.wg)(),(0,i.j4)(_L,{key:0,changeViewMode:l})):"presenter"===t.value?((0,i.wg)(),(0,i.j4)(zL,{key:1,changeViewMode:l})):(0,i.kq)("",!0)]))}});const NL=(0,Vl.Z)(BL,[["__scopeId","data-v-6bf3d190"]]);var jL=NL,YL=(0,i.aZ)({__name:"MobileEditableElement",props:{elementInfo:{},elementIndex:{},selectElement:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[sa.IMAGE]:$o,[sa.TEXT]:ls,[sa.SHAPE]:ys,[sa.LINE]:Es,[sa.CHART]:As,[sa.TABLE]:lr,[sa.LATEX]:rr,[sa.VIDEO]:Zr,[sa.AUDIO]:ou};return e[t.elementInfo.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"mobile-editable-element",style:(0,oe.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:()=>null},null,8,["elementInfo","selectElement"]))],4))}});const VL=YL;var JL=VL,qL=(0,i.aZ)({__name:"MobileOperate",props:{elementInfo:{},isSelected:{type:Boolean},canvasScale:{},scaleElement:{type:Function},rotateElement:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0)),a=(0,i.Fl)((()=>t.elementInfo.width*t.canvasScale)),o=(0,i.Fl)((()=>t.elementInfo.height*t.canvasScale)),{borderLines:r,resizeHandlers:u,textElementResizeHandlers:c}=Ou(a,o),d="text"===t.elementInfo.type||"table"===t.elementInfo.type?c:u,p=(0,i.Fl)((()=>["chart","video","audio"].includes(t.elementInfo.type)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"mobile-operate",style:(0,oe.j5)({top:e.elementInfo.top*e.canvasScale+"px",left:e.elementInfo.left*e.canvasScale+"px",transform:`rotate(${l.value}deg)`,transformOrigin:`${e.elementInfo.width*e.canvasScale/2}px ${e.elementInfo.height*e.canvasScale/2}px`})},[e.isSelected?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(r),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onTouchstart:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onTouchstart"])))),128)),p.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.j4)(Qu,{key:0,class:"operate-rotate-handler",style:(0,oe.j5)({left:a.value/2+"px"}),onTouchstart:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]))],64)):(0,i.kq)("",!0)],4))}});const XL=(0,Vl.Z)(qL,[["__scopeId","data-v-fd451ff6"]]);var GL=XL;const KL={class:"mobile-thumbnails"},QL=["onClick"],eT={class:"label"};var tT=(0,i.aZ)({__name:"MobileThumbnails",setup(e){const t=$(),{slides:l,slideIndex:a}=(0,o.Jk)(t),{sortSlides:n}=ha(),{slidesLoadLimit:r}=Cm(),u=e=>{t.updateSlideIndex(e)},c=e=>{const{newIndex:t,oldIndex:l}=e;void 0!==t&&void 0!==l&&t!==l&&n(t,l)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",KL,[(0,i.Wm)((0,s.SU)(Dm()),{class:"thumbnail-list",modelValue:(0,s.SU)(l),animation:200,scroll:!0,scrollSensitivity:50,delayOnTouchOnly:!0,delay:800,itemKey:"id",onEnd:c},{item:(0,i.w5)((({element:e,index:t})=>[(0,i._)("div",{class:(0,oe.C_)(["thumbnail-item",{active:(0,s.SU)(a)===t}]),onClick:e=>u(t)},[(0,i._)("div",eT,(0,oe.zw)(t+1),1),(0,i.Wm)(Jd,{class:"thumbnail",slide:e,size:120,visible:t<(0,s.SU)(r)},null,8,["slide","visible"])],10,QL)])),_:1},8,["modelValue"])]))}});const lT=(0,Vl.Z)(tT,[["__scopeId","data-v-2c80920e"]]);var aT=lT;const nT={class:"slide-toolbar"},oT={class:"remark"},iT=["value"],sT={class:"toolbar"};var rT=(0,i.aZ)({__name:"SlideToolbar",setup(e){const t=$(),{viewportRatio:l,currentSlide:a}=(0,o.Jk)(t),{createSlide:n,copyAndPasteSlide:r,deleteSlide:u}=ha(),{createTextElement:c,createImageElement:d,createShapeElement:p}=pa(),v=()=>{const e=400,t=56;c({left:(oa-e)/2,top:(oa*l.value-t)/2,width:e,height:t},{content:"

新添加文本

"})},m=e=>{e&&e[0]&&na(e[0]).then((e=>d(e)))},h=e=>{const t={viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"},a={viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"},n={square:t,round:a},o=200;p({left:(oa-o)/2,top:(oa*l.value-o)/2,width:o,height:o},n[e])},f=(0,i.Fl)((()=>a.value?.remark||"")),g=e=>{const l=e.target.value;t.updateSlide({remark:l})};return(e,t)=>{const l=(0,i.up)("IconPlus"),a=(0,i.up)("IconCopy"),o=(0,i.up)("IconDelete"),c=(0,i.up)("IconFontSize"),d=(0,i.up)("IconPicture"),p=(0,i.up)("IconSquare"),y=(0,i.up)("IconRound");return(0,i.wg)(),(0,i.iD)("div",nT,[(0,i._)("div",oT,[(0,i._)("textarea",{value:f.value,placeholder:"点击输入演讲者备注",onInput:t[0]||(t[0]=e=>g(e))},null,40,iT)]),(0,i._)("div",sT,[(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>(0,s.SU)(n)())},{default:(0,i.w5)((()=>[(0,i.Wm)(l,{class:"icon"}),(0,i.Uk)(" 新幻灯片")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[2]||(t[2]=e=>(0,s.SU)(r)())},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"icon"}),(0,i.Uk)(" 复制")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[3]||(t[3]=e=>(0,s.SU)(u)())},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:"icon"}),(0,i.Uk)(" 删除")])),_:1})])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[4]||(t[4]=e=>v())},{default:(0,i.w5)((()=>[(0,i.Wm)(c,{class:"icon"}),(0,i.Uk)(" 文字")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(Pa,{onChange:t[5]||(t[5]=e=>m(e))},{default:(0,i.w5)((()=>[(0,i.Wm)(d,{class:"icon"}),(0,i.Uk)("图片 ")])),_:1})])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[6]||(t[6]=e=>h("square"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p,{class:"icon"}),(0,i.Uk)(" 矩形")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[7]||(t[7]=e=>h("round"))},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{class:"icon"}),(0,i.Uk)(" 圆形")])),_:1})])),_:1})]),(0,i.Wm)(aT)])}}});const uT=(0,Vl.Z)(rT,[["__scopeId","data-v-24150aba"]]);var cT=uT;const dT=e=>((0,i.dD)("data-v-f3d1ac70"),e=e(),(0,i.Cn)(),e),pT={class:"element-toolbar"},vT={class:"content"},mT={key:0,class:"style"},hT={class:"row-block"},fT=dT((()=>(0,i._)("div",{class:"label"},"文字颜色:",-1))),gT={class:"colors"},yT=["onClick"],wT={class:"row-block"},xT=dT((()=>(0,i._)("div",{class:"label"},"填充色:",-1))),kT={class:"colors"},bT=["onClick"],_T={key:1,class:"common"};var IT=(0,i.aZ)({__name:"ElementToolbar",setup(e){const t=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57"],l=R(),a=$(),{handleElement:n,handleElementId:r,richTextAttrs:u}=(0,o.Jk)(l),{addHistorySnapshot:c}=da(),d=(e,t)=>{a.updateElement({id:e,props:t}),c()},p=[{key:"style",label:"样式"},{key:"common",label:"布局"}],v=(0,s.iH)("common"),{orderElement:m}=ba(),{alignElementToCanvas:h}=qn(),{addElementsFromData:f}=va(),{deleteElement:g}=ga(),y=()=>{const e=JSON.parse(JSON.stringify(n.value));f([e])},w=(e,t)=>{Oi.emit(Ai.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},x=e=>{if(n.value){if(("text"===n.value.type||"shape"===n.value.type&&n.value.text?.content)&&Oi.emit(Ai.RICH_TEXT_COMMAND,{action:{command:"color",value:e}}),"table"===n.value.type){const t=JSON.parse(JSON.stringify(n.value.data));for(let l=0;l{if(n.value){if("text"!==n.value.type&&"shape"!==n.value.type&&"chart"!==n.value.type||d(r.value,{fill:e}),"table"===n.value.type){const t=JSON.parse(JSON.stringify(n.value.data));for(let l=0;l{const a=(0,i.up)("IconTextBold"),o=(0,i.up)("IconTextItalic"),r=(0,i.up)("IconTextUnderline"),c=(0,i.up)("IconStrikethrough"),d=(0,i.up)("IconFontSize"),f=(0,i.up)("IconAlignTextLeft"),b=(0,i.up)("IconAlignTextCenter"),_=(0,i.up)("IconAlignTextRight"),I=(0,i.up)("IconCopy"),S=(0,i.up)("IconDelete"),C=(0,i.up)("IconSendToBack"),L=(0,i.up)("IconBringToFrontOne"),T=(0,i.up)("IconBringToFront"),E=(0,i.up)("IconSentToBack"),M=(0,i.up)("IconAlignLeft"),U=(0,i.up)("IconAlignVertically"),W=(0,i.up)("IconAlignRight"),D=(0,i.up)("IconAlignTop"),H=(0,i.up)("IconAlignHorizontally"),F=(0,i.up)("IconAlignBottom");return(0,i.wg)(),(0,i.iD)("div",pT,[(0,i.Wm)(Kd,{tabs:p,value:v.value,"onUpdate:value":l[0]||(l[0]=e=>v.value=e),tabsStyle:{marginBottom:"8px"},tabStyle:{width:"30%",margin:"0 10%"}},null,8,["value"]),(0,i._)("div",vT,["style"===v.value?((0,i.wg)(),(0,i.iD)("div",mT,[(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).bold,onClick:l[1]||(l[1]=e=>w("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["checked"]),(0,i.Wm)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).em,onClick:l[2]||(l[2]=e=>w("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["checked"]),(0,i.Wm)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).underline,onClick:l[3]||(l[3]=e=>w("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["checked"]),(0,i.Wm)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).strikethrough,onClick:l[4]||(l[4]=e=>w("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(c)])),_:1},8,["checked"])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[5]||(l[5]=e=>w("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(d),(0,i.Uk)("+")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[6]||(l[6]=e=>w("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(d),(0,i.Uk)("-")])),_:1})])),_:1}),(0,i.Wm)(Zc,{style:{margin:"20px 0"}}),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:(0,s.SU)(u).align,"onUpdate:value":l[7]||(l[7]=e=>w("align",e))},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1}),(0,i.Wm)(tg,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(b)])),_:1}),(0,i.Wm)(tg,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(_)])),_:1})])),_:1},8,["value"]),(0,i.Wm)(Zc,{style:{margin:"20px 0"}}),(0,i._)("div",hT,[fT,(0,i._)("div",gT,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"color",key:e,onClick:t=>x(e)},[(0,i._)("div",{class:"color-block",style:(0,oe.j5)({backgroundColor:e})},null,4)],8,yT))),64))])]),(0,i._)("div",wT,[xT,(0,i._)("div",kT,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"color",key:e,onClick:t=>k(e)},[(0,i._)("div",{class:"color-block",style:(0,oe.j5)({backgroundColor:e})},null,4)],8,bT))),64))])])])):(0,i.kq)("",!0),"common"===v.value?((0,i.wg)(),(0,i.iD)("div",_T,[(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[8]||(l[8]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Wm)(I,{class:"icon"}),(0,i.Uk)(" 复制")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[9]||(l[9]=e=>(0,s.SU)(g)())},{default:(0,i.w5)((()=>[(0,i.Wm)(S,{class:"icon"}),(0,i.Uk)(" 删除")])),_:1})])),_:1}),(0,i.Wm)(Zc,{style:{margin:"20px 0"}}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[10]||(l[10]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(Q).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(C,{class:"icon"}),(0,i.Uk)(" 置顶")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[11]||(l[11]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(Q).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(L,{class:"icon"}),(0,i.Uk)(" 置底")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[12]||(l[12]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(Q).UP))},{default:(0,i.w5)((()=>[(0,i.Wm)(T,{class:"icon"}),(0,i.Uk)(" 上移")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[13]||(l[13]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(Q).DOWN))},{default:(0,i.w5)((()=>[(0,i.Wm)(E,{class:"icon"}),(0,i.Uk)(" 下移")])),_:1})])),_:1}),(0,i.Wm)(Zc,{style:{margin:"20px 0"}}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[14]||(l[14]=e=>(0,s.SU)(h)((0,s.SU)(ee).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(M,{class:"icon"}),(0,i.Uk)(" 左对齐")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[15]||(l[15]=e=>(0,s.SU)(h)((0,s.SU)(ee).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(U,{class:"icon"}),(0,i.Uk)(" 水平居中")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[16]||(l[16]=e=>(0,s.SU)(h)((0,s.SU)(ee).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(W,{class:"icon"}),(0,i.Uk)(" 右对齐")])),_:1})])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[17]||(l[17]=e=>(0,s.SU)(h)((0,s.SU)(ee).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(D,{class:"icon"}),(0,i.Uk)(" 上对齐")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[18]||(l[18]=e=>(0,s.SU)(h)((0,s.SU)(ee).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(H,{class:"icon"}),(0,i.Uk)(" 垂直居中")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[19]||(l[19]=e=>(0,s.SU)(h)((0,s.SU)(ee).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(F,{class:"icon"}),(0,i.Uk)(" 下对齐")])),_:1})])),_:1})])):(0,i.kq)("",!0)])])}}});const ST=(0,Vl.Z)(IT,[["__scopeId","data-v-f3d1ac70"]]);var CT=ST;const LT={class:"mobile-editor-header"},TT={class:"history"};var ET=(0,i.aZ)({__name:"Header",props:{changeMode:{type:Function}},setup(e){const{canUndo:t,canRedo:l}=(0,o.Jk)(J()),{redo:a,undo:r}=da();return(e,o)=>{const u=(0,i.up)("IconBack"),c=(0,i.up)("IconNext"),d=(0,i.up)("IconLogout");return(0,i.wg)(),(0,i.iD)("div",LT,[(0,i._)("div",TT,[(0,i._)("div",{class:(0,oe.C_)(["history-item",{disable:!(0,s.SU)(t)}]),onClick:o[0]||(o[0]=(0,n.iM)((e=>(0,s.SU)(r)()),["stop"]))},[(0,i.Wm)(u),(0,i.Uk)(" 撤销")],2),(0,i._)("div",{class:(0,oe.C_)(["history-item",{disable:!(0,s.SU)(l)}]),onClick:o[1]||(o[1]=(0,n.iM)((e=>(0,s.SU)(a)()),["stop"]))},[(0,i.Wm)(c),(0,i.Uk)(" 重做")],2)]),(0,i._)("div",{class:"back",onClick:o[2]||(o[2]=t=>e.changeMode("preview"))},[(0,i.Wm)(d),(0,i.Uk)(" 退出编辑")])])}}});const MT=(0,Vl.Z)(ET,[["__scopeId","data-v-5c34ab81"]]);var UT=MT;const WT={class:"mobile-editor"};var DT=(0,i.aZ)({__name:"index",props:{changeMode:{type:Function}},setup(e){const t=$(),l=R(),{slideIndex:a,currentSlide:n,viewportRatio:r}=(0,o.Jk)(t),{activeElementIdList:u,handleElement:c}=(0,o.Jk)(l),d=(0,s.iH)(),p=(0,s.iH)(),v=(0,s.iH)([]),m=(0,i.Fl)((()=>n.value.background)),{backgroundStyle:h}=yu(m),f=(0,i.Fl)((()=>{if(!d.value)return 1;const e=d.value.clientWidth,t=d.value.clientHeight,l=t/e;return l>=r.value?(e-20)/oa:(t-20)/r.value/oa}));(0,i.bv)((()=>{u.value.length&&l.setActiveElementIdList([]),0!==a.value&&t.updateSlideIndex(0)}));const g=(0,i.Fl)((()=>({width:oa*f.value+"px",height:oa*r.value*f.value+"px"}))),y=(0,s.iH)([]),w=()=>{y.value=n.value?JSON.parse(JSON.stringify(n.value.elements)):[]};(0,i.m0)(w);const{dragElement:x}=jn(y,v,f),{scaleElement:k}=Bn(y,v,f),{rotateElement:b}=An(y,p,f),_=(e,t,a=!0)=>{u.value.includes(t.id)||(l.setActiveElementIdList([t.id]),l.setHandleElementId(t.id)),a&&x(e,t)},I=()=>{l.setActiveElementIdList([])};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",WT,[(0,i.Wm)(UT,{changeMode:e.changeMode},null,8,["changeMode"]),(0,i._)("div",{class:"content",ref_key:"contentRef",ref:d,onTouchstart:t[0]||(t[0]=e=>I())},[(0,i._)("div",{class:"viewport-wrapper",style:(0,oe.j5)(g.value)},[(0,i._)("div",{class:"background",style:(0,oe.j5)((0,s.SU)(h))},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(v.value,((e,t)=>((0,i.wg)(),(0,i.j4)(Iu,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:f.value},null,8,["type","axis","length","canvasScale"])))),128)),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.id},["line"!==e.type?((0,i.wg)(),(0,i.j4)(GL,{key:0,elementInfo:e,isSelected:(0,s.SU)(u).includes(e.id),canvasScale:f.value,scaleElement:(0,s.SU)(k),rotateElement:(0,s.SU)(b)},null,8,["elementInfo","isSelected","canvasScale","scaleElement","rotateElement"])):(0,i.kq)("",!0)],64)))),128)),(0,i._)("div",{class:"viewport",ref_key:"viewportRef",ref:p,style:(0,oe.j5)({transform:`scale(${f.value})`})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,((e,t)=>((0,i.wg)(),(0,i.j4)(JL,{key:e.id,elementInfo:e,elementIndex:t+1,selectElement:_},null,8,["elementInfo","elementIndex"])))),128))],4)],4)],544),(0,i.Wm)(cT),(0,s.SU)(c)?((0,i.wg)(),(0,i.j4)(CT,{key:0})):(0,i.kq)("",!0)]))}});const HT=(0,Vl.Z)(DT,[["__scopeId","data-v-3756d058"]]);var FT=HT;const AT={class:"header"};var $T=(0,i.aZ)({__name:"MobilePlayer",props:{changeMode:{type:Function}},setup(e){const t=$(),{slides:l,slideIndex:a,currentSlide:n,viewportRatio:r}=(0,o.Jk)(t),u=(0,s.iH)(!1),c=(0,s.iH)({width:0,height:0});(0,i.bv)((()=>{0!==a.value&&t.updateSlideIndex(0),c.value={width:document.body.clientHeight,height:document.body.clientWidth}}));const d=(0,i.Fl)((()=>{const e=c.value.height/c.value.width;let t=0,l=0;return e>=r.value?(t=c.value.width,l=t*r.value):(l=c.value.height,t=l/r.value),{width:t,height:l}})),p=(0,s.iH)(null),v=e=>{p.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},m=e=>{if(!p.value)return;const n=Math.abs(p.value.y-e.changedTouches[0].pageY),o=e.changedTouches[0].pageX-p.value.x;Math.abs(o)>n&&Math.abs(o)>50&&(p.value=null,o<0&&a.value>0&&t.updateSlideIndex(a.value-1),o>0&&a.value{const o=(0,i.up)("IconLogout");return(0,i.wg)(),(0,i.iD)("div",{class:"mobile-player",style:(0,oe.j5)({width:c.value.width+"px",height:c.value.height+"px",transform:`rotate(90deg) translateY(-${c.value.height}px)`})},[(0,i._)("div",{class:"screen-slide-list",onClick:t[0]||(t[0]=e=>u.value=!u.value),onTouchstart:t[1]||(t[1]=e=>v(e)),onTouchend:t[2]||(t[2]=e=>m(e))},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["slide-item",`turning-mode-${e.turningMode||"slideY"}`,{current:t===(0,s.SU)(a),before:t<(0,s.SU)(a),after:t>(0,s.SU)(a),hide:(t===(0,s.SU)(a)-1||t===(0,s.SU)(a)+1)&&e.turningMode!==(0,s.SU)(n).turningMode}]),key:e.id},[Math.abs((0,s.SU)(a)-t)<2?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"slide-content",style:(0,oe.j5)({width:d.value.width+"px",height:d.value.height+"px"})},[(0,i.Wm)(Jd,{slide:e,size:d.value.width},null,8,["slide","size"])],4)):(0,i.kq)("",!0)],2)))),128))],32),u.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",AT,[(0,i._)("div",{class:"back",onClick:t[3]||(t[3]=t=>e.changeMode("preview"))},[(0,i.Wm)(o),(0,i.Uk)(" 退出播放")])]),(0,i.Wm)(aT,{class:"thumbnails"})],64)):(0,i.kq)("",!0)],4)}}});const ZT=(0,Vl.Z)($T,[["__scopeId","data-v-62f26eba"]]);var OT=ZT;const RT={class:"thumbnail-list"},zT={class:"menu"};var PT=(0,i.aZ)({__name:"MobilePreview",props:{changeMode:{type:Function}},setup(e){const{slides:t}=(0,o.Jk)($()),{slidesLoadLimit:l}=Cm(),a=(0,s.iH)(),n=(0,s.iH)(0);return(0,i.bv)((()=>{a.value&&(n.value=a.value.clientWidth)})),(e,o)=>{const r=(0,i.up)("IconEdit"),u=(0,i.up)("IconFullScreenPlay");return(0,i.wg)(),(0,i.iD)("div",{class:"mobile-preview",ref_key:"mobileRef",ref:a},[(0,i._)("div",RT,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(t),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"thumbnail-item",key:e.id},[(0,i.Wm)(Jd,{slide:e,size:n.value-20,visible:t<(0,s.SU)(l)},null,8,["slide","size","visible"])])))),128))]),(0,i._)("div",zT,[(0,i._)("div",{class:"menu-item",onClick:o[0]||(o[0]=t=>e.changeMode("editor"))},[(0,i.Wm)(r,{class:"icon"}),(0,i.Uk)(" 编辑")]),(0,i.Wm)(Zc,{type:"vertical",style:{height:"30px"}}),(0,i._)("div",{class:"menu-item",onClick:o[1]||(o[1]=t=>e.changeMode("player"))},[(0,i.Wm)(u,{class:"icon"}),(0,i.Uk)(" 播放")])])],512)}}});const BT=(0,Vl.Z)(PT,[["__scopeId","data-v-53dd42dc"]]);var NT=BT;const jT={class:"mobile"};var YT=(0,i.aZ)({__name:"index",setup(e){const t=(0,s.iH)("preview"),l=e=>t.value=e,a=(0,i.Fl)((()=>{const e={editor:FT,player:OT,preview:NT};return e[t.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",jT,[((0,i.wg)(),(0,i.j4)((0,i.LL)(a.value),{changeMode:l}))]))}});const VT=(0,Vl.Z)(YT,[["__scopeId","data-v-9826ff08"]]);var JT=VT,qT=(0,i.aZ)({__name:"App",setup(e){const t=K(),l=R(),a=J(),{databaseId:n}=(0,o.Jk)(l),{screening:r}=(0,o.Jk)(X());return window.onbeforeunload=()=>!1,(0,i.bv)((async()=>{await j(),a.initSnapshotDatabase(),l.setAvailableFonts()})),window.addEventListener("unload",(()=>{const e=localStorage.getItem(B),t=e?JSON.parse(e):[];t.push(n.value);const l=JSON.stringify(t);localStorage.setItem(B,l)})),(e,l)=>(0,s.SU)(r)?((0,i.wg)(),(0,i.j4)(jL,{key:0})):(0,s.SU)(t)?((0,i.wg)(),(0,i.j4)(mC,{key:1})):((0,i.wg)(),(0,i.j4)(JT,{key:2}))}});const XT=qT;var GT=XT,KT=l(5205);(0,KT.z)("service-worker.js",{ready(){console.log("App is being served from cache by a service worker.\nFor more details, visit https://goo.gl/AFskqB")},registered(){console.log("Service worker has been registered.")},cached(){console.log("Content has been cached for offline use.")},updatefound(){console.log("New content is downloading.")},updated(){console.log("New content is available; please refresh.")},offline(){console.log("No internet connection found. App is running in offline mode.")},error(e){console.error("Error during service worker registration:",e)}});l(9744),l(9091);const QT={class:"menu-content"},eE=["onClick"],tE={class:"text"},lE={key:0,class:"sub-text"};var aE=(0,i.aZ)({__name:"MenuContent",props:{menus:{},handleClickMenuItem:{type:Function}},setup(e){return(e,t)=>{const l=(0,i.up)("menu-content",!0);return(0,i.wg)(),(0,i.iD)("ul",QT,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.menus,((t,a)=>((0,i.wg)(),(0,i.iD)(i.HY,{key:t.text||a},[t.hide?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("li",{key:0,class:(0,oe.C_)(["menu-item",{divider:t.divider,disable:t.disable}]),onClick:(0,n.iM)((l=>e.handleClickMenuItem(t)),["stop"])},[t.divider?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,oe.C_)(["menu-item-content",{"has-children":t.children,"has-handler":t.handler}])},[(0,i._)("span",tE,(0,oe.zw)(t.text),1),t.subText&&!t.children?((0,i.wg)(),(0,i.iD)("span",lE,(0,oe.zw)(t.subText),1)):(0,i.kq)("",!0),t.children&&t.children.length?((0,i.wg)(),(0,i.j4)(l,{key:1,class:"sub-menu",menus:t.children,handleClickMenuItem:e.handleClickMenuItem},null,8,["menus","handleClickMenuItem"])):(0,i.kq)("",!0)],2))],10,eE))],64)))),128))])}}});const nE=(0,Vl.Z)(aE,[["__scopeId","data-v-77e74b43"]]);var oE=nE,iE=(0,i.aZ)({__name:"index",props:{axis:{},el:{},menus:{},removeContextmenu:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e=170,l=30,a=11,n=5,{x:o,y:i}=t.axis,s=t.menus.filter((e=>!(e.divider||e.hide))).length,r=t.menus.filter((e=>e.divider)).length,u=e,c=s*l+r*a+2*n,d=document.body.clientWidth,p=document.body.clientHeight;return{left:d<=o+u?o-u:o,top:p<=i+c?i-c:i}})),a=e=>{e.disable||e.children&&!e.handler||(e.handler&&e.handler(t.el),t.removeContextmenu())};return(e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i._)("div",{class:"mask",onContextmenu:t[0]||(t[0]=(0,n.iM)((t=>e.removeContextmenu()),["prevent"])),onMousedown:t[1]||(t[1]=t=>e.removeContextmenu())},null,32),(0,i._)("div",{class:"contextmenu",style:(0,oe.j5)({left:l.value.left+"px",top:l.value.top+"px"}),onContextmenu:t[2]||(t[2]=(0,n.iM)((()=>{}),["prevent"]))},[(0,i.Wm)(oE,{menus:e.menus,handleClickMenuItem:a},null,8,["menus"])],36)],64))}});const sE=iE;var rE=sE;const uE="CTX_CONTEXTMENU_HANDLER",cE=(e,t,l)=>{t.stopPropagation(),t.preventDefault();const a=l.value(e);if(!a)return;let o=null;const s=()=>{o&&(document.body.removeChild(o),o=null),e.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",s),window.removeEventListener("resize",s)},r={axis:{x:t.x,y:t.y},el:e,menus:a,removeContextmenu:s};o=document.createElement("div");const u=(0,i.Wm)(rE,r,null);(0,n.sY)(u,o),document.body.appendChild(o),e.classList.add("contextmenu-active"),document.body.addEventListener("scroll",s),window.addEventListener("resize",s)},dE={mounted(e,t){e[uE]=l=>cE(e,l,t),e.addEventListener("contextmenu",e[uE])},unmounted(e){e&&e[uE]&&(e.removeEventListener("contextmenu",e[uE]),delete e[uE])}};var pE=dE;const vE="CTX_CLICK_OUTSIDE_HANDLER",mE=(e,t,l)=>{const a=l.value,n=t.composedPath(),o=n?n.indexOf(e)<0:!e.contains(t.target);o&&a(t)},hE={mounted(e,t){e[vE]=l=>mE(e,l,t),setTimeout((()=>{document.addEventListener("click",e[vE])}),0)},unmounted(e){e[vE]&&(document.removeEventListener("click",e[vE]),delete e[vE])}};var fE=hE;const gE="TOOLTIP_INSTANCE",yE={mounted(e,t){let l="",a="top",n=[300,0];"string"===typeof t.value?l=t.value:(l=t.value.content,void 0!==t.value.placement&&(a=t.value.placement),void 0!==t.value.delay&&(n=t.value.delay)),e[gE]=(0,rn.ZP)(e,{content:l,theme:"tooltip",duration:100,animation:"scale",allowHTML:!0,placement:a,delay:n})},updated(e,t){let l="";l="string"===typeof t.value?t.value:t.value.content,e[gE]&&e[gE].setContent(l)},unmounted(e){e[gE]&&e[gE].destroy()}};var wE=yE,xE={install(e){e.directive("contextmenu",pE),e.directive("click-outside",fE),e.directive("tooltip",wE)}};const kE=(0,n.ri)(GT);kE.use(Ol),kE.use(xE),kE.use((0,o.WB)()),kE.mount("#app")},2480:function(){},3180:function(){},7687:function(){}},t={};function l(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(o.exports,o,o.exports,l),o.loaded=!0,o.exports}l.m=e,function(){var e=[];l.O=function(t,a,n,o){if(!a){var i=1/0;for(c=0;c=o)&&Object.keys(l.O).every((function(e){return l.O[e](a[r])}))?a.splice(r--,1):(s=!1,o0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[a,n,o]}}(),function(){l.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(t,{a:t}),t}}(),function(){l.d=function(e,t){for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}}(),function(){l.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){l.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={143:0};l.O.j=function(t){return 0===e[t]};var t=function(t,a){var n,o,i=a[0],s=a[1],r=a[2],u=0;if(i.some((function(t){return 0!==e[t]}))){for(n in s)l.o(s,n)&&(l.m[n]=s[n]);if(r)var c=r(l)}for(t&&t(a);u {\n return (\n node.type === schema.nodes.bullet_list ||\n node.type === schema.nodes.ordered_list\n )\n}\n\nexport const autoSelectAll = (view: EditorView) => {\n const { empty } = view.state.selection\n if (empty) selectAll(view.state, view.dispatch)\n}\n\nexport const addMark = (editorView: EditorView, mark: Mark, selection?: { from: number; to: number; }) => {\n if (selection) {\n editorView.dispatch(editorView.state.tr.addMark(selection.from, selection.to, mark))\n }\n else {\n const { $from, $to } = editorView.state.selection\n editorView.dispatch(editorView.state.tr.addMark($from.pos, $to.pos, mark))\n }\n}\n\nexport const findNodesWithSameMark = (doc: Node, from: number, to: number, markType: MarkType) => {\n let ii = from\n const finder = (mark: Mark) => mark.type === markType\n let firstMark = null\n let fromNode = null\n let toNode = null\n\n while (ii <= to) {\n const node = doc.nodeAt(ii)\n if (!node || !node.marks) return null\n\n const mark = node.marks.find(finder)\n if (!mark) return null\n\n if (firstMark && mark !== firstMark) return null\n\n fromNode = fromNode || node\n firstMark = firstMark || mark\n toNode = node\n ii++\n }\n\n let fromPos = from\n let toPos = to\n\n let jj = 0\n ii = from - 1\n while (ii > jj) {\n const node = doc.nodeAt(ii)\n const mark = node && node.marks.find(finder)\n if (!mark || mark !== firstMark) break\n fromPos = ii\n fromNode = node\n ii--\n }\n\n ii = to + 1\n jj = doc.nodeSize - 2\n while (ii < jj) {\n const node = doc.nodeAt(ii)\n const mark = node && node.marks.find(finder)\n if (!mark || mark !== firstMark) break\n toPos = ii\n toNode = node\n ii++\n }\n\n return {\n mark: firstMark,\n from: {\n node: fromNode,\n pos: fromPos,\n },\n to: {\n node: toNode,\n pos: toPos,\n },\n }\n}\n\nconst equalNodeType = (nodeType: NodeType, node: Node) => {\n return Array.isArray(nodeType) && nodeType.indexOf(node.type) > -1 || node.type === nodeType\n}\n\nconst findParentNodeClosestToPos = ($pos: ResolvedPos, predicate: (node: Node) => boolean) => {\n for (let i = $pos.depth; i > 0; i--) {\n const node = $pos.node(i)\n if (predicate(node)) {\n return {\n pos: i > 0 ? $pos.before(i) : 0,\n start: $pos.start(i),\n depth: i,\n node,\n }\n }\n }\n}\n\nexport const findParentNode = (predicate: (node: Node) => boolean) => {\n return (_ref: Selection) => findParentNodeClosestToPos(_ref.$from, predicate)\n}\n\nexport const findParentNodeOfType = (nodeType: NodeType) => {\n return (selection: Selection) => {\n return findParentNode((node: Node) => {\n return equalNodeType(nodeType, node)\n })(selection)\n }\n}\n\nexport const isActiveOfParentNodeType = (nodeType: string, state: EditorState) => {\n const node = state.schema.nodes[nodeType]\n return !!findParentNodeOfType(node)(state.selection)\n}\n\nexport const getLastTextNode = (node: Node | null): Node | null => {\n if (!node) return null\n if (node.type.name === 'text') return node\n if (!node.lastChild) return null\n\n return getLastTextNode(node.lastChild)\n}\n\nexport const getMarkAttrs = (view: EditorView) => {\n const { selection, doc } = view.state\n const { from } = selection\n\n let node = doc.nodeAt(from) || doc.nodeAt(from - 1)\n node = getLastTextNode(node)\n\n return node?.marks || []\n}\n\nexport const getAttrValue = (marks: readonly Mark[], markType: string, attr: string): string | null => {\n for (const mark of marks) {\n if (mark.type.name === markType && mark.attrs[attr]) return mark.attrs[attr]\n }\n return null\n}\n\nexport const isActiveMark = (marks: readonly Mark[], markType: string) => {\n for (const mark of marks) {\n if (mark.type.name === markType) return true\n }\n return false\n}\n\nexport const markActive = (state: EditorState, type: MarkType) => {\n const { from, $from, to, empty } = state.selection\n if (empty) return type.isInSet(state.storedMarks || $from.marks())\n return state.doc.rangeHasMark(from, to, type)\n}\n\nexport const getAttrValueInSelection = (view: EditorView, attr: string) => {\n const { selection, doc } = view.state\n const { from, to } = selection\n\n let keepChecking = true\n let value = ''\n doc.nodesBetween(from, to, node => {\n if (keepChecking && node.attrs[attr]) {\n keepChecking = false\n value = node.attrs[attr]\n }\n return keepChecking\n })\n return value\n}\n\ntype Align = 'left' | 'right' | 'center'\n\ninterface DefaultAttrs {\n color: string\n backcolor: string\n fontsize: string\n fontname: string\n align: Align\n}\nconst _defaultAttrs: DefaultAttrs = {\n color: '#000',\n backcolor: '',\n fontsize: '20px',\n fontname: '微软雅黑',\n align: 'left',\n}\nexport const getTextAttrs = (view: EditorView, attrs: Partial = {}) => {\n const defaultAttrs: DefaultAttrs = { ..._defaultAttrs, ...attrs }\n\n const marks = getMarkAttrs(view)\n\n const isBold = isActiveMark(marks, 'strong')\n const isEm = isActiveMark(marks, 'em')\n const isUnderline = isActiveMark(marks, 'underline')\n const isStrikethrough = isActiveMark(marks, 'strikethrough')\n const isSuperscript = isActiveMark(marks, 'superscript')\n const isSubscript = isActiveMark(marks, 'subscript')\n const isCode = isActiveMark(marks, 'code')\n const color = getAttrValue(marks, 'forecolor', 'color') || defaultAttrs.color\n const backcolor = getAttrValue(marks, 'backcolor', 'backcolor') || defaultAttrs.backcolor\n const fontsize = getAttrValue(marks, 'fontsize', 'fontsize') || defaultAttrs.fontsize\n const fontname = getAttrValue(marks, 'fontname', 'fontname') || defaultAttrs.fontname\n const link = getAttrValue(marks, 'link', 'href') || ''\n const align = (getAttrValueInSelection(view, 'align') || defaultAttrs.align) as Align\n const isBulletList = isActiveOfParentNodeType('bullet_list', view.state)\n const isOrderedList = isActiveOfParentNodeType('ordered_list', view.state)\n const isBlockquote = isActiveOfParentNodeType('blockquote', view.state)\n\n return {\n bold: isBold,\n em: isEm,\n underline: isUnderline,\n strikethrough: isStrikethrough,\n superscript: isSuperscript,\n subscript: isSubscript,\n code: isCode,\n color: color,\n backcolor: backcolor,\n fontsize: fontsize,\n fontname: fontname,\n link: link,\n align: align,\n bulletList: isBulletList,\n orderedList: isOrderedList,\n blockquote: isBlockquote,\n }\n}\n\nexport type TextAttrs = ReturnType\n\nexport const getFontsize = (view: EditorView) => {\n const marks = getMarkAttrs(view)\n const fontsize = getAttrValue(marks, 'fontsize', 'fontsize') || _defaultAttrs.fontsize\n return parseInt(fontsize)\n}\n\nexport const defaultRichTextAttrs: TextAttrs = {\n bold: false,\n em: false,\n underline: false,\n strikethrough: false,\n superscript: false,\n subscript: false,\n code: false,\n color: '#000',\n backcolor: '',\n fontsize: '20px',\n fontname: '微软雅黑',\n link: '',\n align: 'left',\n bulletList: false,\n orderedList: false,\n blockquote: false,\n}","export const SYS_FONTS = [\n { label: 'Arial', value: 'Arial' },\n { label: '微软雅黑', value: 'Microsoft Yahei' },\n { label: '宋体', value: 'SimSun' },\n { label: '黑体', value: 'SimHei' },\n { label: '楷体', value: 'KaiTi' },\n { label: '新宋体', value: 'NSimSun' },\n { label: '仿宋', value: 'FangSong' },\n { label: '苹方', value: 'PingFang SC' },\n { label: '华文黑体', value: 'STHeiti' },\n { label: '华文楷体', value: 'STKaiti' },\n { label: '华文宋体', value: 'STSong' },\n { label: '华文仿宋', value: 'STFangSong' },\n { label: '华文中宋', value: 'STZhongSong' },\n { label: '华文琥珀', value: 'STHupo' },\n { label: '华文新魏', value: 'STXinwei' },\n { label: '华文隶书', value: 'STLiti' },\n { label: '华文行楷', value: 'STXingkai' },\n { label: '冬青黑体', value: 'Hiragino Sans GB' },\n { label: '兰亭黑', value: 'Lantinghei SC' },\n { label: '偏偏体', value: 'Hanzipen SC' },\n { label: '手札体', value: 'Hannotate SC' },\n { label: '宋体', value: 'Songti SC' },\n { label: '娃娃体', value: 'Wawati SC' },\n { label: '行楷', value: 'Xingkai SC' },\n { label: '圆体', value: 'Yuanti SC' },\n { label: '华文细黑', value: 'STXihei' },\n { label: '幼圆', value: 'YouYuan' },\n { label: '隶书', value: 'LiSu' },\n]\n\nexport const WEB_FONTS = [\n { label: '得意黑', value: '得意黑' },\n { label: '仓耳小丸子', value: '仓耳小丸子' },\n { label: '优设标题黑', value: '优设标题黑' },\n { label: '峰广明锐体', value: '峰广明锐体' },\n { label: '摄图摩登小方体', value: '摄图摩登小方体' },\n { label: '站酷快乐体', value: '站酷快乐体' },\n { label: '字制区喜脉体', value: '字制区喜脉体' },\n { label: '素材集市康康体', value: '素材集市康康体' },\n { label: '素材集市酷方体', value: '素材集市酷方体' },\n { label: '途牛类圆体', value: '途牛类圆体' },\n { label: '锐字真言体', value: '锐字真言体' },\n]","/**\n * 判断操作系统是否存在某字体\n * @param fontName 字体名\n */\nexport const isSupportFont = (fontName: string) => {\n if (typeof fontName !== 'string') return false\n\n const arial = 'Arial'\n if (fontName.toLowerCase() === arial.toLowerCase()) return true\n\n const size = 100\n const width = 100\n const height = 100\n const str = 'a'\n\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d', { willReadFrequently: true })\n\n if (!ctx) return false\n\n canvas.width = width\n canvas.height = height\n ctx.textAlign = 'center'\n ctx.fillStyle = 'black'\n ctx.textBaseline = 'middle'\n\n const getDotArray = (_fontFamily: string) => {\n ctx.clearRect(0, 0, width, height)\n ctx.font = `${size}px ${_fontFamily}, ${arial}`\n ctx.fillText(str, width / 2, height / 2)\n const imageData = ctx.getImageData(0, 0, width, height).data\n return [].slice.call(imageData).filter(item => item !== 0)\n }\n\n return getDotArray(arial).join('') !== getDotArray(fontName).join('')\n}","import type { Slide } from '@/types/slides'\n\nexport const slides: Slide[] = [\n {\n id: 'test-slide-1',\n elements: [\n {\n type: 'shape',\n id: '4cbRxp',\n left: 0,\n top: 200,\n width: 546,\n height: 362.5,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n opacity: 0.7,\n rotate: 0\n },\n {\n type: 'shape',\n id: 'ookHrf',\n left: 0,\n top: 0,\n width: 300,\n height: 320,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n flipV: true,\n rotate: 0\n },\n {\n type: 'text',\n id: 'idn7Mx',\n left: 355,\n top: 65.25,\n width: 585,\n height: 188,\n lineHeight: 1.2,\n content: '

PPTIST

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333'\n },\n {\n type: 'text',\n id: '7stmVP',\n left: 355,\n top: 253.25,\n width: 585,\n height: 56,\n content: '

基于 Vue 3.x + TypeScript 的在线演示文稿应用

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333'\n },\n {\n type: 'line',\n id: 'FnpZs4',\n left: 361,\n top: 238,\n start: [0, 0],\n end: [549, 0],\n points: ['', ''],\n color: '#5b9bd5',\n style: 'solid',\n width: 2,\n },\n ],\n background: {\n type: 'solid',\n color: '#ffffff',\n },\n },\n {\n id: 'test-slide-2',\n elements: [\n {\n type: 'text',\n id: 'ptNnUJ',\n left: 145,\n top: 148,\n width: 711,\n height: 77,\n lineHeight: 1.2,\n content: '

在此处添加标题

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333',\n }, \n {\n type: 'text',\n id: 'mRHvQN',\n left: 207.50000000000003,\n top: 249.84259259259264,\n width: 585,\n height: 56,\n content: '

在此处添加副标题

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333',\n }, \n {\n type: 'line',\n id: '7CQDwc',\n left: 323.09259259259267,\n top: 238.33333333333334,\n start: [0, 0],\n end: [354.8148148148148, 0],\n points: ['', ''],\n color: '#5b9bd5',\n style: 'solid',\n width: 4\n }, \n {\n type: 'shape',\n id: '09wqWw',\n left: -27.648148148148138,\n top: 432.73148148148147,\n width: 1056.2962962962963,\n height: 162.96296296296296,\n viewBox: [200, 200],\n path: 'M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n rotate: 0\n }\n ],\n background: {\n type: 'solid',\n color: '#fff',\n },\n },\n {\n id: 'test-slide-3',\n elements: [\n {\n type: 'shape',\n id: 'vSheCJ',\n left: 183.5185185185185,\n top: 175.5092592592593,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n rotate: 0\n }, \n {\n type: 'shape',\n id: 'Mpwv7x',\n left: 211.29629629629628,\n top: 201.80555555555557,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n rotate: 0,\n opacity: 0.7\n }, \n {\n type: 'text',\n id: 'WQOTAp',\n left: 304.9074074074074,\n top: 198.10185185185182,\n width: 417.9629629629629,\n height: 140,\n content: '

感谢观看

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333',\n wordSpace: 5\n }\n ],\n background: {\n type: 'solid',\n color: '#fff',\n },\n },\n]","import type { SlideTheme } from '@/types/slides'\n\nexport const theme: SlideTheme = {\n themeColor: '#5b9bd5',\n fontColor: '#333',\n fontName: 'Microsoft Yahei',\n backgroundColor: '#fff',\n shadow: {\n h: 3,\n v: 3,\n blur: 2,\n color: '#808080',\n },\n outline: {\n width: 2,\n color: '#525252',\n style: 'solid',\n },\n}","/* eslint-disable max-lines */\n\nimport type { Slide } from '@/types/slides'\n\nexport const layouts: Slide[] = [\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: '4cbRxp',\n left: 0,\n top: 200,\n width: 546,\n height: 362.5,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n opacity: 0.7,\n rotate: 0\n },\n {\n type: 'shape',\n id: 'ookHrf',\n left: 0,\n top: 0,\n width: 300,\n height: 320,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n flipV: true,\n rotate: 0\n },\n {\n type: 'text',\n id: 'AkIh3E',\n left: 355,\n top: 95.11111111111111,\n width: 585,\n height: 116,\n lineHeight: 1.2,\n content: '

输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n wordSpace: 6\n },\n {\n type: 'text',\n id: '7stmVP',\n left: 355,\n top: 253.25,\n width: 585,\n height: 56,\n content: '

请在此处输入副标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n },\n {\n type: 'line',\n id: 'FnpZs4',\n left: 361,\n top: 238,\n start: [0, 0],\n end: [549, 0],\n points: ['', ''],\n color: '{{themeColor}}',\n style: 'solid',\n width: 2,\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'ptNnUJ',\n left: 145,\n top: 148,\n width: 711,\n height: 77,\n lineHeight: 1.2,\n content: '

在此处添加标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: 'mRHvQN',\n left: 207.50000000000003,\n top: 249.84259259259264,\n width: 585,\n height: 56,\n content: '

在此处添加副标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'line',\n id: '7CQDwc',\n left: 323.09259259259267,\n top: 238.33333333333334,\n start: [0, 0],\n end: [354.8148148148148, 0],\n points: ['', ''],\n color: '{{themeColor}}',\n style: 'solid',\n width: 4\n }, \n {\n type: 'shape',\n id: '09wqWw',\n left: -27.648148148148138,\n top: 432.73148148148147,\n width: 1056.2962962962963,\n height: 162.96296296296296,\n viewBox: [200, 200],\n path: 'M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'vSheCJ',\n left: 183.5185185185185,\n top: 175.5092592592593,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0\n }, \n {\n type: 'shape',\n id: 'Mpwv7x',\n left: 211.29629629629628,\n top: 201.80555555555557,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n opacity: 0.7\n }, \n {\n type: 'text',\n id: 'WQOTAp',\n left: 304.9074074074074,\n top: 198.10185185185182,\n width: 417.9629629629629,\n height: 140,\n content: '

感谢观看

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n wordSpace: 5\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'MZVO1kkj',\n elements: [\n {\n type: 'shape',\n id: 'cql0h8',\n left: 0,\n top: 0,\n width: 352.59259259259255,\n height: 562.5,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0\n },\n {\n type: 'shape',\n id: '_RTaF4',\n left: 171.4814814814814,\n top: 100.13888888888887,\n width: 362.22222222222223,\n height: 362.22222222222223,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: 'rgba(255,255,255,0)',\n fixedRatio: false,\n rotate: 0,\n outline: {\n width: 10,\n color: '{{backgroundColor}}',\n style: 'solid'\n }\n },\n {\n type: 'shape',\n id: 'UZfo8N',\n left: 216.66666666666663,\n top: 145.32407407407408,\n width: 271.85185185185185,\n height: 271.85185185185185,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{backgroundColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

01

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n },\n {\n type: 'text',\n id: 'ysqtBg',\n left: 561.4814814814814,\n top: 100.1388888888889,\n width: 359.25925925925924,\n height: 80,\n content: '

在此处输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n },\n {\n type: 'text',\n id: 'lXsoHa',\n left: 572.5925925925925,\n top: 202.3611111111111,\n width: 257.77777777777777,\n height: 260,\n content: '
  1. 在此处输入内容

  2. 在此处输入内容

  3. 在此处输入内容

  4. 在此处输入内容

  5. 在此处输入内容

  6. 在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n lineHeight: 2,\n fill: '{{subColor}}'\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'EBBnTr',\n left: 360.5996472663139,\n top: 141.8496472663139,\n width: 278.80070546737215,\n height: 278.80070546737215,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 0,\n color: '{{backgroundColor}}',\n style: 'solid'\n }\n }, \n {\n type: 'shape',\n id: 'gDIWDH',\n left: 456.4373897707231,\n top: 98.287037037037,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

1

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'shape',\n id: 'DUWT7E',\n left: 317.037037037037,\n top: 237.68738977072314,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

4

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'shape',\n id: 'pbhn38',\n left: 456.43738977072303,\n top: 377.08774250440916,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

3

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'shape',\n id: 'CvMKrO',\n left: 595.8377425044091,\n top: 237.6873897707231,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

2

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'adudHB',\n left: 402.962962962963,\n top: 39.39814814814815,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: '9UpDwg',\n left: 402.962962962963,\n top: 473.1018518518518,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: 'GERdpB',\n left: 111.48148148148151,\n top: 256.25,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: 'G5qoho',\n left: 691.1111111111111,\n top: 256.25,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'shape',\n id: 'vdZcI6',\n left: 415.18518518518516,\n top: 196.4351851851852,\n width: 169.62962962962962,\n height: 169.62962962962962,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{backgroundColor}}',\n fixedRatio: false,\n rotate: 0\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'tYUmrx',\n left: 156.66666666666683,\n top: 149.02777777777771,\n width: 264.4444444444445,\n height: 264.4444444444445,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

01

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n },\n {\n type: 'shape',\n id: '0GVHf8',\n left: 342.2222222222223,\n top: 217.17592592592587,\n width: 128.14814814814812,\n height: 128.14814814814812,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{backgroundColor}}',\n fixedRatio: false,\n rotate: 0\n },\n {\n type: 'text',\n id: 'BO33Sv',\n left: 378.8888888888889,\n top: 235.24999999999994,\n width: 464.4444444444444,\n height: 92,\n content: '

在此处添加标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'Hj7ttp',\n left: 69.35185185185185,\n top: 49.21759259259262,\n width: 420,\n height: 63,\n lineHeight: 1.2,\n content: '

1.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'FmKMNB',\n left: 69.35185185185185,\n top: 129.28240740740745,\n width: 420,\n height: 384,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'rI7ZeO',\n left: 510.64814814814815,\n top: 49.21759259259262,\n width: 420,\n height: 63,\n lineHeight: 1.2,\n content: '

2.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'KspwGc',\n left: 510.64814814814815,\n top: 129.28240740740745,\n width: 420,\n height: 384,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'Rx63Jo',\n left: 69.35185185185179,\n top: 51.71759259259262,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

1.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'ulyuzE',\n left: 69.35185185185179,\n top: 131.78240740740745,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'kr35Ca',\n left: 510.6481481481481,\n top: 51.71759259259262,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

2.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'BNQSpC',\n left: 510.6481481481481,\n top: 131.78240740740745,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'Vr38Nu',\n left: 69.35185185185185,\n top: 301.71759259259255,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

3.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'IwKRSu',\n left: 69.35185185185185,\n top: 381.7824074074074,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: '0Opr1v',\n left: 510.64814814814815,\n top: 301.71759259259255,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

4.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: '4L9Uzz',\n left: 510.64814814814815,\n top: 381.7824074074074,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'GdEGxg',\n left: 134.53703703703704,\n top: 127.25,\n width: 152.77777777777777,\n height: 308,\n lineHeight: 1.8,\n content: '

请在此处输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n wordSpace: 8,\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'y5sAfw',\n left: 332.8703703703704,\n top: 127.25,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容1

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'VeuocM',\n left: 332.8703703703704,\n top: 212.0648148148148,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容2

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'RyFWQe',\n left: 332.8703703703704,\n top: 296.8796296296296,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容3

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'Q56viI',\n left: 332.8703703703704,\n top: 381.69444444444446,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容4

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'SUWirT',\n left: 73.8888888888889,\n top: 64.21296296296302,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

1

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'YjzN1M',\n left: 148.70370370370372,\n top: 64.21296296296302,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'fS09I7',\n left: 527.5925925925926,\n top: 64.21296296296302,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

2

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'qCnfB1',\n left: 602.4074074074074,\n top: 64.21296296296302,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n },\n {\n type: 'shape',\n id: 'difAAT',\n left: 73.8888888888889,\n top: 221.25000000000003,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

3

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'EUlvMo',\n left: 148.70370370370372,\n top: 221.25000000000003,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'US_9jB',\n left: 527.5925925925926,\n top: 221.25000000000003,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

4

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: '243MnQ',\n left: 602.4074074074074,\n top: 221.25000000000003,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'Y_KUj0',\n left: 73.8888888888889,\n top: 378.287037037037,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

5

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: '9GglMe',\n left: 148.70370370370372,\n top: 378.287037037037,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'eSInje',\n left: 527.5925925925926,\n top: 378.287037037037,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

6

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: '0S3yUg',\n left: 602.4074074074074,\n top: 378.287037037037,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n]","import { defineStore } from 'pinia'\nimport tinycolor from 'tinycolor2'\nimport { omit } from 'lodash'\nimport type { Slide, SlideTheme, PPTElement, PPTAnimation } from '@/types/slides'\nimport { slides } from '@/mocks/slides'\nimport { theme } from '@/mocks/theme'\nimport { layouts } from '@/mocks/layout'\n\ninterface RemoveElementPropData {\n id: string\n propName: string | string[]\n}\n\ninterface UpdateElementData {\n id: string | string[]\n props: Partial\n slideId?: string\n}\n\ninterface FormatedAnimation {\n animations: PPTAnimation[]\n autoNext: boolean\n}\n\nexport interface SlidesState {\n title: string\n theme: SlideTheme\n slides: Slide[]\n slideIndex: number\n viewportRatio: number\n}\n\nexport const useSlidesStore = defineStore('slides', {\n state: (): SlidesState => ({\n title: '未命名演示文稿', // 幻灯片标题\n theme: theme, // 主题样式\n slides: slides, // 幻灯片页面数据\n slideIndex: 0, // 当前页面索引\n viewportRatio: 0.5625, // 可视区域比例,默认16:9\n }),\n\n getters: {\n currentSlide(state) {\n return state.slides[state.slideIndex]\n },\n \n currentSlideAnimations(state) {\n const currentSlide = state.slides[state.slideIndex]\n if (!currentSlide?.animations) return []\n\n const els = currentSlide.elements\n const elIds = els.map(el => el.id)\n return currentSlide.animations.filter(animation => elIds.includes(animation.elId))\n },\n\n // 格式化的当前页动画\n // 将触发条件为“与上一动画同时”的项目向上合并到序列中的同一位置\n // 为触发条件为“上一动画之后”项目的上一项添加自动向下执行标记\n formatedAnimations(state) {\n const currentSlide = state.slides[state.slideIndex]\n if (!currentSlide?.animations) return []\n\n const els = currentSlide.elements\n const elIds = els.map(el => el.id)\n const animations = currentSlide.animations.filter(animation => elIds.includes(animation.elId))\n\n const formatedAnimations: FormatedAnimation[] = []\n for (const animation of animations) {\n if (animation.trigger === 'click' || !formatedAnimations.length) {\n formatedAnimations.push({ animations: [animation], autoNext: false })\n }\n else if (animation.trigger === 'meantime') {\n const last = formatedAnimations[formatedAnimations.length - 1]\n last.animations = last.animations.filter(item => item.elId !== animation.elId)\n last.animations.push(animation)\n formatedAnimations[formatedAnimations.length - 1] = last\n }\n else if (animation.trigger === 'auto') {\n const last = formatedAnimations[formatedAnimations.length - 1]\n last.autoNext = true\n formatedAnimations[formatedAnimations.length - 1] = last\n formatedAnimations.push({ animations: [animation], autoNext: false })\n }\n }\n return formatedAnimations\n },\n \n layouts(state) {\n const {\n themeColor,\n fontColor,\n fontName,\n backgroundColor,\n } = state.theme\n \n const subColor = tinycolor(fontColor).isDark() ? 'rgba(230, 230, 230, 0.5)' : 'rgba(180, 180, 180, 0.5)'\n \n const layoutsString = JSON.stringify(layouts)\n .replaceAll('{{themeColor}}', themeColor)\n .replaceAll('{{fontColor}}', fontColor)\n .replaceAll('{{fontName}}', fontName)\n .replaceAll('{{backgroundColor}}', backgroundColor)\n .replaceAll('{{subColor}}', subColor)\n \n return JSON.parse(layoutsString)\n },\n },\n\n actions: {\n setTitle(title: string) {\n if (!title) this.title = '未命名演示文稿'\n else this.title = title\n },\n\n setTheme(themeProps: Partial) {\n this.theme = { ...this.theme, ...themeProps }\n },\n \n setViewportRatio(viewportRatio: number) {\n this.viewportRatio = viewportRatio\n },\n \n setSlides(slides: Slide[]) {\n this.slides = slides\n },\n \n addSlide(slide: Slide | Slide[]) {\n const slides = Array.isArray(slide) ? slide : [slide]\n const addIndex = this.slideIndex + 1\n this.slides.splice(addIndex, 0, ...slides)\n this.slideIndex = addIndex\n },\n \n updateSlide(props: Partial) {\n const slideIndex = this.slideIndex\n this.slides[slideIndex] = { ...this.slides[slideIndex], ...props }\n },\n \n deleteSlide(slideId: string | string[]) {\n const slidesId = Array.isArray(slideId) ? slideId : [slideId]\n \n const deleteSlidesIndex = []\n for (let i = 0; i < slidesId.length; i++) {\n const index = this.slides.findIndex(item => item.id === slidesId[i])\n deleteSlidesIndex.push(index)\n }\n let newIndex = Math.min(...deleteSlidesIndex)\n \n const maxIndex = this.slides.length - slidesId.length - 1\n if (newIndex > maxIndex) newIndex = maxIndex\n \n this.slideIndex = newIndex\n this.slides = this.slides.filter(item => !slidesId.includes(item.id))\n },\n \n updateSlideIndex(index: number) {\n this.slideIndex = index\n },\n \n addElement(element: PPTElement | PPTElement[]) {\n const elements = Array.isArray(element) ? element : [element]\n const currentSlideEls = this.slides[this.slideIndex].elements\n const newEls = [...currentSlideEls, ...elements]\n this.slides[this.slideIndex].elements = newEls\n },\n\n deleteElement(elementId: string | string[]) {\n const elementIdList = Array.isArray(elementId) ? elementId : [elementId]\n const currentSlideEls = this.slides[this.slideIndex].elements\n const newEls = currentSlideEls.filter(item => !elementIdList.includes(item.id))\n this.slides[this.slideIndex].elements = newEls\n },\n \n updateElement(data: UpdateElementData) {\n const { id, props, slideId } = data\n const elIdList = typeof id === 'string' ? [id] : id\n\n const slideIndex = slideId ? this.slides.findIndex(item => item.id === slideId) : this.slideIndex\n const slide = this.slides[slideIndex]\n const elements = slide.elements.map(el => {\n return elIdList.includes(el.id) ? { ...el, ...props } : el\n })\n this.slides[slideIndex].elements = (elements as PPTElement[])\n },\n \n removeElementProps(data: RemoveElementPropData) {\n const { id, propName } = data\n const propsNames = typeof propName === 'string' ? [propName] : propName\n \n const slideIndex = this.slideIndex\n const slide = this.slides[slideIndex]\n const elements = slide.elements.map(el => {\n return el.id === id ? omit(el, propsNames) : el\n })\n this.slides[slideIndex].elements = (elements as PPTElement[])\n },\n },\n})","import { customAlphabet } from 'nanoid'\nimport { defineStore } from 'pinia'\nimport { ToolbarStates } from '@/types/toolbar'\nimport type { CreatingElement, ShapeFormatPainter, TextFormatPainter } from '@/types/edit'\nimport type { DialogForExportTypes } from '@/types/export'\nimport { type TextAttrs, defaultRichTextAttrs } from '@/utils/prosemirror/utils'\nimport { SYS_FONTS } from '@/configs/font'\nimport { isSupportFont } from '@/utils/font'\n\nimport { useSlidesStore } from './slides'\n\nexport interface MainState {\n activeElementIdList: string[]\n handleElementId: string\n activeGroupElementId: string\n hiddenElementIdList: string[]\n canvasPercentage: number\n canvasScale: number\n canvasDragged: boolean\n thumbnailsFocus: boolean\n editorAreaFocus: boolean\n disableHotkeys: boolean\n gridLineSize: number\n showRuler: boolean\n creatingElement: CreatingElement | null\n creatingCustomShape: boolean\n availableFonts: typeof SYS_FONTS\n toolbarState: ToolbarStates\n clipingImageElementId: string\n isScaling: boolean\n richTextAttrs: TextAttrs\n selectedTableCells: string[]\n selectedSlidesIndex: number[]\n dialogForExport: DialogForExportTypes\n databaseId: string\n textFormatPainter: TextFormatPainter | null\n shapeFormatPainter: ShapeFormatPainter | null\n showSelectPanel: boolean\n showSearchPanel: boolean\n}\n\nconst nanoid = customAlphabet('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')\nexport const databaseId = nanoid(10)\n\nexport const useMainStore = defineStore('main', {\n state: (): MainState => ({\n activeElementIdList: [], // 被选中的元素ID集合,包含 handleElementId\n handleElementId: '', // 正在操作的元素ID\n activeGroupElementId: '', // 组合元素成员中,被选中可独立操作的元素ID\n hiddenElementIdList: [], // 被隐藏的元素ID集合\n canvasPercentage: 90, // 画布可视区域百分比\n canvasScale: 1, // 画布缩放比例(基于宽度1000px)\n canvasDragged: false, // 画布被拖拽移动\n thumbnailsFocus: false, // 左侧导航缩略图区域聚焦\n editorAreaFocus: false, // 编辑区域聚焦\n disableHotkeys: false, // 禁用快捷键\n gridLineSize: 0, // 网格线尺寸(0表示不显示网格线)\n showRuler: false, // 显示标尺\n creatingElement: null, // 正在插入的元素信息,需要通过绘制插入的元素(文字、形状、线条)\n creatingCustomShape: false, // 正在绘制任意多边形\n availableFonts: SYS_FONTS, // 当前环境可用字体\n toolbarState: ToolbarStates.SLIDE_DESIGN, // 右侧工具栏状态\n clipingImageElementId: '', // 当前正在裁剪的图片ID \n richTextAttrs: defaultRichTextAttrs, // 富文本状态\n selectedTableCells: [], // 选中的表格单元格\n isScaling: false, // 正在进行元素缩放\n selectedSlidesIndex: [], // 当前被选中的页面索引集合\n dialogForExport: '', // 导出面板\n databaseId, // 标识当前应用的indexedDB数据库ID\n textFormatPainter: null, // 文字格式刷\n shapeFormatPainter: null, // 形状格式刷\n showSelectPanel: false, // 打开选择面板\n showSearchPanel: false, // 打开查找替换面板\n }),\n\n getters: {\n activeElementList(state) {\n const slidesStore = useSlidesStore()\n const currentSlide = slidesStore.currentSlide\n if (!currentSlide || !currentSlide.elements) return []\n return currentSlide.elements.filter(element => state.activeElementIdList.includes(element.id))\n },\n \n handleElement(state) {\n const slidesStore = useSlidesStore()\n const currentSlide = slidesStore.currentSlide\n if (!currentSlide || !currentSlide.elements) return null\n return currentSlide.elements.find(element => state.handleElementId === element.id) || null\n },\n },\n\n actions: {\n setActiveElementIdList(activeElementIdList: string[]) {\n if (activeElementIdList.length === 1) this.handleElementId = activeElementIdList[0]\n else this.handleElementId = ''\n \n this.activeElementIdList = activeElementIdList\n },\n \n setHandleElementId(handleElementId: string) {\n this.handleElementId = handleElementId\n },\n \n setActiveGroupElementId(activeGroupElementId: string) {\n this.activeGroupElementId = activeGroupElementId\n },\n \n setHiddenElementIdList(hiddenElementIdList: string[]) {\n this.hiddenElementIdList = hiddenElementIdList\n },\n \n setCanvasPercentage(percentage: number) {\n this.canvasPercentage = percentage\n },\n \n setCanvasScale(scale: number) {\n this.canvasScale = scale\n },\n \n setCanvasDragged(isDragged: boolean) {\n this.canvasDragged = isDragged\n },\n \n setThumbnailsFocus(isFocus: boolean) {\n this.thumbnailsFocus = isFocus\n },\n \n setEditorareaFocus(isFocus: boolean) {\n this.editorAreaFocus = isFocus\n },\n \n setDisableHotkeysState(disable: boolean) {\n this.disableHotkeys = disable\n },\n \n setGridLineSize(size: number) {\n this.gridLineSize = size\n },\n \n setRulerState(show: boolean) {\n this.showRuler = show\n },\n \n setCreatingElement(element: CreatingElement | null) {\n this.creatingElement = element\n },\n \n setCreatingCustomShapeState(state: boolean) {\n this.creatingCustomShape = state\n },\n \n setAvailableFonts() {\n this.availableFonts = SYS_FONTS.filter(font => isSupportFont(font.value))\n },\n \n setToolbarState(toolbarState: ToolbarStates) {\n this.toolbarState = toolbarState\n },\n \n setClipingImageElementId(elId: string) {\n this.clipingImageElementId = elId\n },\n \n setRichtextAttrs(attrs: TextAttrs) {\n this.richTextAttrs = attrs\n },\n \n setSelectedTableCells(cells: string[]) {\n this.selectedTableCells = cells\n },\n \n setScalingState(isScaling: boolean) {\n this.isScaling = isScaling\n },\n \n updateSelectedSlidesIndex(selectedSlidesIndex: number[]) {\n this.selectedSlidesIndex = selectedSlidesIndex\n },\n\n setDialogForExport(type: DialogForExportTypes) {\n this.dialogForExport = type\n },\n\n setTextFormatPainter(textFormatPainter: TextFormatPainter | null) {\n this.textFormatPainter = textFormatPainter\n },\n\n setShapeFormatPainter(shapeFormatPainter: ShapeFormatPainter | null) {\n this.shapeFormatPainter = shapeFormatPainter\n },\n\n setSelectPanelState(show: boolean) {\n this.showSelectPanel = show\n },\n\n setSearchPanelState(show: boolean) {\n this.showSearchPanel = show\n },\n },\n})","export const LOCALSTORAGE_KEY_DISCARDED_DB = 'PPTIST_DISCARDED_DB'","import Dexie from 'dexie'\nimport { databaseId } from '@/store/main'\nimport type { Slide } from '@/types/slides'\nimport { LOCALSTORAGE_KEY_DISCARDED_DB } from '@/configs/storage'\n\nexport interface writingBoardImg {\n id: string\n dataURL: string\n}\n\nexport interface Snapshot {\n index: number\n slides: Slide[]\n}\n\nconst databaseNamePrefix = 'PPTist'\n\n// 删除失效/过期的数据库\n// 应用关闭时(关闭或刷新浏览器),会将其数据库ID记录在 localStorage 中,表示该ID指向的数据库已失效\n// 当应用初始化时,检查当前所有数据库,将被记录失效的数据库删除\n// 另外,距离初始化时间超过12小时的数据库也将被删除(这是为了防止出现因意外未被正确删除的库)\nexport const deleteDiscardedDB = async () => {\n const now = new Date().getTime()\n\n const localStorageDiscardedDB = localStorage.getItem(LOCALSTORAGE_KEY_DISCARDED_DB)\n const localStorageDiscardedDBList: string[] = localStorageDiscardedDB ? JSON.parse(localStorageDiscardedDB) : []\n\n const databaseNames = await Dexie.getDatabaseNames()\n const discardedDBNames = databaseNames.filter(name => {\n if (name.indexOf(databaseNamePrefix) === -1) return false\n \n const [prefix, id, time] = name.split('_')\n if (prefix !== databaseNamePrefix || !id || !time) return true\n if (localStorageDiscardedDBList.includes(id)) return true\n if (now - (+time) >= 1000 * 60 * 60 * 12) return true\n\n return false\n })\n\n for (const name of discardedDBNames) Dexie.delete(name)\n localStorage.removeItem(LOCALSTORAGE_KEY_DISCARDED_DB)\n}\n\nclass PPTistDB extends Dexie {\n public snapshots: Dexie.Table\n public writingBoardImgs: Dexie.Table\n\n public constructor() {\n super(`${databaseNamePrefix}_${databaseId}_${new Date().getTime()}`)\n this.version(1).stores({\n snapshots: '++id',\n writingBoardImgs: '++id',\n })\n this.snapshots = this.table('snapshots')\n this.writingBoardImgs = this.table('writingBoardImgs')\n }\n}\n\nexport const db = new PPTistDB()","import { defineStore } from 'pinia'\nimport type { IndexableTypeArray } from 'dexie'\nimport { db, type Snapshot } from '@/utils/database'\n\nimport { useSlidesStore } from './slides'\nimport { useMainStore } from './main'\n\nexport interface ScreenState {\n snapshotCursor: number\n snapshotLength: number\n}\n\nexport const useSnapshotStore = defineStore('snapshot', {\n state: (): ScreenState => ({\n snapshotCursor: -1, // 历史快照指针\n snapshotLength: 0, // 历史快照长度\n }),\n\n getters: {\n canUndo(state) {\n return state.snapshotCursor > 0\n },\n canRedo(state) {\n return state.snapshotCursor < state.snapshotLength - 1\n },\n },\n\n actions: {\n setSnapshotCursor(cursor: number) {\n this.snapshotCursor = cursor\n },\n setSnapshotLength(length: number) {\n this.snapshotLength = length\n },\n\n async initSnapshotDatabase() {\n const slidesStore = useSlidesStore()\n \n const newFirstSnapshot = {\n index: slidesStore.slideIndex,\n slides: slidesStore.slides,\n }\n await db.snapshots.add(newFirstSnapshot)\n this.setSnapshotCursor(0)\n this.setSnapshotLength(1)\n },\n \n async addSnapshot() {\n const slidesStore = useSlidesStore()\n\n // 获取当前indexeddb中全部快照的ID\n const allKeys = await db.snapshots.orderBy('id').keys()\n \n let needDeleteKeys: IndexableTypeArray = []\n \n // 记录需要删除的快照ID\n // 若当前快照指针不处在最后一位,那么再添加快照时,应该将当前指针位置后面的快照全部删除,对应的实际情况是:\n // 用户撤回多次后,再进行操作(添加快照),此时原先被撤销的快照都应该被删除\n if (this.snapshotCursor >= 0 && this.snapshotCursor < allKeys.length - 1) {\n needDeleteKeys = allKeys.slice(this.snapshotCursor + 1)\n }\n \n // 添加新快照\n const snapshot = {\n index: slidesStore.slideIndex,\n slides: slidesStore.slides,\n }\n await db.snapshots.add(snapshot)\n \n // 计算当前快照长度,用于设置快照指针的位置(此时指针应该处在最后一位,即:快照长度 - 1)\n let snapshotLength = allKeys.length - needDeleteKeys.length + 1\n \n // 快照数量超过长度限制时,应该将头部多余的快照删除\n const snapshotLengthLimit = 20\n if (snapshotLength > snapshotLengthLimit) {\n needDeleteKeys.push(allKeys[0])\n snapshotLength--\n }\n \n // 快照数大于1时,需要保证撤回操作后维持页面焦点不变:也就是将倒数第二个快照对应的索引设置为当前页的索引\n // https://github.com/pipipi-pikachu/PPTist/issues/27\n if (snapshotLength >= 2) {\n db.snapshots.update(allKeys[snapshotLength - 2] as number, { index: slidesStore.slideIndex })\n }\n \n await db.snapshots.bulkDelete(needDeleteKeys)\n \n this.setSnapshotCursor(snapshotLength - 1)\n this.setSnapshotLength(snapshotLength)\n },\n \n async unDo() {\n if (this.snapshotCursor <= 0) return\n\n const slidesStore = useSlidesStore()\n const mainStore = useMainStore()\n \n const snapshotCursor = this.snapshotCursor - 1\n const snapshots: Snapshot[] = await db.snapshots.orderBy('id').toArray()\n const snapshot = snapshots[snapshotCursor]\n const { index, slides } = snapshot\n \n const slideIndex = index > slides.length - 1 ? slides.length - 1 : index\n \n slidesStore.setSlides(slides)\n slidesStore.updateSlideIndex(slideIndex)\n this.setSnapshotCursor(snapshotCursor)\n mainStore.setActiveElementIdList([])\n },\n \n async reDo() {\n if (this.snapshotCursor >= this.snapshotLength - 1) return\n\n const slidesStore = useSlidesStore()\n const mainStore = useMainStore()\n \n const snapshotCursor = this.snapshotCursor + 1\n const snapshots: Snapshot[] = await db.snapshots.orderBy('id').toArray()\n const snapshot = snapshots[snapshotCursor]\n const { index, slides } = snapshot\n \n const slideIndex = index > slides.length - 1 ? slides.length - 1 : index\n \n slidesStore.setSlides(slides)\n slidesStore.updateSlideIndex(slideIndex)\n this.setSnapshotCursor(snapshotCursor)\n mainStore.setActiveElementIdList([])\n },\n },\n})","import { defineStore } from 'pinia'\n\nexport interface KeyboardState {\n ctrlKeyState: boolean\n shiftKeyState: boolean\n spaceKeyState: boolean\n}\n\nexport const useKeyboardStore = defineStore('keyboard', {\n state: (): KeyboardState => ({\n ctrlKeyState: false, // ctrl键按下状态\n shiftKeyState: false, // shift键按下状态\n spaceKeyState: false, // space键按下状态\n }),\n\n getters: {\n ctrlOrShiftKeyActive(state) {\n return state.ctrlKeyState || state.shiftKeyState\n },\n },\n\n actions: {\n setCtrlKeyState(active: boolean) {\n this.ctrlKeyState = active\n },\n setShiftKeyState(active: boolean) {\n this.shiftKeyState = active\n },\n setSpaceKeyState(active: boolean) {\n this.spaceKeyState = active\n },\n },\n})","import { defineStore } from 'pinia'\n\nexport interface ScreenState {\n screening: boolean\n}\n\nexport const useScreenStore = defineStore('screen', {\n state: (): ScreenState => ({\n screening: false, // 是否进入放映状态\n }),\n\n actions: {\n setScreening(screening: boolean) {\n this.screening = screening\n },\n },\n})","import { padStart } from 'lodash'\n\n/**\n * 补足数字位数\n * @param digit 数字\n * @param len 位数\n */\nexport const fillDigit = (digit: number, len: number) => {\n return padStart('' + digit, len, '0')\n}\n\n/**\n * 判断设备\n */\nexport const isPC = () => {\n return !navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile|BlackBerry|Symbian|Windows Phone)/i)\n}","import type { ShapePoolItem } from '@/configs/shapes'\r\nimport type { LinePoolItem } from '@/configs/lines'\r\nimport type { ImageClipDataRange, PPTElementOutline, PPTElementShadow, ShapeGradient } from './slides'\r\n\r\nexport enum ElementOrderCommands {\r\n UP = 'up',\r\n DOWN = 'down',\r\n TOP = 'top',\r\n BOTTOM = 'bottom',\r\n}\r\n\r\nexport enum ElementAlignCommands {\r\n TOP = 'top',\r\n BOTTOM = 'bottom',\r\n LEFT = 'left',\r\n RIGHT = 'right',\r\n VERTICAL = 'vertical',\r\n HORIZONTAL = 'horizontal',\r\n CENTER = 'center',\r\n}\r\n\r\nexport const enum OperateBorderLines {\r\n T = 'top',\r\n B = 'bottom',\r\n L = 'left',\r\n R = 'right',\r\n}\r\n\r\nexport const enum OperateResizeHandlers {\r\n LEFT_TOP = 'left-top',\r\n TOP = 'top',\r\n RIGHT_TOP = 'right-top',\r\n LEFT = 'left',\r\n RIGHT = 'right',\r\n LEFT_BOTTOM = 'left-bottom',\r\n BOTTOM = 'bottom',\r\n RIGHT_BOTTOM = 'right-bottom',\r\n}\r\n\r\nexport const enum OperateLineHandlers {\r\n START = 'start',\r\n END = 'end',\r\n C = 'ctrl',\r\n C1 = 'ctrl1',\r\n C2 = 'ctrl2',\r\n}\r\n\r\nexport interface AlignmentLineAxis {\r\n x: number\r\n y: number\r\n}\r\n\r\nexport interface AlignmentLineProps {\r\n type: 'vertical' | 'horizontal'\r\n axis: AlignmentLineAxis\r\n length: number\r\n}\r\n\r\nexport interface MultiSelectRange {\r\n minX: number\r\n maxX: number\r\n minY: number\r\n maxY: number\r\n}\r\n\r\nexport interface ImageClipedEmitData {\r\n range: ImageClipDataRange\r\n position: {\r\n left: number\r\n top: number\r\n width: number\r\n height: number\r\n }\r\n}\r\n\r\nexport interface CreateElementSelectionData {\r\n start: [number, number]\r\n end: [number, number]\r\n}\r\n\r\nexport interface CreateCustomShapeData {\r\n start: [number, number]\r\n end: [number, number]\r\n path: string\r\n viewBox: [number, number]\r\n fill?: string\r\n outline?: PPTElementOutline\r\n}\r\n\r\nexport interface CreatingTextElement {\r\n type: 'text'\r\n vertical?: boolean\r\n}\r\nexport interface CreatingShapeElement {\r\n type: 'shape'\r\n data: ShapePoolItem\r\n}\r\nexport interface CreatingLineElement {\r\n type: 'line'\r\n data: LinePoolItem\r\n}\r\nexport type CreatingElement = CreatingTextElement | CreatingShapeElement | CreatingLineElement\r\n\r\nexport type TextFormatPainterKeys = 'bold' | 'em' | 'underline' | 'strikethrough' | 'color' | 'backcolor' | 'fontsize' | 'fontname' | 'align'\r\n\r\nexport interface TextFormatPainter {\r\n keep: boolean\r\n bold?: boolean\r\n em?: boolean\r\n underline?: boolean\r\n strikethrough?: boolean\r\n color?: string\r\n backcolor?: string\r\n fontsize?: string\r\n fontname?: string\r\n align?: 'left' | 'right' | 'center'\r\n}\r\n\r\nexport interface ShapeFormatPainter {\r\n keep: boolean\r\n fill?: string\r\n gradient?: ShapeGradient\r\n outline?: PPTElementOutline\r\n opacity?: number\r\n shadow?: PPTElementShadow\r\n}","export const enum KEYS {\n C = 'C',\n X = 'X',\n Z = 'Z',\n Y = 'Y',\n A = 'A',\n G = 'G',\n L = 'L',\n F = 'F',\n D = 'D',\n B = 'B',\n P = 'P',\n MINUS = '-',\n EQUAL = '=',\n DIGIT_0 = '0',\n DELETE = 'DELETE',\n UP = 'ARROWUP',\n DOWN = 'ARROWDOWN',\n LEFT = 'ARROWLEFT',\n RIGHT = 'ARROWRIGHT',\n ENTER = 'ENTER',\n SPACE = ' ',\n TAB = 'TAB',\n BACKSPACE = 'BACKSPACE',\n ESC = 'ESCAPE',\n PAGEUP = 'PAGEUP',\n PAGEDOWN = 'PAGEDOWN',\n F5 = 'F5',\n}\n\nexport const HOTKEY_DOC = [\n {\n type: '通用',\n children: [\n { label: '剪切', value: 'Ctrl + X' },\n { label: '复制', value: 'Ctrl + C' },\n { label: '粘贴', value: 'Ctrl + V' },\n { label: '粘贴为纯文本', value: 'Ctrl + Shift + V' },\n { label: '快速复制粘贴', value: 'Ctrl + D' },\n { label: '全选', value: 'Ctrl + A' },\n { label: '撤销', value: 'Ctrl + Z' },\n { label: '恢复', value: 'Ctrl + Y' },\n { label: '删除', value: 'Delete / Backspace' },\n { label: '多选', value: '按住 Ctrl 或 Shift' },\n { label: '打开搜索替换', value: 'Ctrl + F' },\n { label: '打印', value: 'Ctrl + P' },\n { label: '关闭弹窗', value: 'ESC' },\n ],\n },\n {\n type: '幻灯片放映',\n children: [\n { label: '从头开始放映幻灯片', value: 'F5' },\n { label: '从当前开始放映幻灯片', value: 'Shift + F5' },\n { label: '切换上一页', value: '↑ / ← / PgUp' },\n { label: '切换下一页', value: '↓ / → / PgDown' },\n { label: '切换下一页', value: 'Enter / Space' },\n { label: '退出放映', value: 'ESC' },\n ],\n },\n {\n type: '幻灯片编辑',\n children: [\n { label: '新建幻灯片', value: 'Enter' },\n { label: '移动画布', value: 'Space + 鼠标拖拽' },\n { label: '缩放画布', value: 'Ctrl + 鼠标滚轮' },\n { label: '放大画布', value: 'Ctrl + =' },\n { label: '缩小画布', value: 'Ctrl + -' },\n { label: '使画布适应当前屏幕', value: 'Ctrl + 0' },\n { label: '上一页(未选中元素)', value: '↑ / ←' },\n { label: '下一页(未选中元素)', value: '↓ / →' },\n { label: '上一页', value: '鼠标上滚 / PgUp' },\n { label: '下一页', value: '鼠标下滚 / PgDown' },\n ],\n },\n {\n type: '元素操作',\n children: [\n { label: '移动', value: '↑ / ← / ↓ / →' },\n { label: '锁定', value: 'Ctrl + L' },\n { label: '组合', value: 'Ctrl + G' },\n { label: '取消组合', value: 'Ctrl + Shift + G' },\n { label: '置顶层', value: 'Alt + F' },\n { label: '置底层', value: 'Alt + B' },\n { label: '锁定宽高比例', value: '按住 Ctrl 或 Shift' },\n { label: '创建水平 / 垂直线条', value: '按住 Ctrl 或 Shift' },\n { label: '切换焦点元素', value: 'Tab' },\n { label: '确认图片裁剪', value: 'Enter' },\n { label: '完成自定义形状绘制', value: 'Enter' },\n ],\n },\n {\n type: '表格编辑',\n children: [\n { label: '聚焦到下一个单元格', value: 'Tab' },\n { label: '在上方插入一行', value: 'Ctrl + ↑' },\n { label: '在下方插入一行', value: 'Ctrl + ↓' },\n { label: '在左侧插入一列', value: 'Ctrl + ←' },\n { label: '在右侧插入一列', value: 'Ctrl + →' },\n ],\n },\n {\n type: '图表数据编辑',\n children: [\n { label: '聚焦到下一行', value: 'Enter' },\n ],\n },\n {\n type: '文本编辑',\n children: [\n { label: '加粗', value: 'Ctrl + B' },\n { label: '斜体', value: 'Ctrl + I' },\n { label: '下划线', value: 'Ctrl + U' },\n { label: '行内代码', value: 'Ctrl + E' },\n { label: '上角标', value: 'Ctrl + ;' },\n { label: '下角标', value: `Ctrl + '` },\n { label: '选中段落', value: `ESC` },\n ],\n },\n]","import CryptoJS from 'crypto-js'\n\nconst CRYPTO_KEY = 'pptist'\n\n/**\n * 加密\n * @param msg 待加密字符串\n */\nexport const encrypt = (msg: string) => {\n return CryptoJS.AES.encrypt(msg, CRYPTO_KEY).toString()\n}\n\n/**\n * 解密\n * @param ciphertext 待解密字符串\n */\nexport const decrypt = (ciphertext: string) => {\n const bytes = CryptoJS.AES.decrypt(ciphertext, CRYPTO_KEY)\n return bytes.toString(CryptoJS.enc.Utf8)\n}","import Clipboard from 'clipboard'\nimport { decrypt } from '@/utils/crypto'\n\n/**\n * 复制文本到剪贴板\n * @param text 文本内容\n */\nexport const copyText = (text: string) => {\n return new Promise((resolve, reject) => {\n const fakeElement = document.createElement('button')\n const clipboard = new Clipboard(fakeElement, {\n text: () => text,\n action: () => 'copy',\n container: document.body,\n })\n clipboard.on('success', e => {\n clipboard.destroy()\n resolve(e)\n })\n clipboard.on('error', e => {\n clipboard.destroy()\n reject(e)\n })\n document.body.appendChild(fakeElement)\n fakeElement.click()\n document.body.removeChild(fakeElement)\n })\n}\n\n// 读取剪贴板\nexport const readClipboard = (): Promise => {\n return new Promise((resolve, reject) => {\n if (navigator.clipboard?.readText) {\n navigator.clipboard.readText().then(text => {\n if (!text) reject('剪贴板为空或者不包含文本')\n return resolve(text)\n })\n }\n else reject('浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V')\n })\n}\n\n// 解析加密后的剪贴板内容\nexport const pasteCustomClipboardString = (text: string) => {\n let clipboardData\n try {\n clipboardData = JSON.parse(decrypt(text))\n }\n catch {\n clipboardData = text\n }\n\n return clipboardData\n}\n\n// 尝试解析剪贴板内容是否为Excel表格(或类似的)数据格式\nexport const pasteExcelClipboardString = (text: string): string[][] | null => {\n const lines: string[] = text.split('\\r\\n')\n\n if (lines[lines.length - 1] === '') lines.pop()\n\n let colCount = -1\n const data: string[][] = []\n for (const index in lines) {\n data[index] = lines[index].split('\\t')\n\n if (data[index].length === 1) return null\n if (colCount === -1) colCount = data[index].length\n else if (colCount !== data[index].length) return null\n }\n return data\n}","import tinycolor from 'tinycolor2'\r\nimport { nanoid } from 'nanoid'\r\nimport type { PPTElement, PPTLineElement, Slide } from '@/types/slides'\r\n\r\ninterface RotatedElementData {\r\n left: number\r\n top: number\r\n width: number\r\n height: number\r\n rotate: number\r\n}\r\n\r\ninterface IdMap {\r\n [id: string]: string\r\n}\r\n\r\n/**\r\n * 计算元素在画布中的矩形范围旋转后的新位置范围\r\n * @param element 元素的位置大小和旋转角度信息\r\n */\r\nexport const getRectRotatedRange = (element: RotatedElementData) => {\r\n const { left, top, width, height, rotate = 0 } = element\r\n\r\n const radius = Math.sqrt( Math.pow(width, 2) + Math.pow(height, 2) ) / 2\r\n const auxiliaryAngle = Math.atan(height / width) * 180 / Math.PI\r\n\r\n const tlbraRadian = (180 - rotate - auxiliaryAngle) * Math.PI / 180\r\n const trblaRadian = (auxiliaryAngle - rotate) * Math.PI / 180\r\n\r\n const middleLeft = left + width / 2\r\n const middleTop = top + height / 2\r\n\r\n const xAxis = [\r\n middleLeft + radius * Math.cos(tlbraRadian),\r\n middleLeft + radius * Math.cos(trblaRadian),\r\n middleLeft - radius * Math.cos(tlbraRadian),\r\n middleLeft - radius * Math.cos(trblaRadian),\r\n ]\r\n const yAxis = [\r\n middleTop - radius * Math.sin(tlbraRadian),\r\n middleTop - radius * Math.sin(trblaRadian),\r\n middleTop + radius * Math.sin(tlbraRadian),\r\n middleTop + radius * Math.sin(trblaRadian),\r\n ]\r\n\r\n return {\r\n xRange: [Math.min(...xAxis), Math.max(...xAxis)],\r\n yRange: [Math.min(...yAxis), Math.max(...yAxis)],\r\n }\r\n}\r\n\r\n/**\r\n * 计算元素在画布中的矩形范围旋转后的新位置与旋转之前位置的偏离距离\r\n * @param element 元素的位置大小和旋转角度信息\r\n */\r\nexport const getRectRotatedOffset = (element: RotatedElementData) => {\r\n const { xRange: originXRange, yRange: originYRange } = getRectRotatedRange({\r\n left: element.left,\r\n top: element.top,\r\n width: element.width,\r\n height: element.height,\r\n rotate: 0,\r\n })\r\n const { xRange: rotatedXRange, yRange: rotatedYRange } = getRectRotatedRange({\r\n left: element.left,\r\n top: element.top,\r\n width: element.width,\r\n height: element.height,\r\n rotate: element.rotate,\r\n })\r\n return {\r\n offsetX: rotatedXRange[0] - originXRange[0],\r\n offsetY: rotatedYRange[0] - originYRange[0],\r\n }\r\n}\r\n\r\n/**\r\n * 计算元素在画布中的位置范围\r\n * @param element 元素信息\r\n */\r\nexport const getElementRange = (element: PPTElement) => {\r\n let minX, maxX, minY, maxY\r\n\r\n if (element.type === 'line') {\r\n minX = element.left\r\n maxX = element.left + Math.max(element.start[0], element.end[0])\r\n minY = element.top\r\n maxY = element.top + Math.max(element.start[1], element.end[1])\r\n }\r\n else if ('rotate' in element && element.rotate) {\r\n const { left, top, width, height, rotate } = element\r\n const { xRange, yRange } = getRectRotatedRange({ left, top, width, height, rotate })\r\n minX = xRange[0]\r\n maxX = xRange[1]\r\n minY = yRange[0]\r\n maxY = yRange[1]\r\n }\r\n else {\r\n minX = element.left\r\n maxX = element.left + element.width\r\n minY = element.top\r\n maxY = element.top + element.height\r\n }\r\n return { minX, maxX, minY, maxY }\r\n}\r\n\r\n/**\r\n * 计算一组元素在画布中的位置范围\r\n * @param elementList 一组元素信息\r\n */\r\nexport const getElementListRange = (elementList: PPTElement[]) => {\r\n const leftValues: number[] = []\r\n const topValues: number[] = []\r\n const rightValues: number[] = []\r\n const bottomValues: number[] = []\r\n\r\n elementList.forEach(element => {\r\n const { minX, maxX, minY, maxY } = getElementRange(element)\r\n leftValues.push(minX)\r\n topValues.push(minY)\r\n rightValues.push(maxX)\r\n bottomValues.push(maxY)\r\n })\r\n\r\n const minX = Math.min(...leftValues)\r\n const maxX = Math.max(...rightValues)\r\n const minY = Math.min(...topValues)\r\n const maxY = Math.max(...bottomValues)\r\n\r\n return { minX, maxX, minY, maxY }\r\n}\r\n\r\nexport interface AlignLine {\r\n value: number\r\n range: [number, number]\r\n}\r\n\r\n/**\r\n * 将一组对齐吸附线进行去重:同位置的的多条对齐吸附线仅留下一条,取该位置所有对齐吸附线的最大值和最小值为新的范围\r\n * @param lines 一组对齐吸附线信息\r\n */\r\nexport const uniqAlignLines = (lines: AlignLine[]) => {\r\n const uniqLines: AlignLine[] = []\r\n lines.forEach(line => {\r\n const index = uniqLines.findIndex(_line => _line.value === line.value)\r\n if (index === -1) uniqLines.push(line)\r\n else {\r\n const uniqLine = uniqLines[index]\r\n const rangeMin = Math.min(uniqLine.range[0], line.range[0])\r\n const rangeMax = Math.max(uniqLine.range[1], line.range[1])\r\n const range: [number, number] = [rangeMin, rangeMax]\r\n const _line = { value: line.value, range }\r\n uniqLines[index] = _line\r\n }\r\n })\r\n return uniqLines\r\n}\r\n\r\n/**\r\n * 以页面列表为基础,为每一个页面生成新的ID,并关联到旧ID形成一个字典\r\n * 主要用于页面元素时,维持数据中各处页面ID原有的关系\r\n * @param slides 页面列表\r\n */\r\nexport const createSlideIdMap = (slides: Slide[]) => {\r\n const slideIdMap: IdMap = {}\r\n for (const slide of slides) {\r\n slideIdMap[slide.id] = nanoid(10)\r\n }\r\n return slideIdMap\r\n}\r\n\r\n/**\r\n * 以元素列表为基础,为每一个元素生成新的ID,并关联到旧ID形成一个字典\r\n * 主要用于复制元素时,维持数据中各处元素ID原有的关系\r\n * 例如:原本两个组合的元素拥有相同的groupId,复制后依然会拥有另一个相同的groupId\r\n * @param elements 元素列表数据\r\n */\r\nexport const createElementIdMap = (elements: PPTElement[]) => {\r\n const groupIdMap: IdMap = {}\r\n const elIdMap: IdMap = {}\r\n for (const element of elements) {\r\n const groupId = element.groupId\r\n if (groupId && !groupIdMap[groupId]) {\r\n groupIdMap[groupId] = nanoid(10)\r\n }\r\n elIdMap[element.id] = nanoid(10)\r\n }\r\n return {\r\n groupIdMap,\r\n elIdMap,\r\n }\r\n}\r\n\r\n/**\r\n * 根据表格的主题色,获取对应用于配色的子颜色\r\n * @param themeColor 主题色\r\n */\r\nexport const getTableSubThemeColor = (themeColor: string) => {\r\n const rgba = tinycolor(themeColor)\r\n return [\r\n rgba.setAlpha(0.3).toRgbString(),\r\n rgba.setAlpha(0.1).toRgbString(),\r\n ]\r\n}\r\n\r\n/**\r\n * 获取线条元素路径字符串\r\n * @param element 线条元素\r\n */\r\nexport const getLineElementPath = (element: PPTLineElement) => {\r\n const start = element.start.join(',')\r\n const end = element.end.join(',')\r\n if (element.broken) {\r\n const mid = element.broken.join(',')\r\n return `M${start} L${mid} L${end}`\r\n }\r\n else if (element.curve) {\r\n const mid = element.curve.join(',')\r\n return `M${start} Q${mid} ${end}`\r\n }\r\n else if (element.cubic) {\r\n const [c1, c2] = element.cubic\r\n const p1 = c1.join(',')\r\n const p2 = c2.join(',')\r\n return `M${start} C${p1} ${p2} ${end}`\r\n }\r\n return `M${start} L${end}`\r\n}\r\n\r\n/**\r\n * 判断一个元素是否在可视范围内\r\n * @param element 元素\r\n * @param parent 父元素\r\n */\r\nexport const isElementInViewport = (element: HTMLElement, parent: HTMLElement): boolean => {\r\n const elementRect = element.getBoundingClientRect()\r\n const parentRect = parent.getBoundingClientRect()\r\n\r\n return (\r\n elementRect.top >= parentRect.top &&\r\n elementRect.bottom <= parentRect.bottom\r\n )\r\n}","// https://iconpark.bytedance.com/official\n\nimport type { App } from 'vue'\nimport {\n PlayOne,\n FullScreenPlay,\n Lock,\n Unlock,\n Ppt,\n Format,\n Picture,\n FullScreen,\n List,\n OrderedList,\n FlipVertically,\n FlipHorizontally,\n FontSize,\n Code,\n TextBold,\n TextItalic,\n TextUnderline,\n Strikethrough,\n Edit,\n Quote,\n BackgroundColor,\n Group,\n Ungroup,\n Back,\n Next,\n Fullwidth,\n AlignTop,\n AlignLeft,\n AlignRight,\n AlignBottom,\n AlignVertically,\n AlignHorizontally,\n BringToFront,\n SendToBack,\n AlignTextLeft,\n AlignTextRight,\n AlignTextCenter,\n AlignTextBoth,\n RowHeight,\n Write,\n InsertTable,\n AddText,\n Fill,\n Tailoring,\n Effects,\n ColorFilter,\n Up,\n Down,\n Plus,\n Minus,\n Connection,\n BringToFrontOne,\n SentToBack,\n Github,\n ChartProportion,\n ChartHistogram,\n ChartHistogramOne,\n ChartLineArea,\n ChartRing,\n ChartScatter,\n ChartLine,\n ChartPie,\n Text,\n Rotate,\n LeftTwo,\n RightTwo,\n Platte,\n Close,\n CloseSmall,\n Undo,\n Transform,\n Click,\n Theme,\n ArrowCircleLeft,\n GraphicDesign,\n Logout,\n Erase,\n Clear,\n AlignTextTopOne,\n AlignTextBottomOne,\n AlignTextMiddleOne,\n Pause,\n VolumeMute,\n VolumeNotice,\n VolumeSmall,\n VideoTwo,\n Formula,\n LinkOne,\n FullScreenOne,\n OffScreenOne,\n Power,\n ListView,\n Magic,\n HighLight,\n Download,\n IndentLeft,\n IndentRight,\n VerticalSpacingBetweenItems,\n Copy,\n Delete,\n Square,\n Round,\n Needle,\n TextRotationNone,\n TextRotationDown,\n FormatBrush,\n PreviewOpen,\n PreviewClose,\n StopwatchStart,\n Search,\n Left,\n Right,\n MoveOne,\n HamburgerButton,\n Attention,\n CheckOne,\n CloseOne,\n Info,\n} from '@icon-park/vue-next'\n\nexport interface Icons {\n [key: string]: typeof PlayOne\n}\n\nexport const icons: Icons = {\n IconPlayOne: PlayOne,\n IconFullScreenPlay: FullScreenPlay,\n IconLock: Lock,\n IconUnlock: Unlock,\n IconPpt: Ppt,\n IconFormat: Format,\n IconPicture: Picture,\n IconFullScreen: FullScreen,\n IconList: List,\n IconOrderedList: OrderedList,\n IconFlipVertically: FlipVertically,\n IconFlipHorizontally: FlipHorizontally,\n IconFontSize: FontSize,\n IconCode: Code,\n IconTextBold: TextBold,\n IconTextItalic: TextItalic,\n IconTextUnderline: TextUnderline,\n IconStrikethrough: Strikethrough,\n IconEdit: Edit,\n IconQuote: Quote,\n IconBackgroundColor: BackgroundColor,\n IconGroup: Group,\n IconUngroup: Ungroup,\n IconBack: Back,\n IconNext: Next,\n IconFullwidth: Fullwidth,\n IconAlignTop: AlignTop,\n IconAlignLeft: AlignLeft,\n IconAlignRight: AlignRight,\n IconAlignBottom: AlignBottom,\n IconAlignVertically: AlignVertically,\n IconAlignHorizontally: AlignHorizontally,\n IconBringToFront: BringToFront,\n IconSendToBack: SendToBack,\n IconAlignTextLeft: AlignTextLeft,\n IconAlignTextRight: AlignTextRight,\n IconAlignTextCenter: AlignTextCenter,\n IconAlignTextBoth: AlignTextBoth,\n IconRowHeight: RowHeight,\n IconWrite: Write,\n IconInsertTable: InsertTable,\n IconAddText: AddText,\n IconFill: Fill,\n IconTailoring: Tailoring,\n IconEffects: Effects,\n IconColorFilter: ColorFilter,\n IconUp: Up,\n IconDown: Down,\n IconPlus: Plus,\n IconMinus: Minus,\n IconConnection: Connection,\n IconBringToFrontOne: BringToFrontOne,\n IconSentToBack: SentToBack,\n IconGithub: Github,\n IconChartProportion: ChartProportion,\n IconChartHistogram: ChartHistogram,\n IconChartHistogramOne: ChartHistogramOne,\n IconChartLineArea: ChartLineArea,\n IconChartRing: ChartRing,\n IconChartScatter: ChartScatter,\n IconChartLine: ChartLine,\n IconChartPie: ChartPie,\n IconText: Text,\n IconRotate: Rotate,\n IconLeftTwo: LeftTwo,\n IconRightTwo: RightTwo,\n IconPlatte: Platte,\n IconClose: Close,\n IconCloseSmall: CloseSmall,\n IconUndo: Undo,\n IconTransform: Transform,\n IconClick: Click,\n IconTheme: Theme,\n IconArrowCircleLeft: ArrowCircleLeft,\n IconGraphicDesign: GraphicDesign,\n IconLogout: Logout,\n IconErase: Erase,\n IconClear: Clear,\n IconAlignTextTopOne: AlignTextTopOne,\n IconAlignTextBottomOne: AlignTextBottomOne,\n IconAlignTextMiddleOne: AlignTextMiddleOne,\n IconPause: Pause,\n IconVolumeMute: VolumeMute,\n IconVolumeNotice: VolumeNotice,\n IconVolumeSmall: VolumeSmall,\n IconVideoTwo: VideoTwo,\n IconFormula: Formula,\n IconLinkOne: LinkOne,\n IconFullScreenOne: FullScreenOne,\n IconOffScreenOne: OffScreenOne,\n IconPower: Power,\n IconListView: ListView,\n IconMagic: Magic,\n IconHighLight: HighLight,\n IconDownload: Download,\n IconIndentLeft: IndentLeft,\n IconIndentRight: IndentRight,\n IconVerticalSpacingBetweenItems: VerticalSpacingBetweenItems,\n IconCopy: Copy,\n IconDelete: Delete,\n IconSquare: Square,\n IconRound: Round,\n IconNeedle: Needle,\n IconTextRotationNone: TextRotationNone,\n IconTextRotationDown: TextRotationDown,\n IconFormatBrush: FormatBrush,\n IconPreviewOpen: PreviewOpen,\n IconPreviewClose: PreviewClose,\n IconStopwatchStart: StopwatchStart,\n IconSearch: Search,\n IconLeft: Left,\n IconRight: Right,\n IconMoveOne: MoveOne,\n IconHamburgerButton: HamburgerButton,\n IconAttention: Attention,\n IconCheckOne: CheckOne,\n IconCloseOne: CloseOne,\n IconInfo: Info,\n}\n\nexport default {\n install(app: App) {\n for (const key of Object.keys(icons)) {\n app.component(key, icons[key])\n }\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Transition as _Transition, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-03d14766\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"id\"]\nconst _hoisted_2 = { class: \"icons\" }\nconst _hoisted_3 = { class: \"content\" }\nconst _hoisted_4 = {\n key: 0,\n class: \"title\"\n}\nconst _hoisted_5 = { class: \"description\" }\nconst _hoisted_6 = {\n key: 0,\n class: \"control\"\n}\n\nimport { onMounted, ref, onBeforeMount } from 'vue'\nimport { icons } from '@/plugins/icon'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Message',\n props: {\n id: {},\n message: {},\n type: { default: 'success' },\n title: { default: '' },\n duration: { default: 3000 },\n closable: { type: Boolean, default: false }\n },\n emits: [\"close\", \"destroy\"],\n setup(__props: any, { expose: __expose, emit: __emit }) {\n\nconst {\n IconAttention,\n IconCheckOne,\n IconCloseOne,\n IconInfo,\n IconCloseSmall,\n} = icons\n\nconst props = __props\n\nconst emit = __emit\n\nconst visible = ref(true)\nconst timer = ref(null)\n\nconst startTimer = () => {\n if (props.duration <= 0) return\n timer.value = setTimeout(close, props.duration)\n}\nconst clearTimer = () => {\n if (timer.value) clearTimeout(timer.value)\n}\n\nconst close = () => visible.value = false\n\nonBeforeMount(() => {\n clearTimer()\n})\nonMounted(() => {\n startTimer()\n})\n\n__expose({\n close,\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Transition, {\n name: \"message-fade\",\n appear: \"\",\n mode: \"in-out\",\n onBeforeLeave: _cache[3] || (_cache[3] = ($event: any) => (emit('close'))),\n onAfterLeave: _cache[4] || (_cache[4] = ($event: any) => (emit('destroy')))\n }, {\n default: _withCtx(() => [\n (visible.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"message\",\n id: _ctx.id\n }, [\n _createElementVNode(\"div\", {\n class: \"message-container\",\n onMouseenter: _cache[1] || (_cache[1] = ($event: any) => (clearTimer())),\n onMouseleave: _cache[2] || (_cache[2] = ($event: any) => (startTimer()))\n }, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_ctx.type === 'warning')\n ? (_openBlock(), _createBlock(_unref(IconAttention), {\n key: 0,\n theme: \"filled\",\n size: \"18\",\n fill: \"#faad14\"\n }))\n : _createCommentVNode(\"\", true),\n (_ctx.type === 'success')\n ? (_openBlock(), _createBlock(_unref(IconCheckOne), {\n key: 1,\n theme: \"filled\",\n size: \"18\",\n fill: \"#52c41a\"\n }))\n : _createCommentVNode(\"\", true),\n (_ctx.type === 'error')\n ? (_openBlock(), _createBlock(_unref(IconCloseOne), {\n key: 2,\n theme: \"filled\",\n size: \"18\",\n fill: \"#ff4d4f\"\n }))\n : _createCommentVNode(\"\", true),\n (_ctx.type === 'info')\n ? (_openBlock(), _createBlock(_unref(IconInfo), {\n key: 3,\n theme: \"filled\",\n size: \"18\",\n fill: \"#1677ff\"\n }))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n (_ctx.title)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, _toDisplayString(_ctx.title), 1))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_5, _toDisplayString(_ctx.message), 1)\n ]),\n (_ctx.closable)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n _createElementVNode(\"span\", {\n class: \"close-btn\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (close()))\n }, [\n _createVNode(_unref(IconCloseSmall))\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ], 32)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }))\n}\n}\n\n})","\n\n\n\n","import script from \"./Message.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Message.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Message.vue?vue&type=style&index=0&id=03d14766&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-03d14766\"]])\n\nexport default __exports__","import { createVNode, render, type AppContext } from 'vue'\nimport MessageComponent from '@/components/Message.vue'\n\nexport interface MessageOptions {\n type?: 'info' | 'success' | 'warning' | 'error'\n title?: string\n message?: string\n duration?: number\n closable?: boolean\n ctx?: AppContext\n onClose?: () => void\n}\n\nexport type MessageTypeOptions = Omit\nexport interface MessageIntance {\n id: string\n close: () => void\n}\n\nexport type MessageFn = (message: string, options?: MessageTypeOptions) => MessageIntance\nexport interface Message {\n (options: MessageOptions): MessageIntance\n info: MessageFn\n success: MessageFn\n error: MessageFn\n warning: MessageFn\n closeAll: () => void\n _context?: AppContext | null\n}\n\nconst instances: MessageIntance[] = []\nlet wrap: HTMLDivElement | null = null\nlet seed = 0\nconst defaultOptions: MessageOptions = {\n duration: 3000,\n}\n\nconst message: Message = (options: MessageOptions) => {\n const id = 'message-' + seed++\n const props = {\n ...defaultOptions,\n ...options,\n id,\n }\n\n if (!wrap) {\n wrap = document.createElement('div')\n wrap.className = 'message-wrap'\n wrap.style.cssText = `\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 6000;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: 15px;\n background-color: rgba(255, 255, 255, 0);\n transition: all 1s ease-in-out;\n align-items: center;\n `\n document.body.appendChild(wrap)\n }\n\n const vm = createVNode(MessageComponent, props, null)\n const div = document.createElement('div')\n\n vm.appContext = options.ctx || message._context || null\n vm.props!.onClose = options.onClose\n vm.props!.onDestroy = () => {\n if (wrap && wrap.childNodes.length <= 1) {\n wrap.remove()\n wrap = null\n }\n render(null, div)\n }\n\n render(vm, div)\n wrap.appendChild(div.firstElementChild!)\n\n const instance = {\n id,\n close: () => vm?.component?.exposed?.close(),\n }\n\n instances.push(instance)\n return instance\n}\n\nmessage.success = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'success', message: msg })\nmessage.info = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'info', message: msg })\nmessage.warning = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'warning', message: msg })\nmessage.error = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'error', message: msg })\n\nmessage.closeAll = function() {\n for (let i = instances.length - 1; i >= 0; i--) {\n instances[i].close()\n }\n}\n\nexport default message","/**\r\n * 将普通文本转为带段落信息的HTML字符串\r\n * @param text 文本\r\n */\r\nexport const parseText2Paragraphs = (text: string) => {\r\n const htmlText = text.replace(/[\\n\\r]+/g, '
')\r\n const paragraphs = htmlText.split('
')\r\n let string = ''\r\n for (const paragraph of paragraphs) {\r\n if (paragraph) string += `
${paragraph}
`\r\n }\r\n return string\r\n}","interface ImageSize {\n width: number\n height: number\n}\n\n/**\n * 获取图片的原始宽高\n * @param src 图片地址\n */\nexport const getImageSize = (src: string): Promise => {\n return new Promise(resolve => {\n const img = document.createElement('img')\n img.src = src\n img.style.opacity = '0'\n document.body.appendChild(img)\n\n img.onload = () => {\n const imgWidth = img.clientWidth\n const imgHeight = img.clientHeight\n \n img.onload = null\n img.onerror = null\n\n document.body.removeChild(img)\n\n resolve({ width: imgWidth, height: imgHeight })\n }\n\n img.onerror = () => {\n img.onload = null\n img.onerror = null\n }\n })\n}\n\n/**\n * 读取图片文件的dataURL\n * @param file 图片文件\n */\nexport const getImageDataURL = (file: File): Promise => {\n return new Promise(resolve => {\n const reader = new FileReader()\n reader.addEventListener('load', () => {\n resolve(reader.result as string)\n })\n reader.readAsDataURL(file)\n })\n}","export const VIEWPORT_SIZE = 1000","import type { BarChartOptions, LineChartOptions, PieChartOptions } from 'chartist'\n\nexport const enum ShapePathFormulasKeys {\n ROUND_RECT = 'roundRect',\n ROUND_RECT_DIAGONAL = 'roundRectDiagonal',\n ROUND_RECT_SINGLE = 'roundRectSingle',\n ROUND_RECT_SAMESIDE = 'roundRectSameSide',\n CUT_RECT_DIAGONAL = 'cutRectDiagonal',\n CUT_RECT_SINGLE = 'cutRectSingle',\n CUT_RECT_SAMESIDE = 'cutRectSameSide',\n CUT_ROUND_RECT = 'cutRoundRect',\n MESSAGE = 'message',\n ROUND_MESSAGE = 'roundMessage',\n L = 'L',\n RING_RECT = 'ringRect',\n PLUS = 'plus',\n TRIANGLE = 'triangle',\n PARALLELOGRAM_LEFT = 'parallelogramLeft',\n PARALLELOGRAM_RIGHT = 'parallelogramRight',\n TRAPEZOID = 'trapezoid',\n BULLET = 'bullet',\n INDICATOR = 'indicator',\n}\n\nexport const enum ElementTypes {\n TEXT = 'text',\n IMAGE = 'image',\n SHAPE = 'shape',\n LINE = 'line',\n CHART = 'chart',\n TABLE = 'table',\n LATEX = 'latex',\n VIDEO = 'video',\n AUDIO = 'audio',\n}\n\n/**\n * 元素阴影\n * \n * h: 水平偏移量\n * \n * v: 垂直偏移量\n * \n * blur: 模糊程度\n * \n * color: 阴影颜色\n */\nexport interface PPTElementShadow {\n h: number\n v: number\n blur: number\n color: string\n}\n\n/**\n * 元素边框\n * \n * style?: 边框样式(实线或虚线)\n * \n * width?: 边框宽度\n * \n * color?: 边框颜色\n */\nexport interface PPTElementOutline {\n style?: 'dashed' | 'solid'\n width?: number\n color?: string\n}\n\n/**\n * 元素超链接\n * \n * type: 链接类型(网页、幻灯片页面)\n * \n * target: 目标地址(网页链接、幻灯片页面ID)\n */\nexport interface PPTElementLink {\n type: 'web' | 'slide'\n target: string\n}\n\n\n/**\n * 元素通用属性\n * \n * id: 元素ID\n * \n * left: 元素水平方向位置(距离画布左侧)\n * \n * top: 元素垂直方向位置(距离画布顶部)\n * \n * lock?: 锁定元素\n * \n * groupId?: 组合ID(拥有相同组合ID的元素即为同一组合元素成员)\n * \n * width: 元素宽度\n * \n * height: 元素高度\n * \n * rotate: 旋转角度\n * \n * link?: 超链接\n * \n * name?: 元素名\n */\ninterface PPTBaseElement {\n id: string\n left: number\n top: number\n lock?: boolean\n groupId?: string\n width: number\n height: number\n rotate: number\n link?: PPTElementLink\n name?: string\n}\n\n\n/**\n * 文本元素\n * \n * type: 元素类型(text)\n * \n * content: 文本内容(HTML字符串)\n * \n * defaultFontName: 默认字体(会被文本内容中的HTML内联样式覆盖)\n * \n * defaultColor: 默认颜色(会被文本内容中的HTML内联样式覆盖)\n * \n * outline?: 边框\n * \n * fill?: 填充色\n * \n * lineHeight?: 行高(倍),默认1.5\n * \n * wordSpace?: 字间距,默认0\n * \n * opacity?: 不透明度,默认1\n * \n * shadow?: 阴影\n * \n * paragraphSpace?: 段间距,默认 5px\n * \n * vertical?: 竖向文本\n */\nexport interface PPTTextElement extends PPTBaseElement {\n type: 'text'\n content: string\n defaultFontName: string\n defaultColor: string\n outline?: PPTElementOutline\n fill?: string\n lineHeight?: number\n wordSpace?: number\n opacity?: number\n shadow?: PPTElementShadow\n paragraphSpace?: number\n vertical?: boolean\n}\n\n\n/**\n * 图片翻转、形状翻转\n * \n * flipH?: 水平翻转\n * \n * flipV?: 垂直翻转\n */\nexport interface ImageOrShapeFlip {\n flipH?: boolean\n flipV?: boolean\n}\n\n/**\n * 图片滤镜\n * \n * https://developer.mozilla.org/zh-CN/docs/Web/CSS/filter\n * \n * 'blur'?: 模糊,默认0(px)\n * \n * 'brightness'?: 亮度,默认100(%)\n * \n * 'contrast'?: 对比度,默认100(%)\n * \n * 'grayscale'?: 灰度,默认0(%)\n * \n * 'saturate'?: 饱和度,默认100(%)\n * \n * 'hue-rotate'?: 色相旋转,默认0(deg)\n * \n * 'opacity'?: 不透明度,默认100(%)\n */\nexport type ImageElementFilterKeys = 'blur' | 'brightness' | 'contrast' | 'grayscale' | 'saturate' | 'hue-rotate' | 'opacity'\nexport interface ImageElementFilters {\n 'blur'?: string\n 'brightness'?: string\n 'contrast'?: string\n 'grayscale'?: string\n 'saturate'?: string\n 'hue-rotate'?: string\n 'opacity'?: string\n}\n\nexport type ImageClipDataRange = [[number, number], [number, number]]\n\n/**\n * 图片裁剪\n * \n * range: 裁剪范围,例如:[[10, 10], [90, 90]] 表示裁取原图从左上角 10%, 10% 到 90%, 90% 的范围\n * \n * shape: 裁剪形状,见 configs/imageClip.ts CLIPPATHS \n */\nexport interface ImageElementClip {\n range: ImageClipDataRange\n shape: string\n}\n\n/**\n * 图片元素\n * \n * type: 元素类型(image)\n * \n * fixedRatio: 固定图片宽高比例\n * \n * src: 图片地址\n * \n * outline?: 边框\n * \n * filters?: 图片滤镜\n * \n * clip?: 裁剪信息\n * \n * flipH?: 水平翻转\n * \n * flipV?: 垂直翻转\n * \n * shadow?: 阴影\n */\nexport interface PPTImageElement extends PPTBaseElement {\n type: 'image'\n fixedRatio: boolean\n src: string\n outline?: PPTElementOutline\n filters?: ImageElementFilters\n clip?: ImageElementClip\n flipH?: boolean\n flipV?: boolean\n shadow?: PPTElementShadow\n colorMask?: string\n}\n\n\n/**\n * 形状渐变\n * \n * type: 渐变类型(径向、线性)\n * \n * color: 渐变颜色\n * \n * rotate: 渐变角度(线性渐变)\n */\nexport interface ShapeGradient {\n type: 'linear' | 'radial'\n color: [string, string]\n rotate: number\n}\n\nexport type ShapeTextAlign = 'top' | 'middle' | 'bottom' \n\n/**\n * 形状内文本\n * \n * content: 文本内容(HTML字符串)\n * \n * defaultFontName: 默认字体(会被文本内容中的HTML内联样式覆盖)\n * \n * defaultColor: 默认颜色(会被文本内容中的HTML内联样式覆盖)\n * \n * align: 文本对齐方向(垂直方向)\n */\nexport interface ShapeText {\n content: string\n defaultFontName: string\n defaultColor: string\n align: ShapeTextAlign\n}\n\n/**\n * 形状元素\n * \n * type: 元素类型(shape)\n * \n * viewBox: SVG的viewBox属性,例如 [1000, 1000] 表示 '0 0 1000 1000'\n * \n * path: 形状路径,SVG path 的 d 属性\n * \n * fixedRatio: 固定形状宽高比例\n * \n * fill: 填充,不存在渐变时生效\n * \n * gradient?: 渐变,该属性存在时将优先作为填充\n * \n * outline?: 边框\n * \n * opacity?: 不透明度\n * \n * flipH?: 水平翻转\n * \n * flipV?: 垂直翻转\n * \n * shadow?: 阴影\n * \n * special?: 特殊形状(标记一些难以解析的形状,例如路径使用了 L Q C A 以外的类型,该类形状在导出后将变为图片的形式)\n * \n * text?: 形状内文本\n * \n * pathFormula?: 形状路径计算公式\n * 一般情况下,形状的大小变化时仅由宽高基于 viewBox 的缩放比例来调整形状,而 viewBox 本身和 path 不会变化,\n * 但也有一些形状希望能更精确的控制一些关键点的位置,此时就需要提供路径计算公式,通过在缩放时更新 viewBox 并重新计算 path 来重新绘制形状\n * \n * keypoint?: 关键点位置百分比\n */\nexport interface PPTShapeElement extends PPTBaseElement {\n type: 'shape'\n viewBox: [number, number]\n path: string\n fixedRatio: boolean\n fill: string\n gradient?: ShapeGradient\n outline?: PPTElementOutline\n opacity?: number\n flipH?: boolean\n flipV?: boolean\n shadow?: PPTElementShadow\n special?: boolean\n text?: ShapeText\n pathFormula?: ShapePathFormulasKeys\n keypoint?: number\n}\n\n\nexport type LinePoint = '' | 'arrow' | 'dot' \n\n/**\n * 线条元素\n * \n * type: 元素类型(line)\n * \n * start: 起点位置([x, y])\n * \n * end: 终点位置([x, y])\n * \n * style: 线条样式(实线、虚线)\n * \n * color: 线条颜色\n * \n * points: 端点样式([起点样式, 终点样式],可选:无、箭头、圆点)\n * \n * shadow?: 阴影\n * \n * broken?: 折线控制点位置([x, y])\n * \n * curve?: 二次曲线控制点位置([x, y])\n * \n * cubic?: 三次曲线控制点位置([[x1, y1], [x2, y2]])\n */\nexport interface PPTLineElement extends Omit {\n type: 'line'\n start: [number, number]\n end: [number, number]\n style: 'solid' | 'dashed'\n color: string\n points: [LinePoint, LinePoint]\n shadow?: PPTElementShadow\n broken?: [number, number]\n curve?: [number, number]\n cubic?: [[number, number], [number, number]]\n}\n\n\nexport type PresetChartType = 'bar' | 'horizontalBar' | 'line' | 'area' | 'scatter' | 'pie' | 'ring'\nexport type ChartType = 'bar' | 'line' | 'pie'\nexport type ChartOptions = LineChartOptions & BarChartOptions & PieChartOptions\nexport interface ChartData {\n labels: string[]\n legends: string[]\n series: number[][]\n}\n\n/**\n * 图表元素\n * \n * type: 元素类型(chart)\n * \n * fill?: 填充色\n * \n * chartType: 图表基础类型(bar/line/pie),所有图表类型都是由这三种基本类型衍生而来\n * \n * data: 图表数据\n * \n * options?: 图表配置项\n * \n * outline?: 边框\n * \n * themeColor: 主题色\n * \n * gridColor?: 网格&坐标颜色\n * \n * legend?: 图例/位置\n */\nexport interface PPTChartElement extends PPTBaseElement {\n type: 'chart'\n fill?: string\n chartType: ChartType\n data: ChartData\n options?: ChartOptions\n outline?: PPTElementOutline\n themeColor: string[]\n gridColor?: string\n legend?: '' | 'top' | 'bottom'\n}\n\n\n/**\n * 表格单元格样式\n * \n * bold?: 加粗\n * \n * em?: 斜体\n * \n * underline?: 下划线\n * \n * strikethrough?: 删除线\n * \n * color?: 字体颜色\n * \n * backcolor?: 填充色\n * \n * fontsize?: 字体大小\n * \n * fontname?: 字体\n * \n * align?: 对齐方式\n */\nexport interface TableCellStyle {\n bold?: boolean\n em?: boolean\n underline?: boolean\n strikethrough?: boolean\n color?: string\n backcolor?: string\n fontsize?: string\n fontname?: string\n align?: 'left' | 'center' | 'right'\n}\n\n\n/**\n * 表格单元格\n * \n * id: 单元格ID\n * \n * colspan: 合并列数\n * \n * rowspan: 合并行数\n * \n * text: 文字内容\n * \n * style?: 单元格样式\n */\nexport interface TableCell {\n id: string\n colspan: number\n rowspan: number\n text: string\n style?: TableCellStyle\n}\n\n/**\n * 表格主题\n * \n * color: 主题色\n * \n * rowHeader: 标题行\n * \n * rowFooter: 汇总行\n * \n * colHeader: 第一列\n * \n * colFooter: 最后一列\n */\nexport interface TableTheme {\n color: string\n rowHeader: boolean\n rowFooter: boolean\n colHeader: boolean\n colFooter: boolean\n}\n\n/**\n * 表格元素\n * \n * type: 元素类型(table)\n * \n * outline: 边框\n * \n * theme?: 主题\n * \n * colWidths: 列宽数组,如[30, 50, 20]表示三列宽度分别为30%, 50%, 20%\n * \n * cellMinHeight: 单元格最小高度\n * \n * data: 表格数据\n */\nexport interface PPTTableElement extends PPTBaseElement {\n type: 'table'\n outline: PPTElementOutline\n theme?: TableTheme\n colWidths: number[]\n cellMinHeight: number\n data: TableCell[][]\n}\n\n\n/**\n * LaTeX元素(公式)\n * \n * type: 元素类型(latex)\n * \n * latex: latex代码\n * \n * path: svg path\n * \n * color: 颜色\n * \n * strokeWidth: 路径宽度\n * \n * viewBox: SVG的viewBox属性\n * \n * fixedRatio: 固定形状宽高比例\n */\nexport interface PPTLatexElement extends PPTBaseElement {\n type: 'latex'\n latex: string\n path: string\n color: string\n strokeWidth: number\n viewBox: [number, number]\n fixedRatio: boolean\n}\n\n/**\n * 视频元素\n * \n * type: 元素类型(video)\n * \n * src: 视频地址\n * \n * autoplay: 自动播放\n * \n * poster: 预览封面\n * \n * ext: 视频后缀,当资源链接缺少后缀时用该字段确认资源类型\n */\nexport interface PPTVideoElement extends PPTBaseElement {\n type: 'video'\n src: string\n autoplay: boolean\n poster?: string\n ext?: string\n}\n\n/**\n * 音频元素\n * \n * type: 元素类型(audio)\n * \n * fixedRatio: 固定图标宽高比例\n * \n * color: 图标颜色\n * \n * loop: 循环播放\n * \n * autoplay: 自动播放\n * \n * src: 音频地址\n * \n * ext: 音频后缀,当资源链接缺少后缀时用该字段确认资源类型\n */\nexport interface PPTAudioElement extends PPTBaseElement {\n type: 'audio'\n fixedRatio: boolean\n color: string\n loop: boolean\n autoplay: boolean\n src: string\n ext?: string\n}\n\n\nexport type PPTElement = PPTTextElement | PPTImageElement | PPTShapeElement | PPTLineElement | PPTChartElement | PPTTableElement | PPTLatexElement | PPTVideoElement | PPTAudioElement\n\n\n/**\n * 元素动画\n * \n * id: 动画id\n * \n * elId: 元素ID\n * \n * effect: 动画效果\n * \n * type: 动画类型(入场、退场、强调)\n * \n * duration: 动画持续时间\n * \n * trigger: 动画触发方式(click - 单击时、meantime - 与上一动画同时、auto - 上一动画之后)\n */\nexport interface PPTAnimation {\n id: string\n elId: string\n effect: string\n type: 'in' | 'out' | 'attention'\n duration: number\n trigger: 'click' | 'meantime' | 'auto'\n}\n\n/**\n * 幻灯片背景\n * \n * type: 背景类型(纯色、图片、渐变)\n * \n * color?: 背景颜色(纯色)\n * \n * image?: 图片地址(图片)\n * \n * imageSize?: 图片填充方式\n * \n * gradientType?: 渐变类型(线性、径向)\n * \n * gradientColor?: 渐变颜色\n * \n * gradientRotate?: 渐变角度(线性)\n */\nexport interface SlideBackground {\n type: 'solid' | 'image' | 'gradient'\n color?: string\n image?: string\n imageSize?: 'cover' | 'contain' | 'repeat'\n gradientType?: 'linear' | 'radial'\n gradientColor?: [string, string]\n gradientRotate?: number\n}\n\n\nexport type TurningMode = 'no' | 'fade' | 'slideX' | 'slideY' | 'random' | 'slideX3D' | 'slideY3D' | 'rotate' | 'scaleY' | 'scaleX' | 'scale' | 'scaleReverse'\n\n/**\n * 幻灯片页面\n * \n * id: 页面ID\n * \n * elements: 元素集合\n * \n * remark?: 备注\n * \n * background?: 页面背景\n * \n * animations?: 元素动画集合\n * \n * turningMode?: 翻页方式\n */\nexport interface Slide {\n id: string\n elements: PPTElement[]\n remark?: string\n background?: SlideBackground\n animations?: PPTAnimation[]\n turningMode?: TurningMode\n}\n\n/**\n * 幻灯片主题\n * \n * backgroundColor: 页面背景颜色\n * \n * themeColor: 主题色,用于默认创建的形状颜色等\n * \n * fontColor: 字体颜色\n * \n * fontName: 字体\n */\nexport interface SlideTheme {\n backgroundColor: string\n themeColor: string\n fontColor: string\n fontName: string\n outline: PPTElementOutline\n shadow: PPTElementShadow\n}\n","/* eslint-disable max-lines */\n\n// 非专业设计人士可以用该应用绘制基本形状:https://github.com/pipipi-pikachu/svgPathCreator\n\nimport { ShapePathFormulasKeys } from '@/types/slides'\n\nexport interface ShapePoolItem {\n viewBox: [number, number]\n path: string\n special?: boolean\n pathFormula?: ShapePathFormulasKeys\n outlined?: boolean\n pptxShapeType?: string\n title?: string\n}\n\ninterface ShapeListItem {\n type: string\n children: ShapePoolItem[]\n}\n\nexport const SHAPE_PATH_FORMULAS = {\n [ShapePathFormulasKeys.ROUND_RECT]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M ${radius} 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height - radius} Q ${width} ${height} ${width - radius} ${height} L ${radius} ${height} Q 0 ${height} 0 ${height - radius} L 0 ${radius} Q 0 0 ${radius} 0 Z`\n }\n },\n [ShapePathFormulasKeys.CUT_RECT_DIAGONAL]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${height - radius} L 0 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} L ${radius} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.CUT_RECT_SINGLE]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${height} L 0 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.CUT_RECT_SAMESIDE]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${radius} L ${radius} 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_RECT_DIAGONAL]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 1],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M ${radius} 0 L ${width} 0 L ${width} ${height - radius} Q ${width} ${height} ${width - radius} ${height} L 0 ${height} L 0 ${radius} Q 0 0 ${radius} 0 Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_RECT_SINGLE]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 1],\n relative: 'right',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height} L 0 ${height} L 0 0 Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_RECT_SAMESIDE]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${radius} Q 0 0 ${radius} 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.CUT_ROUND_RECT]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M ${radius} 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} L 0 ${height} L 0 ${radius} Q 0 0 ${radius} 0 Z`\n }\n },\n [ShapePathFormulasKeys.MESSAGE]: {\n formula: (width: number, height: number) => {\n const arrowWidth = width * 0.2\n const arrowheight = height * 0.2\n return `M 0 0 L ${width} 0 L ${width} ${height - arrowheight} L ${width / 2} ${height - arrowheight} L ${width / 2 - arrowWidth} ${height} L ${width / 2 - arrowWidth} ${height - arrowheight} L 0 ${height - arrowheight} Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_MESSAGE]: {\n formula: (width: number, height: number) => {\n const radius = Math.min(width, height) * 0.125\n const arrowWidth = width * 0.2\n const arrowheight = height * 0.2\n return `M 0 ${radius} Q 0 0 ${radius} 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height - radius - arrowheight} Q ${width} ${height - arrowheight} ${width - radius} ${height - arrowheight} L ${width / 2} ${height - arrowheight} L ${width / 2 - arrowWidth} ${height} L ${width / 2 - arrowWidth} ${height - arrowheight} L ${radius} ${height - arrowheight} Q 0 ${height - arrowheight} 0 ${height - radius - arrowheight} L 0 ${radius} Z`\n }\n },\n [ShapePathFormulasKeys.L]: {\n editable: true,\n defaultValue: 0.25,\n range: [0.1, 0.9],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const lineWidth = Math.min(width, height) * value\n return `M 0 0 L 0 ${height} L ${width} ${height} L ${width} ${height - lineWidth} L ${lineWidth} ${height - lineWidth} L ${lineWidth} 0 Z`\n }\n },\n [ShapePathFormulasKeys.RING_RECT]: {\n editable: true,\n defaultValue: 0.25,\n range: [0.1, 0.45],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const lineWidth = Math.min(width, height) * value\n return `M 0 0 ${width} 0 ${width} ${height} L 0 ${height} L 0 0 Z M ${lineWidth} ${lineWidth} L ${lineWidth} ${height - lineWidth} L ${width - lineWidth} ${height - lineWidth} L ${width - lineWidth} ${lineWidth} Z`\n }\n },\n [ShapePathFormulasKeys.PLUS]: {\n editable: true,\n defaultValue: 0.25,\n range: [0.1, 0.9],\n relative: 'center',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const lineWidth = Math.min(width, height) * value\n return `M ${width / 2 - lineWidth / 2} 0 L ${width / 2 - lineWidth / 2} ${height / 2 - lineWidth / 2} L 0 ${height / 2 - lineWidth / 2} L 0 ${height / 2 + lineWidth / 2} L ${width / 2 - lineWidth / 2} ${height / 2 + lineWidth / 2} L ${width / 2 - lineWidth / 2} ${height} L ${width / 2 + lineWidth / 2} ${height} L ${width / 2 + lineWidth / 2} ${height / 2 + lineWidth / 2} L ${width} ${height / 2 + lineWidth / 2} L ${width} ${height / 2 - lineWidth / 2} L ${width / 2 + lineWidth / 2} ${height / 2 - lineWidth / 2} L ${width / 2 + lineWidth / 2} 0 Z`\n }\n },\n [ShapePathFormulasKeys.TRIANGLE]: {\n editable: true,\n defaultValue: 0.5,\n range: [0, 1],\n relative: 'left',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const vertex = width * value\n return `M ${vertex} 0 L 0 ${height} L ${width} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.PARALLELOGRAM_LEFT]: {\n editable: true,\n defaultValue: 0.25,\n range: [0, 0.9],\n relative: 'left',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M ${point} 0 L ${width} 0 L ${width - point} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.PARALLELOGRAM_RIGHT]: {\n editable: true,\n defaultValue: 0.25,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M 0 0 L ${width - point} 0 L ${width} ${height} L ${point} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.TRAPEZOID]: {\n editable: true,\n defaultValue: 0.25,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M ${point} 0 L ${width - point} 0 L ${width} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.BULLET]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 1],\n relative: 'top',\n getBaseSize: (width: number, height: number) => height,\n formula: (width: number, height: number, value: number) => {\n const point = height * value\n return `M ${width / 2} 0 L 0 ${point} L 0 ${height} L ${width} ${height} L ${width} ${point} Z`\n }\n },\n [ShapePathFormulasKeys.INDICATOR]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M ${width} ${height / 2} L ${width - point} 0 L 0 0 L ${point} ${height / 2} L 0 ${height} L ${width - point} ${height} Z`\n }\n },\n}\n\nexport const SHAPE_LIST: ShapeListItem[] = [\n {\n type: '矩形',\n children: [\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n pptxShapeType: 'rect',\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 Q 200 0 200 50 L 200 150 Q 200 200 150 200 L 50 200 Q 0 200 0 150 L 0 50 Q 0 0 50 0 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT,\n pptxShapeType: 'roundRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z',\n pathFormula: ShapePathFormulasKeys.CUT_RECT_SINGLE,\n pptxShapeType: 'snip1Rect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z',\n pathFormula: ShapePathFormulasKeys.CUT_RECT_SAMESIDE,\n pptxShapeType: 'snip2SameRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z',\n pathFormula: ShapePathFormulasKeys.CUT_RECT_DIAGONAL,\n pptxShapeType: 'snip2DiagRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Q 0 0 50 0 Z',\n pathFormula: ShapePathFormulasKeys.CUT_ROUND_RECT,\n pptxShapeType: 'snipRoundRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 0 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT_SINGLE,\n pptxShapeType: 'round1Rect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT_SAMESIDE,\n pptxShapeType: 'round2SameRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 200 0 L 200 150 Q 200 200 150 200 L 0 200 L 0 50 Q 0 0 50 0 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT_DIAGONAL,\n pptxShapeType: 'round2DiagRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 80 L 60 0 L 100 40 L 180 20 L 200 120 L 160 200 L 0 200 L 60 140 Z',\n title: '任意多边形',\n },\n ]\n },\n\n {\n type: '常用形状',\n children: [\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n pptxShapeType: 'ellipse',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 200 L 200 200 L 100 0 Z',\n pathFormula: ShapePathFormulasKeys.TRIANGLE,\n pptxShapeType: 'triangle',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 70 20 L 0 160 Q 0 200 40 200 L 160 200 Q 200 200 200 160 L 130 20 Q 100 -20 70 20 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z',\n pathFormula: ShapePathFormulasKeys.PARALLELOGRAM_LEFT,\n pptxShapeType: 'parallelogram',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z',\n pathFormula: ShapePathFormulasKeys.PARALLELOGRAM_RIGHT,\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z',\n pathFormula: ShapePathFormulasKeys.TRAPEZOID,\n pptxShapeType: 'trapezoid',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z',\n pptxShapeType: 'diamond',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z',\n pathFormula: ShapePathFormulasKeys.BULLET,\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z',\n pathFormula: ShapePathFormulasKeys.INDICATOR,\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 C 80 20 120 20 200 0 C 180 80 180 120 200 200 C 80 180 120 180 0 200 C 20 120 20 80 0 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 10 10 C 60 0 140 0 190 10 C 200 60 200 140 190 190 C 140 200 60 200 10 190 C 0 140 0 60 10 10 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 40 20 A 100 100 0 1 0 200 100 L 100 100 L 40 20 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z',\n pptxShapeType: 'pie',\n },\n {\n viewBox: [200, 200],\n path: 'M 160 20 A 100 100 0 1 0 200 100 L 100 100 L 160 20 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z',\n pptxShapeType: 'chord',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z',\n pptxShapeType: 'teardrop',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 90 L 50 200 L 150 200 L 200 90 L 100 0 Z',\n pptxShapeType: 'pentagon',\n },\n {\n viewBox: [200, 200],\n path: 'M 40 0 L 160 0 L 200 100 L 160 200 L 40 200 L 0 100 Z',\n pptxShapeType: 'hexagon',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z',\n pptxShapeType: 'octagon',\n },\n {\n viewBox: [200, 200],\n path: 'M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 A 25 50 0 1 0 50 200 L 150 200 A 25 50 0 1 0 150 0 L 50 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z',\n pathFormula: ShapePathFormulasKeys.L\n },\n {\n viewBox: [200, 200],\n path: 'M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z',\n pathFormula: ShapePathFormulasKeys.RING_RECT,\n },\n {\n viewBox: [200, 200],\n path: 'M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z',\n pathFormula: ShapePathFormulasKeys.PLUS,\n },\n {\n viewBox: [200, 200],\n path: 'M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 Z',\n pathFormula: ShapePathFormulasKeys.MESSAGE,\n },\n {\n viewBox: [200, 200],\n path: 'M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_MESSAGE,\n },\n {\n viewBox: [200, 200],\n path: 'M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 Q 0 50 0 175 Q 100 225 200 175 Q 200 50 100 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 A 50 50 0 1 1 200 100 L 100 200 L 0 100 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 120 80 L 200 100 L 120 120 L 100 200 L 80 120 L 0 100 L 80 80 L 100 0 Z',\n pptxShapeType: 'star4',\n },\n {\n viewBox: [1024, 1024],\n path: 'M1018.67652554 400.05983681l-382.95318779-5.89158658L512 34.78141155 388.27666225 394.16825023l-382.95318779 5.89158658L311.68602415 629.83174977l-117.83174978 365.27842665 312.25413766-223.88032637 312.25413904 223.88032637-117.83175116-365.27842665 318.14572563-229.77191296z',\n pptxShapeType: 'star5',\n special: true,\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 60 60 L 0 100 L 60 140 L 100 200 L 140 140 L 200 100 L 140 60 L 100 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 140 60 L 200 60 L 160 100 L 200 140 L 140 140 L 100 200 L 60 140 L 0 140 L 40 100 L 0 60 L 60 60 L 100 0 Z',\n pptxShapeType: 'star6',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 80 40 L 20 20 L 40 80 L 0 100 L 40 120 L 20 180 L 80 160 L 100 200 L 120 160 L 180 180 L 160 120 L 200 100 L 160 80 L 180 20 L 120 40 L 100 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 C 80 40 80 160 200 200 C -60 200 -60 0 200 0 Z',\n },\n ],\n },\n \n {\n type: '箭头',\n children: [\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 100 L 50 100 L 50 200 L 150 200 L 150 100 L 200 100 L 100 0 Z',\n pptxShapeType: 'upArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 200 L 200 100 L 150 100 L 150 0 L 50 0 L 50 100 L 0 100 L 100 200 Z',\n pptxShapeType: 'downArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 100 0 L 100 50 L 200 50 L 200 150 L 100 150 L 100 200 L 0 100 Z',\n pptxShapeType: 'leftArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 100 0 L 100 50 L 0 50 L 0 150 L 100 150 L 100 200 L 200 100 Z',\n pptxShapeType: 'rightArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 60 L 60 60 L 60 140 L 0 140 L 100 200 L 200 140 L 140 140 L 140 60 L 200 60 L 100 0 Z',\n pptxShapeType: 'upDownArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 60 0 L 60 60 L 140 60 L 140 0 L 200 100 L 140 200 L 140 140 L 60 140 L 60 200 L 0 100 Z',\n pptxShapeType: 'leftRightArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 60 40 L 80 40 L 80 80 L 40 80 L 40 60 L 0 100 L 40 140 L 40 120 L 80 120 L 80 160 L 60 160 L 100 200 L 140 160 L 120 160 L 120 120 L 160 120 L 160 140 L 200 100 L 160 60 L 160 80 L 120 80 L 120 40 L 140 40 L 100 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 100 0 L 100 50 L 200 50 L 150 100 L 200 150 L 100 150 L 100 200 L 0 100 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 100 0 L 100 50 L 0 50 L 50 100 L 0 150 L 100 150 L 100 200 L 200 100 Z',\n pptxShapeType: 'notchedRightArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 80 20 L 80 80 L 120 80 L 120 0 L 200 0 L 200 200 L 120 200 L 120 120 L 80 120 L 80 180 L 0 100 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 120 20 L 120 80 L 80 80 L 80 0 L 0 0 L 0 200 L 80 200 L 80 120 L 120 120 L 120 180 L 200 100 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 120 0 L 200 100 L 120 200 L 0 200 L 80 100 L 0 0 Z',\n pptxShapeType: 'chevron',\n },\n {\n viewBox: [200, 200],\n path: 'M 80 0 L 200 0 L 120 100 L 200 200 L 80 200 L 0 100 L 80 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 140 0 L 200 100 L 140 200 L 0 200 L 0 100 L 0 0 Z',\n pptxShapeType: 'homePlate',\n },\n {\n viewBox: [200, 200],\n path: 'M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 100 L 0 200 L 60 100 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 0 100 L 200 200 L 140 100 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 80 0 L 200 100 L 80 200 L 0 200 L 120 100 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 120 0 L 0 100 L 120 200 L 200 200 L 80 100 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 L 180 200 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 160 L 0 160 L 0 200 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 L 0 20 L 160 20 L 160 0 L 200 40 L 160 80 L 160 60 L 40 60 L 40 200 L 0 200 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 40 180 L 180 180 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 140 L 40 140 L 40 120 L 0 160 L 40 200 L 40 180 Z'\n },\n {\n viewBox: [1024, 1024],\n path: 'M398.208 302.912V64L0 482.112l398.208 418.176V655.36c284.48 0 483.584 95.552 625.792 304.64-56.896-298.688-227.584-597.312-625.792-657.088z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M625.792 302.912V64L1024 482.112l-398.208 418.176V655.36C341.312 655.36 142.208 750.912 0 960c56.896-298.688 227.584-597.312 625.792-657.088z',\n special: true,\n },\n ],\n },\n\n {\n type: '其他形状',\n children: [\n {\n viewBox: [1024, 1024],\n path: 'M995.336 243.4016c-15.7584-36.5736-38.3376-69.26639999-66.91440001-97.37280001-28.5768-27.98879999-61.73999999-49.8624-98.78399999-65.26799998-38.22-15.876-78.6744-23.8728-120.4224-23.87280001-57.97680001 0-114.5424 15.876-163.69919999 45.864-11.76 7.17360001-22.932 15.05279999-33.51600001 23.63760001-10.584-8.5848-21.75600001-16.46400001-33.51600001-23.63760001-49.1568-29.98799999-105.7224-45.86399999-163.69919999-45.864-41.74799999 0-82.2024 7.9968-120.4224 23.87280001-36.9264 15.28799999-70.2072 37.27919999-98.78399999 65.26799998-28.6944 28.10640001-51.156 60.79919999-66.91440001 97.37280001-16.34639999 37.9848-24.696 78.3216-24.696 119.83439999 0 39.1608 7.9968 79.96800001 23.8728 121.48080001 13.28880001 34.692 32.34000001 70.67760001 56.6832 107.016 38.57279999 57.5064 91.61040001 117.4824 157.4664 178.28160001 109.1328 100.78319999 217.2072 170.4024 221.79359999 173.22479998l27.87120001 17.8752c12.348 7.8792 28.224 7.8792 40.572 0l27.87119999-17.8752c4.58639999-2.94 112.54319999-72.44159999 221.79360001-173.22479998 65.85599999-60.79919999 118.89359999-120.7752 157.4664-178.28160001 24.3432-36.33839999 43.512-72.324 56.68319999-107.016 15.876-41.5128 23.8728-82.32 23.87280001-121.48080001 0.1176-41.5128-8.232-81.8496-24.5784-119.83439999z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M985.20746667 343.50079998l-303.32586667-44.08319999L546.28693333 24.5248c-3.70346666-7.5264-9.79626667-13.6192-17.32266665-17.32266668-18.87573334-9.3184-41.81333333-1.55306667-51.25120001 17.32266668L342.1184 299.41759999l-303.32586667 44.08319999c-8.36266667 1.19466667-16.00853333 5.13706667-21.8624 11.11040001-14.69440001 15.17226667-14.45546667 39.30453334 0.71679999 54.1184l219.46026668 213.9648-51.84853333 302.1312c-1.43359999 8.24320001-0.11946667 16.8448 3.82293333 24.25173333 9.79626667 18.6368 32.9728 25.92426667 51.6096 16.00853334L512 822.44266665l271.3088 142.64320001c7.40693333 3.9424 16.00853333 5.25653333 24.25173333 3.82293333 20.78719999-3.584 34.7648-23.296 31.1808-44.0832l-51.84853333-302.1312 219.46026668-213.9648c5.97333334-5.85386666 9.91573333-13.49973334 11.11039999-21.8624 3.2256-20.90666667-11.34933333-40.26026667-32.256-43.36640001z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M852.65066667 405.84533333C800.54044445 268.40177778 667.76177778 170.66666667 512.22755555 170.66666667S223.91466667 268.288 171.80444445 405.73155555C74.29688889 431.33155555 2.27555555 520.07822222 2.27555555 625.77777778c0 125.72444445 101.83111111 227.55555555 227.44177778 227.55555555h564.56533334C919.89333333 853.33333333 1021.72444445 751.50222222 1021.72444445 625.77777778c0-105.472-71.79377778-194.21866667-169.07377778-219.93244445z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M926.25224691 323.7371485H654.6457886L898.88200917 15.14388241c5.05486373-6.53433603 0.49315743-16.02761669-7.76722963-16.02761668H418.30008701c-3.45210206 0-6.78091476 1.84934039-8.50696579 4.93157436L90.35039154 555.76772251c-3.82197013 6.53433603 0.86302552 14.7947231 8.50696578 14.79472311h215.01664245l-110.22068713 440.88274851c-2.34249783 9.61657002 9.24670194 16.39748478 16.39748477 9.49328065L933.03316167 340.62779071c6.41104668-6.0411786 2.09591911-16.8906422-6.78091476-16.89064221z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M878.47822222 463.30311111c-22.18666667-49.83466667-53.93066667-93.98044445-94.32177777-131.072l-33.10933334-30.37866666c-4.89244445-4.32355555-12.62933333-2.38933333-14.79111111 3.75466666l-14.79111111 42.43911111c-9.216 26.624-26.16888889 53.81688889-50.176 80.55466667-1.59288889 1.70666667-3.41333333 2.16177778-4.66488889 2.27555556-1.25155555 0.11377778-3.18577778-0.11377778-4.89244445-1.70666667-1.59288889-1.36533333-2.38933333-3.41333333-2.27555555-5.46133333 4.20977778-68.49422222-16.27022222-145.74933333-61.09866667-229.83111112C561.26577778 124.01777778 509.72444445 69.51822222 445.32622222 31.51644445l-46.99022222-27.648c-6.144-3.64088889-13.99466667 1.13777778-13.65333333 8.30577777l2.50311111 54.61333333c1.70666667 37.31911111-2.61688889 70.31466667-12.85688889 97.73511112-12.51555555 33.56444445-30.49244445 64.73955555-53.47555556 92.72888888-16.15644445 19.56977778-34.24711111 37.20533333-54.04444444 52.45155556-47.90044445 36.75022222-87.38133333 84.65066667-114.11911111 138.24C125.72444445 502.10133333 111.50222222 562.74488889 111.50222222 623.50222222c0 53.70311111 10.58133333 105.69955555 31.51644445 154.73777778 20.25244445 47.21777778 49.152 89.77066667 85.90222222 126.17955555 36.864 36.40888889 79.64444445 65.08088889 127.31733333 84.992C405.61777778 1010.11911111 457.95555555 1020.58666667 512 1020.58666667s106.38222222-10.46755555 155.76177778-31.06133334c47.67288889-19.91111111 90.56711111-48.46933333 127.31733333-84.992 36.864-36.40888889 65.76355555-78.96177778 85.90222222-126.17955555 20.93511111-49.03822222 31.51644445-101.03466667 31.51644445-154.73777778 0-55.52355555-11.37777778-109.45422222-34.01955556-160.31288889z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M968.20337778 20.11591112H705.44042667c-22.17301333 0-41.92483556 15.16430222-47.14951111 37.33731555C642.36202666 124.73685332 582.08711111 173.03324444 512 173.03324444s-130.36202666-48.29639112-146.29091556-115.58001777c-5.22467555-22.17301333-24.84906667-37.33731556-47.14951111-37.33731555H55.79662222c-30.96576 0-56.06968889 25.10392889-56.06968888 56.06968888v321.12639999c0 30.96576 25.10392889 56.06968889 56.06968888 56.06968889h95.57333334v494.43271112c0 30.96576 25.10392889 56.06968889 56.06968889 56.06968888h609.1207111c30.96576 0 56.06968889-25.10392889 56.06968889-56.06968888V453.38168888h95.57333334c30.96576 0 56.06968889-25.10392889 56.06968888-56.06968889V76.1856c0-30.96576-25.10392889-56.06968889-56.06968888-56.06968888z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.94648889 239.80714666H523.46880001L373.99210666 96.82944c-1.91146667-1.78403556-4.46008889-2.80348444-7.00871111-2.80348445H43.05351111c-22.55530667 0-40.77795555 18.22264888-40.77795555 40.77795557v754.39217776c0 22.55530667 18.22264888 40.77795555 40.77795555 40.77795557h937.89297778c22.55530667 0 40.77795555-18.22264888 40.77795555-40.77795557V280.58510222c0-22.55530667-18.22264888-40.77795555-40.77795555-40.77795556z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M972.60904597 164.57058577L841.30587843 33.39070759c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480282-29.3428675-26.75379095 0-51.90482023 10.47959553-70.76809219 29.3428675L558.60337778 174.68031322c-18.86327195 18.86327195-29.34286748 44.1375906-29.34286749 70.64480283 0 26.75379095 10.47959553 51.90482023 29.34286749 70.76809218l103.31648301 103.31648302c-24.28800376 53.50758189-57.69942011 101.59043198-99.24793416 143.13894603-41.42522469 41.67180341-89.63136414 75.08321976-143.13894603 99.61780223L316.21649759 558.84995649c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480283-29.34286747-26.75379095 0-51.90482023 10.47959553-70.76809217 29.34286747L33.39070759 700.01627278c-18.86327195 18.86327195-29.34286748 44.1375906-29.3428675 70.76809217 0 26.75379095 10.47959553 51.90482023 29.3428675 70.76809219l131.05658883 131.05658883c30.08260365 30.205893 71.63111769 47.34311394 114.28923598 47.34311394 9.00012323 0 17.63037836-0.73973616 26.13734414-2.21920846 166.19405621-27.37023774 331.03192945-115.76870829 464.06114804-248.67463751C901.84095379 636.27567408 990.11613498 471.56109018 1017.85624079 304.87387654c8.38367642-50.91850535-8.50696579-103.31648302-45.24719482-140.30329077z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M910.60451556 640.96028445c-20.38897778-65.49959112-43.83630221-120.54983112-79.89930667-210.64362666C836.31217778 193.67708444 737.93535999 2.27555556 511.36284444 2.27555556 282.24170667 2.27555556 186.03121778 197.50001778 192.14791111 430.31665779c-36.19043555 90.22122667-59.51032888 144.88917333-79.89930667 210.64362666-43.32657778 139.53706668-29.30915556 197.26336001-18.60494222 198.53767111 22.9376 2.80348444 89.32920888-105.00323556 89.32920889-105.00323556 0 62.44124445 32.11264001 143.86972444 101.69002667 202.61546667-33.64181333 10.32192-109.20846222 38.10190221-91.24067556 68.55793777 14.52714667 24.59420444 250.01984 15.67402668 317.94062222 8.02816 67.92078222 7.64586667 303.41347556 16.56604444 317.94062223-8.02816 17.96778667-30.32860444-57.72629333-58.23601779-91.24067555-68.55793777 69.57738667-58.87317334 101.69002667-140.30165333 101.69002667-202.61546667 0 0 66.39160889 107.80672 89.32920888 105.00323556 10.83164445-1.40174222 24.84906667-59.12803556-18.47751111-198.53767111z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1016.86992592 199.24764445c-37.13706667 16.01991111-77.55093333 27.54939259-119.17842962 32.03982222 42.96248889-25.60758518 75.60912592-66.02145185 91.02222222-114.08118519-39.68568889 23.66577778-84.58998518 41.02068148-131.31472593 50.00154074C819.53374815 126.79395555 765.76995555 101.79318518 706.18074075 101.79318518c-114.688 0-206.92385185 92.96402963-206.92385186 207.04521482 0 16.01991111 1.94180741 32.03982222 5.09724444 47.45291852-171.72859259-8.98085925-324.88865185-91.02222222-426.71217778-216.63288889-17.96171852 30.82619259-28.15620741 66.02145185-28.1562074 104.49351112 0 71.84687408 36.53025185 135.19834075 92.23585185 172.45677036-33.98162963-1.33499259-66.02145185-10.92266667-93.57084445-26.33576296v2.54862222c0 100.6098963 71.1186963 183.98625185 165.90317037 203.1616-17.3549037 4.49042963-35.92343703 7.03905185-54.49197037 7.03905185-13.47128889 0-26.2144-1.33499259-39.07887407-3.15543704C146.69748148 681.90814815 223.03478518 741.49736297 313.93564445 743.43917037c-71.1186963 55.7056-160.19911111 88.4736-256.9253926 88.4736-17.3549037 0-33.37481482-0.60681482-50.00154074-2.54862222C98.75911111 888.22518518 207.62168889 922.20681482 324.85831111 922.20681482 705.45256297 922.20681482 913.71140741 606.90583703 913.71140741 333.23235555c0-8.98085925 0-17.96171852-0.60681482-26.94257777 40.2925037-29.4912 75.60912592-66.02145185 103.76533333-107.04213333z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M917.96720197 1.08889505H106.03279803C53.56084718 1.08889505 9.37393998 45.27580225 9.37393998 97.74775309v5.52336372c0 19.33177108 8.28504494 41.42522469 22.0934536 55.23363205l331.40179753 392.15879462v325.87843379c0 16.57008987 8.28504494 30.37849854 22.09345359 35.90186098l209.88780469 104.94390299 2.76168121 2.76168121c27.61681602 11.04672615 55.23363335-8.28504494 55.23363335-38.66354218V550.66354348l331.40179753-392.15879462c35.90186097-41.42522469 30.37849854-102.18222047-11.04672616-135.32240022-11.04672615-13.80840865-33.14017975-22.0934536-55.23363335-22.09345359z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M491.70164031 97.48884502a25.89076502 25.89076502 0 0 1 40.59671938 0L745.66415762 367.01171317a25.89076502 25.89076502 0 0 0 30.49932208 7.72839349l208.00640948-89.14190458a25.89076502 25.89076502 0 0 1 35.56096592 29.06238339l-115.18801541 554.96855704A103.56306132 103.56306132 0 0 1 803.14165689 952.14301275H220.85834311a103.56306132 103.56306132 0 0 1-101.4011828-82.51387024l-115.18801541-554.96855704a25.89076502 25.89076502 0 0 1 35.54802012-29.06238339l208.01935528 89.14190458a25.89076502 25.89076502 0 0 0 30.49932208-7.72839349l213.36579793-269.52286815z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M643.02466884 387.7801525c19.85376751-88.69205333 33.718272-152.84087467 41.61900049-192.57389433C704.52292267 95.17283515 652.90057916 2.27555515 550.58614084 2.27555515c-92.26012484 0-138.59407685 45.84971417-165.91530666 137.49816969l-0.70087152 2.67605334c-16.40038399 74.13942085-41.47882668 131.61085116-74.6746315 172.73287031a189.06953915 189.06953915 0 0 1-143.04142182 70.44391902l-26.17434983 0.5606965C77.66380049 387.52529067 27.76177817 438.90551468 27.76177817 501.84374084V881.55022182c0 77.4144 62.25009818 140.17422182 139.05282766 140.17422303h492.82707951c101.23127467 0 191.59267516-63.995904 225.93535999-159.98976l102.37815468-286.22301868c26.04691951-72.82688-11.39234134-153.15945284-83.63303784-179.42300483a138.04612267 138.04612267 0 0 0-47.17499733-8.30850884H643.02466884z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 512c140.82958222 0 254.86222222-114.03264 254.86222222-254.86222222S652.82958222 2.27555555 512 2.27555555a254.78940445 254.78940445 0 0 0-254.86222222 254.86222223C257.13777778 397.96736 371.17041778 512 512 512z m0 72.81777778c-170.10232889 0-509.72444445 97.57582222-509.72444445 291.27111111v145.63555556h1019.4488889v-145.63555556c0-193.69528889-339.62211555-291.27111111-509.72444445-291.27111111z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1019.81297778 564.50161779l-138.89991111-472.51456c-8.66531556-25.99594668-29.43658667-43.45400889-57.21656889-43.45400891s-50.33528889 15.67402668-59.00060446 41.66997334l-92.00526221 274.48661334H351.69166222L259.6864 90.33045333c-8.66531556-25.99594668-31.22062222-41.66997333-59.00060444-41.66997332s-50.33528889 17.33063112-57.2165689 43.45400887L4.69674667 564.50161779c-5.22467555 17.33063112 1.78403556 36.44529778 15.67402667 46.89464887l491.11950221 368.27591113 492.77610666-368.27591113c13.76256-10.32192 20.77127111-29.43658667 15.54659557-46.89464887z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M927.78951111 340.39277037c-12.01493333-47.81700741 12.01493333-124.03294815 89.08041481-150.97552592l-82.40545184-4.36906667s-31.19028148-109.22666667-174.27721483-118.9357037c-143.08693333-9.8304-236.65777778-3.64088889-236.65777777-3.6408889s106.07122963 67.47780741 63.5941926 187.74850371c-31.06891852 63.71555555-79.85682963 116.02299259-132.04290371 175.61220741-1.57771852 1.57771852-3.03407408 3.15543703-4.2477037 4.49042962C278.25493333 624.86755555 7.13007408 934.34311111 7.13007408 934.34311111c298.43152592 78.15774815 498.43768889-7.64586667 616.76657777-110.56165926 24.87940741-0.24272592 43.5693037-0.36408889 56.19105185-0.36408888 164.8109037 0 304.13558518-142.72284445 298.43152593-301.4656-3.88361482-109.1053037-38.71478518-133.74198518-50.72971852-181.5589926z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M997.8886764 504.17210418L537.2729208 43.89182982c-13.97838539-13.97838539-36.56745619-13.97838539-50.5458416 0L26.1113236 504.17210418c-13.41924998 13.41924998-21.02349164 31.64706454-21.02349163 50.65766867 0 39.47496036 32.09437288 71.56933323 71.56933324 71.56933323h48.53295408V954.83524937c0 19.79339373 15.99127289 35.78466661 35.78466663 35.78466662H440.43066677V740.12724968h125.24633315v250.49266631h297.34821416c19.79339373 0 35.78466661-15.99127289 35.78466663-35.78466662V626.39910608h48.53295408c19.01060414 0 37.23841869-7.49241457 50.65766869-21.02349163 27.84494371-27.95677079 27.84494371-73.24673948-0.11182708-101.20351027z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1009.13013121 349.27572283L674.72427717 14.86986879c-8.82158299-8.82158299-20.35749924-13.16451618-31.89341544-13.16451618s-23.07183245 4.34293316-31.89341547 13.16451618L392.29790453 233.6451272c-16.5574327-1.90003326-33.25058207-2.71433322-49.94373146-2.71433324-99.34459624 0-198.68919249 32.70771543-280.25490606 98.12314628-20.90036589 16.69314938-22.52896582 48.04369819-3.66434987 67.04403081l246.59717401 246.59717401-292.33368895 292.06225564c-3.52863319 3.52863319-5.83581644 8.27871636-6.24296642 13.30023282l-4.61436649 50.48659809c-1.22144996 12.75736619 8.95729967 23.6146991 21.57894918 23.6146991 0.6785833 0 1.35716662 0 2.03574992-0.13571666l50.48659809-4.61436649c5.02151649-0.40714999 9.77159962-2.71433322 13.30023282-6.24296643l292.33368896-292.33368896 246.59717402 246.59717401c8.82158299 8.82158299 20.35749924 13.16451618 31.89341544 13.16451618 13.16451618 0 26.19331567-5.70009979 35.15061536-16.82886604 76.40848044-95.40881307 108.16617924-214.83947521 95.27309638-330.33435417l218.63954175-218.63954173c17.50744934-17.37173267 17.50744934-45.8722316 0-63.51539759z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M976.62005979 160.47737905c-0.39452595-0.39452595-80.35178503 78.64217259-239.47725131 237.50462156l-111.6508437-111.65084369 237.89914752-237.89914752c-125.19623464-75.35445635-286.03131335-56.02268482-390.31767264 48.26367449-81.92988882 81.92988882-112.57140424 200.15616502-83.37648398 310.09739626l2.36715569 8.81107954-372.82702222 372.69551356c-8.15353628 8.15353628-8.15353628 21.56741857 0 29.72095487l185.95323084 185.95323084c8.15353628 8.15353628 21.56741857 8.15353628 29.72095485 0l372.56400493-372.56400493 8.81107953 2.3671557c110.07273989 29.32642892 228.29901608-1.18357785 310.36041356-83.24497533 104.41786795-104.2863593 123.74963948-265.12143802 49.97328693-390.05465535z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m220.16 343.26755556l-239.616 332.23111111c-14.44977778 20.13866667-44.37333333 20.13866667-58.82311111 0L291.84 481.16622222c-4.32355555-6.03022222 0-14.44977778 7.39555555-14.44977777h53.36177778c11.60533333 0 22.64177778 5.57511111 29.46844445 15.13244444l81.00977777 112.41244444 178.85866667-248.03555555c6.82666667-9.44355555 17.74933333-15.13244445 29.46844445-15.13244445H724.76444445c7.39555555 0 11.71911111 8.41955555 7.39555555 14.44977778z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h418.70222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m188.18844445 703.37422223l-75.09333334-0.34133333L512 570.48177778l-112.98133333 134.71288889-75.20711112 0.34133333c-5.00622222 0-9.10222222-3.98222222-9.10222222-9.10222222 0-2.16177778 0.79644445-4.20977778 2.16177778-5.91644445l148.02488889-176.35555555L316.87111111 337.92c-1.36533333-1.70666667-2.16177778-3.75466667-2.16177778-5.91644445 0-5.00622222 4.096-9.10222222 9.10222222-9.10222222l75.20711112 0.34133334L512 458.06933333l112.98133333-134.71288888 75.09333334-0.34133334c5.00622222 0 9.10222222 3.98222222 9.10222222 9.10222222 0 2.16177778-0.79644445 4.20977778-2.16177778 5.91644445L559.21777778 514.27555555l147.91111111 176.35555556c1.36533333 1.70666667 2.16177778 3.75466667 2.16177778 5.91644444 0 5.00622222-4.096 9.10222222-9.10222222 9.10222223z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H548.40888889v172.94222222c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222h-54.61333334c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V548.40888889H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h172.94222222V302.64888889c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h54.61333334c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v172.94222222h172.94222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m163.95377778 517.57511112L427.46311111 700.64355555c-1.59288889 1.13777778-3.41333333 1.70666667-5.34755556 1.70666667-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V331.88977778c0-1.93422222 0.56888889-3.75466667 1.70666667-5.34755556 2.95822222-4.096 8.64711111-5.00622222 12.74311111-2.048L675.95377778 505.17333333c0.79644445 0.56888889 1.47911111 1.25155555 2.048 2.048 2.95822222 3.98222222 2.048 9.67111111-2.048 12.62933334z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m200.81777778 666.39644445l-32.54044445 44.37333333c-2.95822222 4.096-8.64711111 4.89244445-12.74311111 1.93422222L479.34577778 577.76355555c-2.38933333-1.70666667-3.75466667-4.43733333-3.75466667-7.39555555V257.13777778c0-5.00622222 4.096-9.10222222 9.10222222-9.10222223h54.72711112c5.00622222 0 9.10222222 4.096 9.10222222 9.10222223v281.6l162.24711111 117.30488889c4.096 2.84444445 5.00622222 8.53333333 2.048 12.62933333z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M981.10577778 314.48177778c-25.6-61.09866667-62.464-115.93955555-109.34044445-163.04355556-46.87644445-46.99022222-101.60355555-83.968-162.70222222-109.568C646.59911111 15.58755555 580.38044445 2.27555555 512 2.27555555h-2.27555555c-68.83555555 0.34133333-135.39555555 13.99466667-198.08711112 40.84622223-60.52977778 25.94133333-114.80177778 62.80533333-161.22311111 109.79555555-46.42133333 46.99022222-82.83022222 101.60355555-108.08888889 162.47466667C16.27022222 378.42488889 3.072 445.44 3.41333333 514.38933333c0.34133333 78.96177778 19.22844445 157.35466667 54.49955556 227.44177778v172.94222222c0 28.89955555 23.43822222 52.33777778 52.224 52.33777778h172.71466666c69.97333333 35.38488889 148.13866667 54.272 226.98666667 54.61333334h2.38933333c68.03911111 0 133.91644445-13.19822222 196.03911112-39.02577778 60.75733333-25.37244445 115.37066667-61.78133333 162.13333333-108.31644445 46.87644445-46.53511111 83.74044445-100.92088889 109.568-161.56444444 26.73777778-62.80533333 40.39111111-129.59288889 40.73244445-198.54222223 0.22755555-69.29066667-13.19822222-136.53333333-39.59466667-199.79377777zM284.89955555 566.61333333c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955556 54.61333333-24.34844445 54.61333333-54.49955556 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955556-54.61333333s24.46222222-54.61333333 54.49955556-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM745.4750693 325.8561164l-267.95558363 371.52436096c-16.15876501 22.52048353-49.62140436 22.52048353-65.78016939 0L253.07805667 477.51948567c-4.83490607-6.74342161 0-16.15876501 8.27023406-16.15876499h59.67291961c12.97790576 0 25.31963967 6.23448413 32.95370188 16.92217123l90.59087157 125.70755774 200.01242995-277.37092701c7.63406221-10.56045272 19.84856175-16.92217125 32.95370189-16.92217124H737.20483524c8.27023407 0 13.10514012 9.41534338 8.27023406 16.158765z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h468.2224823c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM720.79160148 697.63494611c5.59831228 6.61618726 0.8906406 16.6677025-7.76129658 16.66770249h-74.94104404c-5.98001539 0-11.70556205-2.67192177-15.64982754-7.25235911L512 575.36271635l-110.43943332 131.68757314c-3.81703111 4.58043732-9.54257777 7.25235911-15.64982754 7.25235911H310.9696951c-8.65193717 0-13.35960887-10.05151525-7.76129658-16.66770249L458.81603326 512 303.20839852 326.36505389c-5.59831228-6.61618726-0.8906406-16.6677025 7.76129658-16.66770249h74.94104404c5.98001539 0 11.70556205 2.67192177 15.64982754 7.25235911L512 448.63728365l110.43943332-131.68757314c3.81703111-4.58043732 9.54257777-7.25235911 15.64982754-7.25235911H713.0303049c8.65193717 0 13.35960887 10.05151525 7.76129658 16.66770249L565.18396674 512l155.60763474 185.63494611z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM677.02297814 523.19662459L423.31764398 722.70011704c-9.41534338 7.37959347-23.28388974 0.76340622-23.28388975-11.19662459V312.62374191c0-11.9600308 13.86854636-18.70345241 23.28388975-11.19662457l253.70533416 199.37625807c7.25235911 5.72554666 7.25235911 16.6677025 0 22.39324918z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H552.71499847v193.39624268c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962h-61.0724977c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962V552.71499847H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h193.39624268V277.88875885c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h61.0724977c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v193.39624268h193.39624268c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M902.67315697 135.41705551L528.62204754 7.94466448C524.10877635 6.40354749 518.05438818 5.63298899 512 5.63298899s-12.10877635 0.7705585-16.62204754 2.31167549L121.32684303 135.41705551c-9.13662215 3.08223399-16.62204754 13.64989334-16.62204753 23.33691443v531.02488283c0 9.68702108 6.27454775 22.45627614 13.87005291 28.51066431L498.0198673 1013.9638196c3.85279247 2.9721542 8.8063828 4.51327118 13.87005291 4.51327118s10.12734022-1.54111698 13.87005291-4.51327118l379.4450189-295.67430252c7.59550517-5.94430839 13.87005291-18.71356345 13.87005291-28.51066431V158.75396994c0.22015956-9.68702108-7.26526581-20.14460066-16.40188796-23.33691443zM712.89560763 323.43332829L478.86598471 645.63685899c-7.04510625 9.68702108-21.57563786 9.68702108-28.6207441 0l-139.14084824-191.5388259c-4.18303182-5.8342286 0-13.9801327 7.15518603-13.9801327h60.76404132c5.61406904 0 11.0079785 2.75199463 14.31037204 7.26526582l71.22162091 97.97100864 166.11039557-228.74579323c3.30239355-4.51327118 8.58622323-7.26526581 14.31037204-7.26526581H705.7404216c7.15518602 0.11007979 11.33821785 8.25598388 7.15518603 14.09021248z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M959.86498307 186.28001231H797.00498922v-101.78749614c0-44.91373267-36.51626425-81.42999692-81.42999691-81.42999693H308.42500769c-44.91373267 0-81.42999692 36.51626425-81.42999691 81.42999693v101.78749614H64.13501693c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499847v40.71499845c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874962h76.8495596l31.42688945 665.43575611c2.03574992 43.38692024 37.91584233 77.61296581 81.30276254 77.6129658h577.64404066c43.5141546 0 79.26701262-34.09881122 81.30276254-77.6129658l31.42688945-665.43575611H990.40123192c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874962v-40.71499845c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499847z m-254.46874039 0H318.60375732v-91.60874653h386.79248536v91.60874653z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 248.62485371H654.50249462V104.85001539c0-22.52048353-18.19451494-40.71499847-40.71499847-40.71499846H94.67126578v-50.89374808c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-71.25124732c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v997.5174623c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h71.25124732c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961V674.85999383h315.54123807v143.77483833c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h529.29497999c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V289.33985217c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M804.63905145 265.16532183V94.67126578h109.42155836c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961H109.93939019c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h109.42155836v170.49405605c0 103.6960117 53.94737296 194.92305513 135.3773699 246.83467817-81.42999692 51.91162303-135.37736988 143.13866646-135.3773699 246.83467817v170.49405605h-109.42155836c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h804.12121962c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-109.42155836V758.83467817c0-103.6960117-53.94737296-194.92305513-135.3773699-246.83467817 81.42999692-51.91162303 135.37736988-143.13866646 135.3773699-246.83467817z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1020.928 448.44373333l-35.36213334-373.4528c-1.79200001-19.3536-17.2032-34.64533332-36.55679999-36.55679999L575.55626667 3.072h-0.47786666c-3.82293334 0-6.8096 1.19466667-9.07946669 3.46453333L6.53653333 565.99893332c-4.65919999 4.65919999-4.65919999 12.1856 0 16.84480001l434.61973334 434.61973334c2.26986667 2.26986667 5.25653333 3.46453333 8.48213333 3.46453333s6.21226667-1.19466667 8.48213333-3.46453333l559.46239999-559.46239999c2.38933332-2.5088 3.584-5.97333334 3.34506668-9.55733335zM735.40266668 362.66666667c-42.17173333 0-76.45866667-34.28693333-76.45866667-76.45866667s34.28693333-76.45866667 76.45866667-76.45866667 76.45866667 34.28693333 76.45866665 76.45866667-34.28693333 76.45866667-76.45866665 76.45866667z',\n special: true,\n },\n ],\n },\n\n {\n type: '线性',\n children: [\n {\n viewBox: [1024, 1024],\n path: 'M1009.55537674 75.96950982l-61.38012212-61.38012214c-4.48769762-4.48769762-11.870684-4.48769762-16.3583816 0L14.44462326 931.67210859c-4.48769762 4.48769762-4.48769762 11.870684 0 16.35838159l61.38012212 61.38012214c4.48769762 4.48769762 11.870684 4.48769762 16.3583816 0L1009.41061232 92.18312698c4.63246205-4.34293316 4.63246205-11.72591956 0.14476442-16.21361716zM210.88996692 419.35075905c114.94296453 0 208.46079213-93.51782759 208.46079213-208.46079213s-93.51782759-208.46079213-208.46079213-208.4607921-208.46079213 93.51782759-208.4607921 208.4607921 93.51782759 208.46079213 208.4607921 208.46079213z m0-312.69118816c57.47148228 0 104.23039605 46.75891379 104.23039607 104.23039603s-46.75891379 104.23039605-104.23039607 104.23039607-104.23039605-46.75891379-104.23039603-104.23039607 46.75891379-104.23039605 104.23039603-104.23039603zM813.11003308 604.64924095c-114.94296453 0-208.46079213 93.51782759-208.46079213 208.46079213s93.51782759 208.46079213 208.46079213 208.4607921 208.46079213-93.51782759 208.4607921-208.4607921-93.51782759-208.46079213-208.4607921-208.46079213z m0 312.69118816c-57.47148228 0-104.23039605-46.75891379-104.23039607-104.23039603s46.75891379-104.23039605 104.23039607-104.23039607 104.23039605 46.75891379 104.23039603 104.23039607-46.75891379 104.23039605-104.23039603 104.23039603z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1004.96017383 478.58365209L483.27851088 25.80594621c-4.00443838-3.45210207-9.11354943-5.3852792-14.49882864-5.38527921h-122.20441284c-10.21822208 0-14.91308089 12.70373557-7.18037228 19.33177152l483.57045622 419.77561022H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672657v82.85044938c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672657h807.92996557L339.25681303 984.24756148c-7.7327086 6.76612003-3.0378498 19.33177153 7.18037229 19.33177152h126.34693531c2.62359757 0 5.24719513-0.96658859 7.18037228-2.76168164L1004.96017383 545.41634791c20.2983601-17.67476253 20.2983601-49.1579333 0-66.83269582z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1011.38217956 558.9924242L545.80649025 22.43713295c-17.81503843-20.62055629-49.79794206-20.62055629-67.75325638 0L12.61782044 558.9924242c-6.31241519 7.29434645-1.12220714 18.51641789 8.41655359 18.51641789h113.62347344c6.45269109 0 12.62483038-2.80551785 16.97338308-7.71517411L458.69516062 215.87758959V1005.77114384c0 6.1721393 5.04993216 11.22207145 11.22207144 11.22207145h84.16553588c6.1721393 0 11.22207145-5.04993216 11.22207144-11.22207145V215.87758959l307.06393007 353.91607839c4.20827679 4.90965626 10.38041608 7.71517413 16.97338308 7.71517411h113.62347344c9.53876074 0 14.72896878-11.22207145 8.41655359-18.51641789z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1009.1026963 459.52804874H201.17273073l483.57045624-419.77561022c7.7327086-6.76612003 3.0378498-19.33177153-7.18037229-19.33177152h-122.20441283c-5.3852792 0-10.49439025 1.93317715-14.49882866 5.38527921L19.03982617 478.58365209c-20.2983601 17.67476253-20.2983601 49.1579333 0 66.69461175L543.89742302 1000.81765136c2.07126124 1.79509307 4.55677472 2.76168163 7.18037228 2.76168164h126.3469353c10.21822208 0 14.91308089-12.70373557 7.18037228-19.33177152L201.17273073 564.47195126H1009.1026963c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672657v-82.85044938c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672657z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1002.96562597 446.49115791h-113.62347344c-6.45269109 0-12.62483038 2.80551785-16.97338308 7.71517411L565.30483938 808.12241041V18.22885616c0-6.1721393-5.04993216-11.22207145-11.22207144-11.22207145h-84.16553588c-6.1721393 0-11.22207145 5.04993216-11.22207144 11.22207145v789.89355425L151.63123055 454.20633202c-4.20827679-4.90965626-10.38041608-7.71517413-16.97338308-7.71517411h-113.62347344c-9.53876074 0-14.72896878 11.36234735-8.41655359 18.51641789L478.19350975 1001.56286705c17.81503843 20.62055629 49.79794206 20.62055629 67.75325638 0L1011.38217956 465.0075758c6.31241519-7.29434645 1.12220714-18.51641789-8.41655359-18.51641789z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M975.82443246 622.46726585H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672658v82.85044937c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672659h835.6848661L651.32683905 980.10503902c-5.66144737 7.18037229-0.55233633 17.9509307 8.69929718 17.9509307h100.11095967c6.76612003 0 13.11798782-3.0378498 17.39859437-8.42312903l233.08593092-295.63802022c22.78387358-28.99765728 2.20934532-71.52755463-34.79718873-71.52755462zM1009.1026963 296.58883161H173.4178302l199.25533075-252.69387063c5.66144737-7.18037229 0.55233633-17.9509307-8.69929718-17.9509307h-100.11095967c-6.76612003 0-13.11798782 3.0378498-17.39859437 8.42312903L13.37837881 330.00517953c-22.78387358 28.99765728-2.20934532 71.52755463 34.65910466 71.52755462h961.06521283c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672658v-82.85044937c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1010.75873115 64.13501693H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874964h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874964v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961zM1010.75873115 858.07748691H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874964v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874964zM1010.75873115 461.10625194H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874959v81.42999694c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874959h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874959v-81.42999694c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874959z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M591.98717801 512l405.34042913-483.16579151c6.79427767-8.02960089 1.08090782-20.22841761-9.41933951-20.2284176h-123.22349044c-7.25752386 0-14.20621693 3.24272343-18.99309439 8.80167789L511.38233839 415.95362022 177.07299399 17.40746878c-4.63246205-5.55895447-11.58115512-8.80167789-18.99309439-8.80167789H34.85640916c-10.50024731 0-16.21361717 12.19881672-9.41933952 20.2284176L430.77749876 512 25.43706964 995.16579151c-6.79427767 8.02960089-1.08090782 20.22841761 9.41933952 20.2284176h123.22349044c7.25752386 0 14.20621693-3.24272343 18.99309439-8.80167789l334.3093444-398.54615144 334.30934441 398.54615144c4.63246205 5.55895447 11.58115512 8.80167789 18.99309439 8.80167789h123.22349044c10.50024731 0 16.21361717-12.19881672 9.41933951-20.2284176L591.98717801 512z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M953.5488 832.61667556c-24.08448-57.08913778-58.74574221-108.31644445-102.70947556-152.28017777-43.96373333-43.96373333-95.19104-78.49756444-152.28017777-102.70947558-0.50972445-0.25486222-1.01944888-0.38229333-1.52917334-0.63715555C776.41955556 519.64586667 828.02915556 426.23886221 828.02915556 320.85333332c0-174.58062221-141.44853334-316.02915556-316.02915556-316.02915554S195.97084444 146.27271111 195.97084444 320.85333332c0 105.38552889 51.6096 198.79253333 130.99918223 256.26396447-0.50972445 0.25486222-1.01944888 0.38229333-1.52917334 0.63715555-57.08913778 24.08448-108.31644445 58.61831112-152.28017777 102.70947554-43.96373333 43.96373333-78.49756444 95.19104-102.70947556 152.28017779C46.74901333 888.55893332 34.13333334 947.8144 32.85902222 1008.72647111c-0.12743111 5.7344 4.46008889 10.44935111 10.19448889 10.44935111h76.45866667c5.60696888 0 10.06705778-4.46008889 10.19448889-9.93962666 2.54862221-98.37681778 42.05226667-190.50951112 111.88451555-260.34176001 72.25344-72.25344 168.20906666-112.01194667 270.40881778-112.01194667s198.15537778 39.75850667 270.40881778 112.01194667C852.24106667 818.72668444 891.74471111 910.85937779 894.29333333 1009.23619556c0.12743111 5.60696888 4.58752 9.93962667 10.19448889 9.93962666h76.45866667c5.7344 0 10.32192-4.71495112 10.19448889-10.44935111-1.27431111-60.91207112-13.88999112-120.16753779-37.59217778-176.10979555zM512 540.03484444c-58.49088 0-113.54112-22.81016889-154.95623111-64.22527999S292.81848888 379.34421333 292.81848888 320.85333332c0-58.49088 22.81016889-113.54112 64.22528001-154.9562311S453.50912 101.67182221 512 101.67182221s113.54112 22.81016889 154.95623111 64.22528001S731.18151112 262.36245333 731.18151112 320.85333332c0 58.49088-22.81016889 113.54112-64.22528001 154.95623113S570.49088 540.03484444 512 540.03484444z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M985.31555555 111.50222222H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888889v728.17777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h946.6311111c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V147.91111111c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888889z m-45.5111111 126.06577778V830.57777778H84.19555555V237.568l-31.40266666-24.46222222 44.71466666-57.45777778 48.6968889 37.888h731.70488888l48.69688889-37.888 44.71466667 57.45777778-31.51644444 24.46222222z M877.90933333 193.42222222L512 477.86666667 146.09066667 193.42222222l-48.69688889-37.888-44.71466667 57.45777778 31.40266667 24.46222222 388.66488889 302.19377778c22.98311111 17.86311111 55.18222222 17.86311111 78.16533333 0L939.80444445 237.568l31.40266666-24.46222222-44.71466666-57.45777778-48.58311112 37.77422222z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M985.31555555 88.74666667H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888888v564.33777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h432.35555555v127.43111111H275.34222222c-10.01244445 0-18.20444445 8.192-18.20444444 18.20444445v54.61333333c0 5.00622222 4.096 9.10222222 9.10222222 9.10222222h491.52c5.00622222 0 9.10222222-4.096 9.10222222-9.10222222v-54.61333333c0-10.01244445-8.192-18.20444445-18.20444444-18.20444445H552.96V725.90222222h432.35555555c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V125.15555555c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888888z m-45.5111111 555.23555555H84.19555555V170.66666667h855.6088889v473.31555555z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m0 932.97777778c-233.69955555 0-423.25333333-189.55377778-423.25333333-423.25333333 0-101.26222222 35.61244445-194.33244445 95.00444444-267.15022222l595.39911111 595.39911111C706.33244445 899.64088889 613.26222222 935.25333333 512 935.25333333z m328.24888889-156.10311111L244.84977778 183.75111111C317.66755555 124.35911111 410.73777778 88.74666667 512 88.74666667c233.69955555 0 423.25333333 189.55377778 423.25333333 423.25333333 0 101.26222222-35.61244445 194.33244445-95.00444444 267.15022222z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M901.80266667 257.82044445L656.95288889 12.97066667c-6.82666667-6.82666667-16.04266667-10.69511111-25.71377778-10.69511112H147.91111111c-20.13866667 0-36.40888889 16.27022222-36.40888889 36.4088889v946.6311111c0 20.13866667 16.27022222 36.40888889 36.40888889 36.4088889h728.17777778c20.13866667 0 36.40888889-16.27022222 36.40888889-36.4088889V283.648c0-9.67111111-3.86844445-19.00088889-10.69511111-25.82755555zM828.52977778 300.37333333H614.4V86.24355555L828.52977778 300.37333333z m2.048 639.43111112H193.42222222V84.19555555h343.60888889v245.76c0 26.39644445 21.39022222 47.78666667 47.78666667 47.78666667h245.76v562.06222223z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M981.07392 55.79662222H42.92608c-31.22062222 0-50.71758221 34.02410666-35.04355556 61.16693334L304.28728889 620.82616888V927.42542221c0 22.55530667 18.09521779 40.77795555 40.52309333 40.77795557h334.37923556c22.42787556 0 40.52309333-18.22264888 40.52309333-40.77795557V620.82616888L1016.24490667 116.96355556c15.54659555-27.14282666-3.95036444-61.16693333-35.17098667-61.16693334zM628.47203556 876.45297779H395.52796444V677.66044445h233.07150222v198.79253334z m12.23338666-301.50200891l-12.10595556 21.15356445h-233.19893332l-12.10595556-21.15356445L130.59868445 147.54702221h762.8026311L640.70542222 574.95096888z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.62285431 4.54099753H654.39920987c-4.2719763 0-7.76722963 3.49525333-7.76722962 7.76722964v72.4941432c0 4.2719763 3.49525333 7.76722963 7.76722962 7.76722963h207.64393877L604.04167111 350.57107753c-64.72691358-49.83972347-143.69374815-76.7661195-226.67365136-76.7661195-99.54999309 0-193.27456395 38.83614815-263.5679921 109.25903012S4.54099753 547.08198717 4.54099753 646.63198025s38.83614815 193.27456395 109.25903012 263.5679921C184.09345581 980.62285431 277.81802667 1019.45900247 377.36801975 1019.45900247s193.27456395-38.83614815 263.5679921-109.25903012C711.35889383 839.90654419 750.19504197 746.18197333 750.19504197 646.63198025c0-82.9799032-26.92639605-161.68783013-76.63666567-226.41474372L931.4304 162.34521283V369.60079013c0 4.2719763 3.49525333 7.76722963 7.76722963 7.76722962h72.4941432c4.2719763 0 7.76722963-3.49525333 7.76722964-7.76722962V43.37714569c0-21.35988148-17.47626667-38.83614815-38.83614816-38.83614816zM377.36801975 921.07409383c-151.33152395 0-274.44211358-123.11058963-274.44211358-274.44211358s123.11058963-274.44211358 274.44211358-274.44211358 274.44211358 123.11058963 274.44211358 274.44211358-123.11058963 274.44211358-274.44211358 274.44211358z',\n special: true,\n outlined: true,\n },\n ],\n }\n]","import type { ChartType } from '@/types/slides'\n\ninterface ChartTypes {\n [propName: string]: ChartType\n}\n\nexport const CHART_TYPES: ChartTypes = {\n bar: 'bar',\n horizontalBar: 'bar',\n line: 'line',\n area: 'line',\n scatter: 'line',\n pie: 'pie',\n ring: 'pie',\n}","import { debounce, throttle} from 'lodash'\nimport { useSnapshotStore } from '@/store'\n\nexport default () => {\n const snapshotStore = useSnapshotStore()\n\n // 添加历史快照(历史记录)\n const addHistorySnapshot = debounce(function() {\n snapshotStore.addSnapshot()\n }, 300, { trailing: true })\n\n // 重做\n const redo = throttle(function() {\n snapshotStore.reDo()\n }, 100, { leading: true, trailing: false })\n\n // 撤销\n const undo = throttle(function() {\n snapshotStore.unDo()\n }, 100, { leading: true, trailing: false })\n\n return {\n addHistorySnapshot,\n redo,\n undo,\n }\n}","import { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport { getImageSize } from '@/utils/image'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport type { PPTLineElement, PPTElement, TableCell, TableCellStyle, PPTShapeElement, PPTChartElement, ChartOptions, PresetChartType } from '@/types/slides'\nimport { type ShapePoolItem, SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport type { LinePoolItem } from '@/configs/lines'\nimport { CHART_TYPES } from '@/configs/chartTypes'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\ninterface CommonElementPosition {\n top: number\n left: number\n width: number\n height: number\n}\n\ninterface LineElementPosition {\n top: number\n left: number\n start: [number, number]\n end: [number, number]\n}\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { creatingElement } = storeToRefs(mainStore)\n const { theme, viewportRatio } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 创建(插入)一个元素并将其设置为被选中元素\n const createElement = (element: PPTElement, callback?: () => void) => {\n slidesStore.addElement(element)\n mainStore.setActiveElementIdList([element.id])\n\n if (creatingElement.value) mainStore.setCreatingElement(null)\n\n setTimeout(() => {\n mainStore.setEditorareaFocus(true)\n }, 0)\n\n if (callback) callback()\n\n addHistorySnapshot()\n }\n\n /**\n * 创建图片元素\n * @param src 图片地址\n */\n const createImageElement = (src: string) => {\n getImageSize(src).then(({ width, height }) => {\n const scale = height / width\n \n if (scale < viewportRatio.value && width > VIEWPORT_SIZE) {\n width = VIEWPORT_SIZE\n height = width * scale\n }\n else if (height > VIEWPORT_SIZE * viewportRatio.value) {\n height = VIEWPORT_SIZE * viewportRatio.value\n width = height / scale\n }\n\n createElement({\n type: 'image',\n id: nanoid(10),\n src,\n width,\n height,\n left: (VIEWPORT_SIZE - width) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - height) / 2,\n fixedRatio: true,\n rotate: 0,\n })\n })\n }\n \n /**\n * 创建图表元素\n * @param chartType 图表类型\n */\n const createChartElement = (type: PresetChartType) => {\n const newElement: PPTChartElement = {\n type: 'chart',\n id: nanoid(10),\n chartType: CHART_TYPES[type],\n left: 300,\n top: 81.25,\n width: 400,\n height: 400,\n rotate: 0,\n themeColor: [theme.value.themeColor],\n gridColor: theme.value.fontColor,\n data: {\n labels: ['类别1', '类别2', '类别3', '类别4', '类别5'],\n legends: ['系列1'],\n series: [\n [12, 19, 5, 2, 18],\n ],\n },\n }\n\n const options: ChartOptions = {\n ...(type === 'bar' ? { horizontalBars: false, stackBars: false } : {}),\n ...(type === 'horizontalBar' ? { horizontalBars: true, stackBars: false } : {}),\n ...(type === 'line' ? { showLine: true, lineSmooth: true, showArea: false } : {}),\n ...(type === 'area' ? { showLine: true, lineSmooth: true, showArea: true } : {}),\n ...(type === 'scatter' ? { showLine: false, lineSmooth: true, showArea: false } : {}),\n ...(type === 'pie' ? { donut: false } : {}),\n ...(type === 'ring' ? { donut: true } : {}),\n }\n\n createElement({\n ...newElement,\n options,\n })\n }\n \n /**\n * 创建表格元素\n * @param row 行数\n * @param col 列数\n */\n const createTableElement = (row: number, col: number) => {\n const style: TableCellStyle = {\n fontname: theme.value.fontName,\n color: theme.value.fontColor,\n }\n const data: TableCell[][] = []\n for (let i = 0; i < row; i++) {\n const rowCells: TableCell[] = []\n for (let j = 0; j < col; j++) {\n rowCells.push({ id: nanoid(10), colspan: 1, rowspan: 1, text: '', style })\n }\n data.push(rowCells)\n }\n\n const DEFAULT_CELL_WIDTH = 100\n const DEFAULT_CELL_HEIGHT = 36\n\n const colWidths: number[] = new Array(col).fill(1 / col)\n\n const width = col * DEFAULT_CELL_WIDTH\n const height = row * DEFAULT_CELL_HEIGHT\n\n createElement({\n type: 'table',\n id: nanoid(10),\n width,\n height,\n colWidths,\n rotate: 0,\n data,\n left: (VIEWPORT_SIZE - width) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - height) / 2,\n outline: {\n width: 2,\n style: 'solid',\n color: '#eeece1',\n },\n theme: {\n color: theme.value.themeColor,\n rowHeader: true,\n rowFooter: false,\n colHeader: false,\n colFooter: false,\n },\n cellMinHeight: 36,\n })\n }\n \n /**\n * 创建文本元素\n * @param position 位置大小信息\n * @param content 文本内容\n */\n \n interface CreateTextData {\n content?: string\n vertical?: boolean\n }\n const createTextElement = (position: CommonElementPosition, data?: CreateTextData) => {\n const { left, top, width, height } = position\n const content = data?.content || ''\n const vertical = data?.vertical || false\n\n const id = nanoid(10)\n createElement({\n type: 'text',\n id,\n left, \n top, \n width, \n height,\n content,\n rotate: 0,\n defaultFontName: theme.value.fontName,\n defaultColor: theme.value.fontColor,\n vertical,\n }, () => {\n setTimeout(() => {\n const editorRef: HTMLElement | null = document.querySelector(`#editable-element-${id} .ProseMirror`)\n if (editorRef) editorRef.focus()\n }, 0)\n })\n }\n \n /**\n * 创建形状元素\n * @param position 位置大小信息\n * @param data 形状路径信息\n */\n const createShapeElement = (position: CommonElementPosition, data: ShapePoolItem, supplement: Partial = {}) => {\n const { left, top, width, height } = position\n const newElement: PPTShapeElement = {\n type: 'shape',\n id: nanoid(10),\n left, \n top, \n width, \n height,\n viewBox: data.viewBox,\n path: data.path,\n fill: theme.value.themeColor,\n fixedRatio: false,\n rotate: 0,\n ...supplement,\n }\n if (data.special) newElement.special = true\n if (data.pathFormula) {\n newElement.pathFormula = data.pathFormula\n newElement.viewBox = [width, height]\n\n const pathFormula = SHAPE_PATH_FORMULAS[data.pathFormula]\n if ('editable' in pathFormula) {\n newElement.path = pathFormula.formula(width, height, pathFormula.defaultValue)\n newElement.keypoint = pathFormula.defaultValue\n }\n else newElement.path = pathFormula.formula(width, height)\n }\n createElement(newElement)\n }\n \n /**\n * 创建线条元素\n * @param position 位置大小信息\n * @param data 线条的路径和样式\n */\n const createLineElement = (position: LineElementPosition, data: LinePoolItem) => {\n const { left, top, start, end } = position\n\n const newElement: PPTLineElement = {\n type: 'line',\n id: nanoid(10),\n left, \n top, \n start,\n end,\n points: data.points,\n color: theme.value.themeColor,\n style: data.style,\n width: 2,\n }\n if (data.isBroken) newElement.broken = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (data.isCurve) newElement.curve = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (data.isCubic) newElement.cubic = [[(start[0] + end[0]) / 2, (start[1] + end[1]) / 2], [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]]\n createElement(newElement)\n }\n \n /**\n * 创建LaTeX元素\n * @param svg SVG代码\n */\n const createLatexElement = (data: { path: string; latex: string; w: number; h: number; }) => {\n createElement({\n type: 'latex',\n id: nanoid(10),\n width: data.w,\n height: data.h,\n rotate: 0,\n left: (VIEWPORT_SIZE - data.w) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - data.h) / 2,\n path: data.path,\n latex: data.latex,\n color: theme.value.fontColor,\n strokeWidth: 2,\n viewBox: [data.w, data.h],\n fixedRatio: true,\n })\n }\n \n /**\n * 创建视频元素\n * @param src 视频地址\n */\n const createVideoElement = (src: string) => {\n createElement({\n type: 'video',\n id: nanoid(10),\n width: 500,\n height: 300,\n rotate: 0,\n left: (VIEWPORT_SIZE - 500) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - 300) / 2,\n src,\n autoplay: false,\n })\n }\n \n /**\n * 创建音频元素\n * @param src 音频地址\n */\n const createAudioElement = (src: string) => {\n createElement({\n type: 'audio',\n id: nanoid(10),\n width: 50,\n height: 50,\n rotate: 0,\n left: (VIEWPORT_SIZE - 50) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - 50) / 2,\n loop: false,\n autoplay: false,\n fixedRatio: true,\n color: theme.value.themeColor,\n src,\n })\n }\n\n return {\n createImageElement,\n createChartElement,\n createTableElement,\n createTextElement,\n createShapeElement,\n createLineElement,\n createLatexElement,\n createVideoElement,\n createAudioElement,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useSlidesStore, useMainStore } from '@/store'\nimport type { PPTElement, Slide } from '@/types/slides'\nimport { createSlideIdMap, createElementIdMap, getElementRange } from '@/utils/element'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { currentSlide, slides } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 添加指定的元素数据(一组)\n * @param elements 元素列表数据\n */\n const addElementsFromData = (elements: PPTElement[]) => {\n const { groupIdMap, elIdMap } = createElementIdMap(elements)\n\n const firstElement = elements[0]\n let offset = 0\n let lastSameElement: PPTElement | undefined\n \n do {\n lastSameElement = currentSlide.value.elements.find(el => {\n if (el.type !== firstElement.type) return false\n \n const { minX: oMinX, maxX: oMaxX, minY: oMinY, maxY: oMaxY } = getElementRange(el)\n const { minX: nMinX, maxX: nMaxX, minY: nMinY, maxY: nMaxY } = getElementRange({\n ...firstElement,\n left: firstElement.left + offset,\n top: firstElement.top + offset\n })\n if (\n oMinX === nMinX &&\n oMaxX === nMaxX &&\n oMinY === nMinY &&\n oMaxY === nMaxY\n ) return true\n \n return false\n })\n if (lastSameElement) offset += 10\n\n } while (lastSameElement)\n \n for (const element of elements) {\n element.id = elIdMap[element.id]\n\n element.left = element.left + offset\n element.top = element.top + offset\n\n if (element.groupId) element.groupId = groupIdMap[element.groupId]\n }\n slidesStore.addElement(elements)\n mainStore.setActiveElementIdList(Object.values(elIdMap))\n addHistorySnapshot()\n }\n\n /**\n * 添加指定的页面数据\n * @param slide 页面数据\n */\n const addSlidesFromData = (slides: Slide[]) => {\n const slideIdMap = createSlideIdMap(slides)\n const newSlides = slides.map(slide => {\n const { groupIdMap, elIdMap } = createElementIdMap(slide.elements)\n\n for (const element of slide.elements) {\n element.id = elIdMap[element.id]\n if (element.groupId) element.groupId = groupIdMap[element.groupId]\n\t\t\n // 若元素绑定了页面跳转链接\n if (element.link && element.link.type === 'slide') {\n\n // 待添加页面中包含该页面,则替换相关绑定关系\n if (slideIdMap[element.link.target]) {\n element.link.target = slideIdMap[element.link.target]\n }\n // 待添加页面中不包含该页面,则删除该元素绑定的页面跳转\n else delete element.link\n }\n }\n // 动画id替换\n if (slide.animations) {\n for (const animation of slide.animations) {\n animation.id = nanoid(10)\n animation.elId = elIdMap[animation.elId]\n }\n }\n return {\n ...slide,\n id: slideIdMap[slide.id],\n }\n })\n slidesStore.addSlide(newSlides)\n addHistorySnapshot()\n }\n\n const isEmptySlide = computed(() => {\n if (slides.value.length > 1) return false\n if (slides.value[0].elements.length > 0) return false\n return true\n })\n\n return {\n addElementsFromData,\n addSlidesFromData,\n isEmptySlide,\n }\n}","import { pasteCustomClipboardString } from '@/utils/clipboard'\nimport { parseText2Paragraphs } from '@/utils/textParser'\nimport useCreateElement from '@/hooks/useCreateElement'\nimport useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'\n\ninterface PasteTextClipboardDataOptions {\n onlySlide?: boolean\n onlyElements?: boolean\n}\n\nexport default () => {\n const { createTextElement } = useCreateElement()\n const { addElementsFromData, addSlidesFromData } = useAddSlidesOrElements()\n\n /**\n * 粘贴普通文本:创建为新的文本元素\n * @param text 文本\n */\n const createTextElementFromClipboard = (text: string) => {\n createTextElement({\n left: 0,\n top: 0,\n width: 600,\n height: 50,\n }, { content: text })\n }\n\n /**\n * 解析剪贴板内容,根据解析结果选择合适的粘贴方式\n * @param text 剪贴板内容\n * @param options 配置项:onlySlide -- 仅处理页面粘贴;onlyElements -- 仅处理元素粘贴;\n */\n const pasteTextClipboardData = (text: string, options?: PasteTextClipboardDataOptions) => {\n const onlySlide = options?.onlySlide || false\n const onlyElements = options?.onlyElements || false\n\n const clipboardData = pasteCustomClipboardString(text)\n\n // 元素或页面\n if (typeof clipboardData === 'object') {\n const { type, data } = clipboardData\n\n if (type === 'elements' && !onlySlide) addElementsFromData(data)\n else if (type === 'slides' && !onlyElements) addSlidesFromData(data)\n }\n\n // 普通文本\n else if (!onlyElements && !onlySlide) {\n const string = parseText2Paragraphs(clipboardData)\n createTextElementFromClipboard(string)\n }\n }\n\n return {\n pasteTextClipboardData,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { Slide } from '@/types/slides'\nimport { copyText, readClipboard } from '@/utils/clipboard'\nimport { encrypt } from '@/utils/crypto'\nimport { createElementIdMap } from '@/utils/element'\nimport { KEYS } from '@/configs/hotkey'\nimport message from '@/utils/message'\nimport usePasteTextClipboardData from '@/hooks/usePasteTextClipboardData'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport useAddSlidesOrElements from '@/hooks//useAddSlidesOrElements'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { selectedSlidesIndex: _selectedSlidesIndex, activeElementIdList } = storeToRefs(mainStore)\n const { currentSlide, slides, theme, slideIndex } = storeToRefs(slidesStore)\n\n const selectedSlidesIndex = computed(() => [..._selectedSlidesIndex.value, slideIndex.value])\n const selectedSlides = computed(() => slides.value.filter((item, index) => selectedSlidesIndex.value.includes(index)))\n const selectedSlidesId = computed(() => selectedSlides.value.map(item => item.id))\n\n const { pasteTextClipboardData } = usePasteTextClipboardData()\n const { addSlidesFromData } = useAddSlidesOrElements()\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 重置幻灯片\n const resetSlides = () => {\n const emptySlide: Slide = {\n id: nanoid(10),\n elements: [],\n background: {\n type: 'solid',\n color: theme.value.backgroundColor,\n },\n }\n slidesStore.updateSlideIndex(0)\n mainStore.setActiveElementIdList([])\n slidesStore.setSlides([emptySlide])\n }\n\n /**\n * 移动页面焦点\n * @param command 移动页面焦点命令:上移、下移\n */\n const updateSlideIndex = (command: string) => {\n if (command === KEYS.UP && slideIndex.value > 0) {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n slidesStore.updateSlideIndex(slideIndex.value - 1)\n }\n else if (command === KEYS.DOWN && slideIndex.value < slides.value.length - 1) {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n slidesStore.updateSlideIndex(slideIndex.value + 1)\n }\n }\n\n // 将当前页面数据加密后复制到剪贴板\n const copySlide = () => {\n const text = encrypt(JSON.stringify({\n type: 'slides',\n data: selectedSlides.value,\n }))\n\n copyText(text).then(() => {\n mainStore.setThumbnailsFocus(true)\n })\n }\n\n // 尝试将剪贴板页面数据解密后添加到下一页(粘贴)\n const pasteSlide = () => {\n readClipboard().then(text => {\n pasteTextClipboardData(text, { onlySlide: true })\n }).catch(err => message.warning(err))\n }\n\n // 创建一页空白页并添加到下一页\n const createSlide = () => {\n const emptySlide: Slide = {\n id: nanoid(10),\n elements: [],\n background: {\n type: 'solid',\n color: theme.value.backgroundColor,\n },\n }\n mainStore.setActiveElementIdList([])\n slidesStore.addSlide(emptySlide)\n addHistorySnapshot()\n }\n\n // 根据模板创建新页面\n const createSlideByTemplate = (slide: Slide) => {\n const { groupIdMap, elIdMap } = createElementIdMap(slide.elements)\n\n for (const element of slide.elements) {\n element.id = elIdMap[element.id]\n if (element.groupId) element.groupId = groupIdMap[element.groupId]\n }\n const newSlide = {\n ...slide,\n id: nanoid(10),\n }\n mainStore.setActiveElementIdList([])\n slidesStore.addSlide(newSlide)\n addHistorySnapshot()\n }\n\n // 将当前页复制一份到下一页\n const copyAndPasteSlide = () => {\n const slide = JSON.parse(JSON.stringify(currentSlide.value))\n addSlidesFromData([slide])\n }\n\n // 删除当前页,若将删除全部页面,则执行重置幻灯片操作\n const deleteSlide = (targetSlidesId = selectedSlidesId.value) => {\n if (slides.value.length === targetSlidesId.length) resetSlides()\n else slidesStore.deleteSlide(targetSlidesId)\n\n mainStore.updateSelectedSlidesIndex([])\n\n addHistorySnapshot()\n }\n\n // 将当前页复制后删除(剪切)\n // 由于复制操作会导致多选状态消失,所以需要提前将需要删除的页面ID进行缓存\n const cutSlide = () => {\n const targetSlidesId = [...selectedSlidesId.value]\n copySlide()\n deleteSlide(targetSlidesId)\n }\n\n // 选中全部幻灯片\n const selectAllSlide = () => {\n const newSelectedSlidesIndex = Array.from(Array(slides.value.length), (item, index) => index)\n mainStore.setActiveElementIdList([])\n mainStore.updateSelectedSlidesIndex(newSelectedSlidesIndex)\n }\n\n // 拖拽调整幻灯片顺序同步数据\n const sortSlides = (newIndex: number, oldIndex: number) => {\n if (oldIndex === newIndex) return\n \n const _slides = JSON.parse(JSON.stringify(slides.value))\n const _slide = _slides[oldIndex]\n _slides.splice(oldIndex, 1)\n _slides.splice(newIndex, 0, _slide)\n slidesStore.setSlides(_slides)\n slidesStore.updateSlideIndex(newIndex)\n }\n\n return {\n resetSlides,\n updateSlideIndex,\n copySlide,\n pasteSlide,\n createSlide,\n createSlideByTemplate,\n copyAndPasteSlide,\n deleteSlide,\n cutSlide,\n selectAllSlide,\n sortSlides,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 锁定选中的元素,并清空选中元素状态\n const lockElement = () => {\n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n \n for (const element of newElementList) {\n if (activeElementIdList.value.includes(element.id)) element.lock = true\n }\n slidesStore.updateSlide({ elements: newElementList })\n mainStore.setActiveElementIdList([])\n addHistorySnapshot()\n }\n\n /**\n * 解除元素的锁定状态,并将其设置为当前选择元素\n * @param handleElement 需要解锁的元素\n */\n const unlockElement = (handleElement: PPTElement) => {\n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n\n if (handleElement.groupId) {\n const groupElementIdList = []\n for (const element of newElementList) {\n if (element.groupId === handleElement.groupId) {\n element.lock = false\n groupElementIdList.push(element.id)\n }\n }\n slidesStore.updateSlide({ elements: newElementList })\n mainStore.setActiveElementIdList(groupElementIdList)\n }\n else {\n for (const element of newElementList) {\n if (element.id === handleElement.id) {\n element.lock = false\n break\n }\n }\n slidesStore.updateSlide({ elements: newElementList })\n mainStore.setActiveElementIdList([handleElement.id])\n }\n addHistorySnapshot()\n }\n\n return {\n lockElement,\n unlockElement,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeGroupElementId } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 删除全部选中元素\n // 组合元素成员中,存在被选中可独立操作的元素时,优先删除该元素。否则默认删除所有被选中的元素\n const deleteElement = () => {\n if (!activeElementIdList.value.length) return\n\n let newElementList: PPTElement[] = []\n if (activeGroupElementId.value) {\n newElementList = currentSlide.value.elements.filter(el => el.id !== activeGroupElementId.value)\n }\n else {\n newElementList = currentSlide.value.elements.filter(el => !activeElementIdList.value.includes(el.id))\n }\n\n mainStore.setActiveElementIdList([])\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n // 删除内面内全部元素(无论是否选中)\n const deleteAllElements = () => {\n if (!currentSlide.value.elements.length) return\n mainStore.setActiveElementIdList([])\n slidesStore.updateSlide({ elements: [] })\n addHistorySnapshot()\n }\n\n return {\n deleteElement,\n deleteAllElements,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeElementList, handleElementId } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 判断当前选中的元素是否可以组合\n */\n const canCombine = computed(() => {\n if (activeElementList.value.length < 2) return false\n\n const firstGroupId = activeElementList.value[0].groupId\n if (!firstGroupId) return true\n\n const inSameGroup = activeElementList.value.every(el => (el.groupId && el.groupId) === firstGroupId)\n return !inSameGroup\n })\n\n /**\n * 组合当前选中的元素:给当前选中的元素赋予一个相同的分组ID\n */\n const combineElements = () => {\n if (!activeElementList.value.length) return\n\n // 生成一个新元素列表进行后续操作\n let newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n\n // 生成分组ID\n const groupId = nanoid(10)\n\n // 收集需要组合的元素列表,并赋上唯一分组ID\n const combineElementList: PPTElement[] = []\n for (const element of newElementList) {\n if (activeElementIdList.value.includes(element.id)) {\n element.groupId = groupId\n combineElementList.push(element)\n }\n }\n\n // 确保该组合内所有元素成员的层级是连续的,具体操作方法为:\n // 先获取到该组合内最上层元素的层级,将本次需要组合的元素从新元素列表中移除,\n // 再根据最上层元素的层级位置,将上面收集到的需要组合的元素列表一起插入到新元素列表中合适的位置\n const combineElementMaxLevel = newElementList.findIndex(_element => _element.id === combineElementList[combineElementList.length - 1].id)\n const combineElementIdList = combineElementList.map(_element => _element.id)\n newElementList = newElementList.filter(_element => !combineElementIdList.includes(_element.id))\n\n const insertLevel = combineElementMaxLevel - combineElementList.length + 1\n newElementList.splice(insertLevel, 0, ...combineElementList)\n\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n /**\n * 取消组合元素:移除选中元素的分组ID\n */\n const uncombineElements = () => {\n if (!activeElementList.value.length) return\n const hasElementInGroup = activeElementList.value.some(item => item.groupId)\n if (!hasElementInGroup) return\n \n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n for (const element of newElementList) {\n if (activeElementIdList.value.includes(element.id) && element.groupId) delete element.groupId\n }\n slidesStore.updateSlide({ elements: newElementList })\n\n // 取消组合后,需要重置激活元素状态\n // 默认重置为当前正在操作的元素,如果不存在则重置为空\n const handleElementIdList = handleElementId.value ? [handleElementId.value] : []\n mainStore.setActiveElementIdList(handleElementIdList)\n\n addHistorySnapshot()\n }\n\n return {\n canCombine,\n combineElements,\n uncombineElements,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport { copyText, readClipboard } from '@/utils/clipboard'\nimport { encrypt } from '@/utils/crypto'\nimport message from '@/utils/message'\nimport usePasteTextClipboardData from '@/hooks/usePasteTextClipboardData'\nimport useDeleteElement from './useDeleteElement'\n\nexport default () => {\n const mainStore = useMainStore()\n const { activeElementIdList, activeElementList } = storeToRefs(mainStore)\n\n const { pasteTextClipboardData } = usePasteTextClipboardData()\n const { deleteElement } = useDeleteElement()\n\n // 将选中元素数据加密后复制到剪贴板\n const copyElement = () => {\n if (!activeElementIdList.value.length) return\n\n const text = encrypt(JSON.stringify({\n type: 'elements',\n data: activeElementList.value,\n }))\n\n copyText(text).then(() => {\n mainStore.setEditorareaFocus(true)\n })\n }\n\n // 将选中元素复制后删除(剪切)\n const cutElement = () => {\n copyElement()\n deleteElement()\n }\n\n // 尝试将剪贴板元素数据解密后进行粘贴\n const pasteElement = () => {\n readClipboard().then(text => {\n pasteTextClipboardData(text)\n }).catch(err => message.warning(err))\n }\n\n // 将选中元素复制后立刻粘贴\n const quickCopyElement = () => {\n copyElement()\n pasteElement()\n }\n\n return {\n copyElement,\n cutElement,\n pasteElement,\n quickCopyElement,\n }\n}","import { storeToRefs } from 'pinia'\r\nimport { useMainStore, useSlidesStore } from '@/store'\r\n\r\nexport default () => {\r\n const mainStore = useMainStore()\r\n const { currentSlide } = storeToRefs(useSlidesStore())\r\n const { hiddenElementIdList } = storeToRefs(mainStore)\r\n\r\n // 将当前页面全部元素设置为被选择状态\r\n const selectAllElement = () => {\r\n const unlockedElements = currentSlide.value.elements.filter(el => !el.lock && !hiddenElementIdList.value.includes(el.id))\r\n const newActiveElementIdList = unlockedElements.map(el => el.id)\r\n mainStore.setActiveElementIdList(newActiveElementIdList)\r\n }\r\n\r\n return {\r\n selectAllElement,\r\n }\r\n}","import { storeToRefs } from 'pinia'\r\nimport { useMainStore, useSlidesStore } from '@/store'\r\nimport type { PPTElement } from '@/types/slides'\r\nimport { KEYS } from '@/configs/hotkey'\r\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\r\n\r\nexport default () => {\r\n const slidesStore = useSlidesStore()\r\n const { activeElementIdList, activeGroupElementId } = storeToRefs(useMainStore())\r\n const { currentSlide } = storeToRefs(slidesStore)\r\n\r\n const { addHistorySnapshot } = useHistorySnapshot()\r\n\r\n /**\r\n * 将元素向指定方向移动指定的距离\r\n * 组合元素成员中,存在被选中可独立操作的元素时,优先移动该元素。否则默认移动所有被选中的元素\r\n * @param command 移动方向\r\n * @param step 移动距离\r\n */\r\n const moveElement = (command: string, step = 1) => {\r\n let newElementList: PPTElement[] = []\r\n\r\n const move = (el: PPTElement) => {\r\n let { left, top } = el\r\n switch (command) {\r\n case KEYS.LEFT: \r\n left = left - step\r\n break\r\n case KEYS.RIGHT: \r\n left = left + step\r\n break\r\n case KEYS.UP: \r\n top = top - step\r\n break\r\n case KEYS.DOWN: \r\n top = top + step\r\n break\r\n default: break\r\n }\r\n return { ...el, left, top }\r\n }\r\n\r\n if (activeGroupElementId.value) {\r\n newElementList = currentSlide.value.elements.map(el => {\r\n return activeGroupElementId.value === el.id ? move(el) : el\r\n })\r\n }\r\n else {\r\n newElementList = currentSlide.value.elements.map(el => {\r\n return activeElementIdList.value.includes(el.id) ? move(el) : el\r\n })\r\n }\r\n\r\n slidesStore.updateSlide({ elements: newElementList })\r\n addHistorySnapshot()\r\n }\r\n\r\n return {\r\n moveElement,\r\n }\r\n}","import { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { ElementOrderCommands } from '@/types/edit'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 获取组合元素层级范围\n * @param elementList 本页所有元素列表\n * @param combineElementList 组合元素列表\n */\n const getCombineElementLevelRange = (elementList: PPTElement[], combineElementList: PPTElement[]) => {\n return {\n minLevel: elementList.findIndex(_element => _element.id === combineElementList[0].id),\n maxLevel: elementList.findIndex(_element => _element.id === combineElementList[combineElementList.length - 1].id),\n }\n }\n\n /**\n * 上移一层\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveUpElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n // 如果被操作的元素是组合元素成员,需要将该组合全部成员一起进行移动\n if (element.groupId) {\n\n // 获取到该组合全部成员,以及所有成员的层级范围\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel, maxLevel } = getCombineElementLevelRange(elementList, combineElementList)\n\n // 已经处在顶层,无法继续移动\n if (maxLevel === elementList.length - 1) return\n\n // 通过组合成员范围的最大值,获取到该组合上一层的元素,然后将该组合元素从元素列表中移除(并缓存被移除的元素列表)\n // 若上层元素处在另一个组合中,则将上述被移除的组合元素插入到该上层组合上方\n // 若上层元素不处于任何分组中,则将上述被移除的组合元素插入到该上层元素上方\n const nextElement = copyOfElementList[maxLevel + 1]\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n\n if (nextElement.groupId) {\n const nextCombineElementList = copyOfElementList.filter(_element => _element.groupId === nextElement.groupId)\n copyOfElementList.splice(minLevel + nextCombineElementList.length, 0, ...movedElementList)\n }\n else copyOfElementList.splice(minLevel + 1, 0, ...movedElementList)\n }\n\n // 如果被操作的元素不是组合元素成员\n else {\n\n // 获取该元素在列表中的层级\n const level = elementList.findIndex(item => item.id === element.id)\n\n // 已经处在顶层,无法继续移动\n if (level === elementList.length - 1) return\n\n // 获取到该组合上一层的元素,然后将该组合元素从元素列表中移除(并缓存被移除的元素列表)\n const nextElement = copyOfElementList[level + 1]\n const movedElement = copyOfElementList.splice(level, 1)[0]\n\n // 通过组合成员范围的最大值,获取到该组合上一层的元素,然后将该组合元素从元素列表中移除(并缓存被移除的元素列表)\n // 若上层元素处在另一个组合中,则将上述被移除的组合元素插入到该上层组合上方\n // 若上层元素不处于任何分组中,则将上述被移除的组合元素插入到该上层元素上方\n if (nextElement.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === nextElement.groupId)\n copyOfElementList.splice(level + combineElementList.length, 0, movedElement)\n }\n else copyOfElementList.splice(level + 1, 0, movedElement)\n }\n\n return copyOfElementList\n }\n\n /**\n * 下移一层,操作方式同上移\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveDownElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n if (element.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel } = getCombineElementLevelRange(elementList, combineElementList)\n if (minLevel === 0) return\n\n const prevElement = copyOfElementList[minLevel - 1]\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n\n if (prevElement.groupId) {\n const prevCombineElementList = copyOfElementList.filter(_element => _element.groupId === prevElement.groupId)\n copyOfElementList.splice(minLevel - prevCombineElementList.length, 0, ...movedElementList)\n }\n else copyOfElementList.splice(minLevel - 1, 0, ...movedElementList)\n }\n\n else {\n const level = elementList.findIndex(item => item.id === element.id)\n if (level === 0) return\n\n const prevElement = copyOfElementList[level - 1]\n const movedElement = copyOfElementList.splice(level, 1)[0]\n\n if (prevElement.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === prevElement.groupId)\n copyOfElementList.splice(level - combineElementList.length, 0, movedElement)\n }\n else copyOfElementList.splice(level - 1, 0, movedElement)\n }\n\n return copyOfElementList\n }\n\n /**\n * 置顶层\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveTopElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n // 如果被操作的元素是组合元素成员,需要将该组合全部成员一起进行移动\n if (element.groupId) {\n\n // 获取到该组合全部成员,以及所有成员的层级范围\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel, maxLevel } = getCombineElementLevelRange(elementList, combineElementList)\n\n // 已经处在顶层,无法继续移动\n if (maxLevel === elementList.length - 1) return null\n\n // 将该组合元素从元素列表中移除,然后将被移除的元素添加到元素列表顶部\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n copyOfElementList.push(...movedElementList)\n }\n\n // 如果被操作的元素不是组合元素成员\n else {\n\n // 获取该元素在列表中的层级\n const level = elementList.findIndex(item => item.id === element.id)\n\n // 已经处在顶层,无法继续移动\n if (level === elementList.length - 1) return null\n\n // 将该组合元素从元素列表中移除,然后将被移除的元素添加到元素列表底部\n copyOfElementList.splice(level, 1)\n copyOfElementList.push(element)\n }\n\n return copyOfElementList\n }\n\n /**\n * 置底层,操作方式同置顶\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveBottomElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n if (element.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel } = getCombineElementLevelRange(elementList, combineElementList)\n if (minLevel === 0) return\n\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n copyOfElementList.unshift(...movedElementList)\n }\n\n else {\n const level = elementList.findIndex(item => item.id === element.id)\n if (level === 0) return\n\n copyOfElementList.splice(level, 1)\n copyOfElementList.unshift(element)\n }\n\n return copyOfElementList\n }\n\n /**\n * 调整元素层级\n * @param element 需要调整层级的元素\n * @param command 调整命令:上移、下移、置顶、置底\n */\n const orderElement = (element: PPTElement, command: ElementOrderCommands) => {\n let newElementList\n \n if (command === ElementOrderCommands.UP) newElementList = moveUpElement(currentSlide.value.elements, element)\n else if (command === ElementOrderCommands.DOWN) newElementList = moveDownElement(currentSlide.value.elements, element)\n else if (command === ElementOrderCommands.TOP) newElementList = moveTopElement(currentSlide.value.elements, element)\n else if (command === ElementOrderCommands.BOTTOM) newElementList = moveBottomElement(currentSlide.value.elements, element)\n\n if (!newElementList) return\n\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n return {\n orderElement,\n }\n}","// 进入全屏\nexport const enterFullscreen = () => {\n const docElm = document.documentElement\n if (docElm.requestFullscreen) docElm.requestFullscreen() \n else if (docElm.mozRequestFullScreen) docElm.mozRequestFullScreen() \n else if (docElm.webkitRequestFullScreen) docElm.webkitRequestFullScreen()\n else if (docElm.msRequestFullscreen) docElm.msRequestFullscreen()\n}\n\n// 退出全屏\nexport const exitFullscreen = () => {\n if (document.exitFullscreen) document.exitFullscreen()\n else if (document.mozCancelFullScreen) document.mozCancelFullScreen()\n else if (document.webkitExitFullscreen) document.webkitExitFullscreen()\n else if (document.msExitFullscreen) document.msExitFullscreen()\n}\n\n// 判断是否全屏\nexport const isFullscreen = () => {\n const fullscreenElement = \n document.fullscreenElement ||\n document.mozFullScreenElement ||\n document.webkitFullscreenElement ||\n document.msFullscreenElement ||\n document.webkitCurrentFullScreenElement\n return !!fullscreenElement\n}","import { useScreenStore, useSlidesStore } from '@/store'\nimport { enterFullscreen, exitFullscreen, isFullscreen } from '@/utils/fullscreen'\n\nexport default () => {\n const screenStore = useScreenStore()\n const slidesStore = useSlidesStore()\n\n // 进入放映状态(从当前页开始)\n const enterScreening = () => {\n enterFullscreen()\n screenStore.setScreening(true)\n }\n\n // 进入放映状态(从第一页开始)\n const enterScreeningFromStart = () => {\n slidesStore.updateSlideIndex(0)\n enterScreening()\n }\n\n // 退出放映状态\n const exitScreening = () => {\n screenStore.setScreening(false)\n if (isFullscreen()) exitFullscreen()\n }\n\n return {\n enterScreening,\n enterScreeningFromStart,\n exitScreening,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\n\nexport default () => {\n const mainStore = useMainStore()\n const { canvasPercentage, canvasScale, canvasDragged } = storeToRefs(mainStore)\n\n const canvasScalePercentage = computed(() => Math.round(canvasScale.value * 100) + '%')\n\n /**\n * 缩放画布百分比\n * @param command 缩放命令:放大、缩小\n */\n const scaleCanvas = (command: '+' | '-') => {\n let percentage = canvasPercentage.value\n const step = 5\n const max = 200\n const min = 30\n if (command === '+' && percentage <= max) percentage += step\n if (command === '-' && percentage >= min) percentage -= step\n\n mainStore.setCanvasPercentage(percentage)\n }\n\n /**\n * 设置画布缩放比例\n * 但不是直接设置该值,而是通过设置画布可视区域百分比来动态计算\n * @param value 目标画布缩放比例\n */\n const setCanvasScalePercentage = (value: number) => {\n const percentage = Math.round(value / canvasScale.value * canvasPercentage.value) / 100\n mainStore.setCanvasPercentage(percentage)\n }\n\n /**\n * 重置画布尺寸和位置\n */\n const resetCanvas = () => {\n mainStore.setCanvasPercentage(90)\n if (canvasDragged) mainStore.setCanvasDragged(false)\n }\n\n return {\n canvasScalePercentage,\n setCanvasScalePercentage,\n scaleCanvas,\n resetCanvas,\n }\n}","import { onMounted, onUnmounted } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport { ElementOrderCommands } from '@/types/edit'\nimport { KEYS } from '@/configs/hotkey'\n\nimport useSlideHandler from './useSlideHandler'\nimport useLockElement from './useLockElement'\nimport useDeleteElement from './useDeleteElement'\nimport useCombineElement from './useCombineElement'\nimport useCopyAndPasteElement from './useCopyAndPasteElement'\nimport useSelectAllElement from './useSelectAllElement'\nimport useMoveElement from './useMoveElement'\nimport useOrderElement from './useOrderElement'\nimport useHistorySnapshot from './useHistorySnapshot'\nimport useScreening from './useScreening'\nimport useScaleCanvas from './useScaleCanvas'\n\nexport default () => {\n const mainStore = useMainStore()\n const keyboardStore = useKeyboardStore()\n const {\n activeElementIdList,\n disableHotkeys,\n handleElement,\n handleElementId,\n editorAreaFocus,\n thumbnailsFocus,\n showSearchPanel,\n } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(useSlidesStore())\n const { ctrlKeyState, shiftKeyState, spaceKeyState } = storeToRefs(keyboardStore)\n\n const {\n updateSlideIndex,\n copySlide,\n createSlide,\n deleteSlide,\n cutSlide,\n copyAndPasteSlide,\n selectAllSlide,\n } = useSlideHandler()\n\n const { combineElements, uncombineElements } = useCombineElement()\n const { deleteElement } = useDeleteElement()\n const { lockElement } = useLockElement()\n const { copyElement, cutElement, quickCopyElement } = useCopyAndPasteElement()\n const { selectAllElement } = useSelectAllElement()\n const { moveElement } = useMoveElement()\n const { orderElement } = useOrderElement()\n const { redo, undo } = useHistorySnapshot()\n const { enterScreening, enterScreeningFromStart } = useScreening()\n const { scaleCanvas, resetCanvas } = useScaleCanvas()\n\n const copy = () => {\n if (activeElementIdList.value.length) copyElement()\n else if (thumbnailsFocus.value) copySlide()\n }\n\n const cut = () => {\n if (activeElementIdList.value.length) cutElement()\n else if (thumbnailsFocus.value) cutSlide()\n }\n\n const quickCopy = () => {\n if (activeElementIdList.value.length) quickCopyElement()\n else if (thumbnailsFocus.value) copyAndPasteSlide()\n }\n\n const selectAll = () => {\n if (editorAreaFocus.value) selectAllElement()\n if (thumbnailsFocus.value) selectAllSlide()\n }\n\n const lock = () => {\n if (!editorAreaFocus.value) return\n lockElement()\n }\n const combine = () => {\n if (!editorAreaFocus.value) return\n combineElements()\n }\n\n const uncombine = () => {\n if (!editorAreaFocus.value) return\n uncombineElements()\n }\n\n const remove = () => {\n if (activeElementIdList.value.length) deleteElement()\n else if (thumbnailsFocus.value) deleteSlide()\n }\n\n const move = (key: string) => {\n if (activeElementIdList.value.length) moveElement(key)\n else if (key === KEYS.UP || key === KEYS.DOWN) updateSlideIndex(key)\n }\n\n const moveSlide = (key: string) => {\n if (key === KEYS.PAGEUP) updateSlideIndex(KEYS.UP)\n else if (key === KEYS.PAGEDOWN) updateSlideIndex(KEYS.DOWN)\n }\n\n const order = (command: ElementOrderCommands) => {\n if (!handleElement.value) return\n orderElement(handleElement.value, command)\n }\n\n const create = () => {\n if (!thumbnailsFocus.value) return\n createSlide()\n }\n\n const tabActiveElement = () => {\n if (!currentSlide.value.elements.length) return\n if (!handleElementId.value) {\n const firstElement = currentSlide.value.elements[0]\n mainStore.setActiveElementIdList([firstElement.id])\n return\n }\n const currentIndex = currentSlide.value.elements.findIndex(el => el.id === handleElementId.value)\n const nextIndex = currentIndex >= currentSlide.value.elements.length - 1 ? 0 : currentIndex + 1\n const nextElementId = currentSlide.value.elements[nextIndex].id\n\n mainStore.setActiveElementIdList([nextElementId])\n }\n\n const keydownListener = (e: KeyboardEvent) => {\n const { ctrlKey, shiftKey, altKey, metaKey } = e\n const ctrlOrMetaKeyActive = ctrlKey || metaKey\n \n const key = e.key.toUpperCase()\n\n if (ctrlOrMetaKeyActive && !ctrlKeyState.value) keyboardStore.setCtrlKeyState(true)\n if (shiftKey && !shiftKeyState.value) keyboardStore.setShiftKeyState(true)\n if (!disableHotkeys.value && key === KEYS.SPACE) keyboardStore.setSpaceKeyState(true)\n\n \n if (ctrlOrMetaKeyActive && key === KEYS.P) {\n e.preventDefault()\n mainStore.setDialogForExport('pdf')\n return\n }\n if (shiftKey && key === KEYS.F5) {\n e.preventDefault()\n enterScreening()\n keyboardStore.setShiftKeyState(false)\n return\n }\n if (key === KEYS.F5) {\n e.preventDefault()\n enterScreeningFromStart()\n return\n }\n if (ctrlKey && key === KEYS.F) {\n e.preventDefault()\n mainStore.setSearchPanelState(!showSearchPanel.value)\n return\n }\n \n if (!editorAreaFocus.value && !thumbnailsFocus.value) return \n\n if (ctrlOrMetaKeyActive && key === KEYS.C) {\n if (disableHotkeys.value) return\n e.preventDefault()\n copy()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.X) {\n if (disableHotkeys.value) return\n e.preventDefault()\n cut()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.D) {\n if (disableHotkeys.value) return\n e.preventDefault()\n quickCopy()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.Z) {\n if (disableHotkeys.value) return\n e.preventDefault()\n undo()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.Y) {\n if (disableHotkeys.value) return\n e.preventDefault()\n redo()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.A) {\n if (disableHotkeys.value) return\n e.preventDefault()\n selectAll()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.L) {\n if (disableHotkeys.value) return\n e.preventDefault()\n lock()\n }\n if (!shiftKey && ctrlOrMetaKeyActive && key === KEYS.G) {\n if (disableHotkeys.value) return\n e.preventDefault()\n combine()\n }\n if (shiftKey && ctrlOrMetaKeyActive && key === KEYS.G) {\n if (disableHotkeys.value) return\n e.preventDefault()\n uncombine()\n }\n if (altKey && key === KEYS.F) {\n if (disableHotkeys.value) return\n e.preventDefault()\n order(ElementOrderCommands.TOP)\n }\n if (altKey && key === KEYS.B) {\n if (disableHotkeys.value) return\n e.preventDefault()\n order(ElementOrderCommands.BOTTOM)\n }\n if (key === KEYS.DELETE || key === KEYS.BACKSPACE) {\n if (disableHotkeys.value) return\n e.preventDefault()\n remove()\n }\n if (key === KEYS.UP) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.UP)\n }\n if (key === KEYS.DOWN) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.DOWN)\n }\n if (key === KEYS.LEFT) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.LEFT)\n }\n if (key === KEYS.RIGHT) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.RIGHT)\n }\n if (key === KEYS.PAGEUP) {\n if (disableHotkeys.value) return\n e.preventDefault()\n moveSlide(KEYS.PAGEUP)\n }\n if (key === KEYS.PAGEDOWN) {\n if (disableHotkeys.value) return\n e.preventDefault()\n moveSlide(KEYS.PAGEDOWN)\n }\n if (key === KEYS.ENTER) {\n if (disableHotkeys.value) return\n e.preventDefault()\n create()\n }\n if (key === KEYS.MINUS) {\n if (disableHotkeys.value) return\n e.preventDefault()\n scaleCanvas('-')\n }\n if (key === KEYS.EQUAL) {\n if (disableHotkeys.value) return\n e.preventDefault()\n scaleCanvas('+')\n }\n if (key === KEYS.DIGIT_0) {\n if (disableHotkeys.value) return\n e.preventDefault()\n resetCanvas()\n }\n if (key === KEYS.TAB) {\n if (disableHotkeys.value) return\n e.preventDefault()\n tabActiveElement()\n }\n }\n \n const keyupListener = () => {\n if (ctrlKeyState.value) keyboardStore.setCtrlKeyState(false)\n if (shiftKeyState.value) keyboardStore.setShiftKeyState(false)\n if (spaceKeyState.value) keyboardStore.setSpaceKeyState(false)\n }\n\n onMounted(() => {\n document.addEventListener('keydown', keydownListener)\n document.addEventListener('keyup', keyupListener)\n window.addEventListener('blur', keyupListener)\n })\n onUnmounted(() => {\n document.removeEventListener('keydown', keydownListener)\n document.removeEventListener('keyup', keyupListener)\n window.removeEventListener('blur', keyupListener)\n })\n}","import { onMounted, onUnmounted } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport { getImageDataURL } from '@/utils/image'\nimport usePasteTextClipboardData from './usePasteTextClipboardData'\nimport useCreateElement from './useCreateElement'\n\nexport default () => {\n const { editorAreaFocus, thumbnailsFocus, disableHotkeys } = storeToRefs(useMainStore())\n\n const { pasteTextClipboardData } = usePasteTextClipboardData()\n const { createImageElement } = useCreateElement()\n\n // 粘贴图片到幻灯片元素\n const pasteImageFile = (imageFile: File) => {\n getImageDataURL(imageFile).then(dataURL => createImageElement(dataURL))\n }\n\n /**\n * 粘贴事件监听\n * @param e ClipboardEvent\n */\n const pasteListener = (e: ClipboardEvent) => {\n if (!editorAreaFocus.value && !thumbnailsFocus.value) return\n if (disableHotkeys.value) return\n\n if (!e.clipboardData) return\n\n const clipboardDataItems = e.clipboardData.items\n const clipboardDataFirstItem = clipboardDataItems[0]\n\n if (!clipboardDataFirstItem) return\n\n // 如果剪贴板内有图片,优先尝试读取图片\n for (const item of clipboardDataItems) {\n if (item.kind === 'file' && item.type.indexOf('image') !== -1) {\n const imageFile = item.getAsFile()\n if (imageFile) pasteImageFile(imageFile)\n return\n }\n }\n \n // 如果剪贴板内没有图片,但有文字内容,尝试解析文字内容\n if (clipboardDataFirstItem.kind === 'string' && clipboardDataFirstItem.type === 'text/plain') {\n clipboardDataFirstItem.getAsString(text => pasteTextClipboardData(text))\n }\n }\n\n onMounted(() => {\n document.addEventListener('paste', pasteListener)\n })\n onUnmounted(() => {\n document.removeEventListener('paste', pasteListener)\n })\n}","import { ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { parse, type Shape, type Element, type ChartItem } from 'pptxtojson'\nimport { nanoid } from 'nanoid'\nimport { useSlidesStore } from '@/store'\nimport { decrypt } from '@/utils/crypto'\nimport { type ShapePoolItem, SHAPE_LIST, SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'\nimport message from '@/utils/message'\nimport type {\n Slide,\n TableCellStyle,\n TableCell,\n ChartType,\n ChartOptions,\n SlideBackground,\n PPTShapeElement,\n PPTLineElement,\n ShapeTextAlign,\n PPTTextElement,\n} from '@/types/slides'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n const { theme } = storeToRefs(useSlidesStore())\n\n const { addSlidesFromData, isEmptySlide } = useAddSlidesOrElements()\n\n const exporting = ref(false)\n\n // 导入pptist文件\n const importSpecificFile = (files: FileList, cover = false) => {\n const file = files[0]\n\n const reader = new FileReader()\n reader.addEventListener('load', () => {\n try {\n const slides = JSON.parse(decrypt(reader.result as string))\n if (cover) slidesStore.setSlides(slides)\n else if (isEmptySlide.value) slidesStore.setSlides(slides)\n else addSlidesFromData(slides)\n }\n catch {\n message.error('无法正确读取 / 解析该文件')\n }\n })\n reader.readAsText(file)\n }\n\n const parseLineElement = (el: Shape): PPTLineElement => {\n let start: [number, number] = [0, 0]\n let end: [number, number] = [0, 0]\n\n if (!el.isFlipV && !el.isFlipH) { // 右下\n start = [0, 0]\n end = [el.width, el.height]\n }\n else if (el.isFlipV && el.isFlipH) { // 左上\n start = [el.width, el.height]\n end = [0, 0]\n }\n else if (el.isFlipV && !el.isFlipH) { // 右上\n start = [0, el.height]\n end = [el.width, 0]\n }\n else { // 左下\n start = [el.width, 0]\n end = [0, el.height]\n }\n return {\n type: 'line',\n id: nanoid(10),\n width: el.borderWidth || 1,\n left: el.left,\n top: el.top,\n start,\n end,\n style: el.borderType === 'solid' ? 'solid' : 'dashed',\n color: el.borderColor,\n points: ['', el.shapType === 'straightConnector1' ? 'arrow' : '']\n }\n }\n\n // 导入PPTX文件\n const importPPTXFile = (files: FileList) => {\n const file = files[0]\n if (!file) return\n\n exporting.value = true\n\n const shapeList: ShapePoolItem[] = []\n for (const item of SHAPE_LIST) {\n shapeList.push(...item.children)\n }\n \n const reader = new FileReader()\n reader.onload = async e => {\n const json = await parse(e.target!.result as ArrayBuffer, {\n slideFactor: 75 / 914400,\n fontsizeFactor: 100 / 98,\n })\n\n const width = json.size.width\n const scale = VIEWPORT_SIZE / width\n\n const slides: Slide[] = []\n for (const item of json.slides) {\n const { type, value } = item.fill\n let background: SlideBackground\n if (type === 'image') {\n background = {\n type: 'image',\n image: value.picBase64,\n imageSize: 'cover',\n }\n }\n else if (type === 'gradient') {\n background = {\n type: 'gradient',\n gradientType: 'linear',\n gradientColor: [value.colors[0].color, value.colors[value.colors.length - 1].color],\n gradientRotate: value.rot,\n }\n }\n else {\n background = {\n type: 'solid',\n color: value,\n }\n }\n\n const slide: Slide = {\n id: nanoid(10),\n elements: [],\n background,\n }\n\n const parseElements = (elements: Element[]) => {\n for (const el of elements) {\n el.width = el.width * scale\n el.height = el.height * scale\n el.left = el.left * scale\n el.top = el.top * scale\n \n if (el.type === 'text') {\n const textEl: PPTTextElement = {\n type: 'text',\n id: nanoid(10),\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n rotate: el.rotate,\n defaultFontName: theme.value.fontName,\n defaultColor: theme.value.fontColor,\n content: el.content,\n lineHeight: 1,\n outline: {\n color: el.borderColor,\n width: el.borderWidth,\n style: el.borderType === 'solid' ? 'solid' : 'dashed',\n },\n fill: el.fillColor,\n vertical: el.isVertical,\n }\n if (el.shadow) textEl.shadow = el.shadow\n slide.elements.push(textEl)\n }\n else if (el.type === 'image') {\n slide.elements.push({\n type: 'image',\n id: nanoid(10),\n src: el.src,\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n fixedRatio: true,\n rotate: el.rotate,\n })\n }\n else if (el.type === 'audio') {\n slide.elements.push({\n type: 'audio',\n id: nanoid(10),\n src: el.blob,\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n rotate: 0,\n fixedRatio: false,\n color: theme.value.themeColor,\n loop: false,\n autoplay: false,\n })\n }\n else if (el.type === 'video') {\n slide.elements.push({\n type: 'video',\n id: nanoid(10),\n src: (el.blob || el.src)!,\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n rotate: 0,\n autoplay: false,\n })\n }\n else if (el.type === 'shape') {\n if (el.shapType === 'line' || /Connector/.test(el.shapType)) {\n const lineElement = parseLineElement(el)\n slide.elements.push(lineElement)\n }\n else {\n const shape = shapeList.find(item => item.pptxShapeType === el.shapType)\n\n const vAlignMap: { [key: string]: ShapeTextAlign } = {\n 'mid': 'middle',\n 'down': 'bottom',\n 'up': 'top',\n }\n \n const element: PPTShapeElement = {\n type: 'shape',\n id: nanoid(10),\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: el.fillColor || 'none',\n fixedRatio: false,\n rotate: el.rotate,\n outline: {\n color: el.borderColor,\n width: el.borderWidth,\n style: el.borderType === 'solid' ? 'solid' : 'dashed',\n },\n text: {\n content: el.content,\n defaultFontName: theme.value.fontName,\n defaultColor: theme.value.fontColor,\n align: vAlignMap[el.vAlign] || 'middle',\n },\n flipH: el.isFlipH,\n flipV: el.isFlipV,\n }\n if (el.shadow) element.shadow = el.shadow\n \n if (shape) {\n element.path = shape.path\n element.viewBox = shape.viewBox\n \n if (shape.pathFormula) {\n element.pathFormula = shape.pathFormula\n element.viewBox = [el.width, el.height]\n \n const pathFormula = SHAPE_PATH_FORMULAS[shape.pathFormula]\n if ('editable' in pathFormula) {\n element.path = pathFormula.formula(el.width, el.height, pathFormula.defaultValue)\n element.keypoint = pathFormula.defaultValue\n }\n else element.path = pathFormula.formula(el.width, el.height)\n }\n }\n if (el.shapType === 'custom') {\n element.special = true\n element.path = el.path!\n element.viewBox = [el.width, el.height]\n }\n \n slide.elements.push(element)\n }\n }\n else if (el.type === 'table') {\n const row = el.data.length\n const col = el.data[0].length\n \n const style: TableCellStyle = {\n fontname: theme.value.fontName,\n color: theme.value.fontColor,\n }\n const data: TableCell[][] = []\n for (let i = 0; i < row; i++) {\n const rowCells: TableCell[] = []\n for (let j = 0; j < col; j++) {\n const cellData = el.data[i][j]\n rowCells.push({\n id: nanoid(10),\n colspan: cellData.colSpan || 1,\n rowspan: cellData.rowSpan || 1,\n text: cellData.text,\n style,\n })\n }\n data.push(rowCells)\n }\n \n const colWidths: number[] = new Array(col).fill(1 / col)\n \n slide.elements.push({\n type: 'table',\n id: nanoid(10),\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n colWidths,\n rotate: 0,\n data,\n outline: {\n width: 2,\n style: 'solid',\n color: '#eeece1',\n },\n theme: {\n color: el.themeColor,\n rowHeader: true,\n rowFooter: false,\n colHeader: false,\n colFooter: false,\n },\n cellMinHeight: 36,\n })\n }\n else if (el.type === 'chart') {\n let labels: string[]\n let legends: string[]\n let series: number[][]\n \n if (el.chartType === 'scatterChart' || el.chartType === 'bubbleChart') {\n const data = el.data\n labels = data[0].map(item => item + '')\n legends = ['系列1']\n series = [data[1]]\n }\n else {\n const data = el.data as ChartItem[]\n labels = Object.values(data[0].xlabels)\n legends = data.map(item => item.key)\n series = data.map(item => item.values.map(v => v.y))\n }\n \n const options: ChartOptions = {}\n \n let chartType: ChartType = 'bar'\n\n switch (el.chartType) {\n case 'barChart':\n case 'bar3DChart':\n chartType = 'bar'\n if (el.barDir === 'bar') options.horizontalBars = true\n if (el.grouping === 'stacked' || el.grouping === 'percentStacked') options.stackBars = true\n break\n case 'lineChart':\n case 'line3DChart':\n case 'areaChart':\n case 'area3DChart':\n case 'scatterChart':\n case 'bubbleChart':\n chartType = 'line'\n if (el.chartType === 'areaChart' || el.chartType === 'area3DChart') options.showArea = true\n if (el.chartType === 'scatterChart' || el.chartType === 'bubbleChart') options.showLine = false\n break\n case 'pieChart':\n case 'pie3DChart':\n case 'doughnutChart':\n chartType = 'pie'\n if (el.chartType === 'doughnutChart') options.donut = true\n break\n default:\n }\n \n slide.elements.push({\n type: 'chart',\n id: nanoid(10),\n chartType: chartType,\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n rotate: 0,\n themeColor: [theme.value.themeColor],\n gridColor: theme.value.fontColor,\n data: {\n labels,\n legends,\n series,\n },\n options,\n })\n }\n else if (el.type === 'group' || el.type === 'diagram') {\n const elements = el.elements.map(_el => ({\n ..._el,\n left: _el.left + el.left,\n top: _el.top + el.top,\n }))\n parseElements(elements)\n }\n }\n }\n parseElements(item.elements)\n slides.push(slide)\n }\n if (isEmptySlide.value) slidesStore.setSlides(slides)\n else addSlidesFromData(slides)\n exporting.value = false\n }\n reader.readAsArrayBuffer(file)\n }\n\n return {\n importSpecificFile,\n importPPTXFile,\n exporting,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-a0322054\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"hotkey-doc\" }\nconst _hoisted_2 = { class: \"title\" }\nconst _hoisted_3 = { class: \"label\" }\nconst _hoisted_4 = { class: \"value\" }\n\nimport { HOTKEY_DOC } from '@/configs/hotkey' \n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'HotkeyDoc',\n setup(__props) {\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(HOTKEY_DOC), (item) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: item.type\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(item.type), 1),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.children, (hotkey) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"hotkey-item\",\n key: hotkey.label\n }, [\n _createElementVNode(\"div\", _hoisted_3, _toDisplayString(hotkey.label), 1),\n _createElementVNode(\"div\", _hoisted_4, _toDisplayString(hotkey.value), 1)\n ]))\n }), 128))\n ], 64))\n }), 128))\n ]))\n}\n}\n\n})","import script from \"./HotkeyDoc.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./HotkeyDoc.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./HotkeyDoc.vue?vue&type=style&index=0&id=a0322054&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-a0322054\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-64bedb34\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"accept\"]\n\nimport { ref } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'FileInput',\n props: {\n accept: { default: 'image/*' }\n },\n emits: [\"change\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit\n\nconst inputRef = ref()\n\nconst handleClick = () => {\n if (!inputRef.value) return\n inputRef.value.value = ''\n inputRef.value.click()\n}\nconst handleChange = (e: Event) => {\n const files = (e.target as HTMLInputElement).files\n if (files) emit('change', files)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"file-input\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (handleClick()))\n }, [\n _renderSlot(_ctx.$slots, \"default\"),\n _createElementVNode(\"input\", {\n class: \"input\",\n type: \"file\",\n name: \"upload\",\n ref_key: \"inputRef\",\n ref: inputRef,\n accept: _ctx.accept,\n onChange: _cache[0] || (_cache[0] = $event => handleChange($event))\n }, null, 40, _hoisted_1)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./FileInput.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./FileInput.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./FileInput.vue?vue&type=style&index=0&id=64bedb34&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-64bedb34\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-a5c6b41c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"fullscreen-spin\"\n}\nconst _hoisted_2 = { class: \"spin\" }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"spinner\" }, null, -1))\nconst _hoisted_4 = { class: \"text\" }\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'FullscreenSpin',\n props: {\n loading: { type: Boolean, default: false },\n tip: { default: '' }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.loading)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _hoisted_3,\n _createElementVNode(\"div\", _hoisted_4, _toDisplayString(_ctx.tip), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./FullscreenSpin.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./FullscreenSpin.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./FullscreenSpin.vue?vue&type=style&index=0&id=a5c6b41c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-a5c6b41c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, vShow as _vShow, normalizeClass as _normalizeClass, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx, Teleport as _Teleport, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-749dadac\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"header\" }\n\nimport { computed, ref, type CSSProperties } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Drawer',\n props: {\n visible: { type: Boolean },\n width: { default: 320 },\n contentStyle: {},\n placement: { default: 'right' }\n },\n emits: [\"update:visible\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst contentVisible = ref(false)\n\nconst contentStyle = computed(() => {\n return {\n width: props.width + 'px',\n ...(props.contentStyle || {})\n }\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconClose = _resolveComponent(\"IconClose\")!\n\n return (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createVNode(_Transition, {\n name: `drawer-slide-${_ctx.placement}`,\n onAfterLeave: _cache[1] || (_cache[1] = ($event: any) => (contentVisible.value = false)),\n onBeforeEnter: _cache[2] || (_cache[2] = ($event: any) => (contentVisible.value = true))\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", {\n class: _normalizeClass(['drawer', _ctx.placement]),\n style: _normalizeStyle({ width: props.width + 'px' })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"title\"),\n _createElementVNode(\"span\", {\n class: \"close-btn\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('update:visible', false)))\n }, [\n _createVNode(_component_IconClose)\n ])\n ]),\n (contentVisible.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"content\",\n style: _normalizeStyle(contentStyle.value)\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 4))\n : _createCommentVNode(\"\", true)\n ], 6), [\n [_vShow, _ctx.visible]\n ])\n ]),\n _: 3\n }, 8, [\"name\"])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Drawer.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Drawer.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Drawer.vue?vue&type=style&index=0&id=749dadac&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-749dadac\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, withKeys as _withKeys, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-a97ba0dc\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"prefix\" }\nconst _hoisted_2 = [\"disabled\", \"value\", \"placeholder\"]\nconst _hoisted_3 = { class: \"suffix\" }\n\nimport { ref } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Input',\n props: {\n value: {},\n disabled: { type: Boolean, default: false },\n placeholder: { default: '' }\n },\n emits: [\"update:value\", \"input\", \"change\", \"blur\", \"focus\", \"enter\"],\n setup(__props: any, { expose: __expose, emit: __emit }) {\n\n\n\nconst emit = __emit\n\nconst focused = ref(false)\n\nconst handleInput = (e: Event) => {\n emit('update:value', (e.target as HTMLInputElement).value)\n}\nconst handleBlur = (e: Event) => {\n focused.value = false\n emit('blur', e)\n}\nconst handleFocus = (e: Event) => {\n focused.value = true\n emit('focus', e)\n}\n\nconst inputRef = ref()\nconst focus = () => {\n if (inputRef.value) inputRef.value.focus()\n}\n\n__expose({\n focus,\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"input\", {\n 'disabled': _ctx.disabled,\n 'focused': focused.value,\n }])\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prefix\")\n ]),\n _createElementVNode(\"input\", {\n type: \"text\",\n ref_key: \"inputRef\",\n ref: inputRef,\n disabled: _ctx.disabled,\n value: _ctx.value,\n placeholder: _ctx.placeholder,\n onInput: _cache[0] || (_cache[0] = $event => handleInput($event)),\n onFocus: _cache[1] || (_cache[1] = $event => handleFocus($event)),\n onBlur: _cache[2] || (_cache[2] = $event => handleBlur($event)),\n onChange: _cache[3] || (_cache[3] = $event => emit('change', $event)),\n onKeydown: _cache[4] || (_cache[4] = _withKeys($event => emit('enter', $event), [\"enter\"]))\n }, null, 40, _hoisted_2),\n _createElementVNode(\"span\", _hoisted_3, [\n _renderSlot(_ctx.$slots, \"suffix\")\n ])\n ], 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./Input.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Input.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Input.vue?vue&type=style&index=0&id=a97ba0dc&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-a97ba0dc\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { type CSSProperties, onMounted, ref, watch, computed } from 'vue'\nimport tippy, { type Instance, type Placement } from 'tippy.js'\n\nimport 'tippy.js/animations/scale.css'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Popover',\n props: {\n value: { type: Boolean, default: false },\n trigger: { default: 'click' },\n placement: { default: 'bottom' },\n appendTo: {},\n contentStyle: {},\n center: { type: Boolean, default: false }\n },\n emits: [\"update:value\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst instance = ref()\nconst triggerRef = ref()\nconst contentRef = ref()\nconst contentVisible = ref(false)\n\nconst contentStyle = computed(() => {\n return props.contentStyle || {}\n})\n\nwatch(() => props.value, () => {\n if (!instance.value) return\n if (props.value) instance.value.show()\n else instance.value.hide()\n})\n\nonMounted(() => {\n instance.value = tippy(triggerRef.value!, {\n content: contentRef.value!,\n allowHTML: true,\n trigger: props.trigger,\n placement: props.placement,\n interactive: true,\n appendTo: props.appendTo || document.body,\n maxWidth: 'none',\n offset: [0, 8],\n duration: 200,\n animation: 'scale',\n theme: 'popover',\n onShow() {\n contentVisible.value = true\n },\n onShown() {\n if (!props.value) emit('update:value', true)\n },\n onHidden() {\n if (props.value) emit('update:value', false)\n contentVisible.value = false\n },\n })\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"popover\", { 'center': _ctx.center }]),\n ref_key: \"triggerRef\",\n ref: triggerRef\n }, [\n _createElementVNode(\"div\", {\n class: \"popover-content\",\n style: _normalizeStyle(contentStyle.value),\n ref_key: \"contentRef\",\n ref: contentRef\n }, [\n (contentVisible.value)\n ? _renderSlot(_ctx.$slots, \"content\", { key: 0 })\n : _createCommentVNode(\"\", true)\n ], 4),\n _renderSlot(_ctx.$slots, \"default\")\n ], 2))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./Popover.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Popover.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Popover.vue?vue&type=style&index=0&id=70fabe9a&lang=scss&scoped=true\"\nimport \"./Popover.vue?vue&type=style&index=1&id=70fabe9a&lang=scss\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-70fabe9a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'PopoverMenuItem',\n props: {\n center: { type: Boolean, default: false }\n },\n emits: [\"click\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"popover-menu-item\", { 'center': _ctx.center }]),\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('click')))\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./PopoverMenuItem.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./PopoverMenuItem.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./PopoverMenuItem.vue?vue&type=style&index=0&id=2f137c4f&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2f137c4f\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, unref as _unref, resolveComponent as _resolveComponent, createElementVNode as _createElementVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-0b9f8c7b\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"editor-header\" }\nconst _hoisted_2 = { class: \"left\" }\nconst _hoisted_3 = { class: \"menu-item\" }\nconst _hoisted_4 = { class: \"title\" }\nconst _hoisted_5 = [\"title\"]\nconst _hoisted_6 = { class: \"right\" }\nconst _hoisted_7 = { class: \"group-menu-item\" }\nconst _hoisted_8 = { class: \"arrow-btn\" }\nconst _hoisted_9 = {\n class: \"github-link\",\n href: \"https://github.com/pipipi-pikachu/PPTist\",\n target: \"_blank\"\n}\nconst _hoisted_10 = { class: \"menu-item\" }\n\nimport { nextTick, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport useScreening from '@/hooks/useScreening'\nimport useImport from '@/hooks/useImport'\nimport useSlideHandler from '@/hooks/useSlideHandler'\nimport type { DialogForExportTypes } from '@/types/export'\n\nimport HotkeyDoc from './HotkeyDoc.vue'\nimport FileInput from '@/components/FileInput.vue'\nimport FullscreenSpin from '@/components/FullscreenSpin.vue'\nimport Drawer from '@/components/Drawer.vue'\nimport Input from '@/components/Input.vue'\nimport Popover from '@/components/Popover.vue'\nimport PopoverMenuItem from '@/components/PopoverMenuItem.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n setup(__props) {\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { title } = storeToRefs(slidesStore)\nconst { enterScreening, enterScreeningFromStart } = useScreening()\nconst { importSpecificFile, importPPTXFile, exporting } = useImport()\nconst { resetSlides } = useSlideHandler()\n\nconst mainMenuVisible = ref(false)\nconst hotkeyDrawerVisible = ref(false)\nconst editingTitle = ref(false)\nconst titleInputRef = ref>()\nconst titleValue = ref('')\n\nconst startEditTitle = () => {\n titleValue.value = title.value\n editingTitle.value = true\n nextTick(() => titleInputRef.value?.focus())\n}\n\nconst handleUpdateTitle = () => {\n slidesStore.setTitle(titleValue.value)\n editingTitle.value = false\n}\n\nconst goLink = (url: string) => {\n window.open(url)\n mainMenuVisible.value = false\n}\n\nconst setDialogForExport = (type: DialogForExportTypes) => {\n mainStore.setDialogForExport(type)\n mainMenuVisible.value = false\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconHamburgerButton = _resolveComponent(\"IconHamburgerButton\")!\n const _component_IconPpt = _resolveComponent(\"IconPpt\")!\n const _component_IconDown = _resolveComponent(\"IconDown\")!\n const _component_IconDownload = _resolveComponent(\"IconDownload\")!\n const _component_IconGithub = _resolveComponent(\"IconGithub\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Popover, {\n trigger: \"click\",\n placement: \"bottom-start\",\n value: mainMenuVisible.value,\n \"onUpdate:value\": _cache[7] || (_cache[7] = ($event: any) => ((mainMenuVisible).value = $event))\n }, {\n content: _withCtx(() => [\n _createVNode(FileInput, {\n accept: \".pptist\",\n onChange: _cache[0] || (_cache[0] = files => {\n _unref(importSpecificFile)(files)\n mainMenuVisible.value = false\n })\n }, {\n default: _withCtx(() => [\n _createVNode(PopoverMenuItem, null, {\n default: _withCtx(() => [\n _createTextVNode(\"导入 pptist 文件\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(FileInput, {\n accept: \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n onChange: _cache[1] || (_cache[1] = files => {\n _unref(importPPTXFile)(files)\n mainMenuVisible.value = false\n })\n }, {\n default: _withCtx(() => [\n _createVNode(PopoverMenuItem, null, {\n default: _withCtx(() => [\n _createTextVNode(\"导入 pptx 文件(测试版)\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (setDialogForExport('pptx')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"导出文件\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[3] || (_cache[3] = ($event: any) => {_unref(resetSlides)(); mainMenuVisible.value = false})\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"重置幻灯片\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[4] || (_cache[4] = ($event: any) => (goLink('https://github.com/pipipi-pikachu/PPTist/issues')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"意见反馈\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (goLink('https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Q&A.md')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"常见问题\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[6] || (_cache[6] = ($event: any) => {mainMenuVisible.value = false; hotkeyDrawerVisible.value = true})\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"快捷键\")\n ]),\n _: 1\n })\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(_component_IconHamburgerButton, { class: \"icon\" })\n ])\n ]),\n _: 1\n }, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_4, [\n (editingTitle.value)\n ? (_openBlock(), _createBlock(Input, {\n key: 0,\n class: \"title-input\",\n ref_key: \"titleInputRef\",\n ref: titleInputRef,\n value: titleValue.value,\n \"onUpdate:value\": _cache[8] || (_cache[8] = ($event: any) => ((titleValue).value = $event)),\n onBlur: _cache[9] || (_cache[9] = ($event: any) => (handleUpdateTitle()))\n }, null, 8, [\"value\"]))\n : (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"title-text\",\n onClick: _cache[10] || (_cache[10] = ($event: any) => (startEditTitle())),\n title: _unref(title)\n }, _toDisplayString(_unref(title)), 9, _hoisted_5))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", _hoisted_7, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"menu-item\",\n onClick: _cache[11] || (_cache[11] = ($event: any) => (_unref(enterScreening)()))\n }, [\n _createVNode(_component_IconPpt, { class: \"icon\" })\n ])), [\n [_directive_tooltip, '幻灯片放映']\n ]),\n _createVNode(Popover, {\n trigger: \"click\",\n center: \"\"\n }, {\n content: _withCtx(() => [\n _createVNode(PopoverMenuItem, {\n onClick: _cache[12] || (_cache[12] = ($event: any) => (_unref(enterScreeningFromStart)()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"从头开始\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[13] || (_cache[13] = ($event: any) => (_unref(enterScreening)()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"从当前页开始\")\n ]),\n _: 1\n })\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_8, [\n _createVNode(_component_IconDown, { class: \"arrow\" })\n ])\n ]),\n _: 1\n })\n ]),\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"menu-item\",\n onClick: _cache[14] || (_cache[14] = ($event: any) => (setDialogForExport('pptx')))\n }, [\n _createVNode(_component_IconDownload, { class: \"icon\" })\n ])), [\n [_directive_tooltip, '导出']\n ]),\n _createElementVNode(\"a\", _hoisted_9, [\n _createElementVNode(\"div\", _hoisted_10, [\n _createVNode(_component_IconGithub, { class: \"icon\" })\n ])\n ])\n ]),\n _createVNode(Drawer, {\n width: 320,\n visible: hotkeyDrawerVisible.value,\n \"onUpdate:visible\": _cache[15] || (_cache[15] = ($event: any) => ((hotkeyDrawerVisible).value = $event)),\n placement: \"right\"\n }, {\n default: _withCtx(() => [\n _createVNode(HotkeyDoc)\n ]),\n _: 1\n }, 8, [\"visible\"]),\n _createVNode(FullscreenSpin, {\n loading: _unref(exporting),\n tip: \"正在导入...\"\n }, null, 8, [\"loading\"])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=0b9f8c7b&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-0b9f8c7b\"]])\n\nexport default __exports__","import type { InjectionKey, Ref } from 'vue'\n\nexport type SlideScale = Ref\nexport type SlideId = Ref\nexport type RadioGroupValue = {\n value: Ref\n updateValue: (value: string) => void\n}\n\nexport const injectKeySlideScale: InjectionKey = Symbol()\nexport const injectKeySlideId: InjectionKey = Symbol()\nexport const injectKeyRadioGroupValue: InjectionKey = Symbol()","// 清除文字选区\nexport const removeAllRanges = () => {\n const selection = window.getSelection()\n selection && selection.removeAllRanges()\n}","import { ref, computed, onMounted, onUnmounted, watch, type Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\n\nexport default (canvasRef: Ref) => {\n const viewportLeft = ref(0)\n const viewportTop = ref(0)\n\n const mainStore = useMainStore()\n const { canvasPercentage, canvasDragged } = storeToRefs(mainStore)\n const { viewportRatio } = storeToRefs(useSlidesStore())\n\n // 初始化画布可视区域的位置\n const initViewportPosition = () => {\n if (!canvasRef.value) return\n const canvasWidth = canvasRef.value.clientWidth\n const canvasHeight = canvasRef.value.clientHeight\n\n if (canvasHeight / canvasWidth > viewportRatio.value) {\n const viewportActualWidth = canvasWidth * (canvasPercentage.value / 100)\n mainStore.setCanvasScale(viewportActualWidth / VIEWPORT_SIZE)\n viewportLeft.value = (canvasWidth - viewportActualWidth) / 2\n viewportTop.value = (canvasHeight - viewportActualWidth * viewportRatio.value) / 2\n }\n else {\n const viewportActualHeight = canvasHeight * (canvasPercentage.value / 100)\n mainStore.setCanvasScale(viewportActualHeight / (VIEWPORT_SIZE * viewportRatio.value))\n viewportLeft.value = (canvasWidth - viewportActualHeight / viewportRatio.value) / 2\n viewportTop.value = (canvasHeight - viewportActualHeight) / 2\n }\n }\n\n // 更新画布可视区域的位置\n const setViewportPosition = (newValue: number, oldValue: number) => {\n if (!canvasRef.value) return\n const canvasWidth = canvasRef.value.clientWidth\n const canvasHeight = canvasRef.value.clientHeight\n\n const newViewportActualWidth = canvasWidth * (newValue / 100)\n const oldViewportActualWidth = canvasWidth * (oldValue / 100)\n const newViewportActualHeight = canvasHeight * (newValue / 100)\n const oldViewportActualHeight = canvasHeight * (oldValue / 100)\n\n if (canvasHeight / canvasWidth > viewportRatio.value) {\n mainStore.setCanvasScale(newViewportActualWidth / VIEWPORT_SIZE)\n }\n else {\n mainStore.setCanvasScale(newViewportActualHeight / (VIEWPORT_SIZE * viewportRatio.value))\n }\n viewportLeft.value = viewportLeft.value - (newViewportActualWidth - oldViewportActualWidth) / 2\n viewportTop.value = viewportTop.value - (newViewportActualHeight - oldViewportActualHeight) / 2\n }\n\n // 可视区域缩放或比例变化时,重置/更新可视区域的位置\n watch(canvasPercentage, setViewportPosition)\n watch(viewportRatio, initViewportPosition)\n\n // 画布拖拽状态改变(复原)时,重置可视区域的位置\n watch(canvasDragged, () => {\n if (!canvasDragged.value) initViewportPosition()\n })\n\n // 画布可视区域位置和大小的样式\n const viewportStyles = computed(() => ({\n width: VIEWPORT_SIZE,\n height: VIEWPORT_SIZE * viewportRatio.value,\n left: viewportLeft.value,\n top: viewportTop.value,\n }))\n\n // 监听画布尺寸发生变化时,重置可视区域的位置\n const resizeObserver = new ResizeObserver(initViewportPosition)\n\n onMounted(() => {\n if (canvasRef.value) resizeObserver.observe(canvasRef.value)\n })\n onUnmounted(() => {\n if (canvasRef.value) resizeObserver.unobserve(canvasRef.value)\n })\n\n // 拖拽画布\n const dragViewport = (e: MouseEvent) => {\n let isMouseDown = true\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const originLeft = viewportLeft.value\n const originTop = viewportTop.value\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n viewportLeft.value = originLeft + (currentPageX - startPageX)\n viewportTop.value = originTop + (currentPageY - startPageY)\n }\n\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n mainStore.setCanvasDragged(true)\n }\n }\n\n return {\n viewportStyles,\n dragViewport,\n }\n}","import { type Ref, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { getElementRange } from '@/utils/element'\n\nexport default (elementList: Ref, viewportRef: Ref) => {\n const mainStore = useMainStore()\n const { canvasScale, hiddenElementIdList } = storeToRefs(mainStore)\n\n const mouseSelectionVisible = ref(false)\n const mouseSelectionQuadrant = ref(1)\n const mouseSelection = ref({\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n })\n\n // 更新鼠标框选范围\n const updateMouseSelection = (e: MouseEvent) => {\n if (!viewportRef.value) return\n\n let isMouseDown = true\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const minSelectionRange = 5\n \n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const left = (startPageX - viewportRect.x) / canvasScale.value\n const top = (startPageY - viewportRect.y) / canvasScale.value\n\n // 确定框选的起始位置和其他默认值初始化\n mouseSelection.value = {\n top: top,\n left: left,\n width: 0,\n height: 0,\n }\n mouseSelectionVisible.value = false\n mouseSelectionQuadrant.value = 4\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n const offsetWidth = (currentPageX - startPageX) / canvasScale.value\n const offsetHeight = (currentPageY - startPageY) / canvasScale.value\n\n const width = Math.abs(offsetWidth)\n const height = Math.abs(offsetHeight)\n\n if ( width < minSelectionRange || height < minSelectionRange ) return\n \n // 计算鼠标框选(移动)的方向\n // 按四个象限的位置区分,如右下角为第四象限\n let quadrant = 0\n if ( offsetWidth > 0 && offsetHeight > 0 ) quadrant = 4\n else if ( offsetWidth < 0 && offsetHeight < 0 ) quadrant = 2\n else if ( offsetWidth > 0 && offsetHeight < 0 ) quadrant = 1\n else if ( offsetWidth < 0 && offsetHeight > 0 ) quadrant = 3\n\n // 更新框选范围\n mouseSelection.value = {\n ...mouseSelection.value,\n width: width,\n height: height,\n }\n mouseSelectionVisible.value = true\n mouseSelectionQuadrant.value = quadrant\n }\n\n document.onmouseup = () => {\n document.onmousemove = null\n document.onmouseup = null\n isMouseDown = false\n\n // 计算画布中的元素是否处在鼠标选择范围中,处在范围中的元素设置为被选中状态\n let inRangeElementList: PPTElement[] = []\n for (let i = 0; i < elementList.value.length; i++) {\n const element = elementList.value[i]\n const mouseSelectionLeft = mouseSelection.value.left\n const mouseSelectionTop = mouseSelection.value.top\n const mouseSelectionWidth = mouseSelection.value.width\n const mouseSelectionHeight = mouseSelection.value.height\n\n const { minX, maxX, minY, maxY } = getElementRange(element)\n\n // 计算元素是否处在框选范围内时,四个框选方向的计算方式有差异\n let isInclude = false\n if (mouseSelectionQuadrant.value === 4) {\n isInclude = minX > mouseSelectionLeft && \n maxX < mouseSelectionLeft + mouseSelectionWidth && \n minY > mouseSelectionTop && \n maxY < mouseSelectionTop + mouseSelectionHeight\n }\n else if (mouseSelectionQuadrant.value === 2) {\n isInclude = minX > (mouseSelectionLeft - mouseSelectionWidth) && \n maxX < (mouseSelectionLeft - mouseSelectionWidth) + mouseSelectionWidth && \n minY > (mouseSelectionTop - mouseSelectionHeight) && \n maxY < (mouseSelectionTop - mouseSelectionHeight) + mouseSelectionHeight\n }\n else if (mouseSelectionQuadrant.value === 1) {\n isInclude = minX > mouseSelectionLeft && \n maxX < mouseSelectionLeft + mouseSelectionWidth && \n minY > (mouseSelectionTop - mouseSelectionHeight) && \n maxY < (mouseSelectionTop - mouseSelectionHeight) + mouseSelectionHeight\n }\n else if (mouseSelectionQuadrant.value === 3) {\n isInclude = minX > (mouseSelectionLeft - mouseSelectionWidth) && \n maxX < (mouseSelectionLeft - mouseSelectionWidth) + mouseSelectionWidth && \n minY > mouseSelectionTop && \n maxY < mouseSelectionTop + mouseSelectionHeight\n }\n\n // 被锁定或被隐藏的元素即使在范围内,也不需要设置为选中状态\n if (isInclude && !element.lock && !hiddenElementIdList.value.includes(element.id)) inRangeElementList.push(element)\n }\n\n // 如果范围内有组合元素的成员,需要该组全部成员都处在范围内,才会被设置为选中状态\n inRangeElementList = inRangeElementList.filter(inRangeElement => {\n if (inRangeElement.groupId) {\n const inRangeElementIdList = inRangeElementList.map(inRangeElement => inRangeElement.id)\n const groupElementList = elementList.value.filter(element => element.groupId === inRangeElement.groupId)\n return groupElementList.every(groupElement => inRangeElementIdList.includes(groupElement.id))\n }\n return true\n })\n const inRangeElementIdList = inRangeElementList.map(inRangeElement => inRangeElement.id)\n mainStore.setActiveElementIdList(inRangeElementIdList)\n\n mouseSelectionVisible.value = false\n }\n }\n\n return {\n mouseSelection,\n mouseSelectionVisible,\n mouseSelectionQuadrant,\n updateMouseSelection,\n }\n}","import { onMounted, onUnmounted, type Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport { getImageDataURL } from '@/utils/image'\nimport { parseText2Paragraphs } from '@/utils/textParser'\nimport useCreateElement from '@/hooks/useCreateElement'\n\nexport default (elementRef: Ref) => {\n const { disableHotkeys } = storeToRefs(useMainStore())\n\n const { createImageElement, createTextElement } = useCreateElement()\n\n // 拖拽元素到画布中\n const handleDrop = (e: DragEvent) => {\n if (!e.dataTransfer || e.dataTransfer.items.length === 0) return\n const dataTransferItem = e.dataTransfer.items[0]\n\n // 检查事件对象中是否存在图片,存在则插入图片,否则继续检查是否存在文字,存在则插入文字\n if (dataTransferItem.kind === 'file' && dataTransferItem.type.indexOf('image') !== -1) {\n const imageFile = dataTransferItem.getAsFile()\n if (imageFile) {\n getImageDataURL(imageFile).then(dataURL => createImageElement(dataURL))\n }\n }\n else if (dataTransferItem.kind === 'string' && dataTransferItem.type === 'text/plain') {\n dataTransferItem.getAsString(text => {\n if (disableHotkeys.value) return\n const string = parseText2Paragraphs(text)\n createTextElement({\n left: 0,\n top: 0,\n width: 600,\n height: 50,\n }, { content: string })\n })\n }\n }\n\n onMounted(() => {\n elementRef.value && elementRef.value.addEventListener('drop', handleDrop)\n\n document.ondragleave = e => e.preventDefault()\n document.ondrop = e => e.preventDefault()\n document.ondragenter = e => e.preventDefault()\n document.ondragover = e => e.preventDefault()\n })\n onUnmounted(() => {\n elementRef.value && elementRef.value.removeEventListener('drop', handleDrop)\n\n document.ondragleave = null\n document.ondrop = null\n document.ondragenter = null\n document.ondragover = null\n })\n}","import type { Ref } from 'vue'\nimport { useSlidesStore } from '@/store'\nimport type { PPTElement, PPTLineElement, PPTVideoElement, PPTAudioElement, PPTChartElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\n/**\n * 计算给定坐标到原点连线的弧度\n * @param x 坐标x\n * @param y 坐标y\n */\nconst getAngleFromCoordinate = (x: number, y: number) => {\n const radian = Math.atan2(x, y)\n const angle = 180 / Math.PI * radian\n return angle\n}\n\nexport default (\n elementList: Ref,\n viewportRef: Ref,\n canvasScale: Ref,\n) => {\n const slidesStore = useSlidesStore()\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 旋转元素\n const rotateElement = (e: MouseEvent | TouchEvent, element: Exclude) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n \n let isMouseDown = true\n let angle = 0\n const elOriginRotate = element.rotate || 0\n\n const elLeft = element.left\n const elTop = element.top\n const elWidth = element.width\n const elHeight = element.height\n\n // 元素中心点(旋转中心点)\n const centerX = elLeft + elWidth / 2\n const centerY = elTop + elHeight / 2\n\n if (!viewportRef.value) return\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n if (!isMouseDown) return\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n \n // 计算当前鼠标位置相对元素中心点连线的角度(弧度)\n const mouseX = (currentPageX - viewportRect.left) / canvasScale.value\n const mouseY = (currentPageY - viewportRect.top) / canvasScale.value\n const x = mouseX - centerX\n const y = centerY - mouseY\n\n angle = getAngleFromCoordinate(x, y)\n\n // 靠近45倍数的角度时有吸附效果\n const sorptionRange = 5\n if ( Math.abs(angle) <= sorptionRange ) angle = 0\n else if ( angle > 0 && Math.abs(angle - 45) <= sorptionRange ) angle -= (angle - 45)\n else if ( angle < 0 && Math.abs(angle + 45) <= sorptionRange ) angle -= (angle + 45)\n else if ( angle > 0 && Math.abs(angle - 90) <= sorptionRange ) angle -= (angle - 90)\n else if ( angle < 0 && Math.abs(angle + 90) <= sorptionRange ) angle -= (angle + 90)\n else if ( angle > 0 && Math.abs(angle - 135) <= sorptionRange ) angle -= (angle - 135)\n else if ( angle < 0 && Math.abs(angle + 135) <= sorptionRange ) angle -= (angle + 135)\n else if ( angle > 0 && Math.abs(angle - 180) <= sorptionRange ) angle -= (angle - 180)\n else if ( angle < 0 && Math.abs(angle + 180) <= sorptionRange ) angle -= (angle + 180)\n\n elementList.value = elementList.value.map(el => element.id === el.id ? { ...el, rotate: angle } : el)\n }\n\n const handleMouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n if (elOriginRotate === angle) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n return {\n rotateElement,\n }\n}","export const ELEMENT_TYPE_ZH: { [key: string]: string } = {\n text: '文本',\n image: '图片',\n shape: '形状',\n line: '线条',\n chart: '图表',\n table: '表格',\n video: '视频',\n audio: '音频',\n latex: '公式',\n}\n\nexport const MIN_SIZE: { [key: string]: number } = {\n text: 20,\n image: 20,\n shape: 15,\n chart: 200,\n table: 20,\n video: 250,\n audio: 20,\n latex: 20,\n}","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport type { PPTElement, PPTImageElement, PPTLineElement, PPTShapeElement } from '@/types/slides'\nimport { OperateResizeHandlers, type AlignmentLineProps, type MultiSelectRange } from '@/types/edit'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport { MIN_SIZE } from '@/configs/element'\nimport { SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport { type AlignLine, uniqAlignLines } from '@/utils/element'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\ninterface RotateElementData {\n left: number\n top: number\n width: number\n height: number\n}\n\n/**\n * 计算旋转后的元素八个缩放点的位置\n * @param element 元素原始位置大小信息\n * @param angle 旋转角度\n */\nconst getRotateElementPoints = (element: RotateElementData, angle: number) => {\n const { left, top, width, height } = element\n\n const radius = Math.sqrt( Math.pow(width, 2) + Math.pow(height, 2) ) / 2\n const auxiliaryAngle = Math.atan(height / width) * 180 / Math.PI\n\n const tlbraRadian = (180 - angle - auxiliaryAngle) * Math.PI / 180\n const trblaRadian = (auxiliaryAngle - angle) * Math.PI / 180\n const taRadian = (90 - angle) * Math.PI / 180\n const raRadian = angle * Math.PI / 180\n\n const halfWidth = width / 2\n const halfHeight = height / 2\n\n const middleLeft = left + halfWidth\n const middleTop = top + halfHeight\n\n const leftTopPoint = {\n left: middleLeft + radius * Math.cos(tlbraRadian),\n top: middleTop - radius * Math.sin(tlbraRadian),\n }\n const topPoint = {\n left: middleLeft + halfHeight * Math.cos(taRadian),\n top: middleTop - halfHeight * Math.sin(taRadian),\n }\n const rightTopPoint = {\n left: middleLeft + radius * Math.cos(trblaRadian),\n top: middleTop - radius * Math.sin(trblaRadian),\n }\n const rightPoint = {\n left: middleLeft + halfWidth * Math.cos(raRadian),\n top: middleTop + halfWidth * Math.sin(raRadian),\n }\n const rightBottomPoint = {\n left: middleLeft - radius * Math.cos(tlbraRadian),\n top: middleTop + radius * Math.sin(tlbraRadian),\n }\n const bottomPoint = {\n left: middleLeft - halfHeight * Math.sin(raRadian),\n top: middleTop + halfHeight * Math.cos(raRadian),\n }\n const leftBottomPoint = {\n left: middleLeft - radius * Math.cos(trblaRadian),\n top: middleTop + radius * Math.sin(trblaRadian),\n }\n const leftPoint = {\n left: middleLeft - halfWidth * Math.cos(raRadian),\n top: middleTop - halfWidth * Math.sin(raRadian),\n }\n\n return { leftTopPoint, topPoint, rightTopPoint, rightPoint, rightBottomPoint, bottomPoint, leftBottomPoint, leftPoint }\n}\n\n/**\n * 获取元素某缩放点相对的另一个点的位置,如:【上】对应【下】、【左上】对应【右下】\n * @param direction 当前操作的缩放点\n * @param points 旋转后的元素八个缩放点的位置\n */\nconst getOppositePoint = (direction: OperateResizeHandlers, points: ReturnType): { left: number; top: number } => {\n const oppositeMap = {\n [OperateResizeHandlers.RIGHT_BOTTOM]: points.leftTopPoint,\n [OperateResizeHandlers.LEFT_BOTTOM]: points.rightTopPoint,\n [OperateResizeHandlers.LEFT_TOP]: points.rightBottomPoint,\n [OperateResizeHandlers.RIGHT_TOP]: points.leftBottomPoint,\n [OperateResizeHandlers.TOP]: points.bottomPoint,\n [OperateResizeHandlers.BOTTOM]: points.topPoint,\n [OperateResizeHandlers.LEFT]: points.rightPoint,\n [OperateResizeHandlers.RIGHT]: points.leftPoint,\n }\n return oppositeMap[direction]\n}\n\nexport default (\n elementList: Ref,\n alignmentLines: Ref,\n canvasScale: Ref,\n) => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeGroupElementId } = storeToRefs(mainStore)\n const { viewportRatio } = storeToRefs(slidesStore)\n const { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 缩放元素\n const scaleElement = (e: MouseEvent | TouchEvent, element: Exclude, command: OperateResizeHandlers) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n\n let isMouseDown = true\n mainStore.setScalingState(true)\n\n const elOriginLeft = element.left\n const elOriginTop = element.top\n const elOriginWidth = element.width\n const elOriginHeight = element.height\n\n const originTableCellMinHeight = element.type === 'table' ? element.cellMinHeight : 0\n \n const elRotate = ('rotate' in element && element.rotate) ? element.rotate : 0\n const rotateRadian = Math.PI * elRotate / 180\n\n const fixedRatio = ctrlOrShiftKeyActive.value || ('fixedRatio' in element && element.fixedRatio)\n const aspectRatio = elOriginWidth / elOriginHeight\n\n const startPageX = isTouchEvent ? e.changedTouches[0].pageX : e.pageX\n const startPageY = isTouchEvent ? e.changedTouches[0].pageY : e.pageY\n\n // 元素最小缩放限制\n const minSize = MIN_SIZE[element.type] || 20\n const getSizeWithinRange = (size: number) => size < minSize ? minSize : size\n const getHeightWithinRange = (height: number) => {\n const minHeight = minSize / aspectRatio\n return height < minHeight ? minHeight : height\n }\n\n let points: ReturnType\n let baseLeft = 0\n let baseTop = 0\n let horizontalLines: AlignLine[] = []\n let verticalLines: AlignLine[] = []\n\n // 旋转后的元素进行缩放时,引入基点的概念,以当前操作的缩放点相对的点为基点\n // 例如拖动右下角缩放时,左上角为基点,需要保持左上角不变然后修改其他的点的位置来达到所放的效果\n if ('rotate' in element && element.rotate) {\n const { left, top, width, height } = element\n points = getRotateElementPoints({ left, top, width, height }, elRotate)\n const oppositePoint = getOppositePoint(command, points)\n\n baseLeft = oppositePoint.left\n baseTop = oppositePoint.top\n }\n\n // 未旋转的元素具有缩放时的对齐吸附功能,在此处收集对齐对齐吸附线\n // 包括页面内除目标元素外的其他元素在画布中的各个可吸附对齐位置:上下左右四边\n // 其中线条和被旋转过的元素不参与吸附对齐\n else {\n const edgeWidth = VIEWPORT_SIZE\n const edgeHeight = VIEWPORT_SIZE * viewportRatio.value\n const isActiveGroupElement = element.id === activeGroupElementId.value\n \n for (const el of elementList.value) {\n if ('rotate' in el && el.rotate) continue\n if (el.type === 'line') continue\n if (isActiveGroupElement && el.id === element.id) continue\n if (!isActiveGroupElement && activeElementIdList.value.includes(el.id)) continue\n\n const left = el.left\n const top = el.top\n const width = el.width\n const height = el.height\n const right = left + width\n const bottom = top + height\n\n const topLine: AlignLine = { value: top, range: [left, right] }\n const bottomLine: AlignLine = { value: bottom, range: [left, right] }\n const leftLine: AlignLine = { value: left, range: [top, bottom] }\n const rightLine: AlignLine = { value: right, range: [top, bottom] }\n\n horizontalLines.push(topLine, bottomLine)\n verticalLines.push(leftLine, rightLine)\n }\n\n // 画布可视区域的四个边界、水平中心、垂直中心\n const edgeTopLine: AlignLine = { value: 0, range: [0, edgeWidth] }\n const edgeBottomLine: AlignLine = { value: edgeHeight, range: [0, edgeWidth] }\n const edgeHorizontalCenterLine: AlignLine = { value: edgeHeight / 2, range: [0, edgeWidth] }\n const edgeLeftLine: AlignLine = { value: 0, range: [0, edgeHeight] }\n const edgeRightLine: AlignLine = { value: edgeWidth, range: [0, edgeHeight] }\n const edgeVerticalCenterLine: AlignLine = { value: edgeWidth / 2, range: [0, edgeHeight] }\n\n horizontalLines.push(edgeTopLine, edgeBottomLine, edgeHorizontalCenterLine)\n verticalLines.push(edgeLeftLine, edgeRightLine, edgeVerticalCenterLine)\n \n horizontalLines = uniqAlignLines(horizontalLines)\n verticalLines = uniqAlignLines(verticalLines)\n }\n \n // 对齐吸附方法\n // 将收集到的对齐吸附线与计算的目标元素当前的位置大小相关数据做对比,差值小于设定的值时执行自动缩放校正\n // 水平和垂直两个方向需要分开计算\n const alignedAdsorption = (currentX: number | null, currentY: number | null) => {\n const sorptionRange = 5\n\n const _alignmentLines: AlignmentLineProps[] = []\n let isVerticalAdsorbed = false\n let isHorizontalAdsorbed = false\n const correctionVal = { offsetX: 0, offsetY: 0 }\n \n if (currentY || currentY === 0) {\n for (let i = 0; i < horizontalLines.length; i++) {\n const { value, range } = horizontalLines[i]\n const min = Math.min(...range, currentX || 0)\n const max = Math.max(...range, currentX || 0)\n \n if (Math.abs(currentY - value) < sorptionRange && !isHorizontalAdsorbed) {\n correctionVal.offsetY = currentY - value\n isHorizontalAdsorbed = true\n _alignmentLines.push({ type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100 })\n }\n }\n }\n if (currentX || currentX === 0) {\n for (let i = 0; i < verticalLines.length; i++) {\n const { value, range } = verticalLines[i]\n const min = Math.min(...range, (currentY || 0))\n const max = Math.max(...range, (currentY || 0))\n\n if (Math.abs(currentX - value) < sorptionRange && !isVerticalAdsorbed) {\n correctionVal.offsetX = currentX - value\n isVerticalAdsorbed = true\n _alignmentLines.push({ type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100 })\n }\n }\n }\n alignmentLines.value = _alignmentLines\n return correctionVal\n }\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n if (!isMouseDown) return\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n const x = currentPageX - startPageX\n const y = currentPageY - startPageY\n\n let width = elOriginWidth\n let height = elOriginHeight\n let left = elOriginLeft\n let top = elOriginTop\n \n // 元素被旋转的情况下,需要根据元素旋转的角度,重新计算需要缩放的距离(鼠标按下后移动的距离)\n if (elRotate) {\n const revisedX = (Math.cos(rotateRadian) * x + Math.sin(rotateRadian) * y) / canvasScale.value\n let revisedY = (Math.cos(rotateRadian) * y - Math.sin(rotateRadian) * x) / canvasScale.value\n\n // 锁定宽高比例(仅四个角可能触发,四条边不会触发)\n // 以水平方向上缩放的距离为基础,计算垂直方向上的缩放距离,保持二者具有相同的缩放比例\n if (fixedRatio) {\n if (command === OperateResizeHandlers.RIGHT_BOTTOM || command === OperateResizeHandlers.LEFT_TOP) revisedY = revisedX / aspectRatio\n if (command === OperateResizeHandlers.LEFT_BOTTOM || command === OperateResizeHandlers.RIGHT_TOP) revisedY = -revisedX / aspectRatio\n }\n\n // 根据不同的操作点分别计算元素缩放后的大小和位置\n // 需要注意:\n // 此处计算的位置需要在后面重新进行校正,因为旋转后再缩放事实上会改变元素基点的位置(虽然视觉上基点保持不动,但这是【旋转】+【移动】共同作用的结果)\n // 但此处计算的大小不需要重新校正,因为前面已经重新计算需要缩放的距离,相当于大小已经经过了校正\n if (command === OperateResizeHandlers.RIGHT_BOTTOM) {\n width = getSizeWithinRange(elOriginWidth + revisedX)\n height = getHeightWithinRange(elOriginHeight + revisedY)\n }\n else if (command === OperateResizeHandlers.LEFT_BOTTOM) {\n width = getSizeWithinRange(elOriginWidth - revisedX)\n height = getHeightWithinRange(elOriginHeight + revisedY)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.LEFT_TOP) {\n width = getSizeWithinRange(elOriginWidth - revisedX)\n height = getHeightWithinRange(elOriginHeight - revisedY)\n left = elOriginLeft - (width - elOriginWidth)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.RIGHT_TOP) {\n width = getSizeWithinRange(elOriginWidth + revisedX)\n height = getHeightWithinRange(elOriginHeight - revisedY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.TOP) {\n height = getSizeWithinRange(elOriginHeight - revisedY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.BOTTOM) {\n height = getSizeWithinRange(elOriginHeight + revisedY)\n }\n else if (command === OperateResizeHandlers.LEFT) {\n width = getSizeWithinRange(elOriginWidth - revisedX)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.RIGHT) {\n width = getSizeWithinRange(elOriginWidth + revisedX)\n }\n\n // 获取当前元素的基点坐标,与初始状态时的基点坐标进行对比,并计算差值进行元素位置的校正\n const currentPoints = getRotateElementPoints({ width, height, left, top }, elRotate)\n const currentOppositePoint = getOppositePoint(command, currentPoints)\n const currentBaseLeft = currentOppositePoint.left\n const currentBaseTop = currentOppositePoint.top\n\n const offsetX = currentBaseLeft - baseLeft\n const offsetY = currentBaseTop - baseTop\n\n left = left - offsetX\n top = top - offsetY\n }\n\n // 元素未被旋转的情况下,正常计算新的位置大小即可,无需复杂的校正等工作\n // 额外需要处理对齐吸附相关的操作\n // 锁定宽高比例相关的操作同上,不再赘述\n else {\n let moveX = x / canvasScale.value\n let moveY = y / canvasScale.value\n\n if (fixedRatio) {\n if (command === OperateResizeHandlers.RIGHT_BOTTOM || command === OperateResizeHandlers.LEFT_TOP) moveY = moveX / aspectRatio\n if (command === OperateResizeHandlers.LEFT_BOTTOM || command === OperateResizeHandlers.RIGHT_TOP) moveY = -moveX / aspectRatio\n }\n\n if (command === OperateResizeHandlers.RIGHT_BOTTOM) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + elOriginWidth + moveX, elOriginTop + elOriginHeight + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = moveY * aspectRatio\n else moveY = moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth + moveX)\n height = getHeightWithinRange(elOriginHeight + moveY)\n }\n else if (command === OperateResizeHandlers.LEFT_BOTTOM) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + moveX, elOriginTop + elOriginHeight + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = -moveY * aspectRatio\n else moveY = -moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth - moveX)\n height = getHeightWithinRange(elOriginHeight + moveY)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.LEFT_TOP) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + moveX, elOriginTop + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = moveY * aspectRatio\n else moveY = moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth - moveX)\n height = getHeightWithinRange(elOriginHeight - moveY)\n left = elOriginLeft - (width - elOriginWidth)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.RIGHT_TOP) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + elOriginWidth + moveX, elOriginTop + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = -moveY * aspectRatio\n else moveY = -moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth + moveX)\n height = getHeightWithinRange(elOriginHeight - moveY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.LEFT) {\n const { offsetX } = alignedAdsorption(elOriginLeft + moveX, null)\n moveX = moveX - offsetX\n width = getSizeWithinRange(elOriginWidth - moveX)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.RIGHT) {\n const { offsetX } = alignedAdsorption(elOriginLeft + elOriginWidth + moveX, null)\n moveX = moveX - offsetX\n width = getSizeWithinRange(elOriginWidth + moveX)\n }\n else if (command === OperateResizeHandlers.TOP) {\n const { offsetY } = alignedAdsorption(null, elOriginTop + moveY)\n moveY = moveY - offsetY\n height = getSizeWithinRange(elOriginHeight - moveY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.BOTTOM) {\n const { offsetY } = alignedAdsorption(null, elOriginTop + elOriginHeight + moveY)\n moveY = moveY - offsetY\n height = getSizeWithinRange(elOriginHeight + moveY)\n }\n }\n \n elementList.value = elementList.value.map(el => {\n if (element.id !== el.id) return el\n if (el.type === 'shape' && 'pathFormula' in el && el.pathFormula) {\n const pathFormula = SHAPE_PATH_FORMULAS[el.pathFormula]\n\n let path = ''\n if ('editable' in pathFormula) path = pathFormula.formula(width, height, el.keypoint!)\n else path = pathFormula.formula(width, height)\n\n return {\n ...el, left, top, width, height,\n viewBox: [width, height],\n path,\n }\n }\n if (el.type === 'table') {\n let cellMinHeight = originTableCellMinHeight + (height - elOriginHeight) / el.data.length\n cellMinHeight = cellMinHeight < 36 ? 36 : cellMinHeight\n\n if (cellMinHeight === originTableCellMinHeight) return { ...el, left, width }\n return {\n ...el, left, top, width, height,\n cellMinHeight: cellMinHeight < 36 ? 36 : cellMinHeight,\n }\n }\n return { ...el, left, top, width, height }\n })\n }\n\n const handleMouseup = (e: MouseEvent | TouchEvent) => {\n isMouseDown = false\n \n document.ontouchmove = null\n document.ontouchend = null\n document.onmousemove = null\n document.onmouseup = null\n\n alignmentLines.value = []\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n \n if (startPageX === currentPageX && startPageY === currentPageY) return\n \n slidesStore.updateSlide({ elements: elementList.value })\n mainStore.setScalingState(false)\n \n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n // 多选元素缩放\n const scaleMultiElement = (e: MouseEvent, range: MultiSelectRange, command: OperateResizeHandlers) => {\n let isMouseDown = true\n \n const { minX, maxX, minY, maxY } = range\n const operateWidth = maxX - minX\n const operateHeight = maxY - minY\n const aspectRatio = operateWidth / operateHeight\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const originElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList.value))\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n \n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n const x = (currentPageX - startPageX) / canvasScale.value\n let y = (currentPageY - startPageY) / canvasScale.value\n\n // 锁定宽高比例,逻辑同上\n if (ctrlOrShiftKeyActive.value) {\n if (command === OperateResizeHandlers.RIGHT_BOTTOM || command === OperateResizeHandlers.LEFT_TOP) y = x / aspectRatio\n if (command === OperateResizeHandlers.LEFT_BOTTOM || command === OperateResizeHandlers.RIGHT_TOP) y = -x / aspectRatio\n }\n\n // 所有选中元素的整体范围\n let currentMinX = minX\n let currentMaxX = maxX\n let currentMinY = minY\n let currentMaxY = maxY\n\n if (command === OperateResizeHandlers.RIGHT_BOTTOM) {\n currentMaxX = maxX + x\n currentMaxY = maxY + y\n }\n else if (command === OperateResizeHandlers.LEFT_BOTTOM) {\n currentMinX = minX + x\n currentMaxY = maxY + y\n }\n else if (command === OperateResizeHandlers.LEFT_TOP) {\n currentMinX = minX + x\n currentMinY = minY + y\n }\n else if (command === OperateResizeHandlers.RIGHT_TOP) {\n currentMaxX = maxX + x\n currentMinY = minY + y\n }\n else if (command === OperateResizeHandlers.TOP) {\n currentMinY = minY + y\n }\n else if (command === OperateResizeHandlers.BOTTOM) {\n currentMaxY = maxY + y\n }\n else if (command === OperateResizeHandlers.LEFT) {\n currentMinX = minX + x\n }\n else if (command === OperateResizeHandlers.RIGHT) {\n currentMaxX = maxX + x\n }\n\n // 所有选中元素的整体宽高\n const currentOppositeWidth = currentMaxX - currentMinX\n const currentOppositeHeight = currentMaxY - currentMinY\n\n // 当前正在操作元素宽高占所有选中元素的整体宽高的比例\n let widthScale = currentOppositeWidth / operateWidth\n let heightScale = currentOppositeHeight / operateHeight\n\n if (widthScale <= 0) widthScale = 0\n if (heightScale <= 0) heightScale = 0\n \n // 根据前面计算的比例,计算并修改所有选中元素的位置大小\n elementList.value = elementList.value.map(el => {\n if ((el.type === 'image' || el.type === 'shape') && activeElementIdList.value.includes(el.id)) {\n const originElement = originElementList.find(originEl => originEl.id === el.id) as PPTImageElement | PPTShapeElement\n return {\n ...el,\n width: originElement.width * widthScale,\n height: originElement.height * heightScale,\n left: currentMinX + (originElement.left - minX) * widthScale,\n top: currentMinY + (originElement.top - minY) * heightScale,\n }\n }\n return el\n })\n }\n\n document.onmouseup = e => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n if (startPageX === e.pageX && startPageY === e.pageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n }\n\n return {\n scaleElement,\n scaleMultiElement,\n }\n}","export const enum ClipPathTypes {\n RECT = 'rect',\n ELLIPSE = 'ellipse',\n POLYGON = 'polygon',\n}\n\nexport const enum ClipPaths {\n RECT = 'rect',\n ROUNDRECT = 'roundRect',\n ELLIPSE = 'ellipse',\n TRIANGLE = 'triangle',\n PENTAGON = 'pentagon',\n RHOMBUS = 'rhombus',\n STAR = 'star',\n}\n\ninterface ClipPath {\n [key: string]: {\n name: string\n type: ClipPathTypes\n style: string\n radius?: string\n createPath?: (width: number, height: number) => string\n }\n}\n\nexport const CLIPPATHS: ClipPath = {\n rect: {\n name: '矩形',\n type: ClipPathTypes.RECT,\n radius: '0',\n style: '',\n },\n rect2: {\n name: '矩形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width * 0.8} 0 L ${width} ${height * 0.2} L ${width} ${height} L 0 ${height} Z`\n },\n },\n rect3: {\n name: '矩形3',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width * 0.8} 0 L ${width} ${height * 0.2} L ${width} ${height} L ${width * 0.2} ${height} L 0 ${height * 0.8} Z`\n },\n },\n roundRect: {\n name: '圆角矩形',\n type: ClipPathTypes.RECT,\n radius: '10px',\n style: 'inset(0 0 0 0 round 10px 10px 10px 10px)',\n },\n ellipse: {\n name: '圆形',\n type: ClipPathTypes.ELLIPSE,\n style: 'ellipse(50% 50% at 50% 50%)',\n },\n triangle: {\n name: '三角形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 0% 100%, 100% 100%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L 0 ${height} L ${width} ${height} Z`\n },\n },\n triangle2: {\n name: '三角形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 100%, 0% 0%, 100% 0%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} ${height} L 0 0 L ${width} 0 Z`\n },\n },\n triangle3: {\n name: '三角形3',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 0% 100%, 100% 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L 0 ${height} L ${width} ${height} Z`\n },\n },\n rhombus: {\n name: '菱形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L ${width} ${height * 0.5} L ${width * 0.5} ${height} L 0 ${height * 0.5} Z`\n },\n },\n pentagon: {\n name: '五边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L ${width} ${0.38 * height} L ${0.82 * width} ${height} L ${0.18 * width} ${height} L 0 ${0.38 * height} Z`\n },\n },\n hexagon: {\n name: '六边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.2} 0 L ${width * 0.8} 0 L ${width} ${height * 0.5} L ${width * 0.8} ${height} L ${width * 0.2} ${height} L 0 ${height * 0.5} Z`\n },\n },\n heptagon: {\n name: '七边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L ${width * 0.9} ${height * 0.2} L ${width} ${height * 0.6} L ${width * 0.75} ${height} L ${width * 0.25} ${height} L 0 ${height * 0.6} L ${width * 0.1} ${height * 0.2} Z`\n },\n },\n octagon: {\n name: '八边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.3} 0 L ${width * 0.7} 0 L ${width} ${height * 0.3} L ${width} ${height * 0.7} L ${width * 0.7} ${height} L ${width * 0.3} ${height} L 0 ${height * 0.7} L 0 ${height * 0.3} Z`\n },\n },\n chevron: {\n name: 'V形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.75} 0 L ${width} ${height * 0.5} L ${width * 0.75} ${height} L 0 ${height} L ${width * 0.25} ${height * 0.5} L 0 0 Z`\n },\n },\n point: {\n name: '点',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width * 0.75} 0 L ${width} ${height * 0.5} L ${width * 0.75} ${height} L 0 ${height} Z`\n },\n },\n arrow: {\n name: '箭头',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)',\n createPath: (width: number, height: number) => {\n return `M 0 ${height * 0.2} L ${width * 0.6} ${height * 0.2} L ${width * 0.6} 0 L ${width} ${height * 0.5} L ${width * 0.6} ${height} L ${width * 0.6} ${height * 0.8} L 0 ${height * 0.8} Z`\n },\n },\n parallelogram: {\n name: '平行四边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.3} 0 L ${width} 0 L ${width * 0.7} ${height} L 0 ${height} Z`\n },\n },\n parallelogram2: {\n name: '平行四边形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.3} ${height} L ${width} ${height} L ${width * 0.7} 0 L 0 0 Z`\n },\n },\n trapezoid: {\n name: '梯形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.25} 0 L ${width * 0.75} 0 L ${width} ${height} L 0 ${height} Z`\n },\n },\n trapezoid2: {\n name: '梯形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width} 0 L ${width * 0.75} ${height} L ${width * 0.25} ${height} Z`\n },\n },\n}","import type { Ref } from 'vue'\nimport { uniq } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useKeyboardStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\n\nexport default (\n elementList: Ref,\n moveElement: (e: MouseEvent | TouchEvent, element: PPTElement) => void,\n) => {\n const mainStore = useMainStore()\n const { activeElementIdList, activeGroupElementId, handleElementId, editorAreaFocus } = storeToRefs(mainStore)\n const { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\n // 选中元素\n // startMove 表示是否需要再选中操作后进入到开始移动的状态\n const selectElement = (e: MouseEvent | TouchEvent, element: PPTElement, startMove = true) => {\n if (!editorAreaFocus.value) mainStore.setEditorareaFocus(true)\n\n // 如果目标元素当前未被选中,则将他设为选中状态\n // 此时如果按下Ctrl键或Shift键,则进入多选状态,将当前已选中的元素和目标元素一起设置为选中状态,否则仅将目标元素设置为选中状态\n // 如果目标元素是分组成员,需要将该组合的其他元素一起设置为选中状态\n if (!activeElementIdList.value.includes(element.id)) {\n let newActiveIdList: string[] = []\n\n if (ctrlOrShiftKeyActive.value) {\n newActiveIdList = [...activeElementIdList.value, element.id]\n }\n else newActiveIdList = [element.id]\n \n if (element.groupId) {\n const groupMembersId: string[] = []\n elementList.value.forEach((el: PPTElement) => {\n if (el.groupId === element.groupId) groupMembersId.push(el.id)\n })\n newActiveIdList = [...newActiveIdList, ...groupMembersId]\n }\n\n mainStore.setActiveElementIdList(uniq(newActiveIdList))\n mainStore.setHandleElementId(element.id)\n }\n\n // 如果目标元素已被选中,且按下了Ctrl键或Shift键,则取消其被选中状态\n // 除非目标元素是最后的一个被选中元素,或者目标元素所在的组合是最后一组选中组合\n // 如果目标元素是分组成员,需要将该组合的其他元素一起取消选中状态\n else if (ctrlOrShiftKeyActive.value) {\n let newActiveIdList: string[] = []\n\n if (element.groupId) {\n const groupMembersId: string[] = []\n elementList.value.forEach((el: PPTElement) => {\n if (el.groupId === element.groupId) groupMembersId.push(el.id)\n })\n newActiveIdList = activeElementIdList.value.filter(id => !groupMembersId.includes(id))\n }\n else {\n newActiveIdList = activeElementIdList.value.filter(id => id !== element.id)\n }\n\n if (newActiveIdList.length > 0) {\n mainStore.setActiveElementIdList(newActiveIdList)\n }\n }\n\n // 如果目标元素已被选中,同时目标元素不是当前操作元素,则将其设置为当前操作元素\n else if (handleElementId.value !== element.id) {\n mainStore.setHandleElementId(element.id)\n }\n\n // 如果目标元素已被选中,同时也是当前操作元素,那么当目标元素在该状态下再次被点击时,将被设置为多选元素中的激活成员\n else if (activeGroupElementId.value !== element.id) {\n const startPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const startPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n ;(e.target as HTMLElement).onmouseup = (e: MouseEvent) => {\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) {\n mainStore.setActiveGroupElementId(element.id)\n ;(e.target as HTMLElement).onmouseup = null\n }\n }\n }\n\n if (startMove) moveElement(e, element)\n }\n\n return {\n selectElement,\n }\n}\n","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport type { AlignmentLineProps } from '@/types/edit'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport { getRectRotatedRange, uniqAlignLines, type AlignLine } from '@/utils/element'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default (\n elementList: Ref,\n alignmentLines: Ref,\n canvasScale: Ref,\n) => {\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeGroupElementId } = storeToRefs(useMainStore())\n const { shiftKeyState } = storeToRefs(useKeyboardStore())\n const { viewportRatio } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n const dragElement = (e: MouseEvent | TouchEvent, element: PPTElement) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n\n if (!activeElementIdList.value.includes(element.id)) return\n let isMouseDown = true\n\n const edgeWidth = VIEWPORT_SIZE\n const edgeHeight = VIEWPORT_SIZE * viewportRatio.value\n \n const sorptionRange = 5\n\n const originElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList.value))\n const originActiveElementList = originElementList.filter(el => activeElementIdList.value.includes(el.id))\n \n const elOriginLeft = element.left\n const elOriginTop = element.top\n const elOriginWidth = element.width\n const elOriginHeight = ('height' in element && element.height) ? element.height : 0\n const elOriginRotate = ('rotate' in element && element.rotate) ? element.rotate : 0\n \n const startPageX = isTouchEvent ? e.changedTouches[0].pageX : e.pageX\n const startPageY = isTouchEvent ? e.changedTouches[0].pageY : e.pageY\n\n let isMisoperation: boolean | null = null\n\n const isActiveGroupElement = element.id === activeGroupElementId.value\n\n // 收集对齐对齐吸附线\n // 包括页面内除目标元素外的其他元素在画布中的各个可吸附对齐位置:上下左右四边,水平中心、垂直中心\n // 其中线条和被旋转过的元素需要重新计算他们在画布中的中心点位置的范围\n let horizontalLines: AlignLine[] = []\n let verticalLines: AlignLine[] = []\n\n for (const el of elementList.value) {\n if (el.type === 'line') continue\n if (isActiveGroupElement && el.id === element.id) continue\n if (!isActiveGroupElement && activeElementIdList.value.includes(el.id)) continue\n\n let left, top, width, height\n if ('rotate' in el && el.rotate) {\n const { xRange, yRange } = getRectRotatedRange({\n left: el.left,\n top: el.top,\n width: el.width,\n height: el.height,\n rotate: el.rotate,\n })\n left = xRange[0]\n top = yRange[0]\n width = xRange[1] - xRange[0]\n height = yRange[1] - yRange[0]\n }\n else {\n left = el.left\n top = el.top\n width = el.width\n height = el.height\n }\n \n const right = left + width\n const bottom = top + height\n const centerX = top + height / 2\n const centerY = left + width / 2\n\n const topLine: AlignLine = { value: top, range: [left, right] }\n const bottomLine: AlignLine = { value: bottom, range: [left, right] }\n const horizontalCenterLine: AlignLine = { value: centerX, range: [left, right] }\n const leftLine: AlignLine = { value: left, range: [top, bottom] }\n const rightLine: AlignLine = { value: right, range: [top, bottom] }\n const verticalCenterLine: AlignLine = { value: centerY, range: [top, bottom] }\n\n horizontalLines.push(topLine, bottomLine, horizontalCenterLine)\n verticalLines.push(leftLine, rightLine, verticalCenterLine)\n }\n\n // 画布可视区域的四个边界、水平中心、垂直中心\n const edgeTopLine: AlignLine = { value: 0, range: [0, edgeWidth] }\n const edgeBottomLine: AlignLine = { value: edgeHeight, range: [0, edgeWidth] }\n const edgeHorizontalCenterLine: AlignLine = { value: edgeHeight / 2, range: [0, edgeWidth] }\n const edgeLeftLine: AlignLine = { value: 0, range: [0, edgeHeight] }\n const edgeRightLine: AlignLine = { value: edgeWidth, range: [0, edgeHeight] }\n const edgeVerticalCenterLine: AlignLine = { value: edgeWidth / 2, range: [0, edgeHeight] }\n\n horizontalLines.push(edgeTopLine, edgeBottomLine, edgeHorizontalCenterLine)\n verticalLines.push(edgeLeftLine, edgeRightLine, edgeVerticalCenterLine)\n \n // 对齐吸附线去重\n horizontalLines = uniqAlignLines(horizontalLines)\n verticalLines = uniqAlignLines(verticalLines)\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n // 如果鼠标滑动距离过小,则将操作判定为误操作:\n // 如果误操作标记为null,表示是第一次触发移动,需要计算当前是否是误操作\n // 如果误操作标记为true,表示当前还处在误操作范围内,但仍然需要继续计算检查后续操作是否还处于误操作\n // 如果误操作标记为false,表示已经脱离了误操作范围,不需要再次计算\n if (isMisoperation !== false) {\n isMisoperation = Math.abs(startPageX - currentPageX) < sorptionRange && \n Math.abs(startPageY - currentPageY) < sorptionRange\n }\n if (!isMouseDown || isMisoperation) return\n \n let moveX = (currentPageX - startPageX) / canvasScale.value\n let moveY = (currentPageY - startPageY) / canvasScale.value\n\n if (shiftKeyState.value) {\n if (Math.abs(moveX) > Math.abs(moveY)) moveY = 0\n if (Math.abs(moveX) < Math.abs(moveY)) moveX = 0\n }\n\n // 基础目标位置\n let targetLeft = elOriginLeft + moveX\n let targetTop = elOriginTop + moveY\n\n // 计算目标元素在画布中的位置范围,用于吸附对齐\n // 需要区分单选和多选两种情况,其中多选状态下需要计算多选元素的整体范围;单选状态下需要继续区分线条、普通元素、旋转后的普通元素三种情况\n let targetMinX: number, targetMaxX: number, targetMinY: number, targetMaxY: number\n\n if (activeElementIdList.value.length === 1 || isActiveGroupElement) {\n if (elOriginRotate) {\n const { xRange, yRange } = getRectRotatedRange({\n left: targetLeft,\n top: targetTop,\n width: elOriginWidth,\n height: elOriginHeight,\n rotate: elOriginRotate,\n })\n targetMinX = xRange[0]\n targetMaxX = xRange[1]\n targetMinY = yRange[0]\n targetMaxY = yRange[1]\n }\n else if (element.type === 'line') {\n targetMinX = targetLeft\n targetMaxX = targetLeft + Math.max(element.start[0], element.end[0])\n targetMinY = targetTop\n targetMaxY = targetTop + Math.max(element.start[1], element.end[1])\n }\n else {\n targetMinX = targetLeft\n targetMaxX = targetLeft + elOriginWidth\n targetMinY = targetTop\n targetMaxY = targetTop + elOriginHeight\n }\n }\n else {\n const leftValues = []\n const topValues = []\n const rightValues = []\n const bottomValues = []\n \n for (let i = 0; i < originActiveElementList.length; i++) {\n const element = originActiveElementList[i]\n const left = element.left + moveX\n const top = element.top + moveY\n const width = element.width\n const height = ('height' in element && element.height) ? element.height : 0\n const rotate = ('rotate' in element && element.rotate) ? element.rotate : 0\n\n if ('rotate' in element && element.rotate) {\n const { xRange, yRange } = getRectRotatedRange({ left, top, width, height, rotate })\n leftValues.push(xRange[0])\n topValues.push(yRange[0])\n rightValues.push(xRange[1])\n bottomValues.push(yRange[1])\n }\n else if (element.type === 'line') {\n leftValues.push(left)\n topValues.push(top)\n rightValues.push(left + Math.max(element.start[0], element.end[0]))\n bottomValues.push(top + Math.max(element.start[1], element.end[1]))\n }\n else {\n leftValues.push(left)\n topValues.push(top)\n rightValues.push(left + width)\n bottomValues.push(top + height)\n }\n }\n\n targetMinX = Math.min(...leftValues)\n targetMaxX = Math.max(...rightValues)\n targetMinY = Math.min(...topValues)\n targetMaxY = Math.max(...bottomValues)\n }\n \n const targetCenterX = targetMinX + (targetMaxX - targetMinX) / 2\n const targetCenterY = targetMinY + (targetMaxY - targetMinY) / 2\n\n // 将收集到的对齐吸附线与计算的目标元素位置范围做对比,二者的差小于设定的值时执行自动对齐校正\n // 水平和垂直两个方向需要分开计算\n const _alignmentLines: AlignmentLineProps[] = []\n let isVerticalAdsorbed = false\n let isHorizontalAdsorbed = false\n for (let i = 0; i < horizontalLines.length; i++) {\n const { value, range } = horizontalLines[i]\n const min = Math.min(...range, targetMinX, targetMaxX)\n const max = Math.max(...range, targetMinX, targetMaxX)\n \n if (Math.abs(targetMinY - value) < sorptionRange && !isHorizontalAdsorbed) {\n targetTop = targetTop - (targetMinY - value)\n isHorizontalAdsorbed = true\n _alignmentLines.push({type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100})\n }\n if (Math.abs(targetMaxY - value) < sorptionRange && !isHorizontalAdsorbed) {\n targetTop = targetTop - (targetMaxY - value)\n isHorizontalAdsorbed = true\n _alignmentLines.push({type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100})\n }\n if (Math.abs(targetCenterY - value) < sorptionRange && !isHorizontalAdsorbed) {\n targetTop = targetTop - (targetCenterY - value)\n isHorizontalAdsorbed = true\n _alignmentLines.push({type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100})\n }\n }\n for (let i = 0; i < verticalLines.length; i++) {\n const { value, range } = verticalLines[i]\n const min = Math.min(...range, targetMinY, targetMaxY)\n const max = Math.max(...range, targetMinY, targetMaxY)\n\n if (Math.abs(targetMinX - value) < sorptionRange && !isVerticalAdsorbed) {\n targetLeft = targetLeft - (targetMinX - value)\n isVerticalAdsorbed = true\n _alignmentLines.push({type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100})\n }\n if (Math.abs(targetMaxX - value) < sorptionRange && !isVerticalAdsorbed) {\n targetLeft = targetLeft - (targetMaxX - value)\n isVerticalAdsorbed = true\n _alignmentLines.push({type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100})\n }\n if (Math.abs(targetCenterX - value) < sorptionRange && !isVerticalAdsorbed) {\n targetLeft = targetLeft - (targetCenterX - value)\n isVerticalAdsorbed = true\n _alignmentLines.push({type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100})\n }\n }\n alignmentLines.value = _alignmentLines\n \n // 单选状态下,或者当前选中的多个元素中存在正在操作的元素时,仅修改正在操作的元素的位置\n if (activeElementIdList.value.length === 1 || isActiveGroupElement) {\n elementList.value = elementList.value.map(el => {\n return el.id === element.id ? { ...el, left: targetLeft, top: targetTop } : el\n })\n }\n\n // 多选状态下,除了修改正在操作的元素的位置,其他被选中的元素也需要修改位置信息\n // 其他被选中的元素的位置信息通过正在操作的元素的移动偏移量来进行计算\n else {\n const handleElement = elementList.value.find(el => el.id === element.id)\n if (!handleElement) return\n\n elementList.value = elementList.value.map(el => {\n if (activeElementIdList.value.includes(el.id)) {\n if (el.id === element.id) {\n return {\n ...el,\n left: targetLeft,\n top: targetTop,\n }\n }\n return {\n ...el,\n left: el.left + (targetLeft - handleElement.left),\n top: el.top + (targetTop - handleElement.top),\n }\n }\n return el\n })\n }\n }\n\n const handleMouseup = (e: MouseEvent | TouchEvent) => {\n isMouseDown = false\n \n document.ontouchmove = null\n document.ontouchend = null\n document.onmousemove = null\n document.onmouseup = null\n\n alignmentLines.value = []\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n return {\n dragElement,\n }\n}","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useKeyboardStore, useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement, PPTLineElement } from '@/types/slides'\nimport { OperateLineHandlers } from '@/types/edit'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\ninterface AdsorptionPoint {\n x: number\n y: number\n}\n\nexport default (elementList: Ref) => {\n const slidesStore = useSlidesStore()\n const { canvasScale } = storeToRefs(useMainStore())\n const { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 拖拽线条端点\n const dragLineElement = (e: MouseEvent, element: PPTLineElement, command: OperateLineHandlers) => {\n let isMouseDown = true\n\n const sorptionRange = 8\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const adsorptionPoints: AdsorptionPoint[] = []\n\n // 获取所有线条以外的未旋转的元素的8个缩放点作为吸附位置\n for (let i = 0; i < elementList.value.length; i++) {\n const _element = elementList.value[i]\n if (_element.type === 'line' || _element.rotate) continue\n\n const left = _element.left\n const top = _element.top\n const width = _element.width\n const height = _element.height\n \n const right = left + width\n const bottom = top + height\n const centerX = top + height / 2\n const centerY = left + width / 2\n\n const topPoint = { x: centerY, y: top }\n const bottomPoint = { x: centerY, y: bottom }\n const leftPoint = { x: left, y: centerX }\n const rightPoint = { x: right, y: centerX }\n\n const leftTopPoint = { x: left, y: top }\n const rightTopPoint = { x: right, y: top }\n const leftBottomPoint = { x: left, y: bottom }\n const rightBottomPoint = { x: right, y: bottom }\n\n adsorptionPoints.push(\n topPoint,\n bottomPoint,\n leftPoint,\n rightPoint,\n leftTopPoint,\n rightTopPoint,\n leftBottomPoint,\n rightBottomPoint,\n )\n }\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n const moveX = (currentPageX - startPageX) / canvasScale.value\n const moveY = (currentPageY - startPageY) / canvasScale.value\n \n // 线条起点和终点在编辑区域中的位置\n let startX = element.left + element.start[0]\n let startY = element.top + element.start[1]\n let endX = element.left + element.end[0]\n let endY = element.top + element.end[1]\n\n const mid = element.broken || element.curve || [0, 0]\n let midX = element.left + mid[0]\n let midY = element.top + mid[1]\n\n const [c1, c2] = element.cubic || [[0, 0], [0, 0]]\n let c1X = element.left + c1[0]\n let c1Y = element.top + c1[1]\n let c2X = element.left + c2[0]\n let c2Y = element.top + c2[1]\n\n // 拖拽起点或终点的位置\n // 水平和垂直方向上有吸附\n if (command === OperateLineHandlers.START) {\n startX = startX + moveX\n startY = startY + moveY\n\n if (Math.abs(startX - endX) < sorptionRange) startX = endX\n if (Math.abs(startY - endY) < sorptionRange) startY = endY\n\n for (const adsorptionPoint of adsorptionPoints) {\n const { x, y } = adsorptionPoint\n if (Math.abs(x - startX) < sorptionRange && Math.abs(y - startY) < sorptionRange) {\n startX = x\n startY = y\n break\n }\n }\n }\n else if (command === OperateLineHandlers.END) {\n endX = endX + moveX\n endY = endY + moveY\n\n if (Math.abs(startX - endX) < sorptionRange) endX = startX\n if (Math.abs(startY - endY) < sorptionRange) endY = startY\n\n for (const adsorptionPoint of adsorptionPoints) {\n const { x, y } = adsorptionPoint\n if (Math.abs(x - endX) < sorptionRange && Math.abs(y - endY) < sorptionRange) {\n endX = x\n endY = y\n break\n }\n }\n }\n else if (command === OperateLineHandlers.C) {\n midX = midX + moveX\n midY = midY + moveY\n\n if (Math.abs(midX - startX) < sorptionRange) midX = startX\n if (Math.abs(midY - startY) < sorptionRange) midY = startY\n if (Math.abs(midX - endX) < sorptionRange) midX = endX\n if (Math.abs(midY - endY) < sorptionRange) midY = endY\n if (Math.abs(midX - (startX + endX) / 2) < sorptionRange && Math.abs(midY - (startY + endY) / 2) < sorptionRange) {\n midX = (startX + endX) / 2\n midY = (startY + endY) / 2\n }\n }\n else if (command === OperateLineHandlers.C1) {\n c1X = c1X + moveX\n c1Y = c1Y + moveY\n\n if (Math.abs(c1X - startX) < sorptionRange) c1X = startX\n if (Math.abs(c1Y - startY) < sorptionRange) c1Y = startY\n if (Math.abs(c1X - endX) < sorptionRange) c1X = endX\n if (Math.abs(c1Y - endY) < sorptionRange) c1Y = endY\n }\n else if (command === OperateLineHandlers.C2) {\n c2X = c2X + moveX\n c2Y = c2Y + moveY\n\n if (Math.abs(c2X - startX) < sorptionRange) c2X = startX\n if (Math.abs(c2Y - startY) < sorptionRange) c2Y = startY\n if (Math.abs(c2X - endX) < sorptionRange) c2X = endX\n if (Math.abs(c2Y - endY) < sorptionRange) c2Y = endY\n }\n\n // 计算更新起点和终点基于自身元素位置的坐标\n const minX = Math.min(startX, endX)\n const minY = Math.min(startY, endY)\n const maxX = Math.max(startX, endX)\n const maxY = Math.max(startY, endY)\n\n const start: [number, number] = [0, 0]\n const end: [number, number] = [maxX - minX, maxY - minY]\n if (startX > endX) {\n start[0] = maxX - minX\n end[0] = 0\n }\n if (startY > endY) {\n start[1] = maxY - minY\n end[1] = 0\n }\n\n elementList.value = elementList.value.map(el => {\n if (el.id === element.id) {\n const newEl: PPTLineElement = {\n ...(el as PPTLineElement),\n left: minX,\n top: minY,\n start: start,\n end: end,\n }\n if (command === OperateLineHandlers.START || command === OperateLineHandlers.END) {\n if (ctrlOrShiftKeyActive.value) {\n if (element.broken) newEl.broken = [midX - minX, midY - minY]\n if (element.curve) newEl.curve = [midX - minX, midY - minY]\n if (element.cubic) newEl.cubic = [[c1X - minX, c1Y - minY], [c2X - minX, c2Y - minY]]\n }\n else {\n if (element.broken) newEl.broken = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (element.curve) newEl.curve = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (element.cubic) newEl.cubic = [[(start[0] + end[0]) / 2, (start[1] + end[1]) / 2], [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]]\n }\n }\n else if (command === OperateLineHandlers.C) {\n if (element.broken) newEl.broken = [midX - minX, midY - minY]\n if (element.curve) newEl.curve = [midX - minX, midY - minY]\n }\n else {\n if (element.cubic) newEl.cubic = [[c1X - minX, c1Y - minY], [c2X - minX, c2Y - minY]]\n }\n return newEl\n }\n return el\n })\n }\n\n document.onmouseup = e => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n }\n\n return {\n dragLineElement,\n }\n}","import type { Ref } from 'vue'\nimport { useSlidesStore } from '@/store'\nimport type { PPTElement, PPTShapeElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport { SHAPE_PATH_FORMULAS } from '@/configs/shapes'\n\ninterface ShapePathData {\n baseSize: number,\n originPos: number,\n min: number,\n max: number,\n relative: string,\n}\n\nexport default (\n elementList: Ref,\n canvasScale: Ref,\n) => {\n const slidesStore = useSlidesStore()\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n const moveShapeKeypoint = (e: MouseEvent | TouchEvent, element: PPTShapeElement) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n\n let isMouseDown = true\n \n const startPageX = isTouchEvent ? e.changedTouches[0].pageX : e.pageX\n const startPageY = isTouchEvent ? e.changedTouches[0].pageY : e.pageY\n\n const pathFormula = SHAPE_PATH_FORMULAS[element.pathFormula!]\n let shapePathData: ShapePathData | null = null\n if ('editable' in pathFormula) {\n const baseSize = pathFormula.getBaseSize(element.width, element.height)\n const originPos = baseSize * element.keypoint!\n const [min, max] = pathFormula.range\n const relative = pathFormula.relative\n\n shapePathData = { baseSize, originPos, min, max, relative }\n }\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n if (!isMouseDown) return\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n const moveX = (currentPageX - startPageX) / canvasScale.value\n const moveY = (currentPageY - startPageY) / canvasScale.value\n\n elementList.value = elementList.value.map(el => {\n if (el.id === element.id && shapePathData) {\n const { baseSize, originPos, min, max, relative } = shapePathData\n const shapeElement = el as PPTShapeElement\n\n let keypoint = 0\n\n if (relative === 'left') keypoint = (originPos + moveX) / baseSize\n if (relative === 'right') keypoint = (originPos - moveX) / baseSize\n if (relative === 'center') keypoint = (originPos - moveX * 2) / baseSize\n if (relative === 'top') keypoint = (originPos + moveY) / baseSize\n if (relative === 'bottom') keypoint = (originPos - moveY) / baseSize\n\n if (keypoint < min) keypoint = min\n if (keypoint > max) keypoint = max\n\n return {\n ...el,\n keypoint,\n path: pathFormula.formula(shapeElement.width, shapeElement.height, keypoint),\n }\n }\n return el\n })\n }\n\n const handleMouseup = (e: MouseEvent | TouchEvent) => {\n isMouseDown = false\n \n document.ontouchmove = null\n document.ontouchend = null\n document.onmousemove = null\n document.onmouseup = null\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n return {\n moveShapeKeypoint,\n }\n}","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { CreateElementSelectionData } from '@/types/edit'\nimport useCreateElement from '@/hooks/useCreateElement'\n\nexport default (viewportRef: Ref) => {\n const mainStore = useMainStore()\n const { canvasScale, creatingElement } = storeToRefs(mainStore)\n\n // 通过鼠标框选时的起点和终点,计算选区的位置大小\n const formatCreateSelection = (selectionData: CreateElementSelectionData) => {\n const { start, end } = selectionData\n\n if (!viewportRef.value) return\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const [startX, startY] = start\n const [endX, endY] = end\n const minX = Math.min(startX, endX)\n const maxX = Math.max(startX, endX)\n const minY = Math.min(startY, endY)\n const maxY = Math.max(startY, endY)\n\n const left = (minX - viewportRect.x) / canvasScale.value\n const top = (minY - viewportRect.y) / canvasScale.value\n const width = (maxX - minX) / canvasScale.value\n const height = (maxY - minY) / canvasScale.value\n\n return { left, top, width, height }\n }\n\n // 通过鼠标框选时的起点和终点,计算线条在画布中的位置和起点终点\n const formatCreateSelectionForLine = (selectionData: CreateElementSelectionData) => {\n const { start, end } = selectionData\n\n if (!viewportRef.value) return\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const [startX, startY] = start\n const [endX, endY] = end\n const minX = Math.min(startX, endX)\n const maxX = Math.max(startX, endX)\n const minY = Math.min(startY, endY)\n const maxY = Math.max(startY, endY)\n\n const left = (minX - viewportRect.x) / canvasScale.value\n const top = (minY - viewportRect.y) / canvasScale.value\n const width = (maxX - minX) / canvasScale.value\n const height = (maxY - minY) / canvasScale.value\n\n const _start: [number, number] = [\n startX === minX ? 0 : width,\n startY === minY ? 0 : height,\n ]\n const _end: [number, number] = [\n endX === minX ? 0 : width,\n endY === minY ? 0 : height,\n ]\n\n return {\n left,\n top,\n start: _start,\n end: _end,\n }\n }\n\n const { createTextElement, createShapeElement, createLineElement } = useCreateElement()\n\n // 根据鼠标选区的位置大小插入元素\n const insertElementFromCreateSelection = (selectionData: CreateElementSelectionData) => {\n if (!creatingElement.value) return\n\n const type = creatingElement.value.type\n if (type === 'text') {\n const position = formatCreateSelection(selectionData)\n position && createTextElement(position, { vertical: creatingElement.value.vertical })\n }\n else if (type === 'shape') {\n const position = formatCreateSelection(selectionData)\n position && createShapeElement(position, creatingElement.value.data)\n }\n else if (type === 'line') {\n const position = formatCreateSelectionForLine(selectionData)\n position && createLineElement(position, creatingElement.value.data)\n }\n mainStore.setCreatingElement(null)\n }\n\n return {\n formatCreateSelection,\n insertElementFromCreateSelection,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { ElementAlignCommands } from '@/types/edit'\nimport { getElementListRange } from '@/utils/element'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useHistorySnapshot from './useHistorySnapshot'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeElementList } = storeToRefs(useMainStore())\n const { currentSlide, viewportRatio } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 将所有选中的元素对齐到画布\n * @param command 对齐方向\n */\n const alignElementToCanvas = (command: ElementAlignCommands) => {\n const viewportWidth = VIEWPORT_SIZE\n const viewportHeight = VIEWPORT_SIZE * viewportRatio.value\n const { minX, maxX, minY, maxY } = getElementListRange(activeElementList.value)\n \n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n for (const element of newElementList) {\n if (!activeElementIdList.value.includes(element.id)) continue\n \n // 水平垂直居中\n if (command === ElementAlignCommands.CENTER) {\n const offsetY = minY + (maxY - minY) / 2 - viewportHeight / 2\n const offsetX = minX + (maxX - minX) / 2 - viewportWidth / 2\n element.top = element.top - offsetY \n element.left = element.left - offsetX \n }\n\n // 顶部对齐\n if (command === ElementAlignCommands.TOP) {\n const offsetY = minY - 0\n element.top = element.top - offsetY \n }\n\n // 垂直居中\n else if (command === ElementAlignCommands.VERTICAL) {\n const offsetY = minY + (maxY - minY) / 2 - viewportHeight / 2\n element.top = element.top - offsetY \n }\n\n // 底部对齐\n else if (command === ElementAlignCommands.BOTTOM) {\n const offsetY = maxY - viewportHeight\n element.top = element.top - offsetY \n }\n \n // 左侧对齐\n else if (command === ElementAlignCommands.LEFT) {\n const offsetX = minX - 0\n element.left = element.left - offsetX \n }\n\n // 水平居中\n else if (command === ElementAlignCommands.HORIZONTAL) {\n const offsetX = minX + (maxX - minX) / 2 - viewportWidth / 2\n element.left = element.left - offsetX \n }\n\n // 右侧对齐\n else if (command === ElementAlignCommands.RIGHT) {\n const offsetX = maxX - viewportWidth\n element.left = element.left - offsetX \n }\n }\n\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n return {\n alignElementToCanvas,\n }\n}","import { computed, type Ref } from 'vue'\nimport type { PPTElementShadow } from '@/types/slides'\n\n// 计算元素的阴影样式\nexport default (shadow: Ref) => {\n const shadowStyle = computed(() => {\n if (shadow.value) {\n const { h, v, blur, color } = shadow.value\n return `${h}px ${v}px ${blur}px ${color}`\n }\n return ''\n })\n\n return {\n shadowStyle,\n }\n}","import { computed, type Ref } from 'vue'\n\n// 计算元素的翻转样式\nexport default (flipH: Ref, flipV: Ref) => {\n const flipStyle = computed(() => {\n let style = ''\n \n if (flipH.value && flipV.value) style = 'rotateX(180deg) rotateY(180deg)'\n else if (flipV.value) style = 'rotateX(180deg)'\n else if (flipH.value) style = 'rotateY(180deg)'\n\n return style\n })\n\n return {\n flipStyle,\n }\n}","import { computed, type Ref } from 'vue'\nimport { CLIPPATHS, ClipPathTypes } from '@/configs/imageClip'\nimport type { ImageElementClip } from '@/types/slides'\n\nexport default (clip: Ref) => {\n const clipShape = computed(() => {\n if (!clip.value) return CLIPPATHS.rect\n const shape = clip.value.shape || ClipPathTypes.RECT\n\n return CLIPPATHS[shape]\n })\n\n const imgPosition = computed(() => {\n if (!clip.value) {\n return {\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n }\n }\n\n const [start, end] = clip.value.range\n\n const widthScale = (end[0] - start[0]) / 100\n const heightScale = (end[1] - start[1]) / 100\n const left = start[0] / widthScale\n const top = start[1] / heightScale\n\n return {\n left: -left + '%',\n top: -top + '%',\n width: 100 / widthScale + '%',\n height: 100 / heightScale + '%',\n }\n })\n\n return {\n clipShape,\n imgPosition,\n }\n}","import { computed, type Ref } from 'vue'\nimport type { ImageElementFilters, ImageElementFilterKeys } from '@/types/slides'\n\nexport default (filters: Ref) => {\n const filter = computed(() => {\n if (!filters.value) return ''\n let filter = ''\n const keys = Object.keys(filters.value) as ImageElementFilterKeys[]\n for (const key of keys) {\n filter += `${key}(${filters.value[key]}) `\n }\n return filter\n })\n\n return {\n filter,\n }\n}","import { computed, type Ref } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\n\n// 计算边框相关属性值,主要是对默认值的处理\nexport default (outline: Ref) => {\n const outlineWidth = computed(() => outline.value?.width ?? 0)\n const outlineStyle = computed(() => outline.value?.style || 'solid')\n const outlineColor = computed(() => outline.value?.color || '#d14424')\n\n const strokeDashArray = computed(() => {\n if (outlineStyle.value !== 'dashed') return '0 0'\n const size = outlineWidth.value\n return size <= 6 ? `${size * 4.5} ${size * 2}` : `${size * 4} ${size * 1.5}`\n })\n\n return {\n outlineWidth,\n outlineStyle,\n outlineColor,\n strokeDashArray,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-35e36256\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"rx\", \"ry\", \"width\", \"height\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImageRectOutline',\n props: {\n width: {},\n height: {},\n outline: {},\n radius: { default: '0' }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"image-rect-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"rect\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n rx: _ctx.radius,\n ry: _ctx.radius,\n width: _ctx.width,\n height: _ctx.height,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ImageRectOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageRectOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageRectOutline.vue?vue&type=style&index=0&id=35e36256&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-35e36256\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-11836cf8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"cx\", \"cy\", \"rx\", \"ry\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImageEllipseOutline',\n props: {\n width: {},\n height: {},\n outline: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"image-ellipse-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"ellipse\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n cx: _ctx.width / 2,\n cy: _ctx.height / 2,\n rx: _ctx.width / 2,\n ry: _ctx.height / 2,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ImageEllipseOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageEllipseOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageEllipseOutline.vue?vue&type=style&index=0&id=11836cf8&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-11836cf8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6e021ee2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImagePolygonOutline',\n props: {\n width: {},\n height: {},\n createPath: { type: Function },\n outline: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"image-polygon-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"path\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n d: _ctx.createPath(_ctx.width, _ctx.height),\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ImagePolygonOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImagePolygonOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImagePolygonOutline.vue?vue&type=style&index=0&id=6e021ee2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6e021ee2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"image-outline\" }\n\nimport { computed } from 'vue'\nimport type { PPTImageElement } from '@/types/slides'\nimport useClipImage from '../useClipImage'\n\nimport ImageRectOutline from './ImageRectOutline.vue'\nimport ImageEllipseOutline from './ImageEllipseOutline.vue'\nimport ImagePolygonOutline from './ImagePolygonOutline.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst clip = computed(() => props.elementInfo.clip)\nconst { clipShape } = useClipImage(clip)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(clipShape).type === 'rect')\n ? (_openBlock(), _createBlock(ImageRectOutline, {\n key: 0,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n radius: _unref(clipShape).radius,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"radius\", \"outline\"]))\n : (_unref(clipShape).type === 'ellipse')\n ? (_openBlock(), _createBlock(ImageEllipseOutline, {\n key: 1,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]))\n : (_unref(clipShape).type === 'polygon')\n ? (_openBlock(), _createBlock(ImagePolygonOutline, {\n key: 2,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline,\n createPath: _unref(clipShape).createPath!\n }, null, 8, [\"width\", \"height\", \"outline\", \"createPath\"]))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5984406b\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\"]\nconst _hoisted_2 = [\"src\"]\nconst _hoisted_3 = [\"onMousedown\"]\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n width: \"16\",\n height: \"16\",\n fill: \"#fff\",\n stroke: \"#333\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n \"stroke-width\": \"0.3\",\n \"shape-rendering\": \"crispEdges\",\n d: \"M 16 0 L 0 0 L 0 16 L 4 16 L 4 4 L 16 4 L 16 0 Z\"\n })\n], -1))\nconst _hoisted_5 = [\n _hoisted_4\n]\nconst _hoisted_6 = [\"onMousedown\"]\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n width: \"16\",\n height: \"16\",\n fill: \"#fff\",\n stroke: \"#333\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n \"stroke-width\": \"0.3\",\n \"shape-rendering\": \"crispEdges\",\n d: \"M 16 0 L 0 0 L 0 4 L 16 4 Z\"\n })\n], -1))\nconst _hoisted_8 = [\n _hoisted_7\n]\n\nimport { computed, onMounted, onUnmounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useKeyboardStore } from '@/store'\nimport { KEYS } from '@/configs/hotkey'\nimport { type ImageClipedEmitData, OperateResizeHandlers } from '@/types/edit'\nimport type { ImageClipDataRange, ImageElementClip } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImageClipHandler',\n props: {\n src: {},\n clipPath: {},\n width: {},\n height: {},\n top: {},\n left: {},\n rotate: {},\n clipData: {}\n },\n emits: [\"clip\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst { canvasScale } = storeToRefs(useMainStore())\nconst { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\nconst clipWrapperPositionStyle = ref({\n top: '0',\n left: '0',\n})\nconst isSettingClipRange = ref(false)\nconst currentRange = ref(null)\n\n// 获取裁剪区域信息(裁剪区域占原图的宽高比例,处在原图中的位置)\nconst getClipDataTransformInfo = () => {\n const [start, end] = props.clipData ? props.clipData.range : [[0, 0], [100, 100]]\n\n const widthScale = (end[0] - start[0]) / 100\n const heightScale = (end[1] - start[1]) / 100\n const left = start[0] / widthScale\n const top = start[1] / heightScale\n\n return { widthScale, heightScale, left, top }\n}\n\n// 底层图片位置大小(遮罩区域图片)\nconst imgPosition = computed(() => {\n const { widthScale, heightScale, left, top } = getClipDataTransformInfo()\n return {\n left: -left,\n top: -top,\n width: 100 / widthScale,\n height: 100 / heightScale,\n }\n})\n\n// 底层图片位置大小样式(遮罩区域图片)\nconst bottomImgPositionStyle = computed(() => {\n return {\n top: imgPosition.value.top + '%',\n left: imgPosition.value.left + '%',\n width: imgPosition.value.width + '%',\n height: imgPosition.value.height + '%',\n }\n})\n\n// 顶层图片容器位置大小(裁剪高亮区域)\nconst topImgWrapperPosition = ref({\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n})\n\n// 顶层图片容器位置大小样式(裁剪高亮区域)\nconst topImgWrapperPositionStyle = computed(() => {\n const { top, left, width, height } = topImgWrapperPosition.value\n return {\n top: top + '%',\n left: left + '%',\n width: width + '%',\n height: height + '%',\n }\n})\n\n// 顶层图片位置大小样式(裁剪区域图片)\nconst topImgPositionStyle = computed(() => {\n const bottomWidth = imgPosition.value.width\n const bottomHeight = imgPosition.value.height\n \n const { top, left, width, height } = topImgWrapperPosition.value\n \n return {\n left: -left * (100 / width) + '%',\n top: -top * (100 / height) + '%',\n width: bottomWidth / width * 100 + '%',\n height: bottomHeight / height * 100 + '%',\n }\n})\n\n// 初始化裁剪位置信息\nconst initClipPosition = () => {\n const { left, top } = getClipDataTransformInfo()\n topImgWrapperPosition.value = {\n left: left,\n top: top,\n width: 100,\n height: 100,\n }\n \n clipWrapperPositionStyle.value = {\n top: -top + '%',\n left: -left + '%',\n }\n}\n\n// 执行裁剪:计算裁剪后的图片位置大小和裁剪信息,并将数据同步出去\nconst handleClip = () => {\n if (isSettingClipRange.value) return\n\n if (!currentRange.value) {\n emit('clip', null)\n return\n }\n\n const { left, top } = getClipDataTransformInfo()\n\n const position = {\n left: (topImgWrapperPosition.value.left - left) / 100 * props.width,\n top: (topImgWrapperPosition.value.top - top) / 100 * props.height,\n width: (topImgWrapperPosition.value.width - 100) / 100 * props.width,\n height: (topImgWrapperPosition.value.height - 100) / 100 * props.height,\n }\n\n const clipedEmitData: ImageClipedEmitData = {\n range: currentRange.value,\n position,\n }\n emit('clip', clipedEmitData)\n}\n\n// 快捷键监听:回车确认裁剪\nconst keyboardListener = (e: KeyboardEvent) => {\n const key = e.key.toUpperCase()\n if (key === KEYS.ENTER) handleClip()\n}\n\nonMounted(() => {\n initClipPosition()\n document.addEventListener('keydown', keyboardListener)\n})\nonUnmounted(() => {\n document.removeEventListener('keydown', keyboardListener)\n})\n\n// 计算并更新裁剪区域范围数据\nconst updateRange = () => {\n const retPosition = {\n left: parseInt(topImgPositionStyle.value.left),\n top: parseInt(topImgPositionStyle.value.top),\n width: parseInt(topImgPositionStyle.value.width),\n height: parseInt(topImgPositionStyle.value.height),\n }\n\n const widthScale = 100 / retPosition.width\n const heightScale = 100 / retPosition.height\n\n const start: [number, number] = [\n -retPosition.left * widthScale,\n -retPosition.top * heightScale,\n ]\n const end: [number, number] = [\n widthScale * 100 + start[0],\n heightScale * 100 + start[1],\n ]\n\n currentRange.value = [start, end]\n}\n\n// 移动裁剪区域\nconst moveClipRange = (e: MouseEvent) => {\n isSettingClipRange.value = true\n let isMouseDown = true\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n const bottomPosition = imgPosition.value\n const originPositopn = { ...topImgWrapperPosition.value }\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n let moveX = (currentPageX - startPageX) / canvasScale.value / props.width * 100\n let moveY = (currentPageY - startPageY) / canvasScale.value / props.height * 100\n\n if (props.rotate > 45 && props.rotate < 135) {\n moveX = (currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = -(currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n if ((props.rotate >= 135 && props.rotate <= 180) || (props.rotate >= -180 && props.rotate <= -135)) {\n moveX = -moveX\n moveY = -moveY\n }\n if (props.rotate > -135 && props.rotate < -45) {\n moveX = -(currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = (currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n\n let targetLeft = originPositopn.left + moveX\n let targetTop = originPositopn.top + moveY\n\n if (targetLeft < 0) targetLeft = 0\n else if (targetLeft + originPositopn.width > bottomPosition.width) {\n targetLeft = bottomPosition.width - originPositopn.width\n }\n if (targetTop < 0) targetTop = 0\n else if (targetTop + originPositopn.height > bottomPosition.height) {\n targetTop = bottomPosition.height - originPositopn.height\n }\n \n topImgWrapperPosition.value = {\n ...topImgWrapperPosition.value,\n left: targetLeft,\n top: targetTop,\n }\n }\n\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n updateRange()\n\n setTimeout(() => {\n isSettingClipRange.value = false\n }, 0)\n }\n}\n\n// 缩放裁剪区域\nconst scaleClipRange = (e: MouseEvent, type: OperateResizeHandlers) => {\n isSettingClipRange.value = true\n let isMouseDown = true\n\n const minWidth = 50 / props.width * 100\n const minHeight = 50 / props.height * 100\n \n const startPageX = e.pageX\n const startPageY = e.pageY\n const bottomPosition = imgPosition.value\n const originPositopn = { ...topImgWrapperPosition.value }\n\n const aspectRatio = topImgWrapperPosition.value.width / topImgWrapperPosition.value.height\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n let moveX = (currentPageX - startPageX) / canvasScale.value / props.width * 100\n let moveY = (currentPageY - startPageY) / canvasScale.value / props.height * 100\n\n if (props.rotate > 45 && props.rotate < 135) {\n moveX = (currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = -(currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n if ((props.rotate >= 135 && props.rotate <= 180) || (props.rotate >= -180 && props.rotate <= -135)) {\n moveX = -moveX\n moveY = -moveY\n }\n if (props.rotate > -135 && props.rotate < -45) {\n moveX = -(currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = (currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n\n if (ctrlOrShiftKeyActive.value) {\n if (type === OperateResizeHandlers.RIGHT_BOTTOM || type === OperateResizeHandlers.LEFT_TOP) moveY = moveX / aspectRatio\n if (type === OperateResizeHandlers.LEFT_BOTTOM || type === OperateResizeHandlers.RIGHT_TOP) moveY = -moveX / aspectRatio\n }\n\n let targetLeft, targetTop, targetWidth, targetHeight\n\n if (type === OperateResizeHandlers.LEFT_TOP) {\n if (originPositopn.left + moveX < 0) {\n moveX = -originPositopn.left\n }\n if (originPositopn.top + moveY < 0) {\n moveY = -originPositopn.top\n }\n if (originPositopn.width - moveX < minWidth) {\n moveX = originPositopn.width - minWidth\n }\n if (originPositopn.height - moveY < minHeight) {\n moveY = originPositopn.height - minHeight\n }\n targetWidth = originPositopn.width - moveX\n targetHeight = originPositopn.height - moveY\n targetLeft = originPositopn.left + moveX\n targetTop = originPositopn.top + moveY\n }\n else if (type === OperateResizeHandlers.RIGHT_TOP) {\n if (originPositopn.left + originPositopn.width + moveX > bottomPosition.width) {\n moveX = bottomPosition.width - (originPositopn.left + originPositopn.width)\n }\n if (originPositopn.top + moveY < 0) {\n moveY = -originPositopn.top\n }\n if (originPositopn.width + moveX < minWidth) {\n moveX = minWidth - originPositopn.width\n }\n if (originPositopn.height - moveY < minHeight) {\n moveY = originPositopn.height - minHeight\n }\n targetWidth = originPositopn.width + moveX\n targetHeight = originPositopn.height - moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top + moveY\n }\n else if (type === OperateResizeHandlers.LEFT_BOTTOM) {\n if (originPositopn.left + moveX < 0) {\n moveX = -originPositopn.left\n }\n if (originPositopn.top + originPositopn.height + moveY > bottomPosition.height) {\n moveY = bottomPosition.height - (originPositopn.top + originPositopn.height)\n }\n if (originPositopn.width - moveX < minWidth) {\n moveX = originPositopn.width - minWidth\n }\n if (originPositopn.height + moveY < minHeight) {\n moveY = minHeight - originPositopn.height\n }\n targetWidth = originPositopn.width - moveX\n targetHeight = originPositopn.height + moveY\n targetLeft = originPositopn.left + moveX\n targetTop = originPositopn.top\n }\n else if (type === OperateResizeHandlers.RIGHT_BOTTOM) {\n if (originPositopn.left + originPositopn.width + moveX > bottomPosition.width) {\n moveX = bottomPosition.width - (originPositopn.left + originPositopn.width)\n }\n if (originPositopn.top + originPositopn.height + moveY > bottomPosition.height) {\n moveY = bottomPosition.height - (originPositopn.top + originPositopn.height)\n }\n if (originPositopn.width + moveX < minWidth) {\n moveX = minWidth - originPositopn.width\n }\n if (originPositopn.height + moveY < minHeight) {\n moveY = minHeight - originPositopn.height\n }\n targetWidth = originPositopn.width + moveX\n targetHeight = originPositopn.height + moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top\n }\n else if (type === OperateResizeHandlers.TOP) {\n if (originPositopn.top + moveY < 0) {\n moveY = -originPositopn.top\n }\n if (originPositopn.height - moveY < minHeight) {\n moveY = originPositopn.height - minHeight\n }\n targetWidth = originPositopn.width\n targetHeight = originPositopn.height - moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top + moveY\n }\n else if (type === OperateResizeHandlers.BOTTOM) {\n if (originPositopn.top + originPositopn.height + moveY > bottomPosition.height) {\n moveY = bottomPosition.height - (originPositopn.top + originPositopn.height)\n }\n if (originPositopn.height + moveY < minHeight) {\n moveY = minHeight - originPositopn.height\n }\n targetWidth = originPositopn.width\n targetHeight = originPositopn.height + moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top\n }\n else if (type === OperateResizeHandlers.LEFT) {\n if (originPositopn.left + moveX < 0) {\n moveX = -originPositopn.left\n }\n if (originPositopn.width - moveX < minWidth) {\n moveX = originPositopn.width - minWidth\n }\n targetWidth = originPositopn.width - moveX\n targetHeight = originPositopn.height\n targetLeft = originPositopn.left + moveX\n targetTop = originPositopn.top\n }\n else {\n if (originPositopn.left + originPositopn.width + moveX > bottomPosition.width) {\n moveX = bottomPosition.width - (originPositopn.left + originPositopn.width)\n }\n if (originPositopn.width + moveX < minWidth) {\n moveX = minWidth - originPositopn.width\n }\n targetHeight = originPositopn.height\n targetWidth = originPositopn.width + moveX\n targetLeft = originPositopn.left\n targetTop = originPositopn.top\n }\n\n topImgWrapperPosition.value = {\n left: targetLeft,\n top: targetTop,\n width: targetWidth,\n height: targetHeight,\n }\n }\n\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n updateRange()\n\n setTimeout(() => isSettingClipRange.value = false, 0)\n }\n}\n\nconst rotateClassName = computed(() => {\n const prefix = 'rotate-'\n const rotate = props.rotate\n if (rotate > -22.5 && rotate <= 22.5) return prefix + 0\n else if (rotate > 22.5 && rotate <= 67.5) return prefix + 45\n else if (rotate > 67.5 && rotate <= 112.5) return prefix + 90\n else if (rotate > 112.5 && rotate <= 157.5) return prefix + 135\n else if (rotate > 157.5 || rotate <= -157.5) return prefix + 0\n else if (rotate > -157.5 && rotate <= -112.5) return prefix + 45\n else if (rotate > -112.5 && rotate <= -67.5) return prefix + 90\n else if (rotate > -67.5 && rotate <= -22.5) return prefix + 135\n return prefix + 0\n})\n\nconst cornerPoint = [\n OperateResizeHandlers.LEFT_TOP,\n OperateResizeHandlers.RIGHT_TOP,\n OperateResizeHandlers.LEFT_BOTTOM,\n OperateResizeHandlers.RIGHT_BOTTOM,\n]\nconst edgePoints = [\n OperateResizeHandlers.TOP,\n OperateResizeHandlers.BOTTOM,\n OperateResizeHandlers.LEFT,\n OperateResizeHandlers.RIGHT,\n]\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_click_outside = _resolveDirective(\"click-outside\")!\n\n return _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"image-clip-handler\",\n style: _normalizeStyle(clipWrapperPositionStyle.value)\n }, [\n _createElementVNode(\"img\", {\n class: \"bottom-img\",\n src: _ctx.src,\n draggable: false,\n alt: \"\",\n style: _normalizeStyle(bottomImgPositionStyle.value)\n }, null, 12, _hoisted_1),\n _createElementVNode(\"div\", {\n class: \"top-image-content\",\n style: _normalizeStyle({\n ...topImgWrapperPositionStyle.value,\n clipPath: _ctx.clipPath,\n })\n }, [\n _createElementVNode(\"img\", {\n class: \"top-img\",\n src: _ctx.src,\n draggable: false,\n alt: \"\",\n style: _normalizeStyle(topImgPositionStyle.value)\n }, null, 12, _hoisted_2)\n ], 4),\n _createElementVNode(\"div\", {\n class: \"operate\",\n style: _normalizeStyle(topImgWrapperPositionStyle.value),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => moveClipRange($event), [\"stop\"]))\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(cornerPoint, (point) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass(['clip-point', point, rotateClassName.value]),\n key: point,\n onMousedown: _withModifiers($event => scaleClipRange($event, point), [\"stop\"])\n }, _hoisted_5, 42, _hoisted_3)\n }), 64)),\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(edgePoints, (point) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass(['clip-point', point, rotateClassName.value]),\n key: point,\n onMousedown: _withModifiers($event => scaleClipRange($event, point), [\"stop\"])\n }, _hoisted_8, 42, _hoisted_6)\n }), 64))\n ], 36)\n ], 4)), [\n [_directive_click_outside, handleClip]\n ])\n}\n}\n\n})","\n\n\n\n","import script from \"./ImageClipHandler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageClipHandler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageClipHandler.vue?vue&type=style&index=0&id=5984406b&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5984406b\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, withModifiers as _withModifiers, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, resolveDirective as _resolveDirective, withDirectives as _withDirectives, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-1156b3e1\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\"]\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { ImageElementClip, PPTImageElement } from '@/types/slides'\nimport type { ImageClipedEmitData } from '@/types/edit'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport useClipImage from './useClipImage'\nimport useFilter from './useFilter'\n\nimport ImageOutline from './ImageOutline/index.vue'\nimport ImageClipHandler from './ImageClipHandler.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { clipingImageElementId } = storeToRefs(mainStore)\n\nconst isCliping = computed(() => clipingImageElementId.value === props.elementInfo.id)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst clip = computed(() => props.elementInfo.clip)\nconst { clipShape, imgPosition } = useClipImage(clip)\n\nconst filters = computed(() => props.elementInfo.filters)\nconst { filter } = useFilter(filters)\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n props.selectElement(e, props.elementInfo)\n}\n\nconst handleClip = (data: ImageClipedEmitData | null) => {\n mainStore.setClipingImageElementId('')\n \n if (!data) return\n\n const { range, position } = data\n const originClip: ImageElementClip = props.elementInfo.clip || { shape: 'rect', range: [[0, 0], [100, 100]] }\n\n const left = props.elementInfo.left + position.left\n const top = props.elementInfo.top + position.top\n const width = props.elementInfo.width + position.width\n const height = props.elementInfo.height + position.height\n\n let centerOffsetX = 0\n let centerOffsetY = 0\n\n if (props.elementInfo.rotate) {\n const centerX = (left + width / 2) - (props.elementInfo.left + props.elementInfo.width / 2)\n const centerY = -((top + height / 2) - (props.elementInfo.top + props.elementInfo.height / 2))\n\n const radian = -props.elementInfo.rotate * Math.PI / 180\n\n const rotatedCenterX = centerX * Math.cos(radian) - centerY * Math.sin(radian)\n const rotatedCenterY = centerX * Math.sin(radian) + centerY * Math.cos(radian)\n\n centerOffsetX = rotatedCenterX - centerX\n centerOffsetY = -(rotatedCenterY - centerY)\n }\n\n const _props = {\n clip: { ...originClip, range },\n left: left + centerOffsetX,\n top: top + centerOffsetY,\n width,\n height,\n }\n slidesStore.updateElement({ id: props.elementInfo.id, props: _props })\n \n addHistorySnapshot()\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-image\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n (isCliping.value)\n ? (_openBlock(), _createBlock(ImageClipHandler, {\n key: 0,\n src: _ctx.elementInfo.src,\n clipData: _ctx.elementInfo.clip,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n top: _ctx.elementInfo.top,\n left: _ctx.elementInfo.left,\n rotate: _ctx.elementInfo.rotate,\n clipPath: _unref(clipShape).style,\n onClip: _cache[0] || (_cache[0] = range => handleClip(range))\n }, null, 8, [\"src\", \"clipData\", \"width\", \"height\", \"top\", \"left\", \"rotate\", \"clipPath\"]))\n : _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"element-content\",\n style: _normalizeStyle({\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n }),\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event)),\n onTouchstart: _cache[3] || (_cache[3] = $event => handleSelectElement($event))\n }, [\n _createVNode(ImageOutline, { elementInfo: _ctx.elementInfo }, null, 8, [\"elementInfo\"]),\n _createElementVNode(\"div\", {\n class: \"image-content\",\n style: _normalizeStyle({ clipPath: _unref(clipShape).style })\n }, [\n _createElementVNode(\"img\", {\n src: _ctx.elementInfo.src,\n draggable: false,\n style: _normalizeStyle({\n top: _unref(imgPosition).top,\n left: _unref(imgPosition).left,\n width: _unref(imgPosition).width,\n height: _unref(imgPosition).height,\n filter: _unref(filter),\n }),\n onDragstart: _cache[1] || (_cache[1] = _withModifiers(() => {}, [\"prevent\"])),\n alt: \"\"\n }, null, 44, _hoisted_1),\n (_ctx.elementInfo.colorMask)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"color-mask\",\n style: _normalizeStyle({\n backgroundColor: _ctx.elementInfo.colorMask,\n })\n }, null, 4))\n : _createCommentVNode(\"\", true)\n ], 4)\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=1156b3e1&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1156b3e1\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-efb76626\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\n\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ElementOutline',\n props: {\n width: {},\n height: {},\n outline: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"element-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"path\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n d: `M0,0 L${_ctx.width},0 L${_ctx.width},${_ctx.height} L0,${_ctx.height} Z`,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ElementOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ElementOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ElementOutline.vue?vue&type=style&index=0&id=efb76626&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-efb76626\"]])\n\nexport default __exports__","import { splitListItem, liftListItem, sinkListItem } from 'prosemirror-schema-list'\nimport type { Schema } from 'prosemirror-model'\nimport { undo, redo } from 'prosemirror-history'\nimport { undoInputRule } from 'prosemirror-inputrules'\nimport type { Command } from 'prosemirror-state'\nimport {\n toggleMark,\n selectParentNode,\n joinUp,\n joinDown,\n chainCommands,\n newlineInCode,\n createParagraphNear,\n liftEmptyBlock,\n splitBlockKeepMarks,\n} from 'prosemirror-commands'\n\ninterface Keys {\n [key: string]: Command\n}\n\nexport const buildKeymap = (schema: Schema) => {\n const keys: Keys = {}\n const bind = (key: string, cmd: Command) => keys[key] = cmd\n\n bind('Alt-ArrowUp', joinUp)\n bind('Alt-ArrowDown', joinDown)\n bind('Mod-z', undo)\n bind('Mod-y', redo)\n bind('Backspace', undoInputRule)\n bind('Escape', selectParentNode)\n bind('Mod-b', toggleMark(schema.marks.strong))\n bind('Mod-i', toggleMark(schema.marks.em))\n bind('Mod-u', toggleMark(schema.marks.underline))\n bind('Mod-d', toggleMark(schema.marks.strikethrough))\n bind('Mod-e', toggleMark(schema.marks.code))\n bind('Mod-;', toggleMark(schema.marks.superscript))\n bind(`Mod-'`, toggleMark(schema.marks.subscript))\n bind('Enter', chainCommands(\n splitListItem(schema.nodes.list_item),\n newlineInCode,\n createParagraphNear,\n liftEmptyBlock,\n splitBlockKeepMarks,\n ))\n bind('Mod-[', liftListItem(schema.nodes.list_item))\n bind('Mod-]', sinkListItem(schema.nodes.list_item))\n bind('Tab', sinkListItem(schema.nodes.list_item))\n\n return keys\n}","import type { NodeType, Schema } from 'prosemirror-model'\nimport {\n inputRules,\n wrappingInputRule,\n smartQuotes,\n emDash,\n ellipsis,\n InputRule,\n} from 'prosemirror-inputrules'\n\nconst blockQuoteRule = (nodeType: NodeType) => wrappingInputRule(/^\\s*>\\s$/, nodeType)\n\nconst orderedListRule = (nodeType: NodeType) => (\n wrappingInputRule(\n /^(\\d+)\\.\\s$/, \n nodeType, \n match => ({order: +match[1]}),\n (match, node) => node.childCount + node.attrs.order === +match[1],\n )\n)\n\nconst bulletListRule = (nodeType: NodeType) => wrappingInputRule(/^\\s*([-+*])\\s$/, nodeType)\n\nconst codeRule = () => {\n const inputRegex = /(?:^|\\s)((?:`)((?:[^`]+))(?:`))$/\n \n return new InputRule(inputRegex, (state, match, start, end) => {\n const { schema } = state\n\n const tr = state.tr.insertText(`${match[2]} `, start, end)\n const mark = schema.marks.code.create()\n\n return tr.addMark(start, start + match[2].length, mark)\n })\n}\n\nconst linkRule = () => {\n const urlRegEx = /(?:https?:\\/\\/)?[\\w-]+(?:\\.[\\w-]+)+\\.?(?:\\d+)?(?:\\/\\S*)?$/\n \n return new InputRule(urlRegEx, (state, match, start, end) => {\n const { schema } = state\n\n const tr = state.tr.insertText(match[0], start, end)\n const mark = schema.marks.link.create({ href: match[0], title: match[0] })\n\n return tr.addMark(start, start + match[0].length, mark)\n })\n}\n\nexport const buildInputRules = (schema: Schema) => {\n const rules = [\n ...smartQuotes,\n ellipsis,\n emDash,\n ]\n rules.push(blockQuoteRule(schema.nodes.blockquote))\n rules.push(orderedListRule(schema.nodes.ordered_list))\n rules.push(bulletListRule(schema.nodes.bullet_list))\n rules.push(codeRule())\n rules.push(linkRule())\n\n return inputRules({ rules })\n}","import { Plugin } from 'prosemirror-state'\nimport { Decoration, DecorationSet } from 'prosemirror-view'\nimport type { Node } from 'prosemirror-model'\n\nconst isEmptyParagraph = (node: Node) => {\n return node.type.name === 'paragraph' && node.nodeSize === 2\n}\n\nexport const placeholderPlugin = (placeholder: string) => {\n return new Plugin({\n props: {\n decorations(state) {\n const { $from } = state.selection\n if (isEmptyParagraph($from.parent)) {\n const decoration = Decoration.node($from.before(), $from.after(), {\n 'data-placeholder': placeholder,\n })\n return DecorationSet.create(state.doc, [decoration])\n }\n },\n },\n })\n}","import { keymap } from 'prosemirror-keymap'\nimport type { Schema } from 'prosemirror-model'\nimport { history } from 'prosemirror-history'\nimport { baseKeymap } from 'prosemirror-commands'\nimport { dropCursor } from 'prosemirror-dropcursor'\nimport { gapCursor } from 'prosemirror-gapcursor'\n\nimport { buildKeymap } from './keymap'\nimport { buildInputRules } from './inputrules'\nimport { placeholderPlugin } from './placeholder'\n\nexport interface PluginOptions {\n placeholder?: string\n}\n\nexport const buildPlugins = (schema: Schema, options?: PluginOptions) => {\n const placeholder = options?.placeholder\n\n const plugins = [\n buildInputRules(schema),\n keymap(buildKeymap(schema)),\n keymap(baseKeymap),\n dropCursor(),\n gapCursor(),\n history(),\n ]\n\n if (placeholder) plugins.push(placeholderPlugin(placeholder))\n\n return plugins\n}","import { nodes } from 'prosemirror-schema-basic'\nimport type { Node, NodeSpec } from 'prosemirror-model'\nimport { listItem as _listItem } from 'prosemirror-schema-list'\n\ninterface Attr {\n [key: string]: number | string\n}\n\nconst orderedList: NodeSpec = {\n attrs: {\n order: {\n default: 1,\n },\n listStyleType: {\n default: '',\n },\n fontsize: {\n default: '',\n },\n color: {\n default: '',\n },\n },\n content: 'list_item+',\n group: 'block',\n parseDOM: [\n { \n tag: 'ol', \n getAttrs: dom => {\n const order = ((dom as HTMLElement).hasAttribute('start') ? (dom as HTMLElement).getAttribute('start') : 1) || 1\n const attr: Attr = { order: +order }\n\n const { listStyleType, fontSize, color } = (dom as HTMLElement).style\n if (listStyleType) attr['listStyleType'] = listStyleType\n if (fontSize) attr['fontsize'] = fontSize\n if (color) attr['color'] = color\n\n return attr\n }\n }\n ],\n toDOM: (node: Node) => {\n const { order, listStyleType, fontsize, color } = node.attrs\n let style = ''\n if (listStyleType) style += `list-style-type: ${listStyleType};`\n if (fontsize) style += `font-size: ${fontsize};`\n if (color) style += `color: ${color};`\n\n const attr: Attr = { style }\n if (order !== 1) attr['start'] = order\n\n\n return ['ol', attr, 0]\n },\n}\n\nconst bulletList: NodeSpec = {\n attrs: {\n listStyleType: {\n default: '',\n },\n fontsize: {\n default: '',\n },\n color: {\n default: '',\n },\n },\n content: 'list_item+',\n group: 'block',\n parseDOM: [\n {\n tag: 'ul',\n getAttrs: dom => {\n const attr: Attr = {}\n\n const { listStyleType, fontSize, color } = (dom as HTMLElement).style\n if (listStyleType) attr['listStyleType'] = listStyleType\n if (fontSize) attr['fontsize'] = fontSize\n if (color) attr['color'] = color\n\n return attr\n }\n }\n ],\n toDOM: (node: Node) => {\n const { listStyleType, fontsize, color } = node.attrs\n let style = ''\n if (listStyleType) style += `list-style-type: ${listStyleType};`\n if (fontsize) style += `font-size: ${fontsize};`\n if (color) style += `color: ${color};`\n\n return ['ul', { style }, 0]\n },\n}\n\nconst listItem: NodeSpec = {\n ..._listItem,\n content: 'paragraph block*',\n group: 'block',\n}\n\nconst paragraph: NodeSpec = {\n attrs: {\n align: {\n default: '',\n },\n indent: {\n default: 0,\n },\n textIndent: {\n default: 0,\n },\n },\n content: 'inline*',\n group: 'block',\n parseDOM: [\n {\n tag: 'p',\n getAttrs: dom => {\n const { textAlign, textIndent } = (dom as HTMLElement).style\n\n let align = (dom as HTMLElement).getAttribute('align') || textAlign || ''\n align = /(left|right|center|justify)/.test(align) ? align : ''\n\n let textIndentLevel = 0\n if (textIndent) {\n if (/em/.test(textIndent)) {\n textIndentLevel = parseInt(textIndent)\n }\n else if (/px/.test(textIndent)) {\n textIndentLevel = Math.floor(parseInt(textIndent) / 20)\n if (!textIndentLevel) textIndentLevel = 1\n }\n }\n\n const indent = +((dom as HTMLElement).getAttribute('data-indent') || 0)\n \n return { align, indent, textIndent: textIndentLevel }\n }\n },\n {\n tag: 'img',\n ignore: true,\n },\n {\n tag: 'pre',\n skip: true,\n },\n ],\n toDOM: (node: Node) => {\n const { align, indent, textIndent } = node.attrs\n let style = ''\n if (align && align !== 'left') style += `text-align: ${align};`\n if (textIndent) style += `text-indent: ${textIndent * 20}px;`\n\n const attr: Attr = { style }\n if (indent) attr['data-indent'] = indent\n\n return ['p', attr, 0]\n },\n}\n\nconst {\n doc,\n blockquote,\n text,\n} = nodes\n\nexport default {\n doc,\n paragraph,\n blockquote,\n text,\n 'ordered_list': orderedList,\n 'bullet_list': bulletList,\n 'list_item': listItem,\n}\n","import { marks } from 'prosemirror-schema-basic'\nimport type { MarkSpec } from 'prosemirror-model'\n\nconst subscript: MarkSpec = {\n excludes: 'subscript',\n parseDOM: [\n { tag: 'sub' },\n {\n style: 'vertical-align',\n getAttrs: value => value === 'sub' && null\n },\n ],\n toDOM: () => ['sub', 0],\n}\n\nconst superscript: MarkSpec = {\n excludes: 'superscript',\n parseDOM: [\n { tag: 'sup' },\n {\n style: 'vertical-align',\n getAttrs: value => value === 'super' && null\n },\n ],\n toDOM: () => ['sup', 0],\n}\n\nconst strikethrough: MarkSpec = {\n parseDOM: [\n { tag: 'strike' },\n {\n style: 'text-decoration',\n getAttrs: value => value === 'line-through' && null\n },\n {\n style: 'text-decoration-line',\n getAttrs: value => value === 'line-through' && null\n },\n ],\n toDOM: () => ['span', { style: 'text-decoration-line: line-through;' }, 0],\n}\n\nconst underline: MarkSpec = {\n parseDOM: [\n { tag: 'u' },\n {\n style: 'text-decoration',\n getAttrs: value => value === 'underline' && null\n },\n {\n style: 'text-decoration-line',\n getAttrs: value => value === 'underline' && null\n },\n ],\n toDOM: () => ['span', { style: 'text-decoration: underline;' }, 0],\n}\n\nconst forecolor: MarkSpec = {\n attrs: {\n color: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'color',\n getAttrs: color => color ? { color } : {}\n },\n ],\n toDOM: mark => {\n const { color } = mark.attrs\n let style = ''\n if (color) style += `color: ${color};`\n return ['span', { style }, 0]\n },\n}\n\nconst backcolor: MarkSpec = {\n attrs: {\n backcolor: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'background-color',\n getAttrs: backcolor => backcolor ? { backcolor } : {}\n },\n ],\n toDOM: mark => {\n const { backcolor } = mark.attrs\n let style = ''\n if (backcolor) style += `background-color: ${backcolor};`\n return ['span', { style }, 0]\n },\n}\n\nconst fontsize: MarkSpec = {\n attrs: {\n fontsize: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'font-size',\n getAttrs: fontsize => fontsize ? { fontsize } : {}\n },\n ],\n toDOM: mark => {\n const { fontsize } = mark.attrs\n let style = ''\n if (fontsize) style += `font-size: ${fontsize};`\n return ['span', { style }, 0]\n },\n}\n\nconst fontname: MarkSpec = {\n attrs: {\n fontname: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'font-family',\n getAttrs: fontname => {\n return { fontname: fontname && typeof fontname === 'string' ? fontname.replace(/[\\\"\\']/g, '') : '' }\n }\n },\n ],\n toDOM: mark => {\n const { fontname } = mark.attrs\n let style = ''\n if (fontname) style += `font-family: ${fontname};`\n return ['span', { style }, 0]\n },\n}\n\nconst link: MarkSpec = {\n attrs: {\n href: {},\n title: { default: null },\n target: { default: '_blank' },\n },\n inclusive: false,\n parseDOM: [\n {\n tag: 'a[href]',\n getAttrs: dom => {\n const href = (dom as HTMLElement).getAttribute('href')\n const title = (dom as HTMLElement).getAttribute('title')\n return { href, title }\n }\n },\n ],\n toDOM: node => ['a', node.attrs, 0],\n}\n\nconst mark: MarkSpec = {\n attrs: {\n index: { default: null },\n },\n parseDOM: [\n {\n tag: 'mark',\n getAttrs: dom => {\n const index = (dom as HTMLElement).dataset.index\n return { index }\n }\n },\n ],\n toDOM: node => ['mark', { 'data-index': node.attrs.index }, 0],\n}\n\nconst { em, strong, code } = marks\n\nexport default {\n em,\n strong,\n fontsize,\n fontname,\n code,\n forecolor,\n backcolor,\n subscript,\n superscript,\n strikethrough,\n underline,\n link,\n mark,\n}","import nodes from './nodes'\nimport marks from './marks'\n\nexport const schemaNodes = nodes\nexport const schemaMarks = marks\n","import { EditorState } from 'prosemirror-state'\nimport { type DirectEditorProps, EditorView } from 'prosemirror-view'\nimport { Schema, DOMParser } from 'prosemirror-model'\nimport { buildPlugins, type PluginOptions } from './plugins/index'\nimport { schemaNodes, schemaMarks } from './schema/index'\n\nconst schema = new Schema({\n nodes: schemaNodes,\n marks: schemaMarks,\n})\n\nexport const createDocument = (content: string) => {\n const htmlString = `
${content}
`\n const parser = new window.DOMParser()\n const element = parser.parseFromString(htmlString, 'text/html').body.firstElementChild\n return DOMParser.fromSchema(schema).parse(element as Element)\n}\n\nexport const initProsemirrorEditor = (\n dom: Element,\n content: string,\n props: Omit,\n pluginOptions?: PluginOptions,\n) => {\n return new EditorView(dom, {\n state: EditorState.create({\n doc: createDocument(content),\n plugins: buildPlugins(schema, pluginOptions),\n }),\n ...props,\n })\n}","import mitt, { type Emitter } from 'mitt'\n\nexport const enum EmitterEvents {\n RICH_TEXT_COMMAND = 'RICH_TEXT_COMMAND',\n SYNC_RICH_TEXT_ATTRS_TO_STORE = 'SYNC_RICH_TEXT_ATTRS_TO_STORE',\n OPEN_CHART_DATA_EDITOR = 'OPEN_CHART_DATA_EDITOR',\n OPEN_LATEX_EDITOR = 'OPEN_LATEX_EDITOR',\n}\n\nexport interface RichTextAction {\n command: string\n value?: string\n}\n\nexport interface RichTextCommand {\n target?: string\n action: RichTextAction | RichTextAction[]\n}\n\ntype Events = {\n [EmitterEvents.RICH_TEXT_COMMAND]: RichTextCommand\n [EmitterEvents.SYNC_RICH_TEXT_ATTRS_TO_STORE]: void\n [EmitterEvents.OPEN_CHART_DATA_EDITOR]: void\n [EmitterEvents.OPEN_LATEX_EDITOR]: void\n} \n\nconst emitter: Emitter = mitt()\n\nexport default emitter","import type { Schema, Node, NodeType } from 'prosemirror-model'\nimport type { Transaction } from 'prosemirror-state'\nimport type { EditorView } from 'prosemirror-view'\n\nexport const setTextAlign = (tr: Transaction, schema: Schema, alignment: string) => {\n const { selection, doc } = tr\n if (!selection || !doc) return tr\n\n const { from, to } = selection\n const { nodes } = schema\n\n const blockquote = nodes.blockquote\n const listItem = nodes.list_item\n const paragraph = nodes.paragraph\n\n interface Task {\n node: Node\n pos: number\n nodeType: NodeType\n }\n\n const tasks: Task[] = []\n alignment = alignment || ''\n\n const allowedNodeTypes = new Set([blockquote, listItem, paragraph])\n\n doc.nodesBetween(from, to, (node, pos) => {\n const nodeType = node.type\n const align = node.attrs.align || ''\n if (align !== alignment && allowedNodeTypes.has(nodeType)) {\n tasks.push({\n node,\n pos,\n nodeType,\n })\n }\n return true\n })\n\n if (!tasks.length) return tr\n\n tasks.forEach(task => {\n const { node, pos, nodeType } = task\n let { attrs } = node\n if (alignment) attrs = { ...attrs, align: alignment }\n else attrs = { ...attrs, align: null }\n tr = tr.setNodeMarkup(pos, nodeType, attrs, node.marks)\n })\n\n return tr\n}\n\nexport const alignmentCommand = (view: EditorView, alignment: string) => {\n const { state } = view\n const { schema, selection } = state\n const tr = setTextAlign(\n state.tr.setSelection(selection),\n schema,\n alignment,\n )\n view.dispatch(tr)\n}","import type { Schema } from 'prosemirror-model'\nimport { type Transaction, TextSelection, AllSelection } from 'prosemirror-state'\nimport type { EditorView } from 'prosemirror-view'\nimport { isList } from '../utils'\n\ntype IndentKey = 'indent' | 'textIndent'\n\nfunction setNodeIndentMarkup(tr: Transaction, pos: number, delta: number, indentKey: IndentKey): Transaction {\n if (!tr.doc) return tr\n\n const node = tr.doc.nodeAt(pos)\n if (!node) return tr\n\n const minIndent = 0\n const maxIndent = 8\n\n let indent = (node.attrs[indentKey] || 0) + delta\n if (indent < minIndent) indent = minIndent\n if (indent > maxIndent) indent = maxIndent\n\n if (indent === node.attrs[indentKey]) return tr\n\n const nodeAttrs = {\n ...node.attrs,\n [indentKey]: indent,\n }\n\n return tr.setNodeMarkup(pos, node.type, nodeAttrs, node.marks)\n}\n\nconst setIndent = (tr: Transaction, schema: Schema, delta: number, indentKey: IndentKey): Transaction => {\n const { selection, doc } = tr\n if (!selection || !doc) return tr\n\n if (!(selection instanceof TextSelection || selection instanceof AllSelection)) return tr\n\n const { from, to } = selection\n\n doc.nodesBetween(from, to, (node, pos) => {\n const nodeType = node.type\n\n if (nodeType.name === 'paragraph' || nodeType.name === 'blockquote') {\n tr = setNodeIndentMarkup(tr, pos, delta, indentKey)\n return false\n } \n else if (isList(node, schema)) return false\n return true\n })\n\n return tr\n}\n\nexport const indentCommand = (view: EditorView, delta: number) => {\n const { state } = view\n const { schema, selection } = state\n\n const tr = setIndent(\n state.tr.setSelection(selection),\n schema,\n delta,\n 'indent',\n )\n if (tr.docChanged) {\n view.dispatch(tr)\n return true\n }\n\n return false\n}\n\nexport const textIndentCommand = (view: EditorView, delta: number) => {\n const { state } = view\n const { schema, selection } = state\n\n const tr = setIndent(\n state.tr.setSelection(selection),\n schema,\n delta,\n 'textIndent',\n )\n if (tr.docChanged) {\n view.dispatch(tr)\n return true\n }\n\n return false\n}","import { wrapInList, liftListItem } from 'prosemirror-schema-list'\nimport type { Node, NodeType } from 'prosemirror-model'\nimport type { Transaction, EditorState } from 'prosemirror-state'\nimport { findParentNode, isList } from '../utils'\n\ninterface Attr {\n [key: string]: number | string\n}\n\ninterface TextStyleAttr {\n color?: string\n fontsize?: string\n}\n\nexport const toggleList = (listType: NodeType, itemType: NodeType, listStyleType: string, textStyleAttr: TextStyleAttr = {}) => {\n return (state: EditorState, dispatch: (tr: Transaction) => void) => {\n const { schema, selection } = state\n const { $from, $to } = selection\n const range = $from.blockRange($to)\n\n if (!range) return false\n\n const parentList = findParentNode((node: Node) => isList(node, schema))(selection)\n\n if (range.depth >= 1 && parentList && range.depth - parentList.depth <= 1) {\n if (parentList.node.type === listType && !listStyleType) {\n return liftListItem(itemType)(state, dispatch)\n }\n\n if (isList(parentList.node, schema) && listType.validContent(parentList.node.content)) {\n const { tr } = state\n\n const nodeAttrs: Attr = {\n ...parentList.node.attrs,\n ...textStyleAttr,\n }\n if (listStyleType) nodeAttrs.listStyleType = listStyleType\n\n tr.setNodeMarkup(parentList.pos, listType, nodeAttrs)\n\n if (dispatch) dispatch(tr)\n\n return false\n }\n }\n\n const nodeAttrs: Attr = {\n ...textStyleAttr,\n }\n if (listStyleType) nodeAttrs.listStyleType = listStyleType\n\n return wrapInList(listType, nodeAttrs)(state, dispatch)\n }\n}","import type { EditorView } from 'prosemirror-view'\nimport { isList } from '../utils'\n\ninterface Style {\n [key: string]: string\n}\n\nexport const setListStyle = (view: EditorView, style: Style | Style[]) => {\n const { state } = view\n const { schema, selection } = state\n const tr = state.tr.setSelection(selection)\n \n const { doc } = tr\n if (!doc) return tr\n\n const { from, to } = selection\n doc.nodesBetween(from, to, (node, pos) => {\n if (isList(node, schema)) {\n if (from - 3 <= pos && to + 3 >= pos + node.nodeSize) {\n const styles = Array.isArray(style) ? style : [style]\n\n for (const style of styles) {\n tr.setNodeAttribute(pos, style.key, style.value)\n }\n }\n }\n return false\n })\n\n view.dispatch(tr)\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { debounce } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { EditorView } from 'prosemirror-view'\nimport { toggleMark, wrapIn, lift } from 'prosemirror-commands'\nimport { initProsemirrorEditor, createDocument } from '@/utils/prosemirror'\nimport { isActiveOfParentNodeType, findNodesWithSameMark, getTextAttrs, autoSelectAll, addMark, markActive, getFontsize } from '@/utils/prosemirror/utils'\nimport emitter, { EmitterEvents, type RichTextAction, type RichTextCommand } from '@/utils/emitter'\nimport { alignmentCommand } from '@/utils/prosemirror/commands/setTextAlign'\nimport { indentCommand, textIndentCommand } from '@/utils/prosemirror/commands/setTextIndent'\nimport { toggleList } from '@/utils/prosemirror/commands/toggleList'\nimport { setListStyle } from '@/utils/prosemirror/commands/setListStyle'\nimport type { TextFormatPainterKeys } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ProsemirrorEditor',\n props: {\n elementId: {},\n defaultColor: {},\n defaultFontName: {},\n value: {},\n editable: { type: Boolean, default: false },\n autoFocus: { type: Boolean, default: false }\n },\n emits: [\"update\", \"focus\", \"blur\", \"mousedown\"],\n setup(__props: any, { expose: __expose, emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst mainStore = useMainStore()\nconst { handleElementId, textFormatPainter, richTextAttrs } = storeToRefs(mainStore)\n\nconst editorViewRef = ref()\nlet editorView: EditorView\n\n// 富文本的各种交互事件监听:\n// 聚焦时取消全局快捷键事件\n// 输入文字时同步数据到vuex\n// 点击鼠标和键盘时同步富文本状态到工具栏\nconst handleInput = debounce(function() {\n emit('update', editorView.dom.innerHTML)\n}, 300, { trailing: true })\n\nconst handleFocus = () => {\n mainStore.setDisableHotkeysState(true)\n emit('focus')\n}\n\nconst handleBlur = () => {\n mainStore.setDisableHotkeysState(false)\n emit('blur')\n}\n\nconst handleClick = debounce(function() {\n const attrs = getTextAttrs(editorView, {\n color: props.defaultColor,\n fontname: props.defaultFontName,\n })\n mainStore.setRichtextAttrs(attrs)\n}, 30, { trailing: true })\n\nconst handleKeydown = () => {\n handleInput()\n handleClick()\n}\n\n// 将富文本内容同步到DOM\nconst textContent = computed(() => props.value)\nwatch(textContent, () => {\n if (!editorView) return\n if (editorView.hasFocus()) return\n\n const { doc, tr } = editorView.state\n editorView.dispatch(tr.replaceRangeWith(0, doc.content.size, createDocument(textContent.value)))\n})\n\n// 打开/关闭编辑器的编辑模式\nwatch(() => props.editable, () => {\n editorView.setProps({ editable: () => props.editable })\n})\n\n// 暴露 focus 方法\nconst focus = () => editorView.focus()\n__expose({ focus })\n\n// 执行富文本命令(可以是一个或多个)\n// 部分命令在执行前先判断当前选区是否为空,如果选区为空先进行全选操作\nconst execCommand = ({ target, action }: RichTextCommand) => {\n if (!target && handleElementId.value !== props.elementId) return\n if (target && target !== props.elementId) return\n\n const actions = ('command' in action) ? [action] : action\n\n for (const item of actions) {\n if (item.command === 'fontname' && item.value) {\n const mark = editorView.state.schema.marks.fontname.create({ fontname: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n }\n else if (item.command === 'fontsize' && item.value) {\n const mark = editorView.state.schema.marks.fontsize.create({ fontsize: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n setListStyle(editorView, { key: 'fontsize', value: item.value })\n }\n else if (item.command === 'fontsize-add') {\n const step = item.value ? +item.value : 2\n autoSelectAll(editorView)\n const fontsize = getFontsize(editorView) + step + 'px'\n const mark = editorView.state.schema.marks.fontsize.create({ fontsize })\n addMark(editorView, mark)\n setListStyle(editorView, { key: 'fontsize', value: fontsize })\n }\n else if (item.command === 'fontsize-reduce') {\n const step = item.value ? +item.value : 2\n autoSelectAll(editorView)\n let fontsize = getFontsize(editorView) - step\n if (fontsize < 12) fontsize = 12\n const mark = editorView.state.schema.marks.fontsize.create({ fontsize: fontsize + 'px' })\n addMark(editorView, mark)\n setListStyle(editorView, { key: 'fontsize', value: fontsize + 'px' })\n }\n else if (item.command === 'color' && item.value) {\n const mark = editorView.state.schema.marks.forecolor.create({ color: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n setListStyle(editorView, { key: 'color', value: item.value })\n }\n else if (item.command === 'backcolor' && item.value) {\n const mark = editorView.state.schema.marks.backcolor.create({ backcolor: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n }\n else if (item.command === 'bold') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.strong)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'em') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.em)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'underline') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.underline)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'strikethrough') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.strikethrough)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'subscript') {\n toggleMark(editorView.state.schema.marks.subscript)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'superscript') {\n toggleMark(editorView.state.schema.marks.superscript)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'blockquote') {\n const isBlockquote = isActiveOfParentNodeType('blockquote', editorView.state)\n if (isBlockquote) lift(editorView.state, editorView.dispatch)\n else wrapIn(editorView.state.schema.nodes.blockquote)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'code') {\n toggleMark(editorView.state.schema.marks.code)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'align' && item.value) {\n alignmentCommand(editorView, item.value)\n }\n else if (item.command === 'indent' && item.value) {\n indentCommand(editorView, +item.value)\n }\n else if (item.command === 'textIndent' && item.value) {\n textIndentCommand(editorView, +item.value)\n }\n else if (item.command === 'bulletList') {\n const listStyleType = item.value || ''\n const { bullet_list: bulletList, list_item: listItem } = editorView.state.schema.nodes\n const textStyle = {\n color: richTextAttrs.value.color,\n fontsize: richTextAttrs.value.fontsize\n }\n toggleList(bulletList, listItem, listStyleType, textStyle)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'orderedList') {\n const listStyleType = item.value || ''\n const { ordered_list: orderedList, list_item: listItem } = editorView.state.schema.nodes\n const textStyle = {\n color: richTextAttrs.value.color,\n fontsize: richTextAttrs.value.fontsize\n }\n toggleList(orderedList, listItem, listStyleType, textStyle)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'clear') {\n autoSelectAll(editorView)\n const { $from, $to } = editorView.state.selection\n editorView.dispatch(editorView.state.tr.removeMark($from.pos, $to.pos))\n setListStyle(editorView, [\n { key: 'fontsize', value: '' },\n { key: 'color', value: '' },\n ])\n }\n else if (item.command === 'link') {\n const markType = editorView.state.schema.marks.link\n const { from, to } = editorView.state.selection\n const result = findNodesWithSameMark(editorView.state.doc, from, to, markType)\n if (result) {\n if (item.value) {\n const mark = editorView.state.schema.marks.link.create({ href: item.value, title: item.value })\n addMark(editorView, mark, { from: result.from.pos, to: result.to.pos + 1 })\n }\n else editorView.dispatch(editorView.state.tr.removeMark(result.from.pos, result.to.pos + 1, markType))\n }\n else if (markActive(editorView.state, markType)) {\n if (item.value) {\n const mark = editorView.state.schema.marks.link.create({ href: item.value, title: item.value })\n addMark(editorView, mark)\n }\n else toggleMark(markType)(editorView.state, editorView.dispatch)\n }\n else if (item.value) {\n autoSelectAll(editorView)\n toggleMark(markType, { href: item.value, title: item.value })(editorView.state, editorView.dispatch)\n }\n }\n else if (item.command === 'insert' && item.value) {\n editorView.dispatch(editorView.state.tr.insertText(item.value))\n }\n }\n\n editorView.focus()\n handleInput()\n handleClick()\n}\n\n// 鼠标抬起时,执行格式刷命令\nconst handleMouseup = () => {\n if (!textFormatPainter.value) return\n const { keep, ...newProps } = textFormatPainter.value\n\n const actions: RichTextAction[] = [{ command: 'clear' }]\n for (const key of Object.keys(newProps) as TextFormatPainterKeys[]) {\n const command = key\n const value = textFormatPainter.value[key]\n if (value === true) actions.push({ command })\n else if (value) actions.push({ command, value })\n }\n execCommand({ action: actions })\n if (!keep) mainStore.setTextFormatPainter(null)\n}\n\n// Prosemirror编辑器的初始化和卸载\nonMounted(() => {\n editorView = initProsemirrorEditor((editorViewRef.value as Element), textContent.value, {\n handleDOMEvents: {\n focus: handleFocus,\n blur: handleBlur,\n keydown: handleKeydown,\n click: handleClick,\n mouseup: handleMouseup,\n },\n editable: () => props.editable,\n })\n if (props.autoFocus) editorView.focus()\n})\nonUnmounted(() => {\n editorView && editorView.destroy()\n})\n\nconst syncAttrsToStore = () => {\n if (handleElementId.value !== props.elementId) return\n handleClick()\n}\n\nemitter.on(EmitterEvents.RICH_TEXT_COMMAND, execCommand)\nemitter.on(EmitterEvents.SYNC_RICH_TEXT_ATTRS_TO_STORE, syncAttrsToStore)\nonUnmounted(() => {\n emitter.off(EmitterEvents.RICH_TEXT_COMMAND, execCommand)\n emitter.off(EmitterEvents.SYNC_RICH_TEXT_ATTRS_TO_STORE, syncAttrsToStore)\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"prosemirror-editor\", { 'format-painter': _unref(textFormatPainter) }]),\n ref_key: \"editorViewRef\",\n ref: editorViewRef,\n onMousedown: _cache[0] || (_cache[0] = $event => emit('mousedown', $event))\n }, null, 34))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./ProsemirrorEditor.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ProsemirrorEditor.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ProsemirrorEditor.vue?vue&type=style&index=0&id=653f533c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-653f533c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2a1e49ba\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"drag-handler top\" }, null, -1))\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"drag-handler bottom\" }, null, -1))\n\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { debounce } from 'lodash'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTTextElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\nimport ProsemirrorEditor from '@/views/components/element/ProsemirrorEditor.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { handleElementId, isScaling } = storeToRefs(mainStore)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst elementRef = ref()\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo, canMove)\n}\n\n// 监听文本元素的尺寸变化,当高度变化时,更新高度到vuex\n// 如果高度变化时正处在缩放操作中,则等待缩放操作结束后再更新\nconst realHeightCache = ref(-1)\nconst realWidthCache = ref(-1)\n\nwatch(isScaling, () => {\n if (handleElementId.value !== props.elementInfo.id) return\n\n if (!isScaling.value) {\n if (!props.elementInfo.vertical && realHeightCache.value !== -1) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeightCache.value },\n })\n realHeightCache.value = -1\n }\n if (props.elementInfo.vertical && realWidthCache.value !== -1) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { width: realWidthCache.value },\n })\n realWidthCache.value = -1\n }\n }\n})\n\nconst updateTextElementHeight = (entries: ResizeObserverEntry[]) => {\n const contentRect = entries[0].contentRect\n if (!elementRef.value) return\n\n const realHeight = contentRect.height + 20\n const realWidth = contentRect.width + 20\n\n if (!props.elementInfo.vertical && props.elementInfo.height !== realHeight) {\n if (!isScaling.value) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeight },\n })\n }\n else realHeightCache.value = realHeight\n }\n if (props.elementInfo.vertical && props.elementInfo.width !== realWidth) {\n if (!isScaling.value) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { width: realWidth },\n })\n }\n else realWidthCache.value = realWidth\n }\n}\nconst resizeObserver = new ResizeObserver(updateTextElementHeight)\n\nonMounted(() => {\n if (elementRef.value) resizeObserver.observe(elementRef.value)\n})\nonUnmounted(() => {\n if (elementRef.value) resizeObserver.unobserve(elementRef.value)\n})\n\nconst updateContent = (content: string) => {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { content },\n })\n \n addHistorySnapshot()\n}\n\nconst checkEmptyText = debounce(function() {\n const pureText = props.elementInfo.content.replaceAll(/<[^>]+>/g, '')\n if (!pureText) slidesStore.deleteElement(props.elementInfo.id)\n}, 300, { trailing: true })\n\nconst isHandleElement = computed(() => handleElementId.value === props.elementInfo.id)\nwatch(isHandleElement, () => {\n if (!isHandleElement.value) checkEmptyText()\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-text\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n ref_key: \"elementRef\",\n ref: elementRef,\n style: _normalizeStyle({\n width: _ctx.elementInfo.vertical ? 'auto' : _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.vertical ? _ctx.elementInfo.height + 'px' : 'auto',\n backgroundColor: _ctx.elementInfo.fill,\n opacity: _ctx.elementInfo.opacity,\n textShadow: _unref(shadowStyle),\n lineHeight: _ctx.elementInfo.lineHeight,\n letterSpacing: (_ctx.elementInfo.wordSpace || 0) + 'px',\n color: _ctx.elementInfo.defaultColor,\n fontFamily: _ctx.elementInfo.defaultFontName,\n writingMode: _ctx.elementInfo.vertical ? 'vertical-rl' : 'horizontal-tb',\n }),\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event)),\n onTouchstart: _cache[3] || (_cache[3] = $event => handleSelectElement($event))\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createVNode(ProsemirrorEditor, {\n class: \"text\",\n elementId: _ctx.elementInfo.id,\n defaultColor: _ctx.elementInfo.defaultColor,\n defaultFontName: _ctx.elementInfo.defaultFontName,\n editable: !_ctx.elementInfo.lock,\n value: _ctx.elementInfo.content,\n style: _normalizeStyle({\n '--paragraphSpace': `${_ctx.elementInfo.paragraphSpace === undefined ? 5 : _ctx.elementInfo.paragraphSpace}px`,\n }),\n onUpdate: _cache[0] || (_cache[0] = value => updateContent(value)),\n onMousedown: _cache[1] || (_cache[1] = $event => handleSelectElement($event, false))\n }, null, 8, [\"elementId\", \"defaultColor\", \"defaultFontName\", \"editable\", \"value\", \"style\"]),\n _hoisted_1,\n _hoisted_2\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=2a1e49ba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2a1e49ba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = [\"id\", \"gradientTransform\"]\nconst _hoisted_2 = [\"stop-color\"]\nconst _hoisted_3 = [\"stop-color\"]\nconst _hoisted_4 = [\"id\"]\nconst _hoisted_5 = [\"stop-color\"]\nconst _hoisted_6 = [\"stop-color\"]\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'GradientDefs',\n props: {\n id: {},\n type: {},\n color1: {},\n color2: {},\n rotate: { default: 0 }\n },\n setup(__props: any) {\n\r\n\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.type === 'linear')\n ? (_openBlock(), _createElementBlock(\"linearGradient\", {\n key: 0,\n id: _ctx.id,\n x1: \"0%\",\n y1: \"0%\",\n x2: \"100%\",\n y2: \"0%\",\n gradientTransform: `rotate(${_ctx.rotate},0.5,0.5)`\n }, [\n _createElementVNode(\"stop\", {\n offset: \"0%\",\n \"stop-color\": _ctx.color1\n }, null, 8, _hoisted_2),\n _createElementVNode(\"stop\", {\n offset: \"100%\",\n \"stop-color\": _ctx.color2\n }, null, 8, _hoisted_3)\n ], 8, _hoisted_1))\n : (_openBlock(), _createElementBlock(\"radialGradient\", {\n key: 1,\n id: _ctx.id\n }, [\n _createElementVNode(\"stop\", {\n offset: \"0%\",\n \"stop-color\": _ctx.color1\n }, null, 8, _hoisted_5),\n _createElementVNode(\"stop\", {\n offset: \"100%\",\n \"stop-color\": _ctx.color2\n }, null, 8, _hoisted_6)\n ], 8, _hoisted_4))\n}\n}\n\n})","import script from \"./GradientDefs.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./GradientDefs.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5d988de2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = { key: 0 }\nconst _hoisted_3 = [\"transform\"]\nconst _hoisted_4 = [\"d\", \"fill\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { computed, nextTick, ref, watch } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTShapeElement, ShapeText } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport GradientDefs from './GradientDefs.vue'\nimport ProsemirrorEditor from '@/views/components/element/ProsemirrorEditor.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { handleElementId, shapeFormatPainter } = storeToRefs(mainStore)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo, canMove)\n}\n\nconst execFormatPainter = () => {\n if (!shapeFormatPainter.value) return\n const { keep, ...newProps } = shapeFormatPainter.value\n\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: newProps,\n })\n \n addHistorySnapshot()\n if (!keep) mainStore.setShapeFormatPainter(null)\n}\n\nconst outline = computed(() => props.elementInfo.outline)\nconst { outlineWidth, outlineColor, strokeDashArray } = useElementOutline(outline)\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst editable = ref(false)\n\nwatch(handleElementId, () => {\n if (handleElementId.value !== props.elementInfo.id) {\n if (editable.value) editable.value = false\n }\n})\n\nconst text = computed(() => {\n const defaultText: ShapeText = {\n content: '',\n defaultFontName: '微软雅黑',\n defaultColor: '#000',\n align: 'middle',\n }\n if (!props.elementInfo.text) return defaultText\n\n return props.elementInfo.text\n})\n\nconst updateText = (content: string) => {\n const _text = { ...text.value, content }\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: { text: _text },\n })\n \n addHistorySnapshot()\n}\n\nconst checkEmptyText = () => {\n if (!props.elementInfo.text) return\n\n const pureText = props.elementInfo.text.content.replaceAll(/<[^>]+>/g, '')\n if (!pureText) {\n slidesStore.removeElementProps({ id: props.elementInfo.id, propName: 'text' })\n addHistorySnapshot()\n }\n}\n\nconst prosemirrorEditorRef = ref>()\nconst startEdit = () => {\n editable.value = true\n nextTick(() => prosemirrorEditorRef.value && prosemirrorEditorRef.value.focus())\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-shape\", {\n 'lock': _ctx.elementInfo.lock,\n 'format-painter': _unref(shapeFormatPainter),\n }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n opacity: _ctx.elementInfo.opacity,\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n color: text.value.defaultColor,\n fontFamily: text.value.defaultFontName,\n }),\n onMousedown: _cache[3] || (_cache[3] = $event => handleSelectElement($event)),\n onMouseup: _cache[4] || (_cache[4] = ($event: any) => (execFormatPainter())),\n onTouchstart: _cache[5] || (_cache[5] = $event => handleSelectElement($event)),\n onDblclick: _cache[6] || (_cache[6] = ($event: any) => (startEdit()))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height\n }, [\n (_ctx.elementInfo.gradient)\n ? (_openBlock(), _createElementBlock(\"defs\", _hoisted_2, [\n _createVNode(GradientDefs, {\n id: `editabel-gradient-${_ctx.elementInfo.id}`,\n type: _ctx.elementInfo.gradient.type,\n color1: _ctx.elementInfo.gradient.color[0],\n color2: _ctx.elementInfo.gradient.color[1],\n rotate: _ctx.elementInfo.gradient.rotate\n }, null, 8, [\"id\", \"type\", \"color1\", \"color2\", \"rotate\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n class: \"shape-path\",\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n d: _ctx.elementInfo.path,\n fill: _ctx.elementInfo.gradient ? `url(#editabel-gradient-${_ctx.elementInfo.id})` : _ctx.elementInfo.fill,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_4)\n ], 8, _hoisted_3)\n ], 8, _hoisted_1)),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"shape-text\", [text.value.align, { 'editable': editable.value || text.value.content }]])\n }, [\n (editable.value || text.value.content)\n ? (_openBlock(), _createBlock(ProsemirrorEditor, {\n key: 0,\n ref_key: \"prosemirrorEditorRef\",\n ref: prosemirrorEditorRef,\n elementId: _ctx.elementInfo.id,\n defaultColor: text.value.defaultColor,\n defaultFontName: text.value.defaultFontName,\n editable: !_ctx.elementInfo.lock,\n value: text.value.content,\n onUpdate: _cache[0] || (_cache[0] = value => updateText(value)),\n onBlur: _cache[1] || (_cache[1] = ($event: any) => (checkEmptyText())),\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event, false))\n }, null, 8, [\"elementId\", \"defaultColor\", \"defaultFontName\", \"editable\", \"value\"]))\n : _createCommentVNode(\"\", true)\n ], 2)\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=5d988de2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5d988de2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"id\", \"markerWidth\", \"markerHeight\", \"refX\", \"refY\"]\nconst _hoisted_2 = [\"d\", \"fill\", \"transform\"]\n\nimport { computed } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinePointMarker',\n props: {\n id: {},\n position: {},\n type: {},\n baseSize: {},\n color: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst pathMap = {\n dot: 'm0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z',\n arrow: 'M0,0 L10,5 0,10 Z',\n}\nconst rotateMap: { [key: string]: number } = {\n 'arrow-start': 180,\n 'arrow-end': 0,\n}\n\nconst path = computed(() => pathMap[props.type])\nconst rotate = computed(() => rotateMap[`${props.type}-${props.position}`] || 0)\nconst size = computed(() => props.baseSize < 2 ? 2 : props.baseSize)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"marker\", {\n id: `${_ctx.id}-${_ctx.type}-${_ctx.position}`,\n markerUnits: \"userSpaceOnUse\",\n orient: \"auto\",\n markerWidth: size.value * 3,\n markerHeight: size.value * 3,\n refX: size.value * 1.5,\n refY: size.value * 1.5\n }, [\n _createElementVNode(\"path\", {\n d: path.value,\n fill: _ctx.color,\n transform: `scale(${size.value * 0.3}, ${size.value * 0.3}) rotate(${rotate.value}, 5, 5)`\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n}\n}\n\n})","\n\n","import script from \"./LinePointMarker.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinePointMarker.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-16512454\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\", \"marker-start\", \"marker-end\"]\nconst _hoisted_3 = [\"d\"]\n\nimport { computed } from 'vue'\nimport type { PPTLineElement } from '@/types/slides'\nimport { getLineElementPath } from '@/utils/element'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\n\nimport LinePointMarker from './LinePointMarker.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst svgWidth = computed(() => {\n const width = Math.abs(props.elementInfo.start[0] - props.elementInfo.end[0])\n return width < 24 ? 24 : width\n})\nconst svgHeight = computed(() => {\n const height = Math.abs(props.elementInfo.start[1] - props.elementInfo.end[1])\n return height < 24 ? 24 : height\n})\n\nconst lineDashArray = computed(() => {\n if (props.elementInfo.style !== 'dashed') return '0 0'\n const size = props.elementInfo.width\n return size <= 8 ? `${size * 5} ${size * 2.5}` : `${size * 5} ${size * 1.5}`\n})\n\nconst path = computed(() => {\n return getLineElementPath(props.elementInfo)\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-shape\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({ filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '' }),\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: svgWidth.value,\n height: svgHeight.value\n }, [\n _createElementVNode(\"defs\", null, [\n (_ctx.elementInfo.points[0])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 0,\n id: _ctx.elementInfo.id,\n position: \"start\",\n type: _ctx.elementInfo.points[0],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.elementInfo.points[1])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 1,\n id: _ctx.elementInfo.id,\n position: \"end\",\n type: _ctx.elementInfo.points[1],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"path\", {\n class: \"line-point\",\n d: path.value,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.width,\n \"stroke-dasharray\": lineDashArray.value,\n fill: \"none\",\n \"marker-start\": _ctx.elementInfo.points[0] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[0]}-start)` : '',\n \"marker-end\": _ctx.elementInfo.points[1] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[1]}-end)` : ''\n }, null, 8, _hoisted_2),\n _withDirectives(_createElementVNode(\"path\", {\n class: \"line-path\",\n d: path.value,\n stroke: \"transparent\",\n \"stroke-width\": \"20\",\n fill: \"none\"\n }, null, 8, _hoisted_3), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 8, _hoisted_1))\n ], 36)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=16512454&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-16512454\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { computed, inject, onMounted, ref, watch } from 'vue'\nimport tinycolor from 'tinycolor2'\nimport { BarChart, LineChart, PieChart } from 'chartist'\nimport type { ChartData, ChartOptions, ChartType } from '@/types/slides'\nimport { injectKeySlideScale } from '@/types/injectKey'\n\nimport 'chartist/dist/index.css'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Chart',\n props: {\n width: {},\n height: {},\n type: {},\n data: {},\n themeColor: {},\n legends: {},\n options: {},\n gridColor: {},\n legend: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst chartRef = ref()\nconst slideScale = inject(injectKeySlideScale) || ref(1)\n\nlet chart: LineChart | BarChart | PieChart | undefined\n\nconst chartHeight = computed(() => {\n if (props.legend) return props.height - 20\n return props.height\n})\n\nconst getPieChartData = () => ({ ...props.data, series: props.data.series[0] })\n\nconst getOptions = () => {\n const propsOptopns = props.options || {}\n return {\n ...propsOptopns,\n width: props.width * slideScale.value,\n height: chartHeight.value * slideScale.value,\n }\n}\n\nconst renderChart = () => {\n if (!chartRef.value) return\n\n const options = getOptions()\n if (props.type === 'bar') chart = new BarChart(chartRef.value, props.data, options)\n if (props.type === 'line') chart = new LineChart(chartRef.value, props.data, options)\n if (props.type === 'pie') chart = new PieChart(chartRef.value, getPieChartData(), options)\n}\n\nconst updateChart = () => {\n if (!chart) {\n renderChart()\n return\n }\n const options = getOptions()\n const data = props.type === 'pie' ? getPieChartData() : props.data\n chart.update(data, options)\n}\n\nwatch([\n () => props.width,\n () => props.height,\n () => props.data,\n () => props.options,\n slideScale,\n], updateChart)\n\nonMounted(renderChart)\n\nconst themeColors = computed(() => {\n let colors: string[] = []\n if (props.themeColor.length >= 10) colors = props.themeColor\n else if (props.themeColor.length === 1) colors = tinycolor(props.themeColor[0]).analogous(10).map(color => color.toRgbString())\n else {\n const len = props.themeColor.length\n const supplement = tinycolor(props.themeColor[len - 1]).analogous(10 + 1 - len).map(color => color.toRgbString())\n colors = [...props.themeColor.slice(0, len - 1), ...supplement]\n }\n return colors\n})\n\n// 更新主题配色:\n// 如果当前所设置的主题色数小于10,剩余部分获取最后一个主题色的相近颜色作为配色\nconst updateTheme = () => {\n if (!chartRef.value) return\n\n for (let i = 0; i < 10; i++) {\n chartRef.value.style.setProperty(`--theme-color-${i + 1}`, themeColors.value[i])\n }\n}\n\nwatch(themeColors, updateTheme)\nonMounted(updateTheme)\n\n// 更新网格颜色,包括坐标的文字部分\nconst updateGridColor = () => {\n if (!chartRef.value) return\n if (props.gridColor) chartRef.value.style.setProperty(`--grid-color`, props.gridColor)\n}\n\nwatch(() => props.gridColor, updateGridColor)\nonMounted(updateGridColor)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"chart\",\n style: _normalizeStyle({ flexDirection: _ctx.legend === 'top' ? 'column-reverse' : 'column' })\n }, [\n _createElementVNode(\"div\", {\n class: \"chart-content\",\n ref_key: \"chartRef\",\n ref: chartRef,\n style: _normalizeStyle({\n width: _ctx.width + 'px',\n height: chartHeight.value + 'px',\n transform: `scale(${1 / _unref(slideScale)})`,\n })\n }, null, 4),\n (_ctx.legend)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"legends\",\n style: _normalizeStyle({ transform: `scale(${1 / _unref(slideScale)})` })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.legends, (legend, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"legend\",\n key: index,\n style: _normalizeStyle({ color: _ctx.gridColor })\n }, [\n _createElementVNode(\"div\", {\n class: \"block\",\n style: _normalizeStyle({ backgroundColor: themeColors.value[index] })\n }, null, 4),\n _createTextVNode(\" \" + _toDisplayString(legend), 1)\n ], 4))\n }), 128))\n ], 4))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./Chart.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Chart.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Chart.vue?vue&type=style&index=0&id=ae2a96a6&lang=scss&scoped=true\"\nimport \"./Chart.vue?vue&type=style&index=1&id=ae2a96a6&lang=scss\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-ae2a96a6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nimport type { PPTChartElement } from '@/types/slides'\r\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\r\nimport emitter, { EmitterEvents } from '@/utils/emitter'\r\n\r\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\r\nimport Chart from './Chart.vue'\r\n\r\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\r\nconst props = __props\r\n\r\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\r\n if (props.elementInfo.lock) return\r\n e.stopPropagation()\r\n\r\n props.selectElement(e, props.elementInfo)\r\n}\r\n\r\nconst openDataEditor = () => {\r\n emitter.emit(EmitterEvents.OPEN_CHART_DATA_EDITOR)\r\n}\r\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-chart\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\r\n top: _ctx.elementInfo.top + 'px',\r\n left: _ctx.elementInfo.left + 'px',\r\n width: _ctx.elementInfo.width + 'px',\r\n height: _ctx.elementInfo.height + 'px',\r\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\r\n backgroundColor: _ctx.elementInfo.fill,\r\n }),\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event)),\n onDblclick: _cache[2] || (_cache[2] = ($event: any) => (openDataEditor()))\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createVNode(Chart, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n type: _ctx.elementInfo.chartType,\n data: _ctx.elementInfo.data,\n options: _ctx.elementInfo.options,\n themeColor: _ctx.elementInfo.themeColor,\n gridColor: _ctx.elementInfo.gridColor,\n legends: _ctx.elementInfo.data.legends,\n legend: _ctx.elementInfo.legend || ''\n }, null, 8, [\"width\", \"height\", \"type\", \"data\", \"options\", \"themeColor\", \"gridColor\", \"legends\", \"legend\"])\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\r\n\r\n\r\n\r\n\r\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=6fc3de39&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6fc3de39\"]])\n\nexport default __exports__","import type { CSSProperties } from 'vue'\nimport type { TableCellStyle } from '@/types/slides'\n\n/**\n * 计算单元格文本样式\n * @param style 单元格文本样式原数据\n */\nexport const getTextStyle = (style?: TableCellStyle): CSSProperties => {\n if (!style) return {}\n const {\n bold,\n em,\n underline,\n strikethrough,\n color,\n backcolor,\n fontsize,\n fontname,\n align,\n } = style\n\n let textDecoration = `${underline ? 'underline' : ''} ${strikethrough ? 'line-through' : ''}`\n if (textDecoration === ' ') textDecoration = 'none'\n \n return {\n fontWeight: bold ? 'bold' : 'normal',\n fontStyle: em ? 'italic' : 'normal',\n textDecoration,\n color: color || '#000',\n backgroundColor: backcolor || '',\n fontSize: fontsize || '14px',\n fontFamily: fontname || '微软雅黑',\n textAlign: align || 'left',\n }\n}\n\nexport const formatText = (text: string) => {\n return text.replace(/\\n/g, '
').replace(/ /g, ' ')\n}","import { computed, type Ref } from 'vue'\nimport type { TableCell } from '@/types/slides'\n\n// 计算无效的单元格位置(被合并的单元格位置)集合\n\nexport default (cells: Ref) => {\n const hideCells = computed(() => {\n const hideCells = []\n \n for (let i = 0; i < cells.value.length; i++) {\n const rowCells = cells.value[i]\n\n for (let j = 0; j < rowCells.length; j++) {\n const cell = rowCells[j]\n \n if (cell.colspan > 1 || cell.rowspan > 1) {\n for (let row = i; row < i + cell.rowspan; row++) {\n for (let col = row === i ? j + 1 : j; col < j + cell.colspan; col++) {\n hideCells.push(`${row}_${col}`)\n }\n }\n }\n }\n }\n return hideCells\n })\n\n return {\n hideCells,\n }\n}","import { ref, watch, type Ref } from 'vue'\nimport type { TableTheme } from '@/types/slides'\nimport { getTableSubThemeColor } from '@/utils/element'\n\n// 通过表格的主题色计算辅助颜色\n\nexport default (theme: Ref) => {\n const subThemeColor = ref(['', ''])\n watch(() => theme.value, () => {\n if (theme.value) {\n subThemeColor.value = getTableSubThemeColor(theme.value.color)\n }\n }, { immediate: true })\n\n return {\n subThemeColor,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-7a7222ac\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"innerHTML\"]\n\nimport { onBeforeUnmount, ref, watch } from 'vue'\nimport { pasteCustomClipboardString, pasteExcelClipboardString } from '@/utils/clipboard'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'CustomTextarea',\n props: {\n value: { default: '' }\n },\n emits: [\"updateValue\", \"insertExcelData\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst textareaRef = ref()\nconst text = ref('')\nconst isFocus = ref(false)\n\n// 自定义v-modal,同步数据\n// 当文本框聚焦时,不执行数据同步\nwatch(() => props.value, () => {\n if (isFocus.value) return\n text.value = props.value\n if (textareaRef.value) textareaRef.value.innerHTML = props.value\n}, { immediate: true })\n\nconst handleInput = () => {\n if (!textareaRef.value) return\n const text = textareaRef.value.innerHTML\n emit('updateValue', text)\n}\n\n// 聚焦时更新焦点标记,并监听粘贴事件\nconst handleFocus = () => {\n isFocus.value = true\n\n if (!textareaRef.value) return\n textareaRef.value.onpaste = (e: ClipboardEvent) => {\n e.preventDefault()\n if (!e.clipboardData) return\n\n const clipboardDataFirstItem = e.clipboardData.items[0]\n\n if (clipboardDataFirstItem && clipboardDataFirstItem.kind === 'string' && clipboardDataFirstItem.type === 'text/plain') {\n clipboardDataFirstItem.getAsString(text => {\n const clipboardData = pasteCustomClipboardString(text)\n if (typeof clipboardData === 'object') return\n \n const excelData = pasteExcelClipboardString(text)\n if (excelData) {\n emit('insertExcelData', excelData)\n if (textareaRef.value) textareaRef.value.innerHTML = excelData[0][0]\n return\n }\n\n document.execCommand('insertText', false, text)\n })\n }\n }\n}\n\n// 失焦时更新焦点标记,清除粘贴事件监听\nconst handleBlur = () => {\n isFocus.value = false\n if (textareaRef.value) textareaRef.value.onpaste = null\n}\n\n// 清除粘贴事件监听\nonBeforeUnmount(() => {\n if (textareaRef.value) textareaRef.value.onpaste = null\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"custom-textarea\",\n ref_key: \"textareaRef\",\n ref: textareaRef,\n contenteditable: true,\n onFocus: _cache[0] || (_cache[0] = ($event: any) => (handleFocus())),\n onBlur: _cache[1] || (_cache[1] = ($event: any) => (handleBlur())),\n onInput: _cache[2] || (_cache[2] = ($event: any) => (handleInput())),\n innerHTML: text.value\n }, null, 40, _hoisted_1))\n}\n}\n\n})","\n\n\n\n","import script from \"./CustomTextarea.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./CustomTextarea.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./CustomTextarea.vue?vue&type=style&index=0&id=7a7222ac&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7a7222ac\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, unref as _unref, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, createBlock as _createBlock, vShow as _vShow, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-0236a619\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"handler\"\n}\nconst _hoisted_2 = [\"onMousedown\"]\nconst _hoisted_3 = [\"width\"]\nconst _hoisted_4 = [\"rowspan\", \"colspan\", \"data-cell-index\", \"onMousedown\", \"onMouseenter\"]\nconst _hoisted_5 = [\"innerHTML\"]\n\nimport { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { debounce, isEqual } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore } from '@/store'\nimport type { PPTElementOutline, TableCell, TableTheme } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport { KEYS } from '@/configs/hotkey'\nimport { getTextStyle, formatText } from './utils'\nimport useHideCells from './useHideCells'\nimport useSubThemeColor from './useSubThemeColor'\n\nimport CustomTextarea from './CustomTextarea.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'EditableTable',\n props: {\n data: {},\n width: {},\n cellMinHeight: {},\n colWidths: {},\n outline: {},\n theme: {},\n editable: { type: Boolean, default: true }\n },\n emits: [\"change\", \"changeColWidths\", \"changeSelectedCells\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst { canvasScale } = storeToRefs(useMainStore())\n \nconst isStartSelect = ref(false)\nconst startCell = ref([])\nconst endCell = ref([])\n\nconst tableCells = computed({\n get() {\n return props.data\n },\n set(newData) {\n emit('change', newData)\n },\n})\n\n// 主题辅助色\nconst theme = computed(() => props.theme)\nconst { subThemeColor } = useSubThemeColor(theme)\n\n// 计算表格每一列的列宽和总宽度\nconst colSizeList = ref([])\nconst totalWidth = computed(() => colSizeList.value.reduce((a, b) => a + b))\nwatch([\n () => props.colWidths,\n () => props.width,\n], () => {\n colSizeList.value = props.colWidths.map(item => item * props.width)\n}, { immediate: true })\n\n// 清除全部单元格的选中状态\n// 表格处于不可编辑状态时也需要清除\nconst removeSelectedCells = () => {\n startCell.value = []\n endCell.value = []\n}\n\nwatch(() => props.editable, () => {\n if (!props.editable) removeSelectedCells()\n})\n\n// 用于拖拽列宽的操作节点位置\nconst dragLinePosition = computed(() => {\n const dragLinePosition: number[] = []\n for (let i = 1; i < colSizeList.value.length + 1; i++) {\n const pos = colSizeList.value.slice(0, i).reduce((a, b) => (a + b))\n dragLinePosition.push(pos)\n }\n return dragLinePosition\n})\n\n// 无效的单元格位置(被合并的单元格位置)集合\nconst cells = computed(() => props.data)\nconst { hideCells } = useHideCells(cells)\n\n// 当前选中的单元格集合\nconst selectedCells = computed(() => {\n if (!startCell.value.length) return []\n const [startX, startY] = startCell.value\n\n if (!endCell.value.length) return [`${startX}_${startY}`]\n const [endX, endY] = endCell.value\n\n if (startX === endX && startY === endY) return [`${startX}_${startY}`]\n\n const selectedCells = []\n\n const minX = Math.min(startX, endX)\n const minY = Math.min(startY, endY)\n const maxX = Math.max(startX, endX)\n const maxY = Math.max(startY, endY)\n\n for (let i = 0; i < tableCells.value.length; i++) {\n const rowCells = tableCells.value[i]\n for (let j = 0; j < rowCells.length; j++) {\n if (i >= minX && i <= maxX && j >= minY && j <= maxY) selectedCells.push(`${i}_${j}`)\n }\n }\n return selectedCells\n})\n\nwatch(selectedCells, (value, oldValue) => {\n if (isEqual(value, oldValue)) return\n emit('changeSelectedCells', selectedCells.value)\n})\n\n// 当前激活的单元格:当且仅当只有一个选中单元格时,该单元格为激活的单元格\nconst activedCell = computed(() => {\n if (selectedCells.value.length > 1) return null\n return selectedCells.value[0]\n})\n\n// 设置选中单元格状态(鼠标点击或拖选)\nconst handleMouseup = () => isStartSelect.value = false\n\nconst handleCellMousedown = (e: MouseEvent, rowIndex: number, colIndex: number) => {\n if (e.button === 0) {\n endCell.value = []\n isStartSelect.value = true\n startCell.value = [rowIndex, colIndex]\n }\n}\n\nconst handleCellMouseenter = (rowIndex: number, colIndex: number) => {\n if (!isStartSelect.value) return\n endCell.value = [rowIndex, colIndex]\n}\n\nonMounted(() => {\n document.addEventListener('mouseup', handleMouseup)\n})\nonUnmounted(() => {\n document.removeEventListener('mouseup', handleMouseup)\n})\n\n// 判断某位置是否为无效单元格(被合并掉的位置)\nconst isHideCell = (rowIndex: number, colIndex: number) => hideCells.value.includes(`${rowIndex}_${colIndex}`)\n\n// 选中指定的列\nconst selectCol = (index: number) => {\n const maxRow = tableCells.value.length - 1\n startCell.value = [0, index]\n endCell.value = [maxRow, index]\n}\n\n// 选中指定的行\nconst selectRow = (index: number) => {\n const maxCol = tableCells.value[index].length - 1\n startCell.value = [index, 0]\n endCell.value = [index, maxCol]\n}\n\n// 选中全部单元格\nconst selectAll = () => {\n const maxRow = tableCells.value.length - 1\n const maxCol = tableCells.value[maxRow].length - 1\n startCell.value = [0, 0]\n endCell.value = [maxRow, maxCol]\n}\n\n// 删除一行\nconst deleteRow = (rowIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n const targetCells = tableCells.value[rowIndex]\n const hideCellsPos = []\n for (let i = 0; i < targetCells.length; i++) {\n if (isHideCell(rowIndex, i)) hideCellsPos.push(i)\n }\n \n for (const pos of hideCellsPos) {\n for (let i = rowIndex; i >= 0; i--) {\n if (!isHideCell(i, pos)) {\n _tableCells[i][pos].rowspan = _tableCells[i][pos].rowspan - 1\n break\n }\n }\n }\n\n _tableCells.splice(rowIndex, 1)\n tableCells.value = _tableCells\n}\n\n// 删除一列\nconst deleteCol = (colIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n const hideCellsPos = []\n for (let i = 0; i < tableCells.value.length; i++) {\n if (isHideCell(i, colIndex)) hideCellsPos.push(i)\n }\n\n for (const pos of hideCellsPos) {\n for (let i = colIndex; i >= 0; i--) {\n if (!isHideCell(pos, i)) {\n _tableCells[pos][i].colspan = _tableCells[pos][i].colspan - 1\n break\n }\n }\n }\n\n tableCells.value = _tableCells.map(item => {\n item.splice(colIndex, 1)\n return item\n })\n colSizeList.value.splice(colIndex, 1)\n emit('changeColWidths', colSizeList.value)\n}\n\n// 插入一行\nconst insertRow = (rowIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n const rowCells: TableCell[] = []\n for (let i = 0; i < _tableCells[0].length; i++) {\n rowCells.push({\n colspan: 1,\n rowspan: 1,\n text: '',\n id: nanoid(10),\n })\n }\n\n _tableCells.splice(rowIndex, 0, rowCells)\n tableCells.value = _tableCells\n}\n\n// 插入一列\nconst insertCol = (colIndex: number) => {\n tableCells.value = tableCells.value.map(item => {\n const cell = {\n colspan: 1,\n rowspan: 1,\n text: '',\n id: nanoid(10),\n }\n item.splice(colIndex, 0, cell)\n return item\n })\n colSizeList.value.splice(colIndex, 0, 100)\n emit('changeColWidths', colSizeList.value)\n}\n\n// 填充指定的行/列数\nconst fillTable = (rowCount: number, colCount: number) => {\n let _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n const defaultCell = { colspan: 1, rowspan: 1, text: '' }\n \n if (rowCount) {\n const newRows = []\n for (let i = 0; i < rowCount; i++) {\n const rowCells: TableCell[] = []\n for (let j = 0; j < _tableCells[0].length; j++) {\n rowCells.push({\n ...defaultCell,\n id: nanoid(10),\n })\n }\n newRows.push(rowCells)\n }\n _tableCells = [..._tableCells, ...newRows]\n }\n if (colCount) {\n _tableCells = _tableCells.map(item => {\n const cells: TableCell[] = []\n for (let i = 0; i < colCount; i++) {\n const cell = {\n ...defaultCell,\n id: nanoid(10),\n }\n cells.push(cell)\n }\n return [...item, ...cells]\n })\n colSizeList.value = [...colSizeList.value, ...new Array(colCount).fill(100)]\n emit('changeColWidths', colSizeList.value)\n }\n\n tableCells.value = _tableCells\n}\n\n// 合并单元格\nconst mergeCells = () => {\n const [startX, startY] = startCell.value\n const [endX, endY] = endCell.value\n\n const minX = Math.min(startX, endX)\n const minY = Math.min(startY, endY)\n const maxX = Math.max(startX, endX)\n const maxY = Math.max(startY, endY)\n\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n \n _tableCells[minX][minY].rowspan = maxX - minX + 1\n _tableCells[minX][minY].colspan = maxY - minY + 1\n\n tableCells.value = _tableCells\n removeSelectedCells()\n}\n\n// 拆分单元格\nconst splitCells = (rowIndex: number, colIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n _tableCells[rowIndex][colIndex].rowspan = 1\n _tableCells[rowIndex][colIndex].colspan = 1\n\n tableCells.value = _tableCells\n removeSelectedCells()\n}\n\n// 鼠标拖拽调整列宽\nconst handleMousedownColHandler = (e: MouseEvent, colIndex: number) => {\n removeSelectedCells()\n let isMouseDown = true\n\n const originWidth = colSizeList.value[colIndex]\n const startPageX = e.pageX\n\n const minWidth = 50\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n \n const moveX = (e.pageX - startPageX) / canvasScale.value\n const width = originWidth + moveX < minWidth ? minWidth : Math.round(originWidth + moveX)\n\n colSizeList.value[colIndex] = width\n }\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n emit('changeColWidths', colSizeList.value)\n }\n}\n\n// 清空选中单元格内的文字\nconst clearSelectedCellText = () => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n for (let i = 0; i < _tableCells.length; i++) {\n for (let j = 0; j < _tableCells[i].length; j++) {\n if (selectedCells.value.includes(`${i}_${j}`)) {\n _tableCells[i][j].text = ''\n }\n }\n }\n tableCells.value = _tableCells\n}\n\n// 将焦点移动到下一个单元格\n// 当前行右边有单元格时,焦点右移\n// 当前行右边无单元格(已处在行末),且存在下一行时,焦点移动至下一行行首\n// 当前行右边无单元格(已处在行末),且不存在下一行(已处在最后一行)时,新建一行并将焦点移动至下一行行首\nconst tabActiveCell = () => {\n const getNextCell = (i: number, j: number): [number, number] | null => {\n if (!tableCells.value[i]) return null\n if (!tableCells.value[i][j]) return getNextCell(i + 1, 0)\n if (isHideCell(i, j)) return getNextCell(i, j + 1)\n return [i, j]\n }\n\n endCell.value = []\n\n const nextRow = startCell.value[0]\n const nextCol = startCell.value[1] + 1\n\n const nextCell = getNextCell(nextRow, nextCol)\n if (!nextCell) {\n insertRow(nextRow + 1)\n startCell.value = [nextRow + 1, 0]\n }\n else startCell.value = nextCell\n\n // 移动焦点后自动聚焦文本\n nextTick(() => {\n const textRef = document.querySelector('.cell-text.active') as HTMLInputElement\n if (textRef) textRef.focus()\n })\n}\n\n// 表格快捷键监听\nconst keydownListener = (e: KeyboardEvent) => {\n if (!props.editable || !selectedCells.value.length) return\n\n const key = e.key.toUpperCase()\n if (selectedCells.value.length < 2) {\n if (key === KEYS.TAB) {\n e.preventDefault()\n tabActiveCell()\n }\n if (e.ctrlKey && key === KEYS.UP) {\n e.preventDefault()\n const rowIndex = +selectedCells.value[0].split('_')[0]\n insertRow(rowIndex)\n }\n if (e.ctrlKey && key === KEYS.DOWN) {\n e.preventDefault()\n const rowIndex = +selectedCells.value[0].split('_')[0]\n insertRow(rowIndex + 1)\n }\n if (e.ctrlKey && key === KEYS.LEFT) {\n e.preventDefault()\n const colIndex = +selectedCells.value[0].split('_')[1]\n insertCol(colIndex)\n }\n if (e.ctrlKey && key === KEYS.RIGHT) {\n e.preventDefault()\n const colIndex = +selectedCells.value[0].split('_')[1]\n insertCol(colIndex + 1)\n }\n }\n else if (key === KEYS.DELETE) {\n clearSelectedCellText()\n }\n}\n\nonMounted(() => {\n document.addEventListener('keydown', keydownListener)\n})\nonUnmounted(() => {\n document.removeEventListener('keydown', keydownListener)\n})\n\n// 单元格文字输入时更新表格数据\nconst handleInput = debounce(function(value, rowIndex, colIndex) {\n tableCells.value[rowIndex][colIndex].text = value\n emit('change', tableCells.value)\n}, 300, { trailing: true })\n\n// 插入来自Excel的数据,表格的行/列数不够时自动补足\nconst insertExcelData = (data: string[][], rowIndex: number, colIndex: number) => {\n const maxRow = data.length\n const maxCol = data[0].length\n\n let fillRowCount = 0\n let fillColCount = 0\n if (rowIndex + maxRow > tableCells.value.length) fillRowCount = rowIndex + maxRow - tableCells.value.length\n if (colIndex + maxCol > tableCells.value[0].length) fillColCount = colIndex + maxCol - tableCells.value[0].length\n if (fillRowCount || fillColCount) fillTable(fillRowCount, fillColCount)\n\n nextTick(() => {\n for (let i = 0; i < maxRow; i++) {\n for (let j = 0; j < maxCol; j++) {\n if (tableCells.value[rowIndex + i][colIndex + j]) {\n tableCells.value[rowIndex + i][colIndex + j].text = data[i][j]\n }\n }\n }\n emit('change', tableCells.value)\n })\n}\n\n// 获取有效的单元格(排除掉被合并的单元格)\nconst getEffectiveTableCells = () => {\n const effectiveTableCells = []\n\n for (let i = 0; i < tableCells.value.length; i++) {\n const rowCells = tableCells.value[i]\n const _rowCells = []\n for (let j = 0; j < rowCells.length; j++) {\n if (!isHideCell(i, j)) _rowCells.push(rowCells[j])\n }\n if (_rowCells.length) effectiveTableCells.push(_rowCells)\n }\n\n return effectiveTableCells\n}\n\n// 检查是否可以删除行和列:有效的行/列数大于1\nconst checkCanDeleteRowOrCol = () => {\n const effectiveTableCells = getEffectiveTableCells()\n const canDeleteRow = effectiveTableCells.length > 1\n const canDeleteCol = effectiveTableCells[0].length > 1\n\n return { canDeleteRow, canDeleteCol }\n}\n\n// 检查是否可以合并或拆分\n// 必须多选才可以合并\n// 必须单选且所选单元格为合并单元格才可以拆分\nconst checkCanMergeOrSplit = (rowIndex: number, colIndex: number) => {\n const isMultiSelected = selectedCells.value.length > 1\n const targetCell = tableCells.value[rowIndex][colIndex]\n\n const canMerge = isMultiSelected\n const canSplit = !isMultiSelected && (targetCell.rowspan > 1 || targetCell.colspan > 1)\n\n return { canMerge, canSplit }\n}\n\nconst contextmenus = (el: HTMLElement): ContextmenuItem[] => {\n const cellIndex = el.dataset.cellIndex as string\n const rowIndex = +cellIndex.split('_')[0]\n const colIndex = +cellIndex.split('_')[1]\n\n if (!selectedCells.value.includes(`${rowIndex}_${colIndex}`)) {\n startCell.value = [rowIndex, colIndex]\n endCell.value = []\n }\n\n const { canMerge, canSplit } = checkCanMergeOrSplit(rowIndex, colIndex)\n const { canDeleteRow, canDeleteCol } = checkCanDeleteRowOrCol()\n\n return [\n {\n text: '插入列',\n children: [\n { text: '到左侧', handler: () => insertCol(colIndex) },\n { text: '到右侧', handler: () => insertCol(colIndex + 1) },\n ],\n },\n {\n text: '插入行',\n children: [\n { text: '到上方', handler: () => insertRow(rowIndex) },\n { text: '到下方', handler: () => insertRow(rowIndex + 1) },\n ],\n },\n {\n text: '删除列',\n disable: !canDeleteCol,\n handler: () => deleteCol(colIndex),\n },\n {\n text: '删除行',\n disable: !canDeleteRow,\n handler: () => deleteRow(rowIndex),\n },\n { divider: true },\n {\n text: '合并单元格',\n disable: !canMerge,\n handler: mergeCells,\n },\n {\n text: '取消合并单元格',\n disable: !canSplit,\n handler: () => splitCells(rowIndex, colIndex),\n },\n { divider: true },\n {\n text: '选中当前列',\n handler: () => selectCol(colIndex),\n },\n {\n text: '选中当前行',\n handler: () => selectRow(rowIndex),\n },\n {\n text: '选中全部单元格',\n handler: selectAll,\n },\n ]\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"editable-table\",\n style: _normalizeStyle({ width: totalWidth.value + 'px' })\n }, [\n (_ctx.editable)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(dragLinePosition.value, (pos, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"drag-line\",\n key: index,\n style: _normalizeStyle({ left: pos + 'px' }),\n onMousedown: $event => handleMousedownColHandler($event, index)\n }, null, 44, _hoisted_2))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"table\", {\n class: _normalizeClass({\n 'theme': theme.value,\n 'row-header': theme.value?.rowHeader,\n 'row-footer': theme.value?.rowFooter,\n 'col-header': theme.value?.colHeader,\n 'col-footer': theme.value?.colFooter,\n }),\n style: _normalizeStyle(`--themeColor: ${theme.value?.color}; --subThemeColor1: ${_unref(subThemeColor)[0]}; --subThemeColor2: ${_unref(subThemeColor)[1]}`)\n }, [\n _createElementVNode(\"colgroup\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(colSizeList.value, (width, index) => {\n return (_openBlock(), _createElementBlock(\"col\", {\n span: \"1\",\n key: index,\n width: width\n }, null, 8, _hoisted_3))\n }), 128))\n ]),\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tableCells.value, (rowCells, rowIndex) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: rowIndex,\n style: _normalizeStyle({ height: _ctx.cellMinHeight + 'px' })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rowCells, (cell, colIndex) => {\n return _withDirectives((_openBlock(), _createElementBlock(\"td\", {\n class: _normalizeClass([\"cell\", {\n 'selected': selectedCells.value.includes(`${rowIndex}_${colIndex}`) && selectedCells.value.length > 1,\n 'active': activedCell.value === `${rowIndex}_${colIndex}`,\n }]),\n style: _normalizeStyle({\n borderStyle: _ctx.outline.style,\n borderColor: _ctx.outline.color,\n borderWidth: _ctx.outline.width + 'px',\n ..._unref(getTextStyle)(cell.style),\n }),\n key: cell.id,\n rowspan: cell.rowspan,\n colspan: cell.colspan,\n \"data-cell-index\": `${rowIndex}_${colIndex}`,\n onMousedown: $event => handleCellMousedown($event, rowIndex, colIndex),\n onMouseenter: ($event: any) => (handleCellMouseenter(rowIndex, colIndex))\n }, [\n (activedCell.value === `${rowIndex}_${colIndex}`)\n ? (_openBlock(), _createBlock(CustomTextarea, {\n key: 0,\n class: _normalizeClass([\"cell-text\", { 'active': activedCell.value === `${rowIndex}_${colIndex}` }]),\n style: _normalizeStyle({ minHeight: (_ctx.cellMinHeight - 4) + 'px' }),\n value: cell.text,\n onUpdateValue: value => _unref(handleInput)(value, rowIndex, colIndex),\n onInsertExcelData: value => insertExcelData(value, rowIndex, colIndex)\n }, null, 8, [\"class\", \"style\", \"value\", \"onUpdateValue\", \"onInsertExcelData\"]))\n : (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"cell-text\",\n style: _normalizeStyle({ minHeight: (_ctx.cellMinHeight - 4) + 'px' }),\n innerHTML: _unref(formatText)(cell.text)\n }, null, 12, _hoisted_5))\n ], 46, _hoisted_4)), [\n [_vShow, !_unref(hideCells).includes(`${rowIndex}_${colIndex}`)],\n [_directive_contextmenu, (el) => contextmenus(el)]\n ])\n }), 128))\n ], 4))\n }), 128))\n ])\n ], 6)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./EditableTable.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./EditableTable.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./EditableTable.vue?vue&type=style&index=0&id=0236a619&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-0236a619\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { withModifiers as _withModifiers, createVNode as _createVNode, unref as _unref, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-742a731e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\n\nimport { nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTTableElement, TableCell } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport EditableTable from './EditableTable.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { canvasScale, handleElementId, isScaling } = storeToRefs(mainStore)\n\nconst elementRef = ref()\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\n// 更新表格的可编辑状态,表格处于编辑状态时需要禁用全局快捷键\nconst editable = ref(false)\n\nwatch(handleElementId, () => {\n if (handleElementId.value !== props.elementInfo.id) editable.value = false\n})\n\nwatch(editable, () => {\n mainStore.setDisableHotkeysState(editable.value)\n})\n\nconst startEdit = () => {\n if (!props.elementInfo.lock) editable.value = true\n}\n\n// 监听表格元素的尺寸变化,当高度变化时,更新高度到vuex\n// 如果高度变化时正处在缩放操作中,则等待缩放操作结束后再更新\nconst realHeightCache = ref(-1)\n\nwatch(isScaling, () => {\n if (handleElementId.value !== props.elementInfo.id) return\n\n if (isScaling.value) editable.value = false\n\n if (!isScaling.value && realHeightCache.value !== -1) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeightCache.value },\n })\n realHeightCache.value = -1\n }\n})\n\nconst updateTableElementHeight = (entries: ResizeObserverEntry[]) => {\n const contentRect = entries[0].contentRect\n if (!elementRef.value) return\n\n const realHeight = contentRect.height\n\n if (props.elementInfo.height !== realHeight) {\n if (!isScaling.value) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeight },\n })\n }\n else realHeightCache.value = realHeight\n }\n}\n\nconst resizeObserver = new ResizeObserver(updateTableElementHeight)\n\nonMounted(() => {\n if (elementRef.value) resizeObserver.observe(elementRef.value)\n})\nonUnmounted(() => {\n if (elementRef.value) resizeObserver.unobserve(elementRef.value)\n})\n\n// 更新表格内容数据\nconst updateTableCells = (data: TableCell[][]) => {\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: { data },\n })\n addHistorySnapshot()\n}\n\n// 更新表格的列宽数据\nconst updateColWidths = (widths: number[]) => {\n const width = widths.reduce((a, b) => a + b)\n const colWidths = widths.map(item => item / width)\n\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: { width, colWidths },\n })\n addHistorySnapshot()\n}\n\n// 更新表格当前选中的单元格\nconst updateSelectedCells = (cells: string[]) => {\n nextTick(() => mainStore.setSelectedTableCells(cells))\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-table\", { 'lock': _ctx.elementInfo.lock }]),\n ref_key: \"elementRef\",\n ref: elementRef,\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(EditableTable, {\n onMousedown: _cache[0] || (_cache[0] = _withModifiers(() => {}, [\"stop\"])),\n data: _ctx.elementInfo.data,\n width: _ctx.elementInfo.width,\n cellMinHeight: _ctx.elementInfo.cellMinHeight,\n colWidths: _ctx.elementInfo.colWidths,\n outline: _ctx.elementInfo.outline,\n theme: _ctx.elementInfo.theme,\n editable: editable.value,\n onChange: _cache[1] || (_cache[1] = data => updateTableCells(data)),\n onChangeColWidths: _cache[2] || (_cache[2] = widths => updateColWidths(widths)),\n onChangeSelectedCells: _cache[3] || (_cache[3] = cells => updateSelectedCells(cells))\n }, null, 8, [\"data\", \"width\", \"cellMinHeight\", \"colWidths\", \"outline\", \"theme\", \"editable\"]),\n (!editable.value || _ctx.elementInfo.lock)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"table-mask\", { 'lock': _ctx.elementInfo.lock }]),\n onDblclick: _cache[4] || (_cache[4] = ($event: any) => (startEdit())),\n onMousedown: _cache[5] || (_cache[5] = $event => handleSelectElement($event)),\n onTouchstart: _cache[6] || (_cache[6] = $event => handleSelectElement($event))\n }, [\n (_unref(handleElementId) === _ctx.elementInfo.id)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"mask-tip\",\n style: _normalizeStyle({ transform: `scale(${ 1 / _unref(canvasScale) })` })\n }, \"双击编辑\", 4))\n : _createCommentVNode(\"\", true)\n ], 34))\n : _createCommentVNode(\"\", true)\n ])), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=742a731e&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-742a731e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveDirective as _resolveDirective, withDirectives as _withDirectives, normalizeStyle as _normalizeStyle, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-35c33b80\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\", \"stroke\", \"stroke-width\"]\nconst _hoisted_2 = [\"transform\"]\nconst _hoisted_3 = [\"d\"]\n\nimport type { PPTLatexElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport emitter, { EmitterEvents } from '@/utils/emitter'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\nconst openLatexEditor = () => {\n emitter.emit(EmitterEvents.OPEN_LATEX_EDITOR)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-latex\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event)),\n onDblclick: _cache[2] || (_cache[2] = ($event: any) => (openLatexEditor()))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.strokeWidth,\n fill: \"none\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\"\n }, [\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n d: _ctx.elementInfo.path\n }, null, 8, _hoisted_3)\n ], 8, _hoisted_2)\n ], 8, _hoisted_1))\n ], 32)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=35c33b80&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-35c33b80\"]])\n\nexport default __exports__","import { onMounted, type Ref } from 'vue'\n\nexport default (\n src: string,\n videoRef: Ref,\n) => {\n onMounted(() => {\n if (!videoRef.value) return\n\n let type = 'normal'\n if (/m3u8(#|\\?|$)/i.exec(src)) type = 'hls'\n else if (/.flv(#|\\?|$)/i.exec(src)) type = 'flv'\n\n if (videoRef.value && type === 'hls' && (videoRef.value.canPlayType('application/x-mpegURL') || videoRef.value.canPlayType('application/vnd.apple.mpegURL'))) {\n type = 'normal'\n }\n\n if (type === 'hls') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const Hls = (window as any).Hls\n \n if (Hls && Hls.isSupported()) {\n const hls = new Hls()\n hls.loadSource(src)\n hls.attachMedia(videoRef.value)\n }\n }\n else if (type === 'flv') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const flvjs = (window as any).flvjs\n if (flvjs && flvjs.isSupported()) {\n const flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: src,\n })\n flvPlayer.attachMediaElement(videoRef.value)\n flvPlayer.load()\n }\n }\n })\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, renderList as _renderList, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-e55352ca\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"load-error\"\n}\nconst _hoisted_2 = [\"src\", \"autoplay\", \"poster\"]\nconst _hoisted_3 = { class: \"bezel\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"controller-mask\" }, null, -1))\nconst _hoisted_5 = { class: \"controller\" }\nconst _hoisted_6 = { class: \"icons icons-left\" }\nconst _hoisted_7 = { class: \"icon-content\" }\nconst _hoisted_8 = { class: \"volume\" }\nconst _hoisted_9 = { class: \"icon-content\" }\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_11 = [\n _hoisted_10\n]\nconst _hoisted_12 = { class: \"time\" }\nconst _hoisted_13 = { class: \"ptime\" }\nconst _hoisted_14 = { class: \"dtime\" }\nconst _hoisted_15 = { class: \"icons icons-right\" }\nconst _hoisted_16 = { class: \"speed\" }\nconst _hoisted_17 = { class: \"icon speed-icon\" }\nconst _hoisted_18 = [\"onClick\"]\nconst _hoisted_19 = { class: \"icon-content\" }\nconst _hoisted_20 = { class: \"bar\" }\nconst _hoisted_21 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_22 = [\n _hoisted_21\n]\n\nimport { computed, ref } from 'vue'\nimport useMSE from './useMSE'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n width: {},\n height: {},\n src: {},\n poster: { default: '' },\n autoplay: { type: Boolean, default: false },\n scale: { default: 1 }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst secondToTime = (second = 0) => {\n if (second === 0 || isNaN(second)) return '00:00'\n\n const add0 = (num: number) => (num < 10 ? '0' + num : '' + num)\n const hour = Math.floor(second / 3600)\n const min = Math.floor((second - hour * 3600) / 60)\n const sec = Math.floor(second - hour * 3600 - min * 60)\n return (hour > 0 ? [hour, min, sec] : [min, sec]).map(add0).join(':')\n}\n\nconst getBoundingClientRectViewLeft = (element: HTMLElement) => {\n return element.getBoundingClientRect().left\n}\n\nconst videoRef = ref()\nconst playBarWrap = ref()\nconst volumeBarRef = ref()\n\nconst volume = ref(0.5)\nconst paused = ref(true)\nconst currentTime = ref(0)\nconst duration = ref(0)\nconst loaded = ref(0)\nconst loop = ref(false)\nconst bezelTransition = ref(false)\nconst playbackRate = ref(1)\n\nconst playBarTimeVisible = ref(false)\nconst playBarTime = ref('00:00')\nconst playBarTimeLeft = ref('0')\n\nconst ptime = computed(() => secondToTime(currentTime.value))\nconst dtime = computed(() => secondToTime(duration.value))\nconst playedBarWidth = computed(() => currentTime.value / duration.value * 100 + '%')\nconst loadedBarWidth = computed(() => loaded.value / duration.value * 100 + '%')\nconst volumeBarWidth = computed(() => volume.value * 100 + '%')\n\nconst speedMenuVisible = ref(false)\nconst speedOptions = [\n { label: '2x', value: 2 },\n { label: '1.5x', value: 1.5 },\n { label: '1.25x', value: 1.25 },\n { label: '1x', value: 1 },\n { label: '0.75x', value: 0.75 },\n { label: '0.5x', value: 0.5 },\n]\n\nconst seek = (time: number) => {\n if (!videoRef.value) return\n\n time = Math.max(time, 0)\n time = Math.min(time, duration.value)\n\n videoRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst play = () => {\n if (!videoRef.value) return\n\n paused.value = false\n videoRef.value.play()\n bezelTransition.value = true\n}\n\nconst pause = () => {\n if (!videoRef.value) return\n\n paused.value = true\n videoRef.value.pause()\n bezelTransition.value = true\n}\n\nconst toggle = () => {\n if (paused.value) play() \n else pause()\n}\n\nconst setVolume = (percentage: number) => {\n if (!videoRef.value) return\n\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n\n videoRef.value.volume = percentage\n volume.value = percentage\n if (videoRef.value.muted && percentage !== 0) videoRef.value.muted = false\n}\n\nconst speed = (rate: number) => {\n if (videoRef.value) videoRef.value.playbackRate = rate\n playbackRate.value = rate\n}\n\nconst handleDurationchange = () => {\n duration.value = videoRef.value?.duration || 0\n}\n\nconst handleTimeupdate = () => {\n currentTime.value = videoRef.value?.currentTime || 0\n}\n\nconst handleEnded = () => {\n if (!loop.value) pause()\n else {\n seek(0)\n play()\n }\n}\n\nconst handleProgress = () => {\n loaded.value = videoRef.value?.buffered.length ? videoRef.value.buffered.end(videoRef.value.buffered.length - 1) : 0\n}\n\nconst loadError = ref(false)\nconst handleError = () => loadError.value = true\n\nconst thumbMove = (e: MouseEvent | TouchEvent) => {\n if (!videoRef.value || !playBarWrap.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n videoRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst thumbUp = (e: MouseEvent | TouchEvent) => {\n if (!videoRef.value || !playBarWrap.value) return\n\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n videoRef.value.currentTime = time\n currentTime.value = time\n\n document.removeEventListener('mousemove', thumbMove)\n document.removeEventListener('touchmove', thumbMove)\n document.removeEventListener('mouseup', thumbUp)\n document.removeEventListener('touchend', thumbUp)\n}\n\nconst handleMousedownPlayBar = () => {\n document.addEventListener('mousemove', thumbMove)\n document.addEventListener('touchmove', thumbMove)\n document.addEventListener('mouseup', thumbUp)\n document.addEventListener('touchend', thumbUp)\n}\n\nconst volumeMove = (e: MouseEvent | TouchEvent) => {\n if (!volumeBarRef.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n const percentage = (clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst volumeUp = () => {\n document.removeEventListener('mousemove', volumeMove)\n document.removeEventListener('touchmove', volumeMove)\n document.removeEventListener('mouseup', volumeUp)\n document.removeEventListener('touchend', volumeUp)\n}\n\nconst handleMousedownVolumeBar = () => {\n document.addEventListener('mousemove', volumeMove)\n document.addEventListener('touchmove', volumeMove)\n document.addEventListener('mouseup', volumeUp)\n document.addEventListener('touchend', volumeUp)\n}\n\nconst handleClickVolumeBar = (e: MouseEvent) => {\n if (!volumeBarRef.value) return\n const percentage = (e.clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst handleMousemovePlayBar = (e: MouseEvent) => {\n if (duration.value && playBarWrap.value) {\n const px = playBarWrap.value.getBoundingClientRect().left\n const tx = e.clientX - px\n if (tx < 0 || tx > playBarWrap.value.offsetWidth) return\n\n const time = duration.value * (tx / playBarWrap.value.offsetWidth)\n playBarTimeLeft.value = `${tx - (time >= 3600 ? 25 : 20)}px`\n playBarTime.value = secondToTime(time)\n playBarTimeVisible.value = true\n }\n}\n\nconst toggleVolume = () => {\n if (!videoRef.value) return\n\n if (videoRef.value.muted) {\n videoRef.value.muted = false\n setVolume(0.5)\n }\n else {\n videoRef.value.muted = true\n setVolume(0)\n }\n}\n\nconst toggleLoop = () => {\n loop.value = !loop.value\n}\n\nconst autoHideControllerTimer = ref(-1)\nconst hideController = ref(false)\nconst autoHideController = () => {\n hideController.value = false\n clearTimeout(autoHideControllerTimer.value)\n autoHideControllerTimer.value = setTimeout(() => {\n if (videoRef.value?.played.length) hideController.value = true\n }, 3000)\n}\n\nuseMSE(props.src, videoRef)\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconPause = _resolveComponent(\"IconPause\")!\n const _component_IconPlayOne = _resolveComponent(\"IconPlayOne\")!\n const _component_IconVolumeMute = _resolveComponent(\"IconVolumeMute\")!\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n const _component_IconVolumeSmall = _resolveComponent(\"IconVolumeSmall\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"video-player\", { 'hide-controller': hideController.value }]),\n style: _normalizeStyle({\n width: _ctx.width * _ctx.scale + 'px',\n height: _ctx.height * _ctx.scale + 'px',\n transform: `scale(${1 / _ctx.scale})`,\n }),\n onMousemove: _cache[22] || (_cache[22] = ($event: any) => (autoHideController())),\n onClick: _cache[23] || (_cache[23] = ($event: any) => (autoHideController()))\n }, [\n _createElementVNode(\"div\", {\n class: \"video-wrap\",\n onClick: _cache[8] || (_cache[8] = ($event: any) => (toggle()))\n }, [\n (loadError.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, \"视频加载失败\"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"video\", {\n class: \"video\",\n ref_key: \"videoRef\",\n ref: videoRef,\n src: _ctx.src,\n autoplay: _ctx.autoplay,\n poster: _ctx.poster,\n \"webkit-playsinline\": \"\",\n playsinline: \"\",\n onDurationchange: _cache[0] || (_cache[0] = ($event: any) => (handleDurationchange())),\n onTimeupdate: _cache[1] || (_cache[1] = ($event: any) => (handleTimeupdate())),\n onEnded: _cache[2] || (_cache[2] = ($event: any) => (handleEnded())),\n onProgress: _cache[3] || (_cache[3] = ($event: any) => (handleProgress())),\n onPlay: _cache[4] || (_cache[4] = ($event: any) => {autoHideController(); paused.value = false}),\n onPause: _cache[5] || (_cache[5] = ($event: any) => (autoHideController())),\n onError: _cache[6] || (_cache[6] = ($event: any) => (handleError()))\n }, null, 40, _hoisted_2),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"span\", {\n class: _normalizeClass([\"bezel-icon\", { 'bezel-transition': bezelTransition.value }]),\n onAnimationend: _cache[7] || (_cache[7] = ($event: any) => (bezelTransition.value = false))\n }, [\n (paused.value)\n ? (_openBlock(), _createBlock(_component_IconPause, { key: 0 }))\n : (_openBlock(), _createBlock(_component_IconPlayOne, { key: 1 }))\n ], 34)\n ])\n ]),\n _hoisted_4,\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", {\n class: \"icon play-icon\",\n onClick: _cache[9] || (_cache[9] = ($event: any) => (toggle()))\n }, [\n _createElementVNode(\"span\", _hoisted_7, [\n (paused.value)\n ? (_openBlock(), _createBlock(_component_IconPlayOne, { key: 0 }))\n : (_openBlock(), _createBlock(_component_IconPause, { key: 1 }))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"div\", {\n class: \"icon volume-icon\",\n onClick: _cache[10] || (_cache[10] = ($event: any) => (toggleVolume()))\n }, [\n _createElementVNode(\"span\", _hoisted_9, [\n (volume.value === 0)\n ? (_openBlock(), _createBlock(_component_IconVolumeMute, { key: 0 }))\n : (volume.value === 1)\n ? (_openBlock(), _createBlock(_component_IconVolumeNotice, { key: 1 }))\n : (_openBlock(), _createBlock(_component_IconVolumeSmall, { key: 2 }))\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"volume-bar-wrap\",\n onMousedown: _cache[11] || (_cache[11] = ($event: any) => (handleMousedownVolumeBar())),\n onTouchstart: _cache[12] || (_cache[12] = ($event: any) => (handleMousedownVolumeBar())),\n onClick: _cache[13] || (_cache[13] = $event => handleClickVolumeBar($event))\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar\",\n ref_key: \"volumeBarRef\",\n ref: volumeBarRef\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar-inner\",\n style: _normalizeStyle({ width: volumeBarWidth.value })\n }, _hoisted_11, 4)\n ], 512)\n ], 32)\n ]),\n _createElementVNode(\"span\", _hoisted_12, [\n _createElementVNode(\"span\", _hoisted_13, _toDisplayString(ptime.value), 1),\n _createTextVNode(\" / \"),\n _createElementVNode(\"span\", _hoisted_14, _toDisplayString(dtime.value), 1)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"div\", _hoisted_16, [\n _createElementVNode(\"div\", _hoisted_17, [\n _createElementVNode(\"span\", {\n class: \"icon-content\",\n onClick: _cache[14] || (_cache[14] = ($event: any) => (speedMenuVisible.value = !speedMenuVisible.value))\n }, _toDisplayString(playbackRate.value === 1 ? '倍速' : (playbackRate.value + 'x')), 1),\n (speedMenuVisible.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"speed-menu\",\n onMouseleave: _cache[15] || (_cache[15] = ($event: any) => (speedMenuVisible.value = false))\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(speedOptions, (item) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass([\"speed-menu-item\", { 'active': item.value === playbackRate.value }]),\n key: item.label,\n onClick: ($event: any) => (speed(item.value))\n }, _toDisplayString(item.label), 11, _hoisted_18)\n }), 64))\n ], 32))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"loop\",\n onClick: _cache[16] || (_cache[16] = ($event: any) => (toggleLoop()))\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"icon loop-icon\", { 'active': loop.value }])\n }, [\n _createElementVNode(\"span\", _hoisted_19, \"循环\" + _toDisplayString(loop.value ? '开' : '关'), 1)\n ], 2)\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"bar-wrap\",\n ref_key: \"playBarWrap\",\n ref: playBarWrap,\n onMousedown: _cache[17] || (_cache[17] = ($event: any) => (handleMousedownPlayBar())),\n onTouchstart: _cache[18] || (_cache[18] = ($event: any) => (handleMousedownPlayBar())),\n onMousemove: _cache[19] || (_cache[19] = $event => handleMousemovePlayBar($event)),\n onMouseenter: _cache[20] || (_cache[20] = ($event: any) => (playBarTimeVisible.value = true)),\n onMouseleave: _cache[21] || (_cache[21] = ($event: any) => (playBarTimeVisible.value = false))\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"bar-time\", { 'hidden': !playBarTimeVisible.value }]),\n style: _normalizeStyle({ left: playBarTimeLeft.value })\n }, _toDisplayString(playBarTime.value), 7),\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"div\", {\n class: \"loaded\",\n style: _normalizeStyle({ width: loadedBarWidth.value })\n }, null, 4),\n _createElementVNode(\"div\", {\n class: \"played\",\n style: _normalizeStyle({ width: playedBarWidth.value })\n }, _hoisted_22, 4)\n ])\n ], 544)\n ])\n ], 38))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=e55352ca&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-e55352ca\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, normalizeStyle as _normalizeStyle } from \"vue\"\n\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTVideoElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\n\nimport VideoPlayer from './VideoPlayer/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo, canMove)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-video\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event, false)),\n onTouchstart: _cache[3] || (_cache[3] = $event => handleSelectElement($event, false))\n }, [\n _createVNode(VideoPlayer, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n src: _ctx.elementInfo.src,\n poster: _ctx.elementInfo.poster,\n scale: _unref(canvasScale)\n }, null, 8, [\"width\", \"height\", \"src\", \"poster\", \"scale\"]),\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(['t', 'b', 'l', 'r'], (item) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass(['handler-border', item]),\n key: item,\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event))\n }, null, 34)\n }), 64))\n ], 32)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=5dc89f2a&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5dc89f2a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-44037f56\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\", \"autoplay\"]\nconst _hoisted_2 = { class: \"controller\" }\nconst _hoisted_3 = { class: \"icons\" }\nconst _hoisted_4 = { class: \"icon-content\" }\nconst _hoisted_5 = { class: \"volume\" }\nconst _hoisted_6 = { class: \"icon-content\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_8 = [\n _hoisted_7\n]\nconst _hoisted_9 = { class: \"time\" }\nconst _hoisted_10 = { class: \"ptime\" }\nconst _hoisted_11 = { class: \"dtime\" }\nconst _hoisted_12 = { class: \"bar\" }\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_14 = [\n _hoisted_13\n]\n\nimport { computed, ref } from 'vue'\nimport message from '@/utils/message'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'AudioPlayer',\n props: {\n src: {},\n loop: { type: Boolean },\n autoplay: { type: Boolean, default: false },\n scale: { default: 1 }\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props\n\nconst secondToTime = (second = 0) => {\n if (second === 0 || isNaN(second)) return '00:00'\n\n const add0 = (num: number) => (num < 10 ? '0' + num : '' + num)\n const hour = Math.floor(second / 3600)\n const min = Math.floor((second - hour * 3600) / 60)\n const sec = Math.floor(second - hour * 3600 - min * 60)\n return (hour > 0 ? [hour, min, sec] : [min, sec]).map(add0).join(':')\n}\n\nconst getBoundingClientRectViewLeft = (element: HTMLElement) => {\n return element.getBoundingClientRect().left\n}\n\nconst audioRef = ref()\nconst playBarWrap = ref()\nconst volumeBarRef = ref()\n\nconst volume = ref(0.5)\nconst paused = ref(true)\nconst currentTime = ref(0)\nconst duration = ref(0)\nconst loaded = ref(0)\n\nconst playBarTimeVisible = ref(false)\nconst playBarTime = ref('00:00')\nconst playBarTimeLeft = ref('0')\n\nconst ptime = computed(() => secondToTime(currentTime.value))\nconst dtime = computed(() => secondToTime(duration.value))\nconst playedBarWidth = computed(() => currentTime.value / duration.value * 100 + '%')\nconst loadedBarWidth = computed(() => loaded.value / duration.value * 100 + '%')\nconst volumeBarWidth = computed(() => volume.value * 100 + '%')\n\nconst seek = (time: number) => {\n if (!audioRef.value) return\n\n time = Math.max(time, 0)\n time = Math.min(time, duration.value)\n\n audioRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst play = () => {\n if (!audioRef.value) return\n\n paused.value = false\n audioRef.value.play()\n}\n\nconst pause = () => {\n if (!audioRef.value) return\n\n paused.value = true\n audioRef.value.pause()\n}\n\nconst toggle = () => {\n if (paused.value) play() \n else pause()\n}\n\nconst setVolume = (percentage: number) => {\n if (!audioRef.value) return\n\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n\n audioRef.value.volume = percentage\n volume.value = percentage\n if (audioRef.value.muted && percentage !== 0) audioRef.value.muted = false\n}\n\nconst handleDurationchange = () => {\n duration.value = audioRef.value?.duration || 0\n}\n\nconst handleTimeupdate = () => {\n currentTime.value = audioRef.value?.currentTime || 0\n}\n\nconst handlePlayed = () => {\n paused.value = false\n}\n\nconst handleEnded = () => {\n if (!props.loop) pause()\n else {\n seek(0)\n play()\n }\n}\n\nconst handleProgress = () => {\n loaded.value = audioRef.value?.buffered.length ? audioRef.value.buffered.end(audioRef.value.buffered.length - 1) : 0\n}\n\nconst handleError = () => message.error('视频加载失败')\n\nconst thumbMove = (e: MouseEvent | TouchEvent) => {\n if (!audioRef.value || !playBarWrap.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n audioRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst thumbUp = (e: MouseEvent | TouchEvent) => {\n if (!audioRef.value || !playBarWrap.value) return\n\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n audioRef.value.currentTime = time\n currentTime.value = time\n\n document.removeEventListener('mousemove', thumbMove)\n document.removeEventListener('touchmove', thumbMove)\n document.removeEventListener('mouseup', thumbUp)\n document.removeEventListener('touchend', thumbUp)\n}\n\nconst handleMousedownPlayBar = () => {\n document.addEventListener('mousemove', thumbMove)\n document.addEventListener('touchmove', thumbMove)\n document.addEventListener('mouseup', thumbUp)\n document.addEventListener('touchend', thumbUp)\n}\n\nconst volumeMove = (e: MouseEvent | TouchEvent) => {\n if (!volumeBarRef.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n const percentage = (clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst volumeUp = () => {\n document.removeEventListener('mousemove', volumeMove)\n document.removeEventListener('touchmove', volumeMove)\n document.removeEventListener('mouseup', volumeUp)\n document.removeEventListener('touchend', volumeUp)\n}\n\nconst handleMousedownVolumeBar = () => {\n document.addEventListener('mousemove', volumeMove)\n document.addEventListener('touchmove', volumeMove)\n document.addEventListener('mouseup', volumeUp)\n document.addEventListener('touchend', volumeUp)\n}\n\nconst handleClickVolumeBar = (e: MouseEvent) => {\n if (!volumeBarRef.value) return\n const percentage = (e.clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst handleMousemovePlayBar = (e: MouseEvent) => {\n if (duration.value && playBarWrap.value) {\n const px = playBarWrap.value.getBoundingClientRect().left\n const tx = e.clientX - px\n if (tx < 0 || tx > playBarWrap.value.offsetWidth) return\n\n const time = duration.value * (tx / playBarWrap.value.offsetWidth)\n playBarTimeLeft.value = `${tx - (time >= 3600 ? 25 : 20)}px`\n playBarTime.value = secondToTime(time)\n playBarTimeVisible.value = true\n }\n}\n\nconst toggleVolume = () => {\n if (!audioRef.value) return\n\n if (audioRef.value.muted) {\n audioRef.value.muted = false\n setVolume(0.5)\n }\n else {\n audioRef.value.muted = true\n setVolume(0)\n }\n}\n\n__expose({\n toggle,\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconPlayOne = _resolveComponent(\"IconPlayOne\")!\n const _component_IconPause = _resolveComponent(\"IconPause\")!\n const _component_IconVolumeMute = _resolveComponent(\"IconVolumeMute\")!\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n const _component_IconVolumeSmall = _resolveComponent(\"IconVolumeSmall\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"audio-player\",\n style: _normalizeStyle({ transform: `scale(${1 / _ctx.scale})` })\n }, [\n _createElementVNode(\"audio\", {\n class: \"audio\",\n ref_key: \"audioRef\",\n ref: audioRef,\n src: _ctx.src,\n autoplay: _ctx.autoplay,\n onDurationchange: _cache[0] || (_cache[0] = ($event: any) => (handleDurationchange())),\n onTimeupdate: _cache[1] || (_cache[1] = ($event: any) => (handleTimeupdate())),\n onPlay: _cache[2] || (_cache[2] = ($event: any) => (handlePlayed())),\n onEnded: _cache[3] || (_cache[3] = ($event: any) => (handleEnded())),\n onProgress: _cache[4] || (_cache[4] = ($event: any) => (handleProgress())),\n onError: _cache[5] || (_cache[5] = ($event: any) => (handleError()))\n }, null, 40, _hoisted_1),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", {\n class: \"icon play-icon\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (toggle()))\n }, [\n _createElementVNode(\"span\", _hoisted_4, [\n (paused.value)\n ? (_openBlock(), _createBlock(_component_IconPlayOne, { key: 0 }))\n : (_openBlock(), _createBlock(_component_IconPause, { key: 1 }))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", {\n class: \"icon volume-icon\",\n onClick: _cache[7] || (_cache[7] = ($event: any) => (toggleVolume()))\n }, [\n _createElementVNode(\"span\", _hoisted_6, [\n (volume.value === 0)\n ? (_openBlock(), _createBlock(_component_IconVolumeMute, { key: 0 }))\n : (volume.value === 1)\n ? (_openBlock(), _createBlock(_component_IconVolumeNotice, { key: 1 }))\n : (_openBlock(), _createBlock(_component_IconVolumeSmall, { key: 2 }))\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"volume-bar-wrap\",\n onMousedown: _cache[8] || (_cache[8] = ($event: any) => (handleMousedownVolumeBar())),\n onTouchstart: _cache[9] || (_cache[9] = ($event: any) => (handleMousedownVolumeBar())),\n onClick: _cache[10] || (_cache[10] = $event => handleClickVolumeBar($event))\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar\",\n ref_key: \"volumeBarRef\",\n ref: volumeBarRef\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar-inner\",\n style: _normalizeStyle({ width: volumeBarWidth.value })\n }, _hoisted_8, 4)\n ], 512)\n ], 32)\n ])\n ]),\n _createElementVNode(\"span\", _hoisted_9, [\n _createElementVNode(\"span\", _hoisted_10, _toDisplayString(ptime.value), 1),\n _createTextVNode(\" / \"),\n _createElementVNode(\"span\", _hoisted_11, _toDisplayString(dtime.value), 1)\n ]),\n _createElementVNode(\"div\", {\n class: \"bar-wrap\",\n ref_key: \"playBarWrap\",\n ref: playBarWrap,\n onMousedown: _cache[11] || (_cache[11] = ($event: any) => (handleMousedownPlayBar())),\n onTouchstart: _cache[12] || (_cache[12] = ($event: any) => (handleMousedownPlayBar())),\n onMousemove: _cache[13] || (_cache[13] = $event => handleMousemovePlayBar($event)),\n onMouseenter: _cache[14] || (_cache[14] = ($event: any) => (playBarTimeVisible.value = true)),\n onMouseleave: _cache[15] || (_cache[15] = ($event: any) => (playBarTimeVisible.value = false))\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"bar-time\", { 'hidden': !playBarTimeVisible.value }]),\n style: _normalizeStyle({ left: playBarTimeLeft.value })\n }, _toDisplayString(playBarTime.value), 7),\n _createElementVNode(\"div\", _hoisted_12, [\n _createElementVNode(\"div\", {\n class: \"loaded\",\n style: _normalizeStyle({ width: loadedBarWidth.value })\n }, null, 4),\n _createElementVNode(\"div\", {\n class: \"played\",\n style: _normalizeStyle({ width: playedBarWidth.value })\n }, _hoisted_14, 4)\n ])\n ], 544)\n ])\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./AudioPlayer.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./AudioPlayer.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./AudioPlayer.vue?vue&type=style&index=0&id=44037f56&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-44037f56\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, normalizeStyle as _normalizeStyle, createVNode as _createVNode, unref as _unref, withModifiers as _withModifiers, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveDirective as _resolveDirective, createElementBlock as _createElementBlock, withDirectives as _withDirectives, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTAudioElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\n\nimport AudioPlayer from './AudioPlayer.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { canvasScale, handleElementId } = storeToRefs(useMainStore())\nconst { viewportRatio } = storeToRefs(useSlidesStore())\n\nconst audioIconSize = computed(() => {\n return Math.min(props.elementInfo.width, props.elementInfo.height) + 'px'\n})\nconst audioPlayerPosition = computed(() => {\n const canvasWidth = VIEWPORT_SIZE\n const canvasHeight = VIEWPORT_SIZE * viewportRatio.value\n\n const audioWidth = 280 / canvasScale.value\n const audioHeight = 50 / canvasScale.value\n\n const elWidth = props.elementInfo.width\n const elHeight = props.elementInfo.height\n const elLeft = props.elementInfo.left\n const elTop = props.elementInfo.top\n\n let left = 0\n let top = elHeight\n \n if (elLeft + audioWidth >= canvasWidth) left = elWidth - audioWidth\n if (elTop + elHeight + audioHeight >= canvasHeight) top = -audioHeight\n\n return {\n left: left + 'px',\n top: top + 'px',\n }\n})\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-audio\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n onMousedown: _cache[1] || (_cache[1] = $event => handleSelectElement($event)),\n onTouchstart: _cache[2] || (_cache[2] = $event => handleSelectElement($event))\n }, [\n _createVNode(_component_IconVolumeNotice, {\n class: \"audio-icon\",\n style: _normalizeStyle({\n fontSize: audioIconSize.value,\n color: _ctx.elementInfo.color,\n })\n }, null, 8, [\"style\"]),\n (_unref(handleElementId) === _ctx.elementInfo.id)\n ? (_openBlock(), _createBlock(AudioPlayer, {\n key: 0,\n class: \"audio-player\",\n style: _normalizeStyle({ ...audioPlayerPosition.value }),\n src: _ctx.elementInfo.src,\n loop: _ctx.elementInfo.loop,\n scale: _unref(canvasScale),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers(() => {}, [\"stop\"]))\n }, null, 8, [\"style\", \"src\", \"loop\", \"scale\"]))\n : _createCommentVNode(\"\", true)\n ], 32)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=53bdc956&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-53bdc956\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"id\"]\n\nimport { computed } from 'vue'\nimport { ElementTypes, type PPTElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\n\nimport useLockElement from '@/hooks/useLockElement'\nimport useDeleteElement from '@/hooks/useDeleteElement'\nimport useCombineElement from '@/hooks/useCombineElement'\nimport useOrderElement from '@/hooks/useOrderElement'\nimport useAlignElementToCanvas from '@/hooks/useAlignElementToCanvas'\nimport useCopyAndPasteElement from '@/hooks/useCopyAndPasteElement'\nimport useSelectAllElement from '@/hooks/useSelectAllElement'\n\nimport { ElementOrderCommands, ElementAlignCommands } from '@/types/edit'\n\nimport ImageElement from '@/views/components/element/ImageElement/index.vue'\nimport TextElement from '@/views/components/element/TextElement/index.vue'\nimport ShapeElement from '@/views/components/element/ShapeElement/index.vue'\nimport LineElement from '@/views/components/element/LineElement/index.vue'\nimport ChartElement from '@/views/components/element/ChartElement/index.vue'\nimport TableElement from '@/views/components/element/TableElement/index.vue'\nimport LatexElement from '@/views/components/element/LatexElement/index.vue'\nimport VideoElement from '@/views/components/element/VideoElement/index.vue'\nimport AudioElement from '@/views/components/element/AudioElement/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'EditableElement',\n props: {\n elementInfo: {},\n elementIndex: {},\n isMultiSelect: { type: Boolean },\n selectElement: { type: Function },\n openLinkDialog: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst currentElementComponent = computed(() => {\n const elementTypeMap = {\n [ElementTypes.IMAGE]: ImageElement,\n [ElementTypes.TEXT]: TextElement,\n [ElementTypes.SHAPE]: ShapeElement,\n [ElementTypes.LINE]: LineElement,\n [ElementTypes.CHART]: ChartElement,\n [ElementTypes.TABLE]: TableElement,\n [ElementTypes.LATEX]: LatexElement,\n [ElementTypes.VIDEO]: VideoElement,\n [ElementTypes.AUDIO]: AudioElement,\n }\n return elementTypeMap[props.elementInfo.type] || null\n})\n\nconst { orderElement } = useOrderElement()\nconst { alignElementToCanvas } = useAlignElementToCanvas()\nconst { combineElements, uncombineElements } = useCombineElement()\nconst { deleteElement } = useDeleteElement()\nconst { lockElement, unlockElement } = useLockElement()\nconst { copyElement, pasteElement, cutElement } = useCopyAndPasteElement()\nconst { selectAllElement } = useSelectAllElement()\n\nconst contextmenus = (): ContextmenuItem[] => {\n if (props.elementInfo.lock) {\n return [{\n text: '解锁', \n handler: () => unlockElement(props.elementInfo),\n }]\n }\n\n return [\n {\n text: '剪切',\n subText: 'Ctrl + X',\n handler: cutElement,\n },\n {\n text: '复制',\n subText: 'Ctrl + C',\n handler: copyElement,\n },\n {\n text: '粘贴',\n subText: 'Ctrl + V',\n handler: pasteElement,\n },\n { divider: true },\n {\n text: '水平居中',\n handler: () => alignElementToCanvas(ElementAlignCommands.HORIZONTAL),\n children: [\n { text: '水平垂直居中', handler: () => alignElementToCanvas(ElementAlignCommands.CENTER), },\n { text: '水平居中', handler: () => alignElementToCanvas(ElementAlignCommands.HORIZONTAL) },\n { text: '左对齐', handler: () => alignElementToCanvas(ElementAlignCommands.LEFT) },\n { text: '右对齐', handler: () => alignElementToCanvas(ElementAlignCommands.RIGHT) },\n ],\n },\n {\n text: '垂直居中',\n handler: () => alignElementToCanvas(ElementAlignCommands.VERTICAL),\n children: [\n { text: '水平垂直居中', handler: () => alignElementToCanvas(ElementAlignCommands.CENTER) },\n { text: '垂直居中', handler: () => alignElementToCanvas(ElementAlignCommands.VERTICAL) },\n { text: '顶部对齐', handler: () => alignElementToCanvas(ElementAlignCommands.TOP) },\n { text: '底部对齐', handler: () => alignElementToCanvas(ElementAlignCommands.BOTTOM) },\n ],\n },\n { divider: true },\n {\n text: '置于顶层',\n disable: props.isMultiSelect && !props.elementInfo.groupId,\n handler: () => orderElement(props.elementInfo, ElementOrderCommands.TOP),\n children: [\n { text: '置于顶层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.TOP) },\n { text: '上移一层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.UP) },\n ],\n },\n {\n text: '置于底层',\n disable: props.isMultiSelect && !props.elementInfo.groupId,\n handler: () => orderElement(props.elementInfo, ElementOrderCommands.BOTTOM),\n children: [\n { text: '置于底层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.BOTTOM) },\n { text: '下移一层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.DOWN) },\n ],\n },\n { divider: true },\n {\n text: '设置链接',\n handler: props.openLinkDialog,\n },\n {\n text: props.elementInfo.groupId ? '取消组合' : '组合',\n subText: 'Ctrl + G',\n handler: props.elementInfo.groupId ? uncombineElements : combineElements,\n hide: !props.isMultiSelect,\n },\n {\n text: '全选',\n subText: 'Ctrl + A',\n handler: selectAllElement,\n },\n {\n text: '锁定',\n subText: 'Ctrl + L',\n handler: lockElement,\n },\n {\n text: '删除',\n subText: 'Delete',\n handler: deleteElement,\n },\n ]\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"editable-element\",\n ref: \"elementRef\",\n id: `editable-element-${_ctx.elementInfo.id}`,\n style: _normalizeStyle({\n zIndex: _ctx.elementIndex,\n })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(currentElementComponent.value), {\n elementInfo: _ctx.elementInfo,\n selectElement: _ctx.selectElement,\n contextmenus: contextmenus\n }, null, 8, [\"elementInfo\", \"selectElement\"]))\n ], 12, _hoisted_1))\n}\n}\n\n})","\n\n","import script from \"./EditableElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./EditableElement.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MouseSelection',\n props: {\n top: {},\n left: {},\n width: {},\n height: {},\n quadrant: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(`mouse-selection quadrant-${_ctx.quadrant}`),\n style: _normalizeStyle({\n top: _ctx.top + 'px',\n left: _ctx.left + 'px',\n width: _ctx.width + 'px',\n height: _ctx.height + 'px',\n })\n }, null, 6))\n}\n}\n\n})","import script from \"./MouseSelection.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MouseSelection.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MouseSelection.vue?vue&type=style&index=0&id=2c5e1d42&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2c5e1d42\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-05484a24\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"grid-lines\" }\nconst _hoisted_2 = [\"d\", \"stroke\"]\n\nimport { computed } from 'vue'\nimport tinycolor from 'tinycolor2'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport type { SlideBackground } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'GridLines',\n setup(__props) {\n\nconst { canvasScale, gridLineSize } = storeToRefs(useMainStore())\nconst { currentSlide, viewportRatio } = storeToRefs(useSlidesStore())\n\nconst background = computed(() => currentSlide.value?.background)\n\n// 计算网格线的颜色,避免与背景的颜色太接近\nconst gridColor = computed(() => {\n const bgColor = background.value?.color || '#fff'\n const colorList = ['#000', '#fff']\n return tinycolor.mostReadable(bgColor, colorList, { includeFallbackColors: true }).setAlpha(.5).toRgbString()\n})\n\n// 网格路径\nconst path = computed(() => {\n const maxX = VIEWPORT_SIZE\n const maxY = VIEWPORT_SIZE * viewportRatio.value\n\n let p = ''\n for (let i = 0; i <= Math.floor(maxY / gridLineSize.value); i++) {\n p += `M0 ${i * gridLineSize.value} L${maxX} ${i * gridLineSize.value} `\n }\n for (let i = 0; i <= Math.floor(maxX / gridLineSize.value); i++) {\n p += `M${i * gridLineSize.value} 0 L${i * gridLineSize.value} ${maxY} `\n }\n return p\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, [\n _createElementVNode(\"path\", {\n style: _normalizeStyle({\n transform: `scale(${_unref(canvasScale)})`,\n }),\n d: path.value,\n fill: \"none\",\n stroke: gridColor.value,\n \"stroke-width\": \"0.3\",\n \"stroke-dasharray\": \"5\"\n }, null, 12, _hoisted_2)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./GridLines.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./GridLines.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./GridLines.vue?vue&type=style&index=0&id=05484a24&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-05484a24\"]])\n\nexport default __exports__","import { type Ref, computed } from 'vue'\nimport type { SlideBackground } from '@/types/slides'\n\n// 将页面背景数据转换为css样式\nexport default (background: Ref) => {\n const backgroundStyle = computed(() => {\n if (!background.value) return { backgroundColor: '#fff' }\n\n const {\n type,\n color,\n image,\n imageSize,\n gradientColor,\n gradientRotate,\n gradientType,\n } = background.value\n\n // 纯色背景\n if (type === 'solid') return { backgroundColor: color }\n\n // 背景图模式\n // 包括:背景图、背景大小,是否重复\n else if (type === 'image') {\n if (!image) return { backgroundColor: '#fff' }\n if (imageSize === 'repeat') {\n return {\n backgroundImage: `url(${image}`,\n backgroundRepeat: 'repeat',\n backgroundSize: 'contain',\n }\n }\n return {\n backgroundImage: `url(${image}`,\n backgroundRepeat: 'no-repeat',\n backgroundSize: imageSize || 'cover',\n }\n }\n\n // 渐变色背景\n else if (type === 'gradient') {\n const rotate = gradientRotate || 0\n const color1 = gradientColor ? gradientColor[0] : '#fff'\n const color2 = gradientColor ? gradientColor[1] : '#fff'\n \n if (gradientType === 'radial') return { backgroundImage: `radial-gradient(${color1}, ${color2}` }\n return { backgroundImage: `linear-gradient(${rotate}deg, ${color1}, ${color2}` }\n }\n\n return { backgroundColor: '#fff' }\n })\n\n return {\n backgroundStyle,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { SlideBackground } from '@/types/slides'\nimport GridLines from './GridLines.vue'\nimport useSlideBackgroundStyle from '@/hooks/useSlideBackgroundStyle'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ViewportBackground',\n setup(__props) {\n\nconst { gridLineSize } = storeToRefs(useMainStore())\nconst { currentSlide } = storeToRefs(useSlidesStore())\nconst background = computed(() => currentSlide.value?.background)\n\nconst { backgroundStyle } = useSlideBackgroundStyle(background)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"viewport-background\",\n style: _normalizeStyle(_unref(backgroundStyle))\n }, [\n (_unref(gridLineSize))\n ? (_openBlock(), _createBlock(GridLines, { key: 0 }))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./ViewportBackground.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ViewportBackground.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ViewportBackground.vue?vue&type=style&index=0&id=b6b18502&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-b6b18502\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport type { AlignmentLineAxis } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'AlignmentLine',\n props: {\n type: {},\n axis: {},\n length: {},\n canvasScale: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\n// 吸附对齐线的位置\nconst left = computed(() => props.axis.x * props.canvasScale + 'px')\nconst top = computed(() => props.axis.y * props.canvasScale + 'px')\n\n// 吸附对齐线的长度\nconst sizeStyle = computed(() => {\n if (props.type === 'vertical') return { height: props.length * props.canvasScale + 'px' }\n return { width: props.length * props.canvasScale + 'px' }\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"alignment-line\",\n style: _normalizeStyle({ left: left.value, top: top.value })\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass(['line', _ctx.type]),\n style: _normalizeStyle(sizeStyle.value)\n }, null, 6)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./AlignmentLine.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./AlignmentLine.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./AlignmentLine.vue?vue&type=style&index=0&id=ed6fc00a&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-ed6fc00a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2963c74c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"ruler\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\n\ninterface ViewportStyles {\n top: number\n left: number\n width: number\n height: number\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Ruler',\n props: {\n viewportStyles: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst markerSize = computed(() => {\n return props.viewportStyles.width * canvasScale.value / 10\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: \"h\",\n style: _normalizeStyle({\n width: _ctx.viewportStyles.width * _unref(canvasScale) + 'px',\n left: _ctx.viewportStyles.left + 'px',\n })\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(20, (marker) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass([\"ruler-marker-100\", { 'hide': markerSize.value < 36, 'omit': markerSize.value < 72 }]),\n key: `marker-100-${marker}`\n }, [\n _createElementVNode(\"span\", null, _toDisplayString(marker), 1)\n ], 2)\n }), 64))\n ], 4),\n _createElementVNode(\"div\", {\n class: \"v\",\n style: _normalizeStyle({\n height: _ctx.viewportStyles.height * _unref(canvasScale) + 'px',\n top: _ctx.viewportStyles.top + 'px',\n })\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(20, (marker) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass([\"ruler-marker-100\", { 'hide': markerSize.value < 36, 'omit': markerSize.value < 72 }]),\n key: marker,\n style: _normalizeStyle({ height: markerSize.value + 'px' })\n }, [\n _createElementVNode(\"span\", null, _toDisplayString(marker), 1)\n ], 6)\n }), 64))\n ], 4)\n ]))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./Ruler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Ruler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Ruler.vue?vue&type=style&index=0&id=2963c74c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2963c74c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-85b0bbaa\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\"]\n\nimport { computed, onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useKeyboardStore } from '@/store'\nimport type { CreateElementSelectionData } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ElementCreateSelection',\n emits: [\"created\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\n\nconst mainStore = useMainStore()\nconst { creatingElement } = storeToRefs(mainStore)\nconst { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\nconst start = ref<[number, number]>()\nconst end = ref<[number, number]>()\n\nconst selectionRef = ref()\nconst offset = ref({\n x: 0,\n y: 0,\n})\nonMounted(() => {\n if (!selectionRef.value) return\n const { x, y } = selectionRef.value.getBoundingClientRect()\n offset.value = { x, y }\n})\n\n// 鼠标拖动创建元素生成位置大小\n// 获取范围的起始位置和终点位置\nconst createSelection = (e: MouseEvent) => {\n let isMouseDown = true\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n start.value = [startPageX, startPageY]\n\n document.onmousemove = e => {\n if (!creatingElement.value || !isMouseDown) return\n\n let currentPageX = e.pageX\n let currentPageY = e.pageY\n\n // 按住Ctrl键或者Shift键时:\n // 对于非线条元素需要锁定宽高比例,对于线条元素需要锁定水平或垂直方向\n if (ctrlOrShiftKeyActive.value) {\n const moveX = currentPageX - startPageX\n const moveY = currentPageY - startPageY\n\n // 水平和垂直方向的拖动距离,后面以拖动距离较大的方向为基础计算另一方向的数据\n const absX = Math.abs(moveX)\n const absY = Math.abs(moveY)\n\n if (creatingElement.value.type === 'shape') {\n\n // 判断是否为反向拖动:从左上到右下为正向操作,此外所有情况都是反向操作\n const isOpposite = (moveY > 0 && moveX < 0) || (moveY < 0 && moveX > 0)\n\n if (absX > absY) {\n currentPageY = isOpposite ? startPageY - moveX : startPageY + moveX\n }\n else {\n currentPageX = isOpposite ? startPageX - moveY : startPageX + moveY\n }\n }\n\n else if (creatingElement.value.type === 'line') {\n if (absX > absY) currentPageY = startPageY\n else currentPageX = startPageX\n }\n }\n\n end.value = [currentPageX, currentPageY]\n }\n\n document.onmouseup = e => {\n document.onmousemove = null\n document.onmouseup = null\n\n if (e.button === 2) {\n setTimeout(() => mainStore.setCreatingElement(null), 0)\n return\n }\n\n isMouseDown = false\n\n const endPageX = e.pageX\n const endPageY = e.pageY\n\n const minSize = 30\n\n if (\n creatingElement.value?.type === 'line' &&\n (Math.abs(endPageX - startPageX) >= minSize || Math.abs(endPageY - startPageY) >= minSize)\n ) {\n emit('created', {\n start: start.value!,\n end: end.value!,\n })\n }\n else if (\n creatingElement.value?.type !== 'line' &&\n (Math.abs(endPageX - startPageX) >= minSize && Math.abs(endPageY - startPageY) >= minSize)\n ) {\n emit('created', {\n start: start.value!,\n end: end.value!,\n })\n }\n else {\n const defaultSize = 200\n const minX = Math.min(endPageX, startPageX)\n const minY = Math.min(endPageY, startPageY)\n const maxX = Math.max(endPageX, startPageX)\n const maxY = Math.max(endPageY, startPageY)\n const offsetX = maxX - minX >= minSize ? maxX - minX : defaultSize\n const offsetY = maxY - minY >= minSize ? maxY - minY : defaultSize\n emit('created', {\n start: [minX, minY],\n end: [minX + offsetX, minY + offsetY],\n })\n }\n }\n}\n\n// 绘制线条的路径相关数据(仅当绘制元素类型为线条时使用)\nconst lineData = computed(() => {\n if (!start.value || !end.value) return null\n if (!creatingElement.value || creatingElement.value.type !== 'line') return null\n\n const [_startX, _startY] = start.value\n const [_endX, _endY] = end.value\n const minX = Math.min(_startX, _endX)\n const maxX = Math.max(_startX, _endX)\n const minY = Math.min(_startY, _endY)\n const maxY = Math.max(_startY, _endY)\n\n const svgWidth = maxX - minX >= 24 ? maxX - minX : 24\n const svgHeight = maxY - minY >= 24 ? maxY - minY : 24\n\n const startX = _startX === minX ? 0 : maxX - minX\n const startY = _startY === minY ? 0 : maxY - minY\n const endX = _endX === minX ? 0 : maxX - minX\n const endY = _endY === minY ? 0 : maxY - minY\n\n const path = `M${startX}, ${startY} L${endX}, ${endY}`\n\n return {\n svgWidth,\n svgHeight,\n startX,\n startY,\n endX,\n endY,\n path,\n }\n})\n\n// 根据生成范围的起始位置和终点位置,计算元素创建时的位置和大小\nconst position = computed(() => {\n if (!start.value || !end.value) return {}\n\n const [startX, startY] = start.value\n const [endX, endY] = end.value\n const minX = Math.min(startX, endX)\n const maxX = Math.max(startX, endX)\n const minY = Math.min(startY, endY)\n const maxY = Math.max(startY, endY)\n\n const width = maxX - minX\n const height = maxY - minY\n\n return {\n left: minX - offset.value.x + 'px',\n top: minY - offset.value.y + 'px',\n width: width + 'px',\n height: height + 'px',\n }\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"element-create-selection\",\n ref_key: \"selectionRef\",\n ref: selectionRef,\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => createSelection($event), [\"stop\"])),\n onContextmenu: _cache[1] || (_cache[1] = _withModifiers(() => {}, [\"stop\",\"prevent\"]))\n }, [\n (start.value && end.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass(['selection', _unref(creatingElement)?.type]),\n style: _normalizeStyle(position.value)\n }, [\n (_unref(creatingElement)?.type === 'line' && lineData.value)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n overflow: \"visible\",\n width: lineData.value.svgWidth,\n height: lineData.value.svgHeight\n }, [\n _createElementVNode(\"path\", {\n d: lineData.value.path,\n stroke: \"#d14424\",\n fill: \"none\",\n \"stroke-width\": \"2\"\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n ], 544))\n}\n}\n\n})","\n\n\n\n","import script from \"./ElementCreateSelection.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ElementCreateSelection.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ElementCreateSelection.vue?vue&type=style&index=0&id=85b0bbaa&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-85b0bbaa\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6dc9876e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { overflow: \"visible\" }\nconst _hoisted_2 = [\"d\", \"fill\"]\n\nimport { computed, onMounted, onUnmounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useKeyboardStore, useMainStore, useSlidesStore } from '@/store'\nimport type { CreateCustomShapeData } from '@/types/edit'\nimport { KEYS } from '@/configs/hotkey'\nimport message from '@/utils/message'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ShapeCreateCanvas',\n emits: [\"created\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\nconst mainStore = useMainStore()\nconst { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\nconst { theme } = storeToRefs(useSlidesStore())\n\nconst shapeCanvasRef = ref()\nconst isMouseDown = ref(false)\nconst offset = ref({\n x: 0,\n y: 0,\n})\nonMounted(() => {\n if (!shapeCanvasRef.value) return\n const { x, y } = shapeCanvasRef.value.getBoundingClientRect()\n offset.value = { x, y }\n})\n\nconst mousePosition = ref<[number, number] | null>(null)\nconst points = ref<[number, number][]>([])\nconst closed = ref(false)\n\nconst getPoint = (e: MouseEvent, custom = false) => {\n let pageX = e.pageX - offset.value.x\n let pageY = e.pageY - offset.value.y\n\n if (custom) return { pageX, pageY }\n\n if (ctrlOrShiftKeyActive.value && points.value.length) {\n const [lastPointX, lastPointY] = points.value[points.value.length - 1]\n if (Math.abs(lastPointX - pageX) - Math.abs(lastPointY - pageY) > 0) {\n pageY = lastPointY\n }\n else pageX = lastPointX\n }\n return { pageX, pageY }\n}\n\nconst updateMousePosition = (e: MouseEvent) => {\n if (isMouseDown.value) {\n const { pageX, pageY } = getPoint(e, true)\n points.value.push([pageX, pageY])\n mousePosition.value = null\n return\n }\n\n const { pageX, pageY } = getPoint(e)\n mousePosition.value = [pageX, pageY]\n\n if (points.value.length >= 2) {\n const [firstPointX, firstPointY] = points.value[0]\n if (Math.abs(firstPointX - pageX) < 5 && Math.abs(firstPointY - pageY) < 5) {\n closed.value = true\n }\n else closed.value = false\n }\n else closed.value = false\n}\n\nconst path = computed(() => {\n let d = ''\n for (let i = 0; i < points.value.length; i++) {\n const point = points.value[i]\n if (i === 0) d += `M ${point[0]} ${point[1]} `\n else d += `L ${point[0]} ${point[1]} `\n }\n if (points.value.length && mousePosition.value) {\n d += `L ${mousePosition.value[0]} ${mousePosition.value[1]}`\n }\n return d\n})\n\nconst getCreateData = (close = true) => {\n const xList = points.value.map(item => item[0])\n const yList = points.value.map(item => item[1])\n const minX = Math.min(...xList)\n const minY = Math.min(...yList)\n const maxX = Math.max(...xList)\n const maxY = Math.max(...yList)\n\n const formatedPoints = points.value.map(point => {\n return [point[0] - minX, point[1] - minY]\n })\n\n let path = ''\n for (let i = 0; i < formatedPoints.length; i++) {\n const point = formatedPoints[i]\n if (i === 0) path += `M ${point[0]} ${point[1]} `\n else path += `L ${point[0]} ${point[1]} `\n }\n if (close) path += 'Z'\n\n const start: [number, number] = [minX + offset.value.x, minY + offset.value.y]\n const end: [number, number] = [maxX + offset.value.x, maxY + offset.value.y]\n const viewBox: [number, number] = [maxX - minX, maxY - minY]\n\n return {\n start,\n end,\n path,\n viewBox,\n }\n}\n\nconst addPoint = (e: MouseEvent) => {\n const { pageX, pageY } = getPoint(e)\n isMouseDown.value = true\n\n if (closed.value) emit('created', getCreateData())\n else points.value.push([pageX, pageY])\n\n document.onmouseup = () => {\n isMouseDown.value = false\n }\n}\n\nconst close = () => {\n mainStore.setCreatingCustomShapeState(false)\n}\n\nconst create = () => {\n emit('created', {\n ...getCreateData(false),\n fill: 'rgba(0, 0, 0, 0)',\n outline: {\n width: 2,\n color: theme.value.themeColor,\n style: 'solid',\n },\n })\n close()\n}\n\nconst keydownListener = (e: KeyboardEvent) => {\n const key = e.key.toUpperCase()\n if (key === KEYS.ESC) close()\n if (key === KEYS.ENTER) create()\n}\nonMounted(() => {\n message.success('点击绘制任意形状,首尾闭合完成绘制,按 ESC 键或鼠标右键取消,按 ENTER 键提前完成', {\n duration: 5000,\n })\n document.addEventListener('keydown', keydownListener)\n})\nonUnmounted(() => document.removeEventListener('keydown', keydownListener))\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"shape-create-canvas\",\n ref_key: \"shapeCanvasRef\",\n ref: shapeCanvasRef,\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => addPoint($event), [\"stop\"])),\n onMousemove: _cache[1] || (_cache[1] = $event => updateMousePosition($event)),\n onContextmenu: _cache[2] || (_cache[2] = _withModifiers(($event: any) => (close()), [\"stop\",\"prevent\"]))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, [\n _createElementVNode(\"path\", {\n d: path.value,\n stroke: \"#d14424\",\n fill: closed.value ? 'rgba(226, 83, 77, 0.15)' : 'none',\n \"stroke-width\": \"2\"\n }, null, 8, _hoisted_2)\n ]))\n ], 544))\n}\n}\n\n})","\n\n\n\n","import script from \"./ShapeCreateCanvas.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapeCreateCanvas.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapeCreateCanvas.vue?vue&type=style&index=0&id=6dc9876e&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6dc9876e\"]])\n\nexport default __exports__","import { computed, type Ref } from 'vue'\nimport { OperateResizeHandlers, OperateBorderLines } from '@/types/edit'\n\nexport default (width: Ref, height: Ref) => {\n // 元素缩放点\n const resizeHandlers = computed(() => {\n return [\n { direction: OperateResizeHandlers.LEFT_TOP, style: {} },\n { direction: OperateResizeHandlers.TOP, style: {left: width.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.RIGHT_TOP, style: {left: width.value + 'px'} },\n { direction: OperateResizeHandlers.LEFT, style: {top: height.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.RIGHT, style: {left: width.value + 'px', top: height.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.LEFT_BOTTOM, style: {top: height.value + 'px'} },\n { direction: OperateResizeHandlers.BOTTOM, style: {left: width.value / 2 + 'px', top: height.value + 'px'} },\n { direction: OperateResizeHandlers.RIGHT_BOTTOM, style: {left: width.value + 'px', top: height.value + 'px'} },\n ]\n })\n\n // 文本元素缩放点\n const textElementResizeHandlers = computed(() => {\n return [\n { direction: OperateResizeHandlers.LEFT, style: {top: height.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.RIGHT, style: {left: width.value + 'px', top: height.value / 2 + 'px'} },\n ]\n })\n const verticalTextElementResizeHandlers = computed(() => {\n return [\n { direction: OperateResizeHandlers.TOP, style: {left: width.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.BOTTOM, style: {left: width.value / 2 + 'px', top: height.value + 'px'} },\n ]\n })\n\n // 元素选中边框线\n const borderLines = computed(() => {\n return [\n { type: OperateBorderLines.T, style: {width: width.value + 'px'} },\n { type: OperateBorderLines.B, style: {top: height.value + 'px', width: width.value + 'px'} },\n { type: OperateBorderLines.L, style: {height: height.value + 'px'} },\n { type: OperateBorderLines.R, style: {left: width.value + 'px', height: height.value + 'px'} },\n ]\n })\n\n return {\n resizeHandlers,\n textElementResizeHandlers,\n verticalTextElementResizeHandlers,\n borderLines,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport type { OperateResizeHandlers } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ResizeHandler',\n props: {\n type: {},\n rotate: { default: 0 }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst rotateClassName = computed(() => {\n const prefix = 'rotate-'\n const rotate = props.rotate\n if (rotate > -22.5 && rotate <= 22.5) return prefix + 0\n else if (rotate > 22.5 && rotate <= 67.5) return prefix + 45\n else if (rotate > 67.5 && rotate <= 112.5) return prefix + 90\n else if (rotate > 112.5 && rotate <= 157.5) return prefix + 135\n else if (rotate > 157.5 || rotate <= -157.5) return prefix + 0\n else if (rotate > -157.5 && rotate <= -112.5) return prefix + 45\n else if (rotate > -112.5 && rotate <= -67.5) return prefix + 90\n else if (rotate > -67.5 && rotate <= -22.5) return prefix + 135\n return prefix + 0\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(['resize-handler', rotateClassName.value, _ctx.type])\n }, null, 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./ResizeHandler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ResizeHandler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ResizeHandler.vue?vue&type=style&index=0&id=1e66197f&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1e66197f\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport type { OperateBorderLines } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BorderLine',\n props: {\n type: {},\n isWide: { type: Boolean, default: false }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(['border-line', _ctx.type, { 'wide': _ctx.isWide }])\n }, null, 2))\n}\n}\n\n})","import script from \"./BorderLine.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BorderLine.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BorderLine.vue?vue&type=style&index=0&id=8346cf6c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8346cf6c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { computed, ref, watchEffect } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { getElementListRange } from '@/utils/element'\nimport type { OperateResizeHandlers, MultiSelectRange } from '@/types/edit'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MultiSelectOperate',\n props: {\n elementList: {},\n scaleMultiElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { activeElementIdList, canvasScale } = storeToRefs(useMainStore())\n\nconst localActiveElementList = computed(() => props.elementList.filter(el => activeElementIdList.value.includes(el.id)))\n\nconst range = ref({\n minX: 0,\n maxX: 0,\n minY: 0,\n maxY: 0,\n})\n\n// 根据多选元素整体在画布中的范围,计算边框线和缩放点的位置信息\nconst width = computed(() => (range.value.maxX - range.value.minX) * canvasScale.value)\nconst height = computed(() => (range.value.maxY - range.value.minY) * canvasScale.value)\nconst { resizeHandlers, borderLines } = useCommonOperate(width, height)\n\n// 计算多选元素整体在画布中的范围\nconst setRange = () => {\n const { minX, maxX, minY, maxY } = getElementListRange(localActiveElementList.value)\n range.value = { minX, maxX, minY, maxY }\n}\nwatchEffect(setRange)\n\n// 禁用多选状态下缩放:仅未旋转的图片和形状可以在多选状态下缩放\nconst disableResize = computed(() => {\n return localActiveElementList.value.some(item => {\n if (\n (item.type === 'image' || item.type === 'shape') && \n !item.rotate\n ) return false\n return true\n })\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"multi-select-operate\",\n style: _normalizeStyle({\n left: range.value.minX * _unref(canvasScale) + 'px',\n top: range.value.minY * _unref(canvasScale) + 'px',\n })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (!disableResize.value)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n key: point.direction,\n type: point.direction,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers(($event: any) => (_ctx.scaleMultiElement($event, range.value, point.direction)), [\"stop\"])\n }, null, 8, [\"type\", \"style\", \"onMousedown\"]))\n }), 128))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./MultiSelectOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MultiSelectOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MultiSelectOperate.vue?vue&type=style&index=0&id=97dc9b9a&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-97dc9b9a\"]])\n\nexport default __exports__","\n\n\n\n","import { render } from \"./RotateHandler.vue?vue&type=template&id=b99d8dae&scoped=true\"\nconst script = {}\n\nimport \"./RotateHandler.vue?vue&type=style&index=0&id=b99d8dae&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-b99d8dae\"]])\n\nexport default __exports__","\r\n\r\n\r\n\r\n\r\n\r\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nimport { computed } from 'vue'\r\nimport { storeToRefs } from 'pinia'\r\nimport { useMainStore } from '@/store'\r\nimport type { PPTImageElement } from '@/types/slides'\r\nimport type { OperateResizeHandlers } from '@/types/edit'\r\nimport useCommonOperate from '../hooks/useCommonOperate'\r\n\r\nimport RotateHandler from './RotateHandler.vue'\r\nimport ResizeHandler from './ResizeHandler.vue'\r\nimport BorderLine from './BorderLine.vue'\r\n\r\n\r\nconst __default__ = {\r\n inheritAttrs: false,\r\n}\r\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'ImageElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\r\nconst props = __props\r\n\r\nconst { canvasScale, clipingImageElementId } = storeToRefs(useMainStore())\r\n\r\nconst isCliping = computed(() => clipingImageElementId.value === props.elementInfo.id)\r\n\r\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\r\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\r\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"image-element-operate\", { 'cliping': isCliping.value }])\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ], 2))\n}\n}\n\n})","import script from \"./ImageElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageElementOperate.vue?vue&type=style&index=0&id=7bcad5a9&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7bcad5a9\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"text-element-operate\" }\n\nimport { computed } from 'vue'\r\nimport { storeToRefs } from 'pinia'\r\nimport { useMainStore } from '@/store'\r\nimport type { PPTTextElement } from '@/types/slides'\r\nimport type { OperateResizeHandlers } from '@/types/edit'\r\nimport useCommonOperate from '../hooks/useCommonOperate'\r\n\r\nimport RotateHandler from './RotateHandler.vue'\r\nimport ResizeHandler from './ResizeHandler.vue'\r\nimport BorderLine from './BorderLine.vue'\r\n\r\n\r\nconst __default__ = {\r\n inheritAttrs: false,\r\n}\r\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'TextElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\r\nconst props = __props\r\n\r\nconst { canvasScale } = storeToRefs(useMainStore())\r\n\r\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\r\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\r\n\r\nconst { textElementResizeHandlers, verticalTextElementResizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\r\nconst resizeHandlers = computed(() => props.elementInfo.vertical ? verticalTextElementResizeHandlers.value : textElementResizeHandlers.value)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(resizeHandlers.value, (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\r\n\r\n\r\n\r\n","import script from \"./TextElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TextElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-52dcdbf8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"shape-element-operate\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTShapeElement } from '@/types/slides'\nimport type { OperateResizeHandlers } from '@/types/edit'\nimport { SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport RotateHandler from './RotateHandler.vue'\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'ShapeElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function },\n moveShapeKeypoint: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\n\nconst keypointStyle = computed(() => {\n if (!props.elementInfo.pathFormula || props.elementInfo.keypoint === undefined) return {}\n\n const pathFormula = SHAPE_PATH_FORMULAS[props.elementInfo.pathFormula]\n if ('editable' in pathFormula) {\n const keypointPos = pathFormula.getBaseSize(props.elementInfo.width, props.elementInfo.height) * props.elementInfo.keypoint\n if (pathFormula.relative === 'left') return { left: keypointPos * canvasScale.value + 'px' }\n if (pathFormula.relative === 'right') return { left: (props.elementInfo.width - keypointPos) * canvasScale.value + 'px' }\n if (pathFormula.relative === 'center') return { left: (props.elementInfo.width - keypointPos) / 2 * canvasScale.value + 'px' }\n if (pathFormula.relative === 'top') return { top: keypointPos * canvasScale.value + 'px' }\n if (pathFormula.relative === 'bottom') return { top: (props.elementInfo.height - keypointPos) * canvasScale.value + 'px' }\n }\n return {}\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"]),\n (_ctx.elementInfo.keypoint !== undefined)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"operate-keypoint-handler\",\n style: _normalizeStyle(keypointStyle.value),\n onMousedown: _cache[1] || (_cache[1] = _withModifiers($event => _ctx.moveShapeKeypoint($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 36))\n : _createCommentVNode(\"\", true)\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./ShapeElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapeElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapeElementOperate.vue?vue&type=style&index=0&id=52dcdbf8&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-52dcdbf8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers, normalizeStyle as _normalizeStyle, createBlock as _createBlock, unref as _unref, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3aa5cc44\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"line-element-operate\" }\nconst _hoisted_2 = [\"width\", \"height\", \"stroke\"]\nconst _hoisted_3 = { key: 0 }\nconst _hoisted_4 = [\"x1\", \"y1\", \"x2\", \"y2\"]\nconst _hoisted_5 = [\"x1\", \"y1\", \"x2\", \"y2\"]\nconst _hoisted_6 = [\"x1\", \"y1\", \"x2\", \"y2\"]\nconst _hoisted_7 = [\"x1\", \"y1\", \"x2\", \"y2\"]\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTLineElement } from '@/types/slides'\nimport { OperateLineHandlers } from '@/types/edit'\n\nimport ResizeHandler from './ResizeHandler.vue'\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'LineElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n dragLineElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst svgWidth = computed(() => Math.max(props.elementInfo.start[0], props.elementInfo.end[0]))\nconst svgHeight = computed(() => Math.max(props.elementInfo.start[1], props.elementInfo.end[1]))\n\nconst resizeHandlers = computed(() => {\n const handlers = [\n {\n handler: OperateLineHandlers.START,\n style: {\n left: props.elementInfo.start[0] * canvasScale.value + 'px',\n top: props.elementInfo.start[1] * canvasScale.value + 'px',\n }\n },\n {\n handler: OperateLineHandlers.END,\n style: {\n left: props.elementInfo.end[0] * canvasScale.value + 'px',\n top: props.elementInfo.end[1] * canvasScale.value + 'px',\n }\n },\n ]\n\n if (props.elementInfo.curve || props.elementInfo.broken) {\n const ctrlHandler = (props.elementInfo.curve || props.elementInfo.broken) as [number, number]\n\n handlers.push({\n handler: OperateLineHandlers.C,\n style: {\n left: ctrlHandler[0] * canvasScale.value + 'px',\n top: ctrlHandler[1] * canvasScale.value + 'px',\n }\n })\n }\n else if (props.elementInfo.cubic) {\n const [ctrlHandler1, ctrlHandler2] = props.elementInfo.cubic\n handlers.push({\n handler: OperateLineHandlers.C1,\n style: {\n left: ctrlHandler1[0] * canvasScale.value + 'px',\n top: ctrlHandler1[1] * canvasScale.value + 'px',\n }\n })\n handlers.push({\n handler: OperateLineHandlers.C2,\n style: {\n left: ctrlHandler2[0] * canvasScale.value + 'px',\n top: ctrlHandler2[1] * canvasScale.value + 'px',\n }\n })\n }\n\n return handlers\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(resizeHandlers.value, (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.handler,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.dragLineElement($event, _ctx.elementInfo, point.handler), [\"stop\"])\n }, null, 8, [\"style\", \"onMousedown\"]))\n }), 128)),\n (_openBlock(), _createElementBlock(\"svg\", {\n width: svgWidth.value || 1,\n height: svgHeight.value || 1,\n stroke: _ctx.elementInfo.color,\n overflow: \"visible\",\n style: _normalizeStyle({ transform: `scale(${_unref(canvasScale)})` })\n }, [\n (_ctx.elementInfo.curve)\n ? (_openBlock(), _createElementBlock(\"g\", _hoisted_3, [\n _createElementVNode(\"line\", {\n class: \"anchor-line\",\n x1: _ctx.elementInfo.start[0],\n y1: _ctx.elementInfo.start[1],\n x2: _ctx.elementInfo.curve[0],\n y2: _ctx.elementInfo.curve[1]\n }, null, 8, _hoisted_4),\n _createElementVNode(\"line\", {\n class: \"anchor-line\",\n x1: _ctx.elementInfo.end[0],\n y1: _ctx.elementInfo.end[1],\n x2: _ctx.elementInfo.curve[0],\n y2: _ctx.elementInfo.curve[1]\n }, null, 8, _hoisted_5)\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.elementInfo.cubic)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 1 }, _renderList(_ctx.elementInfo.cubic, (item, index) => {\n return (_openBlock(), _createElementBlock(\"g\", { key: index }, [\n (index === 0)\n ? (_openBlock(), _createElementBlock(\"line\", {\n key: 0,\n class: \"anchor-line\",\n x1: _ctx.elementInfo.start[0],\n y1: _ctx.elementInfo.start[1],\n x2: item[0],\n y2: item[1]\n }, null, 8, _hoisted_6))\n : _createCommentVNode(\"\", true),\n (index === 1)\n ? (_openBlock(), _createElementBlock(\"line\", {\n key: 1,\n class: \"anchor-line\",\n x1: _ctx.elementInfo.end[0],\n y1: _ctx.elementInfo.end[1],\n x2: item[0],\n y2: item[1]\n }, null, 8, _hoisted_7))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n : _createCommentVNode(\"\", true)\n ], 12, _hoisted_2))\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./LineElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LineElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LineElementOperate.vue?vue&type=style&index=0&id=3aa5cc44&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3aa5cc44\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"table-element-operate\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTTableElement } from '@/types/slides'\nimport type { OperateResizeHandlers } from '@/types/edit'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport RotateHandler from './RotateHandler.vue'\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'TableElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst outlineWidth = computed(() => props.elementInfo.outline.width || 1)\n\nconst scaleWidth = computed(() => (props.elementInfo.width + outlineWidth.value) * canvasScale.value)\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\n\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./TableElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TableElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"common-element-operate\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTVideoElement, PPTLatexElement, PPTAudioElement, PPTChartElement } from '@/types/slides'\nimport type { OperateResizeHandlers } from '@/types/edit'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport RotateHandler from './RotateHandler.vue'\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\ntype PPTElement = PPTVideoElement | PPTLatexElement | PPTAudioElement | PPTChartElement\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'CommonElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\n\nconst cannotRotate = computed(() => ['chart', 'video', 'audio'].includes(props.elementInfo.type))\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n (!cannotRotate.value)\n ? (_openBlock(), _createBlock(RotateHandler, {\n key: 0,\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./CommonElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./CommonElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { useSlidesStore } from '@/store'\nimport type { PPTElement, PPTElementLink } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport message from '@/utils/message'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n const setLink = (handleElement: PPTElement, link: PPTElementLink) => {\n const linkRegExp = /^(https?):\\/\\/[\\w\\-]+(\\.[\\w\\-]+)+([\\w\\-.,@?^=%&:\\/~+#]*[\\w\\-@?^=%&\\/~+#])?$/\n if (link.type === 'web' && !linkRegExp.test(link.target)) {\n message.error('不是正确的网页链接地址')\n return false\n }\n if (link.type === 'slide' && !link.target) {\n message.error('请先选择链接目标')\n return false\n }\n const props = { link }\n slidesStore.updateElement({ id: handleElement.id, props })\n addHistorySnapshot()\n\n return true\n }\n\n const removeLink = (handleElement: PPTElement) => {\n slidesStore.removeElementProps({ id: handleElement.id, propName: 'link' })\n addHistorySnapshot()\n }\n\n return {\n setLink,\n removeLink,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Divider',\n props: {\n type: { default: 'horizontal' },\n margin: { default: 0 }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(['divider', _ctx.type]),\n style: _normalizeStyle({\n margin: _ctx.type === 'horizontal' ? `${_ctx.margin || 24}px 0` : `0 ${_ctx.margin || 8}px`\n })\n }, null, 6))\n}\n}\n\n})","import script from \"./Divider.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Divider.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Divider.vue?vue&type=style&index=0&id=6b66cde8&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6b66cde8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createVNode as _createVNode, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-316c4664\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"href\"]\nconst _hoisted_2 = { class: \"btns\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement, PPTElementLink } from '@/types/slides'\nimport useLink from '@/hooks/useLink'\nimport Divider from '@/components/Divider.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinkHandler',\n props: {\n elementInfo: {},\n link: {},\n openLinkDialog: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { canvasScale } = storeToRefs(mainStore)\nconst { slides } = storeToRefs(slidesStore)\nconst { removeLink } = useLink()\nconst height = computed(() => props.elementInfo.type === 'line' ? 0 : props.elementInfo.height)\n\nconst turnTarget = (slideId: string) => {\n const targetIndex = slides.value.findIndex(item => item.id === slideId)\n if (targetIndex !== -1) {\n mainStore.setActiveElementIdList([])\n slidesStore.updateSlideIndex(targetIndex)\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"link-handler\",\n style: _normalizeStyle({ top: height.value * _unref(canvasScale) + 10 + 'px' })\n }, [\n (_ctx.link.type === 'web')\n ? (_openBlock(), _createElementBlock(\"a\", {\n key: 0,\n class: \"link\",\n href: _ctx.link.target,\n target: \"_blank\"\n }, _toDisplayString(_ctx.link.target), 9, _hoisted_1))\n : (_openBlock(), _createElementBlock(\"a\", {\n key: 1,\n class: \"link\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (turnTarget(_ctx.link.target)))\n }, \"幻灯片页面 \" + _toDisplayString(_ctx.link.target), 1)),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: \"btn\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.openLinkDialog()))\n }, \"更换\"),\n _createVNode(Divider, { type: \"vertical\" }),\n _createElementVNode(\"div\", {\n class: \"btn\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_unref(removeLink)(_ctx.elementInfo)))\n }, \"移除\")\n ])\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./LinkHandler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinkHandler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LinkHandler.vue?vue&type=style&index=0&id=316c4664&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-316c4664\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, withModifiers as _withModifiers, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5ec1ff35\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 1,\n class: \"animation-index\"\n}\n\nimport { computed } from 'vue'\r\nimport { storeToRefs } from 'pinia'\r\nimport { useMainStore, useSlidesStore } from '@/store'\r\nimport {\r\n ElementTypes,\r\n type PPTElement,\r\n type PPTLineElement,\r\n type PPTVideoElement,\r\n type PPTAudioElement,\r\n type PPTShapeElement,\r\n type PPTChartElement,\r\n} from '@/types/slides'\r\nimport type { OperateLineHandlers, OperateResizeHandlers } from '@/types/edit'\r\n\r\nimport ImageElementOperate from './ImageElementOperate.vue'\r\nimport TextElementOperate from './TextElementOperate.vue'\r\nimport ShapeElementOperate from './ShapeElementOperate.vue'\r\nimport LineElementOperate from './LineElementOperate.vue'\r\nimport TableElementOperate from './TableElementOperate.vue'\r\nimport CommonElementOperate from './CommonElementOperate.vue'\r\nimport LinkHandler from './LinkHandler.vue'\r\n\r\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n isSelected: { type: Boolean },\n isActive: { type: Boolean },\n isActiveGroupElement: { type: Boolean },\n isMultiSelect: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function },\n dragLineElement: { type: Function },\n moveShapeKeypoint: { type: Function },\n openLinkDialog: { type: Function }\n },\n setup(__props: any) {\n\r\nconst props = __props\r\n\r\nconst { canvasScale, toolbarState } = storeToRefs(useMainStore())\r\nconst { formatedAnimations } = storeToRefs(useSlidesStore())\r\n\r\nconst currentOperateComponent = computed(() => {\r\n const elementTypeMap = {\r\n [ElementTypes.IMAGE]: ImageElementOperate,\r\n [ElementTypes.TEXT]: TextElementOperate,\r\n [ElementTypes.SHAPE]: ShapeElementOperate,\r\n [ElementTypes.LINE]: LineElementOperate,\r\n [ElementTypes.TABLE]: TableElementOperate,\r\n [ElementTypes.CHART]: CommonElementOperate,\r\n [ElementTypes.LATEX]: CommonElementOperate,\r\n [ElementTypes.VIDEO]: CommonElementOperate,\r\n [ElementTypes.AUDIO]: CommonElementOperate,\r\n }\r\n return elementTypeMap[props.elementInfo.type] || null\r\n})\r\n\r\nconst elementIndexListInAnimation = computed(() => {\r\n const indexList = []\r\n for (let i = 0; i < formatedAnimations.value.length; i++) {\r\n const elIds = formatedAnimations.value[i].animations.map(item => item.elId)\r\n if (elIds.includes(props.elementInfo.id)) indexList.push(i)\r\n }\r\n return indexList\r\n})\r\n\r\nconst rotate = computed(() => 'rotate' in props.elementInfo ? props.elementInfo.rotate : 0)\r\nconst height = computed(() => 'height' in props.elementInfo ? props.elementInfo.height : 0)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"operate\", { 'multi-select': _ctx.isMultiSelect && !_ctx.isActive }]),\n style: _normalizeStyle({\r\n top: _ctx.elementInfo.top * _unref(canvasScale) + 'px',\r\n left: _ctx.elementInfo.left * _unref(canvasScale) + 'px',\r\n transform: `rotate(${rotate.value}deg)`,\r\n transformOrigin: `${_ctx.elementInfo.width * _unref(canvasScale) / 2}px ${height.value * _unref(canvasScale) / 2}px`,\r\n })\n }, [\n (_ctx.isSelected)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(currentOperateComponent.value), {\n key: 0,\n elementInfo: _ctx.elementInfo,\n handlerVisible: !_ctx.elementInfo.lock && (_ctx.isActiveGroupElement || !_ctx.isMultiSelect),\n rotateElement: _ctx.rotateElement,\n scaleElement: _ctx.scaleElement,\n dragLineElement: _ctx.dragLineElement,\n moveShapeKeypoint: _ctx.moveShapeKeypoint\n }, null, 8, [\"elementInfo\", \"handlerVisible\", \"rotateElement\", \"scaleElement\", \"dragLineElement\", \"moveShapeKeypoint\"]))\n : _createCommentVNode(\"\", true),\n (_unref(toolbarState) === 'elAnimation' && elementIndexListInAnimation.value.length)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementIndexListInAnimation.value, (index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"index-item\",\n key: index\n }, _toDisplayString(index + 1), 1))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.isActive && _ctx.elementInfo.link)\n ? (_openBlock(), _createBlock(LinkHandler, {\n key: 2,\n elementInfo: _ctx.elementInfo,\n link: _ctx.elementInfo.link,\n openLinkDialog: _ctx.openLinkDialog,\n onMousedown: _cache[0] || (_cache[0] = _withModifiers(() => {}, [\"stop\"]))\n }, null, 8, [\"elementInfo\", \"link\", \"openLinkDialog\"]))\n : _createCommentVNode(\"\", true)\n ], 6))\n}\n}\n\n})","\r\n\r\n\r\n\r\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=5ec1ff35&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5ec1ff35\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-24fef706\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\"]\n\nimport { computed } from 'vue'\nimport type { PPTImageElement } from '@/types/slides'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\nimport useClipImage from './useClipImage'\nimport useFilter from './useFilter'\n\nimport ImageOutline from './ImageOutline/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseImageElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst clip = computed(() => props.elementInfo.clip)\nconst { clipShape, imgPosition } = useClipImage(clip)\n\nconst filters = computed(() => props.elementInfo.filters)\nconst { filter } = useFilter(filters)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-image\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n })\n }, [\n _createVNode(ImageOutline, { elementInfo: _ctx.elementInfo }, null, 8, [\"elementInfo\"]),\n _createElementVNode(\"div\", {\n class: \"image-content\",\n style: _normalizeStyle({ clipPath: _unref(clipShape).style })\n }, [\n _createElementVNode(\"img\", {\n src: _ctx.elementInfo.src,\n draggable: false,\n style: _normalizeStyle({\n top: _unref(imgPosition).top,\n left: _unref(imgPosition).left,\n width: _unref(imgPosition).width,\n height: _unref(imgPosition).height,\n filter: _unref(filter),\n }),\n alt: \"\"\n }, null, 12, _hoisted_1),\n (_ctx.elementInfo.colorMask)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"color-mask\",\n style: _normalizeStyle({\n backgroundColor: _ctx.elementInfo.colorMask,\n })\n }, null, 4))\n : _createCommentVNode(\"\", true)\n ], 4)\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseImageElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseImageElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseImageElement.vue?vue&type=style&index=0&id=24fef706&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-24fef706\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-52a206f2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"innerHTML\"]\n\nimport { computed } from 'vue'\nimport type { PPTTextElement } from '@/types/slides'\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\n\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTextElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-text\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n width: _ctx.elementInfo.vertical ? 'auto' : _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.vertical ? _ctx.elementInfo.height + 'px' : 'auto',\n backgroundColor: _ctx.elementInfo.fill,\n opacity: _ctx.elementInfo.opacity,\n textShadow: _unref(shadowStyle),\n lineHeight: _ctx.elementInfo.lineHeight,\n letterSpacing: (_ctx.elementInfo.wordSpace || 0) + 'px',\n color: _ctx.elementInfo.defaultColor,\n fontFamily: _ctx.elementInfo.defaultFontName,\n writingMode: _ctx.elementInfo.vertical ? 'vertical-rl' : 'horizontal-tb',\n })\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createElementVNode(\"div\", {\n class: \"text ProseMirror-static\",\n style: _normalizeStyle({\n '--paragraphSpace': `${_ctx.elementInfo.paragraphSpace === undefined ? 5 : _ctx.elementInfo.paragraphSpace}px`,\n }),\n innerHTML: _ctx.elementInfo.content\n }, null, 12, _hoisted_1)\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseTextElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseTextElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseTextElement.vue?vue&type=style&index=0&id=52a206f2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-52a206f2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-b13f8fa8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = { key: 0 }\nconst _hoisted_3 = [\"transform\"]\nconst _hoisted_4 = [\"d\", \"fill\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\nconst _hoisted_5 = [\"innerHTML\"]\n\nimport { computed } from 'vue'\nimport type { PPTShapeElement, ShapeText } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\n\nimport GradientDefs from './GradientDefs.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseShapeElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst outline = computed(() => props.elementInfo.outline)\nconst { outlineWidth, outlineColor, strokeDashArray } = useElementOutline(outline)\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst text = computed(() => {\n const defaultText: ShapeText = {\n content: '',\n defaultFontName: '微软雅黑',\n defaultColor: '#000',\n align: 'middle',\n }\n if (!props.elementInfo.text) return defaultText\n\n return props.elementInfo.text\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-shape\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n opacity: _ctx.elementInfo.opacity,\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n color: text.value.defaultColor,\n fontFamily: text.value.defaultFontName,\n })\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height\n }, [\n (_ctx.elementInfo.gradient)\n ? (_openBlock(), _createElementBlock(\"defs\", _hoisted_2, [\n _createVNode(GradientDefs, {\n id: `base-gradient-${_ctx.elementInfo.id}`,\n type: _ctx.elementInfo.gradient.type,\n color1: _ctx.elementInfo.gradient.color[0],\n color2: _ctx.elementInfo.gradient.color[1],\n rotate: _ctx.elementInfo.gradient.rotate\n }, null, 8, [\"id\", \"type\", \"color1\", \"color2\", \"rotate\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n d: _ctx.elementInfo.path,\n fill: _ctx.elementInfo.gradient ? `url(#base-gradient-${_ctx.elementInfo.id})` : _ctx.elementInfo.fill,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_4)\n ], 8, _hoisted_3)\n ], 8, _hoisted_1)),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"shape-text\", text.value.align])\n }, [\n _createElementVNode(\"div\", {\n class: \"ProseMirror-static\",\n innerHTML: text.value.content\n }, null, 8, _hoisted_5)\n ], 2)\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseShapeElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseShapeElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseShapeElement.vue?vue&type=style&index=0&id=b13f8fa8&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-b13f8fa8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-443e2f82\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\", \"marker-start\", \"marker-end\"]\n\nimport { computed } from 'vue'\nimport type { PPTLineElement } from '@/types/slides'\nimport { getLineElementPath } from '@/utils/element'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\n\nimport LinePointMarker from './LinePointMarker.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseLineElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst svgWidth = computed(() => {\n const width = Math.abs(props.elementInfo.start[0] - props.elementInfo.end[0])\n return width < 24 ? 24 : width\n})\nconst svgHeight = computed(() => {\n const height = Math.abs(props.elementInfo.start[1] - props.elementInfo.end[1])\n return height < 24 ? 24 : height\n})\n\nconst lineDashArray = computed(() => {\n if (props.elementInfo.style !== 'dashed') return '0 0'\n const size = props.elementInfo.width\n return size <= 8 ? `${size * 5} ${size * 2.5}` : `${size * 5} ${size * 1.5}`\n})\n\nconst path = computed(() => {\n return getLineElementPath(props.elementInfo)\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-line\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({ filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '' })\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: svgWidth.value,\n height: svgHeight.value\n }, [\n _createElementVNode(\"defs\", null, [\n (_ctx.elementInfo.points[0])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 0,\n id: _ctx.elementInfo.id,\n position: \"start\",\n type: _ctx.elementInfo.points[0],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.elementInfo.points[1])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 1,\n id: _ctx.elementInfo.id,\n position: \"end\",\n type: _ctx.elementInfo.points[1],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"path\", {\n d: path.value,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.width,\n \"stroke-dasharray\": lineDashArray.value,\n fill: \"none\",\n \"marker-start\": _ctx.elementInfo.points[0] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[0]}-start)` : '',\n \"marker-end\": _ctx.elementInfo.points[1] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[1]}-end)` : ''\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseLineElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseLineElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseLineElement.vue?vue&type=style&index=0&id=443e2f82&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-443e2f82\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed, inject, ref } from 'vue'\r\nimport type { PPTChartElement } from '@/types/slides'\r\nimport { injectKeySlideScale } from '@/types/injectKey'\r\n\r\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\r\nimport Chart from './Chart.vue'\r\n\r\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseChartElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\r\n\r\n\r\nconst slideScale = inject(injectKeySlideScale) || ref(1)\r\n\r\nconst needScaleSize = computed(() => slideScale.value < 1)\r\nconst zoom = computed(() => needScaleSize.value ? 1 / slideScale.value : 1)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-chart\",\n style: _normalizeStyle({\r\n top: _ctx.elementInfo.top + 'px',\r\n left: _ctx.elementInfo.left + 'px',\r\n width: _ctx.elementInfo.width + 'px',\r\n height: _ctx.elementInfo.height + 'px',\r\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\r\n backgroundColor: _ctx.elementInfo.fill,\r\n })\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createVNode(Chart, {\n width: _ctx.elementInfo.width * zoom.value,\n height: _ctx.elementInfo.height * zoom.value,\n type: _ctx.elementInfo.chartType,\n data: _ctx.elementInfo.data,\n options: _ctx.elementInfo.options,\n themeColor: _ctx.elementInfo.themeColor,\n gridColor: _ctx.elementInfo.gridColor,\n legends: _ctx.elementInfo.data.legends,\n legend: _ctx.elementInfo.legend || '',\n style: _normalizeStyle({ zoom: 1 / zoom.value })\n }, null, 8, [\"width\", \"height\", \"type\", \"data\", \"options\", \"themeColor\", \"gridColor\", \"legends\", \"legend\", \"style\"])\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\r\n\r\n\r\n\r\n","import script from \"./BaseChartElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseChartElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseChartElement.vue?vue&type=style&index=0&id=7c03d68d&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7c03d68d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, vShow as _vShow, withDirectives as _withDirectives, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5d949d4d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\"]\nconst _hoisted_2 = [\"rowspan\", \"colspan\"]\nconst _hoisted_3 = [\"innerHTML\"]\n\nimport { computed, ref, watch } from 'vue'\nimport type { PPTElementOutline, TableCell, TableTheme } from '@/types/slides'\nimport { getTextStyle, formatText } from './utils'\nimport useHideCells from './useHideCells'\nimport useSubThemeColor from './useSubThemeColor'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'StaticTable',\n props: {\n data: {},\n width: {},\n cellMinHeight: {},\n colWidths: {},\n outline: {},\n theme: {},\n editable: { type: Boolean, default: true }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst colSizeList = ref([])\nconst totalWidth = computed(() => colSizeList.value.reduce((a, b) => a + b))\n\nwatch([\n () => props.colWidths,\n () => props.width,\n], () => {\n colSizeList.value = props.colWidths.map(item => item * props.width)\n}, { immediate: true })\n\nconst cells = computed(() => props.data)\nconst { hideCells } = useHideCells(cells)\n\nconst theme = computed(() => props.theme)\nconst { subThemeColor } = useSubThemeColor(theme)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"static-table\",\n style: _normalizeStyle({ width: totalWidth.value + 'px' })\n }, [\n _createElementVNode(\"table\", {\n class: _normalizeClass({\n 'theme': theme.value,\n 'row-header': theme.value?.rowHeader,\n 'row-footer': theme.value?.rowFooter,\n 'col-header': theme.value?.colHeader,\n 'col-footer': theme.value?.colFooter,\n }),\n style: _normalizeStyle(`--themeColor: ${theme.value?.color}; --subThemeColor1: ${_unref(subThemeColor)[0]}; --subThemeColor2: ${_unref(subThemeColor)[1]}`)\n }, [\n _createElementVNode(\"colgroup\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(colSizeList.value, (width, index) => {\n return (_openBlock(), _createElementBlock(\"col\", {\n span: \"1\",\n key: index,\n width: width\n }, null, 8, _hoisted_1))\n }), 128))\n ]),\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.data, (rowCells, rowIndex) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: rowIndex,\n style: _normalizeStyle({ height: _ctx.cellMinHeight + 'px' })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rowCells, (cell, colIndex) => {\n return _withDirectives((_openBlock(), _createElementBlock(\"td\", {\n class: \"cell\",\n style: _normalizeStyle({\n borderStyle: _ctx.outline.style,\n borderColor: _ctx.outline.color,\n borderWidth: _ctx.outline.width + 'px',\n ..._unref(getTextStyle)(cell.style),\n }),\n key: cell.id,\n rowspan: cell.rowspan,\n colspan: cell.colspan\n }, [\n _createElementVNode(\"div\", {\n class: \"cell-text\",\n style: _normalizeStyle({ minHeight: (_ctx.cellMinHeight - 4) + 'px' }),\n innerHTML: _unref(formatText)(cell.text)\n }, null, 12, _hoisted_3)\n ], 12, _hoisted_2)), [\n [_vShow, !_unref(hideCells).includes(`${rowIndex}_${colIndex}`)]\n ])\n }), 128))\n ], 4))\n }), 128))\n ])\n ], 6)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./StaticTable.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./StaticTable.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./StaticTable.vue?vue&type=style&index=0&id=5d949d4d&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5d949d4d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3eff7eba\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\n\nimport type { PPTTableElement } from '@/types/slides'\n\nimport StaticTable from './StaticTable.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTableElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-table\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createVNode(StaticTable, {\n data: _ctx.elementInfo.data,\n width: _ctx.elementInfo.width,\n cellMinHeight: _ctx.elementInfo.cellMinHeight,\n colWidths: _ctx.elementInfo.colWidths,\n outline: _ctx.elementInfo.outline,\n theme: _ctx.elementInfo.theme\n }, null, 8, [\"data\", \"width\", \"cellMinHeight\", \"colWidths\", \"outline\", \"theme\"])\n ])\n ], 4)\n ], 4))\n}\n}\n\n})","import script from \"./BaseTableElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseTableElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseTableElement.vue?vue&type=style&index=0&id=3eff7eba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3eff7eba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-1587280d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\nconst _hoisted_2 = [\"width\", \"height\", \"stroke\", \"stroke-width\"]\nconst _hoisted_3 = [\"transform\"]\nconst _hoisted_4 = [\"d\"]\n\nimport type { PPTLatexElement } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseLatexElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-latex\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.strokeWidth,\n fill: \"none\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\"\n }, [\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n d: _ctx.elementInfo.path\n }, null, 8, _hoisted_4)\n ], 8, _hoisted_3)\n ], 8, _hoisted_2))\n ])\n ], 4)\n ], 4))\n}\n}\n\n})","import script from \"./BaseLatexElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseLatexElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseLatexElement.vue?vue&type=style&index=0&id=1587280d&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1587280d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport type { PPTVideoElement } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseVideoElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconPlayOne = _resolveComponent(\"IconPlayOne\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-video\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({ backgroundImage: _ctx.elementInfo.poster ? `url(${_ctx.elementInfo.poster})` : '' })\n }, [\n _createVNode(_component_IconPlayOne, { class: \"icon\" })\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","import script from \"./BaseVideoElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseVideoElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseVideoElement.vue?vue&type=style&index=0&id=09436dde&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-09436dde\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, normalizeStyle as _normalizeStyle, createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5da834d7\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\n\nimport { computed } from 'vue'\nimport type { PPTAudioElement } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseAudioElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst audioIconSize = computed(() => {\n return Math.min(props.elementInfo.width, props.elementInfo.height) + 'px'\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-audio\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createVNode(_component_IconVolumeNotice, {\n class: \"audio-icon\",\n style: _normalizeStyle({\n fontSize: audioIconSize.value,\n color: _ctx.elementInfo.color,\n })\n }, null, 8, [\"style\"])\n ])\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseAudioElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseAudioElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseAudioElement.vue?vue&type=style&index=0&id=5da834d7&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5da834d7\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport { ElementTypes, type PPTElement } from '@/types/slides'\n\nimport BaseImageElement from '@/views/components/element/ImageElement/BaseImageElement.vue'\nimport BaseTextElement from '@/views/components/element/TextElement/BaseTextElement.vue'\nimport BaseShapeElement from '@/views/components/element/ShapeElement/BaseShapeElement.vue'\nimport BaseLineElement from '@/views/components/element/LineElement/BaseLineElement.vue'\nimport BaseChartElement from '@/views/components/element/ChartElement/BaseChartElement.vue'\nimport BaseTableElement from '@/views/components/element/TableElement/BaseTableElement.vue'\nimport BaseLatexElement from '@/views/components/element/LatexElement/BaseLatexElement.vue'\nimport BaseVideoElement from '@/views/components/element/VideoElement/BaseVideoElement.vue'\nimport BaseAudioElement from '@/views/components/element/AudioElement/BaseAudioElement.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ThumbnailElement',\n props: {\n elementInfo: {},\n elementIndex: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst currentElementComponent = computed(() => {\n const elementTypeMap = {\n [ElementTypes.IMAGE]: BaseImageElement,\n [ElementTypes.TEXT]: BaseTextElement,\n [ElementTypes.SHAPE]: BaseShapeElement,\n [ElementTypes.LINE]: BaseLineElement,\n [ElementTypes.CHART]: BaseChartElement,\n [ElementTypes.TABLE]: BaseTableElement,\n [ElementTypes.LATEX]: BaseLatexElement,\n [ElementTypes.VIDEO]: BaseVideoElement,\n [ElementTypes.AUDIO]: BaseAudioElement,\n }\n return elementTypeMap[props.elementInfo.type] || null\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"base-element\", `base-element-${_ctx.elementInfo.id}`]),\n style: _normalizeStyle({\n zIndex: _ctx.elementIndex,\n })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(currentElementComponent.value), {\n elementInfo: _ctx.elementInfo,\n target: \"thumbnail\"\n }, null, 8, [\"elementInfo\"]))\n ], 6))\n}\n}\n\n})","\n\n","import script from \"./ThumbnailElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ThumbnailElement.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-43dcaa52\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 1,\n class: \"placeholder\"\n}\n\nimport { computed, provide } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { Slide } from '@/types/slides'\nimport { injectKeySlideScale } from '@/types/injectKey'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useSlideBackgroundStyle from '@/hooks/useSlideBackgroundStyle'\n\nimport ThumbnailElement from './ThumbnailElement.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n slide: {},\n size: {},\n visible: { type: Boolean, default: true }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { viewportRatio } = storeToRefs(useSlidesStore())\n\nconst background = computed(() => props.slide.background)\nconst { backgroundStyle } = useSlideBackgroundStyle(background)\n\nconst scale = computed(() => props.size / VIEWPORT_SIZE)\nprovide(injectKeySlideScale, scale)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"thumbnail-slide\",\n style: _normalizeStyle({\n width: _ctx.size + 'px',\n height: _ctx.size * _unref(viewportRatio) + 'px',\n })\n }, [\n (_ctx.visible)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"elements\",\n style: _normalizeStyle({\n width: _unref(VIEWPORT_SIZE) + 'px',\n height: _unref(VIEWPORT_SIZE) * _unref(viewportRatio) + 'px',\n transform: `scale(${scale.value})`,\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"background\",\n style: _normalizeStyle(_unref(backgroundStyle))\n }, null, 4),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.slide.elements, (element, index) => {\n return (_openBlock(), _createBlock(ThumbnailElement, {\n key: element.id,\n elementInfo: element,\n elementIndex: index + 1\n }, null, 8, [\"elementInfo\", \"elementIndex\"]))\n }), 128))\n ], 4))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_1, \"加载中 ...\"))\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=43dcaa52&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-43dcaa52\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5e3d7626\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"onClick\"]\n\nimport { type CSSProperties } from 'vue'\n\ninterface TabItem {\n key: string\n label: string\n color?: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Tabs',\n props: {\n value: {},\n tabs: {},\n card: { type: Boolean, default: false },\n tabsStyle: {},\n tabStyle: {},\n spaceAround: { type: Boolean, default: false },\n spaceBetween: { type: Boolean, default: false }\n },\n emits: [\"update:value\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tabs\", {\n 'card': _ctx.card,\n 'space-around': _ctx.spaceAround,\n 'space-between': _ctx.spaceBetween,\n }]),\n style: _normalizeStyle(_ctx.tabsStyle || {})\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.tabs, (tab) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tab\", { 'active': tab.key === _ctx.value }]),\n key: tab.key,\n style: _normalizeStyle({\n ...(_ctx.tabStyle || {}),\n '--color': tab.color,\n }),\n onClick: ($event: any) => (emit('update:value', tab.key))\n }, _toDisplayString(tab.label), 15, _hoisted_1))\n }), 128))\n ], 6))\n}\n}\n\n})","\n\n\n\n","import script from \"./Tabs.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Tabs.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Tabs.vue?vue&type=style&index=0&id=5e3d7626&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5e3d7626\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Button',\n props: {\n checked: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n type: { default: 'default' },\n size: { default: 'normal' },\n first: { type: Boolean, default: false },\n last: { type: Boolean, default: false }\n },\n emits: [\"click\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst handleClick = () => {\n if (props.disabled) return\n emit('click')\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"button\", {\n class: _normalizeClass([\"button\", {\n 'disabled': _ctx.disabled,\n 'checked': !_ctx.disabled && _ctx.checked,\n 'default': !_ctx.disabled && _ctx.type === 'default',\n 'primary': !_ctx.disabled && _ctx.type === 'primary',\n 'checkbox': !_ctx.disabled && _ctx.type === 'checkbox',\n 'radio': !_ctx.disabled && _ctx.type === 'radio',\n 'small': _ctx.size === 'small',\n 'first': _ctx.first,\n 'last': _ctx.last,\n }]),\n onClick: _cache[0] || (_cache[0] = ($event: any) => (handleClick()))\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./Button.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Button.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Button.vue?vue&type=style&index=0&id=52c90330&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-52c90330\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5bf3b141\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"select-wrap\"\n}\nconst _hoisted_2 = { class: \"selector\" }\nconst _hoisted_3 = { class: \"icon\" }\nconst _hoisted_4 = [\"onClick\"]\nconst _hoisted_5 = { class: \"selector\" }\nconst _hoisted_6 = { class: \"icon\" }\n\nimport { computed, onMounted, onUnmounted, ref } from 'vue'\nimport Popover from './Popover.vue'\n\ninterface SelectOption {\n label: string\n value: string | number\n disabled?: boolean\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Select',\n props: {\n value: {},\n options: {},\n disabled: { type: Boolean, default: false }\n },\n emits: [\"update:value\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst showLabel = computed(() => {\n return props.options.find(item => item.value === props.value)?.label || props.value\n})\n\nconst emit = __emit\n\nconst popoverVisible = ref(false)\nconst selectRef = ref()\nconst width = ref(0)\n\nconst updateWidth = () => {\n if (!selectRef.value) return\n width.value = selectRef.value.clientWidth\n}\nconst resizeObserver = new ResizeObserver(updateWidth)\nonMounted(() => {\n if (!selectRef.value) return\n resizeObserver.observe(selectRef.value)\n})\nonUnmounted(() => {\n if (!selectRef.value) return\n resizeObserver.unobserve(selectRef.value)\n})\n\nconst handleSelect = (option: SelectOption) => {\n if (option.disabled) return\n\n emit('update:value', option.value)\n popoverVisible.value = false\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconDown = _resolveComponent(\"IconDown\")!\n\n return (_ctx.disabled)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: \"select disabled\",\n ref_key: \"selectRef\",\n ref: selectRef\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(_ctx.value), 1),\n _createElementVNode(\"div\", _hoisted_3, [\n _renderSlot(_ctx.$slots, \"icon\", {}, () => [\n _createVNode(_component_IconDown, { size: 14 })\n ])\n ])\n ], 512)\n ]))\n : (_openBlock(), _createBlock(Popover, {\n key: 1,\n class: \"select-wrap\",\n trigger: \"click\",\n value: popoverVisible.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((popoverVisible).value = $event)),\n placement: \"bottom\",\n contentStyle: {\n padding: 0,\n boxShadow: '0 6px 16px 0 rgba(0, 0, 0, 0.08)',\n }\n }, {\n content: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: \"options\",\n style: _normalizeStyle({ width: width.value + 2 + 'px' })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.options, (option) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"option\", {\n 'disabled': option.disabled,\n 'selected': option.value === _ctx.value,\n }]),\n key: option.value,\n onClick: ($event: any) => (handleSelect(option))\n }, _toDisplayString(option.label), 11, _hoisted_4))\n }), 128))\n ], 4)\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: \"select\",\n ref_key: \"selectRef\",\n ref: selectRef\n }, [\n _createElementVNode(\"div\", _hoisted_5, _toDisplayString(showLabel.value), 1),\n _createElementVNode(\"div\", _hoisted_6, [\n _renderSlot(_ctx.$slots, \"icon\", {}, () => [\n _createVNode(_component_IconDown, { size: 14 })\n ])\n ])\n ], 512)\n ]),\n _: 3\n }, 8, [\"value\", \"contentStyle\"]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Select.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Select.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Select.vue?vue&type=style&index=0&id=5bf3b141&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5bf3b141\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, createTextVNode as _createTextVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-cc39ee16\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"link-dialog\" }\nconst _hoisted_2 = {\n key: 2,\n class: \"preview\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, \"预览:\", -1))\nconst _hoisted_4 = { class: \"btns\" }\n\nimport { computed, onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElementLink } from '@/types/slides'\nimport useLink from '@/hooks/useLink'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\nimport Tabs from '@/components/Tabs.vue'\nimport Input from '@/components/Input.vue'\nimport Button from '@/components/Button.vue'\nimport Select from '@/components/Select.vue'\n\ntype TypeKey = 'web' | 'slide'\ninterface TabItem {\n key: TypeKey\n label: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinkDialog',\n emits: [\"close\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\n\nconst { handleElement } = storeToRefs(useMainStore())\nconst { slides, currentSlide } = storeToRefs(useSlidesStore())\n\nconst type = ref('web')\nconst address = ref('')\nconst slideId = ref('')\n\nconst slideOptions = computed(() => {\n return slides.value.map((item, index) => ({\n label: `幻灯片 ${index + 1}`,\n value: item.id,\n disabled: currentSlide.value.id === item.id,\n }))\n})\n\nslideId.value = slides.value.find(item => item.id !== currentSlide.value.id)?.id || ''\n\nconst selectedSlide = computed(() => {\n if (!slideId.value) return null\n\n return slides.value.find(item => item.id === slideId.value) || null\n})\n\nconst tabs: TabItem[] = [\n { key: 'web', label: '网页链接' },\n { key: 'slide', label: '幻灯片页面' },\n]\n\nconst { setLink } = useLink()\n\nonMounted(() => {\n if (handleElement.value?.link) {\n if (handleElement.value.link.type === 'web') address.value = handleElement.value.link.target\n else if (handleElement.value.link.type === 'slide') slideId.value = handleElement.value.link.target\n\n type.value = handleElement.value.link.type\n }\n})\n\nconst save = () => {\n const link: PPTElementLink = {\n type: type.value,\n target: type.value === 'web' ? address.value : slideId.value,\n }\n if (handleElement.value) {\n const success = setLink(handleElement.value, link)\n if (success) emit('close')\n else address.value = ''\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: type.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((type).value = $event)),\n tabsStyle: { marginBottom: '20px' }\n }, null, 8, [\"value\"]),\n (type.value === 'web')\n ? (_openBlock(), _createBlock(Input, {\n key: 0,\n class: \"input\",\n value: address.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((address).value = $event)),\n placeholder: \"请输入网页链接地址\"\n }, null, 8, [\"value\"]))\n : _createCommentVNode(\"\", true),\n (type.value === 'slide')\n ? (_openBlock(), _createBlock(Select, {\n key: 1,\n class: \"input\",\n value: slideId.value,\n \"onUpdate:value\": _cache[2] || (_cache[2] = ($event: any) => ((slideId).value = $event)),\n options: slideOptions.value\n }, null, 8, [\"value\", \"options\"]))\n : _createCommentVNode(\"\", true),\n (type.value === 'slide' && selectedSlide.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n _hoisted_3,\n _createVNode(ThumbnailSlide, {\n class: \"thumbnail\",\n slide: selectedSlide.value,\n size: 500\n }, null, 8, [\"slide\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(Button, {\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('close'))),\n style: {\"margin-right\":\"10px\"}\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n type: \"primary\",\n onClick: _cache[4] || (_cache[4] = ($event: any) => (save()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./LinkDialog.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinkDialog.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LinkDialog.vue?vue&type=style&index=0&id=cc39ee16&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-cc39ee16\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, vShow as _vShow, normalizeStyle as _normalizeStyle, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx, withKeys as _withKeys, Teleport as _Teleport, createBlock as _createBlock } from \"vue\"\n\nimport { computed, nextTick, ref, watch, type CSSProperties } from 'vue'\nimport { icons } from '@/plugins/icon'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Modal',\n props: {\n visible: { type: Boolean },\n width: { default: 480 },\n closeButton: { type: Boolean, default: false },\n closeOnClickMask: { type: Boolean, default: true },\n closeOnEsc: { type: Boolean, default: true },\n contentStyle: {}\n },\n emits: [\"update:visible\", \"closed\"],\n setup(__props: any, { emit: __emit }) {\n\nconst { IconClose } = icons\n\nconst props = __props\n\nconst modalRef = ref()\n\nconst emit = __emit\n\nconst contentVisible = ref(false)\n\nconst contentStyle = computed(() => {\n return {\n width: props.width + 'px',\n ...(props.contentStyle || {})\n }\n})\n\nwatch(() => props.visible, () => {\n if (props.visible) {\n nextTick(() => modalRef.value!.focus())\n }\n})\n\nconst close = () => {\n emit('update:visible', false)\n emit('closed')\n}\n\nconst onEsc = () => {\n if (props.visible && props.closeOnEsc) close()\n}\n\nconst onClickMask = () => {\n if (props.closeOnClickMask) close()\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createVNode(_Transition, { name: \"modal-fade\" }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", {\n class: \"modal\",\n ref_key: \"modalRef\",\n ref: modalRef,\n tabindex: \"-1\",\n onKeyup: _cache[4] || (_cache[4] = _withKeys(($event: any) => (onEsc()), [\"esc\"]))\n }, [\n _createElementVNode(\"div\", {\n class: \"mask\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (onClickMask()))\n }),\n _createVNode(_Transition, {\n name: \"modal-zoom\",\n onAfterLeave: _cache[2] || (_cache[2] = ($event: any) => (contentVisible.value = false)),\n onBeforeEnter: _cache[3] || (_cache[3] = ($event: any) => (contentVisible.value = true))\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", {\n class: \"modal-content\",\n style: _normalizeStyle(contentStyle.value)\n }, [\n (_ctx.closeButton)\n ? (_openBlock(), _createElementBlock(\"span\", {\n key: 0,\n class: \"close-btn\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (close()))\n }, [\n _createVNode(_unref(IconClose))\n ]))\n : _createCommentVNode(\"\", true),\n (contentVisible.value)\n ? _renderSlot(_ctx.$slots, \"default\", { key: 1 })\n : _createCommentVNode(\"\", true)\n ], 4), [\n [_vShow, _ctx.visible]\n ])\n ]),\n _: 3\n })\n ], 544), [\n [_vShow, _ctx.visible]\n ])\n ]),\n _: 3\n })\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Modal.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Modal.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Modal.vue?vue&type=style&index=0&id=fea8edcc&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-fea8edcc\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, vShow as _vShow, withDirectives as _withDirectives, createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, withCtx as _withCtx, resolveDirective as _resolveDirective, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5294a048\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"operates\" }\nconst _hoisted_2 = {\n key: 2,\n class: \"drag-mask\"\n}\n\nimport { nextTick, onMounted, onUnmounted, provide, ref, watch, watchEffect } from 'vue'\nimport { throttle } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport type { PPTElement, PPTShapeElement } from '@/types/slides'\nimport type { AlignmentLineProps, CreateCustomShapeData } from '@/types/edit'\nimport { injectKeySlideScale } from '@/types/injectKey'\nimport { removeAllRanges } from '@/utils/selection'\nimport { KEYS } from '@/configs/hotkey'\n\nimport useViewportSize from './hooks/useViewportSize'\nimport useMouseSelection from './hooks/useMouseSelection'\nimport useDropImageOrText from './hooks/useDropImageOrText'\nimport useRotateElement from './hooks/useRotateElement'\nimport useScaleElement from './hooks/useScaleElement'\nimport useSelectElement from './hooks/useSelectElement'\nimport useDragElement from './hooks/useDragElement'\nimport useDragLineElement from './hooks/useDragLineElement'\nimport useMoveShapeKeypoint from './hooks/useMoveShapeKeypoint'\nimport useInsertFromCreateSelection from './hooks/useInsertFromCreateSelection'\n\nimport useDeleteElement from '@/hooks/useDeleteElement'\nimport useCopyAndPasteElement from '@/hooks/useCopyAndPasteElement'\nimport useSelectAllElement from '@/hooks/useSelectAllElement'\nimport useScaleCanvas from '@/hooks/useScaleCanvas'\nimport useScreening from '@/hooks/useScreening'\nimport useSlideHandler from '@/hooks/useSlideHandler'\nimport useCreateElement from '@/hooks/useCreateElement'\n\nimport EditableElement from './EditableElement.vue'\nimport MouseSelection from './MouseSelection.vue'\nimport ViewportBackground from './ViewportBackground.vue'\nimport AlignmentLine from './AlignmentLine.vue'\nimport Ruler from './Ruler.vue'\nimport ElementCreateSelection from './ElementCreateSelection.vue'\nimport ShapeCreateCanvas from './ShapeCreateCanvas.vue'\nimport MultiSelectOperate from './Operate/MultiSelectOperate.vue'\nimport Operate from './Operate/index.vue'\nimport LinkDialog from './LinkDialog.vue'\nimport Modal from '@/components/Modal.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n setup(__props) {\n\nconst mainStore = useMainStore()\nconst {\n activeElementIdList,\n activeGroupElementId,\n handleElementId,\n hiddenElementIdList,\n editorAreaFocus,\n gridLineSize,\n showRuler,\n creatingElement,\n creatingCustomShape,\n canvasScale,\n textFormatPainter,\n} = storeToRefs(mainStore)\nconst { currentSlide } = storeToRefs(useSlidesStore())\nconst { ctrlKeyState, spaceKeyState } = storeToRefs(useKeyboardStore())\n\nconst viewportRef = ref()\nconst alignmentLines = ref([])\n\nconst linkDialogVisible = ref(false)\nconst openLinkDialog = () => linkDialogVisible.value = true\n\nwatch(handleElementId, () => {\n mainStore.setActiveGroupElementId('')\n})\n\nconst elementList = ref([])\nconst setLocalElementList = () => {\n elementList.value = currentSlide.value ? JSON.parse(JSON.stringify(currentSlide.value.elements)) : []\n}\nwatchEffect(setLocalElementList)\n\nconst canvasRef = ref()\nconst { dragViewport, viewportStyles } = useViewportSize(canvasRef)\n\nuseDropImageOrText(canvasRef)\n\nconst { mouseSelection, mouseSelectionVisible, mouseSelectionQuadrant, updateMouseSelection } = useMouseSelection(elementList, viewportRef)\n\nconst { dragElement } = useDragElement(elementList, alignmentLines, canvasScale)\nconst { dragLineElement } = useDragLineElement(elementList)\nconst { selectElement } = useSelectElement(elementList, dragElement)\nconst { scaleElement, scaleMultiElement } = useScaleElement(elementList, alignmentLines, canvasScale)\nconst { rotateElement } = useRotateElement(elementList, viewportRef, canvasScale)\nconst { moveShapeKeypoint } = useMoveShapeKeypoint(elementList, canvasScale)\n\nconst { selectAllElement } = useSelectAllElement()\nconst { deleteAllElements } = useDeleteElement()\nconst { pasteElement } = useCopyAndPasteElement()\nconst { enterScreeningFromStart } = useScreening()\nconst { updateSlideIndex } = useSlideHandler()\nconst { createTextElement, createShapeElement } = useCreateElement()\n\n// 组件渲染时,如果存在元素焦点,需要清除\n// 这种情况存在于:有焦点元素的情况下进入了放映模式,再退出时,需要清除原先的焦点(因为可能已经切换了页面)\nonMounted(() => {\n if (activeElementIdList.value.length) {\n nextTick(() => mainStore.setActiveElementIdList([]))\n }\n})\n\n// 点击画布的空白区域:清空焦点元素、设置画布焦点、清除文字选区、清空格式刷状态\nconst handleClickBlankArea = (e: MouseEvent) => {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n\n if (!spaceKeyState.value) updateMouseSelection(e)\n else dragViewport(e)\n\n if (!editorAreaFocus.value) mainStore.setEditorareaFocus(true)\n if (textFormatPainter.value) mainStore.setTextFormatPainter(null)\n removeAllRanges()\n}\n\n// 双击空白处插入文本\nconst handleDblClick = (e: MouseEvent) => {\n if (activeElementIdList.value.length || creatingElement.value || creatingCustomShape.value) return\n if (!viewportRef.value) return\n\n const viewportRect = viewportRef.value.getBoundingClientRect()\n const left = (e.pageX - viewportRect.x) / canvasScale.value\n const top = (e.pageY - viewportRect.y) / canvasScale.value\n\n createTextElement({\n left,\n top,\n width: 200 / canvasScale.value, // 除以 canvasScale 是为了与点击选区创建的形式保持相同的宽度\n height: 0,\n })\n}\n\n// 画布注销时清空格式刷状态\nonUnmounted(() => {\n if (textFormatPainter.value) mainStore.setTextFormatPainter(null)\n})\n\n// 移除画布编辑区域焦点\nconst removeEditorAreaFocus = () => {\n if (editorAreaFocus.value) mainStore.setEditorareaFocus(false)\n}\n\n// 滚动鼠标\nconst { scaleCanvas } = useScaleCanvas()\nconst throttleScaleCanvas = throttle(scaleCanvas, 100, { leading: true, trailing: false })\nconst throttleUpdateSlideIndex = throttle(updateSlideIndex, 300, { leading: true, trailing: false })\n\nconst handleMousewheelCanvas = (e: WheelEvent) => {\n e.preventDefault()\n\n // 按住Ctrl键时:缩放画布\n if (ctrlKeyState.value) {\n if (e.deltaY > 0) throttleScaleCanvas('-')\n else if (e.deltaY < 0) throttleScaleCanvas('+')\n }\n // 上下翻页\n else {\n if (e.deltaY > 0) throttleUpdateSlideIndex(KEYS.DOWN)\n else if (e.deltaY < 0) throttleUpdateSlideIndex(KEYS.UP)\n }\n}\n\n// 开关标尺\nconst toggleRuler = () => {\n mainStore.setRulerState(!showRuler.value)\n}\n\n// 在鼠标绘制的范围插入元素\nconst { insertElementFromCreateSelection, formatCreateSelection } = useInsertFromCreateSelection(viewportRef)\n\n// 插入自定义任意多边形\nconst insertCustomShape = (data: CreateCustomShapeData) => {\n const {\n start,\n end,\n path,\n viewBox,\n } = data\n const position = formatCreateSelection({ start, end })\n if (position) {\n const supplement: Partial = {}\n if (data.fill) supplement.fill = data.fill\n if (data.outline) supplement.outline = data.outline\n createShapeElement(position, { path, viewBox }, supplement)\n }\n\n mainStore.setCreatingCustomShapeState(false)\n}\n\nconst contextmenus = (): ContextmenuItem[] => {\n return [\n {\n text: '粘贴',\n subText: 'Ctrl + V',\n handler: pasteElement,\n },\n {\n text: '全选',\n subText: 'Ctrl + A',\n handler: selectAllElement,\n },\n {\n text: '标尺',\n subText: showRuler.value ? '√' : '',\n handler: toggleRuler,\n },\n {\n text: '网格线',\n handler: () => mainStore.setGridLineSize(gridLineSize.value ? 0 : 50),\n children: [\n {\n text: '无',\n subText: gridLineSize.value === 0 ? '√' : '',\n handler: () => mainStore.setGridLineSize(0),\n },\n {\n text: '小',\n subText: gridLineSize.value === 25 ? '√' : '',\n handler: () => mainStore.setGridLineSize(25),\n },\n {\n text: '中',\n subText: gridLineSize.value === 50 ? '√' : '',\n handler: () => mainStore.setGridLineSize(50),\n },\n {\n text: '大',\n subText: gridLineSize.value === 100 ? '√' : '',\n handler: () => mainStore.setGridLineSize(100),\n },\n ],\n },\n {\n text: '重置当前页',\n handler: deleteAllElements,\n },\n { divider: true },\n {\n text: '幻灯片放映',\n subText: 'F5',\n handler: enterScreeningFromStart,\n },\n ]\n}\n\nprovide(injectKeySlideScale, canvasScale)\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n const _directive_click_outside = _resolveDirective(\"click-outside\")!\n\n return _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"canvas\",\n ref_key: \"canvasRef\",\n ref: canvasRef,\n onWheel: _cache[4] || (_cache[4] = $event => handleMousewheelCanvas($event)),\n onMousedown: _cache[5] || (_cache[5] = $event => handleClickBlankArea($event)),\n onDblclick: _cache[6] || (_cache[6] = $event => handleDblClick($event))\n }, [\n (_unref(creatingElement))\n ? (_openBlock(), _createBlock(ElementCreateSelection, {\n key: 0,\n onCreated: _cache[0] || (_cache[0] = data => _unref(insertElementFromCreateSelection)(data))\n }))\n : _createCommentVNode(\"\", true),\n (_unref(creatingCustomShape))\n ? (_openBlock(), _createBlock(ShapeCreateCanvas, {\n key: 1,\n onCreated: _cache[1] || (_cache[1] = data => insertCustomShape(data))\n }))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", {\n class: \"viewport-wrapper\",\n style: _normalizeStyle({\n width: _unref(viewportStyles).width * _unref(canvasScale) + 'px',\n height: _unref(viewportStyles).height * _unref(canvasScale) + 'px',\n left: _unref(viewportStyles).left + 'px',\n top: _unref(viewportStyles).top + 'px',\n })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(alignmentLines.value, (line, index) => {\n return (_openBlock(), _createBlock(AlignmentLine, {\n key: index,\n type: line.type,\n axis: line.axis,\n length: line.length,\n canvasScale: _unref(canvasScale)\n }, null, 8, [\"type\", \"axis\", \"length\", \"canvasScale\"]))\n }), 128)),\n (_unref(activeElementIdList).length > 1)\n ? (_openBlock(), _createBlock(MultiSelectOperate, {\n key: 0,\n elementList: elementList.value,\n scaleMultiElement: _unref(scaleMultiElement)\n }, null, 8, [\"elementList\", \"scaleMultiElement\"]))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element) => {\n return _withDirectives((_openBlock(), _createBlock(Operate, {\n key: element.id,\n elementInfo: element,\n isSelected: _unref(activeElementIdList).includes(element.id),\n isActive: _unref(handleElementId) === element.id,\n isActiveGroupElement: _unref(activeGroupElementId) === element.id,\n isMultiSelect: _unref(activeElementIdList).length > 1,\n rotateElement: _unref(rotateElement),\n scaleElement: _unref(scaleElement),\n openLinkDialog: openLinkDialog,\n dragLineElement: _unref(dragLineElement),\n moveShapeKeypoint: _unref(moveShapeKeypoint)\n }, null, 8, [\"elementInfo\", \"isSelected\", \"isActive\", \"isActiveGroupElement\", \"isMultiSelect\", \"rotateElement\", \"scaleElement\", \"dragLineElement\", \"moveShapeKeypoint\"])), [\n [_vShow, !_unref(hiddenElementIdList).includes(element.id)]\n ])\n }), 128)),\n _createVNode(ViewportBackground)\n ]),\n _createElementVNode(\"div\", {\n class: \"viewport\",\n ref_key: \"viewportRef\",\n ref: viewportRef,\n style: _normalizeStyle({ transform: `scale(${_unref(canvasScale)})` })\n }, [\n (_unref(mouseSelectionVisible))\n ? (_openBlock(), _createBlock(MouseSelection, {\n key: 0,\n top: _unref(mouseSelection).top,\n left: _unref(mouseSelection).left,\n width: _unref(mouseSelection).width,\n height: _unref(mouseSelection).height,\n quadrant: _unref(mouseSelectionQuadrant)\n }, null, 8, [\"top\", \"left\", \"width\", \"height\", \"quadrant\"]))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element, index) => {\n return _withDirectives((_openBlock(), _createBlock(EditableElement, {\n key: element.id,\n elementInfo: element,\n elementIndex: index + 1,\n isMultiSelect: _unref(activeElementIdList).length > 1,\n selectElement: _unref(selectElement),\n openLinkDialog: openLinkDialog\n }, null, 8, [\"elementInfo\", \"elementIndex\", \"isMultiSelect\", \"selectElement\"])), [\n [_vShow, !_unref(hiddenElementIdList).includes(element.id)]\n ])\n }), 128))\n ], 4)\n ], 4),\n (_unref(spaceKeyState))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : _createCommentVNode(\"\", true),\n (_unref(showRuler))\n ? (_openBlock(), _createBlock(Ruler, {\n key: 3,\n viewportStyles: _unref(viewportStyles)\n }, null, 8, [\"viewportStyles\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(Modal, {\n visible: linkDialogVisible.value,\n \"onUpdate:visible\": _cache[3] || (_cache[3] = ($event: any) => ((linkDialogVisible).value = $event)),\n width: 540\n }, {\n default: _withCtx(() => [\n _createVNode(LinkDialog, {\n onClose: _cache[2] || (_cache[2] = ($event: any) => (linkDialogVisible.value = false))\n })\n ]),\n _: 1\n }, 8, [\"visible\"])\n ], 32)), [\n [_directive_contextmenu, contextmenus],\n [_directive_click_outside, removeEditorAreaFocus]\n ])\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=5294a048&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5294a048\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-8603ad34\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"shape-item-thumbnail\" }\nconst _hoisted_2 = { class: \"shape-content\" }\nconst _hoisted_3 = {\n overflow: \"visible\",\n width: \"18\",\n height: \"18\"\n}\nconst _hoisted_4 = [\"transform\"]\nconst _hoisted_5 = [\"fill\", \"stroke\", \"d\"]\n\nimport type { ShapePoolItem } from '@/configs/shapes'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ShapeItemThumbnail',\n props: {\n shape: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_3, [\n _createElementVNode(\"g\", {\n transform: `scale(${18 / _ctx.shape.viewBox[0]}, ${18 / _ctx.shape.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n class: _normalizeClass([\"shape-path\", { 'outlined': _ctx.shape.outlined }]),\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: _ctx.shape.outlined ? '#999' : 'transparent',\n stroke: _ctx.shape.outlined ? 'transparent' : '#999',\n \"stroke-width\": \"2\",\n d: _ctx.shape.path\n }, null, 10, _hoisted_5)\n ], 8, _hoisted_4)\n ]))\n ])\n ]))\n}\n}\n\n})","import script from \"./ShapeItemThumbnail.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapeItemThumbnail.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapeItemThumbnail.vue?vue&type=style&index=0&id=8603ad34&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8603ad34\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-8b994b42\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"shape-pool\" }\nconst _hoisted_2 = { class: \"category-name\" }\nconst _hoisted_3 = { class: \"shape-list\" }\n\nimport { SHAPE_LIST, type ShapePoolItem } from '@/configs/shapes'\nimport ShapeItemThumbnail from './ShapeItemThumbnail.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ShapePool',\n emits: [\"select\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\n\nconst selectShape = (shape: ShapePoolItem) => {\n emit('select', shape)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(SHAPE_LIST), (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"category\",\n key: item.type\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(item.type), 1),\n _createElementVNode(\"div\", _hoisted_3, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.children, (shape, index) => {\n return (_openBlock(), _createBlock(ShapeItemThumbnail, {\n class: \"shape-item\",\n key: index,\n shape: shape,\n onClick: ($event: any) => (selectShape(shape))\n }, null, 8, [\"shape\", \"onClick\"]))\n }), 128))\n ])\n ]))\n }), 128))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ShapePool.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapePool.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapePool.vue?vue&type=style&index=0&id=8b994b42&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8b994b42\"]])\n\nexport default __exports__","import type { LinePoint } from '@/types/slides'\n\n\nexport interface LinePoolItem {\n path: string\n style: 'solid' | 'dashed'\n points: [LinePoint, LinePoint]\n isBroken?: boolean\n isCurve?: boolean\n isCubic?: boolean\n}\n\ninterface PresetLine {\n type: string\n children: LinePoolItem[]\n}\n\nexport const LINE_LIST: PresetLine[] = [\n {\n type: '直线',\n children: [\n { path: 'M 0 0 L 20 20', style: 'solid', points: ['', ''] },\n { path: 'M 0 0 L 20 20', style: 'dashed', points: ['', ''] },\n { path: 'M 0 0 L 20 20', style: 'solid', points: ['', 'arrow'] },\n { path: 'M 0 0 L 20 20', style: 'dashed', points: ['', 'arrow'] },\n { path: 'M 0 0 L 20 20', style: 'solid', points: ['', 'dot'] },\n ],\n },\n {\n type: '折线、曲线',\n children: [\n { path: 'M 0 0 L 0 20 L 20 20', style: 'solid', points: ['', 'arrow'], isBroken: true },\n { path: 'M 0 0 Q 0 20 20 20', style: 'solid', points: ['', 'arrow'], isCurve: true },\n { path: 'M 0 0 C 20 0 0 20 20 20', style: 'solid', points: ['', 'arrow'], isCubic: true },\n ],\n },\n]","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-554824b6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"line-pool\" }\nconst _hoisted_2 = { class: \"category-name\" }\nconst _hoisted_3 = { class: \"line-list\" }\nconst _hoisted_4 = [\"onClick\"]\nconst _hoisted_5 = {\n overflow: \"visible\",\n width: \"20\",\n height: \"20\"\n}\nconst _hoisted_6 = [\"d\", \"stroke-dasharray\", \"marker-start\", \"marker-end\"]\n\nimport { LINE_LIST, type LinePoolItem } from '@/configs/lines'\n\nimport LinePointMarker from '@/views/components/element/LineElement/LinePointMarker.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinePool',\n emits: [\"select\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\n\nconst selectLine = (line: LinePoolItem) => {\n emit('select', line)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(LINE_LIST), (item, i) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"category\",\n key: item.type\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(item.type), 1),\n _createElementVNode(\"div\", _hoisted_3, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.children, (line, j) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"line-item\",\n key: j\n }, [\n _createElementVNode(\"div\", {\n class: \"line-content\",\n onClick: ($event: any) => (selectLine(line))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_5, [\n _createElementVNode(\"defs\", null, [\n (line.points[0])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 0,\n class: \"line-marker\",\n id: `preset-line-${i}-${j}`,\n position: \"start\",\n type: line.points[0],\n color: \"currentColor\",\n baseSize: 2\n }, null, 8, [\"id\", \"type\"]))\n : _createCommentVNode(\"\", true),\n (line.points[1])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 1,\n class: \"line-marker\",\n id: `preset-line-${i}-${j}`,\n position: \"end\",\n type: line.points[1],\n color: \"currentColor\",\n baseSize: 2\n }, null, 8, [\"id\", \"type\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"path\", {\n class: \"line-path\",\n d: line.path,\n stroke: \"currentColor\",\n fill: \"none\",\n \"stroke-width\": \"2\",\n \"stroke-dasharray\": line.style === 'solid' ? '0, 0' : '4, 1',\n \"marker-start\": line.points[0] ? `url(#${`preset-line-${i}-${j}`}-${line.points[0]}-start)` : '',\n \"marker-end\": line.points[1] ? `url(#${`preset-line-${i}-${j}`}-${line.points[1]}-end)` : ''\n }, null, 8, _hoisted_6)\n ]))\n ], 8, _hoisted_4)\n ]))\n }), 128))\n ])\n ]))\n }), 128))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./LinePool.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinePool.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LinePool.vue?vue&type=style&index=0&id=554824b6&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-554824b6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-398f5699\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"chart-pool\" }\nconst _hoisted_2 = [\"onClick\"]\n\nimport type { PresetChartType } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ChartPool',\n emits: [\"select\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\n\nconst chartList: PresetChartType[] = ['bar', 'horizontalBar', 'line', 'area', 'scatter', 'pie', 'ring']\n\nconst selectChart = (chart: PresetChartType) => {\n emit('select', chart)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconChartLine = _resolveComponent(\"IconChartLine\")!\n const _component_IconChartHistogram = _resolveComponent(\"IconChartHistogram\")!\n const _component_IconChartPie = _resolveComponent(\"IconChartPie\")!\n const _component_IconChartHistogramOne = _resolveComponent(\"IconChartHistogramOne\")!\n const _component_IconChartLineArea = _resolveComponent(\"IconChartLineArea\")!\n const _component_IconChartRing = _resolveComponent(\"IconChartRing\")!\n const _component_IconChartScatter = _resolveComponent(\"IconChartScatter\")!\n\n return (_openBlock(), _createElementBlock(\"ul\", _hoisted_1, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(chartList, (chart, index) => {\n return _createElementVNode(\"li\", {\n class: \"chart-item\",\n key: index\n }, [\n _createElementVNode(\"div\", {\n class: \"chart-content\",\n onClick: ($event: any) => (selectChart(chart))\n }, [\n (chart === 'line')\n ? (_openBlock(), _createBlock(_component_IconChartLine, {\n key: 0,\n size: \"24\"\n }))\n : (chart === 'bar')\n ? (_openBlock(), _createBlock(_component_IconChartHistogram, {\n key: 1,\n size: \"24\"\n }))\n : (chart === 'pie')\n ? (_openBlock(), _createBlock(_component_IconChartPie, {\n key: 2,\n size: \"24\"\n }))\n : (chart === 'horizontalBar')\n ? (_openBlock(), _createBlock(_component_IconChartHistogramOne, {\n key: 3,\n size: \"24\"\n }))\n : (chart === 'area')\n ? (_openBlock(), _createBlock(_component_IconChartLineArea, {\n key: 4,\n size: \"24\"\n }))\n : (chart === 'ring')\n ? (_openBlock(), _createBlock(_component_IconChartRing, {\n key: 5,\n size: \"24\"\n }))\n : (chart === 'scatter')\n ? (_openBlock(), _createBlock(_component_IconChartScatter, {\n key: 6,\n size: \"24\"\n }))\n : _createCommentVNode(\"\", true)\n ], 8, _hoisted_2)\n ])\n }), 64))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ChartPool.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ChartPool.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ChartPool.vue?vue&type=style&index=0&id=398f5699&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-398f5699\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, vModelText as _vModelText, withKeys as _withKeys, withDirectives as _withDirectives, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-268948c2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"prefix\" }\nconst _hoisted_2 = { class: \"input-wrap\" }\nconst _hoisted_3 = [\"disabled\", \"placeholder\"]\nconst _hoisted_4 = { class: \"handlers\" }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n fill: \"currentColor\",\n width: \"1em\",\n height: \"1em\",\n viewBox: \"64 64 896 896\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", { d: \"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z\" })\n], -1))\nconst _hoisted_6 = [\n _hoisted_5\n]\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n fill: \"currentColor\",\n width: \"1em\",\n height: \"1em\",\n viewBox: \"64 64 896 896\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", { d: \"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z\" })\n], -1))\nconst _hoisted_8 = [\n _hoisted_7\n]\nconst _hoisted_9 = { class: \"suffix\" }\n\nimport { ref, watch } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'NumberInput',\n props: {\n value: {},\n disabled: { type: Boolean, default: false },\n placeholder: { default: '' },\n min: { default: 0 },\n max: { default: Infinity },\n step: { default: 1 }\n },\n emits: [\"update:value\", \"input\", \"change\", \"blur\", \"focus\", \"enter\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst number = ref(0)\nconst focused = ref(false)\n\nwatch(() => props.value, () => {\n if (props.value !== number.value) {\n number.value = props.value\n }\n}, {\n immediate: true,\n})\n\nwatch(number, () => {\n let value = +number.value\n if (isNaN(value)) value = props.min\n else if (value > props.max) value = props.max\n else if (value < props.min) value = props.min\n\n number.value = value\n emit('update:value', number.value)\n})\n\nconst handleBlur = (e: Event) => {\n focused.value = false\n emit('blur', e)\n}\nconst handleFocus = (e: Event) => {\n focused.value = true\n emit('focus', e)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"number-input\", {\n 'disabled': _ctx.disabled,\n 'focused': focused.value,\n }])\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prefix\")\n ]),\n _createElementVNode(\"div\", _hoisted_2, [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"text\",\n disabled: _ctx.disabled,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((number).value = $event)),\n placeholder: _ctx.placeholder,\n onInput: _cache[1] || (_cache[1] = $event => emit('input', $event)),\n onFocus: _cache[2] || (_cache[2] = $event => handleFocus($event)),\n onBlur: _cache[3] || (_cache[3] = $event => handleBlur($event)),\n onChange: _cache[4] || (_cache[4] = $event => emit('change', $event)),\n onKeydown: _cache[5] || (_cache[5] = _withKeys($event => emit('enter', $event), [\"enter\"]))\n }, null, 40, _hoisted_3), [\n [_vModelText, number.value]\n ]),\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"span\", {\n class: \"handler\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (number.value += _ctx.step))\n }, _hoisted_6),\n _createElementVNode(\"span\", {\n class: \"handler\",\n onClick: _cache[7] || (_cache[7] = ($event: any) => (number.value -= _ctx.step))\n }, _hoisted_8)\n ])\n ]),\n _createElementVNode(\"span\", _hoisted_9, [\n _renderSlot(_ctx.$slots, \"suffix\")\n ])\n ], 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./NumberInput.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./NumberInput.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./NumberInput.vue?vue&type=style&index=0&id=268948c2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-268948c2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-372c6730\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"table-generator\" }\nconst _hoisted_2 = { class: \"title\" }\nconst _hoisted_3 = { class: \"lef\" }\nconst _hoisted_4 = [\"onMouseenter\"]\nconst _hoisted_5 = {\n key: 1,\n class: \"custom\"\n}\nconst _hoisted_6 = { class: \"row\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", {\n class: \"label\",\n style: {\"width\":\"25%\"}\n}, \"行数:\", -1))\nconst _hoisted_8 = { class: \"row\" }\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", {\n class: \"label\",\n style: {\"width\":\"25%\"}\n}, \"列数:\", -1))\nconst _hoisted_10 = { class: \"btns\" }\n\nimport { ref } from 'vue'\nimport message from '@/utils/message'\nimport Button from '@/components/Button.vue'\nimport NumberInput from '@/components/NumberInput.vue'\n\ninterface InsertData {\n row: number\n col: number\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'TableGenerator',\n emits: [\"insert\", \"close\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\n\nconst endCell = ref([])\nconst customRow = ref(3)\nconst customCol = ref(3)\nconst isCustom = ref(false)\n\nconst handleClickTable = () => {\n if (!endCell.value.length) return\n const [row, col] = endCell.value\n emit('insert', { row, col })\n}\n\nconst insertCustomTable = () => {\n if (customRow.value < 1 || customRow.value > 20) return message.warning('行数/列数必须在0~20之间!')\n if (customCol.value < 1 || customCol.value > 20) return message.warning('行数/列数必须在0~20之间!')\n emit('insert', { row: customRow.value, col: customCol.value })\n isCustom.value = false\n}\n\nconst close = () => {\n emit('close')\n isCustom.value = false\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, \"表格 \" + _toDisplayString(endCell.value.length ? `${endCell.value[0]} x ${endCell.value[1]}` : ''), 1),\n _createElementVNode(\"div\", {\n class: \"right\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (isCustom.value = !isCustom.value))\n }, _toDisplayString(isCustom.value ? '返回' : '自定义'), 1)\n ]),\n (!isCustom.value)\n ? (_openBlock(), _createElementBlock(\"table\", {\n key: 0,\n onMouseleave: _cache[1] || (_cache[1] = ($event: any) => (endCell.value = [])),\n onClick: _cache[2] || (_cache[2] = ($event: any) => (handleClickTable()))\n }, [\n _createElementVNode(\"tbody\", null, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(10, (row) => {\n return _createElementVNode(\"tr\", { key: row }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(10, (col) => {\n return _createElementVNode(\"td\", {\n onMouseenter: ($event: any) => (endCell.value = [row, col]),\n key: col\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"cell\", { 'active': endCell.value.length && row <= endCell.value[0] && col <= endCell.value[1] }])\n }, null, 2)\n ], 40, _hoisted_4)\n }), 64))\n ])\n }), 64))\n ])\n ], 32))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", _hoisted_6, [\n _hoisted_7,\n _createVNode(NumberInput, {\n min: 1,\n max: 20,\n value: customRow.value,\n \"onUpdate:value\": _cache[3] || (_cache[3] = ($event: any) => ((customRow).value = $event)),\n style: {\"width\":\"75%\"}\n }, null, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _hoisted_9,\n _createVNode(NumberInput, {\n min: 1,\n max: 20,\n value: customCol.value,\n \"onUpdate:value\": _cache[4] || (_cache[4] = ($event: any) => ((customCol).value = $event)),\n style: {\"width\":\"75%\"}\n }, null, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_10, [\n _createVNode(Button, {\n class: \"btn\",\n onClick: _cache[5] || (_cache[5] = ($event: any) => (close()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n class: \"btn\",\n type: \"primary\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (insertCustomTable()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ]))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./TableGenerator.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TableGenerator.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./TableGenerator.vue?vue&type=style&index=0&id=372c6730&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-372c6730\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createElementVNode as _createElementVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-35a1214c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"media-input\" }\nconst _hoisted_2 = { class: \"btns\" }\nconst _hoisted_3 = { class: \"btns\" }\n\nimport { ref } from 'vue'\nimport message from '@/utils/message'\nimport Tabs from '@/components/Tabs.vue'\nimport Input from '@/components/Input.vue'\nimport Button from '@/components/Button.vue'\n\ntype TypeKey = 'video' | 'audio'\ninterface TabItem {\n key: TypeKey\n label: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MediaInput',\n emits: [\"insertVideo\", \"insertAudio\", \"close\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\n\nconst type = ref('video')\n\nconst videoSrc = ref('https://mazwai.com/videvo_files/video/free/2019-01/small_watermarked/181004_04_Dolphins-Whale_06_preview.webm')\nconst audioSrc = ref('https://freesound.org/data/previews/614/614107_11861866-lq.mp3')\n\nconst tabs: TabItem[] = [\n { key: 'video', label: '视频' },\n { key: 'audio', label: '音频' },\n]\n\nconst insertVideo = () => {\n if (!videoSrc.value) return message.error('请先输入正确的视频地址')\n emit('insertVideo', videoSrc.value)\n}\n\nconst insertAudio = () => {\n if (!audioSrc.value) return message.error('请先输入正确的音频地址')\n emit('insertAudio', audioSrc.value)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: type.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((type).value = $event)),\n tabsStyle: { marginBottom: '15px' }\n }, null, 8, [\"value\"]),\n (type.value === 'video')\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n _createVNode(Input, {\n value: videoSrc.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((videoSrc).value = $event)),\n placeholder: \"请输入视频地址,e.g. https://xxx.mp4\"\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Button, {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (emit('close'))),\n style: {\"margin-right\":\"10px\"}\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n type: \"primary\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (insertVideo()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ], 64))\n : _createCommentVNode(\"\", true),\n (type.value === 'audio')\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n _createVNode(Input, {\n value: audioSrc.value,\n \"onUpdate:value\": _cache[4] || (_cache[4] = ($event: any) => ((audioSrc).value = $event)),\n placeholder: \"请输入音频地址,e.g. https://xxx.mp3\"\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(Button, {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (emit('close'))),\n style: {\"margin-right\":\"10px\"}\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n type: \"primary\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (insertAudio()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./MediaInput.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MediaInput.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MediaInput.vue?vue&type=style&index=0&id=35a1214c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-35a1214c\"]])\n\nexport default __exports__","import { hfmath, CONFIG as hfmathConfig } from 'hfmath'\n\nhfmathConfig.SUB_SUP_SCALE = 0.5\n\nexport { hfmath }","export const FORMULA_LIST = [\n {\n label: '高斯公式',\n latex: `\\\\int\\\\int\\\\int _ { \\\\Omega } \\\\left( \\\\frac { \\\\partial {P} } { \\\\partial {x} } + \\\\frac { \\\\partial {Q} } { \\\\partial {y} } + \\\\frac { \\\\partial {R} }{ \\\\partial {z} } \\\\right) \\\\mathrm { d } V = \\\\oint _ { \\\\partial \\\\Omega } ( P \\\\cos \\\\alpha + Q \\\\cos \\\\beta + R \\\\cos \\\\gamma ) \\\\mathrm{ d} S`\n },\n {\n label: '傅里叶级数',\n latex: `f(x) = \\\\frac {a_0} 2 + \\\\sum_{n = 1}^\\\\infty {({a_n}\\\\cos {nx} + {b_n}\\\\sin {nx})}`,\n },\n {\n label: '泰勒展开式',\n latex: `e ^ { x } = 1 + \\\\frac { x } { 1 ! } + \\\\frac { x ^ { 2 } } { 2 ! } + \\\\frac { x ^ { 3 } } { 3 ! } + ... , \\\\quad - \\\\infty < x < \\\\infty`,\n },\n {\n label: '定积分',\n latex: `\\\\lim_ { n \\\\rightarrow + \\\\infty } \\\\sum _ { i = 1 } ^ { n } f \\\\left[ a + \\\\frac { i } { n } ( b - a ) \\\\right] \\\\frac { b - a } { n } = \\\\int _ { a } ^ { b } f ( x ) dx`,\n },\n {\n label: '三角恒等式1',\n latex: `\\\\sin \\\\alpha \\\\pm \\\\sin \\\\beta = 2 \\\\sin \\\\frac { 1 } { 2 } ( \\\\alpha \\\\pm \\\\beta ) \\\\cos \\\\frac { 1 } { 2 } ( \\\\alpha \\\\mp \\\\beta )`,\n },\n {\n label: '三角恒等式2',\n latex: `\\\\cos \\\\alpha + \\\\cos \\\\beta = 2 \\\\cos \\\\frac { 1 } { 2 } ( \\\\alpha + \\\\beta ) \\\\cos \\\\frac { 1 } { 2 } ( \\\\alpha - \\\\beta )`,\n },\n {\n label: '和的展开式',\n latex: `( 1 + x ) ^ { n } = 1 + \\\\frac { n x } { 1 ! } + \\\\frac { n ( n - 1 ) x ^ { 2 } } { 2 ! } + ...`,\n },\n {\n label: '欧拉公式',\n latex: ` e^{ix} = \\\\cos {x} + i\\\\sin {x}`,\n },\n {\n label: '贝努利方程',\n latex: `\\\\frac {dy} {dx} + P(x)y = Q(x) y^n ({n} \\\\not= {0,1})`,\n },\n {\n label: '全微分方程',\n latex: `du(x,y) = P(x,y)dx + Q(x,y)dy = 0`,\n },\n {\n label: '非齐次方程',\n latex: `y = (\\\\int Q(x) e^{\\\\int {P(x)dx}}dx + C)e^{-\\\\int {P(x)dx}}`,\n },\n {\n label: '柯西中值定理',\n latex: `\\\\frac{{f(b) - f(a)}}{{F(b) - F(a)}} = \\\\frac{{f'(\\\\xi )}}{{F'(\\\\xi )}}`,\n },\n {\n label: '拉格朗日中值定理',\n latex: `f(b) - f(a) = f'(\\\\xi )(b - a)`,\n },\n {\n label: '导数公式',\n latex: `(\\\\arcsin x)' = \\\\frac{1}{{\\\\sqrt {1 - x^2} }}`,\n },\n {\n label: '三角函数积分',\n latex: `\\\\int {tgxdx = - \\\\ln \\\\left| {\\\\cos x} \\\\right| + C}`,\n },\n {\n label: '二次曲面',\n latex: `\\\\frac{{{x^2}}}{{{a^2}}} + \\\\frac{{{y^2}}}{{{b^2}}} - \\\\frac{{{z^2}}}{{{c^2}}} = 1`,\n },\n {\n label: '二阶微分',\n latex: `\\\\frac {{d^2}y} {dx^2} + P(x) \\\\frac {dy} {dx} + Q(x)y = f(x)`,\n },\n {\n label: '方向导数',\n latex: `\\\\frac{{\\\\partial f}}{{\\\\partial l}} = \\\\frac{{\\\\partial f}}{{\\\\partial x}}\\\\cos \\\\phi + \\\\frac{{\\\\partial f}}{{\\\\partial y}}\\\\sin \\\\phi`,\n },\n]\n\nexport const SYMBOL_LIST = [\n {\n type: 'operators',\n label: '数学',\n children: [\n { latex: '\\\\cdot' },\n { latex: '\\\\pm' },\n { latex: '\\\\mp' },\n { latex: '+' },\n { latex: '-' },\n { latex: '\\\\times' },\n { latex: '\\\\div' },\n { latex: '<' },\n { latex: '>' },\n { latex: '=' },\n { latex: '\\\\neq\\\\ne' },\n { latex: '\\\\leqq' },\n { latex: '\\\\geqq' },\n { latex: '\\\\leq' },\n { latex: '\\\\geq' },\n { latex: '\\\\propto' },\n { latex: '\\\\sim' },\n { latex: '\\\\equiv' },\n { latex: '\\\\dagger' },\n { latex: '\\\\ddagger' },\n { latex: '\\\\ell' },\n { latex: '\\\\#' },\n { latex: '\\\\$' },\n { latex: '\\\\&' },\n { latex: '\\\\%' },\n { latex: '\\\\langle\\\\rangle' },\n { latex: '()' },\n { latex: '[]' },\n { latex: '\\\\{\\\\}' },\n { latex: '||' },\n { latex: '\\\\|' },\n { latex: '\\\\exists' },\n { latex: '\\\\in' },\n { latex: '\\\\subset' },\n { latex: '\\\\supset' },\n { latex: '\\\\cup' },\n { latex: '\\\\cap' },\n { latex: '\\\\infty' },\n { latex: '\\\\partial' },\n { latex: '\\\\nabla' },\n { latex: '\\\\aleph' },\n { latex: '\\\\wp' },\n { latex: '\\\\therefore' },\n { latex: '\\\\mid' },\n { latex: '\\\\sum' },\n { latex: '\\\\prod' },\n { latex: '\\\\bigoplus' },\n { latex: '\\\\bigodot' },\n { latex: '\\\\int' },\n { latex: '\\\\oint' },\n { latex: '\\\\oplus' },\n { latex: '\\\\odot' },\n { latex: '\\\\perp' },\n { latex: '\\\\angle' },\n { latex: '\\\\triangle' },\n { latex: '\\\\Box' },\n { latex: '\\\\rightarrow' },\n { latex: '\\\\to' },\n { latex: '\\\\leftarrow' },\n { latex: '\\\\gets' },\n { latex: '\\\\circ' },\n { latex: '\\\\bigcirc' },\n { latex: '\\\\bullet' },\n { latex: '\\\\star' },\n { latex: '\\\\diamond' },\n { latex: '\\\\ast' },\n { latex: ',' },\n { latex: '.' },\n { latex: ';' },\n { latex: '!' },\n ],\n },\n {\n type: 'group',\n label: '组合',\n children: [\n { latex: '\\\\frac{a}{b}' },\n { latex: '\\\\frac{dx}{dx}' },\n { latex: '\\\\frac{\\\\partial a}{\\\\partial b}' },\n { latex: '\\\\sqrt{x}' },\n { latex: '\\\\sqrt[n]{x}' },\n { latex: 'x^{n}' },\n { latex: 'x_{n}' },\n { latex: 'x_a^b' },\n { latex: '\\\\int_{a}^{b}' },\n { latex: '\\\\oint_a^b' },\n { latex: '\\\\lim_{a \\\\rightarrow b}' },\n { latex: '\\\\prod_a^b' },\n { latex: '\\\\sum_a^b' },\n { latex: '\\\\left(\\\\begin{array}a \\\\\\\\ b\\\\end{array}\\\\right)' },\n { latex: '\\\\begin{bmatrix}a & b \\\\\\\\ c & d \\\\end{bmatrix}' },\n { latex: '\\\\begin{cases}a & x = 0 \\\\\\\\ b & x > 0\\\\end{cases}' },\n { latex: '\\\\hat{a}' },\n { latex: '\\\\breve{a}' },\n { latex: '\\\\acute{a}' },\n { latex: '\\\\grave{a}' },\n { latex: '\\\\tilde{a}' },\n { latex: '\\\\bar{a}' },\n { latex: '\\\\vec{a}' },\n { latex: '\\\\underline{a}' },\n { latex: '\\\\overline{a}' },\n { latex: '\\\\widehat{ab}' },\n { latex: '\\\\overleftarrow{ab}' },\n { latex: '\\\\overrightarrow{ab}' },\n ],\n },\n {\n type: 'verbatim',\n label: '函数',\n children: [\n { latex: '\\\\log' },\n { latex: '\\\\ln' },\n { latex: '\\\\exp' },\n { latex: '\\\\mod' },\n { latex: '\\\\lim' },\n { latex: '\\\\sin' },\n { latex: '\\\\cos' },\n { latex: '\\\\tan' },\n { latex: '\\\\csc' },\n { latex: '\\\\sec' },\n { latex: '\\\\cot' },\n { latex: '\\\\sinh' },\n { latex: '\\\\cosh' },\n { latex: '\\\\tanh' },\n { latex: '\\\\csch' },\n { latex: '\\\\sech' },\n { latex: '\\\\coth' },\n { latex: '\\\\arcsin' },\n { latex: '\\\\arccos' },\n { latex: '\\\\arctan' },\n { latex: '\\\\arccsc' },\n { latex: '\\\\arcsec' },\n { latex: '\\\\arccot' },\n ],\n },\n {\n type: 'greek',\n label: '希腊字母',\n children: [\n { latex: '\\\\alpha' },\n { latex: '\\\\beta' },\n { latex: '\\\\gamma' },\n { latex: '\\\\delta' },\n { latex: '\\\\varepsilon' },\n { latex: '\\\\zeta' },\n { latex: '\\\\eta' },\n { latex: '\\\\vartheta' },\n { latex: '\\\\iota' },\n { latex: '\\\\kappa' },\n { latex: '\\\\lambda' },\n { latex: '\\\\mu' },\n { latex: '\\\\nu' },\n { latex: '\\\\xi' },\n { latex: '\\\\omicron' },\n { latex: '\\\\pi' },\n { latex: '\\\\rho' },\n { latex: '\\\\sigma' },\n { latex: '\\\\tau' },\n { latex: '\\\\upsilon' },\n { latex: '\\\\varphi' },\n { latex: '\\\\chi' },\n { latex: '\\\\psi' },\n { latex: '\\\\omega' },\n { latex: '\\\\epsilon' },\n { latex: '\\\\theta' },\n { latex: '\\\\phi' },\n { latex: '\\\\varsigma' },\n { latex: '\\\\Alpha' },\n { latex: '\\\\Beta' },\n { latex: '\\\\Gamma' },\n { latex: '\\\\Delta' },\n { latex: '\\\\Epsilon' },\n { latex: '\\\\Zeta' },\n { latex: '\\\\Eta' },\n { latex: '\\\\Theta' },\n { latex: '\\\\Iota' },\n { latex: '\\\\Kappa' },\n { latex: '\\\\Lambda' },\n { latex: '\\\\Mu' },\n { latex: '\\\\Nu' },\n { latex: '\\\\Xi' },\n { latex: '\\\\Omicron' },\n { latex: '\\\\Pi' },\n { latex: '\\\\Rho' },\n { latex: '\\\\Sigma' },\n { latex: '\\\\Tau' },\n { latex: '\\\\Upsilon' },\n { latex: '\\\\Phi' },\n { latex: '\\\\Chi' },\n { latex: '\\\\Psi' },\n { latex: '\\\\Omega' },\n ],\n },\n]","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-567417d3\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"transform\"]\nconst _hoisted_3 = [\"d\"]\n\nimport { computed, ref, watch } from 'vue'\nimport { hfmath } from './hfmath'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'FormulaContent',\n props: {\n latex: {},\n width: {},\n height: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst box = ref({ x: 0, y: 0, w: 0, h: 0 })\nconst pathd = ref('')\n\nwatch(() => props.latex, () => {\n const eq = new hfmath(props.latex)\n pathd.value = eq.pathd({})\n box.value = eq.box({})\n}, { immediate: true })\n\nconst scale = computed(() => {\n const boxW = box.value.w + 32\n const boxH = box.value.h + 32\n\n if (boxW > props.width || boxH > props.height) {\n if (boxW / boxH > props.width / props.height) return props.width / boxW\n return props.height / boxH\n }\n return 1\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"svg\", {\n class: \"formula-content\",\n overflow: \"visible\",\n width: box.value.w + 32,\n height: box.value.h + 32,\n stroke: \"#000\",\n \"stroke-width\": \"1\",\n fill: \"none\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\"\n }, [\n _createElementVNode(\"g\", {\n transform: `scale(${scale.value}, ${scale.value}) translate(0,0) matrix(1,0,0,1,0,0)`,\n \"transform-origin\": \"0 50%\"\n }, [\n _createElementVNode(\"path\", { d: pathd.value }, null, 8, _hoisted_3)\n ], 8, _hoisted_2)\n ], 8, _hoisted_1))\n}\n}\n\n})","\n\n\n\n","import script from \"./FormulaContent.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./FormulaContent.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./FormulaContent.vue?vue&type=style&index=0&id=567417d3&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-567417d3\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"innerHTML\"]\n\nimport { computed } from 'vue'\nimport { hfmath } from './hfmath'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'SymbolContent',\n props: {\n latex: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst svg = computed(() => {\n const eq = new hfmath(props.latex)\n return eq.svg({\n SCALE_X: 10,\n SCALE_Y: 10,\n })\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"symbol-content\",\n innerHTML: svg.value\n }, null, 8, _hoisted_1))\n}\n}\n\n})","\n\n\n","import script from \"./SymbolContent.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./SymbolContent.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-65d72404\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"disabled\", \"value\", \"rows\", \"placeholder\"]\n\nimport { ref } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'TextArea',\n props: {\n value: {},\n rows: { default: 4 },\n disabled: { type: Boolean, default: false },\n resizable: { type: Boolean, default: false },\n placeholder: { default: '' }\n },\n emits: [\"update:value\"],\n setup(__props: any, { expose: __expose, emit: __emit }) {\n\n\n\nconst emit = __emit\n\nconst handleInput = (e: Event) => {\n emit('update:value', (e.target as HTMLInputElement).value)\n}\n\nconst textareaRef = ref()\nconst focus = () => {\n if (textareaRef.value) textareaRef.value.focus()\n}\n\n__expose({\n focus,\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"textarea\", {\n class: _normalizeClass([\"textarea\", {\n 'disabled': _ctx.disabled,\n 'resizable': _ctx.resizable,\n }]),\n ref_key: \"textareaRef\",\n ref: textareaRef,\n disabled: _ctx.disabled,\n value: _ctx.value,\n rows: _ctx.rows,\n placeholder: _ctx.placeholder,\n onInput: _cache[0] || (_cache[0] = $event => handleInput($event))\n }, null, 42, _hoisted_1))\n}\n}\n\n})","\n\n\n\n","import script from \"./TextArea.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TextArea.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./TextArea.vue?vue&type=style&index=0&id=65d72404&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-65d72404\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-49a14edf\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"latex-editor\" }\nconst _hoisted_2 = { class: \"container\" }\nconst _hoisted_3 = { class: \"left\" }\nconst _hoisted_4 = { class: \"input-area\" }\nconst _hoisted_5 = { class: \"preview\" }\nconst _hoisted_6 = {\n key: 0,\n class: \"placeholder\"\n}\nconst _hoisted_7 = {\n key: 1,\n class: \"preview-content\"\n}\nconst _hoisted_8 = { class: \"right\" }\nconst _hoisted_9 = { class: \"content\" }\nconst _hoisted_10 = {\n key: 0,\n class: \"symbol\"\n}\nconst _hoisted_11 = { class: \"symbol-pool\" }\nconst _hoisted_12 = [\"onClick\"]\nconst _hoisted_13 = {\n key: 1,\n class: \"formula\"\n}\nconst _hoisted_14 = { class: \"formula-title\" }\nconst _hoisted_15 = [\"onClick\"]\nconst _hoisted_16 = { class: \"footer\" }\n\nimport { computed, onMounted, ref } from 'vue'\nimport { hfmath } from './hfmath'\nimport { FORMULA_LIST, SYMBOL_LIST } from '@/configs/latex'\nimport message from '@/utils/message'\n\nimport FormulaContent from './FormulaContent.vue'\nimport SymbolContent from './SymbolContent.vue'\nimport Button from '../Button.vue'\nimport TextArea from '../TextArea.vue'\nimport Tabs from '../Tabs.vue'\n\ninterface TabItem {\n key: 'symbol' | 'formula'\n label: string\n}\n\ninterface LatexResult {\n latex: string\n path: string\n w: number\n h: number\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n value: { default: '' }\n },\n emits: [\"update\", \"close\"],\n setup(__props: any, { emit: __emit }) {\n\nconst tabs: TabItem[] = [\n { label: '常用符号', key: 'symbol' },\n { label: '预置公式', key: 'formula' },\n]\n\nconst props = __props\n\nconst emit = __emit\n\nconst formulaList = FORMULA_LIST\n\nconst symbolTabs = SYMBOL_LIST.map(item => ({\n label: item.label,\n key: item.type,\n}))\n\nconst latex = ref('')\nconst toolbarState = ref<'symbol' | 'formula'>('symbol')\nconst textAreaRef = ref>()\n\nconst selectedSymbolKey = ref(SYMBOL_LIST[0].type)\nconst symbolPool = computed(() => {\n const selectedSymbol = SYMBOL_LIST.find(item => item.type === selectedSymbolKey.value)\n return selectedSymbol?.children || []\n})\n\nonMounted(() => {\n if (props.value) latex.value = props.value\n})\n\nconst update = () => {\n if (!latex.value) return message.error('公式不能为空')\n\n const eq = new hfmath(latex.value)\n const pathd = eq.pathd({})\n const box = eq.box({})\n \n emit('update', {\n latex: latex.value,\n path: pathd,\n w: box.w + 32,\n h: box.h + 32,\n })\n}\n\nconst insertSymbol = (latex: string) => {\n if (!textAreaRef.value) return\n textAreaRef.value.focus()\n document.execCommand('insertText', false, latex)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(TextArea, {\n value: latex.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((latex).value = $event)),\n placeholder: \"输入 LaTeX 公式\",\n ref_key: \"textAreaRef\",\n ref: textAreaRef\n }, null, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_5, [\n (!latex.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, \"公式预览\"))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n _createVNode(FormulaContent, {\n width: 518,\n height: 138,\n latex: latex.value\n }, null, 8, [\"latex\"])\n ]))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: toolbarState.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((toolbarState).value = $event)),\n card: \"\"\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_9, [\n (toolbarState.value === 'symbol')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n _createVNode(Tabs, {\n tabs: _unref(symbolTabs),\n value: selectedSymbolKey.value,\n \"onUpdate:value\": _cache[2] || (_cache[2] = ($event: any) => ((selectedSymbolKey).value = $event)),\n spaceBetween: \"\",\n tabsStyle: { margin: '10px 10px 0' }\n }, null, 8, [\"tabs\", \"value\"]),\n _createElementVNode(\"div\", _hoisted_11, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(symbolPool.value, (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"symbol-item\",\n key: item.latex,\n onClick: ($event: any) => (insertSymbol(item.latex))\n }, [\n _createVNode(SymbolContent, {\n latex: item.latex\n }, null, 8, [\"latex\"])\n ], 8, _hoisted_12))\n }), 128))\n ])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_13, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(formulaList), (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"formula-item\",\n key: item.label\n }, [\n _createElementVNode(\"div\", _hoisted_14, _toDisplayString(item.label), 1),\n _createElementVNode(\"div\", {\n class: \"formula-item-content\",\n onClick: ($event: any) => (latex.value = item.latex)\n }, [\n _createVNode(FormulaContent, {\n width: 236,\n height: 60,\n latex: item.latex\n }, null, 8, [\"latex\"])\n ], 8, _hoisted_15)\n ]))\n }), 128))\n ]))\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_16, [\n _createVNode(Button, {\n class: \"btn\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('close')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n class: \"btn\",\n type: \"primary\",\n onClick: _cache[4] || (_cache[4] = ($event: any) => (update()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确定\")\n ]),\n _: 1\n })\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./SlideToolbar.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./SlideToolbar.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./SlideToolbar.vue?vue&type=style&index=0&id=24150aba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-24150aba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, unref as _unref, resolveComponent as _resolveComponent, withCtx as _withCtx, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-f3d1ac70\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-toolbar\" }\nconst _hoisted_2 = { class: \"content\" }\nconst _hoisted_3 = {\n key: 0,\n class: \"style\"\n}\nconst _hoisted_4 = { class: \"row-block\" }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"label\" }, \"文字颜色:\", -1))\nconst _hoisted_6 = { class: \"colors\" }\nconst _hoisted_7 = [\"onClick\"]\nconst _hoisted_8 = { class: \"row-block\" }\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"label\" }, \"填充色:\", -1))\nconst _hoisted_10 = { class: \"colors\" }\nconst _hoisted_11 = [\"onClick\"]\nconst _hoisted_12 = {\n key: 1,\n class: \"common\"\n}\n\nimport { ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement, TableCell } from '@/types/slides'\nimport { ElementAlignCommands, ElementOrderCommands } from '@/types/edit'\nimport emitter, { EmitterEvents } from '@/utils/emitter'\nimport useOrderElement from '@/hooks/useOrderElement'\nimport useAlignElementToCanvas from '@/hooks/useAlignElementToCanvas'\nimport useDeleteElement from '@/hooks/useDeleteElement'\nimport useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport CheckboxButton from '@/components/CheckboxButton.vue'\nimport Tabs from '@/components/Tabs.vue'\nimport Divider from '@/components/Divider.vue'\nimport Button from '@/components/Button.vue'\nimport ButtonGroup from '@/components/ButtonGroup.vue'\nimport RadioButton from '@/components/RadioButton.vue'\nimport RadioGroup from '@/components/RadioGroup.vue'\n\ninterface TabItem {\n key: 'style' | 'common'\n label: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ElementToolbar',\n setup(__props) {\n\nconst colors = ['#000000', '#ffffff', '#eeece1', '#1e497b', '#4e81bb', '#e2534d', '#9aba60', '#8165a0', '#47acc5', '#f9974c', '#c21401', '#ff1e02', '#ffc12a', '#ffff3a', '#90cf5b', '#00af57']\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { handleElement, handleElementId, richTextAttrs } = storeToRefs(mainStore)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst updateElement = (id: string, props: Partial) => {\n slidesStore.updateElement({ id, props })\n addHistorySnapshot()\n}\n\nconst tabs: TabItem[] = [\n { key: 'style', label: '样式' },\n { key: 'common', label: '布局' },\n]\nconst activeTab = ref('common')\n\nconst { orderElement } = useOrderElement()\nconst { alignElementToCanvas } = useAlignElementToCanvas()\nconst { addElementsFromData } = useAddSlidesOrElements()\nconst { deleteElement } = useDeleteElement()\n\nconst copyElement = () => {\n const element: PPTElement = JSON.parse(JSON.stringify(handleElement.value))\n addElementsFromData([element])\n}\n\nconst emitRichTextCommand = (command: string, value?: string) => {\n emitter.emit(EmitterEvents.RICH_TEXT_COMMAND, { action: { command, value } })\n}\n\nconst updateFontColor = (color: string) => {\n if (!handleElement.value) return\n if (handleElement.value.type === 'text' || (handleElement.value.type === 'shape' && handleElement.value.text?.content)) {\n emitter.emit(EmitterEvents.RICH_TEXT_COMMAND, { action: { command: 'color', value: color } })\n }\n if (handleElement.value.type === 'table') {\n const data: TableCell[][] = JSON.parse(JSON.stringify(handleElement.value.data))\n for (let i = 0; i < data.length; i++) {\n for (let j = 0; j < data[i].length; j++) {\n const style = data[i][j].style || {}\n data[i][j].style = { ...style, color }\n }\n }\n updateElement(handleElementId.value, { data })\n }\n if (handleElement.value.type === 'latex') {\n updateElement(handleElementId.value, { color })\n }\n}\n\nconst updateFill = (color: string) => {\n if (!handleElement.value) return\n if (\n handleElement.value.type === 'text' ||\n handleElement.value.type === 'shape' ||\n handleElement.value.type === 'chart'\n ) updateElement(handleElementId.value, { fill: color })\n\n if (handleElement.value.type === 'table') {\n const data: TableCell[][] = JSON.parse(JSON.stringify(handleElement.value.data))\n for (let i = 0; i < data.length; i++) {\n for (let j = 0; j < data[i].length; j++) {\n const style = data[i][j].style || {}\n data[i][j].style = { ...style, backcolor: color }\n }\n }\n updateElement(handleElementId.value, { data })\n }\n\n if (handleElement.value.type === 'audio') updateElement(handleElementId.value, { color })\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconTextBold = _resolveComponent(\"IconTextBold\")!\n const _component_IconTextItalic = _resolveComponent(\"IconTextItalic\")!\n const _component_IconTextUnderline = _resolveComponent(\"IconTextUnderline\")!\n const _component_IconStrikethrough = _resolveComponent(\"IconStrikethrough\")!\n const _component_IconFontSize = _resolveComponent(\"IconFontSize\")!\n const _component_IconAlignTextLeft = _resolveComponent(\"IconAlignTextLeft\")!\n const _component_IconAlignTextCenter = _resolveComponent(\"IconAlignTextCenter\")!\n const _component_IconAlignTextRight = _resolveComponent(\"IconAlignTextRight\")!\n const _component_IconCopy = _resolveComponent(\"IconCopy\")!\n const _component_IconDelete = _resolveComponent(\"IconDelete\")!\n const _component_IconSendToBack = _resolveComponent(\"IconSendToBack\")!\n const _component_IconBringToFrontOne = _resolveComponent(\"IconBringToFrontOne\")!\n const _component_IconBringToFront = _resolveComponent(\"IconBringToFront\")!\n const _component_IconSentToBack = _resolveComponent(\"IconSentToBack\")!\n const _component_IconAlignLeft = _resolveComponent(\"IconAlignLeft\")!\n const _component_IconAlignVertically = _resolveComponent(\"IconAlignVertically\")!\n const _component_IconAlignRight = _resolveComponent(\"IconAlignRight\")!\n const _component_IconAlignTop = _resolveComponent(\"IconAlignTop\")!\n const _component_IconAlignHorizontally = _resolveComponent(\"IconAlignHorizontally\")!\n const _component_IconAlignBottom = _resolveComponent(\"IconAlignBottom\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: activeTab.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((activeTab).value = $event)),\n tabsStyle: { marginBottom: '8px' },\n tabStyle: {\n width: '30%',\n margin: '0 10%',\n }\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_2, [\n (activeTab.value === 'style')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).bold,\n onClick: _cache[1] || (_cache[1] = ($event: any) => (emitRichTextCommand('bold')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconTextBold)\n ]),\n _: 1\n }, 8, [\"checked\"]),\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).em,\n onClick: _cache[2] || (_cache[2] = ($event: any) => (emitRichTextCommand('em')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconTextItalic)\n ]),\n _: 1\n }, 8, [\"checked\"]),\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).underline,\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emitRichTextCommand('underline')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconTextUnderline)\n ]),\n _: 1\n }, 8, [\"checked\"]),\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).strikethrough,\n onClick: _cache[4] || (_cache[4] = ($event: any) => (emitRichTextCommand('strikethrough')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconStrikethrough)\n ]),\n _: 1\n }, 8, [\"checked\"])\n ]),\n _: 1\n }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[5] || (_cache[5] = ($event: any) => (emitRichTextCommand('fontsize-add')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconFontSize),\n _createTextVNode(\"+\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[6] || (_cache[6] = ($event: any) => (emitRichTextCommand('fontsize-reduce')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconFontSize),\n _createTextVNode(\"-\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createVNode(RadioGroup, {\n class: \"row\",\n \"button-style\": \"solid\",\n value: _unref(richTextAttrs).align,\n \"onUpdate:value\": _cache[7] || (_cache[7] = value => emitRichTextCommand('align', value))\n }, {\n default: _withCtx(() => [\n _createVNode(RadioButton, {\n value: \"left\",\n style: {\"flex\":\"1\"}\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTextLeft)\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n value: \"center\",\n style: {\"flex\":\"1\"}\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTextCenter)\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n value: \"right\",\n style: {\"flex\":\"1\"}\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTextRight)\n ]),\n _: 1\n })\n ]),\n _: 1\n }, 8, [\"value\"]),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createElementVNode(\"div\", _hoisted_4, [\n _hoisted_5,\n _createElementVNode(\"div\", _hoisted_6, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(colors, (color) => {\n return _createElementVNode(\"div\", {\n class: \"color\",\n key: color,\n onClick: ($event: any) => (updateFontColor(color))\n }, [\n _createElementVNode(\"div\", {\n class: \"color-block\",\n style: _normalizeStyle({ backgroundColor: color })\n }, null, 4)\n ], 8, _hoisted_7)\n }), 64))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _hoisted_9,\n _createElementVNode(\"div\", _hoisted_10, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(colors, (color) => {\n return _createElementVNode(\"div\", {\n class: \"color\",\n key: color,\n onClick: ($event: any) => (updateFill(color))\n }, [\n _createElementVNode(\"div\", {\n class: \"color-block\",\n style: _normalizeStyle({ backgroundColor: color })\n }, null, 4)\n ], 8, _hoisted_11)\n }), 64))\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (activeTab.value === 'common')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_12, [\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[8] || (_cache[8] = ($event: any) => (copyElement()))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconCopy, { class: \"icon\" }),\n _createTextVNode(\" 复制\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[9] || (_cache[9] = ($event: any) => (_unref(deleteElement)()))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconDelete, { class: \"icon\" }),\n _createTextVNode(\" 删除\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[10] || (_cache[10] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).TOP)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconSendToBack, { class: \"icon\" }),\n _createTextVNode(\" 置顶\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[11] || (_cache[11] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).BOTTOM)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconBringToFrontOne, { class: \"icon\" }),\n _createTextVNode(\" 置底\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[12] || (_cache[12] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).UP)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconBringToFront, { class: \"icon\" }),\n _createTextVNode(\" 上移\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[13] || (_cache[13] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).DOWN)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconSentToBack, { class: \"icon\" }),\n _createTextVNode(\" 下移\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[14] || (_cache[14] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).LEFT)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignLeft, { class: \"icon\" }),\n _createTextVNode(\" 左对齐\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[15] || (_cache[15] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).HORIZONTAL)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignVertically, { class: \"icon\" }),\n _createTextVNode(\" 水平居中\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[16] || (_cache[16] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).RIGHT)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignRight, { class: \"icon\" }),\n _createTextVNode(\" 右对齐\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[17] || (_cache[17] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).TOP)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTop, { class: \"icon\" }),\n _createTextVNode(\" 上对齐\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[18] || (_cache[18] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).VERTICAL)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignHorizontally, { class: \"icon\" }),\n _createTextVNode(\" 垂直居中\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[19] || (_cache[19] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).BOTTOM)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignBottom, { class: \"icon\" }),\n _createTextVNode(\" 下对齐\")\n ]),\n _: 1\n })\n ]),\n _: 1\n })\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ElementToolbar.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ElementToolbar.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ElementToolbar.vue?vue&type=style&index=0&id=f3d1ac70&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-f3d1ac70\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, createVNode as _createVNode, createTextVNode as _createTextVNode, withModifiers as _withModifiers, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5c34ab81\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"mobile-editor-header\" }\nconst _hoisted_2 = { class: \"history\" }\n\nimport { storeToRefs } from 'pinia'\nimport { useSnapshotStore } from '@/store'\nimport type { Mode } from '@/types/mobile'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Header',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst { canUndo, canRedo } = storeToRefs(useSnapshotStore())\nconst { redo, undo } = useHistorySnapshot()\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconBack = _resolveComponent(\"IconBack\")!\n const _component_IconNext = _resolveComponent(\"IconNext\")!\n const _component_IconLogout = _resolveComponent(\"IconLogout\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"history-item\", { 'disable': !_unref(canUndo) }]),\n onClick: _cache[0] || (_cache[0] = _withModifiers(($event: any) => (_unref(undo)()), [\"stop\"]))\n }, [\n _createVNode(_component_IconBack),\n _createTextVNode(\" 撤销\")\n ], 2),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"history-item\", { 'disable': !_unref(canRedo) }]),\n onClick: _cache[1] || (_cache[1] = _withModifiers(($event: any) => (_unref(redo)()), [\"stop\"]))\n }, [\n _createVNode(_component_IconNext),\n _createTextVNode(\" 重做\")\n ], 2)\n ]),\n _createElementVNode(\"div\", {\n class: \"back\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_ctx.changeMode('preview')))\n }, [\n _createVNode(_component_IconLogout),\n _createTextVNode(\" 退出编辑\")\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Header.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Header.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Header.vue?vue&type=style&index=0&id=5c34ab81&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5c34ab81\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3756d058\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"mobile-editor\" }\n\nimport { computed, onMounted, ref, watchEffect } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport type { AlignmentLineProps } from '@/types/edit'\nimport type { Mode } from '@/types/mobile'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useSlideBackgroundStyle from '@/hooks/useSlideBackgroundStyle'\nimport useDragElement from '@/views/Editor/Canvas/hooks/useDragElement'\nimport useScaleElement from '@/views/Editor/Canvas/hooks/useScaleElement'\nimport useRotateElement from '@/views/Editor/Canvas/hooks/useRotateElement'\n\nimport AlignmentLine from '@/views/Editor/Canvas/AlignmentLine.vue'\nimport MobileEditableElement from './MobileEditableElement.vue'\nimport MobileOperate from './MobileOperate.vue'\nimport SlideToolbar from './SlideToolbar.vue'\nimport ElementToolbar from './ElementToolbar.vue'\nimport Header from './Header.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst slidesStore = useSlidesStore()\nconst mainStore = useMainStore()\nconst { slideIndex, currentSlide, viewportRatio } = storeToRefs(slidesStore)\nconst { activeElementIdList, handleElement } = storeToRefs(mainStore)\n\nconst contentRef = ref()\nconst viewportRef = ref()\n\nconst alignmentLines = ref([])\n\nconst background = computed(() => currentSlide.value.background)\nconst { backgroundStyle } = useSlideBackgroundStyle(background)\n\nconst canvasScale = computed(() => {\n if (!contentRef.value) return 1\n const contentWidth = contentRef.value.clientWidth\n const contentheight = contentRef.value.clientHeight\n\n const contentRatio = contentheight / contentWidth\n if (contentRatio >= viewportRatio.value) return (contentWidth - 20) / VIEWPORT_SIZE\n return (contentheight - 20) / viewportRatio.value / VIEWPORT_SIZE\n})\n\nonMounted(() => {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n if (slideIndex.value !== 0) slidesStore.updateSlideIndex(0)\n})\n\nconst viewportStyles = computed(() => ({\n width: VIEWPORT_SIZE * canvasScale.value + 'px',\n height: VIEWPORT_SIZE * viewportRatio.value * canvasScale.value + 'px',\n}))\n\nconst elementList = ref([])\nconst setLocalElementList = () => {\n elementList.value = currentSlide.value ? JSON.parse(JSON.stringify(currentSlide.value.elements)) : []\n}\nwatchEffect(setLocalElementList)\n\nconst { dragElement } = useDragElement(elementList, alignmentLines, canvasScale)\nconst { scaleElement } = useScaleElement(elementList, alignmentLines, canvasScale)\nconst { rotateElement } = useRotateElement(elementList, viewportRef, canvasScale)\n\nconst selectElement = (e: TouchEvent, element: PPTElement, startMove = true) => {\n if (!activeElementIdList.value.includes(element.id)) {\n mainStore.setActiveElementIdList([element.id])\n mainStore.setHandleElementId(element.id)\n }\n if (startMove) dragElement(e, element)\n}\n\nconst handleClickBlankArea = () => {\n mainStore.setActiveElementIdList([])\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Header, { changeMode: _ctx.changeMode }, null, 8, [\"changeMode\"]),\n _createElementVNode(\"div\", {\n class: \"content\",\n ref_key: \"contentRef\",\n ref: contentRef,\n onTouchstart: _cache[0] || (_cache[0] = ($event: any) => (handleClickBlankArea()))\n }, [\n _createElementVNode(\"div\", {\n class: \"viewport-wrapper\",\n style: _normalizeStyle(viewportStyles.value)\n }, [\n _createElementVNode(\"div\", {\n class: \"background\",\n style: _normalizeStyle(_unref(backgroundStyle))\n }, null, 4),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(alignmentLines.value, (line, index) => {\n return (_openBlock(), _createBlock(AlignmentLine, {\n key: index,\n type: line.type,\n axis: line.axis,\n length: line.length,\n canvasScale: canvasScale.value\n }, null, 8, [\"type\", \"axis\", \"length\", \"canvasScale\"]))\n }), 128)),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: element.id\n }, [\n (element.type !== 'line')\n ? (_openBlock(), _createBlock(MobileOperate, {\n key: 0,\n elementInfo: element,\n isSelected: _unref(activeElementIdList).includes(element.id),\n canvasScale: canvasScale.value,\n scaleElement: _unref(scaleElement),\n rotateElement: _unref(rotateElement)\n }, null, 8, [\"elementInfo\", \"isSelected\", \"canvasScale\", \"scaleElement\", \"rotateElement\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n }), 128)),\n _createElementVNode(\"div\", {\n class: \"viewport\",\n ref_key: \"viewportRef\",\n ref: viewportRef,\n style: _normalizeStyle({ transform: `scale(${canvasScale.value})` })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element, index) => {\n return (_openBlock(), _createBlock(MobileEditableElement, {\n key: element.id,\n elementInfo: element,\n elementIndex: index + 1,\n selectElement: selectElement\n }, null, 8, [\"elementInfo\", \"elementIndex\"]))\n }), 128))\n ], 4)\n ], 4)\n ], 544),\n _createVNode(SlideToolbar),\n (_unref(handleElement))\n ? (_openBlock(), _createBlock(ElementToolbar, { key: 0 }))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=3756d058&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3756d058\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-62f26eba\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"header\" }\n\nimport { computed, onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { Mode } from '@/types/mobile'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\nimport MobileThumbnails from './MobileThumbnails.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MobilePlayer',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst slidesStore = useSlidesStore()\nconst { slides, slideIndex, currentSlide, viewportRatio } = storeToRefs(slidesStore)\n\nconst toolVisible = ref(false)\n\nconst playerSize = ref({ width: 0, height: 0 })\n\nonMounted(() => {\n if (slideIndex.value !== 0) slidesStore.updateSlideIndex(0)\n\n playerSize.value = {\n width: document.body.clientHeight,\n height: document.body.clientWidth,\n }\n})\n\nconst slideSize = computed(() => {\n const playerRatio = playerSize.value.height / playerSize.value.width\n\n let slideWidth = 0\n let slideHeight = 0\n\n if (playerRatio >= viewportRatio.value) {\n slideWidth = playerSize.value.width\n slideHeight = slideWidth * viewportRatio.value\n }\n else {\n slideHeight = playerSize.value.height\n slideWidth = slideHeight / viewportRatio.value\n }\n\n return {\n width: slideWidth,\n height: slideHeight,\n }\n})\n\nconst touchInfo = ref<{ x: number; y: number; } | null>(null)\nconst touchStartListener = (e: TouchEvent) => {\n touchInfo.value = {\n x: e.changedTouches[0].pageX,\n y: e.changedTouches[0].pageY,\n }\n}\nconst touchEndListener = (e: TouchEvent) => {\n if (!touchInfo.value) return\n\n const offsetY = Math.abs(touchInfo.value.y - e.changedTouches[0].pageY)\n const offsetX = e.changedTouches[0].pageX - touchInfo.value.x\n\n if ( Math.abs(offsetX) > offsetY && Math.abs(offsetX) > 50 ) {\n touchInfo.value = null\n\n if (offsetX < 0 && slideIndex.value > 0) slidesStore.updateSlideIndex(slideIndex.value - 1)\n if (offsetX > 0 && slideIndex.value < slides.value.length - 1) slidesStore.updateSlideIndex(slideIndex.value + 1)\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconLogout = _resolveComponent(\"IconLogout\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"mobile-player\",\n style: _normalizeStyle({\n width: playerSize.value.width + 'px',\n height: playerSize.value.height + 'px',\n transform: `rotate(90deg) translateY(-${playerSize.value.height}px)`,\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"screen-slide-list\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (toolVisible.value = !toolVisible.value)),\n onTouchstart: _cache[1] || (_cache[1] = $event => touchStartListener($event)),\n onTouchend: _cache[2] || (_cache[2] = $event => touchEndListener($event))\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(slides), (slide, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\n 'slide-item', \n `turning-mode-${slide.turningMode || 'slideY'}`,\n {\n 'current': index === _unref(slideIndex),\n 'before': index < _unref(slideIndex),\n 'after': index > _unref(slideIndex),\n 'hide': (index === _unref(slideIndex) - 1 || index === _unref(slideIndex) + 1) && slide.turningMode !== _unref(currentSlide).turningMode,\n }\n ]),\n key: slide.id\n }, [\n (Math.abs(_unref(slideIndex) - index) < 2)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"slide-content\",\n style: _normalizeStyle({\n width: slideSize.value.width + 'px',\n height: slideSize.value.height + 'px',\n })\n }, [\n _createVNode(ThumbnailSlide, {\n slide: slide,\n size: slideSize.value.width\n }, null, 8, [\"slide\", \"size\"])\n ], 4))\n : _createCommentVNode(\"\", true)\n ], 2))\n }), 128))\n ], 32),\n (toolVisible.value)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: \"back\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (_ctx.changeMode('preview')))\n }, [\n _createVNode(_component_IconLogout),\n _createTextVNode(\" 退出播放\")\n ])\n ]),\n _createVNode(MobileThumbnails, { class: \"thumbnails\" })\n ], 64))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./MobilePlayer.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MobilePlayer.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MobilePlayer.vue?vue&type=style&index=0&id=62f26eba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-62f26eba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-53dd42dc\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"thumbnail-list\" }\nconst _hoisted_2 = { class: \"menu\" }\n\nimport { onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport useLoadSlides from '@/hooks/useLoadSlides'\nimport type { Mode } from '@/types/mobile'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\nimport Divider from '@/components/Divider.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MobilePreview',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst { slides } = storeToRefs(useSlidesStore())\nconst { slidesLoadLimit } = useLoadSlides()\n\nconst mobileRef = ref()\nconst screenWidth = ref(0)\n\nonMounted(() => {\n if (!mobileRef.value) return\n screenWidth.value = mobileRef.value.clientWidth\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconEdit = _resolveComponent(\"IconEdit\")!\n const _component_IconFullScreenPlay = _resolveComponent(\"IconFullScreenPlay\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"mobile-preview\",\n ref_key: \"mobileRef\",\n ref: mobileRef\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(slides), (slide, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"thumbnail-item\",\n key: slide.id\n }, [\n _createVNode(ThumbnailSlide, {\n slide: slide,\n size: screenWidth.value - 20,\n visible: index < _unref(slidesLoadLimit)\n }, null, 8, [\"slide\", \"size\", \"visible\"])\n ]))\n }), 128))\n ]),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: \"menu-item\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.changeMode('editor')))\n }, [\n _createVNode(_component_IconEdit, { class: \"icon\" }),\n _createTextVNode(\" 编辑\")\n ]),\n _createVNode(Divider, {\n type: \"vertical\",\n style: {\"height\":\"30px\"}\n }),\n _createElementVNode(\"div\", {\n class: \"menu-item\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.changeMode('player')))\n }, [\n _createVNode(_component_IconFullScreenPlay, { class: \"icon\" }),\n _createTextVNode(\" 播放\")\n ])\n ])\n ], 512))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./MobilePreview.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MobilePreview.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MobilePreview.vue?vue&type=style&index=0&id=53dd42dc&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-53dd42dc\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-9826ff08\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"mobile\" }\n\nimport { computed, ref } from 'vue'\nimport type { Mode } from '@/types/mobile'\n\nimport MobileEditor from './MobileEditor/index.vue'\nimport MobilePlayer from './MobilePlayer.vue'\nimport MobilePreview from './MobilePreview.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n setup(__props) {\n\nconst mode = ref('preview')\n \nconst changeMode = (_mode: Mode) => mode.value = _mode\n\nconst currentComponent = computed(() => {\n const componentMap = {\n 'editor': MobileEditor,\n 'player': MobilePlayer,\n 'preview': MobilePreview,\n }\n return componentMap[mode.value] || null\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(currentComponent.value), { changeMode: changeMode }))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=9826ff08&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-9826ff08\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { onMounted } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useScreenStore, useMainStore, useSnapshotStore } from '@/store'\nimport { LOCALSTORAGE_KEY_DISCARDED_DB } from '@/configs/storage'\nimport { deleteDiscardedDB } from '@/utils/database'\nimport { isPC } from './utils/common'\n\nimport Editor from './views/Editor/index.vue'\nimport Screen from './views/Screen/index.vue'\nimport Mobile from './views/Mobile/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'App',\n setup(__props) {\n\nconst _isPC = isPC()\n\nconst mainStore = useMainStore()\nconst snapshotStore = useSnapshotStore()\nconst { databaseId } = storeToRefs(mainStore)\nconst { screening } = storeToRefs(useScreenStore())\n\nif (process.env.NODE_ENV === 'production') {\n window.onbeforeunload = () => false\n}\n\nonMounted(async () => {\n await deleteDiscardedDB()\n snapshotStore.initSnapshotDatabase()\n mainStore.setAvailableFonts()\n})\n\n// 应用注销时向 localStorage 中记录下本次 indexedDB 的数据库ID,用于之后清除数据库\nwindow.addEventListener('unload', () => {\n const discardedDB = localStorage.getItem(LOCALSTORAGE_KEY_DISCARDED_DB)\n const discardedDBList: string[] = discardedDB ? JSON.parse(discardedDB) : []\n\n discardedDBList.push(databaseId.value)\n\n const newDiscardedDB = JSON.stringify(discardedDBList)\n localStorage.setItem(LOCALSTORAGE_KEY_DISCARDED_DB, newDiscardedDB)\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(screening))\n ? (_openBlock(), _createBlock(Screen, { key: 0 }))\n : (_unref(_isPC))\n ? (_openBlock(), _createBlock(Editor, { key: 1 }))\n : (_openBlock(), _createBlock(Mobile, { key: 2 }))\n}\n}\n\n})","\n\n\n\n","import script from \"./App.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./App.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./App.vue?vue&type=style&index=0&id=685e8c72&lang=scss\"\n\nconst __exports__ = script;\n\nexport default __exports__","/* eslint-disable no-console */\n\nimport { register } from 'register-service-worker'\n\nif (process.env.NODE_ENV === 'production') {\n register(`${process.env.BASE_URL}service-worker.js`, {\n ready() {\n console.log(\n 'App is being served from cache by a service worker.\\n' +\n 'For more details, visit https://goo.gl/AFskqB'\n )\n },\n registered() {\n console.log('Service worker has been registered.')\n },\n cached() {\n console.log('Content has been cached for offline use.')\n },\n updatefound() {\n console.log('New content is downloading.')\n },\n updated() {\n console.log('New content is available; please refresh.')\n },\n offline() {\n console.log('No internet connection found. App is running in offline mode.')\n },\n error(error) {\n console.error('Error during service worker registration:', error)\n }\n })\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createBlock as _createBlock, normalizeClass as _normalizeClass, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-77e74b43\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"menu-content\" }\nconst _hoisted_2 = [\"onClick\"]\nconst _hoisted_3 = { class: \"text\" }\nconst _hoisted_4 = {\n key: 0,\n class: \"sub-text\"\n}\n\nimport type { ContextmenuItem } from './types'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MenuContent',\n props: {\n menus: {},\n handleClickMenuItem: { type: Function }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n const _component_menu_content = _resolveComponent(\"menu-content\", true)!\n\n return (_openBlock(), _createElementBlock(\"ul\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.menus, (menu, index) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: menu.text || index\n }, [\n (!menu.hide)\n ? (_openBlock(), _createElementBlock(\"li\", {\n key: 0,\n class: _normalizeClass([\"menu-item\", {'divider': menu.divider, 'disable': menu.disable}]),\n onClick: _withModifiers(($event: any) => (_ctx.handleClickMenuItem(menu)), [\"stop\"])\n }, [\n (!menu.divider)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"menu-item-content\", {\n 'has-children': menu.children,\n 'has-handler': menu.handler,\n }])\n }, [\n _createElementVNode(\"span\", _hoisted_3, _toDisplayString(menu.text), 1),\n (menu.subText && !menu.children)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, _toDisplayString(menu.subText), 1))\n : _createCommentVNode(\"\", true),\n (menu.children && menu.children.length)\n ? (_openBlock(), _createBlock(_component_menu_content, {\n key: 1,\n class: \"sub-menu\",\n menus: menu.children,\n handleClickMenuItem: _ctx.handleClickMenuItem\n }, null, 8, [\"menus\", \"handleClickMenuItem\"]))\n : _createCommentVNode(\"\", true)\n ], 2))\n : _createCommentVNode(\"\", true)\n ], 10, _hoisted_2))\n : _createCommentVNode(\"\", true)\n ], 64))\n }), 128))\n ]))\n}\n}\n\n})","import script from \"./MenuContent.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MenuContent.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MenuContent.vue?vue&type=style&index=0&id=77e74b43&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-77e74b43\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { withModifiers as _withModifiers, createElementVNode as _createElementVNode, createVNode as _createVNode, normalizeStyle as _normalizeStyle, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport type { ContextmenuItem, Axis } from './types'\n\nimport MenuContent from './MenuContent.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n axis: {},\n el: {},\n menus: {},\n removeContextmenu: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst style = computed(() => {\n const MENU_WIDTH = 170\n const MENU_HEIGHT = 30\n const DIVIDER_HEIGHT = 11\n const PADDING = 5\n\n const { x, y } = props.axis\n const menuCount = props.menus.filter(menu => !(menu.divider || menu.hide)).length\n const dividerCount = props.menus.filter(menu => menu.divider).length\n\n const menuWidth = MENU_WIDTH\n const menuHeight = menuCount * MENU_HEIGHT + dividerCount * DIVIDER_HEIGHT + PADDING * 2\n\n const screenWidth = document.body.clientWidth\n const screenHeight = document.body.clientHeight\n\n return {\n left: screenWidth <= x + menuWidth ? x - menuWidth : x,\n top: screenHeight <= y + menuHeight ? y - menuHeight : y,\n }\n})\n\nconst handleClickMenuItem = (item: ContextmenuItem) => {\n if (item.disable) return\n if (item.children && !item.handler) return\n if (item.handler) item.handler(props.el)\n props.removeContextmenu()\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", {\n class: \"mask\",\n onContextmenu: _cache[0] || (_cache[0] = _withModifiers(($event: any) => (_ctx.removeContextmenu()), [\"prevent\"])),\n onMousedown: _cache[1] || (_cache[1] = ($event: any) => (_ctx.removeContextmenu()))\n }, null, 32),\n _createElementVNode(\"div\", {\n class: \"contextmenu\",\n style: _normalizeStyle({\n left: style.value.left + 'px',\n top: style.value.top + 'px',\n }),\n onContextmenu: _cache[2] || (_cache[2] = _withModifiers(() => {}, [\"prevent\"]))\n }, [\n _createVNode(MenuContent, {\n menus: _ctx.menus,\n handleClickMenuItem: handleClickMenuItem\n }, null, 8, [\"menus\"])\n ], 36)\n ], 64))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=1abfab1d&lang=scss\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { type Directive, type DirectiveBinding, createVNode, render } from 'vue'\nimport ContextmenuComponent from '@/components/Contextmenu/index.vue'\n\nconst CTX_CONTEXTMENU_HANDLER = 'CTX_CONTEXTMENU_HANDLER'\n\ninterface CustomHTMLElement extends HTMLElement {\n [CTX_CONTEXTMENU_HANDLER]?: (event: MouseEvent) => void\n} \n\nconst contextmenuListener = (el: HTMLElement, event: MouseEvent, binding: DirectiveBinding) => {\n event.stopPropagation()\n event.preventDefault()\n\n const menus = binding.value(el)\n if (!menus) return\n\n let container: HTMLDivElement | null = null\n\n // 移除右键菜单并取消相关的事件监听\n const removeContextmenu = () => {\n if (container) {\n document.body.removeChild(container)\n container = null\n }\n el.classList.remove('contextmenu-active')\n document.body.removeEventListener('scroll', removeContextmenu) \n window.removeEventListener('resize', removeContextmenu)\n }\n\n // 创建自定义菜单\n const options = {\n axis: { x: event.x, y: event.y },\n el,\n menus,\n removeContextmenu,\n }\n container = document.createElement('div')\n const vm = createVNode(ContextmenuComponent, options, null)\n render(vm, container)\n document.body.appendChild(container)\n\n // 为目标节点添加菜单激活状态的className\n el.classList.add('contextmenu-active')\n\n // 页面变化时移除菜单\n document.body.addEventListener('scroll', removeContextmenu)\n window.addEventListener('resize', removeContextmenu)\n}\n\nconst ContextmenuDirective: Directive = {\n mounted(el: CustomHTMLElement, binding) {\n el[CTX_CONTEXTMENU_HANDLER] = (event: MouseEvent) => contextmenuListener(el, event, binding)\n el.addEventListener('contextmenu', el[CTX_CONTEXTMENU_HANDLER])\n },\n\n unmounted(el: CustomHTMLElement) {\n if (el && el[CTX_CONTEXTMENU_HANDLER]) {\n el.removeEventListener('contextmenu', el[CTX_CONTEXTMENU_HANDLER])\n delete el[CTX_CONTEXTMENU_HANDLER]\n }\n },\n}\n\nexport default ContextmenuDirective","import type { Directive, DirectiveBinding } from 'vue'\n\nconst CTX_CLICK_OUTSIDE_HANDLER = 'CTX_CLICK_OUTSIDE_HANDLER'\n\ninterface CustomHTMLElement extends HTMLElement {\n [CTX_CLICK_OUTSIDE_HANDLER]?: (event: MouseEvent) => void\n} \n\nconst clickListener = (el: HTMLElement, event: MouseEvent, binding: DirectiveBinding) => {\n const handler = binding.value\n\n const path = event.composedPath()\n const isClickOutside = path ? path.indexOf(el) < 0 : !el.contains(event.target as HTMLElement)\n\n if (!isClickOutside) return\n handler(event)\n}\n\nconst ClickOutsideDirective: Directive = {\n mounted(el: CustomHTMLElement, binding) {\n el[CTX_CLICK_OUTSIDE_HANDLER] = (event: MouseEvent) => clickListener(el, event, binding)\n setTimeout(() => {\n document.addEventListener('click', el[CTX_CLICK_OUTSIDE_HANDLER]!)\n }, 0)\n },\n \n unmounted(el: CustomHTMLElement) {\n if (el[CTX_CLICK_OUTSIDE_HANDLER]) {\n document.removeEventListener('click', el[CTX_CLICK_OUTSIDE_HANDLER])\n delete el[CTX_CLICK_OUTSIDE_HANDLER]\n }\n },\n}\n\nexport default ClickOutsideDirective","import type { Directive, DirectiveBinding } from 'vue'\nimport tippy, { type Instance, type Placement } from 'tippy.js'\n\nimport './tooltip.scss'\n\nconst TOOLTIP_INSTANCE = 'TOOLTIP_INSTANCE'\n\ninterface CustomHTMLElement extends HTMLElement {\n [TOOLTIP_INSTANCE]?: Instance\n}\n\ntype Delay = number | [number | null, number | null]\n\ninterface BindingValue {\n content: string\n placement?: Placement\n delay?: Delay\n}\n\nconst TooltipDirective: Directive = {\n mounted(el: CustomHTMLElement, binding: DirectiveBinding) {\n let content = ''\n let placement: Placement = 'top'\n let delay: Delay = [300, 0]\n\n if (typeof binding.value === 'string') {\n content = binding.value\n }\n else {\n content = binding.value.content\n if (binding.value.placement !== undefined) placement = binding.value.placement\n if (binding.value.delay !== undefined) delay = binding.value.delay\n }\n\n el[TOOLTIP_INSTANCE] = tippy(el, {\n content,\n theme: 'tooltip',\n duration: 100,\n animation: 'scale',\n allowHTML: true,\n placement,\n delay,\n })\n },\n\n updated(el: CustomHTMLElement, binding: DirectiveBinding) {\n let content = ''\n if (typeof binding.value === 'string') {\n content = binding.value\n }\n else {\n content = binding.value.content\n }\n if (el[TOOLTIP_INSTANCE]) el[TOOLTIP_INSTANCE].setContent(content)\n },\n \n unmounted(el: CustomHTMLElement) {\n if (el[TOOLTIP_INSTANCE]) el[TOOLTIP_INSTANCE].destroy()\n },\n}\n\nexport default TooltipDirective","import type { App } from 'vue'\n\nimport Contextmenu from './contextmenu'\nimport ClickOutside from './clickOutside'\nimport Tooltip from './tooltip'\n\nexport default {\n install(app: App) {\n app.directive('contextmenu', Contextmenu)\n app.directive('click-outside', ClickOutside)\n app.directive('tooltip', Tooltip)\n }\n}\n","import { createApp } from 'vue'\nimport { createPinia } from 'pinia'\nimport App from './App.vue'\nimport './registerServiceWorker'\n\nimport '@icon-park/vue-next/styles/index.css'\nimport 'prosemirror-view/style/prosemirror.css'\nimport 'animate.css'\n\nimport '@/assets/styles/prosemirror.scss'\nimport '@/assets/styles/global.scss'\nimport '@/assets/styles/font.scss'\n\nimport Icon from '@/plugins/icon'\nimport Directive from '@/plugins/directive'\n\nconst app = createApp(App)\n\napp.use(Icon)\napp.use(Directive)\n\napp.use(createPinia())\napp.mount('#app')\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkpptist\"] = self[\"webpackChunkpptist\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], function() { return __webpack_require__(2078); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["ToolbarStates","isList","node","schema","type","nodes","bullet_list","ordered_list","autoSelectAll","view","empty","state","selection","selectAll","dispatch","addMark","editorView","mark","tr","from","to","$from","$to","pos","findNodesWithSameMark","doc","markType","ii","finder","firstMark","fromNode","toNode","nodeAt","marks","find","fromPos","toPos","jj","nodeSize","equalNodeType","nodeType","Array","isArray","indexOf","findParentNodeClosestToPos","$pos","predicate","i","depth","before","start","findParentNode","_ref","findParentNodeOfType","isActiveOfParentNodeType","getLastTextNode","name","lastChild","getMarkAttrs","getAttrValue","attr","attrs","isActiveMark","markActive","isInSet","storedMarks","rangeHasMark","getAttrValueInSelection","keepChecking","value","nodesBetween","_defaultAttrs","color","backcolor","fontsize","fontname","align","getTextAttrs","defaultAttrs","isBold","isEm","isUnderline","isStrikethrough","isSuperscript","isSubscript","isCode","link","isBulletList","isOrderedList","isBlockquote","bold","em","underline","strikethrough","superscript","subscript","code","bulletList","orderedList","blockquote","getFontsize","parseInt","defaultRichTextAttrs","SYS_FONTS","label","WEB_FONTS","isSupportFont","fontName","arial","toLowerCase","size","width","height","str","canvas","document","createElement","ctx","getContext","willReadFrequently","textAlign","fillStyle","textBaseline","getDotArray","_fontFamily","clearRect","font","fillText","imageData","getImageData","data","slice","call","filter","item","join","slides","id","elements","left","top","viewBox","path","fill","fixedRatio","opacity","rotate","flipV","lineHeight","content","defaultFontName","defaultColor","end","points","style","background","wordSpace","theme","themeColor","fontColor","backgroundColor","shadow","h","v","blur","outline","layouts","text","useSlidesStore","defineStore","title","slideIndex","viewportRatio","getters","currentSlide","currentSlideAnimations","animations","els","elIds","map","el","animation","includes","elId","formatedAnimations","trigger","length","last","push","autoNext","subColor","tinycolor","isDark","layoutsString","JSON","stringify","replaceAll","parse","actions","setTitle","this","setTheme","themeProps","setViewportRatio","setSlides","addSlide","slide","addIndex","splice","updateSlide","props","deleteSlide","slideId","slidesId","deleteSlidesIndex","index","findIndex","newIndex","Math","min","maxIndex","updateSlideIndex","addElement","element","currentSlideEls","newEls","deleteElement","elementId","elementIdList","updateElement","elIdList","removeElementProps","propName","propsNames","omit","nanoid","customAlphabet","databaseId","useMainStore","activeElementIdList","handleElementId","activeGroupElementId","hiddenElementIdList","canvasPercentage","canvasScale","canvasDragged","thumbnailsFocus","editorAreaFocus","disableHotkeys","gridLineSize","showRuler","creatingElement","creatingCustomShape","availableFonts","toolbarState","SLIDE_DESIGN","clipingImageElementId","richTextAttrs","selectedTableCells","isScaling","selectedSlidesIndex","dialogForExport","textFormatPainter","shapeFormatPainter","showSelectPanel","showSearchPanel","activeElementList","slidesStore","handleElement","setActiveElementIdList","setHandleElementId","setActiveGroupElementId","setHiddenElementIdList","setCanvasPercentage","percentage","setCanvasScale","scale","setCanvasDragged","isDragged","setThumbnailsFocus","isFocus","setEditorareaFocus","setDisableHotkeysState","disable","setGridLineSize","setRulerState","show","setCreatingElement","setCreatingCustomShapeState","setAvailableFonts","setToolbarState","setClipingImageElementId","setRichtextAttrs","setSelectedTableCells","cells","setScalingState","updateSelectedSlidesIndex","setDialogForExport","setTextFormatPainter","setShapeFormatPainter","setSelectPanelState","setSearchPanelState","LOCALSTORAGE_KEY_DISCARDED_DB","databaseNamePrefix","deleteDiscardedDB","async","now","Date","getTime","localStorageDiscardedDB","localStorage","getItem","localStorageDiscardedDBList","databaseNames","Dexie","getDatabaseNames","discardedDBNames","prefix","time","split","delete","removeItem","PPTistDB","constructor","super","_defineProperty","version","stores","snapshots","writingBoardImgs","table","db","useSnapshotStore","snapshotCursor","snapshotLength","canUndo","canRedo","setSnapshotCursor","cursor","setSnapshotLength","initSnapshotDatabase","newFirstSnapshot","add","addSnapshot","allKeys","orderBy","keys","needDeleteKeys","snapshot","snapshotLengthLimit","update","bulkDelete","unDo","mainStore","toArray","reDo","useKeyboardStore","ctrlKeyState","shiftKeyState","spaceKeyState","ctrlOrShiftKeyActive","setCtrlKeyState","active","setShiftKeyState","setSpaceKeyState","useScreenStore","screening","setScreening","fillDigit","digit","len","padStart","isPC","navigator","userAgent","match","ElementOrderCommands","ElementAlignCommands","OperateBorderLines","OperateResizeHandlers","OperateLineHandlers","KEYS","HOTKEY_DOC","children","CRYPTO_KEY","encrypt","msg","CryptoJS","toString","decrypt","ciphertext","bytes","Utf8","copyText","Promise","resolve","reject","fakeElement","clipboard","Clipboard","action","container","body","on","e","destroy","appendChild","click","removeChild","readClipboard","readText","then","pasteCustomClipboardString","clipboardData","pasteExcelClipboardString","lines","pop","colCount","getRectRotatedRange","radius","sqrt","pow","auxiliaryAngle","atan","PI","tlbraRadian","trblaRadian","middleLeft","middleTop","xAxis","cos","yAxis","sin","xRange","max","yRange","getRectRotatedOffset","originXRange","originYRange","rotatedXRange","rotatedYRange","offsetX","offsetY","getElementRange","minX","maxX","minY","maxY","getElementListRange","elementList","leftValues","topValues","rightValues","bottomValues","forEach","uniqAlignLines","uniqLines","line","_line","uniqLine","rangeMin","range","rangeMax","createSlideIdMap","slideIdMap","createElementIdMap","groupIdMap","elIdMap","groupId","getTableSubThemeColor","rgba","setAlpha","toRgbString","getLineElementPath","broken","mid","curve","cubic","c1","c2","p1","p2","isElementInViewport","parent","elementRect","getBoundingClientRect","parentRect","bottom","icons","IconPlayOne","_PlayOne","IconFullScreenPlay","_FullScreenPlay","IconLock","_Lock","IconUnlock","_Unlock","IconPpt","_Ppt","IconFormat","_Format","IconPicture","_Picture","IconFullScreen","_FullScreen","IconList","_List","IconOrderedList","_OrderedList","IconFlipVertically","_FlipVertically","IconFlipHorizontally","_FlipHorizontally","IconFontSize","_FontSize","IconCode","_Code","IconTextBold","_TextBold","IconTextItalic","_TextItalic","IconTextUnderline","_TextUnderline","IconStrikethrough","_Strikethrough","IconEdit","_Edit","IconQuote","_Quote","IconBackgroundColor","_BackgroundColor","IconGroup","_Group","IconUngroup","_Ungroup","IconBack","_Back","IconNext","_Next","IconFullwidth","_Fullwidth","IconAlignTop","_AlignTop","IconAlignLeft","_AlignLeft","IconAlignRight","_AlignRight","IconAlignBottom","_AlignBottom","IconAlignVertically","_AlignVertically","IconAlignHorizontally","_AlignHorizontally","IconBringToFront","_BringToFront","IconSendToBack","_SendToBack","IconAlignTextLeft","_AlignTextLeft","IconAlignTextRight","_AlignTextRight","IconAlignTextCenter","_AlignTextCenter","IconAlignTextBoth","_AlignTextBoth","IconRowHeight","_RowHeight","IconWrite","_Write","IconInsertTable","_InsertTable","IconAddText","_AddText","IconFill","_Fill","IconTailoring","_Tailoring","IconEffects","_Effects","IconColorFilter","_ColorFilter","IconUp","_Up","IconDown","_Down","IconPlus","_Plus","IconMinus","_Minus","IconConnection","_Connection","IconBringToFrontOne","_BringToFrontOne","IconSentToBack","_SentToBack","IconGithub","_Github","IconChartProportion","_ChartProportion","IconChartHistogram","_ChartHistogram","IconChartHistogramOne","_ChartHistogramOne","IconChartLineArea","_ChartLineArea","IconChartRing","_ChartRing","IconChartScatter","_ChartScatter","IconChartLine","_ChartLine","IconChartPie","_ChartPie","IconText","_Text","IconRotate","_Rotate","IconLeftTwo","_LeftTwo","IconRightTwo","_RightTwo","IconPlatte","_Platte","IconClose","_Close","IconCloseSmall","_CloseSmall","IconUndo","_Undo","IconTransform","_Transform","IconClick","_Click","IconTheme","_Theme","IconArrowCircleLeft","_ArrowCircleLeft","IconGraphicDesign","_GraphicDesign","IconLogout","_Logout","IconErase","_Erase","IconClear","_Clear","IconAlignTextTopOne","_AlignTextTopOne","IconAlignTextBottomOne","_AlignTextBottomOne","IconAlignTextMiddleOne","_AlignTextMiddleOne","IconPause","_Pause","IconVolumeMute","_VolumeMute","IconVolumeNotice","_VolumeNotice","IconVolumeSmall","_VolumeSmall","IconVideoTwo","_VideoTwo","IconFormula","_Formula","IconLinkOne","_LinkOne","IconFullScreenOne","_FullScreenOne","IconOffScreenOne","_OffScreenOne","IconPower","_Power","IconListView","_ListView","IconMagic","_Magic","IconHighLight","_HighLight","IconDownload","_Download","IconIndentLeft","_IndentLeft","IconIndentRight","_IndentRight","IconVerticalSpacingBetweenItems","_VerticalSpacingBetweenItems","IconCopy","_Copy","IconDelete","_Delete","IconSquare","_Square","IconRound","_Round","IconNeedle","_Needle","IconTextRotationNone","_TextRotationNone","IconTextRotationDown","_TextRotationDown","IconFormatBrush","_FormatBrush","IconPreviewOpen","_PreviewOpen","IconPreviewClose","_PreviewClose","IconStopwatchStart","_StopwatchStart","IconSearch","_Search","IconLeft","_Left","IconRight","_Right","IconMoveOne","_MoveOne","IconHamburgerButton","_HamburgerButton","IconAttention","_Attention","IconCheckOne","_CheckOne","IconCloseOne","_CloseOne","IconInfo","_Info","install","app","key","Object","component","_hoisted_1","_hoisted_2","class","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_defineComponent","__name","message","default","duration","closable","Boolean","emits","setup","__props","expose","__expose","emit","__emit","visible","ref","timer","startTimer","setTimeout","close","clearTimer","clearTimeout","onBeforeMount","onMounted","_ctx","_cache","_openBlock","_createBlock","_Transition","appear","mode","onBeforeLeave","$event","onAfterLeave","_withCtx","_createElementBlock","_createElementVNode","onMouseenter","onMouseleave","_unref","_createCommentVNode","_toDisplayString","onClick","_createVNode","_","__exports__","instances","wrap","seed","defaultOptions","options","className","cssText","vm","createVNode","MessageComponent","div","appContext","_context","onClose","onDestroy","childNodes","remove","render","firstElementChild","instance","exposed","success","info","warning","error","closeAll","parseText2Paragraphs","htmlText","replace","paragraphs","string","paragraph","getImageSize","src","img","onload","imgWidth","clientWidth","imgHeight","clientHeight","onerror","getImageDataURL","file","reader","FileReader","addEventListener","result","readAsDataURL","VIEWPORT_SIZE","ShapePathFormulasKeys","ElementTypes","SHAPE_PATH_FORMULAS","ROUND_RECT","editable","defaultValue","relative","getBaseSize","formula","CUT_RECT_DIAGONAL","CUT_RECT_SINGLE","CUT_RECT_SAMESIDE","ROUND_RECT_DIAGONAL","ROUND_RECT_SINGLE","ROUND_RECT_SAMESIDE","CUT_ROUND_RECT","MESSAGE","arrowWidth","arrowheight","ROUND_MESSAGE","L","lineWidth","RING_RECT","PLUS","TRIANGLE","vertex","PARALLELOGRAM_LEFT","point","PARALLELOGRAM_RIGHT","TRAPEZOID","BULLET","INDICATOR","SHAPE_LIST","pptxShapeType","pathFormula","special","outlined","CHART_TYPES","bar","horizontalBar","area","scatter","pie","ring","snapshotStore","addHistorySnapshot","debounce","trailing","redo","throttle","leading","undo","storeToRefs","useHistorySnapshot","callback","createImageElement","createChartElement","newElement","chartType","gridColor","labels","legends","series","horizontalBars","stackBars","showLine","lineSmooth","showArea","donut","createTableElement","row","col","rowCells","j","colspan","rowspan","DEFAULT_CELL_WIDTH","DEFAULT_CELL_HEIGHT","colWidths","rowHeader","rowFooter","colHeader","colFooter","cellMinHeight","createTextElement","position","vertical","editorRef","querySelector","focus","createShapeElement","supplement","keypoint","createLineElement","isBroken","isCurve","isCubic","createLatexElement","w","latex","strokeWidth","createVideoElement","autoplay","createAudioElement","loop","addElementsFromData","firstElement","lastSameElement","offset","oMinX","oMaxX","oMinY","oMaxY","nMinX","nMaxX","nMinY","nMaxY","values","addSlidesFromData","newSlides","target","isEmptySlide","computed","useCreateElement","useAddSlidesOrElements","createTextElementFromClipboard","pasteTextClipboardData","onlySlide","onlyElements","_selectedSlidesIndex","selectedSlides","selectedSlidesId","usePasteTextClipboardData","resetSlides","emptySlide","command","UP","DOWN","copySlide","pasteSlide","catch","err","createSlide","createSlideByTemplate","newSlide","copyAndPasteSlide","targetSlidesId","cutSlide","selectAllSlide","newSelectedSlidesIndex","sortSlides","oldIndex","_slides","_slide","lockElement","newElementList","lock","unlockElement","groupElementIdList","deleteAllElements","canCombine","firstGroupId","inSameGroup","every","combineElements","combineElementList","combineElementMaxLevel","_element","combineElementIdList","insertLevel","uncombineElements","hasElementInGroup","some","handleElementIdList","useDeleteElement","copyElement","cutElement","pasteElement","quickCopyElement","selectAllElement","unlockedElements","newActiveElementIdList","moveElement","step","move","LEFT","RIGHT","getCombineElementLevelRange","minLevel","maxLevel","moveUpElement","copyOfElementList","nextElement","movedElementList","nextCombineElementList","level","movedElement","moveDownElement","prevElement","prevCombineElementList","moveTopElement","moveBottomElement","unshift","orderElement","TOP","BOTTOM","enterFullscreen","docElm","documentElement","requestFullscreen","mozRequestFullScreen","webkitRequestFullScreen","msRequestFullscreen","exitFullscreen","mozCancelFullScreen","webkitExitFullscreen","msExitFullscreen","isFullscreen","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","msFullscreenElement","webkitCurrentFullScreenElement","screenStore","enterScreening","enterScreeningFromStart","exitScreening","canvasScalePercentage","round","scaleCanvas","setCanvasScalePercentage","resetCanvas","keyboardStore","useSlideHandler","useCombineElement","useLockElement","useCopyAndPasteElement","useSelectAllElement","useMoveElement","useOrderElement","useScreening","useScaleCanvas","copy","cut","quickCopy","combine","uncombine","moveSlide","PAGEUP","PAGEDOWN","order","create","tabActiveElement","currentIndex","nextIndex","nextElementId","keydownListener","ctrlKey","shiftKey","altKey","metaKey","ctrlOrMetaKeyActive","toUpperCase","SPACE","P","preventDefault","F5","F","C","X","D","Z","Y","A","G","B","DELETE","BACKSPACE","ENTER","MINUS","EQUAL","DIGIT_0","TAB","keyupListener","window","onUnmounted","removeEventListener","pasteImageFile","imageFile","dataURL","pasteListener","clipboardDataItems","items","clipboardDataFirstItem","kind","getAsFile","getAsString","exporting","importSpecificFile","files","cover","readAsText","parseLineElement","isFlipV","isFlipH","borderWidth","borderType","borderColor","shapType","importPPTXFile","shapeList","json","slideFactor","fontsizeFactor","image","picBase64","imageSize","gradientType","gradientColor","colors","gradientRotate","rot","parseElements","textEl","fillColor","isVertical","blob","test","lineElement","shape","vAlignMap","vAlign","flipH","cellData","colSpan","rowSpan","xlabels","y","barDir","grouping","_el","readAsArrayBuffer","_Fragment","_renderList","hotkey","accept","inputRef","handleClick","handleChange","_renderSlot","$slots","ref_key","onChange","_withScopeId","n","_pushScopeId","_popScopeId","loading","tip","contentStyle","placement","contentVisible","_component_IconClose","_resolveComponent","_Teleport","onBeforeEnter","_withDirectives","_normalizeClass","_normalizeStyle","_vShow","disabled","placeholder","focused","handleInput","handleBlur","handleFocus","onInput","onFocus","onBlur","onKeydown","_withKeys","appendTo","center","triggerRef","contentRef","watch","hide","tippy","allowHTML","interactive","maxWidth","onShow","onShown","onHidden","_hoisted_7","_hoisted_8","_hoisted_9","href","_hoisted_10","useImport","mainMenuVisible","hotkeyDrawerVisible","editingTitle","titleInputRef","titleValue","startEditTitle","nextTick","handleUpdateTitle","goLink","url","open","_component_IconHamburgerButton","_component_IconPpt","_component_IconDown","_component_IconDownload","_component_IconGithub","_directive_tooltip","_resolveDirective","Popover","FileInput","PopoverMenuItem","_createTextVNode","Input","Drawer","HotkeyDoc","FullscreenSpin","injectKeySlideScale","Symbol","injectKeySlideId","injectKeyRadioGroupValue","removeAllRanges","getSelection","canvasRef","viewportLeft","viewportTop","initViewportPosition","canvasWidth","canvasHeight","viewportActualWidth","viewportActualHeight","setViewportPosition","newValue","oldValue","newViewportActualWidth","oldViewportActualWidth","newViewportActualHeight","oldViewportActualHeight","viewportStyles","resizeObserver","ResizeObserver","observe","unobserve","dragViewport","isMouseDown","startPageX","pageX","startPageY","pageY","originLeft","originTop","onmousemove","currentPageX","currentPageY","onmouseup","viewportRef","mouseSelectionVisible","mouseSelectionQuadrant","mouseSelection","updateMouseSelection","viewportRect","minSelectionRange","x","offsetWidth","offsetHeight","abs","quadrant","inRangeElementList","mouseSelectionLeft","mouseSelectionTop","mouseSelectionWidth","mouseSelectionHeight","isInclude","inRangeElement","inRangeElementIdList","groupElementList","groupElement","elementRef","handleDrop","dataTransfer","dataTransferItem","ondragleave","ondrop","ondragenter","ondragover","getAngleFromCoordinate","radian","atan2","angle","rotateElement","isTouchEvent","MouseEvent","changedTouches","elOriginRotate","elLeft","elTop","elWidth","elHeight","centerX","centerY","handleMousemove","mouseX","mouseY","sorptionRange","handleMouseup","ontouchmove","ontouchend","ELEMENT_TYPE_ZH","chart","video","audio","MIN_SIZE","getRotateElementPoints","taRadian","raRadian","halfWidth","halfHeight","leftTopPoint","topPoint","rightTopPoint","rightPoint","rightBottomPoint","bottomPoint","leftBottomPoint","leftPoint","getOppositePoint","direction","oppositeMap","RIGHT_BOTTOM","LEFT_BOTTOM","LEFT_TOP","RIGHT_TOP","ClipPathTypes","ClipPaths","alignmentLines","scaleElement","elOriginLeft","elOriginTop","elOriginWidth","elOriginHeight","originTableCellMinHeight","elRotate","rotateRadian","aspectRatio","minSize","getSizeWithinRange","getHeightWithinRange","minHeight","baseLeft","baseTop","horizontalLines","verticalLines","oppositePoint","edgeWidth","edgeHeight","isActiveGroupElement","right","topLine","bottomLine","leftLine","rightLine","edgeTopLine","edgeBottomLine","edgeHorizontalCenterLine","edgeLeftLine","edgeRightLine","edgeVerticalCenterLine","alignedAdsorption","currentX","currentY","_alignmentLines","isVerticalAdsorbed","isHorizontalAdsorbed","correctionVal","axis","revisedX","revisedY","currentPoints","currentOppositePoint","currentBaseLeft","currentBaseTop","moveX","moveY","scaleMultiElement","operateWidth","operateHeight","originElementList","currentMinX","currentMaxX","currentMinY","currentMaxY","currentOppositeWidth","currentOppositeHeight","widthScale","heightScale","originElement","originEl","selectElement","startMove","newActiveIdList","groupMembersId","uniq","dragElement","originActiveElementList","isMisoperation","horizontalCenterLine","verticalCenterLine","targetMinX","targetMaxX","targetMinY","targetMaxY","targetLeft","targetTop","targetCenterX","targetCenterY","dragLineElement","adsorptionPoints","startX","startY","endX","endY","midX","midY","c1X","c1Y","c2X","c2Y","START","adsorptionPoint","END","C1","C2","newEl","moveShapeKeypoint","shapePathData","baseSize","originPos","shapeElement","formatCreateSelection","selectionData","formatCreateSelectionForLine","_start","_end","insertElementFromCreateSelection","alignElementToCanvas","viewportWidth","viewportHeight","CENTER","VERTICAL","HORIZONTAL","shadowStyle","flipStyle","CLIPPATHS","rect","RECT","rect2","POLYGON","createPath","rect3","roundRect","ellipse","ELLIPSE","triangle","triangle2","triangle3","rhombus","pentagon","hexagon","heptagon","octagon","chevron","arrow","parallelogram","parallelogram2","trapezoid","trapezoid2","clip","clipShape","imgPosition","filters","outlineWidth","outlineStyle","outlineColor","strokeDashArray","useElementOutline","toRef","overflow","rx","ry","stroke","cx","cy","Function","d","elementInfo","useClipImage","ImageRectOutline","ImageEllipseOutline","ImagePolygonOutline","clipPath","clipData","clipWrapperPositionStyle","isSettingClipRange","currentRange","getClipDataTransformInfo","bottomImgPositionStyle","topImgWrapperPosition","topImgWrapperPositionStyle","topImgPositionStyle","bottomWidth","bottomHeight","initClipPosition","handleClip","clipedEmitData","keyboardListener","updateRange","retPosition","moveClipRange","bottomPosition","originPositopn","scaleClipRange","minWidth","targetWidth","targetHeight","rotateClassName","cornerPoint","edgePoints","_directive_click_outside","draggable","alt","onMousedown","_withModifiers","contextmenus","isCliping","useElementShadow","useElementFlip","useFilter","handleSelectElement","stopPropagation","originClip","centerOffsetX","centerOffsetY","rotatedCenterX","rotatedCenterY","_props","_directive_contextmenu","transform","ImageClipHandler","onClip","onTouchstart","ImageOutline","onDragstart","colorMask","buildKeymap","bind","cmd","joinUp","joinDown","undoInputRule","selectParentNode","toggleMark","strong","chainCommands","splitListItem","list_item","newlineInCode","createParagraphNear","liftEmptyBlock","splitBlockKeepMarks","liftListItem","sinkListItem","blockQuoteRule","wrappingInputRule","orderedListRule","childCount","bulletListRule","codeRule","inputRegex","InputRule","insertText","linkRule","urlRegEx","buildInputRules","rules","smartQuotes","ellipsis","emDash","inputRules","isEmptyParagraph","placeholderPlugin","Plugin","decorations","decoration","Decoration","after","DecorationSet","buildPlugins","plugins","keymap","baseKeymap","dropCursor","gapCursor","history","listStyleType","group","parseDOM","tag","getAttrs","dom","hasAttribute","getAttribute","fontSize","toDOM","listItem","_listItem","indent","textIndent","textIndentLevel","floor","ignore","skip","excludes","forecolor","inline","inclusive","dataset","schemaNodes","schemaMarks","Schema","createDocument","htmlString","parser","DOMParser","parseFromString","fromSchema","initProsemirrorEditor","pluginOptions","EditorView","EditorState","EmitterEvents","emitter","mitt","setTextAlign","alignment","tasks","allowedNodeTypes","Set","has","task","setNodeMarkup","alignmentCommand","setSelection","setNodeIndentMarkup","delta","indentKey","minIndent","maxIndent","nodeAttrs","setIndent","TextSelection","AllSelection","indentCommand","docChanged","textIndentCommand","toggleList","listType","itemType","textStyleAttr","blockRange","parentList","validContent","wrapInList","setListStyle","styles","setNodeAttribute","autoFocus","editorViewRef","innerHTML","handleKeydown","textContent","hasFocus","replaceRangeWith","setProps","execCommand","lift","wrapIn","textStyle","removeMark","keep","newProps","handleDOMEvents","keydown","mouseup","syncAttrsToStore","RICH_TEXT_COMMAND","SYNC_RICH_TEXT_ATTRS_TO_STORE","off","canMove","realHeightCache","realWidthCache","updateTextElementHeight","entries","contentRect","realHeight","realWidth","updateContent","checkEmptyText","pureText","isHandleElement","textShadow","letterSpacing","fontFamily","writingMode","ElementOutline","ProsemirrorEditor","undefined","paragraphSpace","onUpdate","color1","color2","x1","y1","x2","y2","gradientTransform","execFormatPainter","defaultText","updateText","_text","prosemirrorEditorRef","startEdit","onMouseup","onDblclick","gradient","GradientDefs","pathMap","dot","rotateMap","markerUnits","orient","markerWidth","markerHeight","refX","refY","svgWidth","svgHeight","lineDashArray","LinePointMarker","legend","chartRef","slideScale","inject","chartHeight","getPieChartData","getOptions","propsOptopns","renderChart","BarChart","LineChart","PieChart","updateChart","themeColors","analogous","updateTheme","setProperty","updateGridColor","flexDirection","openDataEditor","OPEN_CHART_DATA_EDITOR","Chart","getTextStyle","textDecoration","fontWeight","fontStyle","formatText","hideCells","cell","subThemeColor","immediate","textareaRef","onpaste","excelData","onBeforeUnmount","contenteditable","isStartSelect","startCell","endCell","tableCells","get","set","newData","useSubThemeColor","colSizeList","totalWidth","reduce","a","b","removeSelectedCells","dragLinePosition","useHideCells","selectedCells","isEqual","activedCell","handleCellMousedown","rowIndex","colIndex","button","handleCellMouseenter","isHideCell","selectCol","maxRow","selectRow","maxCol","deleteRow","_tableCells","targetCells","hideCellsPos","deleteCol","insertRow","insertCol","fillTable","rowCount","defaultCell","newRows","mergeCells","splitCells","handleMousedownColHandler","originWidth","clearSelectedCellText","tabActiveCell","getNextCell","nextRow","nextCol","nextCell","textRef","insertExcelData","fillRowCount","fillColCount","getEffectiveTableCells","effectiveTableCells","_rowCells","checkCanDeleteRowOrCol","canDeleteRow","canDeleteCol","checkCanMergeOrSplit","isMultiSelected","targetCell","canMerge","canSplit","cellIndex","handler","divider","span","borderStyle","CustomTextarea","onUpdateValue","onInsertExcelData","updateTableElementHeight","updateTableCells","updateColWidths","widths","updateSelectedCells","EditableTable","onChangeColWidths","onChangeSelectedCells","openLatexEditor","OPEN_LATEX_EDITOR","videoRef","exec","canPlayType","Hls","isSupported","hls","loadSource","attachMedia","flvjs","flvPlayer","createPlayer","attachMediaElement","load","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","poster","secondToTime","second","isNaN","add0","num","hour","sec","getBoundingClientRectViewLeft","playBarWrap","volumeBarRef","volume","paused","currentTime","loaded","bezelTransition","playbackRate","playBarTimeVisible","playBarTime","playBarTimeLeft","ptime","dtime","playedBarWidth","loadedBarWidth","volumeBarWidth","speedMenuVisible","speedOptions","seek","play","pause","toggle","setVolume","muted","speed","rate","handleDurationchange","handleTimeupdate","handleEnded","handleProgress","buffered","loadError","handleError","thumbMove","clientX","thumbUp","handleMousedownPlayBar","volumeMove","volumeUp","handleMousedownVolumeBar","handleClickVolumeBar","handleMousemovePlayBar","px","tx","toggleVolume","toggleLoop","autoHideControllerTimer","hideController","autoHideController","played","useMSE","_component_IconPause","_component_IconPlayOne","_component_IconVolumeMute","_component_IconVolumeNotice","_component_IconVolumeSmall","onMousemove","playsinline","onDurationchange","onTimeupdate","onEnded","onProgress","onPlay","onPause","onError","onAnimationend","VideoPlayer","audioRef","handlePlayed","audioIconSize","audioPlayerPosition","audioWidth","audioHeight","AudioPlayer","elementIndex","isMultiSelect","openLinkDialog","currentElementComponent","elementTypeMap","IMAGE","ImageElement","TEXT","TextElement","SHAPE","ShapeElement","LINE","LineElement","CHART","ChartElement","TABLE","TableElement","LATEX","LatexElement","VIDEO","VideoElement","AUDIO","AudioElement","useAlignElementToCanvas","subText","zIndex","_resolveDynamicComponent","bgColor","colorList","mostReadable","includeFallbackColors","p","backgroundStyle","backgroundImage","backgroundRepeat","backgroundSize","useSlideBackgroundStyle","GridLines","sizeStyle","markerSize","marker","selectionRef","createSelection","absX","absY","isOpposite","endPageX","endPageY","defaultSize","lineData","_startX","_startY","_endX","_endY","onContextmenu","shapeCanvasRef","mousePosition","closed","getPoint","custom","lastPointX","lastPointY","updateMousePosition","firstPointX","firstPointY","getCreateData","xList","yList","formatedPoints","addPoint","ESC","resizeHandlers","textElementResizeHandlers","verticalTextElementResizeHandlers","borderLines","T","R","isWide","localActiveElementList","useCommonOperate","setRange","watchEffect","disableResize","BorderLine","ResizeHandler","script","__default__","inheritAttrs","handlerVisible","scaleWidth","scaleHeight","RotateHandler","keypointStyle","keypointPos","handlers","ctrlHandler","ctrlHandler1","ctrlHandler2","cannotRotate","setLink","linkRegExp","removeLink","margin","useLink","turnTarget","targetIndex","Divider","isSelected","isActive","currentOperateComponent","ImageElementOperate","TextElementOperate","ShapeElementOperate","LineElementOperate","TableElementOperate","CommonElementOperate","elementIndexListInAnimation","indexList","transformOrigin","LinkHandler","needScaleSize","zoom","StaticTable","BaseImageElement","BaseTextElement","BaseShapeElement","BaseLineElement","BaseChartElement","BaseTableElement","BaseLatexElement","BaseVideoElement","BaseAudioElement","provide","ThumbnailElement","tabs","card","tabsStyle","tabStyle","spaceAround","spaceBetween","tab","checked","first","showLabel","popoverVisible","selectRef","updateWidth","handleSelect","option","padding","boxShadow","address","slideOptions","selectedSlide","save","Tabs","marginBottom","Select","ThumbnailSlide","Button","closeButton","closeOnClickMask","closeOnEsc","modalRef","onEsc","onClickMask","tabindex","onKeyup","linkDialogVisible","setLocalElementList","useViewportSize","useDropImageOrText","useMouseSelection","useDragElement","useDragLineElement","useSelectElement","useScaleElement","useRotateElement","useMoveShapeKeypoint","handleClickBlankArea","handleDblClick","removeEditorAreaFocus","throttleScaleCanvas","throttleUpdateSlideIndex","handleMousewheelCanvas","deltaY","toggleRuler","useInsertFromCreateSelection","insertCustomShape","onWheel","ElementCreateSelection","onCreated","ShapeCreateCanvas","AlignmentLine","MultiSelectOperate","Operate","ViewportBackground","MouseSelection","EditableElement","Ruler","Modal","LinkDialog","selectShape","ShapeItemThumbnail","LINE_LIST","selectLine","chartList","selectChart","_component_IconChartLine","_component_IconChartHistogram","_component_IconChartPie","_component_IconChartHistogramOne","_component_IconChartLineArea","_component_IconChartRing","_component_IconChartScatter","Infinity","number","_vModelText","customRow","customCol","isCustom","handleClickTable","insertCustomTable","NumberInput","videoSrc","audioSrc","insertVideo","insertAudio","hfmathConfig","SUB_SUP_SCALE","FORMULA_LIST","SYMBOL_LIST","box","pathd","eq","hfmath","boxW","boxH","svg","SCALE_X","SCALE_Y","rows","resizable","formulaList","symbolTabs","textAreaRef","selectedSymbolKey","symbolPool","selectedSymbol","insertSymbol","TextArea","FormulaContent","SymbolContent","canvasScalePresetList","canvasScaleVisible","applyCanvasPresetScale","insertImageElement","shapePoolVisible","linePoolVisible","chartPoolVisible","tableGeneratorVisible","mediaInputVisible","latexEditorVisible","textTypeSelectVisible","drawText","drawShape","drawLine","toggleSelectPanel","toggleSraechPanel","_component_IconBack","_component_IconNext","_component_IconMoveOne","_component_IconSearch","_component_IconFontSize","_component_IconTextRotationNone","_component_IconTextRotationDown","_component_IconPicture","_component_IconGraphicDesign","_component_IconConnection","_component_IconChartProportion","_component_IconInsertTable","_component_IconFormula","_component_IconVideoTwo","_component_IconMinus","_component_IconPlus","_component_IconFullScreen","ShapePool","onSelect","LinePool","ChartPool","TableGenerator","onInsert","MediaInput","onInsertVideo","onInsertAudio","LaTeXEditor","slidesLoadLimit","loadSlide","selectSlideTemplate","useLoadSlides","presetLayoutPopoverVisible","thumbnailsRef","activeThumbnailRef","$el","scrollIntoView","behavior","changeSlideIndex","handleClickSlideThumbnail","minIndex","handleDragEnd","eventData","contextmenusThumbnails","contextmenusThumbnailItem","LayoutPool","Draggable","modelValue","scroll","scrollSensitivity","onEnd","itemKey","toggleTextFormatPainter","sliderRef","getNewValue","diff","fround","targetNumber","accuracy","NP","tooltipValue","tooltipRangeStartValue","tooltipRangeEndValue","getPercentage","progress","_percentage","remainder","updateRangeEnd","updatePercentage","oldValueArr","newValueArr","updatePercentageEnd","handleMousedown","deep","updateOpacity","Slider","_component_IconPlatte","white","grey","checkboardCache","renderCheckboard","fillRect","translate","toDataURL","getCheckboard","checkboard","bgStyle","rgbaStr","r","g","alphaRef","containerWidth","xOffset","pageXOffset","unbindEventListeners","handleMouseDown","Checkboard","hue","oldHue","pullDirection","hsla","toHsl","pointerLeft","s","hueRef","percent","l","hsva","toHsv","pointerTop","emitChangeEvent","param","saturationRef","containerHeight","yOffset","pageYOffset","clamp","saturation","bright","val","_hex","toHex8String","toHexString","isValid","toRgb","RECENT_COLORS","presetColorConfig","startColor","endColor","_startColor","_endColor","rStep","gStep","bStep","gradientColorArr","getPresetColors","presetColors","standardColors","recentColors","rgbaString","currentColor","selectPresetColor","colorString","updateRecentColorsCache","_color","maxLength","recentColorsCache","setItem","changeColor","openEyeDropper","isSupportedEyeDropper","browserEyeDropper","customEyeDropper","eyeDropper","EyeDropper","tColor","sRGBHex","targetRef","maskRef","colorBlockRef","tagName","classList","contains","toCanvas","fontEmbedCSS","pixelRatio","toFixed","handleMouseleave","_component_IconNeedle","Saturation","onColorChange","Hue","Alpha","EditableInput","c","fixed","hasOutline","updateOutline","outlineProps","toggleOutline","_outline","Switch","ColorPicker","ColorButton","hasShadow","updateShadow","shadowProps","_shadow","toggleShadow","passive","_value","updateValue","ButtonGroup","_hoisted_23","_hoisted_24","_hoisted_25","presetStyles","useTextFormatPainter","bulletListPanelVisible","orderedListPanelVisible","indentLeftPanelVisible","indentRightPanelVisible","bulletListStyleTypeOption","orderedListStyleTypeOption","fontSizeOptions","lineHeightOptions","wordSpaceOptions","paragraphSpaceOptions","updateLineHeight","updateParagraphSpace","updateWordSpace","updateFill","emitRichTextCommand","emitBatchRichTextCommand","linkPopoverVisible","openLinkPopover","updateLink","_component_IconAddText","_component_IconText","_component_IconHighLight","_component_IconTextBold","_component_IconTextItalic","_component_IconTextUnderline","_component_IconStrikethrough","_component_IconCode","_component_IconQuote","_component_IconFormat","_component_IconFormatBrush","_component_IconLinkOne","_component_IconAlignTextLeft","_component_IconAlignTextCenter","_component_IconAlignTextRight","_component_IconAlignTextBoth","_component_IconList","_component_IconOrderedList","_component_IconIndentLeft","_component_IconIndentRight","_component_IconRowHeight","_component_IconVerticalSpacingBetweenItems","_component_IconFullwidth","SelectGroup","icon","TextColorButton","CheckboxButton","RadioGroup","RadioButton","ElementShadow","ElementOpacity","updateFlip","flipProps","_component_IconFlipVertically","_component_IconFlipHorizontally","defaultFilters","unit","filterOptions","hasFilters","filterItem","updateFilter","_handleElement","originFilters","toggleFilters","defaultColorMask","hasColorMask","toggleColorMask","updateColorMask","shapeClipPathOptions","ratioClipOptions","ratio","handleImageElement","clipPanelVisible","clipImage","getImageElementDataBeforeClip","imgLeft","imgTop","originClipRange","originHeight","presetImageClip","imageRatio","distance","replaceImage","resetImage","setBackgroundImage","_component_IconTailoring","_component_IconTransform","_component_IconUndo","_component_IconTheme","ElementFlip","typeItem","ElementColorMask","ElementFilter","toggleShapeFormatPainter","handleShapeElement","fillType","useShapeFormatPainter","updateFillType","updateGradient","gradientProps","_gradient","changeShape","updateTextAlign","_component_IconAlignTextTopOne","_component_IconAlignTextMiddleOne","_component_IconAlignTextBottomOne","handleLineElement","updateLine","CELL_WIDTH","CELL_HEIGHT","selectedRange","tempRangeSize","focusCell","rangeLines","resizablePointStyle","initData","_data","moveNextRow","getTableData","labelsItem","labelInputRef","legendsItem","seriesItem","valueInputRef","clear","handlePaste","closeEditor","changeSelectRange","autocomplete","onPaste","presetChartThemes","handleChartElement","chartDataEditorVisible","presetThemesVisible","presetThemeColorHoverIndex","_lineSmooth","_showLine","_showArea","_horizontalBars","_donut","_stackBars","updateData","updateOptions","optionProps","newOptions","addThemeColor","applyPresetTheme","deleteThemeColor","updateLegend","_component_IconEdit","_component_IconCloseSmall","Checkbox","itemIndex","ChartDataEditor","onSave","textAttrs","hasTheme","minRowCount","minColCount","updateTextAttrState","selectedCell","updateTextAttrs","textAttrProp","themeProp","_theme","toggleTheme","setTableRow","newTableCells","setTableCol","newColSizeList","_component_IconFill","handleLatexElement","updateLatex","updateLatexData","handleVideoElement","updateVideo","setVideoPoster","handleAudioElement","updateAudio","updateFontStyle","panelMap","TextStylePanel","ImageStylePanel","ShapeStylePanel","LineStylePanel","ChartStylePanel","TableStylePanel","LatexStylePanel","VideoStylePanel","AudioStylePanel","currentPanelComponent","MultiStylePanel","activeGroupElement","isHorizontalText","isVerticalText","updateLeft","updateTop","updateShapePathData","updateHeight","updateRotate","updateFixedRatio","updateRotate45","_rotate","_component_IconSendToBack","_component_IconBringToFrontOne","_component_IconBringToFront","_component_IconSentToBack","_component_IconAlignLeft","_component_IconAlignVertically","_component_IconAlignRight","_component_IconAlignTop","_component_IconAlignHorizontally","_component_IconAlignBottom","_component_IconLock","_component_IconUnlock","_component_IconRotate","ANIMATION_DEFAULT_DURATION","ANIMATION_DEFAULT_TRIGGER","ANIMATION_CLASS_PREFIX","ENTER_ANIMATIONS","EXIT_ANIMATIONS","ATTENTION_ANIMATIONS","SLIDE_ANIMATIONS","animationEffects","effect","animationTypes","activeTab","animateIn","animationPoolVisible","hoverPreviewAnimation","animationSequence","elType","animationEffect","handleElementAnimation","deleteAnimation","runAnimation","elRef","animationName","handleAnimationEnd","removeProperty","once","runAllAnimation","updateElementAnimationDuration","updateElementAnimationTrigger","updateElementAnimation","handleAnimationId","animationItem","addAnimation","popoverMaskHide","handlePopoverVisibleChange","openAnimationPool","in","out","attention","_component_IconEffects","_component_IconClick","handle","PRESET_THEMES","getSlideAllColors","getAlpha","createSlideThemeColorMap","newColors","oldColors","themeColorMap","otherColors","setSlideTheme","colorMap","applyPresetThemeToSingleSlide","applyPresetThemeToAllSlides","applyThemeToAllSlides","applyAll","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","_hoisted_42","_hoisted_43","_hoisted_44","_hoisted_45","_hoisted_46","_hoisted_47","_hoisted_48","_hoisted_49","moreThemeConfigsVisible","useSlideTheme","updateBackgroundType","newBackground","updateBackground","uploadBackgroundImage","applyBackgroundAllSlide","updateViewportRatio","_component_IconRight","currentTurningMode","turningMode","updateTurningMode","applyAllSlide","alignActiveElement","groupElementRangeMap","activeElement","groupElements","horizontalCenter","verticalCenter","displayItemCount","count","groupIdList","uniformHorizontalDisplay","copyOfActiveElementList","singleElemetList","groupList","groupEl","formatedGroupList","groupItem","list","sort","itemA","itemB","sortedElementData","firstItem","lastPos","lastWidth","currentPos","currentWidth","sortedItem","uniformVerticalDisplay","totalHeight","lastHeight","currentHeight","useAlignActiveElement","useUniformDisplayElement","alignElement","_component_IconGroup","_component_IconUngroup","selectSymbol","elementTabs","EL_STYLE","SYMBOL","EL_POSITION","EL_ANIMATION","slideTabs","SLIDE_ANIMATION","multiSelectTabs","MULTI_POSITION","currentTabs","currentTabsValue","ElementStylePanel","ElementPositionPanel","ElementAnimationPanel","SlideDesignPanel","SlideAnimationPanel","MultiPositionPanel","SymbolPanel","menuInstance","menuRef","hideMenuInstance","updateTextContent","anchorNode","focusNode","isCollapsed","getRangeAt","getReferenceClientRect","mousedown","input","hideOnClick","remark","resize","newHeight","Editor","childlessTags","closingTags","closingTagAncestorBreakers","li","dt","dd","tbody","thead","tfoot","td","voidTags","jumpPosition","movePositopn","findTextEnd","isEnd","textEnd","char","charAt","lexText","tokens","lexComment","contentEnd","commentEnd","lexTagName","isTagChar","lexTagAttributes","quote","wordBegin","words","isQuoteEnd","isTagEnd","isWordEnd","isQuoteStart","word","isNotPair","secondWord","startsWith","newWord","thirdWord","endsWith","lexSkipTag","safeTagName","nextTag","tagState","lexTag","textStart","secondChar","tagStartClose","firstChar","tagEndClose","lex","isComment","safeTag","lexer","root","stack","hasTerminalParent","tagParents","parentTagName","rewindStack","newLength","token","tagToken","shouldRewind","isClosingTag","shouldRewindToAutoClose","previousIndex","attributes","tagEndToken","_token","elementNode","hasChildren","innerState","splitHead","sep","idx","unquote","car","formatAttributes","attribute","parts","trim","format","toAST","typeMap","toPoints","pathData","SVGPathData","commands","lastPoint","cubicBezierPoints","arcToBezier","py","rX","rY","xAxisRotation","xRot","largeArcFlag","lArcFlag","sweepFlag","cbPoint","characters","PREFIX","utf8Encode","utftext","charCodeAt","String","fromCharCode","encode","chr1","chr2","chr3","enc1","enc2","enc3","enc4","output","svg2Base64","XMLS","XMLSerializer","serializeToString","INCH_PX_RATIO","PT_PX_RATIO","exportImage","domRef","quality","ignoreWebfont","toImage","toPng","toJpeg","foreignObjectSpans","querySelectorAll","spanRef","removeAttribute","config","dataUrl","saveAs","exportSpecificFile","Blob","exportJSON","formatColor","alpha","formatHTML","html","ast","bulletFlag","slices","obj","baseStyleObj","isBlockTag","lastSlice","breakLine","styleObj","styleAttr","styleArr","styleItem","_key","dataIndentAttr","highlight","strike","italic","fontFace","hyperlink","bullet","paraSpaceBefore","indentLevel","formatPoints","moveTo","getShadowOption","getOutlineOption","transparency","dashType","getLinkOption","exportPPTX","masterOverwrite","ignoreMedia","pptx","pptxgen","layout","defineLayout","bgAlpha","defineSlideMaster","pptxSlide","mix","addNotes","textProps","valign","lineSpacingMultiple","autoFit","charSpacing","vert","addText","linkOption","rounding","originW","originH","sizing","addImage","svgRef","base64SVG","addShape","beginArrowType","endArrowType","chartData","chartColors","plotArea","showLegend","legendPos","legendColor","legendFontSize","ChartType","lineSize","doughnut","holeSize","addChart","hiddenCells","rowData","tableData","subThemeColors","_row","cellOptions","colW","border","pt","addTable","extMatch","extn","ext","videoExts","audioExts","addMedia","writeFile","fileName","imageThumbnailsRef","rangeType","renderSlides","useExport","expImage","createIframe","iframe","writeContent","printNode","docType","styleSheets","styleSheet","cssRules","rule","head","write","print","iframeContentWindow","contentWindow","contentDocument","handleLoadIframe","handleAfterprint","pdfThumbnailsRef","expPDF","pageSize","currentDialogComponent","dialogMap","ExportImage","ExportJSON","ExportPDF","ExportPPTX","ExportSpecificFile","moveable","moveablePanelRef","windowWidth","_elements","lastItem","selectGroupEl","idList","selectEl","hideElement","showAll","currentSlideElIdList","needHiddenElementIdList","hideAll","editingElId","saveElementName","enterEdit","_component_IconUp","_component_IconPreviewClose","_component_IconPreviewOpen","MoveablePanel","searchWord","replaceWord","searchResults","searchIndex","modifiers","search","textList","matchRegex","RegExp","textRegex","rets","highlightCurrentSlide","clearMarks","getTextNodeList","nodeList","textNodes","shift","TEXT_NODE","wholeText","getTextInfoList","startIdx","endIdx","getMatchList","keyword","reg","matchList","matchStart","matchEnd","textIdx","textNode","nodeMatchStartIdx","nodeMatchLength","splitText","innerText","substring","parentNode","replaceChild","highlightTableText","markNodes","createTextNode","lastTarget","setActiveMark","searchNext","searchPrev","targetElement","replaced","targetSlide","lastMarkIndex","markIndex","reset","toggleModifiers","useSearch","searchInpRef","_component_IconLeft","_isRef","onEnter","suffix","closeExportDialog","remarkHeight","useGlobalHotkey","usePasteEvent","EditorHeader","Thumbnails","CanvasTool","Canvas","Remark","Toolbar","SelectPanel","SearchPanel","onClosed","ExportDialog","animationIndex","inAnimation","playedSlidesMinIndex","endAnimationCount","classname","revokeAnimation","execPrev","autoPlayTimer","closeAutoPlay","clearInterval","loopPlay","setLoopPlay","throttleMassage","turnSlideToIndex","execNext","autoPlayInterval","autoPlay","setInterval","setAutoPlayInterval","interval","mousewheelListener","touchInfo","touchStartListener","touchEndListener","turnPrevSlide","turnNextSlide","turnSlideToId","wrapRef","slideWidth","slideHeight","setSlideContentSize","slideWrapRef","winWidth","winHeight","fullscreenState","escExit","handleFullscreenChange","manualExitFullscreen","inCurrentSlide","audioPlayerRef","ScreenVideoElement","ScreenAudioElement","needWaitAnimation","elementIndexInAnimation","firstAnimation","openLink","visibility","ScreenElement","slidesWithTurningMode","turningModeKeys","random","ScreenSlide","turnSlide","_component_IconArrowCircleLeft","model","blackboard","penSize","markSize","rubberSize","writingBoardRef","lastTime","lastLineWidth","mouse","mouseInCanvas","updateCanvasSize","initCanvas","lineCap","lineJoin","updateCtx","globalCompositeOperation","globalAlpha","draw","posX","posY","lastPosX","lastPosY","strokeStyle","beginPath","lineTo","closePath","erase","sinRadius","cosRadius","rectPoint1","rectPoint2","rectPoint3","rectPoint4","arc","restore","getDistance","getLineWidth","t","maxV","minV","handleMove","getMouseOffsetPosition","event","canvasRect","clearCanvas","setImageDataURL","imageDataURL","Image","drawImage","_component_IconWrite","onTouchmove","onTouchend","writingBoardColors","writingBoardColor","writingBoardModel","sizePopoverType","changeModel","closeWritingBoard","where","equals","ret","currentImg","hanldeWritingEnd","_component_IconErase","_component_IconClear","WritingBoard","inTiming","isCountdown","minute","inputEditable","toggleCountdown","changeTime","isNumber","maxlength","changeViewMode","useExecPlay","useSlideSize","useFullscreen","rightToolsVisible","writingBoardToolVisible","timerlVisible","slideThumbnailModelVisible","laserPen","_component_IconLeftTwo","_component_IconRightTwo","_component_IconMagic","_component_IconStopwatchStart","_component_IconListView","_component_IconOffScreenOne","_component_IconFullScreenOne","_component_IconPower","ScreenSlideList","SlideThumbnails","WritingBoardTool","CountdownTimer","slideListWrapRef","remarkFontSize","currentSlideRemark","handleMousewheelThumbnails","scrollBy","setRemarkFontSize","offsetLeft","scrollTo","viewMode","BaseView","PresenterView","_resizeHandlers","delayOnTouchOnly","delay","insertTextElement","insertShapeElement","square","handleInputMark","_component_IconCopy","_component_IconDelete","_component_IconSquare","_component_IconRound","MobileThumbnails","updateFontColor","changeMode","_component_IconLogout","contentWidth","contentheight","contentRatio","Header","MobileOperate","MobileEditableElement","SlideToolbar","ElementToolbar","toolVisible","playerSize","slideSize","playerRatio","mobileRef","screenWidth","_component_IconFullScreenPlay","_mode","currentComponent","componentMap","MobileEditor","MobilePlayer","MobilePreview","_isPC","onbeforeunload","discardedDB","discardedDBList","newDiscardedDB","Screen","Mobile","register","ready","console","log","registered","cached","updatefound","updated","offline","menus","handleClickMenuItem","_component_menu_content","menu","removeContextmenu","MENU_WIDTH","MENU_HEIGHT","DIVIDER_HEIGHT","PADDING","menuCount","dividerCount","menuWidth","menuHeight","screenHeight","MenuContent","CTX_CONTEXTMENU_HANDLER","contextmenuListener","binding","ContextmenuComponent","ContextmenuDirective","mounted","unmounted","CTX_CLICK_OUTSIDE_HANDLER","clickListener","composedPath","isClickOutside","ClickOutsideDirective","TOOLTIP_INSTANCE","TooltipDirective","setContent","directive","Contextmenu","ClickOutside","Tooltip","createApp","App","use","Icon","Directive","createPinia","mount","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","m","deferred","O","chunkIds","fn","priority","notFulfilled","fulfilled","getter","__esModule","definition","o","defineProperty","enumerable","globalThis","prop","prototype","hasOwnProperty","toStringTag","nmd","paths","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/js/app.5103afaf.js b/js/app.5103afaf.js deleted file mode 100644 index 9044e56c..00000000 --- a/js/app.5103afaf.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(){var e={4015:function(e,t,l){"use strict";var a,n=l(9963),o=l(9876),i=(l(7658),l(6252)),s=l(2262),r=l(3416);(function(e){e["SYMBOL"]="symbol",e["EL_ANIMATION"]="elAnimation",e["EL_STYLE"]="elStyle",e["EL_POSITION"]="elPosition",e["SLIDE_DESIGN"]="slideDesign",e["SLIDE_ANIMATION"]="slideAnimation",e["MULTI_POSITION"]="multiPosition"})(a||(a={}));var u=l(5804);const c=(e,t)=>e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list,d=e=>{const{empty:t}=e.state.selection;t&&(0,u.td)(e.state,e.dispatch)},p=(e,t,l)=>{if(l)e.dispatch(e.state.tr.addMark(l.from,l.to,t));else{const{$from:l,$to:a}=e.state.selection;e.dispatch(e.state.tr.addMark(l.pos,a.pos,t))}},v=(e,t,l,a)=>{let n=t;const o=e=>e.type===a;let i=null,s=null,r=null;while(n<=l){const t=e.nodeAt(n);if(!t||!t.marks)return null;const l=t.marks.find(o);if(!l)return null;if(i&&l!==i)return null;s=s||t,i=i||l,r=t,n++}let u=t,c=l,d=0;n=t-1;while(n>d){const t=e.nodeAt(n),l=t&&t.marks.find(o);if(!l||l!==i)break;u=n,s=t,n--}n=l+1,d=e.nodeSize-2;while(nArray.isArray(e)&&e.indexOf(t.type)>-1||t.type===e,h=(e,t)=>{for(let l=e.depth;l>0;l--){const a=e.node(l);if(t(a))return{pos:l>0?e.before(l):0,start:e.start(l),depth:l,node:a}}},f=e=>t=>h(t.$from,e),g=e=>t=>f((t=>m(e,t)))(t),y=(e,t)=>{const l=t.schema.nodes[e];return!!g(l)(t.selection)},w=e=>e?"text"===e.type.name?e:e.lastChild?w(e.lastChild):null:null,x=e=>{const{selection:t,doc:l}=e.state,{from:a}=t;let n=l.nodeAt(a)||l.nodeAt(a-1);return n=w(n),n?.marks||[]},k=(e,t,l)=>{for(const a of e)if(a.type.name===t&&a.attrs[l])return a.attrs[l];return null},b=(e,t)=>{for(const l of e)if(l.type.name===t)return!0;return!1},_=(e,t)=>{const{from:l,$from:a,to:n,empty:o}=e.selection;return o?t.isInSet(e.storedMarks||a.marks()):e.doc.rangeHasMark(l,n,t)},I=(e,t)=>{const{selection:l,doc:a}=e.state,{from:n,to:o}=l;let i=!0,s="";return a.nodesBetween(n,o,(e=>(i&&e.attrs[t]&&(i=!1,s=e.attrs[t]),i))),s},S={color:"#000",backcolor:"",fontsize:"20px",fontname:"微软雅黑",align:"left"},C=(e,t={})=>{const l={...S,...t},a=x(e),n=b(a,"strong"),o=b(a,"em"),i=b(a,"underline"),s=b(a,"strikethrough"),r=b(a,"superscript"),u=b(a,"subscript"),c=b(a,"code"),d=k(a,"forecolor","color")||l.color,p=k(a,"backcolor","backcolor")||l.backcolor,v=k(a,"fontsize","fontsize")||l.fontsize,m=k(a,"fontname","fontname")||l.fontname,h=k(a,"link","href")||"",f=I(e,"align")||l.align,g=y("bullet_list",e.state),w=y("ordered_list",e.state),_=y("blockquote",e.state);return{bold:n,em:o,underline:i,strikethrough:s,superscript:r,subscript:u,code:c,color:d,backcolor:p,fontsize:v,fontname:m,link:h,align:f,bulletList:g,orderedList:w,blockquote:_}},L=e=>{const t=x(e),l=k(t,"fontsize","fontsize")||S.fontsize;return parseInt(l)},T={bold:!1,em:!1,underline:!1,strikethrough:!1,superscript:!1,subscript:!1,code:!1,color:"#000",backcolor:"",fontsize:"20px",fontname:"微软雅黑",link:"",align:"left",bulletList:!1,orderedList:!1,blockquote:!1},E=[{label:"Arial",value:"Arial"},{label:"微软雅黑",value:"Microsoft Yahei"},{label:"宋体",value:"SimSun"},{label:"黑体",value:"SimHei"},{label:"楷体",value:"KaiTi"},{label:"新宋体",value:"NSimSun"},{label:"仿宋",value:"FangSong"},{label:"苹方",value:"PingFang SC"},{label:"华文黑体",value:"STHeiti"},{label:"华文楷体",value:"STKaiti"},{label:"华文宋体",value:"STSong"},{label:"华文仿宋",value:"STFangSong"},{label:"华文中宋",value:"STZhongSong"},{label:"华文琥珀",value:"STHupo"},{label:"华文新魏",value:"STXinwei"},{label:"华文隶书",value:"STLiti"},{label:"华文行楷",value:"STXingkai"},{label:"冬青黑体",value:"Hiragino Sans GB"},{label:"兰亭黑",value:"Lantinghei SC"},{label:"偏偏体",value:"Hanzipen SC"},{label:"手札体",value:"Hannotate SC"},{label:"宋体",value:"Songti SC"},{label:"娃娃体",value:"Wawati SC"},{label:"行楷",value:"Xingkai SC"},{label:"圆体",value:"Yuanti SC"},{label:"华文细黑",value:"STXihei"},{label:"幼圆",value:"YouYuan"},{label:"隶书",value:"LiSu"}],M=[{label:"得意黑",value:"得意黑"},{label:"仓耳小丸子",value:"仓耳小丸子"},{label:"优设标题黑",value:"优设标题黑"},{label:"峰广明锐体",value:"峰广明锐体"},{label:"摄图摩登小方体",value:"摄图摩登小方体"},{label:"站酷快乐体",value:"站酷快乐体"},{label:"字制区喜脉体",value:"字制区喜脉体"},{label:"素材集市康康体",value:"素材集市康康体"},{label:"素材集市酷方体",value:"素材集市酷方体"},{label:"途牛类圆体",value:"途牛类圆体"},{label:"锐字真言体",value:"锐字真言体"}],U=e=>{if("string"!==typeof e)return!1;const t="Arial";if(e.toLowerCase()===t.toLowerCase())return!0;const l=100,a=100,n=100,o="a",i=document.createElement("canvas"),s=i.getContext("2d",{willReadFrequently:!0});if(!s)return!1;i.width=a,i.height=n,s.textAlign="center",s.fillStyle="black",s.textBaseline="middle";const r=e=>{s.clearRect(0,0,a,n),s.font=`${l}px ${e}, ${t}`,s.fillText(o,a/2,n/2);const i=s.getImageData(0,0,a,n).data;return[].slice.call(i).filter((e=>0!==e))};return r(t).join("")!==r(e).join("")};var W=l(7234),D=l(6486);const H=[{id:"test-slide-1",elements:[{type:"shape",id:"4cbRxp",left:0,top:200,width:546,height:362.5,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"#5b9bd5",fixedRatio:!1,opacity:.7,rotate:0},{type:"shape",id:"ookHrf",left:0,top:0,width:300,height:320,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"#5b9bd5",fixedRatio:!1,flipV:!0,rotate:0},{type:"text",id:"idn7Mx",left:355,top:65.25,width:585,height:188,lineHeight:1.2,content:"

PPTIST

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"

基于 Vue 3.x + TypeScript 的在线演示文稿应用

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"line",id:"FnpZs4",left:361,top:238,start:[0,0],end:[549,0],points:["",""],color:"#5b9bd5",style:"solid",width:2}],background:{type:"solid",color:"#ffffff"}},{id:"test-slide-2",elements:[{type:"text",id:"ptNnUJ",left:145,top:148,width:711,height:77,lineHeight:1.2,content:"

在此处添加标题

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"

在此处添加副标题

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"line",id:"7CQDwc",left:323.09259259259267,top:238.33333333333334,start:[0,0],end:[354.8148148148148,0],points:["",""],color:"#5b9bd5",style:"solid",width:4},{type:"shape",id:"09wqWw",left:-27.648148148148138,top:432.73148148148147,width:1056.2962962962963,height:162.96296296296296,viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"#fff"}},{id:"test-slide-3",elements:[{type:"shape",id:"vSheCJ",left:183.5185185185185,top:175.5092592592593,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0},{type:"shape",id:"Mpwv7x",left:211.29629629629628,top:201.80555555555557,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0,opacity:.7},{type:"text",id:"WQOTAp",left:304.9074074074074,top:198.10185185185182,width:417.9629629629629,height:140,content:"

感谢观看

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333",wordSpace:5}],background:{type:"solid",color:"#fff"}}],F={themeColor:"#5b9bd5",fontColor:"#333",fontName:"Microsoft Yahei",backgroundColor:"#fff",shadow:{h:3,v:3,blur:2,color:"#808080"},outline:{width:2,color:"#525252",style:"solid"}},A=[{id:"template",elements:[{type:"shape",id:"4cbRxp",left:0,top:200,width:546,height:362.5,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"{{themeColor}}",fixedRatio:!1,opacity:.7,rotate:0},{type:"shape",id:"ookHrf",left:0,top:0,width:300,height:320,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"{{themeColor}}",fixedRatio:!1,flipV:!0,rotate:0},{type:"text",id:"AkIh3E",left:355,top:95.11111111111111,width:585,height:116,lineHeight:1.2,content:"

输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:6},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"

请在此处输入副标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"line",id:"FnpZs4",left:361,top:238,start:[0,0],end:[549,0],points:["",""],color:"{{themeColor}}",style:"solid",width:2}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"ptNnUJ",left:145,top:148,width:711,height:77,lineHeight:1.2,content:"

在此处添加标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"

在此处添加副标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"line",id:"7CQDwc",left:323.09259259259267,top:238.33333333333334,start:[0,0],end:[354.8148148148148,0],points:["",""],color:"{{themeColor}}",style:"solid",width:4},{type:"shape",id:"09wqWw",left:-27.648148148148138,top:432.73148148148147,width:1056.2962962962963,height:162.96296296296296,viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"vSheCJ",left:183.5185185185185,top:175.5092592592593,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0},{type:"shape",id:"Mpwv7x",left:211.29629629629628,top:201.80555555555557,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,opacity:.7},{type:"text",id:"WQOTAp",left:304.9074074074074,top:198.10185185185182,width:417.9629629629629,height:140,content:"

感谢观看

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:5}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"MZVO1kkj",elements:[{type:"shape",id:"cql0h8",left:0,top:0,width:352.59259259259255,height:562.5,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0},{type:"shape",id:"_RTaF4",left:171.4814814814814,top:100.13888888888887,width:362.22222222222223,height:362.22222222222223,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"rgba(255,255,255,0)",fixedRatio:!1,rotate:0,outline:{width:10,color:"{{backgroundColor}}",style:"solid"}},{type:"shape",id:"UZfo8N",left:216.66666666666663,top:145.32407407407408,width:271.85185185185185,height:271.85185185185185,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0,text:{content:"

01

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"ysqtBg",left:561.4814814814814,top:100.1388888888889,width:359.25925925925924,height:80,content:"

在此处输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"lXsoHa",left:572.5925925925925,top:202.3611111111111,width:257.77777777777777,height:260,content:"
  1. 在此处输入内容

  2. 在此处输入内容

  3. 在此处输入内容

  4. 在此处输入内容

  5. 在此处输入内容

  6. 在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",lineHeight:2,fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"EBBnTr",left:360.5996472663139,top:141.8496472663139,width:278.80070546737215,height:278.80070546737215,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:0,color:"{{backgroundColor}}",style:"solid"}},{type:"shape",id:"gDIWDH",left:456.4373897707231,top:98.287037037037,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

1

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"DUWT7E",left:317.037037037037,top:237.68738977072314,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

4

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"pbhn38",left:456.43738977072303,top:377.08774250440916,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

3

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"CvMKrO",left:595.8377425044091,top:237.6873897707231,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"

2

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"adudHB",left:402.962962962963,top:39.39814814814815,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"9UpDwg",left:402.962962962963,top:473.1018518518518,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"GERdpB",left:111.48148148148151,top:256.25,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"G5qoho",left:691.1111111111111,top:256.25,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"shape",id:"vdZcI6",left:415.18518518518516,top:196.4351851851852,width:169.62962962962962,height:169.62962962962962,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"tYUmrx",left:156.66666666666683,top:149.02777777777771,width:264.4444444444445,height:264.4444444444445,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

01

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"0GVHf8",left:342.2222222222223,top:217.17592592592587,width:128.14814814814812,height:128.14814814814812,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0},{type:"text",id:"BO33Sv",left:378.8888888888889,top:235.24999999999994,width:464.4444444444444,height:92,content:"

在此处添加标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"Hj7ttp",left:69.35185185185185,top:49.21759259259262,width:420,height:63,lineHeight:1.2,content:"

1.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"FmKMNB",left:69.35185185185185,top:129.28240740740745,width:420,height:384,content:"

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"rI7ZeO",left:510.64814814814815,top:49.21759259259262,width:420,height:63,lineHeight:1.2,content:"

2.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"KspwGc",left:510.64814814814815,top:129.28240740740745,width:420,height:384,content:"

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"Rx63Jo",left:69.35185185185179,top:51.71759259259262,width:420,height:58,lineHeight:1.2,content:"

1.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"ulyuzE",left:69.35185185185179,top:131.78240740740745,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"kr35Ca",left:510.6481481481481,top:51.71759259259262,width:420,height:58,lineHeight:1.2,content:"

2.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"BNQSpC",left:510.6481481481481,top:131.78240740740745,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"Vr38Nu",left:69.35185185185185,top:301.71759259259255,width:420,height:58,lineHeight:1.2,content:"

3.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"IwKRSu",left:69.35185185185185,top:381.7824074074074,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"0Opr1v",left:510.64814814814815,top:301.71759259259255,width:420,height:58,lineHeight:1.2,content:"

4.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"4L9Uzz",left:510.64814814814815,top:381.7824074074074,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"GdEGxg",left:134.53703703703704,top:127.25,width:152.77777777777777,height:308,lineHeight:1.8,content:"

请在此处输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:8,fill:"{{themeColor}}"},{type:"text",id:"y5sAfw",left:332.8703703703704,top:127.25,width:532.5925925925926,height:50,content:"

请在此处输入内容1

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"VeuocM",left:332.8703703703704,top:212.0648148148148,width:532.5925925925926,height:50,content:"

请在此处输入内容2

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"RyFWQe",left:332.8703703703704,top:296.8796296296296,width:532.5925925925926,height:50,content:"

请在此处输入内容3

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"Q56viI",left:332.8703703703704,top:381.69444444444446,width:532.5925925925926,height:50,content:"

请在此处输入内容4

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"SUWirT",left:73.8888888888889,top:64.21296296296302,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

1

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"YjzN1M",left:148.70370370370372,top:64.21296296296302,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"fS09I7",left:527.5925925925926,top:64.21296296296302,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

2

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"qCnfB1",left:602.4074074074074,top:64.21296296296302,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"difAAT",left:73.8888888888889,top:221.25000000000003,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

3

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"EUlvMo",left:148.70370370370372,top:221.25000000000003,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"US_9jB",left:527.5925925925926,top:221.25000000000003,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

4

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"243MnQ",left:602.4074074074074,top:221.25000000000003,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"Y_KUj0",left:73.8888888888889,top:378.287037037037,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

5

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"9GglMe",left:148.70370370370372,top:378.287037037037,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"eSInje",left:527.5925925925926,top:378.287037037037,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"

6

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"0S3yUg",left:602.4074074074074,top:378.287037037037,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}}],$=(0,o.Q_)("slides",{state:()=>({title:"未命名演示文稿",theme:F,slides:H,slideIndex:0,viewportRatio:.5625}),getters:{currentSlide(e){return e.slides[e.slideIndex]},currentSlideAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const l=t.elements,a=l.map((e=>e.id));return t.animations.filter((e=>a.includes(e.elId)))},formatedAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const l=t.elements,a=l.map((e=>e.id)),n=t.animations.filter((e=>a.includes(e.elId))),o=[];for(const i of n)if("click"!==i.trigger&&o.length){if("meantime"===i.trigger){const e=o[o.length-1];e.animations=e.animations.filter((e=>e.elId!==i.elId)),e.animations.push(i),o[o.length-1]=e}else if("auto"===i.trigger){const e=o[o.length-1];e.autoNext=!0,o[o.length-1]=e,o.push({animations:[i],autoNext:!1})}}else o.push({animations:[i],autoNext:!1});return o},layouts(e){const{themeColor:t,fontColor:l,fontName:a,backgroundColor:n}=e.theme,o=(0,W.Z)(l).isDark()?"rgba(230, 230, 230, 0.5)":"rgba(180, 180, 180, 0.5)",i=JSON.stringify(A).replaceAll("{{themeColor}}",t).replaceAll("{{fontColor}}",l).replaceAll("{{fontName}}",a).replaceAll("{{backgroundColor}}",n).replaceAll("{{subColor}}",o);return JSON.parse(i)}},actions:{setTitle(e){this.title=e||"未命名演示文稿"},setTheme(e){this.theme={...this.theme,...e}},setViewportRatio(e){this.viewportRatio=e},setSlides(e){this.slides=e},addSlide(e){const t=Array.isArray(e)?e:[e],l=this.slideIndex+1;this.slides.splice(l,0,...t),this.slideIndex=l},updateSlide(e){const t=this.slideIndex;this.slides[t]={...this.slides[t],...e}},deleteSlide(e){const t=Array.isArray(e)?e:[e],l=[];for(let o=0;oe.id===t[o]));l.push(e)}let a=Math.min(...l);const n=this.slides.length-t.length-1;a>n&&(a=n),this.slideIndex=a,this.slides=this.slides.filter((e=>!t.includes(e.id)))},updateSlideIndex(e){this.slideIndex=e},addElement(e){const t=Array.isArray(e)?e:[e],l=this.slides[this.slideIndex].elements,a=[...l,...t];this.slides[this.slideIndex].elements=a},deleteElement(e){const t=Array.isArray(e)?e:[e],l=this.slides[this.slideIndex].elements,a=l.filter((e=>!t.includes(e.id)));this.slides[this.slideIndex].elements=a},updateElement(e){const{id:t,props:l,slideId:a}=e,n="string"===typeof t?[t]:t,o=a?this.slides.findIndex((e=>e.id===a)):this.slideIndex,i=this.slides[o],s=i.elements.map((e=>n.includes(e.id)?{...e,...l}:e));this.slides[o].elements=s},removeElementProps(e){const{id:t,propName:l}=e,a="string"===typeof l?[l]:l,n=this.slideIndex,o=this.slides[n],i=o.elements.map((e=>e.id===t?(0,D.omit)(e,a):e));this.slides[n].elements=i}}}),Z=(0,r.kP)("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"),O=Z(10),R=(0,o.Q_)("main",{state:()=>({activeElementIdList:[],handleElementId:"",activeGroupElementId:"",hiddenElementIdList:[],canvasPercentage:90,canvasScale:1,canvasDragged:!1,thumbnailsFocus:!1,editorAreaFocus:!1,disableHotkeys:!1,gridLineSize:0,showRuler:!1,creatingElement:null,creatingCustomShape:!1,availableFonts:E,toolbarState:a.SLIDE_DESIGN,clipingImageElementId:"",richTextAttrs:T,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],dialogForExport:"",databaseId:O,textFormatPainter:null,shapeFormatPainter:null,showSelectPanel:!1,showSearchPanel:!1}),getters:{activeElementList(e){const t=$(),l=t.currentSlide;return l&&l.elements?l.elements.filter((t=>e.activeElementIdList.includes(t.id))):[]},handleElement(e){const t=$(),l=t.currentSlide;return l&&l.elements&&l.elements.find((t=>e.handleElementId===t.id))||null}},actions:{setActiveElementIdList(e){1===e.length?this.handleElementId=e[0]:this.handleElementId="",this.activeElementIdList=e},setHandleElementId(e){this.handleElementId=e},setActiveGroupElementId(e){this.activeGroupElementId=e},setHiddenElementIdList(e){this.hiddenElementIdList=e},setCanvasPercentage(e){this.canvasPercentage=e},setCanvasScale(e){this.canvasScale=e},setCanvasDragged(e){this.canvasDragged=e},setThumbnailsFocus(e){this.thumbnailsFocus=e},setEditorareaFocus(e){this.editorAreaFocus=e},setDisableHotkeysState(e){this.disableHotkeys=e},setGridLineSize(e){this.gridLineSize=e},setRulerState(e){this.showRuler=e},setCreatingElement(e){this.creatingElement=e},setCreatingCustomShapeState(e){this.creatingCustomShape=e},setAvailableFonts(){this.availableFonts=E.filter((e=>U(e.value)))},setToolbarState(e){this.toolbarState=e},setClipingImageElementId(e){this.clipingImageElementId=e},setRichtextAttrs(e){this.richTextAttrs=e},setSelectedTableCells(e){this.selectedTableCells=e},setScalingState(e){this.isScaling=e},updateSelectedSlidesIndex(e){this.selectedSlidesIndex=e},setDialogForExport(e){this.dialogForExport=e},setTextFormatPainter(e){this.textFormatPainter=e},setShapeFormatPainter(e){this.shapeFormatPainter=e},setSelectPanelState(e){this.showSelectPanel=e},setSearchPanelState(e){this.showSearchPanel=e}}});var z=l(7327),P=l(8134);const B="PPTIST_DISCARDED_DB",N="PPTist",j=async()=>{const e=(new Date).getTime(),t=localStorage.getItem(B),l=t?JSON.parse(t):[],a=await P.Z.getDatabaseNames(),n=a.filter((t=>{if(-1===t.indexOf(N))return!1;const[a,n,o]=t.split("_");return a!==N||!n||!o||(!!l.includes(n)||e-+o>=432e5)}));for(const o of n)P.Z.delete(o);localStorage.removeItem(B)};class Y extends P.Z{constructor(){super(`${N}_${O}_${(new Date).getTime()}`),(0,z.Z)(this,"snapshots",void 0),(0,z.Z)(this,"writingBoardImgs",void 0),this.version(1).stores({snapshots:"++id",writingBoardImgs:"++id"}),this.snapshots=this.table("snapshots"),this.writingBoardImgs=this.table("writingBoardImgs")}}const V=new Y,J=(0,o.Q_)("snapshot",{state:()=>({snapshotCursor:-1,snapshotLength:0}),getters:{canUndo(e){return e.snapshotCursor>0},canRedo(e){return e.snapshotCursor=0&&this.snapshotCursoro&&(l.push(t[0]),n--),n>=2&&V.snapshots.update(t[n-2],{index:e.slideIndex}),await V.snapshots.bulkDelete(l),this.setSnapshotCursor(n-1),this.setSnapshotLength(n)},async unDo(){if(this.snapshotCursor<=0)return;const e=$(),t=R(),l=this.snapshotCursor-1,a=await V.snapshots.orderBy("id").toArray(),n=a[l],{index:o,slides:i}=n,s=o>i.length-1?i.length-1:o;e.setSlides(i),e.updateSlideIndex(s),this.setSnapshotCursor(l),t.setActiveElementIdList([])},async reDo(){if(this.snapshotCursor>=this.snapshotLength-1)return;const e=$(),t=R(),l=this.snapshotCursor+1,a=await V.snapshots.orderBy("id").toArray(),n=a[l],{index:o,slides:i}=n,s=o>i.length-1?i.length-1:o;e.setSlides(i),e.updateSlideIndex(s),this.setSnapshotCursor(l),t.setActiveElementIdList([])}}}),q=(0,o.Q_)("keyboard",{state:()=>({ctrlKeyState:!1,shiftKeyState:!1,spaceKeyState:!1}),getters:{ctrlOrShiftKeyActive(e){return e.ctrlKeyState||e.shiftKeyState}},actions:{setCtrlKeyState(e){this.ctrlKeyState=e},setShiftKeyState(e){this.shiftKeyState=e},setSpaceKeyState(e){this.spaceKeyState=e}}}),X=(0,o.Q_)("screen",{state:()=>({screening:!1}),actions:{setScreening(e){this.screening=e}}}),G=(e,t)=>(0,D.padStart)(""+e,t,"0"),K=()=>!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile|BlackBerry|Symbian|Windows Phone)/i);var Q,ee,te,le,ae,ne,oe=l(3577);(function(e){e["UP"]="up",e["DOWN"]="down",e["TOP"]="top",e["BOTTOM"]="bottom"})(Q||(Q={})),function(e){e["TOP"]="top",e["BOTTOM"]="bottom",e["LEFT"]="left",e["RIGHT"]="right",e["VERTICAL"]="vertical",e["HORIZONTAL"]="horizontal",e["CENTER"]="center"}(ee||(ee={})),function(e){e["T"]="top",e["B"]="bottom",e["L"]="left",e["R"]="right"}(te||(te={})),function(e){e["LEFT_TOP"]="left-top",e["TOP"]="top",e["RIGHT_TOP"]="right-top",e["LEFT"]="left",e["RIGHT"]="right",e["LEFT_BOTTOM"]="left-bottom",e["BOTTOM"]="bottom",e["RIGHT_BOTTOM"]="right-bottom"}(le||(le={})),function(e){e["START"]="start",e["END"]="end",e["C"]="ctrl",e["C1"]="ctrl1",e["C2"]="ctrl2"}(ae||(ae={})),function(e){e["C"]="C",e["X"]="X",e["Z"]="Z",e["Y"]="Y",e["A"]="A",e["G"]="G",e["L"]="L",e["F"]="F",e["D"]="D",e["B"]="B",e["P"]="P",e["MINUS"]="-",e["EQUAL"]="=",e["DIGIT_0"]="0",e["DELETE"]="DELETE",e["UP"]="ARROWUP",e["DOWN"]="ARROWDOWN",e["LEFT"]="ARROWLEFT",e["RIGHT"]="ARROWRIGHT",e["ENTER"]="ENTER",e["SPACE"]=" ",e["TAB"]="TAB",e["BACKSPACE"]="BACKSPACE",e["ESC"]="ESCAPE",e["PAGEUP"]="PAGEUP",e["PAGEDOWN"]="PAGEDOWN",e["F5"]="F5"}(ne||(ne={}));const ie=[{type:"通用",children:[{label:"剪切",value:"Ctrl + X"},{label:"复制",value:"Ctrl + C"},{label:"粘贴",value:"Ctrl + V"},{label:"粘贴为纯文本",value:"Ctrl + Shift + V"},{label:"快速复制粘贴",value:"Ctrl + D"},{label:"全选",value:"Ctrl + A"},{label:"撤销",value:"Ctrl + Z"},{label:"恢复",value:"Ctrl + Y"},{label:"删除",value:"Delete / Backspace"},{label:"多选",value:"按住 Ctrl 或 Shift"},{label:"打开搜索替换",value:"Ctrl + F"},{label:"打印",value:"Ctrl + P"},{label:"关闭弹窗",value:"ESC"}]},{type:"幻灯片放映",children:[{label:"从头开始放映幻灯片",value:"F5"},{label:"从当前开始放映幻灯片",value:"Shift + F5"},{label:"切换上一页",value:"↑ / ← / PgUp"},{label:"切换下一页",value:"↓ / → / PgDown"},{label:"切换下一页",value:"Enter / Space"},{label:"退出放映",value:"ESC"}]},{type:"幻灯片编辑",children:[{label:"新建幻灯片",value:"Enter"},{label:"移动画布",value:"Space + 鼠标拖拽"},{label:"缩放画布",value:"Ctrl + 鼠标滚轮"},{label:"放大画布",value:"Ctrl + ="},{label:"缩小画布",value:"Ctrl + -"},{label:"使画布适应当前屏幕",value:"Ctrl + 0"},{label:"上一页(未选中元素)",value:"↑ / ←"},{label:"下一页(未选中元素)",value:"↓ / →"},{label:"上一页",value:"鼠标上滚 / PgUp"},{label:"下一页",value:"鼠标下滚 / PgDown"}]},{type:"元素操作",children:[{label:"移动",value:"↑ / ← / ↓ / →"},{label:"锁定",value:"Ctrl + L"},{label:"组合",value:"Ctrl + G"},{label:"取消组合",value:"Ctrl + Shift + G"},{label:"置顶层",value:"Alt + F"},{label:"置底层",value:"Alt + B"},{label:"锁定宽高比例",value:"按住 Ctrl 或 Shift"},{label:"创建水平 / 垂直线条",value:"按住 Ctrl 或 Shift"},{label:"切换焦点元素",value:"Tab"},{label:"确认图片裁剪",value:"Enter"}]},{type:"表格编辑",children:[{label:"聚焦到下一个单元格",value:"Tab"},{label:"在上方插入一行",value:"Ctrl + ↑"},{label:"在下方插入一行",value:"Ctrl + ↓"},{label:"在左侧插入一列",value:"Ctrl + ←"},{label:"在右侧插入一列",value:"Ctrl + →"}]},{type:"图表数据编辑",children:[{label:"聚焦到下一行",value:"Enter"}]},{type:"文本编辑",children:[{label:"加粗",value:"Ctrl + B"},{label:"斜体",value:"Ctrl + I"},{label:"下划线",value:"Ctrl + U"},{label:"行内代码",value:"Ctrl + E"},{label:"上角标",value:"Ctrl + ;"},{label:"下角标",value:"Ctrl + '"},{label:"选中段落",value:"ESC"}]}];var se=l(2152),re=l.n(se),ue=l(1354),ce=l.n(ue);const de="pptist",pe=e=>ce().AES.encrypt(e,de).toString(),ve=e=>{const t=ce().AES.decrypt(e,de);return t.toString(ce().enc.Utf8)},me=e=>new Promise(((t,l)=>{const a=document.createElement("button"),n=new(re())(a,{text:()=>e,action:()=>"copy",container:document.body});n.on("success",(e=>{n.destroy(),t(e)})),n.on("error",(e=>{n.destroy(),l(e)})),document.body.appendChild(a),a.click(),document.body.removeChild(a)})),he=()=>new Promise(((e,t)=>{navigator.clipboard?.readText?navigator.clipboard.readText().then((l=>(l||t("剪贴板为空或者不包含文本"),e(l)))):t("浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V")})),fe=e=>{let t;try{t=JSON.parse(ve(e))}catch{t=e}return t},ge=e=>{const t=e.split("\r\n");""===t[t.length-1]&&t.pop();let l=-1;const a=[];for(const n in t){if(a[n]=t[n].split("\t"),1===a[n].length)return null;if(-1===l)l=a[n].length;else if(l!==a[n].length)return null}return a},ye=e=>{const{left:t,top:l,width:a,height:n,rotate:o=0}=e,i=Math.sqrt(Math.pow(a,2)+Math.pow(n,2))/2,s=180*Math.atan(n/a)/Math.PI,r=(180-o-s)*Math.PI/180,u=(s-o)*Math.PI/180,c=t+a/2,d=l+n/2,p=[c+i*Math.cos(r),c+i*Math.cos(u),c-i*Math.cos(r),c-i*Math.cos(u)],v=[d-i*Math.sin(r),d-i*Math.sin(u),d+i*Math.sin(r),d+i*Math.sin(u)];return{xRange:[Math.min(...p),Math.max(...p)],yRange:[Math.min(...v),Math.max(...v)]}},we=e=>{const{xRange:t,yRange:l}=ye({left:e.left,top:e.top,width:e.width,height:e.height,rotate:0}),{xRange:a,yRange:n}=ye({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});return{offsetX:a[0]-t[0],offsetY:n[0]-l[0]}},xe=e=>{let t,l,a,n;if("line"===e.type)t=e.left,l=e.left+Math.max(e.start[0],e.end[0]),a=e.top,n=e.top+Math.max(e.start[1],e.end[1]);else if("rotate"in e&&e.rotate){const{left:o,top:i,width:s,height:r,rotate:u}=e,{xRange:c,yRange:d}=ye({left:o,top:i,width:s,height:r,rotate:u});t=c[0],l=c[1],a=d[0],n=d[1]}else t=e.left,l=e.left+e.width,a=e.top,n=e.top+e.height;return{minX:t,maxX:l,minY:a,maxY:n}},ke=e=>{const t=[],l=[],a=[],n=[];e.forEach((e=>{const{minX:o,maxX:i,minY:s,maxY:r}=xe(e);t.push(o),l.push(s),a.push(i),n.push(r)}));const o=Math.min(...t),i=Math.max(...a),s=Math.min(...l),r=Math.max(...n);return{minX:o,maxX:i,minY:s,maxY:r}},be=e=>{const t=[];return e.forEach((e=>{const l=t.findIndex((t=>t.value===e.value));if(-1===l)t.push(e);else{const a=t[l],n=Math.min(a.range[0],e.range[0]),o=Math.max(a.range[1],e.range[1]),i=[n,o],s={value:e.value,range:i};t[l]=s}})),t},_e=e=>{const t={};for(const l of e)t[l.id]=(0,r.x0)(10);return t},Ie=e=>{const t={},l={};for(const a of e){const e=a.groupId;e&&!t[e]&&(t[e]=(0,r.x0)(10)),l[a.id]=(0,r.x0)(10)}return{groupIdMap:t,elIdMap:l}},Se=e=>{const t=(0,W.Z)(e);return[t.setAlpha(.3).toRgbString(),t.setAlpha(.1).toRgbString()]},Ce=e=>{const t=e.start.join(","),l=e.end.join(",");if(e.broken){const a=e.broken.join(",");return`M${t} L${a} L${l}`}if(e.curve){const a=e.curve.join(",");return`M${t} Q${a} ${l}`}if(e.cubic){const[a,n]=e.cubic,o=a.join(","),i=n.join(",");return`M${t} C${o} ${i} ${l}`}return`M${t} L${l}`},Le=(e,t)=>{const l=e.getBoundingClientRect(),a=t.getBoundingClientRect();return l.top>=a.top&&l.bottom<=a.bottom};var Te=l(6108),Ee=l(1061),Me=l(8261),Ue=l(9512),We=l(2025),De=l(9872),He=l(1321),Fe=l(2696),Ae=l(3271),$e=l(9015),Ze=l(5761),Oe=l(7559),Re=l(4023),ze=l(4141),Pe=l(5010),Be=l(6492),Ne=l(1094),je=l(2677),Ye=l(683),Ve=l(7259),Je=l(1258),qe=l(9978),Xe=l(597),Ge=l(85),Ke=l(6071),Qe=l(2489),et=l(9925),tt=l(5361),lt=l(3185),at=l(139),nt=l(8461),ot=l(2882),it=l(3862),st=l(3764),rt=l(9371),ut=l(9912),ct=l(3935),dt=l(3735),pt=l(3542),vt=l(7537),mt=l(5314),ht=l(3325),ft=l(3275),gt=l(3317),yt=l(7712),wt=l(9370),xt=l(2778),kt=l(4422),bt=l(4957),_t=l(7872),It=l(5356),St=l(8684),Ct=l(9577),Lt=l(887),Tt=l(6866),Et=l(509),Mt=l(7606),Ut=l(4412),Wt=l(8814),Dt=l(2057),Ht=l(6048),Ft=l(5114),At=l(9917),$t=l(7747),Zt=l(7425),Ot=l(6717),Rt=l(6302),zt=l(3060),Pt=l(7107),Bt=l(2100),Nt=l(5460),jt=l(5268),Yt=l(1432),Vt=l(5193),Jt=l(4566),qt=l(7091),Xt=l(9602),Gt=l(4891),Kt=l(4012),Qt=l(3681),el=l(1440),tl=l(3482),ll=l(646),al=l(8e3),nl=l(4628),ol=l(9141),il=l(1060),sl=l(8389),rl=l(3467),ul=l(6935),cl=l(3590),dl=l(6453),pl=l(5957),vl=l(4467),ml=l(5547),hl=l(5650),fl=l(2790),gl=l(5620),yl=l(3339),wl=l(4666),xl=l(5215),kl=l(904),bl=l(3650),_l=l(4296),Il=l(6519),Sl=l(4790),Cl=l(3260),Ll=l(2146),Tl=l(6755),El=l(2849),Ml=l(6940),Ul=l(6116),Wl=l(5741),Dl=l(2939),Hl=l(9524),Fl=l(6135),Al=l(6821),$l=l(6149);const Zl={IconPlayOne:$l.Z,IconFullScreenPlay:Al.Z,IconLock:Fl.Z,IconUnlock:Hl.Z,IconPpt:Dl.Z,IconFormat:Wl.Z,IconPicture:Ul.Z,IconFullScreen:Ml.Z,IconList:El.Z,IconOrderedList:Tl.Z,IconFlipVertically:Ll.Z,IconFlipHorizontally:Cl.Z,IconFontSize:Sl.Z,IconCode:Il.Z,IconTextBold:_l.Z,IconTextItalic:bl.Z,IconTextUnderline:kl.Z,IconStrikethrough:xl.Z,IconEdit:wl.Z,IconQuote:yl.Z,IconBackgroundColor:gl.Z,IconGroup:fl.Z,IconUngroup:hl.Z,IconBack:ml.Z,IconNext:vl.Z,IconFullwidth:pl.Z,IconAlignTop:dl.Z,IconAlignLeft:cl.Z,IconAlignRight:ul.Z,IconAlignBottom:rl.Z,IconAlignVertically:sl.Z,IconAlignHorizontally:il.Z,IconBringToFront:ol.Z,IconSendToBack:nl.Z,IconAlignTextLeft:al.Z,IconAlignTextRight:ll.Z,IconAlignTextCenter:tl.Z,IconAlignTextBoth:el.Z,IconRowHeight:Qt.Z,IconWrite:Kt.Z,IconInsertTable:Gt.Z,IconAddText:Xt.Z,IconFill:qt.Z,IconTailoring:Jt.Z,IconEffects:Vt.Z,IconColorFilter:Yt.Z,IconUp:jt.Z,IconDown:Nt.Z,IconPlus:Bt.Z,IconMinus:Pt.Z,IconConnection:zt.Z,IconBringToFrontOne:Rt.Z,IconSentToBack:Ot.Z,IconGithub:Zt.Z,IconChartProportion:$t.Z,IconChartHistogram:At.Z,IconChartHistogramOne:Ft.Z,IconChartLineArea:Ht.Z,IconChartRing:Dt.Z,IconChartScatter:Wt.Z,IconChartLine:Ut.Z,IconChartPie:Mt.Z,IconText:Et.Z,IconRotate:Tt.Z,IconLeftTwo:Lt.Z,IconRightTwo:Ct.Z,IconPlatte:St.Z,IconClose:It.Z,IconCloseSmall:_t.Z,IconUndo:bt.Z,IconTransform:kt.Z,IconClick:xt.Z,IconTheme:wt.Z,IconArrowCircleLeft:yt.Z,IconGraphicDesign:gt.Z,IconLogout:ft.Z,IconErase:ht.Z,IconClear:mt.Z,IconAlignTextTopOne:vt.Z,IconAlignTextBottomOne:pt.Z,IconAlignTextMiddleOne:dt.Z,IconPause:ct.Z,IconVolumeMute:ut.Z,IconVolumeNotice:rt.Z,IconVolumeSmall:st.Z,IconVideoTwo:it.Z,IconFormula:ot.Z,IconLinkOne:nt.Z,IconFullScreenOne:at.Z,IconOffScreenOne:lt.Z,IconPower:tt.Z,IconListView:et.Z,IconMagic:Qe.Z,IconHighLight:Ke.Z,IconDownload:Ge.Z,IconIndentLeft:Xe.Z,IconIndentRight:qe.Z,IconVerticalSpacingBetweenItems:Je.Z,IconCopy:Ve.Z,IconDelete:Ye.Z,IconSquare:je.Z,IconRound:Ne.Z,IconNeedle:Be.Z,IconTextRotationNone:Pe.Z,IconTextRotationDown:ze.Z,IconFormatBrush:Re.Z,IconPreviewOpen:Oe.Z,IconPreviewClose:Ze.Z,IconStopwatchStart:$e.Z,IconSearch:Ae.Z,IconLeft:Fe.Z,IconRight:He.Z,IconMoveOne:De.Z,IconHamburgerButton:We.Z,IconAttention:Ue.Z,IconCheckOne:Me.Z,IconCloseOne:Ee.Z,IconInfo:Te.Z};var Ol={install(e){for(const t of Object.keys(Zl))e.component(t,Zl[t])}};const Rl=["id"],zl={class:"icons"},Pl={class:"content"},Bl={key:0,class:"title"},Nl={class:"description"},jl={key:0,class:"control"};var Yl=(0,i.aZ)({__name:"Message",props:{id:{},message:{},type:{default:"success"},title:{default:""},duration:{default:3e3},closable:{type:Boolean,default:!1}},emits:["close","destroy"],setup(e,{expose:t,emit:l}){const{IconAttention:a,IconCheckOne:o,IconCloseOne:r,IconInfo:u,IconCloseSmall:c}=Zl,d=e,p=l,v=(0,s.iH)(!0),m=(0,s.iH)(null),h=()=>{d.duration<=0||(m.value=setTimeout(g,d.duration))},f=()=>{m.value&&clearTimeout(m.value)},g=()=>v.value=!1;return(0,i.wF)((()=>{f()})),(0,i.bv)((()=>{h()})),t({close:g}),(e,t)=>((0,i.wg)(),(0,i.j4)(n.uT,{name:"message-fade",appear:"",mode:"in-out",onBeforeLeave:t[3]||(t[3]=e=>p("close")),onAfterLeave:t[4]||(t[4]=e=>p("destroy"))},{default:(0,i.w5)((()=>[v.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"message",id:e.id},[(0,i._)("div",{class:"message-container",onMouseenter:t[1]||(t[1]=e=>f()),onMouseleave:t[2]||(t[2]=e=>h())},[(0,i._)("div",zl,["warning"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(a),{key:0,theme:"filled",size:"18",fill:"#faad14"})):(0,i.kq)("",!0),"success"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(o),{key:1,theme:"filled",size:"18",fill:"#52c41a"})):(0,i.kq)("",!0),"error"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(r),{key:2,theme:"filled",size:"18",fill:"#ff4d4f"})):(0,i.kq)("",!0),"info"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(u),{key:3,theme:"filled",size:"18",fill:"#1677ff"})):(0,i.kq)("",!0)]),(0,i._)("div",Pl,[e.title?((0,i.wg)(),(0,i.iD)("div",Bl,(0,oe.zw)(e.title),1)):(0,i.kq)("",!0),(0,i._)("div",Nl,(0,oe.zw)(e.message),1)]),e.closable?((0,i.wg)(),(0,i.iD)("div",jl,[(0,i._)("span",{class:"close-btn",onClick:t[0]||(t[0]=e=>g())},[(0,i.Wm)((0,s.SU)(c))])])):(0,i.kq)("",!0)],32)],8,Rl)):(0,i.kq)("",!0)])),_:1}))}}),Vl=l(3744);const Jl=(0,Vl.Z)(Yl,[["__scopeId","data-v-2231702e"]]);var ql=Jl;const Xl=[];let Gl=null,Kl=0;const Ql={duration:3e3},ea=e=>{const t="message-"+Kl++,l={...Ql,...e,id:t};Gl||(Gl=document.createElement("div"),Gl.className="message-wrap",Gl.style.cssText="\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 6000;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: 15px;\n background-color: rgba(255, 255, 255, 0);\n transition: all 1s ease-in-out;\n align-items: center;\n ",document.body.appendChild(Gl));const a=(0,i.Wm)(ql,l,null),o=document.createElement("div");a.appContext=e.ctx||ea._context||null,a.props.onClose=e.onClose,a.props.onDestroy=()=>{Gl&&Gl.childNodes.length<=1&&(Gl.remove(),Gl=null),(0,n.sY)(null,o)},(0,n.sY)(a,o),Gl.appendChild(o.firstElementChild);const s={id:t,close:()=>a?.component?.exposed?.close()};return Xl.push(s),s};ea.success=(e,t)=>ea({...t,type:"success",message:e}),ea.info=(e,t)=>ea({...t,type:"info",message:e}),ea.warning=(e,t)=>ea({...t,type:"warning",message:e}),ea.error=(e,t)=>ea({...t,type:"error",message:e}),ea.closeAll=function(){for(let e=Xl.length-1;e>=0;e--)Xl[e].close()};var ta=ea;const la=e=>{const t=e.replace(/[\n\r]+/g,"
"),l=t.split("
");let a="";for(const n of l)n&&(a+=`
${n}
`);return a},aa=e=>new Promise((t=>{const l=document.createElement("img");l.src=e,l.style.opacity="0",document.body.appendChild(l),l.onload=()=>{const e=l.clientWidth,a=l.clientHeight;l.onload=null,l.onerror=null,document.body.removeChild(l),t({width:e,height:a})},l.onerror=()=>{l.onload=null,l.onerror=null}})),na=e=>new Promise((t=>{const l=new FileReader;l.addEventListener("load",(()=>{t(l.result)})),l.readAsDataURL(e)})),oa=1e3;var ia,sa;(function(e){e["ROUND_RECT"]="roundRect",e["ROUND_RECT_DIAGONAL"]="roundRectDiagonal",e["ROUND_RECT_SINGLE"]="roundRectSingle",e["ROUND_RECT_SAMESIDE"]="roundRectSameSide",e["CUT_RECT_DIAGONAL"]="cutRectDiagonal",e["CUT_RECT_SINGLE"]="cutRectSingle",e["CUT_RECT_SAMESIDE"]="cutRectSameSide",e["CUT_ROUND_RECT"]="cutRoundRect",e["MESSAGE"]="message",e["ROUND_MESSAGE"]="roundMessage",e["L"]="L",e["RING_RECT"]="ringRect",e["PLUS"]="plus",e["TRIANGLE"]="triangle",e["PARALLELOGRAM_LEFT"]="parallelogramLeft",e["PARALLELOGRAM_RIGHT"]="parallelogramRight",e["TRAPEZOID"]="trapezoid",e["BULLET"]="bullet",e["INDICATOR"]="indicator"})(ia||(ia={})),function(e){e["TEXT"]="text",e["IMAGE"]="image",e["SHAPE"]="shape",e["LINE"]="line",e["CHART"]="chart",e["TABLE"]="table",e["LATEX"]="latex",e["VIDEO"]="video",e["AUDIO"]="audio"}(sa||(sa={}));const ra={[ia.ROUND_RECT]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t-a} Q ${e} ${t} ${e-a} ${t} L ${a} ${t} Q 0 ${t} 0 ${t-a} L 0 ${a} Q 0 0 ${a} 0 Z`}},[ia.CUT_RECT_DIAGONAL]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${t-a} L 0 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L ${a} ${t} Z`}},[ia.CUT_RECT_SINGLE]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${t} L 0 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} Z`}},[ia.CUT_RECT_SAMESIDE]:{editable:!0,defaultValue:.2,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${a} L ${a} 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L 0 ${t} Z`}},[ia.ROUND_RECT_DIAGONAL]:{editable:!0,defaultValue:.125,range:[0,1],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e} 0 L ${e} ${t-a} Q ${e} ${t} ${e-a} ${t} L 0 ${t} L 0 ${a} Q 0 0 ${a} 0 Z`}},[ia.ROUND_RECT_SINGLE]:{editable:!0,defaultValue:.125,range:[0,1],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t} L 0 ${t} L 0 0 Z`}},[ia.ROUND_RECT_SAMESIDE]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${a} Q 0 0 ${a} 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t} L 0 ${t} Z`}},[ia.CUT_ROUND_RECT]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L 0 ${t} L 0 ${a} Q 0 0 ${a} 0 Z`}},[ia.MESSAGE]:{formula:(e,t)=>{const l=.2*e,a=.2*t;return`M 0 0 L ${e} 0 L ${e} ${t-a} L ${e/2} ${t-a} L ${e/2-l} ${t} L ${e/2-l} ${t-a} L 0 ${t-a} Z`}},[ia.ROUND_MESSAGE]:{formula:(e,t)=>{const l=.125*Math.min(e,t),a=.2*e,n=.2*t;return`M 0 ${l} Q 0 0 ${l} 0 L ${e-l} 0 Q ${e} 0 ${e} ${l} L ${e} ${t-l-n} Q ${e} ${t-n} ${e-l} ${t-n} L ${e/2} ${t-n} L ${e/2-a} ${t} L ${e/2-a} ${t-n} L ${l} ${t-n} Q 0 ${t-n} 0 ${t-l-n} L 0 ${l} Z`}},[ia.L]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 L 0 ${t} L ${e} ${t} L ${e} ${t-a} L ${a} ${t-a} L ${a} 0 Z`}},[ia.RING_RECT]:{editable:!0,defaultValue:.25,range:[.1,.45],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 ${e} 0 ${e} ${t} L 0 ${t} L 0 0 Z M ${a} ${a} L ${a} ${t-a} L ${e-a} ${t-a} L ${e-a} ${a} Z`}},[ia.PLUS]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"center",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${e/2-a/2} 0 L ${e/2-a/2} ${t/2-a/2} L 0 ${t/2-a/2} L 0 ${t/2+a/2} L ${e/2-a/2} ${t/2+a/2} L ${e/2-a/2} ${t} L ${e/2+a/2} ${t} L ${e/2+a/2} ${t/2+a/2} L ${e} ${t/2+a/2} L ${e} ${t/2-a/2} L ${e/2+a/2} ${t/2-a/2} L ${e/2+a/2} 0 Z`}},[ia.TRIANGLE]:{editable:!0,defaultValue:.5,range:[0,1],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L 0 ${t} L ${e} ${t} Z`}},[ia.PARALLELOGRAM_LEFT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L ${e} 0 L ${e-a} ${t} L 0 ${t} Z`}},[ia.PARALLELOGRAM_RIGHT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"right",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M 0 0 L ${e-a} 0 L ${e} ${t} L ${a} ${t} Z`}},[ia.TRAPEZOID]:{editable:!0,defaultValue:.25,range:[0,.5],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L ${e-a} 0 L ${e} ${t} L 0 ${t} Z`}},[ia.BULLET]:{editable:!0,defaultValue:.2,range:[0,1],relative:"top",getBaseSize:(e,t)=>t,formula:(e,t,l)=>{const a=t*l;return`M ${e/2} 0 L 0 ${a} L 0 ${t} L ${e} ${t} L ${e} ${a} Z`}},[ia.INDICATOR]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${e} ${t/2} L ${e-a} 0 L 0 0 L ${a} ${t/2} L 0 ${t} L ${e-a} ${t} Z`}}},ua=[{type:"矩形",children:[{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",pptxShapeType:"rect"},{viewBox:[200,200],path:"M 50 0 L 150 0 Q 200 0 200 50 L 200 150 Q 200 200 150 200 L 50 200 Q 0 200 0 150 L 0 50 Q 0 0 50 0 Z",pathFormula:ia.ROUND_RECT,pptxShapeType:"roundRect"},{viewBox:[200,200],path:"M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z",pathFormula:ia.CUT_RECT_SINGLE,pptxShapeType:"snip1Rect"},{viewBox:[200,200],path:"M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z",pathFormula:ia.CUT_RECT_SAMESIDE,pptxShapeType:"snip2SameRect"},{viewBox:[200,200],path:"M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z",pathFormula:ia.CUT_RECT_DIAGONAL,pptxShapeType:"snip2DiagRect"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:ia.CUT_ROUND_RECT,pptxShapeType:"snipRoundRect"},{viewBox:[200,200],path:"M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 0 Z",pathFormula:ia.ROUND_RECT_SINGLE,pptxShapeType:"round1Rect"},{viewBox:[200,200],path:"M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 Z",pathFormula:ia.ROUND_RECT_SAMESIDE,pptxShapeType:"round2SameRect"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 200 150 Q 200 200 150 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:ia.ROUND_RECT_DIAGONAL,pptxShapeType:"round2DiagRect"},{viewBox:[200,200],path:"M 0 80 L 60 0 L 100 40 L 180 20 L 200 120 L 160 200 L 0 200 L 60 140 Z",title:"任意多边形"}]},{type:"常用形状",children:[{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",pptxShapeType:"ellipse"},{viewBox:[200,200],path:"M 100 0 L 0 200 L 200 200 L 100 0 Z",pathFormula:ia.TRIANGLE,pptxShapeType:"triangle"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z"},{viewBox:[200,200],path:"M 70 20 L 0 160 Q 0 200 40 200 L 160 200 Q 200 200 200 160 L 130 20 Q 100 -20 70 20 Z"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z",pathFormula:ia.PARALLELOGRAM_LEFT,pptxShapeType:"parallelogram"},{viewBox:[200,200],path:"M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z",pathFormula:ia.PARALLELOGRAM_RIGHT},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z",pathFormula:ia.TRAPEZOID,pptxShapeType:"trapezoid"},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z",pptxShapeType:"diamond"},{viewBox:[200,200],path:"M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z",pathFormula:ia.BULLET},{viewBox:[200,200],path:"M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z",pathFormula:ia.INDICATOR},{viewBox:[200,200],path:"M 0 0 C 80 20 120 20 200 0 C 180 80 180 120 200 200 C 80 180 120 180 0 200 C 20 120 20 80 0 0 Z"},{viewBox:[200,200],path:"M 10 10 C 60 0 140 0 190 10 C 200 60 200 140 190 190 C 140 200 60 200 10 190 C 0 140 0 60 10 10 Z"},{viewBox:[200,200],path:"M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 20 A 100 100 0 1 0 200 100 L 100 100 L 40 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z",pptxShapeType:"pie"},{viewBox:[200,200],path:"M 160 20 A 100 100 0 1 0 200 100 L 100 100 L 160 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z",pptxShapeType:"chord"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z",pptxShapeType:"teardrop"},{viewBox:[200,200],path:"M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 90 L 50 200 L 150 200 L 200 90 L 100 0 Z",pptxShapeType:"pentagon"},{viewBox:[200,200],path:"M 40 0 L 160 0 L 200 100 L 160 200 L 40 200 L 0 100 Z",pptxShapeType:"hexagon"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z"},{viewBox:[200,200],path:"M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z",pptxShapeType:"octagon"},{viewBox:[200,200],path:"M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 50 0 A 25 50 0 1 0 50 200 L 150 200 A 25 50 0 1 0 150 0 L 50 0 Z"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z",pathFormula:ia.L},{viewBox:[200,200],path:"M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z",pathFormula:ia.RING_RECT},{viewBox:[200,200],path:"M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z"},{viewBox:[200,200],path:"M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z",pathFormula:ia.PLUS},{viewBox:[200,200],path:"M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 Z",pathFormula:ia.MESSAGE},{viewBox:[200,200],path:"M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z",pathFormula:ia.ROUND_MESSAGE},{viewBox:[200,200],path:"M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z"},{viewBox:[200,200],path:"M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z"},{viewBox:[200,200],path:"M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z"},{viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z"},{viewBox:[200,200],path:"M 100 0 Q 0 50 0 175 Q 100 225 200 175 Q 200 50 100 0 Z"},{viewBox:[200,200],path:"M 0 100 A 50 50 0 1 1 200 100 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 100 0 L 120 80 L 200 100 L 120 120 L 100 200 L 80 120 L 0 100 L 80 80 L 100 0 Z",pptxShapeType:"star4"},{viewBox:[1024,1024],path:"M1018.67652554 400.05983681l-382.95318779-5.89158658L512 34.78141155 388.27666225 394.16825023l-382.95318779 5.89158658L311.68602415 629.83174977l-117.83174978 365.27842665 312.25413766-223.88032637 312.25413904 223.88032637-117.83175116-365.27842665 318.14572563-229.77191296z",pptxShapeType:"star5",special:!0},{viewBox:[200,200],path:"M 100 0 L 60 60 L 0 100 L 60 140 L 100 200 L 140 140 L 200 100 L 140 60 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 140 60 L 200 60 L 160 100 L 200 140 L 140 140 L 100 200 L 60 140 L 0 140 L 40 100 L 0 60 L 60 60 L 100 0 Z",pptxShapeType:"star6"},{viewBox:[200,200],path:"M 100 0 L 80 40 L 20 20 L 40 80 L 0 100 L 40 120 L 20 180 L 80 160 L 100 200 L 120 160 L 180 180 L 160 120 L 200 100 L 160 80 L 180 20 L 120 40 L 100 0 Z"},{viewBox:[200,200],path:"M 200 0 C 80 40 80 160 200 200 C -60 200 -60 0 200 0 Z"}]},{type:"箭头",children:[{viewBox:[200,200],path:"M 100 0 L 0 100 L 50 100 L 50 200 L 150 200 L 150 100 L 200 100 L 100 0 Z",pptxShapeType:"upArrow"},{viewBox:[200,200],path:"M 100 200 L 200 100 L 150 100 L 150 0 L 50 0 L 50 100 L 0 100 L 100 200 Z",pptxShapeType:"downArrow"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 200 150 L 100 150 L 100 200 L 0 100 Z",pptxShapeType:"leftArrow"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 0 150 L 100 150 L 100 200 L 200 100 Z",pptxShapeType:"rightArrow"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 60 60 L 60 140 L 0 140 L 100 200 L 200 140 L 140 140 L 140 60 L 200 60 L 100 0 Z",pptxShapeType:"upDownArrow"},{viewBox:[200,200],path:"M 0 100 L 60 0 L 60 60 L 140 60 L 140 0 L 200 100 L 140 200 L 140 140 L 60 140 L 60 200 L 0 100 Z",pptxShapeType:"leftRightArrow"},{viewBox:[200,200],path:"M 100 0 L 60 40 L 80 40 L 80 80 L 40 80 L 40 60 L 0 100 L 40 140 L 40 120 L 80 120 L 80 160 L 60 160 L 100 200 L 140 160 L 120 160 L 120 120 L 160 120 L 160 140 L 200 100 L 160 60 L 160 80 L 120 80 L 120 40 L 140 40 L 100 0 Z"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 150 100 L 200 150 L 100 150 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 50 100 L 0 150 L 100 150 L 100 200 L 200 100 Z",pptxShapeType:"notchedRightArrow"},{viewBox:[200,200],path:"M 0 100 L 80 20 L 80 80 L 120 80 L 120 0 L 200 0 L 200 200 L 120 200 L 120 120 L 80 120 L 80 180 L 0 100 Z"},{viewBox:[200,200],path:"M 200 100 L 120 20 L 120 80 L 80 80 L 80 0 L 0 0 L 0 200 L 80 200 L 80 120 L 120 120 L 120 180 L 200 100 Z"},{viewBox:[200,200],path:"M 0 0 L 120 0 L 200 100 L 120 200 L 0 200 L 80 100 L 0 0 Z",pptxShapeType:"chevron"},{viewBox:[200,200],path:"M 80 0 L 200 0 L 120 100 L 200 200 L 80 200 L 0 100 L 80 0 Z"},{viewBox:[200,200],path:"M 0 0 L 140 0 L 200 100 L 140 200 L 0 200 L 0 100 L 0 0 Z",pptxShapeType:"homePlate"},{viewBox:[200,200],path:"M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 0 200 L 60 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 0 100 L 200 200 L 140 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 80 0 L 200 100 L 80 200 L 0 200 L 120 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 120 0 L 0 100 L 120 200 L 200 200 L 80 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 200 L 180 200 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 160 L 0 160 L 0 200 Z"},{viewBox:[200,200],path:"M 0 200 L 0 20 L 160 20 L 160 0 L 200 40 L 160 80 L 160 60 L 40 60 L 40 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 180 L 180 180 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 140 L 40 140 L 40 120 L 0 160 L 40 200 L 40 180 Z"},{viewBox:[1024,1024],path:"M398.208 302.912V64L0 482.112l398.208 418.176V655.36c284.48 0 483.584 95.552 625.792 304.64-56.896-298.688-227.584-597.312-625.792-657.088z",special:!0},{viewBox:[1024,1024],path:"M625.792 302.912V64L1024 482.112l-398.208 418.176V655.36C341.312 655.36 142.208 750.912 0 960c56.896-298.688 227.584-597.312 625.792-657.088z",special:!0}]},{type:"其他形状",children:[{viewBox:[1024,1024],path:"M995.336 243.4016c-15.7584-36.5736-38.3376-69.26639999-66.91440001-97.37280001-28.5768-27.98879999-61.73999999-49.8624-98.78399999-65.26799998-38.22-15.876-78.6744-23.8728-120.4224-23.87280001-57.97680001 0-114.5424 15.876-163.69919999 45.864-11.76 7.17360001-22.932 15.05279999-33.51600001 23.63760001-10.584-8.5848-21.75600001-16.46400001-33.51600001-23.63760001-49.1568-29.98799999-105.7224-45.86399999-163.69919999-45.864-41.74799999 0-82.2024 7.9968-120.4224 23.87280001-36.9264 15.28799999-70.2072 37.27919999-98.78399999 65.26799998-28.6944 28.10640001-51.156 60.79919999-66.91440001 97.37280001-16.34639999 37.9848-24.696 78.3216-24.696 119.83439999 0 39.1608 7.9968 79.96800001 23.8728 121.48080001 13.28880001 34.692 32.34000001 70.67760001 56.6832 107.016 38.57279999 57.5064 91.61040001 117.4824 157.4664 178.28160001 109.1328 100.78319999 217.2072 170.4024 221.79359999 173.22479998l27.87120001 17.8752c12.348 7.8792 28.224 7.8792 40.572 0l27.87119999-17.8752c4.58639999-2.94 112.54319999-72.44159999 221.79360001-173.22479998 65.85599999-60.79919999 118.89359999-120.7752 157.4664-178.28160001 24.3432-36.33839999 43.512-72.324 56.68319999-107.016 15.876-41.5128 23.8728-82.32 23.87280001-121.48080001 0.1176-41.5128-8.232-81.8496-24.5784-119.83439999z",special:!0},{viewBox:[1024,1024],path:"M985.20746667 343.50079998l-303.32586667-44.08319999L546.28693333 24.5248c-3.70346666-7.5264-9.79626667-13.6192-17.32266665-17.32266668-18.87573334-9.3184-41.81333333-1.55306667-51.25120001 17.32266668L342.1184 299.41759999l-303.32586667 44.08319999c-8.36266667 1.19466667-16.00853333 5.13706667-21.8624 11.11040001-14.69440001 15.17226667-14.45546667 39.30453334 0.71679999 54.1184l219.46026668 213.9648-51.84853333 302.1312c-1.43359999 8.24320001-0.11946667 16.8448 3.82293333 24.25173333 9.79626667 18.6368 32.9728 25.92426667 51.6096 16.00853334L512 822.44266665l271.3088 142.64320001c7.40693333 3.9424 16.00853333 5.25653333 24.25173333 3.82293333 20.78719999-3.584 34.7648-23.296 31.1808-44.0832l-51.84853333-302.1312 219.46026668-213.9648c5.97333334-5.85386666 9.91573333-13.49973334 11.11039999-21.8624 3.2256-20.90666667-11.34933333-40.26026667-32.256-43.36640001z",special:!0},{viewBox:[1024,1024],path:"M852.65066667 405.84533333C800.54044445 268.40177778 667.76177778 170.66666667 512.22755555 170.66666667S223.91466667 268.288 171.80444445 405.73155555C74.29688889 431.33155555 2.27555555 520.07822222 2.27555555 625.77777778c0 125.72444445 101.83111111 227.55555555 227.44177778 227.55555555h564.56533334C919.89333333 853.33333333 1021.72444445 751.50222222 1021.72444445 625.77777778c0-105.472-71.79377778-194.21866667-169.07377778-219.93244445z",special:!0},{viewBox:[1024,1024],path:"M926.25224691 323.7371485H654.6457886L898.88200917 15.14388241c5.05486373-6.53433603 0.49315743-16.02761669-7.76722963-16.02761668H418.30008701c-3.45210206 0-6.78091476 1.84934039-8.50696579 4.93157436L90.35039154 555.76772251c-3.82197013 6.53433603 0.86302552 14.7947231 8.50696578 14.79472311h215.01664245l-110.22068713 440.88274851c-2.34249783 9.61657002 9.24670194 16.39748478 16.39748477 9.49328065L933.03316167 340.62779071c6.41104668-6.0411786 2.09591911-16.8906422-6.78091476-16.89064221z",special:!0},{viewBox:[1024,1024],path:"M878.47822222 463.30311111c-22.18666667-49.83466667-53.93066667-93.98044445-94.32177777-131.072l-33.10933334-30.37866666c-4.89244445-4.32355555-12.62933333-2.38933333-14.79111111 3.75466666l-14.79111111 42.43911111c-9.216 26.624-26.16888889 53.81688889-50.176 80.55466667-1.59288889 1.70666667-3.41333333 2.16177778-4.66488889 2.27555556-1.25155555 0.11377778-3.18577778-0.11377778-4.89244445-1.70666667-1.59288889-1.36533333-2.38933333-3.41333333-2.27555555-5.46133333 4.20977778-68.49422222-16.27022222-145.74933333-61.09866667-229.83111112C561.26577778 124.01777778 509.72444445 69.51822222 445.32622222 31.51644445l-46.99022222-27.648c-6.144-3.64088889-13.99466667 1.13777778-13.65333333 8.30577777l2.50311111 54.61333333c1.70666667 37.31911111-2.61688889 70.31466667-12.85688889 97.73511112-12.51555555 33.56444445-30.49244445 64.73955555-53.47555556 92.72888888-16.15644445 19.56977778-34.24711111 37.20533333-54.04444444 52.45155556-47.90044445 36.75022222-87.38133333 84.65066667-114.11911111 138.24C125.72444445 502.10133333 111.50222222 562.74488889 111.50222222 623.50222222c0 53.70311111 10.58133333 105.69955555 31.51644445 154.73777778 20.25244445 47.21777778 49.152 89.77066667 85.90222222 126.17955555 36.864 36.40888889 79.64444445 65.08088889 127.31733333 84.992C405.61777778 1010.11911111 457.95555555 1020.58666667 512 1020.58666667s106.38222222-10.46755555 155.76177778-31.06133334c47.67288889-19.91111111 90.56711111-48.46933333 127.31733333-84.992 36.864-36.40888889 65.76355555-78.96177778 85.90222222-126.17955555 20.93511111-49.03822222 31.51644445-101.03466667 31.51644445-154.73777778 0-55.52355555-11.37777778-109.45422222-34.01955556-160.31288889z",special:!0},{viewBox:[1024,1024],path:"M968.20337778 20.11591112H705.44042667c-22.17301333 0-41.92483556 15.16430222-47.14951111 37.33731555C642.36202666 124.73685332 582.08711111 173.03324444 512 173.03324444s-130.36202666-48.29639112-146.29091556-115.58001777c-5.22467555-22.17301333-24.84906667-37.33731556-47.14951111-37.33731555H55.79662222c-30.96576 0-56.06968889 25.10392889-56.06968888 56.06968888v321.12639999c0 30.96576 25.10392889 56.06968889 56.06968888 56.06968889h95.57333334v494.43271112c0 30.96576 25.10392889 56.06968889 56.06968889 56.06968888h609.1207111c30.96576 0 56.06968889-25.10392889 56.06968889-56.06968888V453.38168888h95.57333334c30.96576 0 56.06968889-25.10392889 56.06968888-56.06968889V76.1856c0-30.96576-25.10392889-56.06968889-56.06968888-56.06968888z",special:!0},{viewBox:[1024,1024],path:"M980.94648889 239.80714666H523.46880001L373.99210666 96.82944c-1.91146667-1.78403556-4.46008889-2.80348444-7.00871111-2.80348445H43.05351111c-22.55530667 0-40.77795555 18.22264888-40.77795555 40.77795557v754.39217776c0 22.55530667 18.22264888 40.77795555 40.77795555 40.77795557h937.89297778c22.55530667 0 40.77795555-18.22264888 40.77795555-40.77795557V280.58510222c0-22.55530667-18.22264888-40.77795555-40.77795555-40.77795556z",special:!0},{viewBox:[1024,1024],path:"M972.60904597 164.57058577L841.30587843 33.39070759c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480282-29.3428675-26.75379095 0-51.90482023 10.47959553-70.76809219 29.3428675L558.60337778 174.68031322c-18.86327195 18.86327195-29.34286748 44.1375906-29.34286749 70.64480283 0 26.75379095 10.47959553 51.90482023 29.34286749 70.76809218l103.31648301 103.31648302c-24.28800376 53.50758189-57.69942011 101.59043198-99.24793416 143.13894603-41.42522469 41.67180341-89.63136414 75.08321976-143.13894603 99.61780223L316.21649759 558.84995649c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480283-29.34286747-26.75379095 0-51.90482023 10.47959553-70.76809217 29.34286747L33.39070759 700.01627278c-18.86327195 18.86327195-29.34286748 44.1375906-29.3428675 70.76809217 0 26.75379095 10.47959553 51.90482023 29.3428675 70.76809219l131.05658883 131.05658883c30.08260365 30.205893 71.63111769 47.34311394 114.28923598 47.34311394 9.00012323 0 17.63037836-0.73973616 26.13734414-2.21920846 166.19405621-27.37023774 331.03192945-115.76870829 464.06114804-248.67463751C901.84095379 636.27567408 990.11613498 471.56109018 1017.85624079 304.87387654c8.38367642-50.91850535-8.50696579-103.31648302-45.24719482-140.30329077z",special:!0},{viewBox:[1024,1024],path:"M910.60451556 640.96028445c-20.38897778-65.49959112-43.83630221-120.54983112-79.89930667-210.64362666C836.31217778 193.67708444 737.93535999 2.27555556 511.36284444 2.27555556 282.24170667 2.27555556 186.03121778 197.50001778 192.14791111 430.31665779c-36.19043555 90.22122667-59.51032888 144.88917333-79.89930667 210.64362666-43.32657778 139.53706668-29.30915556 197.26336001-18.60494222 198.53767111 22.9376 2.80348444 89.32920888-105.00323556 89.32920889-105.00323556 0 62.44124445 32.11264001 143.86972444 101.69002667 202.61546667-33.64181333 10.32192-109.20846222 38.10190221-91.24067556 68.55793777 14.52714667 24.59420444 250.01984 15.67402668 317.94062222 8.02816 67.92078222 7.64586667 303.41347556 16.56604444 317.94062223-8.02816 17.96778667-30.32860444-57.72629333-58.23601779-91.24067555-68.55793777 69.57738667-58.87317334 101.69002667-140.30165333 101.69002667-202.61546667 0 0 66.39160889 107.80672 89.32920888 105.00323556 10.83164445-1.40174222 24.84906667-59.12803556-18.47751111-198.53767111z",special:!0},{viewBox:[1024,1024],path:"M1016.86992592 199.24764445c-37.13706667 16.01991111-77.55093333 27.54939259-119.17842962 32.03982222 42.96248889-25.60758518 75.60912592-66.02145185 91.02222222-114.08118519-39.68568889 23.66577778-84.58998518 41.02068148-131.31472593 50.00154074C819.53374815 126.79395555 765.76995555 101.79318518 706.18074075 101.79318518c-114.688 0-206.92385185 92.96402963-206.92385186 207.04521482 0 16.01991111 1.94180741 32.03982222 5.09724444 47.45291852-171.72859259-8.98085925-324.88865185-91.02222222-426.71217778-216.63288889-17.96171852 30.82619259-28.15620741 66.02145185-28.1562074 104.49351112 0 71.84687408 36.53025185 135.19834075 92.23585185 172.45677036-33.98162963-1.33499259-66.02145185-10.92266667-93.57084445-26.33576296v2.54862222c0 100.6098963 71.1186963 183.98625185 165.90317037 203.1616-17.3549037 4.49042963-35.92343703 7.03905185-54.49197037 7.03905185-13.47128889 0-26.2144-1.33499259-39.07887407-3.15543704C146.69748148 681.90814815 223.03478518 741.49736297 313.93564445 743.43917037c-71.1186963 55.7056-160.19911111 88.4736-256.9253926 88.4736-17.3549037 0-33.37481482-0.60681482-50.00154074-2.54862222C98.75911111 888.22518518 207.62168889 922.20681482 324.85831111 922.20681482 705.45256297 922.20681482 913.71140741 606.90583703 913.71140741 333.23235555c0-8.98085925 0-17.96171852-0.60681482-26.94257777 40.2925037-29.4912 75.60912592-66.02145185 103.76533333-107.04213333z",special:!0},{viewBox:[1024,1024],path:"M917.96720197 1.08889505H106.03279803C53.56084718 1.08889505 9.37393998 45.27580225 9.37393998 97.74775309v5.52336372c0 19.33177108 8.28504494 41.42522469 22.0934536 55.23363205l331.40179753 392.15879462v325.87843379c0 16.57008987 8.28504494 30.37849854 22.09345359 35.90186098l209.88780469 104.94390299 2.76168121 2.76168121c27.61681602 11.04672615 55.23363335-8.28504494 55.23363335-38.66354218V550.66354348l331.40179753-392.15879462c35.90186097-41.42522469 30.37849854-102.18222047-11.04672616-135.32240022-11.04672615-13.80840865-33.14017975-22.0934536-55.23363335-22.09345359z",special:!0},{viewBox:[1024,1024],path:"M491.70164031 97.48884502a25.89076502 25.89076502 0 0 1 40.59671938 0L745.66415762 367.01171317a25.89076502 25.89076502 0 0 0 30.49932208 7.72839349l208.00640948-89.14190458a25.89076502 25.89076502 0 0 1 35.56096592 29.06238339l-115.18801541 554.96855704A103.56306132 103.56306132 0 0 1 803.14165689 952.14301275H220.85834311a103.56306132 103.56306132 0 0 1-101.4011828-82.51387024l-115.18801541-554.96855704a25.89076502 25.89076502 0 0 1 35.54802012-29.06238339l208.01935528 89.14190458a25.89076502 25.89076502 0 0 0 30.49932208-7.72839349l213.36579793-269.52286815z",special:!0},{viewBox:[1024,1024],path:"M643.02466884 387.7801525c19.85376751-88.69205333 33.718272-152.84087467 41.61900049-192.57389433C704.52292267 95.17283515 652.90057916 2.27555515 550.58614084 2.27555515c-92.26012484 0-138.59407685 45.84971417-165.91530666 137.49816969l-0.70087152 2.67605334c-16.40038399 74.13942085-41.47882668 131.61085116-74.6746315 172.73287031a189.06953915 189.06953915 0 0 1-143.04142182 70.44391902l-26.17434983 0.5606965C77.66380049 387.52529067 27.76177817 438.90551468 27.76177817 501.84374084V881.55022182c0 77.4144 62.25009818 140.17422182 139.05282766 140.17422303h492.82707951c101.23127467 0 191.59267516-63.995904 225.93535999-159.98976l102.37815468-286.22301868c26.04691951-72.82688-11.39234134-153.15945284-83.63303784-179.42300483a138.04612267 138.04612267 0 0 0-47.17499733-8.30850884H643.02466884z",special:!0},{viewBox:[1024,1024],path:"M512 512c140.82958222 0 254.86222222-114.03264 254.86222222-254.86222222S652.82958222 2.27555555 512 2.27555555a254.78940445 254.78940445 0 0 0-254.86222222 254.86222223C257.13777778 397.96736 371.17041778 512 512 512z m0 72.81777778c-170.10232889 0-509.72444445 97.57582222-509.72444445 291.27111111v145.63555556h1019.4488889v-145.63555556c0-193.69528889-339.62211555-291.27111111-509.72444445-291.27111111z",special:!0},{viewBox:[1024,1024],path:"M1019.81297778 564.50161779l-138.89991111-472.51456c-8.66531556-25.99594668-29.43658667-43.45400889-57.21656889-43.45400891s-50.33528889 15.67402668-59.00060446 41.66997334l-92.00526221 274.48661334H351.69166222L259.6864 90.33045333c-8.66531556-25.99594668-31.22062222-41.66997333-59.00060444-41.66997332s-50.33528889 17.33063112-57.2165689 43.45400887L4.69674667 564.50161779c-5.22467555 17.33063112 1.78403556 36.44529778 15.67402667 46.89464887l491.11950221 368.27591113 492.77610666-368.27591113c13.76256-10.32192 20.77127111-29.43658667 15.54659557-46.89464887z",special:!0},{viewBox:[1024,1024],path:"M927.78951111 340.39277037c-12.01493333-47.81700741 12.01493333-124.03294815 89.08041481-150.97552592l-82.40545184-4.36906667s-31.19028148-109.22666667-174.27721483-118.9357037c-143.08693333-9.8304-236.65777778-3.64088889-236.65777777-3.6408889s106.07122963 67.47780741 63.5941926 187.74850371c-31.06891852 63.71555555-79.85682963 116.02299259-132.04290371 175.61220741-1.57771852 1.57771852-3.03407408 3.15543703-4.2477037 4.49042962C278.25493333 624.86755555 7.13007408 934.34311111 7.13007408 934.34311111c298.43152592 78.15774815 498.43768889-7.64586667 616.76657777-110.56165926 24.87940741-0.24272592 43.5693037-0.36408889 56.19105185-0.36408888 164.8109037 0 304.13558518-142.72284445 298.43152593-301.4656-3.88361482-109.1053037-38.71478518-133.74198518-50.72971852-181.5589926z",special:!0},{viewBox:[1024,1024],path:"M997.8886764 504.17210418L537.2729208 43.89182982c-13.97838539-13.97838539-36.56745619-13.97838539-50.5458416 0L26.1113236 504.17210418c-13.41924998 13.41924998-21.02349164 31.64706454-21.02349163 50.65766867 0 39.47496036 32.09437288 71.56933323 71.56933324 71.56933323h48.53295408V954.83524937c0 19.79339373 15.99127289 35.78466661 35.78466663 35.78466662H440.43066677V740.12724968h125.24633315v250.49266631h297.34821416c19.79339373 0 35.78466661-15.99127289 35.78466663-35.78466662V626.39910608h48.53295408c19.01060414 0 37.23841869-7.49241457 50.65766869-21.02349163 27.84494371-27.95677079 27.84494371-73.24673948-0.11182708-101.20351027z",special:!0},{viewBox:[1024,1024],path:"M1009.13013121 349.27572283L674.72427717 14.86986879c-8.82158299-8.82158299-20.35749924-13.16451618-31.89341544-13.16451618s-23.07183245 4.34293316-31.89341547 13.16451618L392.29790453 233.6451272c-16.5574327-1.90003326-33.25058207-2.71433322-49.94373146-2.71433324-99.34459624 0-198.68919249 32.70771543-280.25490606 98.12314628-20.90036589 16.69314938-22.52896582 48.04369819-3.66434987 67.04403081l246.59717401 246.59717401-292.33368895 292.06225564c-3.52863319 3.52863319-5.83581644 8.27871636-6.24296642 13.30023282l-4.61436649 50.48659809c-1.22144996 12.75736619 8.95729967 23.6146991 21.57894918 23.6146991 0.6785833 0 1.35716662 0 2.03574992-0.13571666l50.48659809-4.61436649c5.02151649-0.40714999 9.77159962-2.71433322 13.30023282-6.24296643l292.33368896-292.33368896 246.59717402 246.59717401c8.82158299 8.82158299 20.35749924 13.16451618 31.89341544 13.16451618 13.16451618 0 26.19331567-5.70009979 35.15061536-16.82886604 76.40848044-95.40881307 108.16617924-214.83947521 95.27309638-330.33435417l218.63954175-218.63954173c17.50744934-17.37173267 17.50744934-45.8722316 0-63.51539759z",special:!0},{viewBox:[1024,1024],path:"M976.62005979 160.47737905c-0.39452595-0.39452595-80.35178503 78.64217259-239.47725131 237.50462156l-111.6508437-111.65084369 237.89914752-237.89914752c-125.19623464-75.35445635-286.03131335-56.02268482-390.31767264 48.26367449-81.92988882 81.92988882-112.57140424 200.15616502-83.37648398 310.09739626l2.36715569 8.81107954-372.82702222 372.69551356c-8.15353628 8.15353628-8.15353628 21.56741857 0 29.72095487l185.95323084 185.95323084c8.15353628 8.15353628 21.56741857 8.15353628 29.72095485 0l372.56400493-372.56400493 8.81107953 2.3671557c110.07273989 29.32642892 228.29901608-1.18357785 310.36041356-83.24497533 104.41786795-104.2863593 123.74963948-265.12143802 49.97328693-390.05465535z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m220.16 343.26755556l-239.616 332.23111111c-14.44977778 20.13866667-44.37333333 20.13866667-58.82311111 0L291.84 481.16622222c-4.32355555-6.03022222 0-14.44977778 7.39555555-14.44977777h53.36177778c11.60533333 0 22.64177778 5.57511111 29.46844445 15.13244444l81.00977777 112.41244444 178.85866667-248.03555555c6.82666667-9.44355555 17.74933333-15.13244445 29.46844445-15.13244445H724.76444445c7.39555555 0 11.71911111 8.41955555 7.39555555 14.44977778z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h418.70222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m188.18844445 703.37422223l-75.09333334-0.34133333L512 570.48177778l-112.98133333 134.71288889-75.20711112 0.34133333c-5.00622222 0-9.10222222-3.98222222-9.10222222-9.10222222 0-2.16177778 0.79644445-4.20977778 2.16177778-5.91644445l148.02488889-176.35555555L316.87111111 337.92c-1.36533333-1.70666667-2.16177778-3.75466667-2.16177778-5.91644445 0-5.00622222 4.096-9.10222222 9.10222222-9.10222222l75.20711112 0.34133334L512 458.06933333l112.98133333-134.71288888 75.09333334-0.34133334c5.00622222 0 9.10222222 3.98222222 9.10222222 9.10222222 0 2.16177778-0.79644445 4.20977778-2.16177778 5.91644445L559.21777778 514.27555555l147.91111111 176.35555556c1.36533333 1.70666667 2.16177778 3.75466667 2.16177778 5.91644444 0 5.00622222-4.096 9.10222222-9.10222222 9.10222223z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H548.40888889v172.94222222c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222h-54.61333334c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V548.40888889H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h172.94222222V302.64888889c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h54.61333334c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v172.94222222h172.94222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m163.95377778 517.57511112L427.46311111 700.64355555c-1.59288889 1.13777778-3.41333333 1.70666667-5.34755556 1.70666667-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V331.88977778c0-1.93422222 0.56888889-3.75466667 1.70666667-5.34755556 2.95822222-4.096 8.64711111-5.00622222 12.74311111-2.048L675.95377778 505.17333333c0.79644445 0.56888889 1.47911111 1.25155555 2.048 2.048 2.95822222 3.98222222 2.048 9.67111111-2.048 12.62933334z",special:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m200.81777778 666.39644445l-32.54044445 44.37333333c-2.95822222 4.096-8.64711111 4.89244445-12.74311111 1.93422222L479.34577778 577.76355555c-2.38933333-1.70666667-3.75466667-4.43733333-3.75466667-7.39555555V257.13777778c0-5.00622222 4.096-9.10222222 9.10222222-9.10222223h54.72711112c5.00622222 0 9.10222222 4.096 9.10222222 9.10222223v281.6l162.24711111 117.30488889c4.096 2.84444445 5.00622222 8.53333333 2.048 12.62933333z",special:!0},{viewBox:[1024,1024],path:"M981.10577778 314.48177778c-25.6-61.09866667-62.464-115.93955555-109.34044445-163.04355556-46.87644445-46.99022222-101.60355555-83.968-162.70222222-109.568C646.59911111 15.58755555 580.38044445 2.27555555 512 2.27555555h-2.27555555c-68.83555555 0.34133333-135.39555555 13.99466667-198.08711112 40.84622223-60.52977778 25.94133333-114.80177778 62.80533333-161.22311111 109.79555555-46.42133333 46.99022222-82.83022222 101.60355555-108.08888889 162.47466667C16.27022222 378.42488889 3.072 445.44 3.41333333 514.38933333c0.34133333 78.96177778 19.22844445 157.35466667 54.49955556 227.44177778v172.94222222c0 28.89955555 23.43822222 52.33777778 52.224 52.33777778h172.71466666c69.97333333 35.38488889 148.13866667 54.272 226.98666667 54.61333334h2.38933333c68.03911111 0 133.91644445-13.19822222 196.03911112-39.02577778 60.75733333-25.37244445 115.37066667-61.78133333 162.13333333-108.31644445 46.87644445-46.53511111 83.74044445-100.92088889 109.568-161.56444444 26.73777778-62.80533333 40.39111111-129.59288889 40.73244445-198.54222223 0.22755555-69.29066667-13.19822222-136.53333333-39.59466667-199.79377777zM284.89955555 566.61333333c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955556 54.61333333-24.34844445 54.61333333-54.49955556 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955556-54.61333333s24.46222222-54.61333333 54.49955556-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM745.4750693 325.8561164l-267.95558363 371.52436096c-16.15876501 22.52048353-49.62140436 22.52048353-65.78016939 0L253.07805667 477.51948567c-4.83490607-6.74342161 0-16.15876501 8.27023406-16.15876499h59.67291961c12.97790576 0 25.31963967 6.23448413 32.95370188 16.92217123l90.59087157 125.70755774 200.01242995-277.37092701c7.63406221-10.56045272 19.84856175-16.92217125 32.95370189-16.92217124H737.20483524c8.27023407 0 13.10514012 9.41534338 8.27023406 16.158765z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h468.2224823c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM720.79160148 697.63494611c5.59831228 6.61618726 0.8906406 16.6677025-7.76129658 16.66770249h-74.94104404c-5.98001539 0-11.70556205-2.67192177-15.64982754-7.25235911L512 575.36271635l-110.43943332 131.68757314c-3.81703111 4.58043732-9.54257777 7.25235911-15.64982754 7.25235911H310.9696951c-8.65193717 0-13.35960887-10.05151525-7.76129658-16.66770249L458.81603326 512 303.20839852 326.36505389c-5.59831228-6.61618726-0.8906406-16.6677025 7.76129658-16.66770249h74.94104404c5.98001539 0 11.70556205 2.67192177 15.64982754 7.25235911L512 448.63728365l110.43943332-131.68757314c3.81703111-4.58043732 9.54257777-7.25235911 15.64982754-7.25235911H713.0303049c8.65193717 0 13.35960887 10.05151525 7.76129658 16.66770249L565.18396674 512l155.60763474 185.63494611z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM677.02297814 523.19662459L423.31764398 722.70011704c-9.41534338 7.37959347-23.28388974 0.76340622-23.28388975-11.19662459V312.62374191c0-11.9600308 13.86854636-18.70345241 23.28388975-11.19662457l253.70533416 199.37625807c7.25235911 5.72554666 7.25235911 16.6677025 0 22.39324918z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H552.71499847v193.39624268c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962h-61.0724977c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962V552.71499847H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h193.39624268V277.88875885c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h61.0724977c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v193.39624268h193.39624268c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M902.67315697 135.41705551L528.62204754 7.94466448C524.10877635 6.40354749 518.05438818 5.63298899 512 5.63298899s-12.10877635 0.7705585-16.62204754 2.31167549L121.32684303 135.41705551c-9.13662215 3.08223399-16.62204754 13.64989334-16.62204753 23.33691443v531.02488283c0 9.68702108 6.27454775 22.45627614 13.87005291 28.51066431L498.0198673 1013.9638196c3.85279247 2.9721542 8.8063828 4.51327118 13.87005291 4.51327118s10.12734022-1.54111698 13.87005291-4.51327118l379.4450189-295.67430252c7.59550517-5.94430839 13.87005291-18.71356345 13.87005291-28.51066431V158.75396994c0.22015956-9.68702108-7.26526581-20.14460066-16.40188796-23.33691443zM712.89560763 323.43332829L478.86598471 645.63685899c-7.04510625 9.68702108-21.57563786 9.68702108-28.6207441 0l-139.14084824-191.5388259c-4.18303182-5.8342286 0-13.9801327 7.15518603-13.9801327h60.76404132c5.61406904 0 11.0079785 2.75199463 14.31037204 7.26526582l71.22162091 97.97100864 166.11039557-228.74579323c3.30239355-4.51327118 8.58622323-7.26526581 14.31037204-7.26526581H705.7404216c7.15518602 0.11007979 11.33821785 8.25598388 7.15518603 14.09021248z",special:!0},{viewBox:[1024,1024],path:"M959.86498307 186.28001231H797.00498922v-101.78749614c0-44.91373267-36.51626425-81.42999692-81.42999691-81.42999693H308.42500769c-44.91373267 0-81.42999692 36.51626425-81.42999691 81.42999693v101.78749614H64.13501693c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499847v40.71499845c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874962h76.8495596l31.42688945 665.43575611c2.03574992 43.38692024 37.91584233 77.61296581 81.30276254 77.6129658h577.64404066c43.5141546 0 79.26701262-34.09881122 81.30276254-77.6129658l31.42688945-665.43575611H990.40123192c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874962v-40.71499845c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499847z m-254.46874039 0H318.60375732v-91.60874653h386.79248536v91.60874653z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 248.62485371H654.50249462V104.85001539c0-22.52048353-18.19451494-40.71499847-40.71499847-40.71499846H94.67126578v-50.89374808c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-71.25124732c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v997.5174623c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h71.25124732c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961V674.85999383h315.54123807v143.77483833c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h529.29497999c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V289.33985217c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846z",special:!0},{viewBox:[1024,1024],path:"M804.63905145 265.16532183V94.67126578h109.42155836c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961H109.93939019c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h109.42155836v170.49405605c0 103.6960117 53.94737296 194.92305513 135.3773699 246.83467817-81.42999692 51.91162303-135.37736988 143.13866646-135.3773699 246.83467817v170.49405605h-109.42155836c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h804.12121962c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-109.42155836V758.83467817c0-103.6960117-53.94737296-194.92305513-135.3773699-246.83467817 81.42999692-51.91162303 135.37736988-143.13866646 135.3773699-246.83467817z",special:!0},{viewBox:[1024,1024],path:"M1020.928 448.44373333l-35.36213334-373.4528c-1.79200001-19.3536-17.2032-34.64533332-36.55679999-36.55679999L575.55626667 3.072h-0.47786666c-3.82293334 0-6.8096 1.19466667-9.07946669 3.46453333L6.53653333 565.99893332c-4.65919999 4.65919999-4.65919999 12.1856 0 16.84480001l434.61973334 434.61973334c2.26986667 2.26986667 5.25653333 3.46453333 8.48213333 3.46453333s6.21226667-1.19466667 8.48213333-3.46453333l559.46239999-559.46239999c2.38933332-2.5088 3.584-5.97333334 3.34506668-9.55733335zM735.40266668 362.66666667c-42.17173333 0-76.45866667-34.28693333-76.45866667-76.45866667s34.28693333-76.45866667 76.45866667-76.45866667 76.45866667 34.28693333 76.45866665 76.45866667-34.28693333 76.45866667-76.45866665 76.45866667z",special:!0}]},{type:"线性",children:[{viewBox:[1024,1024],path:"M1009.55537674 75.96950982l-61.38012212-61.38012214c-4.48769762-4.48769762-11.870684-4.48769762-16.3583816 0L14.44462326 931.67210859c-4.48769762 4.48769762-4.48769762 11.870684 0 16.35838159l61.38012212 61.38012214c4.48769762 4.48769762 11.870684 4.48769762 16.3583816 0L1009.41061232 92.18312698c4.63246205-4.34293316 4.63246205-11.72591956 0.14476442-16.21361716zM210.88996692 419.35075905c114.94296453 0 208.46079213-93.51782759 208.46079213-208.46079213s-93.51782759-208.46079213-208.46079213-208.4607921-208.46079213 93.51782759-208.4607921 208.4607921 93.51782759 208.46079213 208.4607921 208.46079213z m0-312.69118816c57.47148228 0 104.23039605 46.75891379 104.23039607 104.23039603s-46.75891379 104.23039605-104.23039607 104.23039607-104.23039605-46.75891379-104.23039603-104.23039607 46.75891379-104.23039605 104.23039603-104.23039603zM813.11003308 604.64924095c-114.94296453 0-208.46079213 93.51782759-208.46079213 208.46079213s93.51782759 208.46079213 208.46079213 208.4607921 208.46079213-93.51782759 208.4607921-208.4607921-93.51782759-208.46079213-208.4607921-208.46079213z m0 312.69118816c-57.47148228 0-104.23039605-46.75891379-104.23039607-104.23039603s46.75891379-104.23039605 104.23039607-104.23039607 104.23039605 46.75891379 104.23039603 104.23039607-46.75891379 104.23039605-104.23039603 104.23039603z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1004.96017383 478.58365209L483.27851088 25.80594621c-4.00443838-3.45210207-9.11354943-5.3852792-14.49882864-5.38527921h-122.20441284c-10.21822208 0-14.91308089 12.70373557-7.18037228 19.33177152l483.57045622 419.77561022H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672657v82.85044938c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672657h807.92996557L339.25681303 984.24756148c-7.7327086 6.76612003-3.0378498 19.33177153 7.18037229 19.33177152h126.34693531c2.62359757 0 5.24719513-0.96658859 7.18037228-2.76168164L1004.96017383 545.41634791c20.2983601-17.67476253 20.2983601-49.1579333 0-66.83269582z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1011.38217956 558.9924242L545.80649025 22.43713295c-17.81503843-20.62055629-49.79794206-20.62055629-67.75325638 0L12.61782044 558.9924242c-6.31241519 7.29434645-1.12220714 18.51641789 8.41655359 18.51641789h113.62347344c6.45269109 0 12.62483038-2.80551785 16.97338308-7.71517411L458.69516062 215.87758959V1005.77114384c0 6.1721393 5.04993216 11.22207145 11.22207144 11.22207145h84.16553588c6.1721393 0 11.22207145-5.04993216 11.22207144-11.22207145V215.87758959l307.06393007 353.91607839c4.20827679 4.90965626 10.38041608 7.71517413 16.97338308 7.71517411h113.62347344c9.53876074 0 14.72896878-11.22207145 8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1009.1026963 459.52804874H201.17273073l483.57045624-419.77561022c7.7327086-6.76612003 3.0378498-19.33177153-7.18037229-19.33177152h-122.20441283c-5.3852792 0-10.49439025 1.93317715-14.49882866 5.38527921L19.03982617 478.58365209c-20.2983601 17.67476253-20.2983601 49.1579333 0 66.69461175L543.89742302 1000.81765136c2.07126124 1.79509307 4.55677472 2.76168163 7.18037228 2.76168164h126.3469353c10.21822208 0 14.91308089-12.70373557 7.18037228-19.33177152L201.17273073 564.47195126H1009.1026963c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672657v-82.85044938c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672657z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1002.96562597 446.49115791h-113.62347344c-6.45269109 0-12.62483038 2.80551785-16.97338308 7.71517411L565.30483938 808.12241041V18.22885616c0-6.1721393-5.04993216-11.22207145-11.22207144-11.22207145h-84.16553588c-6.1721393 0-11.22207145 5.04993216-11.22207144 11.22207145v789.89355425L151.63123055 454.20633202c-4.20827679-4.90965626-10.38041608-7.71517413-16.97338308-7.71517411h-113.62347344c-9.53876074 0-14.72896878 11.36234735-8.41655359 18.51641789L478.19350975 1001.56286705c17.81503843 20.62055629 49.79794206 20.62055629 67.75325638 0L1011.38217956 465.0075758c6.31241519-7.29434645 1.12220714-18.51641789-8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M975.82443246 622.46726585H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672658v82.85044937c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672659h835.6848661L651.32683905 980.10503902c-5.66144737 7.18037229-0.55233633 17.9509307 8.69929718 17.9509307h100.11095967c6.76612003 0 13.11798782-3.0378498 17.39859437-8.42312903l233.08593092-295.63802022c22.78387358-28.99765728 2.20934532-71.52755463-34.79718873-71.52755462zM1009.1026963 296.58883161H173.4178302l199.25533075-252.69387063c5.66144737-7.18037229 0.55233633-17.9509307-8.69929718-17.9509307h-100.11095967c-6.76612003 0-13.11798782 3.0378498-17.39859437 8.42312903L13.37837881 330.00517953c-22.78387358 28.99765728-2.20934532 71.52755463 34.65910466 71.52755462h961.06521283c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672658v-82.85044937c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1010.75873115 64.13501693H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874964h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874964v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961zM1010.75873115 858.07748691H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874964v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874964zM1010.75873115 461.10625194H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874959v81.42999694c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874959h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874959v-81.42999694c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874959z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M591.98717801 512l405.34042913-483.16579151c6.79427767-8.02960089 1.08090782-20.22841761-9.41933951-20.2284176h-123.22349044c-7.25752386 0-14.20621693 3.24272343-18.99309439 8.80167789L511.38233839 415.95362022 177.07299399 17.40746878c-4.63246205-5.55895447-11.58115512-8.80167789-18.99309439-8.80167789H34.85640916c-10.50024731 0-16.21361717 12.19881672-9.41933952 20.2284176L430.77749876 512 25.43706964 995.16579151c-6.79427767 8.02960089-1.08090782 20.22841761 9.41933952 20.2284176h123.22349044c7.25752386 0 14.20621693-3.24272343 18.99309439-8.80167789l334.3093444-398.54615144 334.30934441 398.54615144c4.63246205 5.55895447 11.58115512 8.80167789 18.99309439 8.80167789h123.22349044c10.50024731 0 16.21361717-12.19881672 9.41933951-20.2284176L591.98717801 512z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M953.5488 832.61667556c-24.08448-57.08913778-58.74574221-108.31644445-102.70947556-152.28017777-43.96373333-43.96373333-95.19104-78.49756444-152.28017777-102.70947558-0.50972445-0.25486222-1.01944888-0.38229333-1.52917334-0.63715555C776.41955556 519.64586667 828.02915556 426.23886221 828.02915556 320.85333332c0-174.58062221-141.44853334-316.02915556-316.02915556-316.02915554S195.97084444 146.27271111 195.97084444 320.85333332c0 105.38552889 51.6096 198.79253333 130.99918223 256.26396447-0.50972445 0.25486222-1.01944888 0.38229333-1.52917334 0.63715555-57.08913778 24.08448-108.31644445 58.61831112-152.28017777 102.70947554-43.96373333 43.96373333-78.49756444 95.19104-102.70947556 152.28017779C46.74901333 888.55893332 34.13333334 947.8144 32.85902222 1008.72647111c-0.12743111 5.7344 4.46008889 10.44935111 10.19448889 10.44935111h76.45866667c5.60696888 0 10.06705778-4.46008889 10.19448889-9.93962666 2.54862221-98.37681778 42.05226667-190.50951112 111.88451555-260.34176001 72.25344-72.25344 168.20906666-112.01194667 270.40881778-112.01194667s198.15537778 39.75850667 270.40881778 112.01194667C852.24106667 818.72668444 891.74471111 910.85937779 894.29333333 1009.23619556c0.12743111 5.60696888 4.58752 9.93962667 10.19448889 9.93962666h76.45866667c5.7344 0 10.32192-4.71495112 10.19448889-10.44935111-1.27431111-60.91207112-13.88999112-120.16753779-37.59217778-176.10979555zM512 540.03484444c-58.49088 0-113.54112-22.81016889-154.95623111-64.22527999S292.81848888 379.34421333 292.81848888 320.85333332c0-58.49088 22.81016889-113.54112 64.22528001-154.9562311S453.50912 101.67182221 512 101.67182221s113.54112 22.81016889 154.95623111 64.22528001S731.18151112 262.36245333 731.18151112 320.85333332c0 58.49088-22.81016889 113.54112-64.22528001 154.95623113S570.49088 540.03484444 512 540.03484444z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 111.50222222H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888889v728.17777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h946.6311111c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V147.91111111c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888889z m-45.5111111 126.06577778V830.57777778H84.19555555V237.568l-31.40266666-24.46222222 44.71466666-57.45777778 48.6968889 37.888h731.70488888l48.69688889-37.888 44.71466667 57.45777778-31.51644444 24.46222222z M877.90933333 193.42222222L512 477.86666667 146.09066667 193.42222222l-48.69688889-37.888-44.71466667 57.45777778 31.40266667 24.46222222 388.66488889 302.19377778c22.98311111 17.86311111 55.18222222 17.86311111 78.16533333 0L939.80444445 237.568l31.40266666-24.46222222-44.71466666-57.45777778-48.58311112 37.77422222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 88.74666667H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888888v564.33777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h432.35555555v127.43111111H275.34222222c-10.01244445 0-18.20444445 8.192-18.20444444 18.20444445v54.61333333c0 5.00622222 4.096 9.10222222 9.10222222 9.10222222h491.52c5.00622222 0 9.10222222-4.096 9.10222222-9.10222222v-54.61333333c0-10.01244445-8.192-18.20444445-18.20444444-18.20444445H552.96V725.90222222h432.35555555c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V125.15555555c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888888z m-45.5111111 555.23555555H84.19555555V170.66666667h855.6088889v473.31555555z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m0 932.97777778c-233.69955555 0-423.25333333-189.55377778-423.25333333-423.25333333 0-101.26222222 35.61244445-194.33244445 95.00444444-267.15022222l595.39911111 595.39911111C706.33244445 899.64088889 613.26222222 935.25333333 512 935.25333333z m328.24888889-156.10311111L244.84977778 183.75111111C317.66755555 124.35911111 410.73777778 88.74666667 512 88.74666667c233.69955555 0 423.25333333 189.55377778 423.25333333 423.25333333 0 101.26222222-35.61244445 194.33244445-95.00444444 267.15022222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M901.80266667 257.82044445L656.95288889 12.97066667c-6.82666667-6.82666667-16.04266667-10.69511111-25.71377778-10.69511112H147.91111111c-20.13866667 0-36.40888889 16.27022222-36.40888889 36.4088889v946.6311111c0 20.13866667 16.27022222 36.40888889 36.40888889 36.4088889h728.17777778c20.13866667 0 36.40888889-16.27022222 36.40888889-36.4088889V283.648c0-9.67111111-3.86844445-19.00088889-10.69511111-25.82755555zM828.52977778 300.37333333H614.4V86.24355555L828.52977778 300.37333333z m2.048 639.43111112H193.42222222V84.19555555h343.60888889v245.76c0 26.39644445 21.39022222 47.78666667 47.78666667 47.78666667h245.76v562.06222223z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M981.07392 55.79662222H42.92608c-31.22062222 0-50.71758221 34.02410666-35.04355556 61.16693334L304.28728889 620.82616888V927.42542221c0 22.55530667 18.09521779 40.77795555 40.52309333 40.77795557h334.37923556c22.42787556 0 40.52309333-18.22264888 40.52309333-40.77795557V620.82616888L1016.24490667 116.96355556c15.54659555-27.14282666-3.95036444-61.16693333-35.17098667-61.16693334zM628.47203556 876.45297779H395.52796444V677.66044445h233.07150222v198.79253334z m12.23338666-301.50200891l-12.10595556 21.15356445h-233.19893332l-12.10595556-21.15356445L130.59868445 147.54702221h762.8026311L640.70542222 574.95096888z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M980.62285431 4.54099753H654.39920987c-4.2719763 0-7.76722963 3.49525333-7.76722962 7.76722964v72.4941432c0 4.2719763 3.49525333 7.76722963 7.76722962 7.76722963h207.64393877L604.04167111 350.57107753c-64.72691358-49.83972347-143.69374815-76.7661195-226.67365136-76.7661195-99.54999309 0-193.27456395 38.83614815-263.5679921 109.25903012S4.54099753 547.08198717 4.54099753 646.63198025s38.83614815 193.27456395 109.25903012 263.5679921C184.09345581 980.62285431 277.81802667 1019.45900247 377.36801975 1019.45900247s193.27456395-38.83614815 263.5679921-109.25903012C711.35889383 839.90654419 750.19504197 746.18197333 750.19504197 646.63198025c0-82.9799032-26.92639605-161.68783013-76.63666567-226.41474372L931.4304 162.34521283V369.60079013c0 4.2719763 3.49525333 7.76722963 7.76722963 7.76722962h72.4941432c4.2719763 0 7.76722963-3.49525333 7.76722964-7.76722962V43.37714569c0-21.35988148-17.47626667-38.83614815-38.83614816-38.83614816zM377.36801975 921.07409383c-151.33152395 0-274.44211358-123.11058963-274.44211358-274.44211358s123.11058963-274.44211358 274.44211358-274.44211358 274.44211358 123.11058963 274.44211358 274.44211358-123.11058963 274.44211358-274.44211358 274.44211358z",special:!0,outlined:!0}]}],ca={bar:"bar",horizontalBar:"bar",line:"line",area:"line",scatter:"line",pie:"pie",ring:"pie"};var da=()=>{const e=J(),t=(0,D.debounce)((function(){e.addSnapshot()}),300,{trailing:!0}),l=(0,D.throttle)((function(){e.reDo()}),100,{leading:!0,trailing:!1}),a=(0,D.throttle)((function(){e.unDo()}),100,{leading:!0,trailing:!1});return{addHistorySnapshot:t,redo:l,undo:a}},pa=()=>{const e=R(),t=$(),{creatingElement:l}=(0,o.Jk)(e),{theme:a,viewportRatio:n}=(0,o.Jk)(t),{addHistorySnapshot:i}=da(),s=(a,n)=>{t.addElement(a),e.setActiveElementIdList([a.id]),l.value&&e.setCreatingElement(null),setTimeout((()=>{e.setEditorareaFocus(!0)}),0),n&&n(),i()},u=e=>{aa(e).then((({width:t,height:l})=>{const a=l/t;aoa?(t=oa,l=t*a):l>oa*n.value&&(l=oa*n.value,t=l/a),s({type:"image",id:(0,r.x0)(10),src:e,width:t,height:l,left:(oa-t)/2,top:(oa*n.value-l)/2,fixedRatio:!0,rotate:0})}))},c=e=>{const t={type:"chart",id:(0,r.x0)(10),chartType:ca[e],left:300,top:81.25,width:400,height:400,rotate:0,themeColor:[a.value.themeColor],gridColor:a.value.fontColor,data:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1"],series:[[12,19,5,2,18]]}},l={..."bar"===e?{horizontalBars:!1,stackBars:!1}:{},..."horizontalBar"===e?{horizontalBars:!0,stackBars:!1}:{},..."line"===e?{showLine:!0,lineSmooth:!0,showArea:!1}:{},..."area"===e?{showLine:!0,lineSmooth:!0,showArea:!0}:{},..."scatter"===e?{showLine:!1,lineSmooth:!0,showArea:!1}:{},..."pie"===e?{donut:!1}:{},..."ring"===e?{donut:!0}:{}};s({...t,options:l})},d=(e,t)=>{const l={fontname:a.value.fontName,color:a.value.fontColor},o=[];for(let a=0;a{const{left:l,top:n,width:o,height:i}=e,u=t?.content||"",c=t?.vertical||!1,d=(0,r.x0)(10);s({type:"text",id:d,left:l,top:n,width:o,height:i,content:u,rotate:0,defaultFontName:a.value.fontName,defaultColor:a.value.fontColor,vertical:c},(()=>{setTimeout((()=>{const e=document.querySelector(`#editable-element-${d} .ProseMirror`);e&&e.focus()}),0)}))},v=(e,t)=>{const{left:l,top:n,width:o,height:i}=e,u={type:"shape",id:(0,r.x0)(10),left:l,top:n,width:o,height:i,viewBox:t.viewBox,path:t.path,fill:a.value.themeColor,fixedRatio:!1,rotate:0};if(t.special&&(u.special=!0),t.pathFormula){u.pathFormula=t.pathFormula,u.viewBox=[o,i];const e=ra[t.pathFormula];"editable"in e?(u.path=e.formula(o,i,e.defaultValue),u.keypoint=e.defaultValue):u.path=e.formula(o,i)}s(u)},m=(e,t)=>{const{left:l,top:n,start:o,end:i}=e,u={type:"line",id:(0,r.x0)(10),left:l,top:n,start:o,end:i,points:t.points,color:a.value.themeColor,style:t.style,width:2};t.isBroken&&(u.broken=[(o[0]+i[0])/2,(o[1]+i[1])/2]),t.isCurve&&(u.curve=[(o[0]+i[0])/2,(o[1]+i[1])/2]),t.isCubic&&(u.cubic=[[(o[0]+i[0])/2,(o[1]+i[1])/2],[(o[0]+i[0])/2,(o[1]+i[1])/2]]),s(u)},h=e=>{s({type:"latex",id:(0,r.x0)(10),width:e.w,height:e.h,rotate:0,left:(oa-e.w)/2,top:(oa*n.value-e.h)/2,path:e.path,latex:e.latex,color:a.value.fontColor,strokeWidth:2,viewBox:[e.w,e.h],fixedRatio:!0})},f=e=>{s({type:"video",id:(0,r.x0)(10),width:500,height:300,rotate:0,left:(oa-500)/2,top:(oa*n.value-300)/2,src:e,autoplay:!1})},g=e=>{s({type:"audio",id:(0,r.x0)(10),width:50,height:50,rotate:0,left:(oa-50)/2,top:(oa*n.value-50)/2,loop:!1,autoplay:!1,fixedRatio:!0,color:a.value.themeColor,src:e})};return{createImageElement:u,createChartElement:c,createTableElement:d,createTextElement:p,createShapeElement:v,createLineElement:m,createLatexElement:h,createVideoElement:f,createAudioElement:g}},va=()=>{const e=R(),t=$(),{currentSlide:l,slides:a}=(0,o.Jk)(t),{addHistorySnapshot:n}=da(),s=a=>{const{groupIdMap:o,elIdMap:i}=Ie(a),s=a[0];let r,u=0;do{r=l.value.elements.find((e=>{if(e.type!==s.type)return!1;const{minX:t,maxX:l,minY:a,maxY:n}=xe(e),{minX:o,maxX:i,minY:r,maxY:c}=xe({...s,left:s.left+u,top:s.top+u});return t===o&&l===i&&a===r&&n===c})),r&&(u+=10)}while(r);for(const e of a)e.id=i[e.id],e.left=e.left+u,e.top=e.top+u,e.groupId&&(e.groupId=o[e.groupId]);t.addElement(a),e.setActiveElementIdList(Object.values(i)),n()},u=e=>{const l=_e(e),a=e.map((e=>{const{groupIdMap:t,elIdMap:a}=Ie(e.elements);for(const n of e.elements)n.id=a[n.id],n.groupId&&(n.groupId=t[n.groupId]),n.link&&"slide"===n.link.type&&(l[n.link.target]?n.link.target=l[n.link.target]:delete n.link);if(e.animations)for(const l of e.animations)l.id=(0,r.x0)(10),l.elId=a[l.elId];return{...e,id:l[e.id]}}));t.addSlide(a),n()},c=(0,i.Fl)((()=>!(a.value.length>1)&&!(a.value[0].elements.length>0)));return{addElementsFromData:s,addSlidesFromData:u,isEmptySlide:c}},ma=()=>{const{createTextElement:e}=pa(),{addElementsFromData:t,addSlidesFromData:l}=va(),a=t=>{e({left:0,top:0,width:600,height:50},{content:t})},n=(e,n)=>{const o=n?.onlySlide||!1,i=n?.onlyElements||!1,s=fe(e);if("object"===typeof s){const{type:e,data:a}=s;"elements"!==e||o?"slides"!==e||i||l(a):t(a)}else if(!i&&!o){const e=la(s);a(e)}};return{pasteTextClipboardData:n}},ha=()=>{const e=R(),t=$(),{selectedSlidesIndex:l,activeElementIdList:a}=(0,o.Jk)(e),{currentSlide:n,slides:s,theme:u,slideIndex:c}=(0,o.Jk)(t),d=(0,i.Fl)((()=>[...l.value,c.value])),p=(0,i.Fl)((()=>s.value.filter(((e,t)=>d.value.includes(t))))),v=(0,i.Fl)((()=>p.value.map((e=>e.id)))),{pasteTextClipboardData:m}=ma(),{addSlidesFromData:h}=va(),{addHistorySnapshot:f}=da(),g=()=>{const l={id:(0,r.x0)(10),elements:[],background:{type:"solid",color:u.value.backgroundColor}};t.updateSlideIndex(0),e.setActiveElementIdList([]),t.setSlides([l])},y=l=>{l===ne.UP&&c.value>0?(a.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(c.value-1)):l===ne.DOWN&&c.value{const t=pe(JSON.stringify({type:"slides",data:p.value}));me(t).then((()=>{e.setThumbnailsFocus(!0)}))},x=()=>{he().then((e=>{m(e,{onlySlide:!0})})).catch((e=>ta.warning(e)))},k=()=>{const l={id:(0,r.x0)(10),elements:[],background:{type:"solid",color:u.value.backgroundColor}};e.setActiveElementIdList([]),t.addSlide(l),f()},b=l=>{const{groupIdMap:a,elIdMap:n}=Ie(l.elements);for(const e of l.elements)e.id=n[e.id],e.groupId&&(e.groupId=a[e.groupId]);const o={...l,id:(0,r.x0)(10)};e.setActiveElementIdList([]),t.addSlide(o),f()},_=()=>{const e=JSON.parse(JSON.stringify(n.value));h([e])},I=(l=v.value)=>{s.value.length===l.length?g():t.deleteSlide(l),e.updateSelectedSlidesIndex([]),f()},S=()=>{const e=[...v.value];w(),I(e)},C=()=>{const t=Array.from(Array(s.value.length),((e,t)=>t));e.setActiveElementIdList([]),e.updateSelectedSlidesIndex(t)},L=(e,l)=>{if(l===e)return;const a=JSON.parse(JSON.stringify(s.value)),n=a[l];a.splice(l,1),a.splice(e,0,n),t.setSlides(a),t.updateSlideIndex(e)};return{resetSlides:g,updateSlideIndex:y,copySlide:w,pasteSlide:x,createSlide:k,createSlideByTemplate:b,copyAndPasteSlide:_,deleteSlide:I,cutSlide:S,selectAllSlide:C,sortSlides:L}},fa=()=>{const e=R(),t=$(),{activeElementIdList:l}=(0,o.Jk)(e),{currentSlide:a}=(0,o.Jk)(t),{addHistorySnapshot:n}=da(),i=()=>{const o=JSON.parse(JSON.stringify(a.value.elements));for(const e of o)l.value.includes(e.id)&&(e.lock=!0);t.updateSlide({elements:o}),e.setActiveElementIdList([]),n()},s=l=>{const o=JSON.parse(JSON.stringify(a.value.elements));if(l.groupId){const a=[];for(const e of o)e.groupId===l.groupId&&(e.lock=!1,a.push(e.id));t.updateSlide({elements:o}),e.setActiveElementIdList(a)}else{for(const e of o)if(e.id===l.id){e.lock=!1;break}t.updateSlide({elements:o}),e.setActiveElementIdList([l.id])}n()};return{lockElement:i,unlockElement:s}},ga=()=>{const e=R(),t=$(),{activeElementIdList:l,activeGroupElementId:a}=(0,o.Jk)(e),{currentSlide:n}=(0,o.Jk)(t),{addHistorySnapshot:i}=da(),s=()=>{if(!l.value.length)return;let o=[];o=a.value?n.value.elements.filter((e=>e.id!==a.value)):n.value.elements.filter((e=>!l.value.includes(e.id))),e.setActiveElementIdList([]),t.updateSlide({elements:o}),i()},r=()=>{n.value.elements.length&&(e.setActiveElementIdList([]),t.updateSlide({elements:[]}),i())};return{deleteElement:s,deleteAllElements:r}},ya=()=>{const e=R(),t=$(),{activeElementIdList:l,activeElementList:a,handleElementId:n}=(0,o.Jk)(e),{currentSlide:s}=(0,o.Jk)(t),{addHistorySnapshot:u}=da(),c=(0,i.Fl)((()=>{if(a.value.length<2)return!1;const e=a.value[0].groupId;if(!e)return!0;const t=a.value.every((t=>(t.groupId&&t.groupId)===e));return!t})),d=()=>{if(!a.value.length)return;let e=JSON.parse(JSON.stringify(s.value.elements));const n=(0,r.x0)(10),o=[];for(const t of e)l.value.includes(t.id)&&(t.groupId=n,o.push(t));const i=e.findIndex((e=>e.id===o[o.length-1].id)),c=o.map((e=>e.id));e=e.filter((e=>!c.includes(e.id)));const d=i-o.length+1;e.splice(d,0,...o),t.updateSlide({elements:e}),u()},p=()=>{if(!a.value.length)return;const o=a.value.some((e=>e.groupId));if(!o)return;const i=JSON.parse(JSON.stringify(s.value.elements));for(const e of i)l.value.includes(e.id)&&e.groupId&&delete e.groupId;t.updateSlide({elements:i});const r=n.value?[n.value]:[];e.setActiveElementIdList(r),u()};return{canCombine:c,combineElements:d,uncombineElements:p}},wa=()=>{const e=R(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(e),{pasteTextClipboardData:a}=ma(),{deleteElement:n}=ga(),i=()=>{if(!t.value.length)return;const a=pe(JSON.stringify({type:"elements",data:l.value}));me(a).then((()=>{e.setEditorareaFocus(!0)}))},s=()=>{i(),n()},r=()=>{he().then((e=>{a(e)})).catch((e=>ta.warning(e)))},u=()=>{i(),r()};return{copyElement:i,cutElement:s,pasteElement:r,quickCopyElement:u}},xa=()=>{const e=R(),{currentSlide:t}=(0,o.Jk)($()),{hiddenElementIdList:l}=(0,o.Jk)(e),a=()=>{const a=t.value.elements.filter((e=>!e.lock&&!l.value.includes(e.id))),n=a.map((e=>e.id));e.setActiveElementIdList(n)};return{selectAllElement:a}},ka=()=>{const e=$(),{activeElementIdList:t,activeGroupElementId:l}=(0,o.Jk)(R()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=da(),i=(o,i=1)=>{let s=[];const r=e=>{let{left:t,top:l}=e;switch(o){case ne.LEFT:t-=i;break;case ne.RIGHT:t+=i;break;case ne.UP:l-=i;break;case ne.DOWN:l+=i;break;default:break}return{...e,left:t,top:l}};s=l.value?a.value.elements.map((e=>l.value===e.id?r(e):e)):a.value.elements.map((e=>t.value.includes(e.id)?r(e):e)),e.updateSlide({elements:s}),n()};return{moveElement:i}},ba=(l(541),()=>{const e=$(),{currentSlide:t}=(0,o.Jk)(e),{addHistorySnapshot:l}=da(),a=(e,t)=>({minLevel:e.findIndex((e=>e.id===t[0].id)),maxLevel:e.findIndex((e=>e.id===t[t.length-1].id))}),n=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o,maxLevel:i}=a(e,n);if(i===e.length-1)return;const s=l[i+1],r=l.splice(o,n.length);if(s.groupId){const e=l.filter((e=>e.groupId===s.groupId));l.splice(o+e.length,0,...r)}else l.splice(o+1,0,...r)}else{const a=e.findIndex((e=>e.id===t.id));if(a===e.length-1)return;const n=l[a+1],o=l.splice(a,1)[0];if(n.groupId){const e=l.filter((e=>e.groupId===n.groupId));l.splice(a+e.length,0,o)}else l.splice(a+1,0,o)}return l},i=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o}=a(e,n);if(0===o)return;const i=l[o-1],s=l.splice(o,n.length);if(i.groupId){const e=l.filter((e=>e.groupId===i.groupId));l.splice(o-e.length,0,...s)}else l.splice(o-1,0,...s)}else{const a=e.findIndex((e=>e.id===t.id));if(0===a)return;const n=l[a-1],o=l.splice(a,1)[0];if(n.groupId){const e=l.filter((e=>e.groupId===n.groupId));l.splice(a-e.length,0,o)}else l.splice(a-1,0,o)}return l},s=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o,maxLevel:i}=a(e,n);if(i===e.length-1)return null;const s=l.splice(o,n.length);l.push(...s)}else{const a=e.findIndex((e=>e.id===t.id));if(a===e.length-1)return null;l.splice(a,1),l.push(t)}return l},r=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o}=a(e,n);if(0===o)return;const i=l.splice(o,n.length);l.unshift(...i)}else{const a=e.findIndex((e=>e.id===t.id));if(0===a)return;l.splice(a,1),l.unshift(t)}return l},u=(a,o)=>{let u;o===Q.UP?u=n(t.value.elements,a):o===Q.DOWN?u=i(t.value.elements,a):o===Q.TOP?u=s(t.value.elements,a):o===Q.BOTTOM&&(u=r(t.value.elements,a)),u&&(e.updateSlide({elements:u}),l())};return{orderElement:u}});const _a=()=>{const e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()},Ia=()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},Sa=()=>{const e=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement;return!!e};var Ca=()=>{const e=X(),t=$(),l=()=>{_a(),e.setScreening(!0)},a=()=>{t.updateSlideIndex(0),l()},n=()=>{e.setScreening(!1),Sa()&&Ia()};return{enterScreening:l,enterScreeningFromStart:a,exitScreening:n}},La=()=>{const e=R(),{canvasPercentage:t,canvasScale:l,canvasDragged:a}=(0,o.Jk)(e),n=(0,i.Fl)((()=>Math.round(100*l.value)+"%")),s=l=>{let a=t.value;const n=5,o=200,i=30;"+"===l&&a<=o&&(a+=n),"-"===l&&a>=i&&(a-=n),e.setCanvasPercentage(a)},r=a=>{const n=Math.round(a/l.value*t.value)/100;e.setCanvasPercentage(n)},u=()=>{e.setCanvasPercentage(90),a&&e.setCanvasDragged(!1)};return{canvasScalePercentage:n,setCanvasScalePercentage:r,scaleCanvas:s,resetCanvas:u}},Ta=()=>{const e=R(),t=q(),{activeElementIdList:l,disableHotkeys:a,handleElement:n,handleElementId:s,editorAreaFocus:r,thumbnailsFocus:u,showSearchPanel:c}=(0,o.Jk)(e),{currentSlide:d}=(0,o.Jk)($()),{ctrlKeyState:p,shiftKeyState:v,spaceKeyState:m}=(0,o.Jk)(t),{updateSlideIndex:h,copySlide:f,createSlide:g,deleteSlide:y,cutSlide:w,copyAndPasteSlide:x,selectAllSlide:k}=ha(),{combineElements:b,uncombineElements:_}=ya(),{deleteElement:I}=ga(),{lockElement:S}=fa(),{copyElement:C,cutElement:L,quickCopyElement:T}=wa(),{selectAllElement:E}=xa(),{moveElement:M}=ka(),{orderElement:U}=ba(),{redo:W,undo:D}=da(),{enterScreening:H,enterScreeningFromStart:F}=Ca(),{scaleCanvas:A,resetCanvas:Z}=La(),O=()=>{l.value.length?C():u.value&&f()},z=()=>{l.value.length?L():u.value&&w()},P=()=>{l.value.length?T():u.value&&x()},B=()=>{r.value&&E(),u.value&&k()},N=()=>{r.value&&S()},j=()=>{r.value&&b()},Y=()=>{r.value&&_()},V=()=>{l.value.length?I():u.value&&y()},J=e=>{l.value.length?M(e):e!==ne.UP&&e!==ne.DOWN||h(e)},X=e=>{e===ne.PAGEUP?h(ne.UP):e===ne.PAGEDOWN&&h(ne.DOWN)},G=e=>{n.value&&U(n.value,e)},K=()=>{u.value&&g()},ee=()=>{if(!d.value.elements.length)return;if(!s.value){const t=d.value.elements[0];return void e.setActiveElementIdList([t.id])}const t=d.value.elements.findIndex((e=>e.id===s.value)),l=t>=d.value.elements.length-1?0:t+1,a=d.value.elements[l].id;e.setActiveElementIdList([a])},te=l=>{const{ctrlKey:n,shiftKey:o,altKey:i,metaKey:s}=l,d=n||s,m=l.key.toUpperCase();if(d&&!p.value&&t.setCtrlKeyState(!0),o&&!v.value&&t.setShiftKeyState(!0),a.value||m!==ne.SPACE||t.setSpaceKeyState(!0),d&&m===ne.P)return l.preventDefault(),void e.setDialogForExport("pdf");if(o&&m===ne.F5)return l.preventDefault(),H(),void t.setShiftKeyState(!1);if(m===ne.F5)return l.preventDefault(),void F();if(n&&m===ne.F)return l.preventDefault(),void e.setSearchPanelState(!c.value);if(r.value||u.value){if(d&&m===ne.C){if(a.value)return;l.preventDefault(),O()}if(d&&m===ne.X){if(a.value)return;l.preventDefault(),z()}if(d&&m===ne.D){if(a.value)return;l.preventDefault(),P()}if(d&&m===ne.Z){if(a.value)return;l.preventDefault(),D()}if(d&&m===ne.Y){if(a.value)return;l.preventDefault(),W()}if(d&&m===ne.A){if(a.value)return;l.preventDefault(),B()}if(d&&m===ne.L){if(a.value)return;l.preventDefault(),N()}if(!o&&d&&m===ne.G){if(a.value)return;l.preventDefault(),j()}if(o&&d&&m===ne.G){if(a.value)return;l.preventDefault(),Y()}if(i&&m===ne.F){if(a.value)return;l.preventDefault(),G(Q.TOP)}if(i&&m===ne.B){if(a.value)return;l.preventDefault(),G(Q.BOTTOM)}if(m===ne.DELETE||m===ne.BACKSPACE){if(a.value)return;l.preventDefault(),V()}if(m===ne.UP){if(a.value)return;l.preventDefault(),J(ne.UP)}if(m===ne.DOWN){if(a.value)return;l.preventDefault(),J(ne.DOWN)}if(m===ne.LEFT){if(a.value)return;l.preventDefault(),J(ne.LEFT)}if(m===ne.RIGHT){if(a.value)return;l.preventDefault(),J(ne.RIGHT)}if(m===ne.PAGEUP){if(a.value)return;l.preventDefault(),X(ne.PAGEUP)}if(m===ne.PAGEDOWN){if(a.value)return;l.preventDefault(),X(ne.PAGEDOWN)}if(m===ne.ENTER){if(a.value)return;l.preventDefault(),K()}if(m===ne.MINUS){if(a.value)return;l.preventDefault(),A("-")}if(m===ne.EQUAL){if(a.value)return;l.preventDefault(),A("+")}if(m===ne.DIGIT_0){if(a.value)return;l.preventDefault(),Z()}if(m===ne.TAB){if(a.value)return;l.preventDefault(),ee()}}},le=()=>{p.value&&t.setCtrlKeyState(!1),v.value&&t.setShiftKeyState(!1),m.value&&t.setSpaceKeyState(!1)};(0,i.bv)((()=>{document.addEventListener("keydown",te),document.addEventListener("keyup",le),window.addEventListener("blur",le)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",te),document.removeEventListener("keyup",le),window.removeEventListener("blur",le)}))},Ea=()=>{const{editorAreaFocus:e,thumbnailsFocus:t,disableHotkeys:l}=(0,o.Jk)(R()),{pasteTextClipboardData:a}=ma(),{createImageElement:n}=pa(),s=e=>{na(e).then((e=>n(e)))},r=n=>{if(!e.value&&!t.value)return;if(l.value)return;if(!n.clipboardData)return;const o=n.clipboardData.items,i=o[0];if(i){for(const e of o)if("file"===e.kind&&-1!==e.type.indexOf("image")){const t=e.getAsFile();return void(t&&s(t))}"string"===i.kind&&"text/plain"===i.type&&i.getAsString((e=>a(e)))}};(0,i.bv)((()=>{document.addEventListener("paste",r)})),(0,i.Ah)((()=>{document.removeEventListener("paste",r)}))},Ma=l(7536),Ua=()=>{const e=$(),{theme:t}=(0,o.Jk)($()),{addSlidesFromData:l,isEmptySlide:a}=va(),n=(0,s.iH)(!1),i=(t,n=!1)=>{const o=t[0],i=new FileReader;i.addEventListener("load",(()=>{try{const t=JSON.parse(ve(i.result));n||a.value?e.setSlides(t):l(t)}catch{ta.error("无法正确读取 / 解析该文件")}})),i.readAsText(o)},u=e=>{let t=[0,0],l=[0,0];return e.isFlipV||e.isFlipH?e.isFlipV&&e.isFlipH?(t=[e.width,e.height],l=[0,0]):e.isFlipV&&!e.isFlipH?(t=[0,e.height],l=[e.width,0]):(t=[e.width,0],l=[0,e.height]):(t=[0,0],l=[e.width,e.height]),{type:"line",id:(0,r.x0)(10),width:e.borderWidth||1,left:e.left,top:e.top,start:t,end:l,style:"solid"===e.borderType?"solid":"dashed",color:e.borderColor,points:["","straightConnector1"===e.shapType?"arrow":""]}},c=o=>{const i=o[0];if(!i)return;n.value=!0;const s=[];for(const e of ua)s.push(...e.children);const c=new FileReader;c.onload=async o=>{const i=await(0,Ma.Q)(o.target.result,{slideFactor:75/914400,fontsizeFactor:100/98}),c=i.size.width,d=oa/c,p=[];for(const e of i.slides){const{type:l,value:a}=e.fill;let n;n="image"===l?{type:"image",image:a.picBase64,imageSize:"cover"}:"gradient"===l?{type:"gradient",gradientType:"linear",gradientColor:[a.colors[0].color,a.colors[a.colors.length-1].color],gradientRotate:a.rot}:{type:"solid",color:a};const o={id:(0,r.x0)(10),elements:[],background:n},i=e=>{for(const l of e)if(l.width=l.width*d,l.height=l.height*d,l.left=l.left*d,l.top=l.top*d,"text"===l.type){const e={type:"text",id:(0,r.x0)(10),width:l.width,height:l.height,left:l.left,top:l.top,rotate:l.rotate,defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,content:l.content,lineHeight:1,outline:{color:l.borderColor,width:l.borderWidth,style:"solid"===l.borderType?"solid":"dashed"},fill:l.fillColor,vertical:l.isVertical};l.shadow&&(e.shadow=l.shadow),o.elements.push(e)}else if("image"===l.type)o.elements.push({type:"image",id:(0,r.x0)(10),src:l.src,width:l.width,height:l.height,left:l.left,top:l.top,fixedRatio:!0,rotate:l.rotate});else if("audio"===l.type)o.elements.push({type:"audio",id:(0,r.x0)(10),src:l.blob,width:l.width,height:l.height,left:l.left,top:l.top,rotate:0,fixedRatio:!1,color:t.value.themeColor,loop:!1,autoplay:!1});else if("video"===l.type)o.elements.push({type:"video",id:(0,r.x0)(10),src:l.blob||l.src,width:l.width,height:l.height,left:l.left,top:l.top,rotate:0,autoplay:!1});else if("shape"===l.type)if("line"===l.shapType||/Connector/.test(l.shapType)){const e=u(l);o.elements.push(e)}else{const e=s.find((e=>e.pptxShapeType===l.shapType)),a={mid:"middle",down:"bottom",up:"top"},n={type:"shape",id:(0,r.x0)(10),width:l.width,height:l.height,left:l.left,top:l.top,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:l.fillColor||"none",fixedRatio:!1,rotate:l.rotate,outline:{color:l.borderColor,width:l.borderWidth,style:"solid"===l.borderType?"solid":"dashed"},text:{content:l.content,defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,align:a[l.vAlign]||"middle"},flipH:l.isFlipH,flipV:l.isFlipV};if(l.shadow&&(n.shadow=l.shadow),e&&(n.path=e.path,n.viewBox=e.viewBox,e.pathFormula)){n.pathFormula=e.pathFormula,n.viewBox=[l.width,l.height];const t=ra[e.pathFormula];"editable"in t?(n.path=t.formula(l.width,l.height,t.defaultValue),n.keypoint=t.defaultValue):n.path=t.formula(l.width,l.height)}"custom"===l.shapType&&(n.special=!0,n.path=l.path,n.viewBox=[l.width,l.height]),o.elements.push(n)}else if("table"===l.type){const e=l.data.length,a=l.data[0].length,n={fontname:t.value.fontName,color:t.value.fontColor},i=[];for(let t=0;te+"")),a=["系列1"],n=[t[1]]}else{const t=l.data;e=Object.values(t[0].xlabels),a=t.map((e=>e.key)),n=t.map((e=>e.values.map((e=>e.y))))}const i={};let s="bar";switch(l.chartType){case"barChart":case"bar3DChart":s="bar","bar"===l.barDir&&(i.horizontalBars=!0),"stacked"!==l.grouping&&"percentStacked"!==l.grouping||(i.stackBars=!0);break;case"lineChart":case"line3DChart":case"areaChart":case"area3DChart":case"scatterChart":case"bubbleChart":s="line","areaChart"!==l.chartType&&"area3DChart"!==l.chartType||(i.showArea=!0),"scatterChart"!==l.chartType&&"bubbleChart"!==l.chartType||(i.showLine=!1);break;case"pieChart":case"pie3DChart":case"doughnutChart":s="pie","doughnutChart"===l.chartType&&(i.donut=!0);break;default:}o.elements.push({type:"chart",id:(0,r.x0)(10),chartType:s,width:l.width,height:l.height,left:l.left,top:l.top,rotate:0,themeColor:[t.value.themeColor],gridColor:t.value.fontColor,data:{labels:e,legends:a,series:n},options:i})}else if("group"===l.type||"diagram"===l.type){const e=l.elements.map((e=>({...e,left:e.left+l.left,top:e.top+l.top})));i(e)}};i(e.elements),p.push(o)}a.value?e.setSlides(p):l(p),n.value=!1},c.readAsArrayBuffer(i)};return{importSpecificFile:i,importPPTXFile:c,exporting:n}};const Wa={class:"hotkey-doc"},Da={class:"title"},Ha={class:"label"},Fa={class:"value"};var Aa=(0,i.aZ)({__name:"HotkeyDoc",setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Wa,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ie),(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.type},[(0,i._)("div",Da,(0,oe.zw)(e.type),1),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"hotkey-item",key:e.label},[(0,i._)("div",Ha,(0,oe.zw)(e.label),1),(0,i._)("div",Fa,(0,oe.zw)(e.value),1)])))),128))],64)))),128))]))}});const $a=(0,Vl.Z)(Aa,[["__scopeId","data-v-a0322054"]]);var Za=$a;const Oa=["accept"];var Ra=(0,i.aZ)({__name:"FileInput",props:{accept:{default:"image/*"}},emits:["change"],setup(e,{emit:t}){const l=t,a=(0,s.iH)(),n=()=>{a.value&&(a.value.value="",a.value.click())},o=e=>{const t=e.target.files;t&&l("change",t)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"file-input",onClick:t[1]||(t[1]=e=>n())},[(0,i.WI)(e.$slots,"default"),(0,i._)("input",{class:"input",type:"file",name:"upload",ref_key:"inputRef",ref:a,accept:e.accept,onChange:t[0]||(t[0]=e=>o(e))},null,40,Oa)]))}});const za=(0,Vl.Z)(Ra,[["__scopeId","data-v-64bedb34"]]);var Pa=za;const Ba=e=>((0,i.dD)("data-v-a5c6b41c"),e=e(),(0,i.Cn)(),e),Na={key:0,class:"fullscreen-spin"},ja={class:"spin"},Ya=Ba((()=>(0,i._)("div",{class:"spinner"},null,-1))),Va={class:"text"};var Ja=(0,i.aZ)({__name:"FullscreenSpin",props:{loading:{type:Boolean,default:!1},tip:{default:""}},setup(e){return(e,t)=>e.loading?((0,i.wg)(),(0,i.iD)("div",Na,[(0,i._)("div",ja,[Ya,(0,i._)("div",Va,(0,oe.zw)(e.tip),1)])])):(0,i.kq)("",!0)}});const qa=(0,Vl.Z)(Ja,[["__scopeId","data-v-a5c6b41c"]]);var Xa=qa;const Ga={class:"header"};var Ka=(0,i.aZ)({__name:"Drawer",props:{visible:{type:Boolean},width:{default:320},contentStyle:{},placement:{default:"right"}},emits:["update:visible"],setup(e,{emit:t}){const l=e,a=t,o=(0,s.iH)(!1),r=(0,i.Fl)((()=>({width:l.width+"px",...l.contentStyle||{}})));return(e,t)=>{const s=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.j4)(i.lR,{to:"body"},[(0,i.Wm)(n.uT,{name:`drawer-slide-${e.placement}`,onAfterLeave:t[1]||(t[1]=e=>o.value=!1),onBeforeEnter:t[2]||(t[2]=e=>o.value=!0)},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:(0,oe.C_)(["drawer",e.placement]),style:(0,oe.j5)({width:l.width+"px"})},[(0,i._)("div",Ga,[(0,i.WI)(e.$slots,"title"),(0,i._)("span",{class:"close-btn",onClick:t[0]||(t[0]=e=>a("update:visible",!1))},[(0,i.Wm)(s)])]),o.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"content",style:(0,oe.j5)(r.value)},[(0,i.WI)(e.$slots,"default")],4)):(0,i.kq)("",!0)],6),[[n.F8,e.visible]])])),_:3},8,["name"])])}}});const Qa=(0,Vl.Z)(Ka,[["__scopeId","data-v-749dadac"]]);var en=Qa;const tn={class:"prefix"},ln=["disabled","value","placeholder"],an={class:"suffix"};var nn=(0,i.aZ)({__name:"Input",props:{value:{},disabled:{type:Boolean,default:!1},placeholder:{default:""}},emits:["update:value","input","change","blur","focus","enter"],setup(e,{expose:t,emit:l}){const a=l,o=(0,s.iH)(!1),r=e=>{a("update:value",e.target.value)},u=e=>{o.value=!1,a("blur",e)},c=e=>{o.value=!0,a("focus",e)},d=(0,s.iH)(),p=()=>{d.value&&d.value.focus()};return t({focus:p}),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["input",{disabled:e.disabled,focused:o.value}])},[(0,i._)("span",tn,[(0,i.WI)(e.$slots,"prefix")]),(0,i._)("input",{type:"text",ref_key:"inputRef",ref:d,disabled:e.disabled,value:e.value,placeholder:e.placeholder,onInput:t[0]||(t[0]=e=>r(e)),onFocus:t[1]||(t[1]=e=>c(e)),onBlur:t[2]||(t[2]=e=>u(e)),onChange:t[3]||(t[3]=e=>a("change",e)),onKeydown:t[4]||(t[4]=(0,n.D2)((e=>a("enter",e)),["enter"]))},null,40,ln),(0,i._)("span",an,[(0,i.WI)(e.$slots,"suffix")])],2))}});const on=(0,Vl.Z)(nn,[["__scopeId","data-v-a97ba0dc"]]);var sn=on,rn=l(6488),un=(l(8627),(0,i.aZ)({__name:"Popover",props:{value:{type:Boolean,default:!1},trigger:{default:"click"},placement:{default:"bottom"},appendTo:{},contentStyle:{},center:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=t,n=(0,s.iH)(),o=(0,s.iH)(),r=(0,s.iH)(),u=(0,s.iH)(!1),c=(0,i.Fl)((()=>l.contentStyle||{}));return(0,i.YP)((()=>l.value),(()=>{n.value&&(l.value?n.value.show():n.value.hide())})),(0,i.bv)((()=>{n.value=(0,rn.ZP)(o.value,{content:r.value,allowHTML:!0,trigger:l.trigger,placement:l.placement,interactive:!0,appendTo:l.appendTo||document.body,maxWidth:"none",offset:[0,8],duration:200,animation:"scale",theme:"popover",onShow(){u.value=!0},onShown(){l.value||a("update:value",!0)},onHidden(){l.value&&a("update:value",!1),u.value=!1}})})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["popover",{center:e.center}]),ref_key:"triggerRef",ref:o},[(0,i._)("div",{class:"popover-content",style:(0,oe.j5)(c.value),ref_key:"contentRef",ref:r},[u.value?(0,i.WI)(e.$slots,"content",{key:0}):(0,i.kq)("",!0)],4),(0,i.WI)(e.$slots,"default")],2))}}));const cn=(0,Vl.Z)(un,[["__scopeId","data-v-70fabe9a"]]);var dn=cn,pn=(0,i.aZ)({__name:"PopoverMenuItem",props:{center:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const l=t;return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["popover-menu-item",{center:e.center}]),onClick:t[0]||(t[0]=e=>l("click"))},[(0,i.WI)(e.$slots,"default")],2))}});const vn=(0,Vl.Z)(pn,[["__scopeId","data-v-2f137c4f"]]);var mn=vn;const hn={class:"editor-header"},fn={class:"left"},gn={class:"menu-item"},yn={class:"title"},wn=["title"],xn={class:"right"},kn={class:"group-menu-item"},bn={class:"arrow-btn"},_n={class:"github-link",href:"https://github.com/pipipi-pikachu/PPTist",target:"_blank"},In={class:"menu-item"};var Sn=(0,i.aZ)({__name:"index",setup(e){const t=R(),l=$(),{title:a}=(0,o.Jk)(l),{enterScreening:n,enterScreeningFromStart:r}=Ca(),{importSpecificFile:u,importPPTXFile:c,exporting:d}=Ua(),{resetSlides:p}=ha(),v=(0,s.iH)(!1),m=(0,s.iH)(!1),h=(0,s.iH)(!1),f=(0,s.iH)(),g=(0,s.iH)(""),y=()=>{g.value=a.value,h.value=!0,(0,i.Y3)((()=>f.value?.focus()))},w=()=>{l.setTitle(g.value),h.value=!1},x=e=>{window.open(e),v.value=!1},k=e=>{t.setDialogForExport(e),v.value=!1};return(e,t)=>{const l=(0,i.up)("IconHamburgerButton"),o=(0,i.up)("IconPpt"),b=(0,i.up)("IconDown"),_=(0,i.up)("IconDownload"),I=(0,i.up)("IconGithub"),S=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",hn,[(0,i._)("div",fn,[(0,i.Wm)(dn,{trigger:"click",placement:"bottom-start",value:v.value,"onUpdate:value":t[7]||(t[7]=e=>v.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Pa,{accept:".pptist",onChange:t[0]||(t[0]=e=>{(0,s.SU)(u)(e),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(mn,null,{default:(0,i.w5)((()=>[(0,i.Uk)("导入 pptist 文件")])),_:1})])),_:1}),(0,i.Wm)(Pa,{accept:"application/vnd.openxmlformats-officedocument.presentationml.presentation",onChange:t[1]||(t[1]=e=>{(0,s.SU)(c)(e),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(mn,null,{default:(0,i.w5)((()=>[(0,i.Uk)("导入 pptx 文件(测试版)")])),_:1})])),_:1}),(0,i.Wm)(mn,{onClick:t[2]||(t[2]=e=>k("pptx"))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出文件")])),_:1}),(0,i.Wm)(mn,{onClick:t[3]||(t[3]=e=>{(0,s.SU)(p)(),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Uk)("重置幻灯片")])),_:1}),(0,i.Wm)(mn,{onClick:t[4]||(t[4]=e=>x("https://github.com/pipipi-pikachu/PPTist/issues"))},{default:(0,i.w5)((()=>[(0,i.Uk)("意见反馈")])),_:1}),(0,i.Wm)(mn,{onClick:t[5]||(t[5]=e=>x("https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Q&A.md"))},{default:(0,i.w5)((()=>[(0,i.Uk)("常见问题")])),_:1}),(0,i.Wm)(mn,{onClick:t[6]||(t[6]=e=>{v.value=!1,m.value=!0})},{default:(0,i.w5)((()=>[(0,i.Uk)("快捷键")])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",gn,[(0,i.Wm)(l,{class:"icon"})])])),_:1},8,["value"]),(0,i._)("div",yn,[h.value?((0,i.wg)(),(0,i.j4)(sn,{key:0,class:"title-input",ref_key:"titleInputRef",ref:f,value:g.value,"onUpdate:value":t[8]||(t[8]=e=>g.value=e),onBlur:t[9]||(t[9]=e=>w())},null,8,["value"])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"title-text",onClick:t[10]||(t[10]=e=>y()),title:(0,s.SU)(a)},(0,oe.zw)((0,s.SU)(a)),9,wn))])]),(0,i._)("div",xn,[(0,i._)("div",kn,[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"menu-item",onClick:t[11]||(t[11]=e=>(0,s.SU)(n)())},[(0,i.Wm)(o,{class:"icon"})])),[[S,"幻灯片放映"]]),(0,i.Wm)(dn,{trigger:"click",center:""},{content:(0,i.w5)((()=>[(0,i.Wm)(mn,{onClick:t[12]||(t[12]=e=>(0,s.SU)(r)())},{default:(0,i.w5)((()=>[(0,i.Uk)("从头开始")])),_:1}),(0,i.Wm)(mn,{onClick:t[13]||(t[13]=e=>(0,s.SU)(n)())},{default:(0,i.w5)((()=>[(0,i.Uk)("从当前页开始")])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",bn,[(0,i.Wm)(b,{class:"arrow"})])])),_:1})]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"menu-item",onClick:t[14]||(t[14]=e=>k("pptx"))},[(0,i.Wm)(_,{class:"icon"})])),[[S,"导出"]]),(0,i._)("a",_n,[(0,i._)("div",In,[(0,i.Wm)(I,{class:"icon"})])])]),(0,i.Wm)(en,{width:320,visible:m.value,"onUpdate:visible":t[15]||(t[15]=e=>m.value=e),placement:"right"},{default:(0,i.w5)((()=>[(0,i.Wm)(Za)])),_:1},8,["visible"]),(0,i.Wm)(Xa,{loading:(0,s.SU)(d),tip:"正在导入..."},null,8,["loading"])])}}});const Cn=(0,Vl.Z)(Sn,[["__scopeId","data-v-0b9f8c7b"]]);var Ln=Cn;const Tn=Symbol(),En=Symbol(),Mn=Symbol(),Un=()=>{const e=window.getSelection();e&&e.removeAllRanges()};var Wn=e=>{const t=(0,s.iH)(0),l=(0,s.iH)(0),a=R(),{canvasPercentage:n,canvasDragged:r}=(0,o.Jk)(a),{viewportRatio:u}=(0,o.Jk)($()),c=()=>{if(!e.value)return;const o=e.value.clientWidth,i=e.value.clientHeight;if(i/o>u.value){const e=o*(n.value/100);a.setCanvasScale(e/oa),t.value=(o-e)/2,l.value=(i-e*u.value)/2}else{const e=i*(n.value/100);a.setCanvasScale(e/(oa*u.value)),t.value=(o-e/u.value)/2,l.value=(i-e)/2}},d=(n,o)=>{if(!e.value)return;const i=e.value.clientWidth,s=e.value.clientHeight,r=i*(n/100),c=i*(o/100),d=s*(n/100),p=s*(o/100);s/i>u.value?a.setCanvasScale(r/oa):a.setCanvasScale(d/(oa*u.value)),t.value=t.value-(r-c)/2,l.value=l.value-(d-p)/2};(0,i.YP)(n,d),(0,i.YP)(u,c),(0,i.YP)(r,(()=>{r.value||c()}));const p=(0,i.Fl)((()=>({width:oa,height:oa*u.value,left:t.value,top:l.value}))),v=new ResizeObserver(c);(0,i.bv)((()=>{e.value&&v.observe(e.value)})),(0,i.Ah)((()=>{e.value&&v.unobserve(e.value)}));const m=e=>{let n=!0;const o=e.pageX,i=e.pageY,s=t.value,r=l.value;document.onmousemove=e=>{if(!n)return;const a=e.pageX,u=e.pageY;t.value=s+(a-o),l.value=r+(u-i)},document.onmouseup=()=>{n=!1,document.onmousemove=null,document.onmouseup=null,a.setCanvasDragged(!0)}};return{viewportStyles:p,dragViewport:m}},Dn=(e,t)=>{const l=R(),{canvasScale:a,hiddenElementIdList:n}=(0,o.Jk)(l),i=(0,s.iH)(!1),r=(0,s.iH)(1),u=(0,s.iH)({top:0,left:0,width:0,height:0}),c=o=>{if(!t.value)return;let s=!0;const c=t.value.getBoundingClientRect(),d=5,p=o.pageX,v=o.pageY,m=(p-c.x)/a.value,h=(v-c.y)/a.value;u.value={top:h,left:m,width:0,height:0},i.value=!1,r.value=4,document.onmousemove=e=>{if(!s)return;const t=e.pageX,l=e.pageY,n=(t-p)/a.value,o=(l-v)/a.value,c=Math.abs(n),m=Math.abs(o);if(c0&&o>0?h=4:n<0&&o<0?h=2:n>0&&o<0?h=1:n<0&&o>0&&(h=3),u.value={...u.value,width:c,height:m},i.value=!0,r.value=h},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,s=!1;let t=[];for(let l=0;lo&&pi&&mo-s&&pi-c&&mo&&pi-c&&mo-s&&pi&&m{if(l.groupId){const a=t.map((e=>e.id)),n=e.value.filter((e=>e.groupId===l.groupId));return n.every((e=>a.includes(e.id)))}return!0}));const a=t.map((e=>e.id));l.setActiveElementIdList(a),i.value=!1}};return{mouseSelection:u,mouseSelectionVisible:i,mouseSelectionQuadrant:r,updateMouseSelection:c}},Hn=e=>{const{disableHotkeys:t}=(0,o.Jk)(R()),{createImageElement:l,createTextElement:a}=pa(),n=e=>{if(!e.dataTransfer||0===e.dataTransfer.items.length)return;const n=e.dataTransfer.items[0];if("file"===n.kind&&-1!==n.type.indexOf("image")){const e=n.getAsFile();e&&na(e).then((e=>l(e)))}else"string"===n.kind&&"text/plain"===n.type&&n.getAsString((e=>{if(t.value)return;const l=la(e);a({left:0,top:0,width:600,height:50},{content:l})}))};(0,i.bv)((()=>{e.value&&e.value.addEventListener("drop",n),document.ondragleave=e=>e.preventDefault(),document.ondrop=e=>e.preventDefault(),document.ondragenter=e=>e.preventDefault(),document.ondragover=e=>e.preventDefault()})),(0,i.Ah)((()=>{e.value&&e.value.removeEventListener("drop",n),document.ondragleave=null,document.ondrop=null,document.ondragenter=null,document.ondragover=null}))};const Fn=(e,t)=>{const l=Math.atan2(e,t),a=180/Math.PI*l;return a};var An=(e,t,l)=>{const a=$(),{addHistorySnapshot:n}=da(),o=(o,i)=>{const s=!(o instanceof MouseEvent);if(s&&(!o.changedTouches||!o.changedTouches[0]))return;let r=!0,u=0;const c=i.rotate||0,d=i.left,p=i.top,v=i.width,m=i.height,h=d+v/2,f=p+m/2;if(!t.value)return;const g=t.value.getBoundingClientRect(),y=t=>{if(!r)return;const a=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,n=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,o=(a-g.left)/l.value,s=(n-g.top)/l.value,c=o-h,d=f-s;u=Fn(c,d);const p=5;Math.abs(u)<=p?u=0:u>0&&Math.abs(u-45)<=p?u-=u-45:u<0&&Math.abs(u+45)<=p?u-=u+45:u>0&&Math.abs(u-90)<=p?u-=u-90:u<0&&Math.abs(u+90)<=p?u-=u+90:u>0&&Math.abs(u-135)<=p?u-=u-135:u<0&&Math.abs(u+135)<=p?u-=u+135:u>0&&Math.abs(u-180)<=p?u-=u-180:u<0&&Math.abs(u+180)<=p&&(u-=u+180),e.value=e.value.map((e=>i.id===e.id?{...e,rotate:u}:e))},w=()=>{r=!1,document.onmousemove=null,document.onmouseup=null,c!==u&&(a.updateSlide({elements:e.value}),n())};s?(document.ontouchmove=y,document.ontouchend=w):(document.onmousemove=y,document.onmouseup=w)};return{rotateElement:o}};const $n={text:"文本",image:"图片",shape:"形状",line:"线条",chart:"图表",table:"表格",video:"视频",audio:"音频",latex:"公式"},Zn={text:20,image:20,shape:15,chart:200,table:20,video:250,audio:20,latex:20},On=(e,t)=>{const{left:l,top:a,width:n,height:o}=e,i=Math.sqrt(Math.pow(n,2)+Math.pow(o,2))/2,s=180*Math.atan(o/n)/Math.PI,r=(180-t-s)*Math.PI/180,u=(s-t)*Math.PI/180,c=(90-t)*Math.PI/180,d=t*Math.PI/180,p=n/2,v=o/2,m=l+p,h=a+v,f={left:m+i*Math.cos(r),top:h-i*Math.sin(r)},g={left:m+v*Math.cos(c),top:h-v*Math.sin(c)},y={left:m+i*Math.cos(u),top:h-i*Math.sin(u)},w={left:m+p*Math.cos(d),top:h+p*Math.sin(d)},x={left:m-i*Math.cos(r),top:h+i*Math.sin(r)},k={left:m-v*Math.sin(d),top:h+v*Math.cos(d)},b={left:m-i*Math.cos(u),top:h+i*Math.sin(u)},_={left:m-p*Math.cos(d),top:h-p*Math.sin(d)};return{leftTopPoint:f,topPoint:g,rightTopPoint:y,rightPoint:w,rightBottomPoint:x,bottomPoint:k,leftBottomPoint:b,leftPoint:_}},Rn=(e,t)=>{const l={[le.RIGHT_BOTTOM]:t.leftTopPoint,[le.LEFT_BOTTOM]:t.rightTopPoint,[le.LEFT_TOP]:t.rightBottomPoint,[le.RIGHT_TOP]:t.leftBottomPoint,[le.TOP]:t.bottomPoint,[le.BOTTOM]:t.topPoint,[le.LEFT]:t.rightPoint,[le.RIGHT]:t.leftPoint};return l[e]};var zn,Pn,Bn=(e,t,l)=>{const a=R(),n=$(),{activeElementIdList:i,activeGroupElementId:s}=(0,o.Jk)(a),{viewportRatio:r}=(0,o.Jk)(n),{ctrlOrShiftKeyActive:u}=(0,o.Jk)(q()),{addHistorySnapshot:c}=da(),d=(o,d,p)=>{const v=!(o instanceof MouseEvent);if(v&&(!o.changedTouches||!o.changedTouches[0]))return;let m=!0;a.setScalingState(!0);const h=d.left,f=d.top,g=d.width,y=d.height,w="table"===d.type?d.cellMinHeight:0,x="rotate"in d&&d.rotate?d.rotate:0,k=Math.PI*x/180,b=u.value||"fixedRatio"in d&&d.fixedRatio,_=g/y,I=v?o.changedTouches[0].pageX:o.pageX,S=v?o.changedTouches[0].pageY:o.pageY,C=Zn[d.type]||20,L=e=>e{const t=C/_;return e{const a=5,n=[];let o=!1,i=!1;const s={offsetX:0,offsetY:0};if(l||0===l)for(let t=0;t{if(!m)return;const a=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,n=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,o=a-I,i=n-S;let s=g,r=y,u=h,c=f;if(x){const e=(Math.cos(k)*o+Math.sin(k)*i)/l.value;let t=(Math.cos(k)*i-Math.sin(k)*o)/l.value;b&&(p!==le.RIGHT_BOTTOM&&p!==le.LEFT_TOP||(t=e/_),p!==le.LEFT_BOTTOM&&p!==le.RIGHT_TOP||(t=-e/_)),p===le.RIGHT_BOTTOM?(s=L(g+e),r=T(y+t)):p===le.LEFT_BOTTOM?(s=L(g-e),r=T(y+t),u=h-(s-g)):p===le.LEFT_TOP?(s=L(g-e),r=T(y-t),u=h-(s-g),c=f-(r-y)):p===le.RIGHT_TOP?(s=L(g+e),r=T(y-t),c=f-(r-y)):p===le.TOP?(r=L(y-t),c=f-(r-y)):p===le.BOTTOM?r=L(y+t):p===le.LEFT?(s=L(g-e),u=h-(s-g)):p===le.RIGHT&&(s=L(g+e));const a=On({width:s,height:r,left:u,top:c},x),n=Rn(p,a),d=n.left,v=n.top,m=d-M,w=v-U;u-=m,c-=w}else{let e=o/l.value,t=i/l.value;if(b&&(p!==le.RIGHT_BOTTOM&&p!==le.LEFT_TOP||(t=e/_),p!==le.LEFT_BOTTOM&&p!==le.RIGHT_TOP||(t=-e/_)),p===le.RIGHT_BOTTOM){const{offsetX:l,offsetY:a}=H(h+g+e,f+y+t);e-=l,t-=a,b&&(a?e=t*_:t=e/_),s=L(g+e),r=T(y+t)}else if(p===le.LEFT_BOTTOM){const{offsetX:l,offsetY:a}=H(h+e,f+y+t);e-=l,t-=a,b&&(a?e=-t*_:t=-e/_),s=L(g-e),r=T(y+t),u=h-(s-g)}else if(p===le.LEFT_TOP){const{offsetX:l,offsetY:a}=H(h+e,f+t);e-=l,t-=a,b&&(a?e=t*_:t=e/_),s=L(g-e),r=T(y-t),u=h-(s-g),c=f-(r-y)}else if(p===le.RIGHT_TOP){const{offsetX:l,offsetY:a}=H(h+g+e,f+t);e-=l,t-=a,b&&(a?e=-t*_:t=-e/_),s=L(g+e),r=T(y-t),c=f-(r-y)}else if(p===le.LEFT){const{offsetX:t}=H(h+e,null);e-=t,s=L(g-e),u=h-(s-g)}else if(p===le.RIGHT){const{offsetX:t}=H(h+g+e,null);e-=t,s=L(g+e)}else if(p===le.TOP){const{offsetY:e}=H(null,f+t);t-=e,r=L(y-t),c=f-(r-y)}else if(p===le.BOTTOM){const{offsetY:e}=H(null,f+y+t);t-=e,r=L(y+t)}}e.value=e.value.map((e=>{if(d.id!==e.id)return e;if("shape"===e.type&&"pathFormula"in e&&e.pathFormula){const t=ra[e.pathFormula];let l="";return l="editable"in t?t.formula(s,r,e.keypoint):t.formula(s,r),{...e,left:u,top:c,width:s,height:r,viewBox:[s,r],path:l}}if("table"===e.type){let t=w+(r-y)/e.data.length;return t=t<36?36:t,t===w?{...e,left:u,width:s}:{...e,left:u,top:c,width:s,height:r,cellMinHeight:t<36?36:t}}return{...e,left:u,top:c,width:s,height:r}}))},A=l=>{m=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const o=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,i=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;I===o&&S===i||(n.updateSlide({elements:e.value}),a.setScalingState(!1),c())};v?(document.ontouchmove=F,document.ontouchend=A):(document.onmousemove=F,document.onmouseup=A)},p=(t,a,o)=>{let s=!0;const{minX:r,maxX:d,minY:p,maxY:v}=a,m=d-r,h=v-p,f=m/h,g=t.pageX,y=t.pageY,w=JSON.parse(JSON.stringify(e.value));document.onmousemove=t=>{if(!s)return;const a=t.pageX,n=t.pageY,c=(a-g)/l.value;let x=(n-y)/l.value;u.value&&(o!==le.RIGHT_BOTTOM&&o!==le.LEFT_TOP||(x=c/f),o!==le.LEFT_BOTTOM&&o!==le.RIGHT_TOP||(x=-c/f));let k=r,b=d,_=p,I=v;o===le.RIGHT_BOTTOM?(b=d+c,I=v+x):o===le.LEFT_BOTTOM?(k=r+c,I=v+x):o===le.LEFT_TOP?(k=r+c,_=p+x):o===le.RIGHT_TOP?(b=d+c,_=p+x):o===le.TOP?_=p+x:o===le.BOTTOM?I=v+x:o===le.LEFT?k=r+c:o===le.RIGHT&&(b=d+c);const S=b-k,C=I-_;let L=S/m,T=C/h;L<=0&&(L=0),T<=0&&(T=0),e.value=e.value.map((e=>{if(("image"===e.type||"shape"===e.type)&&i.value.includes(e.id)){const t=w.find((t=>t.id===e.id));return{...e,width:t.width*L,height:t.height*T,left:k+(t.left-r)*L,top:_+(t.top-p)*T}}return e}))},document.onmouseup=t=>{s=!1,document.onmousemove=null,document.onmouseup=null,g===t.pageX&&y===t.pageY||(n.updateSlide({elements:e.value}),c())}};return{scaleElement:d,scaleMultiElement:p}},Nn=(e,t)=>{const l=R(),{activeElementIdList:a,activeGroupElementId:n,handleElementId:i,editorAreaFocus:s}=(0,o.Jk)(l),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(q()),u=(o,u,c=!0)=>{if(s.value||l.setEditorareaFocus(!0),a.value.includes(u.id)){if(r.value){let t=[];if(u.groupId){const l=[];e.value.forEach((e=>{e.groupId===u.groupId&&l.push(e.id)})),t=a.value.filter((e=>!l.includes(e)))}else t=a.value.filter((e=>e!==u.id));t.length>0&&l.setActiveElementIdList(t)}else if(i.value!==u.id)l.setHandleElementId(u.id);else if(n.value!==u.id){const e=o instanceof MouseEvent?o.pageX:o.changedTouches[0].pageX,t=o instanceof MouseEvent?o.pageY:o.changedTouches[0].pageY;o.target.onmouseup=a=>{const n=a.pageX,o=a.pageY;e===n&&t===o&&(l.setActiveGroupElementId(u.id),a.target.onmouseup=null)}}}else{let t=[];if(t=r.value?[...a.value,u.id]:[u.id],u.groupId){const l=[];e.value.forEach((e=>{e.groupId===u.groupId&&l.push(e.id)})),t=[...t,...l]}l.setActiveElementIdList((0,D.uniq)(t)),l.setHandleElementId(u.id)}c&&t(o,u)};return{selectElement:u}},jn=(e,t,l)=>{const a=$(),{activeElementIdList:n,activeGroupElementId:i}=(0,o.Jk)(R()),{shiftKeyState:s}=(0,o.Jk)(q()),{viewportRatio:r}=(0,o.Jk)(a),{addHistorySnapshot:u}=da(),c=(o,c)=>{const d=!(o instanceof MouseEvent);if(d&&(!o.changedTouches||!o.changedTouches[0]))return;if(!n.value.includes(c.id))return;let p=!0;const v=oa,m=oa*r.value,h=5,f=JSON.parse(JSON.stringify(e.value)),g=f.filter((e=>n.value.includes(e.id))),y=c.left,w=c.top,x=c.width,k="height"in c&&c.height?c.height:0,b="rotate"in c&&c.rotate?c.rotate:0,_=d?o.changedTouches[0].pageX:o.pageX,I=d?o.changedTouches[0].pageY:o.pageY;let S=null;const C=c.id===i.value;let L=[],T=[];for(const t of e.value){if("line"===t.type)continue;if(C&&t.id===c.id)continue;if(!C&&n.value.includes(t.id))continue;let e,l,a,o;if("rotate"in t&&t.rotate){const{xRange:n,yRange:i}=ye({left:t.left,top:t.top,width:t.width,height:t.height,rotate:t.rotate});e=n[0],l=i[0],a=n[1]-n[0],o=i[1]-i[0]}else e=t.left,l=t.top,a=t.width,o=t.height;const i=e+a,s=l+o,r=l+o/2,u=e+a/2,d={value:l,range:[e,i]},p={value:s,range:[e,i]},v={value:r,range:[e,i]},m={value:e,range:[l,s]},h={value:i,range:[l,s]},f={value:u,range:[l,s]};L.push(d,p,v),T.push(m,h,f)}const E={value:0,range:[0,v]},M={value:m,range:[0,v]},U={value:m/2,range:[0,v]},W={value:0,range:[0,m]},D={value:v,range:[0,m]},H={value:v/2,range:[0,m]};L.push(E,M,U),T.push(W,D,H),L=be(L),T=be(T);const F=a=>{const o=a instanceof MouseEvent?a.pageX:a.changedTouches[0].pageX,i=a instanceof MouseEvent?a.pageY:a.changedTouches[0].pageY;if(!1!==S&&(S=Math.abs(_-o)Math.abs(u)&&(u=0),Math.abs(r)e.id===c.id?{...e,left:E,top:M}:e));else{const t=e.value.find((e=>e.id===c.id));if(!t)return;e.value=e.value.map((e=>n.value.includes(e.id)?e.id===c.id?{...e,left:E,top:M}:{...e,left:e.left+(E-t.left),top:e.top+(M-t.top)}:e))}},A=l=>{p=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const n=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,o=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;_===n&&I===o||(a.updateSlide({elements:e.value}),u())};d?(document.ontouchmove=F,document.ontouchend=A):(document.onmousemove=F,document.onmouseup=A)};return{dragElement:c}},Yn=e=>{const t=$(),{canvasScale:l}=(0,o.Jk)(R()),{ctrlOrShiftKeyActive:a}=(0,o.Jk)(q()),{addHistorySnapshot:n}=da(),i=(o,i,s)=>{let r=!0;const u=8,c=o.pageX,d=o.pageY,p=[];for(let t=0;t{if(!r)return;const n=t.pageX,o=t.pageY,v=(n-c)/l.value,m=(o-d)/l.value;let h=i.left+i.start[0],f=i.top+i.start[1],g=i.left+i.end[0],y=i.top+i.end[1];const w=i.broken||i.curve||[0,0];let x=i.left+w[0],k=i.top+w[1];const[b,_]=i.cubic||[[0,0],[0,0]];let I=i.left+b[0],S=i.top+b[1],C=i.left+_[0],L=i.top+_[1];if(s===ae.START){h+=v,f+=m,Math.abs(h-g)g&&(W[0]=M-T,D[0]=0),f>y&&(W[1]=U-E,D[1]=0),e.value=e.value.map((e=>{if(e.id===i.id){const t={...e,left:T,top:E,start:W,end:D};return s===ae.START||s===ae.END?a.value?(i.broken&&(t.broken=[x-T,k-E]),i.curve&&(t.curve=[x-T,k-E]),i.cubic&&(t.cubic=[[I-T,S-E],[C-T,L-E]])):(i.broken&&(t.broken=[(W[0]+D[0])/2,(W[1]+D[1])/2]),i.curve&&(t.curve=[(W[0]+D[0])/2,(W[1]+D[1])/2]),i.cubic&&(t.cubic=[[(W[0]+D[0])/2,(W[1]+D[1])/2],[(W[0]+D[0])/2,(W[1]+D[1])/2]])):s===ae.C?(i.broken&&(t.broken=[x-T,k-E]),i.curve&&(t.curve=[x-T,k-E])):i.cubic&&(t.cubic=[[I-T,S-E],[C-T,L-E]]),t}return e}))},document.onmouseup=l=>{r=!1,document.onmousemove=null,document.onmouseup=null;const a=l.pageX,o=l.pageY;c===a&&d===o||(t.updateSlide({elements:e.value}),n())}};return{dragLineElement:i}},Vn=(e,t)=>{const l=$(),{addHistorySnapshot:a}=da(),n=(n,o)=>{const i=!(n instanceof MouseEvent);if(i&&(!n.changedTouches||!n.changedTouches[0]))return;let s=!0;const r=i?n.changedTouches[0].pageX:n.pageX,u=i?n.changedTouches[0].pageY:n.pageY,c=ra[o.pathFormula];let d=null;if("editable"in c){const e=c.getBaseSize(o.width,o.height),t=e*o.keypoint,[l,a]=c.range,n=c.relative;d={baseSize:e,originPos:t,min:l,max:a,relative:n}}const p=l=>{if(!s)return;const a=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,n=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY,i=(a-r)/t.value,p=(n-u)/t.value;e.value=e.value.map((e=>{if(e.id===o.id&&d){const{baseSize:t,originPos:l,min:a,max:n,relative:o}=d,s=e;let r=0;return"left"===o&&(r=(l+i)/t),"right"===o&&(r=(l-i)/t),"center"===o&&(r=(l-2*i)/t),"top"===o&&(r=(l+p)/t),"bottom"===o&&(r=(l-p)/t),rn&&(r=n),{...e,keypoint:r,path:c.formula(s.width,s.height,r)}}return e}))},v=t=>{s=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null;const n=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,o=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY;r===n&&u===o||(l.updateSlide({elements:e.value}),a())};i?(document.ontouchmove=p,document.ontouchend=v):(document.onmousemove=p,document.onmouseup=v)};return{moveShapeKeypoint:n}},Jn=e=>{const t=R(),{canvasScale:l,creatingElement:a}=(0,o.Jk)(t),n=t=>{const{start:a,end:n}=t;if(!e.value)return;const o=e.value.getBoundingClientRect(),[i,s]=a,[r,u]=n,c=Math.min(i,r),d=Math.max(i,r),p=Math.min(s,u),v=Math.max(s,u),m=(c-o.x)/l.value,h=(p-o.y)/l.value,f=(d-c)/l.value,g=(v-p)/l.value;return{left:m,top:h,width:f,height:g}},i=t=>{const{start:a,end:n}=t;if(!e.value)return;const o=e.value.getBoundingClientRect(),[i,s]=a,[r,u]=n,c=Math.min(i,r),d=Math.max(i,r),p=Math.min(s,u),v=Math.max(s,u),m=(c-o.x)/l.value,h=(p-o.y)/l.value,f=(d-c)/l.value,g=(v-p)/l.value,y=[i===c?0:f,s===p?0:g],w=[r===c?0:f,u===p?0:g];return{left:m,top:h,start:y,end:w}},{createTextElement:s,createShapeElement:r,createLineElement:u}=pa(),c=e=>{if(!a.value)return;const l=a.value.type;if("text"===l){const t=n(e);t&&s(t,{vertical:a.value.vertical})}else if("shape"===l){const t=n(e);t&&r(t,a.value.data)}else if("line"===l){const t=i(e);t&&u(t,a.value.data)}t.setCreatingElement(null)};return{formatCreateSelection:n,insertElementFromCreateSelection:c}},qn=()=>{const e=$(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(R()),{currentSlide:a,viewportRatio:n}=(0,o.Jk)(e),{addHistorySnapshot:i}=da(),s=o=>{const s=oa,r=oa*n.value,{minX:u,maxX:c,minY:d,maxY:p}=ke(l.value),v=JSON.parse(JSON.stringify(a.value.elements));for(const e of v)if(t.value.includes(e.id)){if(o===ee.CENTER){const t=d+(p-d)/2-r/2,l=u+(c-u)/2-s/2;e.top=e.top-t,e.left=e.left-l}if(o===ee.TOP){const t=d-0;e.top=e.top-t}else if(o===ee.VERTICAL){const t=d+(p-d)/2-r/2;e.top=e.top-t}else if(o===ee.BOTTOM){const t=p-r;e.top=e.top-t}else if(o===ee.LEFT){const t=u-0;e.left=e.left-t}else if(o===ee.HORIZONTAL){const t=u+(c-u)/2-s/2;e.left=e.left-t}else if(o===ee.RIGHT){const t=c-s;e.left=e.left-t}}e.updateSlide({elements:v}),i()};return{alignElementToCanvas:s}},Xn=e=>{const t=(0,i.Fl)((()=>{if(e.value){const{h:t,v:l,blur:a,color:n}=e.value;return`${t}px ${l}px ${a}px ${n}`}return""}));return{shadowStyle:t}},Gn=(e,t)=>{const l=(0,i.Fl)((()=>{let l="";return e.value&&t.value?l="rotateX(180deg) rotateY(180deg)":t.value?l="rotateX(180deg)":e.value&&(l="rotateY(180deg)"),l}));return{flipStyle:l}};(function(e){e["RECT"]="rect",e["ELLIPSE"]="ellipse",e["POLYGON"]="polygon"})(zn||(zn={})),function(e){e["RECT"]="rect",e["ROUNDRECT"]="roundRect",e["ELLIPSE"]="ellipse",e["TRIANGLE"]="triangle",e["PENTAGON"]="pentagon",e["RHOMBUS"]="rhombus",e["STAR"]="star"}(Pn||(Pn={}));const Kn={rect:{name:"矩形",type:zn.RECT,radius:"0",style:""},rect2:{name:"矩形2",type:zn.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)",createPath:(e,t)=>`M 0 0 L ${.8*e} 0 L ${e} ${.2*t} L ${e} ${t} L 0 ${t} Z`},rect3:{name:"矩形3",type:zn.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)",createPath:(e,t)=>`M 0 0 L ${.8*e} 0 L ${e} ${.2*t} L ${e} ${t} L ${.2*e} ${t} L 0 ${.8*t} Z`},roundRect:{name:"圆角矩形",type:zn.RECT,radius:"10px",style:"inset(0 0 0 0 round 10px 10px 10px 10px)"},ellipse:{name:"圆形",type:zn.ELLIPSE,style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:zn.POLYGON,style:"polygon(50% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M ${.5*e} 0 L 0 ${t} L ${e} ${t} Z`},triangle2:{name:"三角形2",type:zn.POLYGON,style:"polygon(50% 100%, 0% 0%, 100% 0%)",createPath:(e,t)=>`M ${.5*e} ${t} L 0 0 L ${e} 0 Z`},triangle3:{name:"三角形3",type:zn.POLYGON,style:"polygon(0% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M 0 0 L 0 ${t} L ${e} ${t} Z`},rhombus:{name:"菱形",type:zn.POLYGON,style:"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",createPath:(e,t)=>`M ${.5*e} 0 L ${e} ${.5*t} L ${.5*e} ${t} L 0 ${.5*t} Z`},pentagon:{name:"五边形",type:zn.POLYGON,style:"polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",createPath:(e,t)=>`M ${.5*e} 0 L ${e} ${.38*t} L ${.82*e} ${t} L ${.18*e} ${t} L 0 ${.38*t} Z`},hexagon:{name:"六边形",type:zn.POLYGON,style:"polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)",createPath:(e,t)=>`M ${.2*e} 0 L ${.8*e} 0 L ${e} ${.5*t} L ${.8*e} ${t} L ${.2*e} ${t} L 0 ${.5*t} Z`},heptagon:{name:"七边形",type:zn.POLYGON,style:"polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)",createPath:(e,t)=>`M ${.5*e} 0 L ${.9*e} ${.2*t} L ${e} ${.6*t} L ${.75*e} ${t} L ${.25*e} ${t} L 0 ${.6*t} L ${.1*e} ${.2*t} Z`},octagon:{name:"八边形",type:zn.POLYGON,style:"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)",createPath:(e,t)=>`M ${.3*e} 0 L ${.7*e} 0 L ${e} ${.3*t} L ${e} ${.7*t} L ${.7*e} ${t} L ${.3*e} ${t} L 0 ${.7*t} L 0 ${.3*t} Z`},chevron:{name:"V形",type:zn.POLYGON,style:"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)",createPath:(e,t)=>`M ${.75*e} 0 L ${e} ${.5*t} L ${.75*e} ${t} L 0 ${t} L ${.25*e} ${.5*t} L 0 0 Z`},point:{name:"点",type:zn.POLYGON,style:"polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)",createPath:(e,t)=>`M 0 0 L ${.75*e} 0 L ${e} ${.5*t} L ${.75*e} ${t} L 0 ${t} Z`},arrow:{name:"箭头",type:zn.POLYGON,style:"polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)",createPath:(e,t)=>`M 0 ${.2*t} L ${.6*e} ${.2*t} L ${.6*e} 0 L ${e} ${.5*t} L ${.6*e} ${t} L ${.6*e} ${.8*t} L 0 ${.8*t} Z`},parallelogram:{name:"平行四边形",type:zn.POLYGON,style:"polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)",createPath:(e,t)=>`M ${.3*e} 0 L ${e} 0 L ${.7*e} ${t} L 0 ${t} Z`},parallelogram2:{name:"平行四边形2",type:zn.POLYGON,style:"polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)",createPath:(e,t)=>`M ${.3*e} ${t} L ${e} ${t} L ${.7*e} 0 L 0 0 Z`},trapezoid:{name:"梯形",type:zn.POLYGON,style:"polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",createPath:(e,t)=>`M ${.25*e} 0 L ${.75*e} 0 L ${e} ${t} L 0 ${t} Z`},trapezoid2:{name:"梯形2",type:zn.POLYGON,style:"polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)",createPath:(e,t)=>`M 0 0 L ${e} 0 L ${.75*e} ${t} L ${.25*e} ${t} Z`}};var Qn=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return Kn.rect;const t=e.value.shape||zn.RECT;return Kn[t]})),l=(0,i.Fl)((()=>{if(!e.value)return{top:"0",left:"0",width:"100%",height:"100%"};const[t,l]=e.value.range,a=(l[0]-t[0])/100,n=(l[1]-t[1])/100,o=t[0]/a,i=t[1]/n;return{left:-o+"%",top:-i+"%",width:100/a+"%",height:100/n+"%"}}));return{clipShape:t,imgPosition:l}},eo=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return"";let t="";const l=Object.keys(e.value);for(const a of l)t+=`${a}(${e.value[a]}) `;return t}));return{filter:t}},to=e=>{const t=(0,i.Fl)((()=>e.value?.width??0)),l=(0,i.Fl)((()=>e.value?.style||"solid")),a=(0,i.Fl)((()=>e.value?.color||"#d14424")),n=(0,i.Fl)((()=>{if("dashed"!==l.value)return"0 0";const e=t.value;return e<=6?`${4.5*e} ${2*e}`:`${4*e} ${1.5*e}`}));return{outlineWidth:t,outlineStyle:l,outlineColor:a,strokeDashArray:n}};const lo=["width","height"],ao=["rx","ry","width","height","stroke","stroke-width","stroke-dasharray"];var no=(0,i.aZ)({__name:"ImageRectOutline",props:{width:{},height:{},outline:{},radius:{default:"0"}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=to((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-rect-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("rect",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",rx:e.radius,ry:e.radius,width:e.width,height:e.height,stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,ao)],8,lo)):(0,i.kq)("",!0)}});const oo=(0,Vl.Z)(no,[["__scopeId","data-v-35e36256"]]);var io=oo;const so=["width","height"],ro=["cx","cy","rx","ry","stroke","stroke-width","stroke-dasharray"];var uo=(0,i.aZ)({__name:"ImageEllipseOutline",props:{width:{},height:{},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=to((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-ellipse-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("ellipse",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",cx:e.width/2,cy:e.height/2,rx:e.width/2,ry:e.height/2,stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,ro)],8,so)):(0,i.kq)("",!0)}});const co=(0,Vl.Z)(uo,[["__scopeId","data-v-11836cf8"]]);var po=co;const vo=["width","height"],mo=["d","stroke","stroke-width","stroke-dasharray"];var ho=(0,i.aZ)({__name:"ImagePolygonOutline",props:{width:{},height:{},createPath:{type:Function},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=to((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-polygon-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:e.createPath(e.width,e.height),stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,mo)],8,vo)):(0,i.kq)("",!0)}});const fo=(0,Vl.Z)(ho,[["__scopeId","data-v-6e021ee2"]]);var go=fo;const yo={class:"image-outline"};var wo=(0,i.aZ)({__name:"index",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:a}=Qn(l);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",yo,["rect"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(io,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,radius:(0,s.SU)(a).radius,outline:e.elementInfo.outline},null,8,["width","height","radius","outline"])):"ellipse"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(po,{key:1,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"])):"polygon"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(go,{key:2,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline,createPath:(0,s.SU)(a).createPath},null,8,["width","height","outline","createPath"])):(0,i.kq)("",!0)]))}});const xo=wo;var ko=xo;const bo=e=>((0,i.dD)("data-v-5984406b"),e=e(),(0,i.Cn)(),e),_o=["src"],Io=["src"],So=["onMousedown"],Co=bo((()=>(0,i._)("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[(0,i._)("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 16 L 4 16 L 4 4 L 16 4 L 16 0 Z"})],-1))),Lo=[Co],To=["onMousedown"],Eo=bo((()=>(0,i._)("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[(0,i._)("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 4 L 16 4 Z"})],-1))),Mo=[Eo];var Uo=(0,i.aZ)({__name:"ImageClipHandler",props:{src:{},clipPath:{},width:{},height:{},top:{},left:{},rotate:{},clipData:{}},emits:["clip"],setup(e,{emit:t}){const l=e,a=t,{canvasScale:r}=(0,o.Jk)(R()),{ctrlOrShiftKeyActive:u}=(0,o.Jk)(q()),c=(0,s.iH)({top:"0",left:"0"}),d=(0,s.iH)(!1),p=(0,s.iH)(null),v=()=>{const[e,t]=l.clipData?l.clipData.range:[[0,0],[100,100]],a=(t[0]-e[0])/100,n=(t[1]-e[1])/100,o=e[0]/a,i=e[1]/n;return{widthScale:a,heightScale:n,left:o,top:i}},m=(0,i.Fl)((()=>{const{widthScale:e,heightScale:t,left:l,top:a}=v();return{left:-l,top:-a,width:100/e,height:100/t}})),h=(0,i.Fl)((()=>({top:m.value.top+"%",left:m.value.left+"%",width:m.value.width+"%",height:m.value.height+"%"}))),f=(0,s.iH)({top:0,left:0,width:0,height:0}),g=(0,i.Fl)((()=>{const{top:e,left:t,width:l,height:a}=f.value;return{top:e+"%",left:t+"%",width:l+"%",height:a+"%"}})),y=(0,i.Fl)((()=>{const e=m.value.width,t=m.value.height,{top:l,left:a,width:n,height:o}=f.value;return{left:100/n*-a+"%",top:100/o*-l+"%",width:e/n*100+"%",height:t/o*100+"%"}})),w=()=>{const{left:e,top:t}=v();f.value={left:e,top:t,width:100,height:100},c.value={top:-t+"%",left:-e+"%"}},x=()=>{if(d.value)return;if(!p.value)return void a("clip",null);const{left:e,top:t}=v(),n={left:(f.value.left-e)/100*l.width,top:(f.value.top-t)/100*l.height,width:(f.value.width-100)/100*l.width,height:(f.value.height-100)/100*l.height},o={range:p.value,position:n};a("clip",o)},k=e=>{const t=e.key.toUpperCase();t===ne.ENTER&&x()};(0,i.bv)((()=>{w(),document.addEventListener("keydown",k)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",k)}));const b=()=>{const e={left:parseInt(y.value.left),top:parseInt(y.value.top),width:parseInt(y.value.width),height:parseInt(y.value.height)},t=100/e.width,l=100/e.height,a=[-e.left*t,-e.top*l],n=[100*t+a[0],100*l+a[1]];p.value=[a,n]},_=e=>{d.value=!0;let t=!0;const a=e.pageX,n=e.pageY,o=m.value,i={...f.value};document.onmousemove=e=>{if(!t)return;const s=e.pageX,u=e.pageY;let c=(s-a)/r.value/l.width*100,d=(u-n)/r.value/l.height*100;l.rotate>45&&l.rotate<135&&(c=(u-n)/r.value/l.width*100,d=-(s-a)/r.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(c=-c,d=-d),l.rotate>-135&&l.rotate<-45&&(c=-(u-n)/r.value/l.width*100,d=(s-a)/r.value/l.height*100);let p=i.left+c,v=i.top+d;p<0?p=0:p+i.width>o.width&&(p=o.width-i.width),v<0?v=0:v+i.height>o.height&&(v=o.height-i.height),f.value={...f.value,left:p,top:v}},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null,b(),setTimeout((()=>{d.value=!1}),0)}},I=(e,t)=>{d.value=!0;let a=!0;const n=50/l.width*100,o=50/l.height*100,i=e.pageX,s=e.pageY,c=m.value,p={...f.value},v=f.value.width/f.value.height;document.onmousemove=e=>{if(!a)return;const d=e.pageX,m=e.pageY;let h,g,y,w,x=(d-i)/r.value/l.width*100,k=(m-s)/r.value/l.height*100;l.rotate>45&&l.rotate<135&&(x=(m-s)/r.value/l.width*100,k=-(d-i)/r.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(x=-x,k=-k),l.rotate>-135&&l.rotate<-45&&(x=-(m-s)/r.value/l.width*100,k=(d-i)/r.value/l.height*100),u.value&&(t!==le.RIGHT_BOTTOM&&t!==le.LEFT_TOP||(k=x/v),t!==le.LEFT_BOTTOM&&t!==le.RIGHT_TOP||(k=-x/v)),t===le.LEFT_TOP?(p.left+x<0&&(x=-p.left),p.top+k<0&&(k=-p.top),p.width-xc.width&&(x=c.width-(p.left+p.width)),p.top+k<0&&(k=-p.top),p.width+xc.height&&(k=c.height-(p.top+p.height)),p.width-xc.width&&(x=c.width-(p.left+p.width)),p.top+p.height+k>c.height&&(k=c.height-(p.top+p.height)),p.width+xc.height&&(k=c.height-(p.top+p.height)),p.height+kc.width&&(x=c.width-(p.left+p.width)),p.width+x{a=!1,document.onmousemove=null,document.onmouseup=null,b(),setTimeout((()=>d.value=!1),0)}},S=(0,i.Fl)((()=>{const e="rotate-",t=l.rotate;return t>-22.5&&t<=22.5?e+0:t>22.5&&t<=67.5?e+45:t>67.5&&t<=112.5?e+90:t>112.5&&t<=157.5?e+135:t>157.5||t<=-157.5?e+0:t>-157.5&&t<=-112.5?e+45:t>-112.5&&t<=-67.5?e+90:t>-67.5&&t<=-22.5?e+135:e+0})),C=[le.LEFT_TOP,le.RIGHT_TOP,le.LEFT_BOTTOM,le.RIGHT_BOTTOM],L=[le.TOP,le.BOTTOM,le.LEFT,le.RIGHT];return(e,t)=>{const l=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"image-clip-handler",style:(0,oe.j5)(c.value)},[(0,i._)("img",{class:"bottom-img",src:e.src,draggable:!1,alt:"",style:(0,oe.j5)(h.value)},null,12,_o),(0,i._)("div",{class:"top-image-content",style:(0,oe.j5)({...g.value,clipPath:e.clipPath})},[(0,i._)("img",{class:"top-img",src:e.src,draggable:!1,alt:"",style:(0,oe.j5)(y.value)},null,12,Io)],4),(0,i._)("div",{class:"operate",style:(0,oe.j5)(g.value),onMousedown:t[0]||(t[0]=(0,n.iM)((e=>_(e)),["stop"]))},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(C,(e=>(0,i._)("div",{class:(0,oe.C_)(["clip-point",e,S.value]),key:e,onMousedown:(0,n.iM)((t=>I(t,e)),["stop"])},Lo,42,So))),64)),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(L,(e=>(0,i._)("div",{class:(0,oe.C_)(["clip-point",e,S.value]),key:e,onMousedown:(0,n.iM)((t=>I(t,e)),["stop"])},Mo,42,To))),64))],36)],4)),[[l,x]])}}});const Wo=(0,Vl.Z)(Uo,[["__scopeId","data-v-5984406b"]]);var Do=Wo;const Ho=["src"];var Fo=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=R(),a=$(),{clipingImageElementId:r}=(0,o.Jk)(l),u=(0,i.Fl)((()=>r.value===t.elementInfo.id)),{addHistorySnapshot:c}=da(),d=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:p}=Xn(d),v=(0,i.Fl)((()=>t.elementInfo.flipH)),m=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:h}=Gn(v,m),f=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:g,imgPosition:y}=Qn(f),w=(0,i.Fl)((()=>t.elementInfo.filters)),{filter:x}=eo(w),k=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},b=e=>{if(l.setClipingImageElementId(""),!e)return;const{range:n,position:o}=e,i=t.elementInfo.clip||{shape:"rect",range:[[0,0],[100,100]]},s=t.elementInfo.left+o.left,r=t.elementInfo.top+o.top,u=t.elementInfo.width+o.width,d=t.elementInfo.height+o.height;let p=0,v=0;if(t.elementInfo.rotate){const e=s+u/2-(t.elementInfo.left+t.elementInfo.width/2),l=-(r+d/2-(t.elementInfo.top+t.elementInfo.height/2)),a=-t.elementInfo.rotate*Math.PI/180,n=e*Math.cos(a)-l*Math.sin(a),o=e*Math.sin(a)+l*Math.cos(a);p=n-e,v=-(o-l)}const m={clip:{...i,range:n},left:s+p,top:r+v,width:u,height:d};a.updateElement({id:t.elementInfo.id,props:m}),c()};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-image",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[u.value?((0,i.wg)(),(0,i.j4)(Do,{key:0,src:e.elementInfo.src,clipData:e.elementInfo.clip,width:e.elementInfo.width,height:e.elementInfo.height,top:e.elementInfo.top,left:e.elementInfo.left,rotate:e.elementInfo.rotate,clipPath:(0,s.SU)(g).style,onClip:t[0]||(t[0]=e=>b(e))},null,8,["src","clipData","width","height","top","left","rotate","clipPath"])):(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{key:1,class:"element-content",style:(0,oe.j5)({filter:(0,s.SU)(p)?`drop-shadow(${(0,s.SU)(p)})`:"",transform:(0,s.SU)(h)}),onMousedown:t[2]||(t[2]=e=>k(e)),onTouchstart:t[3]||(t[3]=e=>k(e))},[(0,i.Wm)(ko,{elementInfo:e.elementInfo},null,8,["elementInfo"]),(0,i._)("div",{class:"image-content",style:(0,oe.j5)({clipPath:(0,s.SU)(g).style})},[(0,i._)("img",{src:e.elementInfo.src,draggable:!1,style:(0,oe.j5)({top:(0,s.SU)(y).top,left:(0,s.SU)(y).left,width:(0,s.SU)(y).width,height:(0,s.SU)(y).height,filter:(0,s.SU)(x)}),onDragstart:t[1]||(t[1]=(0,n.iM)((()=>{}),["prevent"])),alt:""},null,44,Ho),e.elementInfo.colorMask?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"color-mask",style:(0,oe.j5)({backgroundColor:e.elementInfo.colorMask})},null,4)):(0,i.kq)("",!0)],4)],36)),[[l,e.contextmenus]])],4)],6)}}});const Ao=(0,Vl.Z)(Fo,[["__scopeId","data-v-1156b3e1"]]);var $o=Ao;const Zo=["width","height"],Oo=["d","stroke","stroke-width","stroke-dasharray"];var Ro=(0,i.aZ)({__name:"ElementOutline",props:{width:{},height:{},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=to((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"element-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:`M0,0 L${e.width},0 L${e.width},${e.height} L0,${e.height} Z`,stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,Oo)],8,Zo)):(0,i.kq)("",!0)}});const zo=(0,Vl.Z)(Ro,[["__scopeId","data-v-efb76626"]]);var Po=zo,Bo=l(2376),No=l(4348),jo=l(2806),Yo=l(728),Vo=l(8463),Jo=l(4251),qo=l(915),Xo=l(3833),Go=l(6912);const Ko=e=>{const t={},l=(e,l)=>t[e]=l;return l("Alt-ArrowUp",u.MI),l("Alt-ArrowDown",u.Ig),l("Mod-z",Vo.Yw),l("Mod-y",Vo.KX),l("Backspace",Go.dU),l("Escape",u.N0),l("Mod-b",(0,u.w9)(e.marks.strong)),l("Mod-i",(0,u.w9)(e.marks.em)),l("Mod-u",(0,u.w9)(e.marks.underline)),l("Mod-d",(0,u.w9)(e.marks.strikethrough)),l("Mod-e",(0,u.w9)(e.marks.code)),l("Mod-;",(0,u.w9)(e.marks.superscript)),l("Mod-'",(0,u.w9)(e.marks.subscript)),l("Enter",(0,u.QF)((0,Xo.s6)(e.nodes.list_item),u.QK,u.mD,u.X0,u.$j)),l("Mod-[",(0,Xo.IB)(e.nodes.list_item)),l("Mod-]",(0,Xo.bw)(e.nodes.list_item)),l("Tab",(0,Xo.bw)(e.nodes.list_item)),t},Qo=e=>(0,Go.S0)(/^\s*>\s$/,e),ei=e=>(0,Go.S0)(/^(\d+)\.\s$/,e,(e=>({order:+e[1]})),((e,t)=>t.childCount+t.attrs.order===+e[1])),ti=e=>(0,Go.S0)(/^\s*([-+*])\s$/,e),li=()=>{const e=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/;return new Go.VK(e,((e,t,l,a)=>{const{schema:n}=e,o=e.tr.insertText(`${t[2]} `,l,a),i=n.marks.code.create();return o.addMark(l,l+t[2].length,i)}))},ai=()=>{const e=/(?:https?:\/\/)?[\w-]+(?:\.[\w-]+)+\.?(?:\d+)?(?:\/\S*)?$/;return new Go.VK(e,((e,t,l,a)=>{const{schema:n}=e,o=e.tr.insertText(t[0],l,a),i=n.marks.link.create({href:t[0],title:t[0]});return o.addMark(l,l+t[0].length,i)}))},ni=e=>{const t=[...Go.yR,Go.LH,Go.pR];return t.push(Qo(e.nodes.blockquote)),t.push(ei(e.nodes.ordered_list)),t.push(ti(e.nodes.bullet_list)),t.push(li()),t.push(ai()),(0,Go.Hw)({rules:t})},oi=e=>"paragraph"===e.type.name&&2===e.nodeSize,ii=e=>new Bo.Sy({props:{decorations(t){const{$from:l}=t.selection;if(oi(l.parent)){const a=No.p.node(l.before(),l.after(),{"data-placeholder":e});return No.EH.create(t.doc,[a])}}}}),si=(e,t)=>{const l=t?.placeholder,a=[ni(e),(0,Yo.h)(Ko(e)),(0,Yo.h)(u.YR),(0,Jo.q)(),(0,qo.d)(),(0,Vo.m8)()];return l&&a.push(ii(l)),a};var ri=l(4073);const ui={attrs:{order:{default:1},listStyleType:{default:""},fontsize:{default:""},color:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:e=>{const t=(e.hasAttribute("start")?e.getAttribute("start"):1)||1,l={order:+t},{listStyleType:a,fontSize:n,color:o}=e.style;return a&&(l["listStyleType"]=a),n&&(l["fontsize"]=n),o&&(l["color"]=o),l}}],toDOM:e=>{const{order:t,listStyleType:l,fontsize:a,color:n}=e.attrs;let o="";l&&(o+=`list-style-type: ${l};`),a&&(o+=`font-size: ${a};`),n&&(o+=`color: ${n};`);const i={style:o};return 1!==t&&(i["start"]=t),["ol",i,0]}},ci={attrs:{listStyleType:{default:""},fontsize:{default:""},color:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ul",getAttrs:e=>{const t={},{listStyleType:l,fontSize:a,color:n}=e.style;return l&&(t["listStyleType"]=l),a&&(t["fontsize"]=a),n&&(t["color"]=n),t}}],toDOM:e=>{const{listStyleType:t,fontsize:l,color:a}=e.attrs;let n="";return t&&(n+=`list-style-type: ${t};`),l&&(n+=`font-size: ${l};`),a&&(n+=`color: ${a};`),["ul",{style:n},0]}},di={...Xo.qb,content:"paragraph block*",group:"block"},pi={attrs:{align:{default:""},indent:{default:0},textIndent:{default:0}},content:"inline*",group:"block",parseDOM:[{tag:"p",getAttrs:e=>{const{textAlign:t,textIndent:l}=e.style;let a=e.getAttribute("align")||t||"";a=/(left|right|center|justify)/.test(a)?a:"";let n=0;l&&(/em/.test(l)?n=parseInt(l):/px/.test(l)&&(n=Math.floor(parseInt(l)/20),n||(n=1)));const o=+(e.getAttribute("data-indent")||0);return{align:a,indent:o,textIndent:n}}},{tag:"img",ignore:!0},{tag:"pre",skip:!0}],toDOM:e=>{const{align:t,indent:l,textIndent:a}=e.attrs;let n="";t&&"left"!==t&&(n+=`text-align: ${t};`),a&&(n+=`text-indent: ${20*a}px;`);const o={style:n};return l&&(o["data-indent"]=l),["p",o,0]}},{doc:vi,blockquote:mi,text:hi}=ri.nodes;var fi={doc:vi,paragraph:pi,blockquote:mi,text:hi,ordered_list:ui,bullet_list:ci,list_item:di};const gi={excludes:"subscript",parseDOM:[{tag:"sub"},{style:"vertical-align",getAttrs:e=>"sub"===e&&null}],toDOM:()=>["sub",0]},yi={excludes:"superscript",parseDOM:[{tag:"sup"},{style:"vertical-align",getAttrs:e=>"super"===e&&null}],toDOM:()=>["sup",0]},wi={parseDOM:[{tag:"strike"},{style:"text-decoration",getAttrs:e=>"line-through"===e&&null},{style:"text-decoration-line",getAttrs:e=>"line-through"===e&&null}],toDOM:()=>["span",{style:"text-decoration-line: line-through;"},0]},xi={parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>"underline"===e&&null},{style:"text-decoration-line",getAttrs:e=>"underline"===e&&null}],toDOM:()=>["span",{style:"text-decoration: underline;"},0]},ki={attrs:{color:{}},inline:!0,group:"inline",parseDOM:[{style:"color",getAttrs:e=>e?{color:e}:{}}],toDOM:e=>{const{color:t}=e.attrs;let l="";return t&&(l+=`color: ${t};`),["span",{style:l},0]}},bi={attrs:{backcolor:{}},inline:!0,group:"inline",parseDOM:[{style:"background-color",getAttrs:e=>e?{backcolor:e}:{}}],toDOM:e=>{const{backcolor:t}=e.attrs;let l="";return t&&(l+=`background-color: ${t};`),["span",{style:l},0]}},_i={attrs:{fontsize:{}},inline:!0,group:"inline",parseDOM:[{style:"font-size",getAttrs:e=>e?{fontsize:e}:{}}],toDOM:e=>{const{fontsize:t}=e.attrs;let l="";return t&&(l+=`font-size: ${t};`),["span",{style:l},0]}},Ii={attrs:{fontname:{}},inline:!0,group:"inline",parseDOM:[{style:"font-family",getAttrs:e=>({fontname:e&&"string"===typeof e?e.replace(/[\"\']/g,""):""})}],toDOM:e=>{const{fontname:t}=e.attrs;let l="";return t&&(l+=`font-family: ${t};`),["span",{style:l},0]}},Si={attrs:{href:{},title:{default:null},target:{default:"_blank"}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href"),l=e.getAttribute("title");return{href:t,title:l}}}],toDOM:e=>["a",e.attrs,0]},Ci={attrs:{index:{default:null}},parseDOM:[{tag:"mark",getAttrs:e=>{const t=e.dataset.index;return{index:t}}}],toDOM:e=>["mark",{"data-index":e.attrs.index},0]},{em:Li,strong:Ti,code:Ei}=ri.marks;var Mi={em:Li,strong:Ti,fontsize:_i,fontname:Ii,code:Ei,forecolor:ki,backcolor:bi,subscript:gi,superscript:yi,strikethrough:wi,underline:xi,link:Si,mark:Ci};const Ui=fi,Wi=Mi,Di=new jo.V_({nodes:Ui,marks:Wi}),Hi=e=>{const t=`
${e}
`,l=new window.DOMParser,a=l.parseFromString(t,"text/html").body.firstElementChild;return jo.aw.fromSchema(Di).parse(a)},Fi=(e,t,l,a)=>new No.tk(e,{state:Bo.yy.create({doc:Hi(t),plugins:si(Di,a)}),...l});var Ai,$i=l(9391);(function(e){e["RICH_TEXT_COMMAND"]="RICH_TEXT_COMMAND",e["SYNC_RICH_TEXT_ATTRS_TO_STORE"]="SYNC_RICH_TEXT_ATTRS_TO_STORE",e["OPEN_CHART_DATA_EDITOR"]="OPEN_CHART_DATA_EDITOR",e["OPEN_LATEX_EDITOR"]="OPEN_LATEX_EDITOR"})(Ai||(Ai={}));const Zi=(0,$i.Z)();var Oi=Zi;const Ri=(e,t,l)=>{const{selection:a,doc:n}=e;if(!a||!n)return e;const{from:o,to:i}=a,{nodes:s}=t,r=s.blockquote,u=s.list_item,c=s.paragraph,d=[];l=l||"";const p=new Set([r,u,c]);return n.nodesBetween(o,i,((e,t)=>{const a=e.type,n=e.attrs.align||"";return n!==l&&p.has(a)&&d.push({node:e,pos:t,nodeType:a}),!0})),d.length?(d.forEach((t=>{const{node:a,pos:n,nodeType:o}=t;let{attrs:i}=a;i=l?{...i,align:l}:{...i,align:null},e=e.setNodeMarkup(n,o,i,a.marks)})),e):e},zi=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=Ri(l.tr.setSelection(n),a,t);e.dispatch(o)};function Pi(e,t,l,a){if(!e.doc)return e;const n=e.doc.nodeAt(t);if(!n)return e;const o=0,i=8;let s=(n.attrs[a]||0)+l;if(si&&(s=i),s===n.attrs[a])return e;const r={...n.attrs,[a]:s};return e.setNodeMarkup(t,n.type,r,n.marks)}const Bi=(e,t,l,a)=>{const{selection:n,doc:o}=e;if(!n||!o)return e;if(!(n instanceof Bo.Bs||n instanceof Bo.C1))return e;const{from:i,to:s}=n;return o.nodesBetween(i,s,((n,o)=>{const i=n.type;return"paragraph"===i.name||"blockquote"===i.name?(e=Pi(e,o,l,a),!1):!c(n,t)})),e},Ni=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=Bi(l.tr.setSelection(n),a,t,"indent");return!!o.docChanged&&(e.dispatch(o),!0)},ji=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=Bi(l.tr.setSelection(n),a,t,"textIndent");return!!o.docChanged&&(e.dispatch(o),!0)},Yi=(e,t,l,a={})=>(n,o)=>{const{schema:i,selection:s}=n,{$from:r,$to:u}=s,d=r.blockRange(u);if(!d)return!1;const p=f((e=>c(e,i)))(s);if(d.depth>=1&&p&&d.depth-p.depth<=1){if(p.node.type===e&&!l)return(0,Xo.IB)(t)(n,o);if(c(p.node,i)&&e.validContent(p.node.content)){const{tr:t}=n,i={...p.node.attrs,...a};return l&&(i.listStyleType=l),t.setNodeMarkup(p.pos,e,i),o&&o(t),!1}}const v={...a};return l&&(v.listStyleType=l),(0,Xo.KI)(e,v)(n,o)},Vi=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=l.tr.setSelection(n),{doc:i}=o;if(!i)return o;const{from:s,to:r}=n;i.nodesBetween(s,r,((e,l)=>{if(c(e,a)&&s-3<=l&&r+3>=l+e.nodeSize){const e=Array.isArray(t)?t:[t];for(const t of e)o.setNodeAttribute(l,t.key,t.value)}return!1})),e.dispatch(o)};var Ji=(0,i.aZ)({__name:"ProsemirrorEditor",props:{elementId:{},defaultColor:{},defaultFontName:{},value:{},editable:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1}},emits:["update","focus","blur","mousedown"],setup(e,{expose:t,emit:l}){const a=e,n=l,r=R(),{handleElementId:c,textFormatPainter:m,richTextAttrs:h}=(0,o.Jk)(r),f=(0,s.iH)();let g;const w=(0,D.debounce)((function(){n("update",g.dom.innerHTML)}),300,{trailing:!0}),x=()=>{r.setDisableHotkeysState(!0),n("focus")},k=()=>{r.setDisableHotkeysState(!1),n("blur")},b=(0,D.debounce)((function(){const e=C(g,{color:a.defaultColor,fontname:a.defaultFontName});r.setRichtextAttrs(e)}),30,{trailing:!0}),I=()=>{w(),b()},S=(0,i.Fl)((()=>a.value));(0,i.YP)(S,(()=>{if(!g)return;if(g.hasFocus())return;const{doc:e,tr:t}=g.state;g.dispatch(t.replaceRangeWith(0,e.content.size,Hi(S.value)))})),(0,i.YP)((()=>a.editable),(()=>{g.setProps({editable:()=>a.editable})}));const T=()=>g.focus();t({focus:T});const E=({target:e,action:t})=>{if(!e&&c.value!==a.elementId)return;if(e&&e!==a.elementId)return;const l="command"in t?[t]:t;for(const a of l)if("fontname"===a.command&&a.value){const e=g.state.schema.marks.fontname.create({fontname:a.value});d(g),p(g,e)}else if("fontsize"===a.command&&a.value){const e=g.state.schema.marks.fontsize.create({fontsize:a.value});d(g),p(g,e),Vi(g,{key:"fontsize",value:a.value})}else if("fontsize-add"===a.command){const e=a.value?+a.value:2;d(g);const t=L(g)+e+"px",l=g.state.schema.marks.fontsize.create({fontsize:t});p(g,l),Vi(g,{key:"fontsize",value:t})}else if("fontsize-reduce"===a.command){const e=a.value?+a.value:2;d(g);let t=L(g)-e;t<12&&(t=12);const l=g.state.schema.marks.fontsize.create({fontsize:t+"px"});p(g,l),Vi(g,{key:"fontsize",value:t+"px"})}else if("color"===a.command&&a.value){const e=g.state.schema.marks.forecolor.create({color:a.value});d(g),p(g,e),Vi(g,{key:"color",value:a.value})}else if("backcolor"===a.command&&a.value){const e=g.state.schema.marks.backcolor.create({backcolor:a.value});d(g),p(g,e)}else if("bold"===a.command)d(g),(0,u.w9)(g.state.schema.marks.strong)(g.state,g.dispatch);else if("em"===a.command)d(g),(0,u.w9)(g.state.schema.marks.em)(g.state,g.dispatch);else if("underline"===a.command)d(g),(0,u.w9)(g.state.schema.marks.underline)(g.state,g.dispatch);else if("strikethrough"===a.command)d(g),(0,u.w9)(g.state.schema.marks.strikethrough)(g.state,g.dispatch);else if("subscript"===a.command)(0,u.w9)(g.state.schema.marks.subscript)(g.state,g.dispatch);else if("superscript"===a.command)(0,u.w9)(g.state.schema.marks.superscript)(g.state,g.dispatch);else if("blockquote"===a.command){const e=y("blockquote",g.state);e?(0,u.xb)(g.state,g.dispatch):(0,u.ym)(g.state.schema.nodes.blockquote)(g.state,g.dispatch)}else if("code"===a.command)(0,u.w9)(g.state.schema.marks.code)(g.state,g.dispatch);else if("align"===a.command&&a.value)zi(g,a.value);else if("indent"===a.command&&a.value)Ni(g,+a.value);else if("textIndent"===a.command&&a.value)ji(g,+a.value);else if("bulletList"===a.command){const e=a.value||"",{bullet_list:t,list_item:l}=g.state.schema.nodes,n={color:h.value.color,fontsize:h.value.fontsize};Yi(t,l,e,n)(g.state,g.dispatch)}else if("orderedList"===a.command){const e=a.value||"",{ordered_list:t,list_item:l}=g.state.schema.nodes,n={color:h.value.color,fontsize:h.value.fontsize};Yi(t,l,e,n)(g.state,g.dispatch)}else if("clear"===a.command){d(g);const{$from:e,$to:t}=g.state.selection;g.dispatch(g.state.tr.removeMark(e.pos,t.pos)),Vi(g,[{key:"fontsize",value:""},{key:"color",value:""}])}else if("link"===a.command){const e=g.state.schema.marks.link,{from:t,to:l}=g.state.selection,n=v(g.state.doc,t,l,e);if(n)if(a.value){const e=g.state.schema.marks.link.create({href:a.value,title:a.value});p(g,e,{from:n.from.pos,to:n.to.pos+1})}else g.dispatch(g.state.tr.removeMark(n.from.pos,n.to.pos+1,e));else if(_(g.state,e))if(a.value){const e=g.state.schema.marks.link.create({href:a.value,title:a.value});p(g,e)}else(0,u.w9)(e)(g.state,g.dispatch);else a.value&&(d(g),(0,u.w9)(e,{href:a.value,title:a.value})(g.state,g.dispatch))}else"insert"===a.command&&a.value&&g.dispatch(g.state.tr.insertText(a.value));g.focus(),w(),b()},M=()=>{if(!m.value)return;const{keep:e,...t}=m.value,l=[{command:"clear"}];for(const a of Object.keys(t)){const e=a,t=m.value[a];!0===t?l.push({command:e}):t&&l.push({command:e,value:t})}E({action:l}),e||r.setTextFormatPainter(null)};(0,i.bv)((()=>{g=Fi(f.value,S.value,{handleDOMEvents:{focus:x,blur:k,keydown:I,click:b,mouseup:M},editable:()=>a.editable}),a.autoFocus&&g.focus()})),(0,i.Ah)((()=>{g&&g.destroy()}));const U=()=>{c.value===a.elementId&&b()};return Oi.on(Ai.RICH_TEXT_COMMAND,E),Oi.on(Ai.SYNC_RICH_TEXT_ATTRS_TO_STORE,U),(0,i.Ah)((()=>{Oi.off(Ai.RICH_TEXT_COMMAND,E),Oi.off(Ai.SYNC_RICH_TEXT_ATTRS_TO_STORE,U)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["prosemirror-editor",{"format-painter":(0,s.SU)(m)}]),ref_key:"editorViewRef",ref:f,onMousedown:t[0]||(t[0]=e=>n("mousedown",e))},null,34))}});const qi=(0,Vl.Z)(Ji,[["__scopeId","data-v-653f533c"]]);var Xi=qi;const Gi=e=>((0,i.dD)("data-v-2a1e49ba"),e=e(),(0,i.Cn)(),e),Ki=Gi((()=>(0,i._)("div",{class:"drag-handler top"},null,-1))),Qi=Gi((()=>(0,i._)("div",{class:"drag-handler bottom"},null,-1)));var es=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=R(),a=$(),{handleElementId:n,isScaling:r}=(0,o.Jk)(l),{addHistorySnapshot:u}=da(),c=(0,s.iH)(),d=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:p}=Xn(d),v=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},m=(0,s.iH)(-1),h=(0,s.iH)(-1);(0,i.YP)(r,(()=>{n.value===t.elementInfo.id&&(r.value||(t.elementInfo.vertical||-1===m.value||(a.updateElement({id:t.elementInfo.id,props:{height:m.value}}),m.value=-1),t.elementInfo.vertical&&-1!==h.value&&(a.updateElement({id:t.elementInfo.id,props:{width:h.value}}),h.value=-1)))}));const f=e=>{const l=e[0].contentRect;if(!c.value)return;const n=l.height+20,o=l.width+20;t.elementInfo.vertical||t.elementInfo.height===n||(r.value?m.value=n:a.updateElement({id:t.elementInfo.id,props:{height:n}})),t.elementInfo.vertical&&t.elementInfo.width!==o&&(r.value?h.value=o:a.updateElement({id:t.elementInfo.id,props:{width:o}}))},g=new ResizeObserver(f);(0,i.bv)((()=>{c.value&&g.observe(c.value)})),(0,i.Ah)((()=>{c.value&&g.unobserve(c.value)}));const y=e=>{a.updateElement({id:t.elementInfo.id,props:{content:e}}),u()},w=(0,D.debounce)((function(){const e=t.elementInfo.content.replaceAll(/<[^>]+>/g,"");e||a.deleteElement(t.elementInfo.id)}),300,{trailing:!0}),x=(0,i.Fl)((()=>n.value===t.elementInfo.id));return(0,i.YP)(x,(()=>{x.value||w()})),(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-text",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",ref_key:"elementRef",ref:c,style:(0,oe.j5)({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:(0,s.SU)(p),lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px",color:e.elementInfo.defaultColor,fontFamily:e.elementInfo.defaultFontName,writingMode:e.elementInfo.vertical?"vertical-rl":"horizontal-tb"}),onMousedown:t[2]||(t[2]=e=>v(e)),onTouchstart:t[3]||(t[3]=e=>v(e))},[(0,i.Wm)(Po,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Xi,{class:"text",elementId:e.elementInfo.id,defaultColor:e.elementInfo.defaultColor,defaultFontName:e.elementInfo.defaultFontName,editable:!e.elementInfo.lock,value:e.elementInfo.content,style:(0,oe.j5)({"--paragraphSpace":`${void 0===e.elementInfo.paragraphSpace?5:e.elementInfo.paragraphSpace}px`}),onUpdate:t[0]||(t[0]=e=>y(e)),onMousedown:t[1]||(t[1]=e=>v(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value","style"]),Ki,Qi],36)),[[l,e.contextmenus]])],4)],6)}}});const ts=(0,Vl.Z)(es,[["__scopeId","data-v-2a1e49ba"]]);var ls=ts;const as=["id","gradientTransform"],ns=["stop-color"],os=["stop-color"],is=["id"],ss=["stop-color"],rs=["stop-color"];var us=(0,i.aZ)({__name:"GradientDefs",props:{id:{},type:{},color1:{},color2:{},rotate:{default:0}},setup(e){return(e,t)=>"linear"===e.type?((0,i.wg)(),(0,i.iD)("linearGradient",{key:0,id:e.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:`rotate(${e.rotate},0.5,0.5)`},[(0,i._)("stop",{offset:"0%","stop-color":e.color1},null,8,ns),(0,i._)("stop",{offset:"100%","stop-color":e.color2},null,8,os)],8,as)):((0,i.wg)(),(0,i.iD)("radialGradient",{key:1,id:e.id},[(0,i._)("stop",{offset:"0%","stop-color":e.color1},null,8,ss),(0,i._)("stop",{offset:"100%","stop-color":e.color2},null,8,rs)],8,is))}});const cs=us;var ds=cs;const ps=["width","height"],vs={key:0},ms=["transform"],hs=["d","fill","stroke","stroke-width","stroke-dasharray"];var fs=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=R(),a=$(),{handleElementId:n,shapeFormatPainter:r}=(0,o.Jk)(l),{addHistorySnapshot:u}=da(),c=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},d=()=>{if(!r.value)return;const{keep:e,...n}=r.value;a.updateElement({id:t.elementInfo.id,props:n}),u(),e||l.setShapeFormatPainter(null)},p=(0,i.Fl)((()=>t.elementInfo.outline)),{outlineWidth:v,outlineColor:m,strokeDashArray:h}=to(p),f=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:g}=Xn(f),y=(0,i.Fl)((()=>t.elementInfo.flipH)),w=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:x}=Gn(y,w),k=(0,s.iH)(!1);(0,i.YP)(n,(()=>{n.value!==t.elementInfo.id&&k.value&&(k.value=!1)}));const b=(0,i.Fl)((()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e})),_=e=>{const l={...b.value,content:e};a.updateElement({id:t.elementInfo.id,props:{text:l}}),u()},I=()=>{if(!t.elementInfo.text)return;const e=t.elementInfo.text.content.replaceAll(/<[^>]+>/g,"");e||(a.removeElementProps({id:t.elementInfo.id,propName:"text"}),u())},S=(0,s.iH)(),C=()=>{k.value=!0,(0,i.Y3)((()=>S.value&&S.value.focus()))};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-shape",{lock:e.elementInfo.lock,"format-painter":(0,s.SU)(r)}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",style:(0,oe.j5)({opacity:e.elementInfo.opacity,filter:(0,s.SU)(g)?`drop-shadow(${(0,s.SU)(g)})`:"",transform:(0,s.SU)(x),color:b.value.defaultColor,fontFamily:b.value.defaultFontName}),onMousedown:t[3]||(t[3]=e=>c(e)),onMouseup:t[4]||(t[4]=e=>d()),onTouchstart:t[5]||(t[5]=e=>c(e)),onDblclick:t[6]||(t[6]=e=>C())},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?((0,i.wg)(),(0,i.iD)("defs",vs,[(0,i.Wm)(ds,{id:`editabel-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,color1:e.elementInfo.gradient.color[0],color2:e.elementInfo.gradient.color[1],rotate:e.elementInfo.gradient.rotate},null,8,["id","type","color1","color2","rotate"])])):(0,i.kq)("",!0),(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{class:"shape-path","vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:e.elementInfo.gradient?`url(#editabel-gradient-${e.elementInfo.id})`:e.elementInfo.fill,stroke:(0,s.SU)(m),"stroke-width":(0,s.SU)(v),"stroke-dasharray":(0,s.SU)(h)},null,8,hs)],8,ms)],8,ps)),(0,i._)("div",{class:(0,oe.C_)(["shape-text",[b.value.align,{editable:k.value||b.value.content}]])},[k.value||b.value.content?((0,i.wg)(),(0,i.j4)(Xi,{key:0,ref_key:"prosemirrorEditorRef",ref:S,elementId:e.elementInfo.id,defaultColor:b.value.defaultColor,defaultFontName:b.value.defaultFontName,editable:!e.elementInfo.lock,value:b.value.content,onUpdate:t[0]||(t[0]=e=>_(e)),onBlur:t[1]||(t[1]=e=>I()),onMousedown:t[2]||(t[2]=e=>c(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value"])):(0,i.kq)("",!0)],2)],36)),[[l,e.contextmenus]])],4)],6)}}});const gs=(0,Vl.Z)(fs,[["__scopeId","data-v-5d988de2"]]);var ys=gs;const ws=["id","markerWidth","markerHeight","refX","refY"],xs=["d","fill","transform"];var ks=(0,i.aZ)({__name:"LinePointMarker",props:{id:{},position:{},type:{},baseSize:{},color:{}},setup(e){const t=e,l={dot:"m0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z",arrow:"M0,0 L10,5 0,10 Z"},a={"arrow-start":180,"arrow-end":0},n=(0,i.Fl)((()=>l[t.type])),o=(0,i.Fl)((()=>a[`${t.type}-${t.position}`]||0)),s=(0,i.Fl)((()=>t.baseSize<2?2:t.baseSize));return(e,t)=>((0,i.wg)(),(0,i.iD)("marker",{id:`${e.id}-${e.type}-${e.position}`,markerUnits:"userSpaceOnUse",orient:"auto",markerWidth:3*s.value,markerHeight:3*s.value,refX:1.5*s.value,refY:1.5*s.value},[(0,i._)("path",{d:n.value,fill:e.color,transform:`scale(${.3*s.value}, ${.3*s.value}) rotate(${o.value}, 5, 5)`},null,8,xs)],8,ws))}});const bs=ks;var _s=bs;const Is=["width","height"],Ss=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],Cs=["d"];var Ls=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:n}=Xn(a),o=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e})),r=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e})),u=(0,i.Fl)((()=>{if("dashed"!==t.elementInfo.style)return"0 0";const e=t.elementInfo.width;return e<=8?`${5*e} ${2.5*e}`:`${5*e} ${1.5*e}`})),c=(0,i.Fl)((()=>Ce(t.elementInfo)));return(e,t)=>{const a=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-shape",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({filter:(0,s.SU)(n)?`drop-shadow(${(0,s.SU)(n)})`:""}),onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e))},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:o.value,height:r.value},[(0,i._)("defs",null,[e.elementInfo.points[0]?((0,i.wg)(),(0,i.j4)(_s,{key:0,id:e.elementInfo.id,position:"start",type:e.elementInfo.points[0],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0),e.elementInfo.points[1]?((0,i.wg)(),(0,i.j4)(_s,{key:1,id:e.elementInfo.id,position:"end",type:e.elementInfo.points[1],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0)]),(0,i._)("path",{class:"line-point",d:c.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":u.value,fill:"none","marker-start":e.elementInfo.points[0]?`url(#${e.elementInfo.id}-${e.elementInfo.points[0]}-start)`:"","marker-end":e.elementInfo.points[1]?`url(#${e.elementInfo.id}-${e.elementInfo.points[1]}-end)`:""},null,8,Ss),(0,i.wy)((0,i._)("path",{class:"line-path",d:c.value,stroke:"transparent","stroke-width":"20",fill:"none"},null,8,Cs),[[a,e.contextmenus]])],8,Is))],36)],6)}}});const Ts=(0,Vl.Z)(Ls,[["__scopeId","data-v-16512454"]]);var Es=Ts,Ms=l(7678),Us=(l(4991),(0,i.aZ)({__name:"Chart",props:{width:{},height:{},type:{},data:{},themeColor:{},legends:{},options:{},gridColor:{},legend:{}},setup(e){const t=e,l=(0,s.iH)(),a=(0,i.f3)(Tn)||(0,s.iH)(1);let n;const o=(0,i.Fl)((()=>t.legend?t.height-20:t.height)),r=()=>({...t.data,series:t.data.series[0]}),u=()=>{const e=t.options||{};return{...e,width:t.width*a.value,height:o.value*a.value}},c=()=>{if(!l.value)return;const e=u();"bar"===t.type&&(n=new Ms.vz(l.value,t.data,e)),"line"===t.type&&(n=new Ms.wW(l.value,t.data,e)),"pie"===t.type&&(n=new Ms.uc(l.value,r(),e))},d=()=>{if(!n)return void c();const e=u(),l="pie"===t.type?r():t.data;n.update(l,e)};(0,i.YP)([()=>t.width,()=>t.height,()=>t.data,()=>t.options,a],d),(0,i.bv)(c);const p=(0,i.Fl)((()=>{let e=[];if(t.themeColor.length>=10)e=t.themeColor;else if(1===t.themeColor.length)e=(0,W.Z)(t.themeColor[0]).analogous(10).map((e=>e.toRgbString()));else{const l=t.themeColor.length,a=(0,W.Z)(t.themeColor[l-1]).analogous(11-l).map((e=>e.toRgbString()));e=[...t.themeColor.slice(0,l-1),...a]}return e})),v=()=>{if(l.value)for(let e=0;e<10;e++)l.value.style.setProperty(`--theme-color-${e+1}`,p.value[e])};(0,i.YP)(p,v),(0,i.bv)(v);const m=()=>{l.value&&t.gridColor&&l.value.style.setProperty("--grid-color",t.gridColor)};return(0,i.YP)((()=>t.gridColor),m),(0,i.bv)(m),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"chart",style:(0,oe.j5)({flexDirection:"top"===e.legend?"column-reverse":"column"})},[(0,i._)("div",{class:"chart-content",ref_key:"chartRef",ref:l,style:(0,oe.j5)({width:e.width+"px",height:o.value+"px",transform:`scale(${1/(0,s.SU)(a)})`})},null,4),e.legend?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"legends",style:(0,oe.j5)({transform:`scale(${1/(0,s.SU)(a)})`})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.legends,((t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"legend",key:l,style:(0,oe.j5)({color:e.gridColor})},[(0,i._)("div",{class:"block",style:(0,oe.j5)({backgroundColor:p.value[l]})},null,4),(0,i.Uk)(" "+(0,oe.zw)(t),1)],4)))),128))],4)):(0,i.kq)("",!0)],4))}}));const Ws=(0,Vl.Z)(Us,[["__scopeId","data-v-ae2a96a6"]]);var Ds=Ws,Hs=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=()=>{Oi.emit(Ai.OPEN_CHART_DATA_EDITOR)};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-chart",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",style:(0,oe.j5)({backgroundColor:e.elementInfo.fill}),onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e)),onDblclick:t[2]||(t[2]=e=>a())},[(0,i.Wm)(Po,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Ds,{width:e.elementInfo.width,height:e.elementInfo.height,type:e.elementInfo.chartType,data:e.elementInfo.data,options:e.elementInfo.options,themeColor:e.elementInfo.themeColor,gridColor:e.elementInfo.gridColor,legends:e.elementInfo.data.legends,legend:e.elementInfo.legend||""},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend"])],36)),[[n,e.contextmenus]])],4)],6)}}});const Fs=(0,Vl.Z)(Hs,[["__scopeId","data-v-6fc3de39"]]);var As=Fs;const $s=e=>{if(!e)return{};const{bold:t,em:l,underline:a,strikethrough:n,color:o,backcolor:i,fontsize:s,fontname:r,align:u}=e;let c=`${a?"underline":""} ${n?"line-through":""}`;return" "===c&&(c="none"),{fontWeight:t?"bold":"normal",fontStyle:l?"italic":"normal",textDecoration:c,color:o||"#000",backgroundColor:i||"",fontSize:s||"14px",fontFamily:r||"微软雅黑",textAlign:u||"left"}},Zs=e=>e.replace(/\n/g,"
").replace(/ /g," ");var Os=e=>{const t=(0,i.Fl)((()=>{const t=[];for(let l=0;l1||n.rowspan>1)for(let a=l;a{const t=(0,s.iH)(["",""]);return(0,i.YP)((()=>e.value),(()=>{e.value&&(t.value=Se(e.value.color))}),{immediate:!0}),{subThemeColor:t}};const zs=["innerHTML"];var Ps=(0,i.aZ)({__name:"CustomTextarea",props:{value:{default:""}},emits:["updateValue","insertExcelData"],setup(e,{emit:t}){const l=e,a=t,n=(0,s.iH)(),o=(0,s.iH)(""),r=(0,s.iH)(!1);(0,i.YP)((()=>l.value),(()=>{r.value||(o.value=l.value,n.value&&(n.value.innerHTML=l.value))}),{immediate:!0});const u=()=>{if(!n.value)return;const e=n.value.innerHTML;a("updateValue",e)},c=()=>{r.value=!0,n.value&&(n.value.onpaste=e=>{if(e.preventDefault(),!e.clipboardData)return;const t=e.clipboardData.items[0];t&&"string"===t.kind&&"text/plain"===t.type&&t.getAsString((e=>{const t=fe(e);if("object"===typeof t)return;const l=ge(e);if(l)return a("insertExcelData",l),void(n.value&&(n.value.innerHTML=l[0][0]));document.execCommand("insertText",!1,e)}))})},d=()=>{r.value=!1,n.value&&(n.value.onpaste=null)};return(0,i.Jd)((()=>{n.value&&(n.value.onpaste=null)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"custom-textarea",ref_key:"textareaRef",ref:n,contenteditable:!0,onFocus:t[0]||(t[0]=e=>c()),onBlur:t[1]||(t[1]=e=>d()),onInput:t[2]||(t[2]=e=>u()),innerHTML:o.value},null,40,zs))}});const Bs=(0,Vl.Z)(Ps,[["__scopeId","data-v-7a7222ac"]]);var Ns=Bs;const js={key:0,class:"handler"},Ys=["onMousedown"],Vs=["width"],Js=["rowspan","colspan","data-cell-index","onMousedown","onMouseenter"],qs=["innerHTML"];var Xs=(0,i.aZ)({__name:"EditableTable",props:{data:{},width:{},cellMinHeight:{},colWidths:{},outline:{},theme:{},editable:{type:Boolean,default:!0}},emits:["change","changeColWidths","changeSelectedCells"],setup(e,{emit:t}){const l=e,a=t,{canvasScale:u}=(0,o.Jk)(R()),c=(0,s.iH)(!1),d=(0,s.iH)([]),p=(0,s.iH)([]),v=(0,i.Fl)({get(){return l.data},set(e){a("change",e)}}),m=(0,i.Fl)((()=>l.theme)),{subThemeColor:h}=Rs(m),f=(0,s.iH)([]),g=(0,i.Fl)((()=>f.value.reduce(((e,t)=>e+t))));(0,i.YP)([()=>l.colWidths,()=>l.width],(()=>{f.value=l.colWidths.map((e=>e*l.width))}),{immediate:!0});const y=()=>{d.value=[],p.value=[]};(0,i.YP)((()=>l.editable),(()=>{l.editable||y()}));const w=(0,i.Fl)((()=>{const e=[];for(let t=1;te+t));e.push(l)}return e})),x=(0,i.Fl)((()=>l.data)),{hideCells:k}=Os(x),b=(0,i.Fl)((()=>{if(!d.value.length)return[];const[e,t]=d.value;if(!p.value.length)return[`${e}_${t}`];const[l,a]=p.value;if(e===l&&t===a)return[`${e}_${t}`];const n=[],o=Math.min(e,l),i=Math.min(t,a),s=Math.max(e,l),r=Math.max(t,a);for(let u=0;u=o&&u<=s&&t>=i&&t<=r&&n.push(`${u}_${t}`)}return n}));(0,i.YP)(b,((e,t)=>{(0,D.isEqual)(e,t)||a("changeSelectedCells",b.value)}));const _=(0,i.Fl)((()=>b.value.length>1?null:b.value[0])),I=()=>c.value=!1,S=(e,t,l)=>{0===e.button&&(p.value=[],c.value=!0,d.value=[t,l])},C=(e,t)=>{c.value&&(p.value=[e,t])};(0,i.bv)((()=>{document.addEventListener("mouseup",I)})),(0,i.Ah)((()=>{document.removeEventListener("mouseup",I)}));const L=(e,t)=>k.value.includes(`${e}_${t}`),T=e=>{const t=v.value.length-1;d.value=[0,e],p.value=[t,e]},E=e=>{const t=v.value[e].length-1;d.value=[e,0],p.value=[e,t]},M=()=>{const e=v.value.length-1,t=v.value[e].length-1;d.value=[0,0],p.value=[e,t]},U=e=>{const t=JSON.parse(JSON.stringify(v.value)),l=v.value[e],a=[];for(let n=0;n=0;l--)if(!L(l,n)){t[l][n].rowspan=t[l][n].rowspan-1;break}t.splice(e,1),v.value=t},W=e=>{const t=JSON.parse(JSON.stringify(v.value)),l=[];for(let a=0;a=0;l--)if(!L(a,l)){t[a][l].colspan=t[a][l].colspan-1;break}v.value=t.map((t=>(t.splice(e,1),t))),f.value.splice(e,1),a("changeColWidths",f.value)},H=e=>{const t=JSON.parse(JSON.stringify(v.value)),l=[];for(let a=0;a{v.value=v.value.map((t=>{const l={colspan:1,rowspan:1,text:"",id:(0,r.x0)(10)};return t.splice(e,0,l),t})),f.value.splice(e,0,100),a("changeColWidths",f.value)},A=(e,t)=>{let l=JSON.parse(JSON.stringify(v.value));const n={colspan:1,rowspan:1,text:""};if(e){const t=[];for(let a=0;a{const l=[];for(let a=0;a{const[e,t]=d.value,[l,a]=p.value,n=Math.min(e,l),o=Math.min(t,a),i=Math.max(e,l),s=Math.max(t,a),r=JSON.parse(JSON.stringify(v.value));r[n][o].rowspan=i-n+1,r[n][o].colspan=s-o+1,v.value=r,y()},Z=(e,t)=>{const l=JSON.parse(JSON.stringify(v.value));l[e][t].rowspan=1,l[e][t].colspan=1,v.value=l,y()},O=(e,t)=>{y();let l=!0;const n=f.value[t],o=e.pageX,i=50;document.onmousemove=e=>{if(!l)return;const a=(e.pageX-o)/u.value,s=n+a{l=!1,document.onmousemove=null,document.onmouseup=null,a("changeColWidths",f.value)}},z=()=>{const e=JSON.parse(JSON.stringify(v.value));for(let t=0;t{const e=(t,l)=>v.value[t]?v.value[t][l]?L(t,l)?e(t,l+1):[t,l]:e(t+1,0):null;p.value=[];const t=d.value[0],l=d.value[1]+1,a=e(t,l);a?d.value=a:(H(t+1),d.value=[t+1,0]),(0,i.Y3)((()=>{const e=document.querySelector(".cell-text.active");e&&e.focus()}))},B=e=>{if(!l.editable||!b.value.length)return;const t=e.key.toUpperCase();if(b.value.length<2){if(t===ne.TAB&&(e.preventDefault(),P()),e.ctrlKey&&t===ne.UP){e.preventDefault();const t=+b.value[0].split("_")[0];H(t)}if(e.ctrlKey&&t===ne.DOWN){e.preventDefault();const t=+b.value[0].split("_")[0];H(t+1)}if(e.ctrlKey&&t===ne.LEFT){e.preventDefault();const t=+b.value[0].split("_")[1];F(t)}if(e.ctrlKey&&t===ne.RIGHT){e.preventDefault();const t=+b.value[0].split("_")[1];F(t+1)}}else t===ne.DELETE&&z()};(0,i.bv)((()=>{document.addEventListener("keydown",B)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",B)}));const N=(0,D.debounce)((function(e,t,l){v.value[t][l].text=e,a("change",v.value)}),300,{trailing:!0}),j=(e,t,l)=>{const n=e.length,o=e[0].length;let s=0,r=0;t+n>v.value.length&&(s=t+n-v.value.length),l+o>v.value[0].length&&(r=l+o-v.value[0].length),(s||r)&&A(s,r),(0,i.Y3)((()=>{for(let a=0;a{const e=[];for(let t=0;t{const e=Y(),t=e.length>1,l=e[0].length>1;return{canDeleteRow:t,canDeleteCol:l}},J=(e,t)=>{const l=b.value.length>1,a=v.value[e][t],n=l,o=!l&&(a.rowspan>1||a.colspan>1);return{canMerge:n,canSplit:o}},q=e=>{const t=e.dataset.cellIndex,l=+t.split("_")[0],a=+t.split("_")[1];b.value.includes(`${l}_${a}`)||(d.value=[l,a],p.value=[]);const{canMerge:n,canSplit:o}=J(l,a),{canDeleteRow:i,canDeleteCol:s}=V();return[{text:"插入列",children:[{text:"到左侧",handler:()=>F(a)},{text:"到右侧",handler:()=>F(a+1)}]},{text:"插入行",children:[{text:"到上方",handler:()=>H(l)},{text:"到下方",handler:()=>H(l+1)}]},{text:"删除列",disable:!s,handler:()=>W(a)},{text:"删除行",disable:!i,handler:()=>U(l)},{divider:!0},{text:"合并单元格",disable:!n,handler:$},{text:"取消合并单元格",disable:!o,handler:()=>Z(l,a)},{divider:!0},{text:"选中当前列",handler:()=>T(a)},{text:"选中当前行",handler:()=>E(l)},{text:"选中全部单元格",handler:M}]};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:"editable-table",style:(0,oe.j5)({width:g.value+"px"})},[e.editable?((0,i.wg)(),(0,i.iD)("div",js,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(w.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"drag-line",key:t,style:(0,oe.j5)({left:e+"px"}),onMousedown:e=>O(e,t)},null,44,Ys)))),128))])):(0,i.kq)("",!0),(0,i._)("table",{class:(0,oe.C_)({theme:m.value,"row-header":m.value?.rowHeader,"row-footer":m.value?.rowFooter,"col-header":m.value?.colHeader,"col-footer":m.value?.colFooter}),style:(0,oe.j5)(`--themeColor: ${m.value?.color}; --subThemeColor1: ${(0,s.SU)(h)[0]}; --subThemeColor2: ${(0,s.SU)(h)[1]}`)},[(0,i._)("colgroup",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(f.value,((e,t)=>((0,i.wg)(),(0,i.iD)("col",{span:"1",key:t,width:e},null,8,Vs)))),128))]),(0,i._)("tbody",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(v.value,((t,a)=>((0,i.wg)(),(0,i.iD)("tr",{key:a,style:(0,oe.j5)({height:e.cellMinHeight+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((t,o)=>(0,i.wy)(((0,i.wg)(),(0,i.iD)("td",{class:(0,oe.C_)(["cell",{selected:b.value.includes(`${a}_${o}`)&&b.value.length>1,active:_.value===`${a}_${o}`}]),style:(0,oe.j5)({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...(0,s.SU)($s)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan,"data-cell-index":`${a}_${o}`,onMousedown:e=>S(e,a,o),onMouseenter:e=>C(a,o)},[_.value===`${a}_${o}`?((0,i.wg)(),(0,i.j4)(Ns,{key:0,class:(0,oe.C_)(["cell-text",{active:_.value===`${a}_${o}`}]),style:(0,oe.j5)({minHeight:e.cellMinHeight-4+"px"}),value:t.text,onUpdateValue:e=>(0,s.SU)(N)(e,a,o),onInsertExcelData:e=>j(e,a,o)},null,8,["class","style","value","onUpdateValue","onInsertExcelData"])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"cell-text",style:(0,oe.j5)({minHeight:e.cellMinHeight-4+"px"}),innerHTML:(0,s.SU)(Zs)(t.text)},null,12,qs))],46,Js)),[[n.F8,!(0,s.SU)(k).includes(`${a}_${o}`)],[l,e=>q(e)]]))),128))],4)))),128))])],6)],4)}}});const Gs=(0,Vl.Z)(Xs,[["__scopeId","data-v-0236a619"]]);var Ks=Gs;const Qs={class:"element-content"};var er=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=R(),a=$(),{canvasScale:r,handleElementId:u,isScaling:c}=(0,o.Jk)(l),d=(0,s.iH)(),{addHistorySnapshot:p}=da(),v=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},m=(0,s.iH)(!1);(0,i.YP)(u,(()=>{u.value!==t.elementInfo.id&&(m.value=!1)})),(0,i.YP)(m,(()=>{l.setDisableHotkeysState(m.value)}));const h=()=>{t.elementInfo.lock||(m.value=!0)},f=(0,s.iH)(-1);(0,i.YP)(c,(()=>{u.value===t.elementInfo.id&&(c.value&&(m.value=!1),c.value||-1===f.value||(a.updateElement({id:t.elementInfo.id,props:{height:f.value}}),f.value=-1))}));const g=e=>{const l=e[0].contentRect;if(!d.value)return;const n=l.height;t.elementInfo.height!==n&&(c.value?f.value=n:a.updateElement({id:t.elementInfo.id,props:{height:n}}))},y=new ResizeObserver(g);(0,i.bv)((()=>{d.value&&y.observe(d.value)})),(0,i.Ah)((()=>{d.value&&y.unobserve(d.value)}));const w=e=>{a.updateElement({id:t.elementInfo.id,props:{data:e}}),p()},x=e=>{const l=e.reduce(((e,t)=>e+t)),n=e.map((e=>e/l));a.updateElement({id:t.elementInfo.id,props:{width:l,colWidths:n}}),p()},k=e=>{(0,i.Y3)((()=>l.setSelectedTableCells(e)))};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-table",{lock:e.elementInfo.lock}]),ref_key:"elementRef",ref:d,style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",Qs,[(0,i.Wm)(Ks,{onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"])),data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme,editable:m.value,onChange:t[1]||(t[1]=e=>w(e)),onChangeColWidths:t[2]||(t[2]=e=>x(e)),onChangeSelectedCells:t[3]||(t[3]=e=>k(e))},null,8,["data","width","cellMinHeight","colWidths","outline","theme","editable"]),!m.value||e.elementInfo.lock?((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,oe.C_)(["table-mask",{lock:e.elementInfo.lock}]),onDblclick:t[4]||(t[4]=e=>h()),onMousedown:t[5]||(t[5]=e=>v(e)),onTouchstart:t[6]||(t[6]=e=>v(e))},[(0,s.SU)(u)===e.elementInfo.id?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"mask-tip",style:(0,oe.j5)({transform:`scale(${1/(0,s.SU)(r)})`})},"双击编辑",4)):(0,i.kq)("",!0)],34)):(0,i.kq)("",!0)])),[[l,e.contextmenus]])],4)],6)}}});const tr=(0,Vl.Z)(er,[["__scopeId","data-v-742a731e"]]);var lr=tr;const ar=["width","height","stroke","stroke-width"],nr=["transform"],or=["d"];var ir=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=()=>{Oi.emit(Ai.OPEN_LATEX_EDITOR)};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-latex",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e)),onDblclick:t[2]||(t[2]=e=>a())},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{d:e.elementInfo.path},null,8,or)],8,nr)],8,ar))],32)),[[n,e.contextmenus]])],4)],6)}}});const sr=(0,Vl.Z)(ir,[["__scopeId","data-v-35c33b80"]]);var rr=sr,ur=(e,t)=>{(0,i.bv)((()=>{if(!t.value)return;let l="normal";if(/m3u8(#|\?|$)/i.exec(e)?l="hls":/.flv(#|\?|$)/i.exec(e)&&(l="flv"),t.value&&"hls"===l&&(t.value.canPlayType("application/x-mpegURL")||t.value.canPlayType("application/vnd.apple.mpegURL"))&&(l="normal"),"hls"===l){const l=window.Hls;if(l&&l.isSupported()){const a=new l;a.loadSource(e),a.attachMedia(t.value)}}else if("flv"===l){const l=window.flvjs;if(l&&l.isSupported()){const a=l.createPlayer({type:"flv",url:e});a.attachMediaElement(t.value),a.load()}}}))};const cr=e=>((0,i.dD)("data-v-e55352ca"),e=e(),(0,i.Cn)(),e),dr={key:0,class:"load-error"},pr=["src","autoplay","poster"],vr={class:"bezel"},mr=cr((()=>(0,i._)("div",{class:"controller-mask"},null,-1))),hr={class:"controller"},fr={class:"icons icons-left"},gr={class:"icon-content"},yr={class:"volume"},wr={class:"icon-content"},xr=cr((()=>(0,i._)("span",{class:"thumb"},null,-1))),kr=[xr],br={class:"time"},_r={class:"ptime"},Ir={class:"dtime"},Sr={class:"icons icons-right"},Cr={class:"speed"},Lr={class:"icon speed-icon"},Tr=["onClick"],Er={class:"icon-content"},Mr={class:"bar"},Ur=cr((()=>(0,i._)("span",{class:"thumb"},null,-1))),Wr=[Ur];var Dr=(0,i.aZ)({__name:"index",props:{width:{},height:{},src:{},poster:{default:""},autoplay:{type:Boolean,default:!1},scale:{default:1}},setup(e){const t=e,l=(e=0)=>{if(0===e||isNaN(e))return"00:00";const t=e=>e<10?"0"+e:""+e,l=Math.floor(e/3600),a=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*a);return(l>0?[l,a,n]:[a,n]).map(t).join(":")},a=e=>e.getBoundingClientRect().left,n=(0,s.iH)(),o=(0,s.iH)(),r=(0,s.iH)(),u=(0,s.iH)(.5),c=(0,s.iH)(!0),d=(0,s.iH)(0),p=(0,s.iH)(0),v=(0,s.iH)(0),m=(0,s.iH)(!1),h=(0,s.iH)(!1),f=(0,s.iH)(1),g=(0,s.iH)(!1),y=(0,s.iH)("00:00"),w=(0,s.iH)("0"),x=(0,i.Fl)((()=>l(d.value))),k=(0,i.Fl)((()=>l(p.value))),b=(0,i.Fl)((()=>d.value/p.value*100+"%")),_=(0,i.Fl)((()=>v.value/p.value*100+"%")),I=(0,i.Fl)((()=>100*u.value+"%")),S=(0,s.iH)(!1),C=[{label:"2x",value:2},{label:"1.5x",value:1.5},{label:"1.25x",value:1.25},{label:"1x",value:1},{label:"0.75x",value:.75},{label:"0.5x",value:.5}],L=e=>{n.value&&(e=Math.max(e,0),e=Math.min(e,p.value),n.value.currentTime=e,d.value=e)},T=()=>{n.value&&(c.value=!1,n.value.play(),h.value=!0)},E=()=>{n.value&&(c.value=!0,n.value.pause(),h.value=!0)},M=()=>{c.value?T():E()},U=e=>{n.value&&(e=Math.max(e,0),e=Math.min(e,1),n.value.volume=e,u.value=e,n.value.muted&&0!==e&&(n.value.muted=!1))},W=e=>{n.value&&(n.value.playbackRate=e),f.value=e},D=()=>{p.value=n.value?.duration||0},H=()=>{d.value=n.value?.currentTime||0},F=()=>{m.value?(L(0),T()):E()},A=()=>{v.value=n.value?.buffered.length?n.value.buffered.end(n.value.buffered.length-1):0},$=(0,s.iH)(!1),Z=()=>$.value=!0,O=e=>{if(!n.value||!o.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-a(o.value))/o.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const i=l*p.value;n.value.currentTime=i,d.value=i},R=e=>{if(!n.value||!o.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-a(o.value))/o.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const i=l*p.value;n.value.currentTime=i,d.value=i,document.removeEventListener("mousemove",O),document.removeEventListener("touchmove",O),document.removeEventListener("mouseup",R),document.removeEventListener("touchend",R)},z=()=>{document.addEventListener("mousemove",O),document.addEventListener("touchmove",O),document.addEventListener("mouseup",R),document.addEventListener("touchend",R)},P=e=>{if(!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-a(r.value))/45;U(l)},B=()=>{document.removeEventListener("mousemove",P),document.removeEventListener("touchmove",P),document.removeEventListener("mouseup",B),document.removeEventListener("touchend",B)},N=()=>{document.addEventListener("mousemove",P),document.addEventListener("touchmove",P),document.addEventListener("mouseup",B),document.addEventListener("touchend",B)},j=e=>{if(!r.value)return;const t=(e.clientX-a(r.value))/45;U(t)},Y=e=>{if(p.value&&o.value){const t=o.value.getBoundingClientRect().left,a=e.clientX-t;if(a<0||a>o.value.offsetWidth)return;const n=p.value*(a/o.value.offsetWidth);w.value=a-(n>=3600?25:20)+"px",y.value=l(n),g.value=!0}},V=()=>{n.value&&(n.value.muted?(n.value.muted=!1,U(.5)):(n.value.muted=!0,U(0)))},J=()=>{m.value=!m.value},q=(0,s.iH)(-1),X=(0,s.iH)(!1),G=()=>{X.value=!1,clearTimeout(q.value),q.value=setTimeout((()=>{n.value?.played.length&&(X.value=!0)}),3e3)};return ur(t.src,n),(e,t)=>{const l=(0,i.up)("IconPause"),a=(0,i.up)("IconPlayOne"),s=(0,i.up)("IconVolumeMute"),d=(0,i.up)("IconVolumeNotice"),p=(0,i.up)("IconVolumeSmall");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["video-player",{"hide-controller":X.value}]),style:(0,oe.j5)({width:e.width*e.scale+"px",height:e.height*e.scale+"px",transform:`scale(${1/e.scale})`}),onMousemove:t[22]||(t[22]=e=>G()),onClick:t[23]||(t[23]=e=>G())},[(0,i._)("div",{class:"video-wrap",onClick:t[8]||(t[8]=e=>M())},[$.value?((0,i.wg)(),(0,i.iD)("div",dr,"视频加载失败")):(0,i.kq)("",!0),(0,i._)("video",{class:"video",ref_key:"videoRef",ref:n,src:e.src,autoplay:e.autoplay,poster:e.poster,"webkit-playsinline":"",playsinline:"",onDurationchange:t[0]||(t[0]=e=>D()),onTimeupdate:t[1]||(t[1]=e=>H()),onEnded:t[2]||(t[2]=e=>F()),onProgress:t[3]||(t[3]=e=>A()),onPlay:t[4]||(t[4]=e=>{G(),c.value=!1}),onPause:t[5]||(t[5]=e=>G()),onError:t[6]||(t[6]=e=>Z())},null,40,pr),(0,i._)("div",vr,[(0,i._)("span",{class:(0,oe.C_)(["bezel-icon",{"bezel-transition":h.value}]),onAnimationend:t[7]||(t[7]=e=>h.value=!1)},[c.value?((0,i.wg)(),(0,i.j4)(l,{key:0})):((0,i.wg)(),(0,i.j4)(a,{key:1}))],34)])]),mr,(0,i._)("div",hr,[(0,i._)("div",fr,[(0,i._)("div",{class:"icon play-icon",onClick:t[9]||(t[9]=e=>M())},[(0,i._)("span",gr,[c.value?((0,i.wg)(),(0,i.j4)(a,{key:0})):((0,i.wg)(),(0,i.j4)(l,{key:1}))])]),(0,i._)("div",yr,[(0,i._)("div",{class:"icon volume-icon",onClick:t[10]||(t[10]=e=>V())},[(0,i._)("span",wr,[0===u.value?((0,i.wg)(),(0,i.j4)(s,{key:0})):1===u.value?((0,i.wg)(),(0,i.j4)(d,{key:1})):((0,i.wg)(),(0,i.j4)(p,{key:2}))])]),(0,i._)("div",{class:"volume-bar-wrap",onMousedown:t[11]||(t[11]=e=>N()),onTouchstart:t[12]||(t[12]=e=>N()),onClick:t[13]||(t[13]=e=>j(e))},[(0,i._)("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:r},[(0,i._)("div",{class:"volume-bar-inner",style:(0,oe.j5)({width:I.value})},kr,4)],512)],32)]),(0,i._)("span",br,[(0,i._)("span",_r,(0,oe.zw)(x.value),1),(0,i.Uk)(" / "),(0,i._)("span",Ir,(0,oe.zw)(k.value),1)])]),(0,i._)("div",Sr,[(0,i._)("div",Cr,[(0,i._)("div",Lr,[(0,i._)("span",{class:"icon-content",onClick:t[14]||(t[14]=e=>S.value=!S.value)},(0,oe.zw)(1===f.value?"倍速":f.value+"x"),1),S.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"speed-menu",onMouseleave:t[15]||(t[15]=e=>S.value=!1)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(C,(e=>(0,i._)("div",{class:(0,oe.C_)(["speed-menu-item",{active:e.value===f.value}]),key:e.label,onClick:t=>W(e.value)},(0,oe.zw)(e.label),11,Tr))),64))],32)):(0,i.kq)("",!0)])]),(0,i._)("div",{class:"loop",onClick:t[16]||(t[16]=e=>J())},[(0,i._)("div",{class:(0,oe.C_)(["icon loop-icon",{active:m.value}])},[(0,i._)("span",Er,"循环"+(0,oe.zw)(m.value?"开":"关"),1)],2)])]),(0,i._)("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:o,onMousedown:t[17]||(t[17]=e=>z()),onTouchstart:t[18]||(t[18]=e=>z()),onMousemove:t[19]||(t[19]=e=>Y(e)),onMouseenter:t[20]||(t[20]=e=>g.value=!0),onMouseleave:t[21]||(t[21]=e=>g.value=!1)},[(0,i._)("div",{class:(0,oe.C_)(["bar-time",{hidden:!g.value}]),style:(0,oe.j5)({left:w.value})},(0,oe.zw)(y.value),7),(0,i._)("div",Mr,[(0,i._)("div",{class:"loaded",style:(0,oe.j5)({width:_.value})},null,4),(0,i._)("div",{class:"played",style:(0,oe.j5)({width:b.value})},Wr,4)])],544)])],38)}}});const Hr=(0,Vl.Z)(Dr,[["__scopeId","data-v-e55352ca"]]);var Fr=Hr,Ar=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-video",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[2]||(t[2]=e=>a(e,!1)),onTouchstart:t[3]||(t[3]=e=>a(e,!1))},[(0,i.Wm)(Fr,{width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,scale:(0,s.SU)(l)},null,8,["width","height","src","poster","scale"]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(["t","b","l","r"],(e=>(0,i._)("div",{class:(0,oe.C_)(["handler-border",e]),key:e,onMousedown:t[0]||(t[0]=e=>a(e)),onTouchstart:t[1]||(t[1]=e=>a(e))},null,34))),64))],32)),[[n,e.contextmenus]])],4)],6)}}});const $r=(0,Vl.Z)(Ar,[["__scopeId","data-v-5dc89f2a"]]);var Zr=$r;const Or=e=>((0,i.dD)("data-v-44037f56"),e=e(),(0,i.Cn)(),e),Rr=["src","autoplay"],zr={class:"controller"},Pr={class:"icons"},Br={class:"icon-content"},Nr={class:"volume"},jr={class:"icon-content"},Yr=Or((()=>(0,i._)("span",{class:"thumb"},null,-1))),Vr=[Yr],Jr={class:"time"},qr={class:"ptime"},Xr={class:"dtime"},Gr={class:"bar"},Kr=Or((()=>(0,i._)("span",{class:"thumb"},null,-1))),Qr=[Kr];var eu=(0,i.aZ)({__name:"AudioPlayer",props:{src:{},loop:{type:Boolean},autoplay:{type:Boolean,default:!1},scale:{default:1}},setup(e,{expose:t}){const l=e,a=(e=0)=>{if(0===e||isNaN(e))return"00:00";const t=e=>e<10?"0"+e:""+e,l=Math.floor(e/3600),a=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*a);return(l>0?[l,a,n]:[a,n]).map(t).join(":")},n=e=>e.getBoundingClientRect().left,o=(0,s.iH)(),r=(0,s.iH)(),u=(0,s.iH)(),c=(0,s.iH)(.5),d=(0,s.iH)(!0),p=(0,s.iH)(0),v=(0,s.iH)(0),m=(0,s.iH)(0),h=(0,s.iH)(!1),f=(0,s.iH)("00:00"),g=(0,s.iH)("0"),y=(0,i.Fl)((()=>a(p.value))),w=(0,i.Fl)((()=>a(v.value))),x=(0,i.Fl)((()=>p.value/v.value*100+"%")),k=(0,i.Fl)((()=>m.value/v.value*100+"%")),b=(0,i.Fl)((()=>100*c.value+"%")),_=e=>{o.value&&(e=Math.max(e,0),e=Math.min(e,v.value),o.value.currentTime=e,p.value=e)},I=()=>{o.value&&(d.value=!1,o.value.play())},S=()=>{o.value&&(d.value=!0,o.value.pause())},C=()=>{d.value?I():S()},L=e=>{o.value&&(e=Math.max(e,0),e=Math.min(e,1),o.value.volume=e,c.value=e,o.value.muted&&0!==e&&(o.value.muted=!1))},T=()=>{v.value=o.value?.duration||0},E=()=>{p.value=o.value?.currentTime||0},M=()=>{d.value=!1},U=()=>{l.loop?(_(0),I()):S()},W=()=>{m.value=o.value?.buffered.length?o.value.buffered.end(o.value.buffered.length-1):0},D=()=>ta.error("视频加载失败"),H=e=>{if(!o.value||!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-n(r.value))/r.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const a=l*v.value;o.value.currentTime=a,p.value=a},F=e=>{if(!o.value||!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-n(r.value))/r.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const a=l*v.value;o.value.currentTime=a,p.value=a,document.removeEventListener("mousemove",H),document.removeEventListener("touchmove",H),document.removeEventListener("mouseup",F),document.removeEventListener("touchend",F)},A=()=>{document.addEventListener("mousemove",H),document.addEventListener("touchmove",H),document.addEventListener("mouseup",F),document.addEventListener("touchend",F)},$=e=>{if(!u.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-n(u.value))/45;L(l)},Z=()=>{document.removeEventListener("mousemove",$),document.removeEventListener("touchmove",$),document.removeEventListener("mouseup",Z),document.removeEventListener("touchend",Z)},O=()=>{document.addEventListener("mousemove",$),document.addEventListener("touchmove",$),document.addEventListener("mouseup",Z),document.addEventListener("touchend",Z)},R=e=>{if(!u.value)return;const t=(e.clientX-n(u.value))/45;L(t)},z=e=>{if(v.value&&r.value){const t=r.value.getBoundingClientRect().left,l=e.clientX-t;if(l<0||l>r.value.offsetWidth)return;const n=v.value*(l/r.value.offsetWidth);g.value=l-(n>=3600?25:20)+"px",f.value=a(n),h.value=!0}},P=()=>{o.value&&(o.value.muted?(o.value.muted=!1,L(.5)):(o.value.muted=!0,L(0)))};return t({toggle:C}),(e,t)=>{const l=(0,i.up)("IconPlayOne"),a=(0,i.up)("IconPause"),n=(0,i.up)("IconVolumeMute"),s=(0,i.up)("IconVolumeNotice"),p=(0,i.up)("IconVolumeSmall");return(0,i.wg)(),(0,i.iD)("div",{class:"audio-player",style:(0,oe.j5)({transform:`scale(${1/e.scale})`})},[(0,i._)("audio",{class:"audio",ref_key:"audioRef",ref:o,src:e.src,autoplay:e.autoplay,onDurationchange:t[0]||(t[0]=e=>T()),onTimeupdate:t[1]||(t[1]=e=>E()),onPlay:t[2]||(t[2]=e=>M()),onEnded:t[3]||(t[3]=e=>U()),onProgress:t[4]||(t[4]=e=>W()),onError:t[5]||(t[5]=e=>D())},null,40,Rr),(0,i._)("div",zr,[(0,i._)("div",Pr,[(0,i._)("div",{class:"icon play-icon",onClick:t[6]||(t[6]=e=>C())},[(0,i._)("span",Br,[d.value?((0,i.wg)(),(0,i.j4)(l,{key:0})):((0,i.wg)(),(0,i.j4)(a,{key:1}))])]),(0,i._)("div",Nr,[(0,i._)("div",{class:"icon volume-icon",onClick:t[7]||(t[7]=e=>P())},[(0,i._)("span",jr,[0===c.value?((0,i.wg)(),(0,i.j4)(n,{key:0})):1===c.value?((0,i.wg)(),(0,i.j4)(s,{key:1})):((0,i.wg)(),(0,i.j4)(p,{key:2}))])]),(0,i._)("div",{class:"volume-bar-wrap",onMousedown:t[8]||(t[8]=e=>O()),onTouchstart:t[9]||(t[9]=e=>O()),onClick:t[10]||(t[10]=e=>R(e))},[(0,i._)("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:u},[(0,i._)("div",{class:"volume-bar-inner",style:(0,oe.j5)({width:b.value})},Vr,4)],512)],32)])]),(0,i._)("span",Jr,[(0,i._)("span",qr,(0,oe.zw)(y.value),1),(0,i.Uk)(" / "),(0,i._)("span",Xr,(0,oe.zw)(w.value),1)]),(0,i._)("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:r,onMousedown:t[11]||(t[11]=e=>A()),onTouchstart:t[12]||(t[12]=e=>A()),onMousemove:t[13]||(t[13]=e=>z(e)),onMouseenter:t[14]||(t[14]=e=>h.value=!0),onMouseleave:t[15]||(t[15]=e=>h.value=!1)},[(0,i._)("div",{class:(0,oe.C_)(["bar-time",{hidden:!h.value}]),style:(0,oe.j5)({left:g.value})},(0,oe.zw)(f.value),7),(0,i._)("div",Gr,[(0,i._)("div",{class:"loaded",style:(0,oe.j5)({width:k.value})},null,4),(0,i._)("div",{class:"played",style:(0,oe.j5)({width:x.value})},Qr,4)])],544)])],4)}}});const tu=(0,Vl.Z)(eu,[["__scopeId","data-v-44037f56"]]);var lu=tu,au=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l,handleElementId:a}=(0,o.Jk)(R()),{viewportRatio:r}=(0,o.Jk)($()),u=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px")),c=(0,i.Fl)((()=>{const e=oa,a=oa*r.value,n=280/l.value,o=50/l.value,i=t.elementInfo.width,s=t.elementInfo.height,u=t.elementInfo.left,c=t.elementInfo.top;let d=0,p=s;return u+n>=e&&(d=i-n),c+s+o>=a&&(p=-o),{left:d+"px",top:p+"px"}})),d=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))};return(e,t)=>{const o=(0,i.up)("IconVolumeNotice"),r=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["editable-element-audio",{lock:e.elementInfo.lock}]),style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[1]||(t[1]=e=>d(e)),onTouchstart:t[2]||(t[2]=e=>d(e))},[(0,i.Wm)(o,{class:"audio-icon",style:(0,oe.j5)({fontSize:u.value,color:e.elementInfo.color})},null,8,["style"]),(0,s.SU)(a)===e.elementInfo.id?((0,i.wg)(),(0,i.j4)(lu,{key:0,class:"audio-player",style:(0,oe.j5)({...c.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,scale:(0,s.SU)(l),onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"]))},null,8,["style","src","loop","scale"])):(0,i.kq)("",!0)],32)),[[r,e.contextmenus]])],4)],6)}}});const nu=(0,Vl.Z)(au,[["__scopeId","data-v-53bdc956"]]);var ou=nu;const iu=["id"];var su=(0,i.aZ)({__name:"EditableElement",props:{elementInfo:{},elementIndex:{},isMultiSelect:{type:Boolean},selectElement:{type:Function},openLinkDialog:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[sa.IMAGE]:$o,[sa.TEXT]:ls,[sa.SHAPE]:ys,[sa.LINE]:Es,[sa.CHART]:As,[sa.TABLE]:lr,[sa.LATEX]:rr,[sa.VIDEO]:Zr,[sa.AUDIO]:ou};return e[t.elementInfo.type]||null})),{orderElement:a}=ba(),{alignElementToCanvas:n}=qn(),{combineElements:o,uncombineElements:s}=ya(),{deleteElement:r}=ga(),{lockElement:u,unlockElement:c}=fa(),{copyElement:d,pasteElement:p,cutElement:v}=wa(),{selectAllElement:m}=xa(),h=()=>t.elementInfo.lock?[{text:"解锁",handler:()=>c(t.elementInfo)}]:[{text:"剪切",subText:"Ctrl + X",handler:v},{text:"复制",subText:"Ctrl + C",handler:d},{text:"粘贴",subText:"Ctrl + V",handler:p},{divider:!0},{text:"水平居中",handler:()=>n(ee.HORIZONTAL),children:[{text:"水平垂直居中",handler:()=>n(ee.CENTER)},{text:"水平居中",handler:()=>n(ee.HORIZONTAL)},{text:"左对齐",handler:()=>n(ee.LEFT)},{text:"右对齐",handler:()=>n(ee.RIGHT)}]},{text:"垂直居中",handler:()=>n(ee.VERTICAL),children:[{text:"水平垂直居中",handler:()=>n(ee.CENTER)},{text:"垂直居中",handler:()=>n(ee.VERTICAL)},{text:"顶部对齐",handler:()=>n(ee.TOP)},{text:"底部对齐",handler:()=>n(ee.BOTTOM)}]},{divider:!0},{text:"置于顶层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,Q.TOP),children:[{text:"置于顶层",handler:()=>a(t.elementInfo,Q.TOP)},{text:"上移一层",handler:()=>a(t.elementInfo,Q.UP)}]},{text:"置于底层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,Q.BOTTOM),children:[{text:"置于底层",handler:()=>a(t.elementInfo,Q.BOTTOM)},{text:"下移一层",handler:()=>a(t.elementInfo,Q.DOWN)}]},{divider:!0},{text:"设置链接",handler:t.openLinkDialog},{text:t.elementInfo.groupId?"取消组合":"组合",subText:"Ctrl + G",handler:t.elementInfo.groupId?s:o,hide:!t.isMultiSelect},{text:"全选",subText:"Ctrl + A",handler:m},{text:"锁定",subText:"Ctrl + L",handler:u},{text:"删除",subText:"Delete",handler:r}];return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"editable-element",ref:"elementRef",id:`editable-element-${e.elementInfo.id}`,style:(0,oe.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:h},null,8,["elementInfo","selectElement"]))],12,iu))}});const ru=su;var uu=ru,cu=(0,i.aZ)({__name:"MouseSelection",props:{top:{},left:{},width:{},height:{},quadrant:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(`mouse-selection quadrant-${e.quadrant}`),style:(0,oe.j5)({top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"})},null,6))}});const du=(0,Vl.Z)(cu,[["__scopeId","data-v-2c5e1d42"]]);var pu=du;const vu={class:"grid-lines"},mu=["d","stroke"];var hu=(0,i.aZ)({__name:"GridLines",setup(e){const{canvasScale:t,gridLineSize:l}=(0,o.Jk)(R()),{currentSlide:a,viewportRatio:n}=(0,o.Jk)($()),r=(0,i.Fl)((()=>a.value?.background)),u=(0,i.Fl)((()=>{const e=r.value?.color||"#fff",t=["#000","#fff"];return W.Z.mostReadable(e,t,{includeFallbackColors:!0}).setAlpha(.5).toRgbString()})),c=(0,i.Fl)((()=>{const e=oa,t=oa*n.value;let a="";for(let n=0;n<=Math.floor(t/l.value);n++)a+=`M0 ${n*l.value} L${e} ${n*l.value} `;for(let n=0;n<=Math.floor(e/l.value);n++)a+=`M${n*l.value} 0 L${n*l.value} ${t} `;return a}));return(e,l)=>((0,i.wg)(),(0,i.iD)("svg",vu,[(0,i._)("path",{style:(0,oe.j5)({transform:`scale(${(0,s.SU)(t)})`}),d:c.value,fill:"none",stroke:u.value,"stroke-width":"0.3","stroke-dasharray":"5"},null,12,mu)]))}});const fu=(0,Vl.Z)(hu,[["__scopeId","data-v-05484a24"]]);var gu=fu,yu=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return{backgroundColor:"#fff"};const{type:t,color:l,image:a,imageSize:n,gradientColor:o,gradientRotate:i,gradientType:s}=e.value;if("solid"===t)return{backgroundColor:l};if("image"===t)return a?"repeat"===n?{backgroundImage:`url(${a}`,backgroundRepeat:"repeat",backgroundSize:"contain"}:{backgroundImage:`url(${a}`,backgroundRepeat:"no-repeat",backgroundSize:n||"cover"}:{backgroundColor:"#fff"};if("gradient"===t){const e=i||0,t=o?o[0]:"#fff",l=o?o[1]:"#fff";return"radial"===s?{backgroundImage:`radial-gradient(${t}, ${l}`}:{backgroundImage:`linear-gradient(${e}deg, ${t}, ${l}`}}return{backgroundColor:"#fff"}}));return{backgroundStyle:t}},wu=(0,i.aZ)({__name:"ViewportBackground",setup(e){const{gridLineSize:t}=(0,o.Jk)(R()),{currentSlide:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>l.value?.background)),{backgroundStyle:n}=yu(a);return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"viewport-background",style:(0,oe.j5)((0,s.SU)(n))},[(0,s.SU)(t)?((0,i.wg)(),(0,i.j4)(gu,{key:0})):(0,i.kq)("",!0)],4))}});const xu=(0,Vl.Z)(wu,[["__scopeId","data-v-b6b18502"]]);var ku=xu,bu=(0,i.aZ)({__name:"AlignmentLine",props:{type:{},axis:{},length:{},canvasScale:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.axis.x*t.canvasScale+"px")),a=(0,i.Fl)((()=>t.axis.y*t.canvasScale+"px")),n=(0,i.Fl)((()=>"vertical"===t.type?{height:t.length*t.canvasScale+"px"}:{width:t.length*t.canvasScale+"px"}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"alignment-line",style:(0,oe.j5)({left:l.value,top:a.value})},[(0,i._)("div",{class:(0,oe.C_)(["line",e.type]),style:(0,oe.j5)(n.value)},null,6)],4))}});const _u=(0,Vl.Z)(bu,[["__scopeId","data-v-ed6fc00a"]]);var Iu=_u;const Su={class:"ruler"};var Cu=(0,i.aZ)({__name:"Ruler",props:{viewportStyles:{}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>t.viewportStyles.width*l.value/10));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Su,[(0,i._)("div",{class:"h",style:(0,oe.j5)({width:e.viewportStyles.width*(0,s.SU)(l)+"px",left:e.viewportStyles.left+"px"})},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(20,(e=>(0,i._)("div",{class:(0,oe.C_)(["ruler-marker-100",{hide:a.value<36,omit:a.value<72}]),key:`marker-100-${e}`},[(0,i._)("span",null,(0,oe.zw)(e),1)],2))),64))],4),(0,i._)("div",{class:"v",style:(0,oe.j5)({height:e.viewportStyles.height*(0,s.SU)(l)+"px",top:e.viewportStyles.top+"px"})},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(20,(e=>(0,i._)("div",{class:(0,oe.C_)(["ruler-marker-100",{hide:a.value<36,omit:a.value<72}]),key:e,style:(0,oe.j5)({height:a.value+"px"})},[(0,i._)("span",null,(0,oe.zw)(e),1)],6))),64))],4)]))}});const Lu=(0,Vl.Z)(Cu,[["__scopeId","data-v-2963c74c"]]);var Tu=Lu;const Eu=["width","height"],Mu=["d"];var Uu=(0,i.aZ)({__name:"ElementCreateSelection",emits:["created"],setup(e,{emit:t}){const l=t,a=R(),{creatingElement:r}=(0,o.Jk)(a),{ctrlOrShiftKeyActive:u}=(0,o.Jk)(q()),c=(0,s.iH)(),d=(0,s.iH)(),p=(0,s.iH)(),v=(0,s.iH)({x:0,y:0});(0,i.bv)((()=>{if(!p.value)return;const{x:e,y:t}=p.value.getBoundingClientRect();v.value={x:e,y:t}}));const m=e=>{let t=!0;const n=e.pageX,o=e.pageY;c.value=[n,o],document.onmousemove=e=>{if(!r.value||!t)return;let l=e.pageX,a=e.pageY;if(u.value){const e=l-n,t=a-o,i=Math.abs(e),s=Math.abs(t);if("shape"===r.value.type){const r=t>0&&e<0||t<0&&e>0;i>s?a=r?o-e:o+e:l=r?n-t:n+t}else"line"===r.value.type&&(i>s?a=o:l=n)}d.value=[l,a]},document.onmouseup=e=>{if(document.onmousemove=null,document.onmouseup=null,2===e.button)return void setTimeout((()=>a.setCreatingElement(null)),0);t=!1;const i=e.pageX,s=e.pageY,u=30;if("line"===r.value?.type&&(Math.abs(i-n)>=u||Math.abs(s-o)>=u))l("created",{start:c.value,end:d.value});else if("line"!==r.value?.type&&Math.abs(i-n)>=u&&Math.abs(s-o)>=u)l("created",{start:c.value,end:d.value});else{const e=200,t=Math.min(i,n),a=Math.min(s,o),r=Math.max(i,n),c=Math.max(s,o),d=r-t>=u?r-t:e,p=c-a>=u?c-a:e;l("created",{start:[t,a],end:[t+d,a+p]})}}},h=(0,i.Fl)((()=>{if(!c.value||!d.value)return null;if(!r.value||"line"!==r.value.type)return null;const[e,t]=c.value,[l,a]=d.value,n=Math.min(e,l),o=Math.max(e,l),i=Math.min(t,a),s=Math.max(t,a),u=o-n>=24?o-n:24,p=s-i>=24?s-i:24,v=e===n?0:o-n,m=t===i?0:s-i,h=l===n?0:o-n,f=a===i?0:s-i,g=`M${v}, ${m} L${h}, ${f}`;return{svgWidth:u,svgHeight:p,startX:v,startY:m,endX:h,endY:f,path:g}})),f=(0,i.Fl)((()=>{if(!c.value||!d.value)return{};const[e,t]=c.value,[l,a]=d.value,n=Math.min(e,l),o=Math.max(e,l),i=Math.min(t,a),s=Math.max(t,a),r=o-n,u=s-i;return{left:n-v.value.x+"px",top:i-v.value.y+"px",width:r+"px",height:u+"px"}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"element-create-selection",ref_key:"selectionRef",ref:p,onMousedown:t[0]||(t[0]=(0,n.iM)((e=>m(e)),["stop"])),onContextmenu:t[1]||(t[1]=(0,n.iM)((()=>{}),["stop","prevent"]))},[c.value&&d.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,oe.C_)(["selection",(0,s.SU)(r)?.type]),style:(0,oe.j5)(f.value)},["line"===(0,s.SU)(r)?.type&&h.value?((0,i.wg)(),(0,i.iD)("svg",{key:0,overflow:"visible",width:h.value.svgWidth,height:h.value.svgHeight},[(0,i._)("path",{d:h.value.path,stroke:"#d14424",fill:"none","stroke-width":"2"},null,8,Mu)],8,Eu)):(0,i.kq)("",!0)],6)):(0,i.kq)("",!0)],544))}});const Wu=(0,Vl.Z)(Uu,[["__scopeId","data-v-85b0bbaa"]]);var Du=Wu;const Hu={overflow:"visible"},Fu=["d","fill"];var Au=(0,i.aZ)({__name:"ShapeCreateCanvas",emits:["created"],setup(e,{emit:t}){const l=t,a=R(),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(q()),u=(0,s.iH)(),c=(0,s.iH)({x:0,y:0});(0,i.bv)((()=>{if(!u.value)return;const{x:e,y:t}=u.value.getBoundingClientRect();c.value={x:e,y:t}}));const d=(0,s.iH)(),p=(0,s.iH)([]),v=(0,s.iH)(!1),m=e=>{let t=e.pageX-c.value.x,l=e.pageY-c.value.y;if(r.value&&p.value.length){const[e,a]=p.value[p.value.length-1];Math.abs(e-t)-Math.abs(a-l)>0?l=a:t=e}return{pageX:t,pageY:l}},h=e=>{const{pageX:t,pageY:l}=m(e);if(d.value=[t,l],p.value.length>=2){const[e,a]=p.value[0];Math.abs(e-t)<5&&Math.abs(a-l)<5?v.value=!0:v.value=!1}else v.value=!1},f=(0,i.Fl)((()=>{let e="";for(let t=0;t{const{pageX:t,pageY:a}=m(e);if(v.value){const e=p.value.map((e=>e[0])),t=p.value.map((e=>e[1])),a=Math.min(...e),n=Math.min(...t),o=Math.max(...e),i=Math.max(...t),s=p.value.map((e=>[e[0]-a,e[1]-n]));let r="";for(let l=0;l{a.setCreatingCustomShapeState(!1)},w=e=>{const t=e.key.toUpperCase();t===ne.ESC&&y()};return(0,i.bv)((()=>{ta.success("点击开始绘制任意多边形,首尾闭合完成绘制,按 ESC 键或鼠标右键关闭"),document.addEventListener("keydown",w)})),(0,i.Ah)((()=>document.removeEventListener("keydown",w))),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"shape-create-canvas",ref_key:"shapeCanvasRef",ref:u,onMousedown:t[0]||(t[0]=(0,n.iM)((e=>g(e)),["stop"])),onMousemove:t[1]||(t[1]=e=>h(e)),onContextmenu:t[2]||(t[2]=(0,n.iM)((e=>y()),["stop","prevent"]))},[((0,i.wg)(),(0,i.iD)("svg",Hu,[(0,i._)("path",{d:f.value,stroke:"#d14424",fill:v.value?"rgba(226, 83, 77, 0.15)":"none","stroke-width":"2"},null,8,Fu)]))],544))}});const $u=(0,Vl.Z)(Au,[["__scopeId","data-v-224f36be"]]);var Zu=$u,Ou=(e,t)=>{const l=(0,i.Fl)((()=>[{direction:le.LEFT_TOP,style:{}},{direction:le.TOP,style:{left:e.value/2+"px"}},{direction:le.RIGHT_TOP,style:{left:e.value+"px"}},{direction:le.LEFT,style:{top:t.value/2+"px"}},{direction:le.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}},{direction:le.LEFT_BOTTOM,style:{top:t.value+"px"}},{direction:le.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}},{direction:le.RIGHT_BOTTOM,style:{left:e.value+"px",top:t.value+"px"}}])),a=(0,i.Fl)((()=>[{direction:le.LEFT,style:{top:t.value/2+"px"}},{direction:le.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}}])),n=(0,i.Fl)((()=>[{direction:le.TOP,style:{left:e.value/2+"px"}},{direction:le.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}}])),o=(0,i.Fl)((()=>[{type:te.T,style:{width:e.value+"px"}},{type:te.B,style:{top:t.value+"px",width:e.value+"px"}},{type:te.L,style:{height:t.value+"px"}},{type:te.R,style:{left:e.value+"px",height:t.value+"px"}}]));return{resizeHandlers:l,textElementResizeHandlers:a,verticalTextElementResizeHandlers:n,borderLines:o}},Ru=(0,i.aZ)({__name:"ResizeHandler",props:{type:{},rotate:{default:0}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e="rotate-",l=t.rotate;return l>-22.5&&l<=22.5?e+0:l>22.5&&l<=67.5?e+45:l>67.5&&l<=112.5?e+90:l>112.5&&l<=157.5?e+135:l>157.5||l<=-157.5?e+0:l>-157.5&&l<=-112.5?e+45:l>-112.5&&l<=-67.5?e+90:l>-67.5&&l<=-22.5?e+135:e+0}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["resize-handler",l.value,e.type])},null,2))}});const zu=(0,Vl.Z)(Ru,[["__scopeId","data-v-1e66197f"]]);var Pu=zu,Bu=(0,i.aZ)({__name:"BorderLine",props:{type:{},isWide:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["border-line",e.type,{wide:e.isWide}])},null,2))}});const Nu=(0,Vl.Z)(Bu,[["__scopeId","data-v-8346cf6c"]]);var ju=Nu,Yu=(0,i.aZ)({__name:"MultiSelectOperate",props:{elementList:{},scaleMultiElement:{type:Function}},setup(e){const t=e,{activeElementIdList:l,canvasScale:a}=(0,o.Jk)(R()),r=(0,i.Fl)((()=>t.elementList.filter((e=>l.value.includes(e.id))))),u=(0,s.iH)({minX:0,maxX:0,minY:0,maxY:0}),c=(0,i.Fl)((()=>(u.value.maxX-u.value.minX)*a.value)),d=(0,i.Fl)((()=>(u.value.maxY-u.value.minY)*a.value)),{resizeHandlers:p,borderLines:v}=Ou(c,d),m=()=>{const{minX:e,maxX:t,minY:l,maxY:a}=ke(r.value);u.value={minX:e,maxX:t,minY:l,maxY:a}};(0,i.m0)(m);const h=(0,i.Fl)((()=>r.value.some((e=>!!("image"!==e.type&&"shape"!==e.type||e.rotate)))));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"multi-select-operate",style:(0,oe.j5)({left:u.value.minX*(0,s.SU)(a)+"px",top:u.value.minY*(0,s.SU)(a)+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(v),(e=>((0,i.wg)(),(0,i.j4)(ju,{key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),h.value?(0,i.kq)("",!0):((0,i.wg)(!0),(0,i.iD)(i.HY,{key:0},(0,i.Ko)((0,s.SU)(p),(t=>((0,i.wg)(),(0,i.j4)(Pu,{key:t.direction,type:t.direction,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleMultiElement(l,u.value,t.direction)),["stop"])},null,8,["type","style","onMousedown"])))),128))],4))}});const Vu=(0,Vl.Z)(Yu,[["__scopeId","data-v-97dc9b9a"]]);var Ju=Vu;const qu={class:"rotate-handler"};function Xu(e,t){return(0,i.wg)(),(0,i.iD)("div",qu)}const Gu={},Ku=(0,Vl.Z)(Gu,[["render",Xu],["__scopeId","data-v-b99d8dae"]]);var Qu=Ku;const ec={inheritAttrs:!1};var tc=(0,i.aZ)({...ec,__name:"ImageElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l,clipingImageElementId:a}=(0,o.Jk)(R()),r=(0,i.Fl)((()=>a.value===t.elementInfo.id)),u=(0,i.Fl)((()=>t.elementInfo.width*l.value)),c=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:d,borderLines:p}=Ou(u,c);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["image-element-operate",{cliping:r.value}])},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(p),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Qu,{class:"operate-rotate-handler",style:(0,oe.j5)({left:u.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)],2))}});const lc=(0,Vl.Z)(tc,[["__scopeId","data-v-7bcad5a9"]]);var ac=lc;const nc={class:"text-element-operate"},oc={inheritAttrs:!1};var ic=(0,i.aZ)({...oc,__name:"TextElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{textElementResizeHandlers:u,verticalTextElementResizeHandlers:c,borderLines:d}=Ou(a,r),p=(0,i.Fl)((()=>t.elementInfo.vertical?c.value:u.value));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",nc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Qu,{class:"operate-rotate-handler",style:(0,oe.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)]))}});const sc=ic;var rc=sc;const uc={class:"shape-element-operate"},cc={inheritAttrs:!1};var dc=(0,i.aZ)({...cc,__name:"ShapeElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function},moveShapeKeypoint:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:u,borderLines:c}=Ou(a,r),d=(0,i.Fl)((()=>{if(!t.elementInfo.pathFormula||void 0===t.elementInfo.keypoint)return{};const e=ra[t.elementInfo.pathFormula];if("editable"in e){const a=e.getBaseSize(t.elementInfo.width,t.elementInfo.height)*t.elementInfo.keypoint;if("left"===e.relative)return{left:a*l.value+"px"};if("right"===e.relative)return{left:(t.elementInfo.width-a)*l.value+"px"};if("center"===e.relative)return{left:(t.elementInfo.width-a)/2*l.value+"px"};if("top"===e.relative)return{top:a*l.value+"px"};if("bottom"===e.relative)return{top:(t.elementInfo.height-a)*l.value+"px"}}return{}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",uc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(u),(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Qu,{class:"operate-rotate-handler",style:(0,oe.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]),void 0!==e.elementInfo.keypoint?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"operate-keypoint-handler",style:(0,oe.j5)(d.value),onMousedown:t[1]||(t[1]=(0,n.iM)((t=>e.moveShapeKeypoint(t,e.elementInfo)),["stop"]))},null,36)):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0)]))}});const pc=(0,Vl.Z)(dc,[["__scopeId","data-v-52dcdbf8"]]);var vc=pc;const mc={class:"line-element-operate"},hc=["width","height","stroke"],fc={key:0},gc=["x1","y1","x2","y2"],yc=["x1","y1","x2","y2"],wc=["x1","y1","x2","y2"],xc=["x1","y1","x2","y2"],kc={inheritAttrs:!1};var bc=(0,i.aZ)({...kc,__name:"LineElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},dragLineElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>Math.max(t.elementInfo.start[0],t.elementInfo.end[0]))),r=(0,i.Fl)((()=>Math.max(t.elementInfo.start[1],t.elementInfo.end[1]))),u=(0,i.Fl)((()=>{const e=[{handler:ae.START,style:{left:t.elementInfo.start[0]*l.value+"px",top:t.elementInfo.start[1]*l.value+"px"}},{handler:ae.END,style:{left:t.elementInfo.end[0]*l.value+"px",top:t.elementInfo.end[1]*l.value+"px"}}];if(t.elementInfo.curve||t.elementInfo.broken){const a=t.elementInfo.curve||t.elementInfo.broken;e.push({handler:ae.C,style:{left:a[0]*l.value+"px",top:a[1]*l.value+"px"}})}else if(t.elementInfo.cubic){const[a,n]=t.elementInfo.cubic;e.push({handler:ae.C1,style:{left:a[0]*l.value+"px",top:a[1]*l.value+"px"}}),e.push({handler:ae.C2,style:{left:n[0]*l.value+"px",top:n[1]*l.value+"px"}})}return e}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",mc,[e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(u.value,(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.handler,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.dragLineElement(l,e.elementInfo,t.handler)),["stop"])},null,8,["style","onMousedown"])))),128)),((0,i.wg)(),(0,i.iD)("svg",{width:a.value||1,height:r.value||1,stroke:e.elementInfo.color,overflow:"visible",style:(0,oe.j5)({transform:`scale(${(0,s.SU)(l)})`})},[e.elementInfo.curve?((0,i.wg)(),(0,i.iD)("g",fc,[(0,i._)("line",{class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,gc),(0,i._)("line",{class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,yc)])):(0,i.kq)("",!0),e.elementInfo.cubic?((0,i.wg)(!0),(0,i.iD)(i.HY,{key:1},(0,i.Ko)(e.elementInfo.cubic,((t,l)=>((0,i.wg)(),(0,i.iD)("g",{key:l},[0===l?((0,i.wg)(),(0,i.iD)("line",{key:0,class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:t[0],y2:t[1]},null,8,wc)):(0,i.kq)("",!0),1===l?((0,i.wg)(),(0,i.iD)("line",{key:1,class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:t[0],y2:t[1]},null,8,xc)):(0,i.kq)("",!0)])))),128)):(0,i.kq)("",!0)],12,hc))],64)):(0,i.kq)("",!0)]))}});const _c=(0,Vl.Z)(bc,[["__scopeId","data-v-3aa5cc44"]]);var Ic=_c;const Sc={class:"table-element-operate"},Cc={inheritAttrs:!1};var Lc=(0,i.aZ)({...Cc,__name:"TableElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>t.elementInfo.outline.width||1)),r=(0,i.Fl)((()=>(t.elementInfo.width+a.value)*l.value)),u=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:c,borderLines:d}=Ou(r,u);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Sc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Qu,{class:"operate-rotate-handler",style:(0,oe.j5)({left:r.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)]))}});const Tc=Lc;var Ec=Tc;const Mc={class:"common-element-operate"},Uc={inheritAttrs:!1};var Wc=(0,i.aZ)({...Uc,__name:"CommonElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)(R()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:u,borderLines:c}=Ou(a,r),d=(0,i.Fl)((()=>["chart","video","audio"].includes(t.elementInfo.type)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Mc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(u),(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),d.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.j4)(Qu,{key:0,class:"operate-rotate-handler",style:(0,oe.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]))],64)):(0,i.kq)("",!0)]))}});const Dc=Wc;var Hc=Dc,Fc=()=>{const e=$(),{addHistorySnapshot:t}=da(),l=(l,a)=>{const n=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if("web"===a.type&&!n.test(a.target))return ta.error("不是正确的网页链接地址"),!1;if("slide"===a.type&&!a.target)return ta.error("请先选择链接目标"),!1;const o={link:a};return e.updateElement({id:l.id,props:o}),t(),!0},a=l=>{e.removeElementProps({id:l.id,propName:"link"}),t()};return{setLink:l,removeLink:a}},Ac=(0,i.aZ)({__name:"Divider",props:{type:{default:"horizontal"},margin:{default:0}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["divider",e.type]),style:(0,oe.j5)({margin:"horizontal"===e.type?`${e.margin||24}px 0`:`0 ${e.margin||8}px`})},null,6))}});const $c=(0,Vl.Z)(Ac,[["__scopeId","data-v-6b66cde8"]]);var Zc=$c;const Oc=["href"],Rc={class:"btns"};var zc=(0,i.aZ)({__name:"LinkHandler",props:{elementInfo:{},link:{},openLinkDialog:{type:Function}},setup(e){const t=e,l=R(),a=$(),{canvasScale:n}=(0,o.Jk)(l),{slides:r}=(0,o.Jk)(a),{removeLink:u}=Fc(),c=(0,i.Fl)((()=>"line"===t.elementInfo.type?0:t.elementInfo.height)),d=e=>{const t=r.value.findIndex((t=>t.id===e));-1!==t&&(l.setActiveElementIdList([]),a.updateSlideIndex(t))};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"link-handler",style:(0,oe.j5)({top:c.value*(0,s.SU)(n)+10+"px"})},["web"===e.link.type?((0,i.wg)(),(0,i.iD)("a",{key:0,class:"link",href:e.link.target,target:"_blank"},(0,oe.zw)(e.link.target),9,Oc)):((0,i.wg)(),(0,i.iD)("a",{key:1,class:"link",onClick:t[0]||(t[0]=t=>d(e.link.target))},"幻灯片页面 "+(0,oe.zw)(e.link.target),1)),(0,i._)("div",Rc,[(0,i._)("div",{class:"btn",onClick:t[1]||(t[1]=t=>e.openLinkDialog())},"更换"),(0,i.Wm)(Zc,{type:"vertical"}),(0,i._)("div",{class:"btn",onClick:t[2]||(t[2]=t=>(0,s.SU)(u)(e.elementInfo))},"移除")])],4))}});const Pc=(0,Vl.Z)(zc,[["__scopeId","data-v-316c4664"]]);var Bc=Pc;const Nc={key:1,class:"animation-index"};var jc=(0,i.aZ)({__name:"index",props:{elementInfo:{},isSelected:{type:Boolean},isActive:{type:Boolean},isActiveGroupElement:{type:Boolean},isMultiSelect:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function},dragLineElement:{type:Function},moveShapeKeypoint:{type:Function},openLinkDialog:{type:Function}},setup(e){const t=e,{canvasScale:l,toolbarState:a}=(0,o.Jk)(R()),{formatedAnimations:r}=(0,o.Jk)($()),u=(0,i.Fl)((()=>{const e={[sa.IMAGE]:ac,[sa.TEXT]:rc,[sa.SHAPE]:vc,[sa.LINE]:Ic,[sa.TABLE]:Ec,[sa.CHART]:Hc,[sa.LATEX]:Hc,[sa.VIDEO]:Hc,[sa.AUDIO]:Hc};return e[t.elementInfo.type]||null})),c=(0,i.Fl)((()=>{const e=[];for(let l=0;le.elId));a.includes(t.elementInfo.id)&&e.push(l)}return e})),d=(0,i.Fl)((()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0)),p=(0,i.Fl)((()=>"height"in t.elementInfo?t.elementInfo.height:0));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["operate",{"multi-select":e.isMultiSelect&&!e.isActive}]),style:(0,oe.j5)({top:e.elementInfo.top*(0,s.SU)(l)+"px",left:e.elementInfo.left*(0,s.SU)(l)+"px",transform:`rotate(${d.value}deg)`,transformOrigin:`${e.elementInfo.width*(0,s.SU)(l)/2}px ${p.value*(0,s.SU)(l)/2}px`})},[e.isSelected?((0,i.wg)(),(0,i.j4)((0,i.LL)(u.value),{key:0,elementInfo:e.elementInfo,handlerVisible:!e.elementInfo.lock&&(e.isActiveGroupElement||!e.isMultiSelect),rotateElement:e.rotateElement,scaleElement:e.scaleElement,dragLineElement:e.dragLineElement,moveShapeKeypoint:e.moveShapeKeypoint},null,8,["elementInfo","handlerVisible","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])):(0,i.kq)("",!0),"elAnimation"===(0,s.SU)(a)&&c.value.length?((0,i.wg)(),(0,i.iD)("div",Nc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(c.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"index-item",key:e},(0,oe.zw)(e+1),1)))),128))])):(0,i.kq)("",!0),e.isActive&&e.elementInfo.link?((0,i.wg)(),(0,i.j4)(Bc,{key:2,elementInfo:e.elementInfo,link:e.elementInfo.link,openLinkDialog:e.openLinkDialog,onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"]))},null,8,["elementInfo","link","openLinkDialog"])):(0,i.kq)("",!0)],6))}});const Yc=(0,Vl.Z)(jc,[["__scopeId","data-v-5ec1ff35"]]);var Vc=Yc;const Jc=["src"];var qc=(0,i.aZ)({__name:"BaseImageElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Xn(l),n=(0,i.Fl)((()=>t.elementInfo.flipH)),o=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:r}=Gn(n,o),u=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:c,imgPosition:d}=Qn(u),p=(0,i.Fl)((()=>t.elementInfo.filters)),{filter:v}=eo(p);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-image",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({filter:(0,s.SU)(a)?`drop-shadow(${(0,s.SU)(a)})`:"",transform:(0,s.SU)(r)})},[(0,i.Wm)(ko,{elementInfo:e.elementInfo},null,8,["elementInfo"]),(0,i._)("div",{class:"image-content",style:(0,oe.j5)({clipPath:(0,s.SU)(c).style})},[(0,i._)("img",{src:e.elementInfo.src,draggable:!1,style:(0,oe.j5)({top:(0,s.SU)(d).top,left:(0,s.SU)(d).left,width:(0,s.SU)(d).width,height:(0,s.SU)(d).height,filter:(0,s.SU)(v)}),alt:""},null,12,Jc),e.elementInfo.colorMask?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"color-mask",style:(0,oe.j5)({backgroundColor:e.elementInfo.colorMask})},null,4)):(0,i.kq)("",!0)],4)],4)],4)],4))}});const Xc=(0,Vl.Z)(qc,[["__scopeId","data-v-24fef706"]]);var Gc=Xc;const Kc=["innerHTML"];var Qc=(0,i.aZ)({__name:"BaseTextElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Xn(l);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-text",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:(0,s.SU)(a),lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px",color:e.elementInfo.defaultColor,fontFamily:e.elementInfo.defaultFontName,writingMode:e.elementInfo.vertical?"vertical-rl":"horizontal-tb"})},[(0,i.Wm)(Po,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i._)("div",{class:"text ProseMirror-static",style:(0,oe.j5)({"--paragraphSpace":`${void 0===e.elementInfo.paragraphSpace?5:e.elementInfo.paragraphSpace}px`}),innerHTML:e.elementInfo.content},null,12,Kc)],4)],4)],4))}});const ed=(0,Vl.Z)(Qc,[["__scopeId","data-v-52a206f2"]]);var td=ed;const ld=["width","height"],ad={key:0},nd=["transform"],od=["d","fill","stroke","stroke-width","stroke-dasharray"],id=["innerHTML"];var sd=(0,i.aZ)({__name:"BaseShapeElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.outline)),{outlineWidth:a,outlineColor:n,strokeDashArray:o}=to(l),r=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:u}=Xn(r),c=(0,i.Fl)((()=>t.elementInfo.flipH)),d=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:p}=Gn(c,d),v=(0,i.Fl)((()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-shape",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({opacity:e.elementInfo.opacity,filter:(0,s.SU)(u)?`drop-shadow(${(0,s.SU)(u)})`:"",transform:(0,s.SU)(p),color:v.value.defaultColor,fontFamily:v.value.defaultFontName})},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?((0,i.wg)(),(0,i.iD)("defs",ad,[(0,i.Wm)(ds,{id:`base-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,color1:e.elementInfo.gradient.color[0],color2:e.elementInfo.gradient.color[1],rotate:e.elementInfo.gradient.rotate},null,8,["id","type","color1","color2","rotate"])])):(0,i.kq)("",!0),(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:e.elementInfo.gradient?`url(#base-gradient-${e.elementInfo.id})`:e.elementInfo.fill,stroke:(0,s.SU)(n),"stroke-width":(0,s.SU)(a),"stroke-dasharray":(0,s.SU)(o)},null,8,od)],8,nd)],8,ld)),(0,i._)("div",{class:(0,oe.C_)(["shape-text",v.value.align])},[(0,i._)("div",{class:"ProseMirror-static",innerHTML:v.value.content},null,8,id)],2)],4)],4)],4))}});const rd=(0,Vl.Z)(sd,[["__scopeId","data-v-b13f8fa8"]]);var ud=rd;const cd=["width","height"],dd=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"];var pd=(0,i.aZ)({__name:"BaseLineElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Xn(l),n=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e})),o=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e})),r=(0,i.Fl)((()=>{if("dashed"!==t.elementInfo.style)return"0 0";const e=t.elementInfo.width;return e<=8?`${5*e} ${2.5*e}`:`${5*e} ${1.5*e}`})),u=(0,i.Fl)((()=>Ce(t.elementInfo)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-line",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({filter:(0,s.SU)(a)?`drop-shadow(${(0,s.SU)(a)})`:""})},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:n.value,height:o.value},[(0,i._)("defs",null,[e.elementInfo.points[0]?((0,i.wg)(),(0,i.j4)(_s,{key:0,id:e.elementInfo.id,position:"start",type:e.elementInfo.points[0],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0),e.elementInfo.points[1]?((0,i.wg)(),(0,i.j4)(_s,{key:1,id:e.elementInfo.id,position:"end",type:e.elementInfo.points[1],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):(0,i.kq)("",!0)]),(0,i._)("path",{d:u.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":r.value,fill:"none","marker-start":e.elementInfo.points[0]?`url(#${e.elementInfo.id}-${e.elementInfo.points[0]}-start)`:"","marker-end":e.elementInfo.points[1]?`url(#${e.elementInfo.id}-${e.elementInfo.points[1]}-end)`:""},null,8,dd)],8,cd))],4)],4))}});const vd=(0,Vl.Z)(pd,[["__scopeId","data-v-443e2f82"]]);var md=vd,hd=(0,i.aZ)({__name:"BaseChartElement",props:{elementInfo:{}},setup(e){const t=(0,i.f3)(Tn)||(0,s.iH)(1),l=(0,i.Fl)((()=>t.value<1)),a=(0,i.Fl)((()=>l.value?1/t.value:1));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-chart",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({backgroundColor:e.elementInfo.fill})},[(0,i.Wm)(Po,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Ds,{width:e.elementInfo.width*a.value,height:e.elementInfo.height*a.value,type:e.elementInfo.chartType,data:e.elementInfo.data,options:e.elementInfo.options,themeColor:e.elementInfo.themeColor,gridColor:e.elementInfo.gridColor,legends:e.elementInfo.data.legends,legend:e.elementInfo.legend||"",style:(0,oe.j5)({zoom:1/a.value})},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend","style"])],4)],4)],4))}});const fd=(0,Vl.Z)(hd,[["__scopeId","data-v-7c03d68d"]]);var gd=fd;const yd=["width"],wd=["rowspan","colspan"],xd=["innerHTML"];var kd=(0,i.aZ)({__name:"StaticTable",props:{data:{},width:{},cellMinHeight:{},colWidths:{},outline:{},theme:{},editable:{type:Boolean,default:!0}},setup(e){const t=e,l=(0,s.iH)([]),a=(0,i.Fl)((()=>l.value.reduce(((e,t)=>e+t))));(0,i.YP)([()=>t.colWidths,()=>t.width],(()=>{l.value=t.colWidths.map((e=>e*t.width))}),{immediate:!0});const o=(0,i.Fl)((()=>t.data)),{hideCells:r}=Os(o),u=(0,i.Fl)((()=>t.theme)),{subThemeColor:c}=Rs(u);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"static-table",style:(0,oe.j5)({width:a.value+"px"})},[(0,i._)("table",{class:(0,oe.C_)({theme:u.value,"row-header":u.value?.rowHeader,"row-footer":u.value?.rowFooter,"col-header":u.value?.colHeader,"col-footer":u.value?.colFooter}),style:(0,oe.j5)(`--themeColor: ${u.value?.color}; --subThemeColor1: ${(0,s.SU)(c)[0]}; --subThemeColor2: ${(0,s.SU)(c)[1]}`)},[(0,i._)("colgroup",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.value,((e,t)=>((0,i.wg)(),(0,i.iD)("col",{span:"1",key:t,width:e},null,8,yd)))),128))]),(0,i._)("tbody",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.data,((t,l)=>((0,i.wg)(),(0,i.iD)("tr",{key:l,style:(0,oe.j5)({height:e.cellMinHeight+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((t,a)=>(0,i.wy)(((0,i.wg)(),(0,i.iD)("td",{class:"cell",style:(0,oe.j5)({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...(0,s.SU)($s)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan},[(0,i._)("div",{class:"cell-text",style:(0,oe.j5)({minHeight:e.cellMinHeight-4+"px"}),innerHTML:(0,s.SU)(Zs)(t.text)},null,12,xd)],12,wd)),[[n.F8,!(0,s.SU)(r).includes(`${l}_${a}`)]]))),128))],4)))),128))])],6)],4))}});const bd=(0,Vl.Z)(kd,[["__scopeId","data-v-5d949d4d"]]);var _d=bd;const Id={class:"element-content"};var Sd=(0,i.aZ)({__name:"BaseTableElement",props:{elementInfo:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-table",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",Id,[(0,i.Wm)(_d,{data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme},null,8,["data","width","cellMinHeight","colWidths","outline","theme"])])],4)],4))}});const Cd=(0,Vl.Z)(Sd,[["__scopeId","data-v-3eff7eba"]]);var Ld=Cd;const Td={class:"element-content"},Ed=["width","height","stroke","stroke-width"],Md=["transform"],Ud=["d"];var Wd=(0,i.aZ)({__name:"BaseLatexElement",props:{elementInfo:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-latex",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",Td,[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[(0,i._)("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{d:e.elementInfo.path},null,8,Ud)],8,Md)],8,Ed))])],4)],4))}});const Dd=(0,Vl.Z)(Wd,[["__scopeId","data-v-1587280d"]]);var Hd=Dd,Fd=(0,i.aZ)({__name:"BaseVideoElement",props:{elementInfo:{}},setup(e){return(e,t)=>{const l=(0,i.up)("IconPlayOne");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-video",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,oe.j5)({backgroundImage:e.elementInfo.poster?`url(${e.elementInfo.poster})`:""})},[(0,i.Wm)(l,{class:"icon"})],4)],4)],4)}}});const Ad=(0,Vl.Z)(Fd,[["__scopeId","data-v-09436dde"]]);var $d=Ad;const Zd={class:"element-content"};var Od=(0,i.aZ)({__name:"BaseAudioElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"));return(e,t)=>{const a=(0,i.up)("IconVolumeNotice");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-audio",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",Zd,[(0,i.Wm)(a,{class:"audio-icon",style:(0,oe.j5)({fontSize:l.value,color:e.elementInfo.color})},null,8,["style"])])],4)],4)}}});const Rd=(0,Vl.Z)(Od,[["__scopeId","data-v-5da834d7"]]);var zd=Rd,Pd=(0,i.aZ)({__name:"ThumbnailElement",props:{elementInfo:{},elementIndex:{}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[sa.IMAGE]:Gc,[sa.TEXT]:td,[sa.SHAPE]:ud,[sa.LINE]:md,[sa.CHART]:gd,[sa.TABLE]:Ld,[sa.LATEX]:Hd,[sa.VIDEO]:$d,[sa.AUDIO]:zd};return e[t.elementInfo.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["base-element",`base-element-${e.elementInfo.id}`]),style:(0,oe.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,target:"thumbnail"},null,8,["elementInfo"]))],6))}});const Bd=Pd;var Nd=Bd;const jd={key:1,class:"placeholder"};var Yd=(0,i.aZ)({__name:"index",props:{slide:{},size:{},visible:{type:Boolean,default:!0}},setup(e){const t=e,{viewportRatio:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.slide.background)),{backgroundStyle:n}=yu(a),r=(0,i.Fl)((()=>t.size/oa));return(0,i.JJ)(Tn,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"thumbnail-slide",style:(0,oe.j5)({width:e.size+"px",height:e.size*(0,s.SU)(l)+"px"})},[e.visible?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"elements",style:(0,oe.j5)({width:(0,s.SU)(oa)+"px",height:(0,s.SU)(oa)*(0,s.SU)(l)+"px",transform:`scale(${r.value})`})},[(0,i._)("div",{class:"background",style:(0,oe.j5)((0,s.SU)(n))},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.slide.elements,((e,t)=>((0,i.wg)(),(0,i.j4)(Nd,{key:e.id,elementInfo:e,elementIndex:t+1},null,8,["elementInfo","elementIndex"])))),128))],4)):((0,i.wg)(),(0,i.iD)("div",jd,"加载中 ..."))],4))}});const Vd=(0,Vl.Z)(Yd,[["__scopeId","data-v-43dcaa52"]]);var Jd=Vd;const qd=["onClick"];var Xd=(0,i.aZ)({__name:"Tabs",props:{value:{},tabs:{},card:{type:Boolean,default:!1},tabsStyle:{},tabStyle:{},spaceAround:{type:Boolean,default:!1},spaceBetween:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=t;return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["tabs",{card:e.card,"space-around":e.spaceAround,"space-between":e.spaceBetween}]),style:(0,oe.j5)(e.tabsStyle||{})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.tabs,(t=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["tab",{active:t.key===e.value}]),key:t.key,style:(0,oe.j5)({...e.tabStyle||{},"--color":t.color}),onClick:e=>l("update:value",t.key)},(0,oe.zw)(t.label),15,qd)))),128))],6))}});const Gd=(0,Vl.Z)(Xd,[["__scopeId","data-v-5e3d7626"]]);var Kd=Gd,Qd=(0,i.aZ)({__name:"Button",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{default:"default"},size:{default:"normal"},first:{type:Boolean,default:!1},last:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const l=e,a=t,n=()=>{l.disabled||a("click")};return(e,t)=>((0,i.wg)(),(0,i.iD)("button",{class:(0,oe.C_)(["button",{disabled:e.disabled,checked:!e.disabled&&e.checked,default:!e.disabled&&"default"===e.type,primary:!e.disabled&&"primary"===e.type,checkbox:!e.disabled&&"checkbox"===e.type,radio:!e.disabled&&"radio"===e.type,small:"small"===e.size,first:e.first,last:e.last}]),onClick:t[0]||(t[0]=e=>n())},[(0,i.WI)(e.$slots,"default")],2))}});const ep=(0,Vl.Z)(Qd,[["__scopeId","data-v-52c90330"]]);var tp=ep;const lp={key:0,class:"select-wrap"},ap={class:"selector"},np={class:"icon"},op=["onClick"],ip={class:"selector"},sp={class:"icon"};var rp=(0,i.aZ)({__name:"Select",props:{value:{},options:{},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>l.options.find((e=>e.value===l.value))?.label||l.value)),n=t,o=(0,s.iH)(!1),r=(0,s.iH)(),u=(0,s.iH)(0),c=()=>{r.value&&(u.value=r.value.clientWidth)},d=new ResizeObserver(c);(0,i.bv)((()=>{r.value&&d.observe(r.value)})),(0,i.Ah)((()=>{r.value&&d.unobserve(r.value)}));const p=e=>{e.disabled||(n("update:value",e.value),o.value=!1)};return(e,t)=>{const l=(0,i.up)("IconDown");return e.disabled?((0,i.wg)(),(0,i.iD)("div",lp,[(0,i._)("div",{class:"select disabled",ref_key:"selectRef",ref:r},[(0,i._)("div",ap,(0,oe.zw)(e.value),1),(0,i._)("div",np,[(0,i.WI)(e.$slots,"icon",{},(()=>[(0,i.Wm)(l,{size:14})]))])],512)])):((0,i.wg)(),(0,i.j4)(dn,{key:1,class:"select-wrap",trigger:"click",value:o.value,"onUpdate:value":t[0]||(t[0]=e=>o.value=e),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:(0,i.w5)((()=>[(0,i._)("div",{class:"options",style:(0,oe.j5)({width:u.value+2+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.options,(t=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["option",{disabled:t.disabled,selected:t.value===e.value}]),key:t.value,onClick:e=>p(t)},(0,oe.zw)(t.label),11,op)))),128))],4)])),default:(0,i.w5)((()=>[(0,i._)("div",{class:"select",ref_key:"selectRef",ref:r},[(0,i._)("div",ip,(0,oe.zw)(a.value),1),(0,i._)("div",sp,[(0,i.WI)(e.$slots,"icon",{},(()=>[(0,i.Wm)(l,{size:14})]))])],512)])),_:3},8,["value","contentStyle"]))}}});const up=(0,Vl.Z)(rp,[["__scopeId","data-v-5bf3b141"]]);var cp=up;const dp=e=>((0,i.dD)("data-v-cc39ee16"),e=e(),(0,i.Cn)(),e),pp={class:"link-dialog"},vp={key:2,class:"preview"},mp=dp((()=>(0,i._)("div",null,"预览:",-1))),hp={class:"btns"};var fp=(0,i.aZ)({__name:"LinkDialog",emits:["close"],setup(e,{emit:t}){const l=t,{handleElement:a}=(0,o.Jk)(R()),{slides:n,currentSlide:r}=(0,o.Jk)($()),u=(0,s.iH)("web"),c=(0,s.iH)(""),d=(0,s.iH)(""),p=(0,i.Fl)((()=>n.value.map(((e,t)=>({label:`幻灯片 ${t+1}`,value:e.id,disabled:r.value.id===e.id})))));d.value=n.value.find((e=>e.id!==r.value.id))?.id||"";const v=(0,i.Fl)((()=>d.value&&n.value.find((e=>e.id===d.value))||null)),m=[{key:"web",label:"网页链接"},{key:"slide",label:"幻灯片页面"}],{setLink:h}=Fc();(0,i.bv)((()=>{a.value?.link&&("web"===a.value.link.type?c.value=a.value.link.target:"slide"===a.value.link.type&&(d.value=a.value.link.target),u.value=a.value.link.type)}));const f=()=>{const e={type:u.value,target:"web"===u.value?c.value:d.value};if(a.value){const t=h(a.value,e);t?l("close"):c.value=""}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",pp,[(0,i.Wm)(Kd,{tabs:m,value:u.value,"onUpdate:value":t[0]||(t[0]=e=>u.value=e),tabsStyle:{marginBottom:"20px"}},null,8,["value"]),"web"===u.value?((0,i.wg)(),(0,i.j4)(sn,{key:0,class:"input",value:c.value,"onUpdate:value":t[1]||(t[1]=e=>c.value=e),placeholder:"请输入网页链接地址"},null,8,["value"])):(0,i.kq)("",!0),"slide"===u.value?((0,i.wg)(),(0,i.j4)(cp,{key:1,class:"input",value:d.value,"onUpdate:value":t[2]||(t[2]=e=>d.value=e),options:p.value},null,8,["value","options"])):(0,i.kq)("",!0),"slide"===u.value&&v.value?((0,i.wg)(),(0,i.iD)("div",vp,[mp,(0,i.Wm)(Jd,{class:"thumbnail",slide:v.value,size:500},null,8,["slide"])])):(0,i.kq)("",!0),(0,i._)("div",hp,[(0,i.Wm)(tp,{onClick:t[3]||(t[3]=e=>l("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{type:"primary",onClick:t[4]||(t[4]=e=>f())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])]))}});const gp=(0,Vl.Z)(fp,[["__scopeId","data-v-cc39ee16"]]);var yp=gp,wp=(0,i.aZ)({__name:"Modal",props:{visible:{type:Boolean},width:{default:480},closeButton:{type:Boolean,default:!1},closeOnClickMask:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},contentStyle:{}},emits:["update:visible","closed"],setup(e,{emit:t}){const{IconClose:l}=Zl,a=e,o=(0,s.iH)(),r=t,u=(0,s.iH)(!1),c=(0,i.Fl)((()=>({width:a.width+"px",...a.contentStyle||{}})));(0,i.YP)((()=>a.visible),(()=>{a.visible&&(0,i.Y3)((()=>o.value.focus()))}));const d=()=>{r("update:visible",!1),r("closed")},p=()=>{a.visible&&a.closeOnEsc&&d()},v=()=>{a.closeOnClickMask&&d()};return(e,t)=>((0,i.wg)(),(0,i.j4)(i.lR,{to:"body"},[(0,i.Wm)(n.uT,{name:"modal-fade"},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:"modal",ref_key:"modalRef",ref:o,tabindex:"-1",onKeyup:t[4]||(t[4]=(0,n.D2)((e=>p()),["esc"]))},[(0,i._)("div",{class:"mask",onClick:t[0]||(t[0]=e=>v())}),(0,i.Wm)(n.uT,{name:"modal-zoom",onAfterLeave:t[2]||(t[2]=e=>u.value=!1),onBeforeEnter:t[3]||(t[3]=e=>u.value=!0)},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:"modal-content",style:(0,oe.j5)(c.value)},[e.closeButton?((0,i.wg)(),(0,i.iD)("span",{key:0,class:"close-btn",onClick:t[1]||(t[1]=e=>d())},[(0,i.Wm)((0,s.SU)(l))])):(0,i.kq)("",!0),u.value?(0,i.WI)(e.$slots,"default",{key:1}):(0,i.kq)("",!0)],4),[[n.F8,e.visible]])])),_:3})],544),[[n.F8,e.visible]])])),_:3})]))}});const xp=(0,Vl.Z)(wp,[["__scopeId","data-v-fea8edcc"]]);var kp=xp;const bp={class:"operates"},_p={key:2,class:"drag-mask"};var Ip=(0,i.aZ)({__name:"index",setup(e){const t=R(),{activeElementIdList:l,activeGroupElementId:a,handleElementId:r,hiddenElementIdList:u,editorAreaFocus:c,gridLineSize:d,showRuler:p,creatingElement:v,creatingCustomShape:m,canvasScale:h,textFormatPainter:f}=(0,o.Jk)(t),{currentSlide:g}=(0,o.Jk)($()),{ctrlKeyState:y,spaceKeyState:w}=(0,o.Jk)(q()),x=(0,s.iH)(),k=(0,s.iH)([]),b=(0,s.iH)(!1),_=()=>b.value=!0;(0,i.YP)(r,(()=>{t.setActiveGroupElementId("")}));const I=(0,s.iH)([]),S=()=>{I.value=g.value?JSON.parse(JSON.stringify(g.value.elements)):[]};(0,i.m0)(S);const C=(0,s.iH)(),{dragViewport:L,viewportStyles:T}=Wn(C);Hn(C);const{mouseSelection:E,mouseSelectionVisible:M,mouseSelectionQuadrant:U,updateMouseSelection:W}=Dn(I,x),{dragElement:H}=jn(I,k,h),{dragLineElement:F}=Yn(I),{selectElement:A}=Nn(I,H),{scaleElement:Z,scaleMultiElement:O}=Bn(I,k,h),{rotateElement:z}=An(I,x,h),{moveShapeKeypoint:P}=Vn(I,h),{selectAllElement:B}=xa(),{deleteAllElements:N}=ga(),{pasteElement:j}=wa(),{enterScreeningFromStart:Y}=Ca(),{updateSlideIndex:V}=ha(),{createTextElement:J,createShapeElement:X}=pa();(0,i.bv)((()=>{l.value.length&&(0,i.Y3)((()=>t.setActiveElementIdList([])))}));const G=e=>{l.value.length&&t.setActiveElementIdList([]),w.value?L(e):W(e),c.value||t.setEditorareaFocus(!0),f.value&&t.setTextFormatPainter(null),Un()},K=e=>{if(l.value.length||v.value||m.value)return;if(!x.value)return;const t=x.value.getBoundingClientRect(),a=(e.pageX-t.x)/h.value,n=(e.pageY-t.y)/h.value;J({left:a,top:n,width:200/h.value,height:0})};(0,i.Ah)((()=>{f.value&&t.setTextFormatPainter(null)}));const Q=()=>{c.value&&t.setEditorareaFocus(!1)},{scaleCanvas:ee}=La(),te=(0,D.throttle)(ee,100,{leading:!0,trailing:!1}),le=(0,D.throttle)(V,300,{leading:!0,trailing:!1}),ae=e=>{e.preventDefault(),y.value?e.deltaY>0?te("-"):e.deltaY<0&&te("+"):e.deltaY>0?le(ne.DOWN):e.deltaY<0&&le(ne.UP)},ie=()=>{t.setRulerState(!p.value)},{insertElementFromCreateSelection:se,formatCreateSelection:re}=Jn(x),ue=e=>{const{start:l,end:a,path:n,viewBox:o}=e,i=re({start:l,end:a});i&&X(i,{path:n,viewBox:o}),t.setCreatingCustomShapeState(!1)},ce=()=>[{text:"粘贴",subText:"Ctrl + V",handler:j},{text:"全选",subText:"Ctrl + A",handler:B},{text:"标尺",subText:p.value?"√":"",handler:ie},{text:"网格线",handler:()=>t.setGridLineSize(d.value?0:50),children:[{text:"无",subText:0===d.value?"√":"",handler:()=>t.setGridLineSize(0)},{text:"小",subText:25===d.value?"√":"",handler:()=>t.setGridLineSize(25)},{text:"中",subText:50===d.value?"√":"",handler:()=>t.setGridLineSize(50)},{text:"大",subText:100===d.value?"√":"",handler:()=>t.setGridLineSize(100)}]},{text:"重置当前页",handler:N},{divider:!0},{text:"幻灯片放映",subText:"F5",handler:Y}];return(0,i.JJ)(Tn,h),(e,t)=>{const o=(0,i.Q2)("contextmenu"),c=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"canvas",ref_key:"canvasRef",ref:C,onWheel:t[4]||(t[4]=e=>ae(e)),onMousedown:t[5]||(t[5]=e=>G(e)),onDblclick:t[6]||(t[6]=e=>K(e))},[(0,s.SU)(v)?((0,i.wg)(),(0,i.j4)(Du,{key:0,onCreated:t[0]||(t[0]=e=>(0,s.SU)(se)(e))})):(0,i.kq)("",!0),(0,s.SU)(m)?((0,i.wg)(),(0,i.j4)(Zu,{key:1,onCreated:t[1]||(t[1]=e=>ue(e))})):(0,i.kq)("",!0),(0,i._)("div",{class:"viewport-wrapper",style:(0,oe.j5)({width:(0,s.SU)(T).width*(0,s.SU)(h)+"px",height:(0,s.SU)(T).height*(0,s.SU)(h)+"px",left:(0,s.SU)(T).left+"px",top:(0,s.SU)(T).top+"px"})},[(0,i._)("div",bp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(k.value,((e,t)=>((0,i.wg)(),(0,i.j4)(Iu,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:(0,s.SU)(h)},null,8,["type","axis","length","canvasScale"])))),128)),(0,s.SU)(l).length>1?((0,i.wg)(),(0,i.j4)(Ju,{key:0,elementList:I.value,scaleMultiElement:(0,s.SU)(O)},null,8,["elementList","scaleMultiElement"])):(0,i.kq)("",!0),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(I.value,(e=>(0,i.wy)(((0,i.wg)(),(0,i.j4)(Vc,{key:e.id,elementInfo:e,isSelected:(0,s.SU)(l).includes(e.id),isActive:(0,s.SU)(r)===e.id,isActiveGroupElement:(0,s.SU)(a)===e.id,isMultiSelect:(0,s.SU)(l).length>1,rotateElement:(0,s.SU)(z),scaleElement:(0,s.SU)(Z),openLinkDialog:_,dragLineElement:(0,s.SU)(F),moveShapeKeypoint:(0,s.SU)(P)},null,8,["elementInfo","isSelected","isActive","isActiveGroupElement","isMultiSelect","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])),[[n.F8,!(0,s.SU)(u).includes(e.id)]]))),128)),(0,i.Wm)(ku)]),(0,i._)("div",{class:"viewport",ref_key:"viewportRef",ref:x,style:(0,oe.j5)({transform:`scale(${(0,s.SU)(h)})`})},[(0,s.SU)(M)?((0,i.wg)(),(0,i.j4)(pu,{key:0,top:(0,s.SU)(E).top,left:(0,s.SU)(E).left,width:(0,s.SU)(E).width,height:(0,s.SU)(E).height,quadrant:(0,s.SU)(U)},null,8,["top","left","width","height","quadrant"])):(0,i.kq)("",!0),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(I.value,((e,t)=>(0,i.wy)(((0,i.wg)(),(0,i.j4)(uu,{key:e.id,elementInfo:e,elementIndex:t+1,isMultiSelect:(0,s.SU)(l).length>1,selectElement:(0,s.SU)(A),openLinkDialog:_},null,8,["elementInfo","elementIndex","isMultiSelect","selectElement"])),[[n.F8,!(0,s.SU)(u).includes(e.id)]]))),128))],4)],4),(0,s.SU)(w)?((0,i.wg)(),(0,i.iD)("div",_p)):(0,i.kq)("",!0),(0,s.SU)(p)?((0,i.wg)(),(0,i.j4)(Tu,{key:3,viewportStyles:(0,s.SU)(T)},null,8,["viewportStyles"])):(0,i.kq)("",!0),(0,i.Wm)(kp,{visible:b.value,"onUpdate:visible":t[3]||(t[3]=e=>b.value=e),width:540},{default:(0,i.w5)((()=>[(0,i.Wm)(yp,{onClose:t[2]||(t[2]=e=>b.value=!1)})])),_:1},8,["visible"])],32)),[[o,ce],[c,Q]])}}});const Sp=(0,Vl.Z)(Ip,[["__scopeId","data-v-ce64755c"]]);var Cp=Sp;const Lp={class:"shape-item-thumbnail"},Tp={class:"shape-content"},Ep={overflow:"visible",width:"18",height:"18"},Mp=["transform"],Up=["fill","stroke","d"];var Wp=(0,i.aZ)({__name:"ShapeItemThumbnail",props:{shape:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Lp,[(0,i._)("div",Tp,[((0,i.wg)(),(0,i.iD)("svg",Ep,[(0,i._)("g",{transform:`scale(${18/e.shape.viewBox[0]}, ${18/e.shape.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{class:(0,oe.C_)(["shape-path",{outlined:e.shape.outlined}]),"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:e.shape.outlined?"#999":"transparent",stroke:e.shape.outlined?"transparent":"#999","stroke-width":"2",d:e.shape.path},null,10,Up)],8,Mp)]))])]))}});const Dp=(0,Vl.Z)(Wp,[["__scopeId","data-v-8603ad34"]]);var Hp=Dp;const Fp={class:"shape-pool"},Ap={class:"category-name"},$p={class:"shape-list"};var Zp=(0,i.aZ)({__name:"ShapePool",emits:["select"],setup(e,{emit:t}){const l=t,a=e=>{l("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Fp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ua),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",Ap,(0,oe.zw)(e.type),1),(0,i._)("div",$p,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,t)=>((0,i.wg)(),(0,i.j4)(Hp,{class:"shape-item",key:t,shape:e,onClick:t=>a(e)},null,8,["shape","onClick"])))),128))])])))),128))]))}});const Op=(0,Vl.Z)(Zp,[["__scopeId","data-v-8b994b42"]]);var Rp=Op;const zp=[{type:"直线",children:[{path:"M 0 0 L 20 20",style:"solid",points:["",""]},{path:"M 0 0 L 20 20",style:"dashed",points:["",""]},{path:"M 0 0 L 20 20",style:"solid",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"dashed",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"solid",points:["","dot"]}]},{type:"折线、曲线",children:[{path:"M 0 0 L 0 20 L 20 20",style:"solid",points:["","arrow"],isBroken:!0},{path:"M 0 0 Q 0 20 20 20",style:"solid",points:["","arrow"],isCurve:!0},{path:"M 0 0 C 20 0 0 20 20 20",style:"solid",points:["","arrow"],isCubic:!0}]}],Pp={class:"line-pool"},Bp={class:"category-name"},Np={class:"line-list"},jp=["onClick"],Yp={overflow:"visible",width:"20",height:"20"},Vp=["d","stroke-dasharray","marker-start","marker-end"];var Jp=(0,i.aZ)({__name:"LinePool",emits:["select"],setup(e,{emit:t}){const l=t,a=e=>{l("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Pp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(zp),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",Bp,(0,oe.zw)(e.type),1),(0,i._)("div",Np,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"line-item",key:l},[(0,i._)("div",{class:"line-content",onClick:t=>a(e)},[((0,i.wg)(),(0,i.iD)("svg",Yp,[(0,i._)("defs",null,[e.points[0]?((0,i.wg)(),(0,i.j4)(_s,{key:0,class:"line-marker",id:`preset-line-${t}-${l}`,position:"start",type:e.points[0],color:"currentColor",baseSize:2},null,8,["id","type"])):(0,i.kq)("",!0),e.points[1]?((0,i.wg)(),(0,i.j4)(_s,{key:1,class:"line-marker",id:`preset-line-${t}-${l}`,position:"end",type:e.points[1],color:"currentColor",baseSize:2},null,8,["id","type"])):(0,i.kq)("",!0)]),(0,i._)("path",{class:"line-path",d:e.path,stroke:"currentColor",fill:"none","stroke-width":"2","stroke-dasharray":"solid"===e.style?"0, 0":"4, 1","marker-start":e.points[0]?`url(#preset-line-${t}-${l}-${e.points[0]}-start)`:"","marker-end":e.points[1]?`url(#preset-line-${t}-${l}-${e.points[1]}-end)`:""},null,8,Vp)]))],8,jp)])))),128))])])))),128))]))}});const qp=(0,Vl.Z)(Jp,[["__scopeId","data-v-554824b6"]]);var Xp=qp;const Gp={class:"chart-pool"},Kp=["onClick"];var Qp=(0,i.aZ)({__name:"ChartPool",emits:["select"],setup(e,{emit:t}){const l=t,a=["bar","horizontalBar","line","area","scatter","pie","ring"],n=e=>{l("select",e)};return(e,t)=>{const l=(0,i.up)("IconChartLine"),o=(0,i.up)("IconChartHistogram"),s=(0,i.up)("IconChartPie"),r=(0,i.up)("IconChartHistogramOne"),u=(0,i.up)("IconChartLineArea"),c=(0,i.up)("IconChartRing"),d=(0,i.up)("IconChartScatter");return(0,i.wg)(),(0,i.iD)("ul",Gp,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(a,((e,t)=>(0,i._)("li",{class:"chart-item",key:t},[(0,i._)("div",{class:"chart-content",onClick:t=>n(e)},["line"===e?((0,i.wg)(),(0,i.j4)(l,{key:0,size:"24"})):"bar"===e?((0,i.wg)(),(0,i.j4)(o,{key:1,size:"24"})):"pie"===e?((0,i.wg)(),(0,i.j4)(s,{key:2,size:"24"})):"horizontalBar"===e?((0,i.wg)(),(0,i.j4)(r,{key:3,size:"24"})):"area"===e?((0,i.wg)(),(0,i.j4)(u,{key:4,size:"24"})):"ring"===e?((0,i.wg)(),(0,i.j4)(c,{key:5,size:"24"})):"scatter"===e?((0,i.wg)(),(0,i.j4)(d,{key:6,size:"24"})):(0,i.kq)("",!0)],8,Kp)]))),64))])}}});const ev=(0,Vl.Z)(Qp,[["__scopeId","data-v-398f5699"]]);var tv=ev;const lv=e=>((0,i.dD)("data-v-268948c2"),e=e(),(0,i.Cn)(),e),av={class:"prefix"},nv={class:"input-wrap"},ov=["disabled","placeholder"],iv={class:"handlers"},sv=lv((()=>(0,i._)("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[(0,i._)("path",{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"})],-1))),rv=[sv],uv=lv((()=>(0,i._)("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[(0,i._)("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})],-1))),cv=[uv],dv={class:"suffix"};var pv=(0,i.aZ)({__name:"NumberInput",props:{value:{},disabled:{type:Boolean,default:!1},placeholder:{default:""},min:{default:0},max:{default:1/0},step:{default:1}},emits:["update:value","input","change","blur","focus","enter"],setup(e,{emit:t}){const l=e,a=t,o=(0,s.iH)(0),r=(0,s.iH)(!1);(0,i.YP)((()=>l.value),(()=>{l.value!==o.value&&(o.value=l.value)}),{immediate:!0}),(0,i.YP)(o,(()=>{let e=+o.value;isNaN(e)?e=l.min:e>l.max?e=l.max:e{r.value=!1,a("blur",e)},c=e=>{r.value=!0,a("focus",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["number-input",{disabled:e.disabled,focused:r.value}])},[(0,i._)("span",av,[(0,i.WI)(e.$slots,"prefix")]),(0,i._)("div",nv,[(0,i.wy)((0,i._)("input",{type:"text",disabled:e.disabled,"onUpdate:modelValue":t[0]||(t[0]=e=>o.value=e),placeholder:e.placeholder,onInput:t[1]||(t[1]=e=>a("input",e)),onFocus:t[2]||(t[2]=e=>c(e)),onBlur:t[3]||(t[3]=e=>u(e)),onChange:t[4]||(t[4]=e=>a("change",e)),onKeydown:t[5]||(t[5]=(0,n.D2)((e=>a("enter",e)),["enter"]))},null,40,ov),[[n.nr,o.value]]),(0,i._)("div",iv,[(0,i._)("span",{class:"handler",onClick:t[6]||(t[6]=t=>o.value+=e.step)},rv),(0,i._)("span",{class:"handler",onClick:t[7]||(t[7]=t=>o.value-=e.step)},cv)])]),(0,i._)("span",dv,[(0,i.WI)(e.$slots,"suffix")])],2))}});const vv=(0,Vl.Z)(pv,[["__scopeId","data-v-268948c2"]]);var mv=vv;const hv=e=>((0,i.dD)("data-v-372c6730"),e=e(),(0,i.Cn)(),e),fv={class:"table-generator"},gv={class:"title"},yv={class:"lef"},wv=["onMouseenter"],xv={key:1,class:"custom"},kv={class:"row"},bv=hv((()=>(0,i._)("div",{class:"label",style:{width:"25%"}},"行数:",-1))),_v={class:"row"},Iv=hv((()=>(0,i._)("div",{class:"label",style:{width:"25%"}},"列数:",-1))),Sv={class:"btns"};var Cv=(0,i.aZ)({__name:"TableGenerator",emits:["insert","close"],setup(e,{emit:t}){const l=t,a=(0,s.iH)([]),n=(0,s.iH)(3),o=(0,s.iH)(3),r=(0,s.iH)(!1),u=()=>{if(!a.value.length)return;const[e,t]=a.value;l("insert",{row:e,col:t})},c=()=>n.value<1||n.value>20||o.value<1||o.value>20?ta.warning("行数/列数必须在0~20之间!"):(l("insert",{row:n.value,col:o.value}),void(r.value=!1)),d=()=>{l("close"),r.value=!1};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",fv,[(0,i._)("div",gv,[(0,i._)("div",yv,"表格 "+(0,oe.zw)(a.value.length?`${a.value[0]} x ${a.value[1]}`:""),1),(0,i._)("div",{class:"right",onClick:t[0]||(t[0]=e=>r.value=!r.value)},(0,oe.zw)(r.value?"返回":"自定义"),1)]),r.value?((0,i.wg)(),(0,i.iD)("div",xv,[(0,i._)("div",kv,[bv,(0,i.Wm)(mv,{min:1,max:20,value:n.value,"onUpdate:value":t[3]||(t[3]=e=>n.value=e),style:{width:"75%"}},null,8,["value"])]),(0,i._)("div",_v,[Iv,(0,i.Wm)(mv,{min:1,max:20,value:o.value,"onUpdate:value":t[4]||(t[4]=e=>o.value=e),style:{width:"75%"}},null,8,["value"])]),(0,i._)("div",Sv,[(0,i.Wm)(tp,{class:"btn",onClick:t[5]||(t[5]=e=>d())},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{class:"btn",type:"primary",onClick:t[6]||(t[6]=e=>c())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])):((0,i.wg)(),(0,i.iD)("table",{key:0,onMouseleave:t[1]||(t[1]=e=>a.value=[]),onClick:t[2]||(t[2]=e=>u())},[(0,i._)("tbody",null,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(10,(e=>(0,i._)("tr",{key:e},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(10,(t=>(0,i._)("td",{onMouseenter:l=>a.value=[e,t],key:t},[(0,i._)("div",{class:(0,oe.C_)(["cell",{active:a.value.length&&e<=a.value[0]&&t<=a.value[1]}])},null,2)],40,wv))),64))]))),64))])],32))]))}});const Lv=(0,Vl.Z)(Cv,[["__scopeId","data-v-372c6730"]]);var Tv=Lv;const Ev={class:"media-input"},Mv={class:"btns"},Uv={class:"btns"};var Wv=(0,i.aZ)({__name:"MediaInput",emits:["insertVideo","insertAudio","close"],setup(e,{emit:t}){const l=t,a=(0,s.iH)("video"),n=(0,s.iH)("https://mazwai.com/videvo_files/video/free/2019-01/small_watermarked/181004_04_Dolphins-Whale_06_preview.webm"),o=(0,s.iH)("https://freesound.org/data/previews/614/614107_11861866-lq.mp3"),r=[{key:"video",label:"视频"},{key:"audio",label:"音频"}],u=()=>{if(!n.value)return ta.error("请先输入正确的视频地址");l("insertVideo",n.value)},c=()=>{if(!o.value)return ta.error("请先输入正确的音频地址");l("insertAudio",o.value)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ev,[(0,i.Wm)(Kd,{tabs:r,value:a.value,"onUpdate:value":t[0]||(t[0]=e=>a.value=e),tabsStyle:{marginBottom:"15px"}},null,8,["value"]),"video"===a.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i.Wm)(sn,{value:n.value,"onUpdate:value":t[1]||(t[1]=e=>n.value=e),placeholder:"请输入视频地址,e.g. https://xxx.mp4"},null,8,["value"]),(0,i._)("div",Mv,[(0,i.Wm)(tp,{onClick:t[2]||(t[2]=e=>l("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{type:"primary",onClick:t[3]||(t[3]=e=>u())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])],64)):(0,i.kq)("",!0),"audio"===a.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(sn,{value:o.value,"onUpdate:value":t[4]||(t[4]=e=>o.value=e),placeholder:"请输入音频地址,e.g. https://xxx.mp3"},null,8,["value"]),(0,i._)("div",Uv,[(0,i.Wm)(tp,{onClick:t[5]||(t[5]=e=>l("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{type:"primary",onClick:t[6]||(t[6]=e=>c())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])],64)):(0,i.kq)("",!0)]))}});const Dv=(0,Vl.Z)(Wv,[["__scopeId","data-v-35a1214c"]]);var Hv=Dv,Fv=l(3576);Fv.kh.SUB_SUP_SCALE=.5;const Av=[{label:"高斯公式",latex:"\\int\\int\\int _ { \\Omega } \\left( \\frac { \\partial {P} } { \\partial {x} } + \\frac { \\partial {Q} } { \\partial {y} } + \\frac { \\partial {R} }{ \\partial {z} } \\right) \\mathrm { d } V = \\oint _ { \\partial \\Omega } ( P \\cos \\alpha + Q \\cos \\beta + R \\cos \\gamma ) \\mathrm{ d} S"},{label:"傅里叶级数",latex:"f(x) = \\frac {a_0} 2 + \\sum_{n = 1}^\\infty {({a_n}\\cos {nx} + {b_n}\\sin {nx})}"},{label:"泰勒展开式",latex:"e ^ { x } = 1 + \\frac { x } { 1 ! } + \\frac { x ^ { 2 } } { 2 ! } + \\frac { x ^ { 3 } } { 3 ! } + ... , \\quad - \\infty < x < \\infty"},{label:"定积分",latex:"\\lim_ { n \\rightarrow + \\infty } \\sum _ { i = 1 } ^ { n } f \\left[ a + \\frac { i } { n } ( b - a ) \\right] \\frac { b - a } { n } = \\int _ { a } ^ { b } f ( x ) dx"},{label:"三角恒等式1",latex:"\\sin \\alpha \\pm \\sin \\beta = 2 \\sin \\frac { 1 } { 2 } ( \\alpha \\pm \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha \\mp \\beta )"},{label:"三角恒等式2",latex:"\\cos \\alpha + \\cos \\beta = 2 \\cos \\frac { 1 } { 2 } ( \\alpha + \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha - \\beta )"},{label:"和的展开式",latex:"( 1 + x ) ^ { n } = 1 + \\frac { n x } { 1 ! } + \\frac { n ( n - 1 ) x ^ { 2 } } { 2 ! } + ..."},{label:"欧拉公式",latex:" e^{ix} = \\cos {x} + i\\sin {x}"},{label:"贝努利方程",latex:"\\frac {dy} {dx} + P(x)y = Q(x) y^n ({n} \\not= {0,1})"},{label:"全微分方程",latex:"du(x,y) = P(x,y)dx + Q(x,y)dy = 0"},{label:"非齐次方程",latex:"y = (\\int Q(x) e^{\\int {P(x)dx}}dx + C)e^{-\\int {P(x)dx}}"},{label:"柯西中值定理",latex:"\\frac{{f(b) - f(a)}}{{F(b) - F(a)}} = \\frac{{f'(\\xi )}}{{F'(\\xi )}}"},{label:"拉格朗日中值定理",latex:"f(b) - f(a) = f'(\\xi )(b - a)"},{label:"导数公式",latex:"(\\arcsin x)' = \\frac{1}{{\\sqrt {1 - x^2} }}"},{label:"三角函数积分",latex:"\\int {tgxdx = - \\ln \\left| {\\cos x} \\right| + C}"},{label:"二次曲面",latex:"\\frac{{{x^2}}}{{{a^2}}} + \\frac{{{y^2}}}{{{b^2}}} - \\frac{{{z^2}}}{{{c^2}}} = 1"},{label:"二阶微分",latex:"\\frac {{d^2}y} {dx^2} + P(x) \\frac {dy} {dx} + Q(x)y = f(x)"},{label:"方向导数",latex:"\\frac{{\\partial f}}{{\\partial l}} = \\frac{{\\partial f}}{{\\partial x}}\\cos \\phi + \\frac{{\\partial f}}{{\\partial y}}\\sin \\phi"}],$v=[{type:"operators",label:"数学",children:[{latex:"\\cdot"},{latex:"\\pm"},{latex:"\\mp"},{latex:"+"},{latex:"-"},{latex:"\\times"},{latex:"\\div"},{latex:"<"},{latex:">"},{latex:"="},{latex:"\\neq\\ne"},{latex:"\\leqq"},{latex:"\\geqq"},{latex:"\\leq"},{latex:"\\geq"},{latex:"\\propto"},{latex:"\\sim"},{latex:"\\equiv"},{latex:"\\dagger"},{latex:"\\ddagger"},{latex:"\\ell"},{latex:"\\#"},{latex:"\\$"},{latex:"\\&"},{latex:"\\%"},{latex:"\\langle\\rangle"},{latex:"()"},{latex:"[]"},{latex:"\\{\\}"},{latex:"||"},{latex:"\\|"},{latex:"\\exists"},{latex:"\\in"},{latex:"\\subset"},{latex:"\\supset"},{latex:"\\cup"},{latex:"\\cap"},{latex:"\\infty"},{latex:"\\partial"},{latex:"\\nabla"},{latex:"\\aleph"},{latex:"\\wp"},{latex:"\\therefore"},{latex:"\\mid"},{latex:"\\sum"},{latex:"\\prod"},{latex:"\\bigoplus"},{latex:"\\bigodot"},{latex:"\\int"},{latex:"\\oint"},{latex:"\\oplus"},{latex:"\\odot"},{latex:"\\perp"},{latex:"\\angle"},{latex:"\\triangle"},{latex:"\\Box"},{latex:"\\rightarrow"},{latex:"\\to"},{latex:"\\leftarrow"},{latex:"\\gets"},{latex:"\\circ"},{latex:"\\bigcirc"},{latex:"\\bullet"},{latex:"\\star"},{latex:"\\diamond"},{latex:"\\ast"},{latex:","},{latex:"."},{latex:";"},{latex:"!"}]},{type:"group",label:"组合",children:[{latex:"\\frac{a}{b}"},{latex:"\\frac{dx}{dx}"},{latex:"\\frac{\\partial a}{\\partial b}"},{latex:"\\sqrt{x}"},{latex:"\\sqrt[n]{x}"},{latex:"x^{n}"},{latex:"x_{n}"},{latex:"x_a^b"},{latex:"\\int_{a}^{b}"},{latex:"\\oint_a^b"},{latex:"\\lim_{a \\rightarrow b}"},{latex:"\\prod_a^b"},{latex:"\\sum_a^b"},{latex:"\\left(\\begin{array}a \\\\ b\\end{array}\\right)"},{latex:"\\begin{bmatrix}a & b \\\\ c & d \\end{bmatrix}"},{latex:"\\begin{cases}a & x = 0 \\\\ b & x > 0\\end{cases}"},{latex:"\\hat{a}"},{latex:"\\breve{a}"},{latex:"\\acute{a}"},{latex:"\\grave{a}"},{latex:"\\tilde{a}"},{latex:"\\bar{a}"},{latex:"\\vec{a}"},{latex:"\\underline{a}"},{latex:"\\overline{a}"},{latex:"\\widehat{ab}"},{latex:"\\overleftarrow{ab}"},{latex:"\\overrightarrow{ab}"}]},{type:"verbatim",label:"函数",children:[{latex:"\\log"},{latex:"\\ln"},{latex:"\\exp"},{latex:"\\mod"},{latex:"\\lim"},{latex:"\\sin"},{latex:"\\cos"},{latex:"\\tan"},{latex:"\\csc"},{latex:"\\sec"},{latex:"\\cot"},{latex:"\\sinh"},{latex:"\\cosh"},{latex:"\\tanh"},{latex:"\\csch"},{latex:"\\sech"},{latex:"\\coth"},{latex:"\\arcsin"},{latex:"\\arccos"},{latex:"\\arctan"},{latex:"\\arccsc"},{latex:"\\arcsec"},{latex:"\\arccot"}]},{type:"greek",label:"希腊字母",children:[{latex:"\\alpha"},{latex:"\\beta"},{latex:"\\gamma"},{latex:"\\delta"},{latex:"\\varepsilon"},{latex:"\\zeta"},{latex:"\\eta"},{latex:"\\vartheta"},{latex:"\\iota"},{latex:"\\kappa"},{latex:"\\lambda"},{latex:"\\mu"},{latex:"\\nu"},{latex:"\\xi"},{latex:"\\omicron"},{latex:"\\pi"},{latex:"\\rho"},{latex:"\\sigma"},{latex:"\\tau"},{latex:"\\upsilon"},{latex:"\\varphi"},{latex:"\\chi"},{latex:"\\psi"},{latex:"\\omega"},{latex:"\\epsilon"},{latex:"\\theta"},{latex:"\\phi"},{latex:"\\varsigma"},{latex:"\\Alpha"},{latex:"\\Beta"},{latex:"\\Gamma"},{latex:"\\Delta"},{latex:"\\Epsilon"},{latex:"\\Zeta"},{latex:"\\Eta"},{latex:"\\Theta"},{latex:"\\Iota"},{latex:"\\Kappa"},{latex:"\\Lambda"},{latex:"\\Mu"},{latex:"\\Nu"},{latex:"\\Xi"},{latex:"\\Omicron"},{latex:"\\Pi"},{latex:"\\Rho"},{latex:"\\Sigma"},{latex:"\\Tau"},{latex:"\\Upsilon"},{latex:"\\Phi"},{latex:"\\Chi"},{latex:"\\Psi"},{latex:"\\Omega"}]}],Zv=["width","height"],Ov=["transform"],Rv=["d"];var zv=(0,i.aZ)({__name:"FormulaContent",props:{latex:{},width:{},height:{}},setup(e){const t=e,l=(0,s.iH)({x:0,y:0,w:0,h:0}),a=(0,s.iH)("");(0,i.YP)((()=>t.latex),(()=>{const e=new Fv._q(t.latex);a.value=e.pathd({}),l.value=e.box({})}),{immediate:!0});const n=(0,i.Fl)((()=>{const e=l.value.w+32,a=l.value.h+32;return e>t.width||a>t.height?e/a>t.width/t.height?t.width/e:t.height/a:1}));return(e,t)=>((0,i.wg)(),(0,i.iD)("svg",{class:"formula-content",overflow:"visible",width:l.value.w+32,height:l.value.h+32,stroke:"#000","stroke-width":"1",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[(0,i._)("g",{transform:`scale(${n.value}, ${n.value}) translate(0,0) matrix(1,0,0,1,0,0)`,"transform-origin":"0 50%"},[(0,i._)("path",{d:a.value},null,8,Rv)],8,Ov)],8,Zv))}});const Pv=(0,Vl.Z)(zv,[["__scopeId","data-v-567417d3"]]);var Bv=Pv;const Nv=["innerHTML"];var jv=(0,i.aZ)({__name:"SymbolContent",props:{latex:{}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e=new Fv._q(t.latex);return e.svg({SCALE_X:10,SCALE_Y:10})}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-content",innerHTML:l.value},null,8,Nv))}});const Yv=jv;var Vv=Yv;const Jv=["disabled","value","rows","placeholder"];var qv=(0,i.aZ)({__name:"TextArea",props:{value:{},rows:{default:4},disabled:{type:Boolean,default:!1},resizable:{type:Boolean,default:!1},placeholder:{default:""}},emits:["update:value"],setup(e,{expose:t,emit:l}){const a=l,n=e=>{a("update:value",e.target.value)},o=(0,s.iH)(),r=()=>{o.value&&o.value.focus()};return t({focus:r}),(e,t)=>((0,i.wg)(),(0,i.iD)("textarea",{class:(0,oe.C_)(["textarea",{disabled:e.disabled,resizable:e.resizable}]),ref_key:"textareaRef",ref:o,disabled:e.disabled,value:e.value,rows:e.rows,placeholder:e.placeholder,onInput:t[0]||(t[0]=e=>n(e))},null,42,Jv))}});const Xv=(0,Vl.Z)(qv,[["__scopeId","data-v-65d72404"]]);var Gv=Xv;const Kv={class:"latex-editor"},Qv={class:"container"},em={class:"left"},tm={class:"input-area"},lm={class:"preview"},am={key:0,class:"placeholder"},nm={key:1,class:"preview-content"},om={class:"right"},im={class:"content"},sm={key:0,class:"symbol"},rm={class:"symbol-pool"},um=["onClick"],cm={key:1,class:"formula"},dm={class:"formula-title"},pm=["onClick"],vm={class:"footer"};var mm=(0,i.aZ)({__name:"index",props:{value:{default:""}},emits:["update","close"],setup(e,{emit:t}){const l=[{label:"常用符号",key:"symbol"},{label:"预置公式",key:"formula"}],a=e,n=t,o=Av,r=$v.map((e=>({label:e.label,key:e.type}))),u=(0,s.iH)(""),c=(0,s.iH)("symbol"),d=(0,s.iH)(),p=(0,s.iH)($v[0].type),v=(0,i.Fl)((()=>{const e=$v.find((e=>e.type===p.value));return e?.children||[]}));(0,i.bv)((()=>{a.value&&(u.value=a.value)}));const m=()=>{if(!u.value)return ta.error("公式不能为空");const e=new Fv._q(u.value),t=e.pathd({}),l=e.box({});n("update",{latex:u.value,path:t,w:l.w+32,h:l.h+32})},h=e=>{d.value&&(d.value.focus(),document.execCommand("insertText",!1,e))};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Kv,[(0,i._)("div",Qv,[(0,i._)("div",em,[(0,i._)("div",tm,[(0,i.Wm)(Gv,{value:u.value,"onUpdate:value":t[0]||(t[0]=e=>u.value=e),placeholder:"输入 LaTeX 公式",ref_key:"textAreaRef",ref:d},null,8,["value"])]),(0,i._)("div",lm,[u.value?((0,i.wg)(),(0,i.iD)("div",nm,[(0,i.Wm)(Bv,{width:518,height:138,latex:u.value},null,8,["latex"])])):((0,i.wg)(),(0,i.iD)("div",am,"公式预览"))])]),(0,i._)("div",om,[(0,i.Wm)(Kd,{tabs:l,value:c.value,"onUpdate:value":t[1]||(t[1]=e=>c.value=e),card:""},null,8,["value"]),(0,i._)("div",im,["symbol"===c.value?((0,i.wg)(),(0,i.iD)("div",sm,[(0,i.Wm)(Kd,{tabs:(0,s.SU)(r),value:p.value,"onUpdate:value":t[2]||(t[2]=e=>p.value=e),spaceBetween:"",tabsStyle:{margin:"10px 10px 0"}},null,8,["tabs","value"]),(0,i._)("div",rm,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(v.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-item",key:e.latex,onClick:t=>h(e.latex)},[(0,i.Wm)(Vv,{latex:e.latex},null,8,["latex"])],8,um)))),128))])])):((0,i.wg)(),(0,i.iD)("div",cm,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(o),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"formula-item",key:e.label},[(0,i._)("div",dm,(0,oe.zw)(e.label),1),(0,i._)("div",{class:"formula-item-content",onClick:t=>u.value=e.latex},[(0,i.Wm)(Bv,{width:236,height:60,latex:e.latex},null,8,["latex"])],8,pm)])))),128))]))])])]),(0,i._)("div",vm,[(0,i.Wm)(tp,{class:"btn",onClick:t[3]||(t[3]=e=>n("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{class:"btn",type:"primary",onClick:t[4]||(t[4]=e=>m())},{default:(0,i.w5)((()=>[(0,i.Uk)("确定")])),_:1})])]))}});const hm=(0,Vl.Z)(mm,[["__scopeId","data-v-49a14edf"]]);var fm=hm;const gm={class:"canvas-tool"},ym={class:"left-handler"},wm={class:"add-element-handler"},xm={class:"handler-item group-btn"},km={class:"right-handler"},bm={class:"text"};var _m=(0,i.aZ)({__name:"index",setup(e){const t=R(),{creatingElement:l,creatingCustomShape:a,showSelectPanel:n,showSearchPanel:r}=(0,o.Jk)(t),{canUndo:u,canRedo:c}=(0,o.Jk)(J()),{redo:d,undo:p}=da(),{scaleCanvas:v,setCanvasScalePercentage:m,resetCanvas:h,canvasScalePercentage:f}=La(),g=[200,150,100,80,50],y=(0,s.iH)(!1),w=e=>{m(e),y.value=!1},{createImageElement:x,createChartElement:k,createTableElement:b,createLatexElement:_,createVideoElement:I,createAudioElement:S}=pa(),C=e=>{const t=e[0];t&&na(t).then((e=>x(e)))},L=(0,s.iH)(!1),T=(0,s.iH)(!1),E=(0,s.iH)(!1),M=(0,s.iH)(!1),U=(0,s.iH)(!1),W=(0,s.iH)(!1),D=(0,s.iH)(!1),H=(e=!1)=>{t.setCreatingElement({type:"text",vertical:e})},F=e=>{"任意多边形"===e.title?t.setCreatingCustomShapeState(!0):t.setCreatingElement({type:"shape",data:e}),L.value=!1},A=e=>{t.setCreatingElement({type:"line",data:e}),T.value=!1},$=()=>{t.setSelectPanelState(!n.value)},Z=()=>{t.setSearchPanelState(!r.value)};return(e,t)=>{const o=(0,i.up)("IconBack"),m=(0,i.up)("IconNext"),x=(0,i.up)("IconMoveOne"),O=(0,i.up)("IconSearch"),R=(0,i.up)("IconFontSize"),z=(0,i.up)("IconTextRotationNone"),P=(0,i.up)("IconTextRotationDown"),B=(0,i.up)("IconDown"),N=(0,i.up)("IconPicture"),j=(0,i.up)("IconGraphicDesign"),Y=(0,i.up)("IconConnection"),V=(0,i.up)("IconChartProportion"),J=(0,i.up)("IconInsertTable"),q=(0,i.up)("IconFormula"),X=(0,i.up)("IconVideoTwo"),G=(0,i.up)("IconMinus"),K=(0,i.up)("IconPlus"),Q=(0,i.up)("IconFullScreen"),ee=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",gm,[(0,i._)("div",ym,[(0,i.wy)((0,i.Wm)(o,{class:(0,oe.C_)(["handler-item",{disable:!(0,s.SU)(u)}]),onClick:t[0]||(t[0]=e=>(0,s.SU)(p)())},null,8,["class"]),[[ee,"撤销"]]),(0,i.wy)((0,i.Wm)(m,{class:(0,oe.C_)(["handler-item",{disable:!(0,s.SU)(c)}]),onClick:t[1]||(t[1]=e=>(0,s.SU)(d)())},null,8,["class"]),[[ee,"重做"]]),(0,i.Wm)(Zc,{type:"vertical",style:{height:"20px"}}),(0,i.wy)((0,i.Wm)(x,{class:(0,oe.C_)(["handler-item",{active:(0,s.SU)(n)}]),onClick:t[2]||(t[2]=e=>$())},null,8,["class"]),[[ee,"选择窗格"]]),(0,i.wy)((0,i.Wm)(O,{class:(0,oe.C_)(["handler-item",{active:(0,s.SU)(r)}]),onClick:t[3]||(t[3]=e=>Z())},null,8,["class"]),[[ee,"查找/替换"]])]),(0,i._)("div",wm,[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",xm,[(0,i.Wm)(R,{class:(0,oe.C_)(["icon",{active:"text"===(0,s.SU)(l)?.type}]),onClick:t[4]||(t[4]=e=>H())},null,8,["class"]),(0,i.Wm)(dn,{trigger:"click",value:D.value,"onUpdate:value":t[7]||(t[7]=e=>D.value=e),style:{height:"100%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(mn,{center:"",onClick:t[5]||(t[5]=()=>{H(),D.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(z),(0,i.Uk)(" 横向文本框")])),_:1}),(0,i.Wm)(mn,{center:"",onClick:t[6]||(t[6]=()=>{H(!0),D.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(P),(0,i.Uk)(" 竖向文本框")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(B,{class:"arrow"})])),_:1},8,["value"])])),[[ee,"插入文字"]]),(0,i.Wm)(Pa,{onChange:t[8]||(t[8]=e=>C(e))},{default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(N,{class:"handler-item"},null,512),[[ee,"插入图片"]])])),_:1}),(0,i.Wm)(dn,{trigger:"click",value:L.value,"onUpdate:value":t[10]||(t[10]=e=>L.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Rp,{onSelect:t[9]||(t[9]=e=>F(e))})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(j,{class:(0,oe.C_)(["handler-item",{active:(0,s.SU)(a)||"shape"===(0,s.SU)(l)?.type}])},null,8,["class"]),[[ee,"插入形状"]])])),_:1},8,["value"]),(0,i.Wm)(dn,{trigger:"click",value:T.value,"onUpdate:value":t[12]||(t[12]=e=>T.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Xp,{onSelect:t[11]||(t[11]=e=>A(e))})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(Y,{class:(0,oe.C_)(["handler-item",{active:"line"===(0,s.SU)(l)?.type}])},null,8,["class"]),[[ee,"插入线条"]])])),_:1},8,["value"]),(0,i.Wm)(dn,{trigger:"click",value:E.value,"onUpdate:value":t[14]||(t[14]=e=>E.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(tv,{onSelect:t[13]||(t[13]=e=>{(0,s.SU)(k)(e),E.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(V,{class:"handler-item"},null,512),[[ee,"插入图表"]])])),_:1},8,["value"]),(0,i.Wm)(dn,{trigger:"click",value:M.value,"onUpdate:value":t[17]||(t[17]=e=>M.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Tv,{onClose:t[15]||(t[15]=e=>M.value=!1),onInsert:t[16]||(t[16]=({row:e,col:t})=>{(0,s.SU)(b)(e,t),M.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(J,{class:"handler-item"},null,512),[[ee,"插入表格"]])])),_:1},8,["value"]),(0,i.wy)((0,i.Wm)(q,{class:"handler-item",onClick:t[18]||(t[18]=e=>W.value=!0)},null,512),[[ee,"插入公式"]]),(0,i.Wm)(dn,{trigger:"click",value:U.value,"onUpdate:value":t[22]||(t[22]=e=>U.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Hv,{onClose:t[19]||(t[19]=e=>U.value=!1),onInsertVideo:t[20]||(t[20]=e=>{(0,s.SU)(I)(e),U.value=!1}),onInsertAudio:t[21]||(t[21]=e=>{(0,s.SU)(S)(e),U.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(X,{class:"handler-item"},null,512),[[ee,"插入音视频"]])])),_:1},8,["value"])]),(0,i._)("div",km,[(0,i.Wm)(G,{class:"handler-item viewport-size",onClick:t[23]||(t[23]=e=>(0,s.SU)(v)("-"))}),(0,i.Wm)(dn,{trigger:"click",value:y.value,"onUpdate:value":t[24]||(t[24]=e=>y.value=e)},{content:(0,i.w5)((()=>[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(g,(e=>(0,i.Wm)(mn,{center:"",key:e,onClick:t=>w(e)},{default:(0,i.w5)((()=>[(0,i.Uk)((0,oe.zw)(e)+"%",1)])),_:2},1032,["onClick"]))),64))])),default:(0,i.w5)((()=>[(0,i._)("span",bm,(0,oe.zw)((0,s.SU)(f)),1)])),_:1},8,["value"]),(0,i.Wm)(K,{class:"handler-item viewport-size",onClick:t[25]||(t[25]=e=>(0,s.SU)(v)("+"))}),(0,i.wy)((0,i.Wm)(Q,{class:"handler-item viewport-size-adaptation",onClick:t[26]||(t[26]=e=>(0,s.SU)(h)())},null,512),[[ee,"适应屏幕"]])]),(0,i.Wm)(kp,{visible:W.value,"onUpdate:visible":t[29]||(t[29]=e=>W.value=e),width:880},{default:(0,i.w5)((()=>[(0,i.Wm)(fm,{onClose:t[27]||(t[27]=e=>W.value=!1),onUpdate:t[28]||(t[28]=e=>{(0,s.SU)(_)(e),W.value=!1})})])),_:1},8,["visible"])])}}});const Im=(0,Vl.Z)(_m,[["__scopeId","data-v-7e81f183"]]);var Sm=Im,Cm=()=>{const{slides:e}=(0,o.Jk)($()),t=(0,s.iH)(null),l=(0,s.iH)(50),a=()=>{e.value.length>l.value?t.value=setTimeout((()=>{l.value=l.value+20,a()}),600):l.value=9999};return(0,i.bv)(a),(0,i.Ah)((()=>{t.value&&clearTimeout(t.value)})),{slidesLoadLimit:l}};const Lm={class:"layout-pool"},Tm=["onClick"];var Em=(0,i.aZ)({__name:"LayoutPool",emits:["select"],setup(e,{emit:t}){const l=t,{layouts:a}=(0,o.Jk)($()),n=e=>{l("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Lm,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(a),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"layout-item",key:e.id,onClick:t=>n(e)},[(0,i.Wm)(Jd,{class:"thumbnail",slide:e,size:180},null,8,["slide"])],8,Tm)))),128))]))}});const Mm=(0,Vl.Z)(Em,[["__scopeId","data-v-8ee3e590"]]);var Um=Mm,Wm=l(9980),Dm=l.n(Wm);const Hm={class:"add-slide"},Fm={class:"select-btn"},Am=["onMousedown"],$m={class:"page-number"};var Zm=(0,i.aZ)({__name:"index",setup(e){const t=R(),l=$(),a=q(),{selectedSlidesIndex:n,thumbnailsFocus:r}=(0,o.Jk)(t),{slides:u,slideIndex:c}=(0,o.Jk)(l),{ctrlKeyState:d,shiftKeyState:p}=(0,o.Jk)(a),{slidesLoadLimit:v}=Cm(),m=(0,i.Fl)((()=>[...n.value,c.value])),h=(0,s.iH)(!1),{copySlide:f,pasteSlide:g,createSlide:y,createSlideByTemplate:w,copyAndPasteSlide:x,deleteSlide:k,cutSlide:b,selectAllSlide:_,sortSlides:I}=ha(),S=(0,s.iH)();(0,i.YP)((()=>c.value),(()=>{m.value.length&&t.updateSelectedSlidesIndex([]),(0,i.Y3)((()=>{const e=S.value?.$el?.querySelector(".thumbnail-item.active");S.value&&e&&!Le(e,S.value.$el)&&setTimeout((()=>{e.scrollIntoView({behavior:"smooth"})}),100)}))}));const C=e=>{t.setActiveElementIdList([]),c.value!==e&&l.updateSlideIndex(e)},L=(e,l)=>{const a=m.value.length>1;if(!a||!m.value.includes(l)||0===e.button)if(d.value)if(c.value===l){if(!a)return;const e=m.value.filter((e=>e!==l));t.updateSelectedSlidesIndex(e),C(m.value[0])}else if(m.value.includes(l)){const e=m.value.filter((e=>e!==l));t.updateSelectedSlidesIndex(e)}else{const e=[...m.value,l];t.updateSelectedSlidesIndex(e)}else if(p.value){if(c.value===l&&!a)return;let e=Math.min(...m.value),n=l;l{r.value!==e&&(t.setThumbnailsFocus(e),e||t.updateSelectedSlidesIndex([]))},E=e=>{const{newIndex:t,oldIndex:l}=e;void 0!==t&&void 0!==l&&t!==l&&I(t,l)},{enterScreening:M,enterScreeningFromStart:U}=Ca(),W=()=>[{text:"粘贴",subText:"Ctrl + V",handler:g},{text:"全选",subText:"Ctrl + A",handler:_},{text:"新建页面",subText:"Enter",handler:y},{text:"幻灯片放映",subText:"F5",handler:U}],D=()=>[{text:"剪切",subText:"Ctrl + X",handler:b},{text:"复制",subText:"Ctrl + C",handler:f},{text:"粘贴",subText:"Ctrl + V",handler:g},{text:"全选",subText:"Ctrl + A",handler:_},{divider:!0},{text:"新建页面",subText:"Enter",handler:y},{text:"复制页面",subText:"Ctrl + D",handler:x},{text:"删除页面",subText:"Delete",handler:()=>k()},{divider:!0},{text:"从当前放映",subText:"Shift + F5",handler:M}];return(e,t)=>{const l=(0,i.up)("IconPlus"),a=(0,i.up)("IconDown"),n=(0,i.Q2)("contextmenu"),o=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"thumbnails",onMousedown:t[4]||(t[4]=()=>T(!0))},[(0,i._)("div",Hm,[(0,i._)("div",{class:"btn",onClick:t[0]||(t[0]=e=>(0,s.SU)(y)())},[(0,i.Wm)(l,{class:"icon"}),(0,i.Uk)("添加幻灯片")]),(0,i.Wm)(dn,{trigger:"click",placement:"bottom-start",value:h.value,"onUpdate:value":t[2]||(t[2]=e=>h.value=e),center:""},{content:(0,i.w5)((()=>[(0,i.Wm)(Um,{onSelect:t[1]||(t[1]=e=>{(0,s.SU)(w)(e),h.value=!1})})])),default:(0,i.w5)((()=>[(0,i._)("div",Fm,[(0,i.Wm)(a)])])),_:1},8,["value"])]),(0,i.Wm)((0,s.SU)(Dm()),{class:"thumbnail-list",ref_key:"thumbnailsRef",ref:S,modelValue:(0,s.SU)(u),animation:200,scroll:!0,scrollSensitivity:50,onEnd:E,itemKey:"id"},{item:(0,i.w5)((({element:e,index:l})=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["thumbnail-item",{active:(0,s.SU)(c)===l,selected:m.value.includes(l)}]),onMousedown:e=>L(e,l),onDblclick:t[3]||(t[3]=e=>(0,s.SU)(M)())},[(0,i._)("div",{class:(0,oe.C_)(["label",{"offset-left":l>=99}])},(0,oe.zw)((0,s.SU)(G)(l+1,2)),3),(0,i.Wm)(Jd,{class:"thumbnail",slide:e,size:120,visible:l<(0,s.SU)(v)},null,8,["slide","visible"])],42,Am)),[[n,D]])])),_:1},8,["modelValue"]),(0,i._)("div",$m,"幻灯片 "+(0,oe.zw)((0,s.SU)(c)+1)+" / "+(0,oe.zw)((0,s.SU)(u).length),1)],32)),[[o,()=>T(!1)],[n,W]])}}});const Om=(0,Vl.Z)(Zm,[["__scopeId","data-v-0dbead61"]]);var Rm=Om,zm=()=>{const e=R(),{richTextAttrs:t,textFormatPainter:l}=(0,o.Jk)(e),a=(a=!1)=>{l.value?e.setTextFormatPainter(null):e.setTextFormatPainter({keep:a,bold:t.value.bold,em:t.value.em,underline:t.value.underline,strikethrough:t.value.strikethrough,color:t.value.color,backcolor:t.value.backcolor,fontname:t.value.fontname,fontsize:t.value.fontsize,align:t.value.align})};return{toggleTextFormatPainter:a}},Pm=l(8374);const Bm={class:"bar"},Nm=["data-tooltip"],jm=["data-tooltip"],Ym=["data-tooltip"];var Vm=(0,i.aZ)({__name:"Slider",props:{value:{},disabled:{type:Boolean,default:!1},min:{default:0},max:{default:100},step:{default:1},range:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e=>e.getBoundingClientRect().left,a=e,n=t,o=(0,s.iH)(),r=(0,s.iH)(0),u=(0,s.iH)(0),c=(0,s.iH)(0),d=(0,s.iH)("end"),p=e=>{let t=e/100*(a.max-a.min);if(a.step>=1)t=Math.fround(t);else{const e=a.step.toString(),l=e.match(/^[0.]*([1-9])/);if(l){const a=l[1],n=e.indexOf(a)-1;if(n>0){const e=Math.pow(10,n);t=Math.fround(t*e)/e}}}return Pm.ZP.plus(t,a.min)},v=(0,i.Fl)((()=>p(r.value))),m=(0,i.Fl)((()=>p(u.value))),h=(0,i.Fl)((()=>p(c.value)));(0,i.YP)((()=>a.value),(()=>{a.max!==a.min&&("number"===typeof a.value?r.value=(a.value-a.min)/(a.max-a.min)*100:(u.value=(a.value[0]-a.min)/(a.max-a.min)*100,c.value=(a.value[1]-a.min)/(a.max-a.min)*100))}),{immediate:!0});const f=e=>{if(!o.value)return 0;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let n=(t-l(o.value))/o.value.clientWidth;n=Math.max(n,0),n=Math.min(n,1);let i=100*n;const s=a.step/(a.max-a.min)*100,r=i%s;return r>0&&(r<=s/2?i-=r:i=i-r+s),i},g=e=>{const t=f(e);"start"===d.value?u.value=t:c.value=t},y=e=>{w(e);const t=p(r.value),l=a.value,o="start"===d.value?[t,l[1]]:[l[0],t];o[0]>o[1]&&([o[0],o[1]]=[o[1],o[0]]),n("update:value",o),document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",y),document.removeEventListener("touchend",y)},w=e=>{r.value=f(e)},x=e=>{w(e);const t=p(r.value);n("update:value",t),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",w),document.removeEventListener("mouseup",x),document.removeEventListener("touchend",x)},k=e=>{if(!a.disabled)if(a.range){const t=f(e);Math.abs(t-u.value)((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["slider",{disabled:e.disabled}]),ref_key:"sliderRef",ref:o,onMousedown:t[0]||(t[0]=e=>k(e))},[(0,i._)("div",Bm,[e.range?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i._)("div",{class:"track",style:(0,oe.j5)({width:c.value-u.value+"%",left:`${u.value}%`})},null,4),(0,i._)("div",{class:"thumb",style:(0,oe.j5)({left:`${u.value}%`}),"data-tooltip":m.value},null,12,jm),(0,i._)("div",{class:"thumb",style:(0,oe.j5)({left:`${c.value}%`}),"data-tooltip":h.value},null,12,Ym)],64)):((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",{class:"track",style:(0,oe.j5)({width:`${r.value}%`})},null,4),(0,i._)("div",{class:"thumb",style:(0,oe.j5)({left:`${r.value}%`}),"data-tooltip":v.value},null,12,Nm)],64))])],34))}});const Jm=(0,Vl.Z)(Vm,[["__scopeId","data-v-563bd2a0"]]);var qm=Jm;const Xm=e=>((0,i.dD)("data-v-03715c20"),e=e(),(0,i.Cn)(),e),Gm={class:"element-opacity"},Km={class:"row"},Qm=Xm((()=>(0,i._)("div",{style:{width:"40%"}},"不透明度:",-1)));var eh=(0,i.aZ)({__name:"ElementOpacity",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=(0,s.iH)(1);(0,i.YP)(l,(()=>{l.value&&(a.value="opacity"in l.value&&void 0!==l.value.opacity?l.value.opacity:1)}),{deep:!0,immediate:!0});const{addHistorySnapshot:n}=da(),r=e=>{if(!l.value)return;const a={opacity:e};t.updateElement({id:l.value.id,props:a}),n()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Gm,[(0,i._)("div",Km,[Qm,(0,i.Wm)(qm,{min:0,max:1,step:.1,value:a.value,"onUpdate:value":t[0]||(t[0]=e=>r(e)),style:{width:"60%"}},null,8,["value"])])]))}});const th=(0,Vl.Z)(eh,[["__scopeId","data-v-03715c20"]]);var lh=th;const ah={class:"color-block"};var nh=(0,i.aZ)({__name:"ColorButton",props:{color:{}},setup(e){return(e,t)=>{const l=(0,i.up)("IconPlatte");return(0,i.wg)(),(0,i.j4)(tp,{class:"color-btn"},{default:(0,i.w5)((()=>[(0,i._)("div",ah,[(0,i._)("div",{class:"content",style:(0,oe.j5)({backgroundColor:e.color})},null,4)]),(0,i.Wm)(l,{class:"color-btn-icon"})])),_:1})}}});const oh=(0,Vl.Z)(nh,[["__scopeId","data-v-7fa73bdc"]]);var ih=oh,sh=l(6459),rh=(0,i.aZ)({__name:"Checkboard",props:{size:{default:8},white:{default:"#fff"},grey:{default:"#e6e6e6"}},setup(e){const t=e,l={},a=(e,t,l)=>{const a=document.createElement("canvas");a.width=a.height=2*l;const n=a.getContext("2d");return n?(n.fillStyle=e,n.fillRect(0,0,a.width,a.height),n.fillStyle=t,n.fillRect(0,0,l,l),n.translate(l,l),n.fillRect(0,0,l,l),a.toDataURL()):null},n=(e,t,n)=>{const o=e+","+t+","+n;if(l[o])return l[o];const i=a(e,t,n);return l[o]=i,i},o=(0,i.Fl)((()=>{const e=n(t.white,t.grey,t.size);return{backgroundImage:`url(${e})`}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"checkerboard",style:(0,oe.j5)(o.value)},null,4))}});const uh=(0,Vl.Z)(rh,[["__scopeId","data-v-fa191ace"]]);var ch=uh;const dh=e=>((0,i.dD)("data-v-84628bc8"),e=e(),(0,i.Cn)(),e),ph={class:"alpha"},vh={class:"alpha-checkboard-wrap"},mh=dh((()=>(0,i._)("div",{class:"alpha-picker"},null,-1))),hh=[mh];var fh=(0,i.aZ)({__name:"Alpha",props:{value:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=t,n=(0,i.Fl)((()=>l.value)),o=(0,i.Fl)((()=>{const e=[n.value.r,n.value.g,n.value.b].join(",");return`linear-gradient(to right, rgba(${e}, 0) 0%, rgba(${e}, 1) 100%)`})),r=(0,s.iH)(),u=e=>{if(e.preventDefault(),!r.value)return;const t=r.value.clientWidth,l=r.value.getBoundingClientRect().left+window.pageXOffset,o=e.pageX-l;let i;i=o<0?0:o>t?1:Math.round(100*o/t)/100,n.value.a!==i&&a("colorChange",{r:n.value.r,g:n.value.g,b:n.value.b,a:i})},c=()=>{window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",c)},d=e=>{u(e),window.addEventListener("mousemove",u),window.addEventListener("mouseup",c)};return(0,i.Ah)(c),(e,t)=>((0,i.wg)(),(0,i.iD)("div",ph,[(0,i._)("div",vh,[(0,i.Wm)(ch)]),(0,i._)("div",{class:"alpha-gradient",style:(0,oe.j5)({background:o.value})},null,4),(0,i._)("div",{class:"alpha-container",ref_key:"alphaRef",ref:r,onMousedown:t[0]||(t[0]=e=>d(e))},[(0,i._)("div",{class:"alpha-pointer",style:(0,oe.j5)({left:100*n.value.a+"%"})},hh,4)],544)]))}});const gh=(0,Vl.Z)(fh,[["__scopeId","data-v-84628bc8"]]);var yh=gh;const wh=e=>((0,i.dD)("data-v-5711e710"),e=e(),(0,i.Cn)(),e),xh={class:"hue"},kh=wh((()=>(0,i._)("div",{class:"hue-picker"},null,-1))),bh=[kh];var _h=(0,i.aZ)({__name:"Hue",props:{value:{},hue:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=t,n=(0,s.iH)(0),o=(0,s.iH)(""),r=(0,i.Fl)((()=>{const e=(0,W.Z)(l.value).toHsl();return-1!==l.hue&&(e.h=l.hue),e})),u=(0,i.Fl)((()=>0===r.value.h&&"right"===o.value?"100%":100*r.value.h/360+"%"));(0,i.YP)((()=>l.value),(()=>{const e=(0,W.Z)(l.value).toHsl(),t=0===e.s?l.hue:e.h;0!==t&&t-n.value>0&&(o.value="right"),0!==t&&t-n.value<0&&(o.value="left"),n.value=t}));const c=(0,s.iH)(),d=e=>{if(e.preventDefault(),!c.value)return;const t=c.value.clientWidth,n=c.value.getBoundingClientRect().left+window.pageXOffset,o=e.pageX-n;let i,s;o<0?i=0:o>t?i=360:(s=100*o/t,i=360*s/100),-1!==l.hue&&r.value.h===i||a("colorChange",{h:i,l:r.value.l,s:r.value.s,a:r.value.a})},p=()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",p)},v=e=>{d(e),window.addEventListener("mousemove",d),window.addEventListener("mouseup",p)};return(0,i.Ah)(p),(e,t)=>((0,i.wg)(),(0,i.iD)("div",xh,[(0,i._)("div",{class:"hue-container",ref_key:"hueRef",ref:c,onMousedown:t[0]||(t[0]=e=>v(e))},[(0,i._)("div",{class:"hue-pointer",style:(0,oe.j5)({left:u.value})},bh,4)],544)]))}});const Ih=(0,Vl.Z)(_h,[["__scopeId","data-v-5711e710"]]);var Sh=Ih;const Ch=e=>((0,i.dD)("data-v-c79c0446"),e=e(),(0,i.Cn)(),e),Lh=Ch((()=>(0,i._)("div",{class:"saturation-white"},null,-1))),Th=Ch((()=>(0,i._)("div",{class:"saturation-black"},null,-1))),Eh=Ch((()=>(0,i._)("div",{class:"saturation-circle"},null,-1))),Mh=[Eh];var Uh=(0,i.aZ)({__name:"Saturation",props:{value:{},hue:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=t,n=(0,i.Fl)((()=>{const e=(0,W.Z)(l.value).toHsv();return-1!==l.hue&&(e.h=l.hue),e})),o=(0,i.Fl)((()=>`hsl(${n.value.h}, 100%, 50%)`)),r=(0,i.Fl)((()=>-100*n.value.v+1+100+"%")),u=(0,i.Fl)((()=>100*n.value.s+"%")),c=(0,D.throttle)((function(e){a("colorChange",e)}),20,{leading:!0,trailing:!1}),d=(0,s.iH)(),p=e=>{if(e.preventDefault(),!d.value)return;const t=d.value.clientWidth,l=d.value.clientHeight,a=d.value.getBoundingClientRect().left+window.pageXOffset,o=d.value.getBoundingClientRect().top+window.pageYOffset,i=(0,D.clamp)(e.pageX-a,0,t),s=(0,D.clamp)(e.pageY-o,0,l),r=i/t,u=(0,D.clamp)(-s/l+1,0,1);c({h:n.value.h,s:r,v:u,a:n.value.a})},v=()=>{window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",v)},m=e=>{p(e),window.addEventListener("mousemove",p),window.addEventListener("mouseup",v)};return(0,i.Ah)(v),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"saturation",ref_key:"saturationRef",ref:d,style:(0,oe.j5)({background:o.value}),onMousedown:t[0]||(t[0]=e=>m(e))},[Lh,Th,(0,i._)("div",{class:"saturation-pointer",style:(0,oe.j5)({top:r.value,left:u.value})},Mh,4)],36))}});const Wh=(0,Vl.Z)(Uh,[["__scopeId","data-v-c79c0446"]]);var Dh=Wh;const Hh={class:"editable-input"},Fh=["value"];var Ah=(0,i.aZ)({__name:"EditableInput",props:{value:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=t,n=(0,i.Fl)((()=>{let e="";return e=l.value.a<1?(0,W.Z)(l.value).toHex8String().toUpperCase():(0,W.Z)(l.value).toHexString().toUpperCase(),e.replace("#","")})),o=e=>{const t=e.target.value;if(t.length>=6){const e=(0,W.Z)(t);e.isValid()&&a("colorChange",e.toRgb())}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Hh,[(0,i._)("input",{class:"input-content",value:n.value,onInput:t[0]||(t[0]=e=>o(e))},null,40,Fh)]))}});const $h=(0,Vl.Z)(Ah,[["__scopeId","data-v-65e2913c"]]);var Zh=$h;const Oh={class:"color-picker"},Rh={class:"picker-saturation-wrap"},zh={class:"picker-controls"},Ph={class:"picker-color-wrap"},Bh={class:"picker-sliders"},Nh={class:"picker-hue-wrap"},jh={class:"picker-alpha-wrap"},Yh={class:"picker-field"},Vh={class:"picker-presets"},Jh=["onClick"],qh={class:"picker-gradient-presets"},Xh=["onClick"],Gh={class:"picker-presets"},Kh=["onClick"],Qh={key:0,class:"recent-colors-title"},ef={class:"picker-presets"},tf=["onClick"],lf="RECENT_COLORS";var af=(0,i.aZ)({__name:"index",props:{modelValue:{default:"#e86b99"}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=t,n=[["#7f7f7f","#f2f2f2"],["#0d0d0d","#808080"],["#1c1a10","#ddd8c3"],["#0e243d","#c6d9f0"],["#233f5e","#dae5f0"],["#632623","#f2dbdb"],["#4d602c","#eaf1de"],["#3f3150","#e6e0ec"],["#1e5867","#d9eef3"],["#99490f","#fee9da"]],o=(e,t,l)=>{const a=(0,W.Z)(e).toRgb(),n=(0,W.Z)(t).toRgb(),o=(n.r-a.r)/l,i=(n.g-a.g)/l,s=(n.b-a.b)/l,r=[];for(let u=0;u{const e=[];for(const t of n)e.push(o(t[1],t[0],5));return e},u=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c"],c=["#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57","#00afee","#0071be","#00215f","#72349d"],d=(0,s.iH)(-1),p=(0,s.iH)([]),v=(0,i.Fl)({get(){return(0,W.Z)(l.modelValue).toRgb()},set(e){const t=`rgba(${[e.r,e.g,e.b,e.a].join(",")})`;a("update:modelValue",t)}}),m=r(),h=(0,i.Fl)((()=>`rgba(${[v.value.r,v.value.g,v.value.b,v.value.a].join(",")})`)),f=e=>{d.value=(0,W.Z)(e).toHsl().h,a("update:modelValue",e)},g=(0,D.debounce)((function(){const e=(0,W.Z)(v.value).toRgbString();if(!p.value.includes(e)){p.value=[e,...p.value];const t=10;p.value.length>t&&(p.value=p.value.slice(0,t))}}),300,{trailing:!0});(0,i.bv)((()=>{const e=localStorage.getItem(lf);e&&(p.value=JSON.parse(e))})),(0,i.YP)(p,(()=>{const e=JSON.stringify(p.value);localStorage.setItem(lf,e)}));const y=e=>{"h"in e?(d.value=e.h,v.value=(0,W.Z)(e).toRgb()):(d.value=(0,W.Z)(e).toHsl().h,v.value=e),g()},w=()=>{const e="EyeDropper"in window;e?x():k()},x=()=>{ta.success("按 ESC 键关闭取色吸管");const e=new window.EyeDropper;e.open().then((e=>{const t=(0,W.Z)(e.sRGBHex);d.value=t.toHsl().h,v.value=t.toRgb(),g()})).catch((()=>{ta.success("关闭取色吸管")}))},k=()=>{const e=document.querySelector(".canvas");if(!e)return;const t=document.createElement("div");t.style.cssText="position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 9999; cursor: wait;",document.body.appendChild(t);const l=document.createElement("div");l.style.cssText="position: absolute; top: -100px; left: -100px; width: 16px; height: 16px; border: 1px solid #000; z-index: 999",t.appendChild(l);const{left:a,top:n,width:o,height:i}=e.getBoundingClientRect(),s=e=>(!e.tagName||"FOREIGNOBJECT"!==e.tagName.toUpperCase())&&(!e.classList||!e.classList.contains("operate"));(0,sh.rT)(e,{filter:s,fontEmbedCSS:"",width:o,height:i,canvasWidth:o,canvasHeight:i,pixelRatio:1}).then((e=>{e.style.cssText=`position: absolute; top: ${n}px; left: ${a}px; cursor: crosshair;`,t.style.cursor="default",t.appendChild(e);const o=e.getContext("2d");if(!o)return;let i="";const s=e=>{const t=e.x,s=e.y,r=t-a,u=s-n,[c,d,p,v]=o.getImageData(r,u,1,1).data;i=`rgba(${c}, ${d}, ${p}, ${(v/255).toFixed(2)})`,l.style.left=t+10+"px",l.style.top=s+10+"px",l.style.backgroundColor=i},r=()=>{i="",l.style.left="-100px",l.style.top="-100px",l.style.backgroundColor=""},u=l=>{if(i&&0===l.button){const e=(0,W.Z)(i);d.value=e.toHsl().h,v.value=e.toRgb(),g()}document.body.removeChild(t),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",r),window.removeEventListener("mousedown",u)};e.addEventListener("mousemove",s),e.addEventListener("mouseleave",r),window.addEventListener("mousedown",u)})).catch((()=>{ta.error("取色吸管初始化失败"),document.body.removeChild(t)}))};return(e,t)=>{const l=(0,i.up)("IconNeedle");return(0,i.wg)(),(0,i.iD)("div",Oh,[(0,i._)("div",Rh,[(0,i.Wm)(Dh,{value:v.value,hue:d.value,onColorChange:t[0]||(t[0]=e=>y(e))},null,8,["value","hue"])]),(0,i._)("div",zh,[(0,i._)("div",Ph,[(0,i._)("div",{class:"picker-current-color",style:(0,oe.j5)({background:h.value})},null,4),(0,i.Wm)(ch)]),(0,i._)("div",Bh,[(0,i._)("div",Nh,[(0,i.Wm)(Sh,{value:v.value,hue:d.value,onColorChange:t[1]||(t[1]=e=>y(e))},null,8,["value","hue"])]),(0,i._)("div",jh,[(0,i.Wm)(yh,{value:v.value,onColorChange:t[2]||(t[2]=e=>y(e))},null,8,["value"])])])]),(0,i._)("div",Yh,[(0,i.Wm)(Zh,{class:"input",value:v.value,onColorChange:t[3]||(t[3]=e=>y(e))},null,8,["value"]),(0,i._)("div",{class:"straw",onClick:t[4]||(t[4]=e=>w())},[(0,i.Wm)(l)]),(0,i._)("div",{class:"transparent",onClick:t[5]||(t[5]=e=>f("#00000000"))},[(0,i.Wm)(ch)])]),(0,i._)("div",Vh,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(u,(e=>(0,i._)("div",{class:"picker-presets-color",key:e,style:(0,oe.j5)({background:e}),onClick:t=>f(e)},null,12,Jh))),64))]),(0,i._)("div",qh,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(m),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"picker-gradient-col",key:t},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"picker-gradient-color",key:e,style:(0,oe.j5)({background:e}),onClick:t=>f(e)},null,12,Xh)))),128))])))),128))]),(0,i._)("div",Gh,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(c,(e=>(0,i._)("div",{key:e,class:"picker-presets-color",style:(0,oe.j5)({background:e}),onClick:t=>f(e)},null,12,Kh))),64))]),p.value.length?((0,i.wg)(),(0,i.iD)("div",Qh,"最近使用:")):(0,i.kq)("",!0),(0,i._)("div",ef,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,(e=>((0,i.wg)(),(0,i.iD)("div",{key:e,class:"picker-presets-color alpha",onClick:t=>f(e)},[(0,i._)("div",{class:"picker-presets-color-content",style:(0,oe.j5)({background:e})},null,4)],8,tf)))),128))])])}}});const nf=(0,Vl.Z)(af,[["__scopeId","data-v-fec0b01a"]]);var of=nf;const sf=e=>((0,i.dD)("data-v-0566b060"),e=e(),(0,i.Cn)(),e),rf=sf((()=>(0,i._)("span",{class:"switch-core"},null,-1))),uf=[rf];var cf=(0,i.aZ)({__name:"Switch",props:{value:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=t,n=()=>{l.disabled||a("update:value",!l.value)};return(e,t)=>((0,i.wg)(),(0,i.iD)("span",{class:(0,oe.C_)(["switch",{active:e.value,disabled:e.disabled}]),onClick:t[0]||(t[0]=e=>n())},uf,2))}});const df=(0,Vl.Z)(cf,[["__scopeId","data-v-0566b060"]]);var pf=df;const vf=e=>((0,i.dD)("data-v-18fbbd33"),e=e(),(0,i.Cn)(),e),mf={class:"element-outline"},hf={key:0,class:"row"},ff=vf((()=>(0,i._)("div",{style:{width:"40%"}},"启用边框:",-1))),gf={class:"switch-wrapper",style:{width:"60%"}},yf={class:"row"},wf=vf((()=>(0,i._)("div",{style:{width:"40%"}},"边框样式:",-1))),xf={class:"row"},kf=vf((()=>(0,i._)("div",{style:{width:"40%"}},"边框颜色:",-1))),bf={class:"row"},_f=vf((()=>(0,i._)("div",{style:{width:"40%"}},"边框粗细:",-1)));var If=(0,i.aZ)({__name:"ElementOutline",props:{fixed:{type:Boolean,default:!1}},setup(e){const t=$(),{theme:l}=(0,o.Jk)(t),{handleElement:a}=(0,o.Jk)(R()),n=(0,s.iH)(),r=(0,s.iH)(!1);(0,i.YP)(a,(()=>{a.value&&(n.value="outline"in a.value?a.value.outline:void 0,r.value=!!n.value)}),{deep:!0,immediate:!0});const{addHistorySnapshot:u}=da(),c=e=>{if(!a.value)return;const l={outline:{...n.value,...e}};t.updateElement({id:a.value.id,props:l}),u()},d=e=>{if(a.value){if(e){const e=l.value.outline;t.updateElement({id:a.value.id,props:{outline:e}})}else t.removeElementProps({id:a.value.id,propName:"outline"});u()}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",mf,[e.fixed?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",hf,[ff,(0,i._)("div",gf,[(0,i.Wm)(pf,{value:r.value,"onUpdate:value":t[0]||(t[0]=e=>d(e))},null,8,["value"])])])),r.value&&n.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i._)("div",yf,[wf,(0,i.Wm)(cp,{style:{width:"60%"},value:n.value.style||"","onUpdate:value":t[1]||(t[1]=e=>c({style:e})),options:[{label:"实线边框",value:"solid"},{label:"虚线边框",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",xf,[kf,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:n.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>c({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:n.value.color||"#000"},null,8,["color"])])),_:1})]),(0,i._)("div",bf,[_f,(0,i.Wm)(mv,{value:n.value.width||0,"onUpdate:value":t[3]||(t[3]=e=>c({width:e})),style:{width:"60%"}},null,8,["value"])])],64)):(0,i.kq)("",!0)]))}});const Sf=(0,Vl.Z)(If,[["__scopeId","data-v-18fbbd33"]]);var Cf=Sf;const Lf=e=>((0,i.dD)("data-v-3a267bbc"),e=e(),(0,i.Cn)(),e),Tf={class:"element-shadow"},Ef={class:"row"},Mf=Lf((()=>(0,i._)("div",{style:{width:"40%"}},"启用阴影:",-1))),Uf={class:"switch-wrapper",style:{width:"60%"}},Wf={class:"row"},Df=Lf((()=>(0,i._)("div",{style:{width:"40%"}},"水平阴影:",-1))),Hf={class:"row"},Ff=Lf((()=>(0,i._)("div",{style:{width:"40%"}},"垂直阴影:",-1))),Af={class:"row"},$f=Lf((()=>(0,i._)("div",{style:{width:"40%"}},"模糊距离:",-1))),Zf={class:"row"},Of=Lf((()=>(0,i._)("div",{style:{width:"40%"}},"阴影颜色:",-1)));var Rf=(0,i.aZ)({__name:"ElementShadow",setup(e){const t=$(),{theme:l}=(0,o.Jk)(t),{handleElement:a}=(0,o.Jk)(R()),n=(0,s.iH)(),r=(0,s.iH)(!1);(0,i.YP)(a,(()=>{a.value&&(n.value="shadow"in a.value?a.value.shadow:void 0,r.value=!!n.value)}),{deep:!0,immediate:!0});const{addHistorySnapshot:u}=da(),c=e=>{if(!a.value||!n.value)return;const l={...n.value,...e};t.updateElement({id:a.value.id,props:{shadow:l}}),u()},d=e=>{if(a.value){if(e){const e=l.value.shadow;t.updateElement({id:a.value.id,props:{shadow:e}})}else t.removeElementProps({id:a.value.id,propName:"shadow"});u()}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Tf,[(0,i._)("div",Ef,[Mf,(0,i._)("div",Uf,[(0,i.Wm)(pf,{value:r.value,"onUpdate:value":t[0]||(t[0]=e=>d(e))},null,8,["value"])])]),r.value&&n.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Wf,[Df,(0,i.Wm)(qm,{style:{width:"60%"},min:-10,max:10,step:1,value:n.value.h,"onUpdate:value":t[1]||(t[1]=e=>c({h:e}))},null,8,["value"])]),(0,i._)("div",Hf,[Ff,(0,i.Wm)(qm,{style:{width:"60%"},min:-10,max:10,step:1,value:n.value.v,"onUpdate:value":t[2]||(t[2]=e=>c({v:e}))},null,8,["value"])]),(0,i._)("div",Af,[$f,(0,i.Wm)(qm,{style:{width:"60%"},min:1,max:20,step:1,value:n.value.blur,"onUpdate:value":t[3]||(t[3]=e=>c({blur:e}))},null,8,["value"])]),(0,i._)("div",Zf,[Of,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:n.value.color,"onUpdate:modelValue":t[4]||(t[4]=e=>c({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:n.value.color},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0)]))}});const zf=(0,Vl.Z)(Rf,[["__scopeId","data-v-3a267bbc"]]);var Pf=zf;const Bf={class:"text-color-block"};var Nf=(0,i.aZ)({__name:"TextColorButton",props:{color:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.j4)(tp,{class:"text-color-btn"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default"),(0,i._)("div",Bf,[(0,i._)("div",{class:"text-color-block-content",style:(0,oe.j5)({backgroundColor:e.color})},null,4)])])),_:3}))}});const jf=(0,Vl.Z)(Nf,[["__scopeId","data-v-37449800"]]);var Yf=jf,Vf=(0,i.aZ)({__name:"CheckboxButton",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.j4)(tp,{checked:e.checked,disabled:e.disabled,type:"checkbox"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3},8,["checked","disabled"]))}});const Jf=Vf;var qf=Jf,Xf=(0,i.aZ)({__name:"ButtonGroup",props:{passive:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["button-group",{passive:e.passive}]),ref:"groupRef"},[(0,i.WI)(e.$slots,"default")],2))}});const Gf=(0,Vl.Z)(Xf,[["__scopeId","data-v-4db942e2"]]);var Kf=Gf,Qf=(0,i.aZ)({__name:"RadioButton",props:{value:{},disabled:{type:Boolean,default:!1}},setup(e){const{value:t,updateValue:l}=(0,i.f3)(Mn);return(e,a)=>((0,i.wg)(),(0,i.j4)(tp,{checked:!e.disabled&&(0,s.SU)(t)===e.value,disabled:e.disabled,type:"radio",onClick:a[0]||(a[0]=t=>!e.disabled&&(0,s.SU)(l)(e.value))},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3},8,["checked","disabled"]))}});const eg=Qf;var tg=eg,lg=(0,i.aZ)({__name:"RadioGroup",props:{value:{},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=t,n=e=>{l.disabled||a("update:value",e)},o=(0,i.Fl)((()=>l.value));return(0,i.JJ)(Mn,{value:o,updateValue:n}),(e,t)=>((0,i.wg)(),(0,i.j4)(Kf,{class:"radio-group"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3}))}});const ag=lg;var ng=ag;const og={class:"select-group"};function ig(e,t){return(0,i.wg)(),(0,i.iD)("div",og,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])}const sg={},rg=(0,Vl.Z)(sg,[["render",ig],["__scopeId","data-v-d2acb09c"]]);var ug=rg;const cg=e=>((0,i.dD)("data-v-4cf37a85"),e=e(),(0,i.Cn)(),e),dg={class:"text-style-panel"},pg={class:"preset-style"},vg=["onClick"],mg={class:"link-popover"},hg={class:"btns"},fg={class:"row",passive:""},gg={class:"list-wrap"},yg=["onClick"],wg=cg((()=>(0,i._)("span",null,null,-1))),xg=[wg],kg=cg((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),bg={class:"list-wrap"},_g=["onClick"],Ig=cg((()=>(0,i._)("span",null,null,-1))),Sg=[Ig],Cg={class:"row"},Lg=cg((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Tg={class:"row"},Eg=cg((()=>(0,i._)("div",{style:{width:"40%"}},"行间距:",-1))),Mg={class:"row"},Ug=cg((()=>(0,i._)("div",{style:{width:"40%"}},"段间距:",-1))),Wg={class:"row"},Dg=cg((()=>(0,i._)("div",{style:{width:"40%"}},"字间距:",-1))),Hg={class:"row"},Fg=cg((()=>(0,i._)("div",{style:{width:"40%"}},"文本框填充:",-1)));var Ag=(0,i.aZ)({__name:"TextStylePanel",setup(e){const t=[{label:"大标题",style:{fontSize:"26px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"66px"},{command:"align",value:"center"}]},{label:"小标题",style:{fontSize:"22px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"40px"},{command:"align",value:"center"}]},{label:"正文",style:{fontSize:"20px"},cmd:[{command:"clear"},{command:"fontsize",value:"20px"}]},{label:"正文[小]",style:{fontSize:"18px"},cmd:[{command:"clear"},{command:"fontsize",value:"18px"}]},{label:"注释 1",style:{fontSize:"16px",fontStyle:"italic"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"em"}]},{label:"注释 2",style:{fontSize:"16px",textDecoration:"underline"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"underline"}]}],l=R(),a=$(),{handleElement:n,handleElementId:r,richTextAttrs:u,availableFonts:c,textFormatPainter:d}=(0,o.Jk)(l),{addHistorySnapshot:p}=da(),{toggleTextFormatPainter:v}=zm(),m=e=>{a.updateElement({id:r.value,props:e}),p()},h=(0,s.iH)(!1),f=(0,s.iH)(!1),g=(0,s.iH)(!1),y=(0,s.iH)(!1),w=(0,s.iH)(["disc","circle","square"]),x=(0,s.iH)(["decimal","lower-roman","upper-roman","lower-alpha","upper-alpha","lower-greek"]),k=(0,s.iH)("#000"),b=(0,s.iH)(),_=(0,s.iH)(),I=(0,s.iH)();(0,i.YP)(n,(()=>{n.value&&"text"===n.value.type&&(k.value=n.value.fill||"#fff",b.value=n.value.lineHeight||1.5,_.value=n.value.wordSpace||0,I.value=void 0===n.value.paragraphSpace?5:n.value.paragraphSpace,Oi.emit(Ai.SYNC_RICH_TEXT_ATTRS_TO_STORE))}),{deep:!0,immediate:!0});const S=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],C=[.9,1,1.15,1.2,1.4,1.5,1.8,2,2.5,3],L=[0,1,2,3,4,5,6,8,10],T=[0,5,10,15,20,25,30,40,50,80],E=e=>{m({lineHeight:e})},U=e=>{m({paragraphSpace:e})},W=e=>{m({wordSpace:e})},D=e=>{m({fill:e})},H=(e,t)=>{Oi.emit(Ai.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},F=e=>{Oi.emit(Ai.RICH_TEXT_COMMAND,{action:e})},A=(0,s.iH)(""),Z=(0,s.iH)(!1);(0,i.YP)(u,(()=>Z.value=!1));const O=()=>{A.value=u.value.link},z=e=>{const t=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if(!e||!t.test(e))return ta.error("不是正确的网页链接地址");H("link",e),Z.value=!1};return(e,l)=>{const a=(0,i.up)("IconFontSize"),n=(0,i.up)("IconAddText"),o=(0,i.up)("IconText"),r=(0,i.up)("IconHighLight"),p=(0,i.up)("IconTextBold"),m=(0,i.up)("IconTextItalic"),$=(0,i.up)("IconTextUnderline"),R=(0,i.up)("IconStrikethrough"),P=(0,i.up)("IconCode"),B=(0,i.up)("IconQuote"),N=(0,i.up)("IconFormat"),j=(0,i.up)("IconFormatBrush"),Y=(0,i.up)("IconLinkOne"),V=(0,i.up)("IconAlignTextLeft"),J=(0,i.up)("IconAlignTextCenter"),q=(0,i.up)("IconAlignTextRight"),X=(0,i.up)("IconAlignTextBoth"),G=(0,i.up)("IconList"),K=(0,i.up)("IconDown"),Q=(0,i.up)("IconOrderedList"),ee=(0,i.up)("IconIndentLeft"),te=(0,i.up)("IconIndentRight"),le=(0,i.up)("IconRowHeight"),ae=(0,i.up)("IconVerticalSpacingBetweenItems"),ne=(0,i.up)("IconFullwidth"),ie=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",dg,[(0,i._)("div",pg,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"preset-style-item",key:e.label,style:(0,oe.j5)(e.style),onClick:t=>F(e.cmd)},(0,oe.zw)(e.label),13,vg))),64))]),(0,i.Wm)(Zc),(0,i.Wm)(ug,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(cp,{class:"font-select",style:{width:"60%"},value:(0,s.SU)(u).fontname,"onUpdate:value":l[0]||(l[0]=e=>H("fontname",e)),options:[...(0,s.SU)(c),...(0,s.SU)(M)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"]),(0,i.Wm)(cp,{style:{width:"40%"},value:(0,s.SU)(u).fontsize,"onUpdate:value":l[1]||(l[1]=e=>H("fontsize",e)),options:S.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).color,"onUpdate:modelValue":l[2]||(l[2]=e=>H("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{first:"",color:(0,s.SU)(u).color},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[ie,"文字颜色"]])])),_:1}),(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).backcolor,"onUpdate:modelValue":l[3]||(l[3]=e=>H("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{color:(0,s.SU)(u).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["color"])),[[ie,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{class:"font-size-btn",style:{width:"20%"},onClick:l[4]||(l[4]=e=>H("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("+")])),_:1})),[[ie,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:l[5]||(l[5]=e=>H("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("-")])),_:1})),[[ie,"减小字号"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).bold,onClick:l[6]||(l[6]=e=>H("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p)])),_:1},8,["checked"])),[[ie,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).em,onClick:l[7]||(l[7]=e=>H("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(m)])),_:1},8,["checked"])),[[ie,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).underline,onClick:l[8]||(l[8]=e=>H("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)($)])),_:1},8,["checked"])),[[ie,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).strikethrough,onClick:l[9]||(l[9]=e=>H("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(R)])),_:1},8,["checked"])),[[ie,"删除线"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).superscript,onClick:l[10]||(l[10]=e=>H("superscript"))},{default:(0,i.w5)((()=>[(0,i.Uk)("A²")])),_:1},8,["checked"])),[[ie,"上标"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).subscript,onClick:l[11]||(l[11]=e=>H("subscript"))},{default:(0,i.w5)((()=>[(0,i.Uk)("A₂")])),_:1},8,["checked"])),[[ie,"下标"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).code,onClick:l[12]||(l[12]=e=>H("code"))},{default:(0,i.w5)((()=>[(0,i.Wm)(P)])),_:1},8,["checked"])),[[ie,"行内代码"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).blockquote,onClick:l[13]||(l[13]=e=>H("blockquote"))},{default:(0,i.w5)((()=>[(0,i.Wm)(B)])),_:1},8,["checked"])),[[ie,"引用"]])])),_:1}),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{first:"",style:{flex:"1"},onClick:l[14]||(l[14]=e=>H("clear"))},{default:(0,i.w5)((()=>[(0,i.Wm)(N)])),_:1})),[[ie,"清除格式"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:!!(0,s.SU)(d),onClick:l[15]||(l[15]=e=>(0,s.SU)(v)()),onDblclick:l[16]||(l[16]=e=>(0,s.SU)(v)(!0))},{default:(0,i.w5)((()=>[(0,i.Wm)(j)])),_:1},8,["checked"])),[[ie,"格式刷(双击连续使用)"]]),(0,i.Wm)(dn,{placement:"bottom-end",trigger:"click",value:Z.value,"onUpdate:value":l[21]||(l[21]=e=>Z.value=e),style:{width:"33.33%"}},{content:(0,i.w5)((()=>[(0,i._)("div",mg,[(0,i.Wm)(sn,{value:A.value,"onUpdate:value":l[17]||(l[17]=e=>A.value=e),placeholder:"请输入超链接"},null,8,["value"]),(0,i._)("div",hg,[(0,i.Wm)(tp,{size:"small",disabled:!(0,s.SU)(u).link,onClick:l[18]||(l[18]=e=>z()),style:{"margin-right":"5px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("移除")])),_:1},8,["disabled"]),(0,i.Wm)(tp,{size:"small",type:"primary",onClick:l[19]||(l[19]=e=>z(A.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{last:"",style:{width:"100%"},checked:!!(0,s.SU)(u).link,onClick:l[20]||(l[20]=e=>O())},{default:(0,i.w5)((()=>[(0,i.Wm)(Y)])),_:1},8,["checked"])),[[ie,"超链接"]])])),_:1},8,["value"])])),_:1}),(0,i.Wm)(Zc),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:(0,s.SU)(u).align,"onUpdate:value":l[22]||(l[22]=e=>H("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(V)])),_:1})),[[ie,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(J)])),_:1})),[[ie,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(q)])),_:1})),[[ie,"右对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"justify",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(X)])),_:1})),[[ie,"两端对齐"]])])),_:1},8,["value"]),(0,i._)("div",fg,[(0,i.Wm)(Kf,{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{first:"",type:(0,s.SU)(u).bulletList?"primary":"default",style:{flex:"1"},onClick:l[23]||(l[23]=e=>H("bulletList"))},{default:(0,i.w5)((()=>[(0,i.Wm)(G)])),_:1},8,["type"])),[[ie,"项目符号"]]),(0,i.Wm)(dn,{trigger:"click",value:h.value,"onUpdate:value":l[24]||(l[24]=e=>h.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",gg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(w.value,(e=>((0,i.wg)(),(0,i.iD)("ul",{class:"list",key:e,style:(0,oe.j5)({listStyleType:e}),onClick:t=>H("bulletList",e)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(3,(e=>(0,i._)("li",{class:"list-item",key:e},xg))),64))],12,yg)))),128))])])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1}),kg,(0,i.Wm)(Kf,{style:{flex:"1"},passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{first:"",type:(0,s.SU)(u).orderedList?"primary":"default",style:{flex:"1"},onClick:l[25]||(l[25]=e=>H("orderedList"))},{default:(0,i.w5)((()=>[(0,i.Wm)(Q)])),_:1},8,["type"])),[[ie,"编号"]]),(0,i.Wm)(dn,{trigger:"click",value:f.value,"onUpdate:value":l[26]||(l[26]=e=>f.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",bg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(x.value,(e=>((0,i.wg)(),(0,i.iD)("ul",{class:"list",key:e,style:(0,oe.j5)({listStyleType:e}),onClick:t=>H("orderedList",e)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(3,(e=>(0,i._)("li",{class:"list-item",key:e},Sg))),64))],12,_g)))),128))])])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1})]),(0,i._)("div",Cg,[(0,i.Wm)(Kf,{style:{flex:"1"},passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{first:"",style:{flex:"1"},onClick:l[27]||(l[27]=e=>H("indent","-1"))},{default:(0,i.w5)((()=>[(0,i.Wm)(ee)])),_:1})),[[ie,"减小段落缩进"]]),(0,i.Wm)(dn,{trigger:"click",value:g.value,"onUpdate:value":l[29]||(l[29]=e=>g.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(mn,{onClick:l[28]||(l[28]=e=>H("textIndent","-1"))},{default:(0,i.w5)((()=>[(0,i.Uk)("减小首行缩进")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1}),Lg,(0,i.Wm)(Kf,{style:{flex:"1"},passive:""},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{first:"",style:{flex:"1"},onClick:l[30]||(l[30]=e=>H("indent","+1"))},{default:(0,i.w5)((()=>[(0,i.Wm)(te)])),_:1})),[[ie,"增大段落缩进"]]),(0,i.Wm)(dn,{trigger:"click",value:y.value,"onUpdate:value":l[32]||(l[32]=e=>y.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(mn,{onClick:l[31]||(l[31]=e=>H("textIndent","+1"))},{default:(0,i.w5)((()=>[(0,i.Uk)("增大首行缩进")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{last:"",class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1})]),(0,i.Wm)(Zc),(0,i._)("div",Tg,[Eg,(0,i.Wm)(cp,{style:{width:"60%"},value:b.value||1,"onUpdate:value":l[33]||(l[33]=e=>E(e)),options:C.map((e=>({label:e+"倍",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(le)])),_:1},8,["value","options"])]),(0,i._)("div",Mg,[Ug,(0,i.Wm)(cp,{style:{width:"60%"},value:I.value||0,"onUpdate:value":l[34]||(l[34]=e=>U(e)),options:T.map((e=>({label:e+"px",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(ae)])),_:1},8,["value","options"])]),(0,i._)("div",Wg,[Dg,(0,i.Wm)(cp,{style:{width:"60%"},value:_.value||0,"onUpdate:value":l[35]||(l[35]=e=>W(e)),options:L.map((e=>({label:e+"px",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(ne)])),_:1},8,["value","options"])]),(0,i._)("div",Hg,[Fg,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:k.value,"onUpdate:modelValue":l[36]||(l[36]=e=>D(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:k.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Zc),(0,i.Wm)(Cf),(0,i.Wm)(Zc),(0,i.Wm)(Pf),(0,i.Wm)(Zc),(0,i.Wm)(lh)])}}});const $g=(0,Vl.Z)(Ag,[["__scopeId","data-v-4cf37a85"]]);var Zg=$g;const Og={class:"element-flip"};var Rg=(0,i.aZ)({__name:"ElementFlip",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=(0,s.iH)(!1),n=(0,s.iH)(!1);(0,i.YP)(l,(()=>{!l.value||"image"!==l.value.type&&"shape"!==l.value.type||(a.value=!!l.value.flipH,n.value=!!l.value.flipV)}),{deep:!0,immediate:!0});const{addHistorySnapshot:r}=da(),u=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),r())};return(e,t)=>{const l=(0,i.up)("IconFlipVertically"),o=(0,i.up)("IconFlipHorizontally");return(0,i.wg)(),(0,i.iD)("div",Og,[(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(qf,{style:{flex:"1"},checked:n.value,onClick:t[0]||(t[0]=e=>u({flipV:!n.value}))},{default:(0,i.w5)((()=>[(0,i.Wm)(l),(0,i.Uk)(" 垂直翻转")])),_:1},8,["checked"]),(0,i.Wm)(qf,{style:{flex:"1"},checked:a.value,onClick:t[1]||(t[1]=e=>u({flipH:!a.value}))},{default:(0,i.w5)((()=>[(0,i.Wm)(o),(0,i.Uk)(" 水平翻转")])),_:1},8,["checked"])])),_:1})])}}});const zg=(0,Vl.Z)(Rg,[["__scopeId","data-v-7571b056"]]);var Pg=zg;const Bg=e=>((0,i.dD)("data-v-2c8acf3c"),e=e(),(0,i.Cn)(),e),Ng={class:"element-filter"},jg={class:"row"},Yg=Bg((()=>(0,i._)("div",{style:{flex:"2"}},"启用滤镜:",-1))),Vg={class:"switch-wrapper",style:{flex:"3"}},Jg={key:0,class:"filter"},qg={class:"name"};var Xg=(0,i.aZ)({__name:"ElementFilter",setup(e){const t=[{label:"模糊",key:"blur",default:0,value:0,unit:"px",max:10,step:1},{label:"亮度",key:"brightness",default:100,value:100,unit:"%",max:200,step:5},{label:"对比度",key:"contrast",default:100,value:100,unit:"%",max:200,step:5},{label:"灰度",key:"grayscale",default:0,value:0,unit:"%",max:100,step:5},{label:"饱和度",key:"saturate",default:100,value:100,unit:"%",max:200,step:5},{label:"色相",key:"hue-rotate",default:0,value:0,unit:"deg",max:360,step:10},{label:"不透明度",key:"opacity",default:100,value:100,unit:"%",max:100,step:5}],l=$(),{handleElement:a,handleElementId:n}=(0,o.Jk)(R()),r=(0,s.iH)(JSON.parse(JSON.stringify(t))),u=(0,s.iH)(!1),{addHistorySnapshot:c}=da();(0,i.YP)(a,(()=>{if(!a.value||"image"!==a.value.type)return;const e=a.value.filters;e?(r.value=t.map((t=>{const l=e[t.key];return l?{...t,value:parseInt(l)}:t})),u.value=!0):(r.value=JSON.parse(JSON.stringify(t)),u.value=!1)}),{deep:!0,immediate:!0});const d=(e,t)=>{const o=a.value,i=o.filters||{},s={...i,[e.key]:`${t}${e.unit}`};l.updateElement({id:n.value,props:{filters:s}}),c()},p=e=>{a.value&&(e?l.updateElement({id:a.value.id,props:{filters:{}}}):l.removeElementProps({id:a.value.id,propName:"filters"}),c())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ng,[(0,i._)("div",jg,[Yg,(0,i._)("div",Vg,[(0,i.Wm)(pf,{value:u.value,"onUpdate:value":t[0]||(t[0]=e=>p(e))},null,8,["value"])])]),u.value?((0,i.wg)(),(0,i.iD)("div",Jg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(r.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"filter-item",key:e.key},[(0,i._)("div",qg,(0,oe.zw)(e.label),1),(0,i.Wm)(qm,{class:"filter-slider",max:e.max,min:0,step:e.step,value:e.value,"onUpdate:value":t=>d(e,t)},null,8,["max","step","value","onUpdate:value"])])))),128))])):(0,i.kq)("",!0)]))}});const Gg=(0,Vl.Z)(Xg,[["__scopeId","data-v-2c8acf3c"]]);var Kg=Gg;const Qg=e=>((0,i.dD)("data-v-0ae0ff99"),e=e(),(0,i.Cn)(),e),ey={class:"element-color-mask"},ty={class:"row"},ly=Qg((()=>(0,i._)("div",{style:{width:"40%"}},"着色(蒙版):",-1))),ay={class:"switch-wrapper",style:{width:"60%"}},ny={key:0,class:"row",style:{"margin-top":"15px"}},oy=Qg((()=>(0,i._)("div",{style:{width:"40%"}},"蒙版颜色:",-1))),iy="rgba(226, 83, 77, 0.5)";var sy=(0,i.aZ)({__name:"ElementColorMask",setup(e){const t=$(),{handleElement:l,handleElementId:a}=(0,o.Jk)(R()),n=(0,s.iH)(iy),r=(0,s.iH)(!1),{addHistorySnapshot:u}=da();(0,i.YP)(l,(()=>{l.value&&"image"===l.value.type&&(l.value.colorMask?(n.value=l.value.colorMask,r.value=!0):r.value=!1)}),{deep:!0,immediate:!0});const c=e=>{l.value&&(e?t.updateElement({id:l.value.id,props:{colorMask:iy}}):t.removeElementProps({id:l.value.id,propName:"colorMask"}),u())},d=e=>{t.updateElement({id:a.value,props:{colorMask:e}}),u()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ey,[(0,i._)("div",ty,[ly,(0,i._)("div",ay,[(0,i.Wm)(pf,{value:r.value,"onUpdate:value":t[0]||(t[0]=e=>c(e))},null,8,["value"])])]),r.value?((0,i.wg)(),(0,i.iD)("div",ny,[oy,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=e=>d(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:n.value},null,8,["color"])])),_:1})])):(0,i.kq)("",!0)]))}});const ry=(0,Vl.Z)(sy,[["__scopeId","data-v-0ae0ff99"]]);var uy=ry;const cy=e=>((0,i.dD)("data-v-080b6de7"),e=e(),(0,i.Cn)(),e),dy={class:"image-style-panel"},py={class:"clip"},vy=cy((()=>(0,i._)("div",{class:"title"},"按形状:",-1))),my={class:"shape-clip"},hy=["onClick"],fy={key:0,class:"title"};var gy=(0,i.aZ)({__name:"ImageStylePanel",setup(e){const t=Kn,l=[{label:"纵横比(正方形)",children:[{key:"1:1",ratio:1}]},{label:"纵横比(纵向)",children:[{key:"2:3",ratio:1.5},{key:"3:4",ratio:4/3},{key:"3:5",ratio:5/3},{key:"4:5",ratio:5/4}]},{label:"纵横比(横向)",children:[{key:"3:2",ratio:2/3},{key:"4:3",ratio:3/4},{key:"5:3",ratio:.6},{key:"5:4",ratio:.8}]},{children:[{key:"16:9",ratio:9/16},{key:"16:10",ratio:.625}]}],a=R(),n=$(),{handleElement:r,handleElementId:u}=(0,o.Jk)(a),{currentSlide:c}=(0,o.Jk)(n),d=r,p=(0,s.iH)(!1),{addHistorySnapshot:v}=da(),m=()=>{a.setClipingImageElementId(u.value),p.value=!1},h=()=>{const e=r.value,t=e.width,l=e.height,a=e.left,n=e.top,o=e.clip?e.clip.range:[[0,0],[100,100]],i=t/((o[1][0]-o[0][0])/100),s=l/((o[1][1]-o[0][1])/100),u=a-i*(o[0][0]/100),c=n-s*(o[0][1]/100);return{originClipRange:o,originWidth:i,originHeight:s,originLeft:u,originTop:c}},f=(e,t=0)=>{const l=r.value,{originClipRange:a,originWidth:o,originHeight:i,originLeft:s,originTop:c}=h();if(t){const a=i/o,r=0,d=100;let p;if(a>t){const e=(1-t/a)/2*100;p=[[r,e],[d,d-e]]}else{const e=(1-a/t)/2*100;p=[[e,r],[d-e,d]]}n.updateElement({id:u.value,props:{clip:{...l.clip,shape:e,range:p},left:s+o*(p[0][0]/100),top:c+i*(p[0][1]/100),width:o*(p[1][0]-p[0][0])/100,height:i*(p[1][1]-p[0][1])/100}})}else n.updateElement({id:u.value,props:{clip:{...l.clip,shape:e,range:a}}});m(),v()},g=e=>{const t=e[0];t&&(na(t).then((e=>{const t={src:e};n.updateElement({id:u.value,props:t})})),v())},y=()=>{const e=r.value;if(e.clip){const{originWidth:e,originHeight:t,originLeft:l,originTop:a}=h();n.updateElement({id:u.value,props:{left:l,top:a,width:e,height:t}})}n.removeElementProps({id:u.value,propName:["clip","outline","flip","shadow","filters","colorMask"]}),v()},w=()=>{const e=r.value,t={...c.value.background,type:"image",image:e.src,imageSize:"cover"};n.updateSlide({background:t}),v()};return(e,a)=>{const n=(0,i.up)("IconTailoring"),o=(0,i.up)("IconDown"),r=(0,i.up)("IconTransform"),u=(0,i.up)("IconUndo"),c=(0,i.up)("IconTheme");return(0,i.wg)(),(0,i.iD)("div",dy,[(0,i._)("div",{class:"origin-image",style:(0,oe.j5)({backgroundImage:`url(${(0,s.SU)(d).src})`})},null,4),(0,i.Wm)(Pg),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{first:"",style:{width:"calc(100% / 6 * 5)"},onClick:a[0]||(a[0]=e=>m())},{default:(0,i.w5)((()=>[(0,i.Wm)(n,{class:"btn-icon"}),(0,i.Uk)(" 裁剪图片")])),_:1}),(0,i.Wm)(dn,{trigger:"click",value:p.value,"onUpdate:value":a[1]||(a[1]=e=>p.value=e),style:{width:"calc(100% / 6)"}},{content:(0,i.w5)((()=>[(0,i._)("div",py,[vy,(0,i._)("div",my,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(t),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"shape-clip-item",key:t,onClick:e=>f(t)},[(0,i._)("div",{class:"shape",style:(0,oe.j5)({clipPath:e.style})},null,4)],8,hy)))),128))]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.label},[e.label?((0,i.wg)(),(0,i.iD)("div",fy,"按"+(0,oe.zw)(e.label)+":",1)):(0,i.kq)("",!0),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,(e=>((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},key:e.key,onClick:t=>f("rect",e.ratio)},{default:(0,i.w5)((()=>[(0,i.Uk)((0,oe.zw)(e.key),1)])),_:2},1032,["onClick"])))),128))])),_:2},1024)],64)))),64))])])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{last:"",class:"popover-btn",style:{width:"100%"}},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1})])),_:1},8,["value"])])),_:1}),(0,i.Wm)(Zc),(0,i.Wm)(uy),(0,i.Wm)(Zc),(0,i.Wm)(Kg),(0,i.Wm)(Zc),(0,i.Wm)(Cf),(0,i.Wm)(Zc),(0,i.Wm)(Pf),(0,i.Wm)(Zc),(0,i.Wm)(Pa,{onChange:a[2]||(a[2]=e=>g(e))},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{class:"full-width-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(r,{class:"btn-icon"}),(0,i.Uk)(" 替换图片")])),_:1})])),_:1}),(0,i.Wm)(tp,{class:"full-width-btn",onClick:a[3]||(a[3]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Wm)(u,{class:"btn-icon"}),(0,i.Uk)(" 重置样式")])),_:1}),(0,i.Wm)(tp,{class:"full-width-btn",onClick:a[4]||(a[4]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Wm)(c,{class:"btn-icon"}),(0,i.Uk)(" 设为背景")])),_:1})])}}});const yy=(0,Vl.Z)(gy,[["__scopeId","data-v-080b6de7"]]);var wy=yy,xy=()=>{const e=R(),{shapeFormatPainter:t,handleElement:l}=(0,o.Jk)(e),a=(a=!1)=>{const n=l.value;t.value?e.setShapeFormatPainter(null):e.setShapeFormatPainter({keep:a,fill:n.fill,gradient:n.gradient,outline:n.outline,opacity:n.opacity,shadow:n.shadow})};return{toggleShapeFormatPainter:a}};const ky=e=>((0,i.dD)("data-v-0674f2cf"),e=e(),(0,i.Cn)(),e),by={class:"shape-style-panel"},_y={class:"title"},Iy=ky((()=>(0,i._)("span",null,"点击替换形状",-1))),Sy={class:"shape-pool"},Cy={class:"shape-list"},Ly={class:"row"},Ty=ky((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Ey={class:"row"},My=ky((()=>(0,i._)("div",{style:{width:"40%"}},"起点颜色:",-1))),Uy={class:"row"},Wy=ky((()=>(0,i._)("div",{style:{width:"40%"}},"终点颜色:",-1))),Dy={key:0,class:"row"},Hy=ky((()=>(0,i._)("div",{style:{width:"40%"}},"渐变角度:",-1))),Fy={class:"row"};var Ay=(0,i.aZ)({__name:"ShapeStylePanel",setup(e){const t=R(),l=$(),{handleElement:a,handleElementId:n,richTextAttrs:r,availableFonts:u,textFormatPainter:c,shapeFormatPainter:d}=(0,o.Jk)(t),p=a,v=(0,s.iH)("#000"),m=(0,s.iH)({type:"linear",rotate:0,color:["#fff","#fff"]}),h=(0,s.iH)("fill"),f=(0,s.iH)("middle");(0,i.YP)(a,(()=>{a.value&&"shape"===a.value.type&&(v.value=a.value.fill||"#fff",m.value=a.value.gradient||{type:"linear",rotate:0,color:[v.value,"#fff"]},h.value=a.value.gradient?"gradient":"fill",f.value=a.value?.text?.align||"middle")}),{deep:!0,immediate:!0});const{addHistorySnapshot:g}=da(),{toggleTextFormatPainter:y}=zm(),{toggleShapeFormatPainter:w}=xy(),x=e=>{l.updateElement({id:n.value,props:e}),g()},k=e=>{"fill"===e?(l.removeElementProps({id:n.value,propName:"gradient"}),g()):x({gradient:m.value})},b=e=>{if(!m.value)return;const t={...m.value,...e};x({gradient:t})},_=e=>{x({fill:e})},I=e=>{const{width:t,height:l}=a.value,n={viewBox:e.viewBox,path:e.path,special:e.special};if(e.pathFormula){n.pathFormula=e.pathFormula,n.viewBox=[t,l];const a=ra[e.pathFormula];"editable"in a?(n.path=a.formula(t,l,a.defaultValue),n.keypoint=a.defaultValue):n.path=a.formula(t,l)}else n.pathFormula=void 0,n.keypoint=void 0;x(n)},S=e=>{const t=a.value,l={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"},n=t.text||l;x({text:{...n,align:e}})},C=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],L=(e,t)=>{Oi.emit(Ai.RICH_TEXT_COMMAND,{action:{command:e,value:t}})};return(e,t)=>{const l=(0,i.up)("IconDown"),a=(0,i.up)("IconFontSize"),n=(0,i.up)("IconAddText"),o=(0,i.up)("IconText"),g=(0,i.up)("IconHighLight"),x=(0,i.up)("IconTextBold"),T=(0,i.up)("IconTextItalic"),E=(0,i.up)("IconTextUnderline"),U=(0,i.up)("IconStrikethrough"),W=(0,i.up)("IconFormat"),D=(0,i.up)("IconFormatBrush"),H=(0,i.up)("IconAlignTextLeft"),F=(0,i.up)("IconAlignTextCenter"),A=(0,i.up)("IconAlignTextRight"),$=(0,i.up)("IconAlignTextTopOne"),Z=(0,i.up)("IconAlignTextMiddleOne"),O=(0,i.up)("IconAlignTextBottomOne"),R=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",by,[(0,i._)("div",_y,[Iy,(0,i.Wm)(l)]),(0,i._)("div",Sy,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ua),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",Cy,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,["任意多边形"!==e.title?((0,i.wg)(),(0,i.j4)(Hp,{class:"shape-item",key:t,shape:e,onClick:t=>I(e)},null,8,["shape","onClick"])):(0,i.kq)("",!0)],64)))),256))])])))),128))]),(0,i._)("div",Ly,[(0,i.Wm)(cp,{style:{flex:"1"},value:h.value,"onUpdate:value":t[0]||(t[0]=e=>k(e)),options:[{label:"纯色填充",value:"fill"},{label:"渐变填充",value:"gradient"}]},null,8,["value"]),Ty,"fill"===h.value?((0,i.wg)(),(0,i.j4)(dn,{key:0,trigger:"click",style:{flex:"1"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:v.value,"onUpdate:modelValue":t[1]||(t[1]=e=>_(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:v.value},null,8,["color"])])),_:1})):((0,i.wg)(),(0,i.j4)(cp,{key:1,style:{flex:"1"},value:m.value.type,"onUpdate:value":t[2]||(t[2]=e=>b({type:e})),options:[{label:"线性渐变",value:"linear"},{label:"径向渐变",value:"radial"}]},null,8,["value"]))]),"gradient"===h.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Ey,[My,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:m.value.color[0],"onUpdate:modelValue":t[3]||(t[3]=e=>b({color:[e,m.value.color[1]]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:m.value.color[0]},null,8,["color"])])),_:1})]),(0,i._)("div",Uy,[Wy,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:m.value.color[1],"onUpdate:modelValue":t[4]||(t[4]=e=>b({color:[m.value.color[0],e]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:m.value.color[1]},null,8,["color"])])),_:1})]),"linear"===m.value.type?((0,i.wg)(),(0,i.iD)("div",Dy,[Hy,(0,i.Wm)(qm,{style:{width:"60%"},min:0,max:360,step:15,value:m.value.rotate,"onUpdate:value":t[5]||(t[5]=e=>b({rotate:e}))},null,8,["value"])])):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0),(0,i.Wm)(Pg),(0,i.Wm)(Zc),(0,s.SU)(p).text?.content?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(ug,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(cp,{class:"font-select",style:{width:"60%"},value:(0,s.SU)(r).fontname,"onUpdate:value":t[6]||(t[6]=e=>L("fontname",e)),options:[...(0,s.SU)(u),...(0,s.SU)(M)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"]),(0,i.Wm)(cp,{style:{width:"40%"},value:(0,s.SU)(r).fontsize,"onUpdate:value":t[7]||(t[7]=e=>L("fontsize",e)),options:C.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(r).color,"onUpdate:modelValue":t[8]||(t[8]=e=>L("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{first:"",color:(0,s.SU)(r).color},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[R,"文字颜色"]])])),_:1}),(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(r).backcolor,"onUpdate:modelValue":t[9]||(t[9]=e=>L("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{color:(0,s.SU)(r).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1},8,["color"])),[[R,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{class:"font-size-btn",style:{width:"20%"},onClick:t[10]||(t[10]=e=>L("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("+")])),_:1})),[[R,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:t[11]||(t[11]=e=>L("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("-")])),_:1})),[[R,"减小字号"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(r).bold,onClick:t[12]||(t[12]=e=>L("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(x)])),_:1},8,["checked"])),[[R,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(r).em,onClick:t[13]||(t[13]=e=>L("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["checked"])),[[R,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(r).underline,onClick:t[14]||(t[14]=e=>L("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(E)])),_:1},8,["checked"])),[[R,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:(0,s.SU)(r).strikethrough,onClick:t[15]||(t[15]=e=>L("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(U)])),_:1},8,["checked"])),[[R,"删除线"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},onClick:t[16]||(t[16]=e=>L("clear"))},{default:(0,i.w5)((()=>[(0,i.Wm)(W)])),_:1})),[[R,"清除格式"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:!!(0,s.SU)(c),onClick:t[17]||(t[17]=e=>(0,s.SU)(y)()),onDblclick:t[18]||(t[18]=e=>(0,s.SU)(y)(!0))},{default:(0,i.w5)((()=>[(0,i.Wm)(D)])),_:1},8,["checked"])),[[R,"格式刷(双击连续使用)"]])])),_:1}),(0,i.Wm)(Zc),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:(0,s.SU)(r).align,"onUpdate:value":t[19]||(t[19]=e=>L("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(H)])),_:1})),[[R,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(F)])),_:1})),[[R,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(A)])),_:1})),[[R,"右对齐"]])])),_:1},8,["value"]),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:f.value,"onUpdate:value":t[20]||(t[20]=e=>S(e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"top",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)($)])),_:1})),[[R,"顶对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"middle",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(Z)])),_:1})),[[R,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"bottom",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(O)])),_:1})),[[R,"底对齐"]])])),_:1},8,["value"]),(0,i.Wm)(Zc)],64)):(0,i.kq)("",!0),(0,i.Wm)(Cf),(0,i.Wm)(Zc),(0,i.Wm)(Pf),(0,i.Wm)(Zc),(0,i.Wm)(lh),(0,i.Wm)(Zc),(0,i._)("div",Fy,[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:!!(0,s.SU)(d),onClick:t[21]||(t[21]=e=>(0,s.SU)(w)()),onDblclick:t[22]||(t[22]=e=>(0,s.SU)(w)(!0))},{default:(0,i.w5)((()=>[(0,i.Wm)(D),(0,i.Uk)(" 形状格式刷")])),_:1},8,["checked"])),[[R,"双击连续使用"]])])])}}});const $y=(0,Vl.Z)(Ay,[["__scopeId","data-v-0674f2cf"]]);var Zy=$y;const Oy=e=>((0,i.dD)("data-v-ae80032c"),e=e(),(0,i.Cn)(),e),Ry={class:"line-style-panel"},zy={class:"row"},Py=Oy((()=>(0,i._)("div",{style:{width:"40%"}},"线条样式:",-1))),By={class:"row"},Ny=Oy((()=>(0,i._)("div",{style:{width:"40%"}},"线条颜色:",-1))),jy={class:"row"},Yy=Oy((()=>(0,i._)("div",{style:{width:"40%"}},"线条宽度:",-1))),Vy={class:"row"},Jy=Oy((()=>(0,i._)("div",{style:{width:"40%"}},"起点样式:",-1))),qy={class:"row"},Xy=Oy((()=>(0,i._)("div",{style:{width:"40%"}},"终点样式:",-1)));var Gy=(0,i.aZ)({__name:"LineStylePanel",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=l,{addHistorySnapshot:n}=da(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ry,[(0,i._)("div",zy,[Py,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(a).style,"onUpdate:value":t[0]||(t[0]=e=>r({style:e})),options:[{label:"实线",value:"solid"},{label:"虚线",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",By,[Ny,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[1]||(t[1]=e=>r({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",jy,[Yy,(0,i.Wm)(mv,{value:(0,s.SU)(a).width,"onUpdate:value":t[2]||(t[2]=e=>r({width:e})),style:{width:"60%"}},null,8,["value"])]),(0,i._)("div",Vy,[Jy,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(a).points[0],"onUpdate:value":t[3]||(t[3]=e=>r({points:[e,(0,s.SU)(a).points[1]]})),options:[{label:"无",value:""},{label:"箭头",value:"arrow"},{label:"圆点",value:"dot"}]},null,8,["value"])]),(0,i._)("div",qy,[Xy,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(a).points[1],"onUpdate:value":t[4]||(t[4]=e=>r({points:[(0,s.SU)(a).points[0],e]})),options:[{label:"无",value:""},{label:"箭头",value:"arrow"},{label:"圆点",value:"dot"}]},null,8,["value"])]),(0,i.Wm)(Zc),(0,i.Wm)(Pf)]))}});const Ky=(0,Vl.Z)(Gy,[["__scopeId","data-v-ae80032c"]]);var Qy=Ky;const ew={class:"chart-data-editor"},tw={class:"editor-content"},lw={class:"range-box"},aw=["id","onFocus","onPaste"],nw={class:"btns"},ow={class:"left"},iw={class:"right"},sw=100,rw=32;var uw=(0,i.aZ)({__name:"ChartDataEditor",props:{data:{}},emits:["save","close"],setup(e,{emit:t}){const l=e,a=t,o=(0,s.iH)([0,0]),r=(0,s.iH)({width:0,height:0}),u=(0,s.iH)(null),c=(0,i.Fl)((()=>{const e=o.value[0]*sw,t=o.value[1]*rw;return[{type:"t",style:{width:e+"px"}},{type:"b",style:{top:t+"px",width:e+"px"}},{type:"l",style:{height:t+"px"}},{type:"r",style:{left:e+"px",height:t+"px"}}]})),d=(0,i.Fl)((()=>{const e=o.value[0]*sw,t=o.value[1]*rw;return{left:e+"px",top:t+"px"}})),p=()=>{const e=[],{labels:t,legends:a,series:n}=l.data,i=t.length,s=n.length;e.push(["",...a]);for(let l=0;l{if(!u.value)return;const[e,t]=u.value,l=document.querySelector(`#cell-${e+1}-${t}`);l&&l.focus()},m=e=>{const t=e.key.toUpperCase();t===ne.ENTER&&v()};(0,i.bv)((()=>{document.addEventListener("keydown",m)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",m)}));const h=()=>{const[e,t]=o.value,l=[],n=[],i=[];for(let a=1;a{for(let e=1;e<31;e++)for(let t=1;t<7;t++){const l=document.querySelector(`#cell-${e}-${t}`);l&&(l.value="")}},g=(e,t,l)=>{if(e.preventDefault(),!e.clipboardData)return;const a=e.clipboardData.items[0];a&&"string"===a.kind&&"text/plain"===a.type&&a.getAsString((e=>{const a=fe(e);if("object"===typeof a)return;const n=ge(e);if(n){const e=t+n.length,a=l+n[0].length;for(let o=t;oa("close"),w=e=>{let t=!0;const l=e.pageX,a=e.pageY,n=o.value[0]*sw,i=o.value[1]*rw;document.onmousemove=e=>{if(!t)return;const o=e.pageX,s=e.pageY,u=o-l,c=s-a,d=n+u,p=i+c;r.value={width:d,height:p}},document.onmouseup=e=>{t=!1,document.onmousemove=null,document.onmouseup=null;const n=e.pageX,i=e.pageY;if(l===n&&a===i)return;let s=r.value.width,u=r.value.height;s%sw>.5*sw&&(s+=sw-s%sw),u%rw>.5*rw&&(u+=rw-u%rw);let c=Math.round(u/rw),d=Math.round(s/sw);c<3&&(c=3),d<2&&(d=2),o.value=[d,c],r.value={width:0,height:0}}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ew,[(0,i._)("div",tw,[(0,i._)("div",lw,[(0,i._)("div",{class:"temp-range",style:(0,oe.j5)({width:r.value.width+"px",height:r.value.height+"px"})},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(c.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["range-line",e.type]),key:e.type,style:(0,oe.j5)(e.style)},null,6)))),128)),(0,i._)("div",{class:"resizable",style:(0,oe.j5)(d.value),onMousedown:t[0]||(t[0]=(0,n.iM)((e=>w(e)),["stop"]))},null,36)]),(0,i._)("table",null,[(0,i._)("tbody",null,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(31,(e=>(0,i._)("tr",{key:e},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(7,(t=>(0,i._)("td",{key:t,class:(0,oe.C_)({head:1===t&&e<=o.value[1]||1===e&&t<=o.value[0]})},[(0,i._)("input",{class:(0,oe.C_)(["item",{selected:e<=o.value[1]&&t<=o.value[0]}]),id:`cell-${e-1}-${t-1}`,autocomplete:"off",onFocus:l=>u.value=[e-1,t-1],onPaste:l=>g(l,e-1,t-1)},null,42,aw)],2))),64))]))),64))])])]),(0,i._)("div",nw,[(0,i._)("div",ow,[(0,i.Wm)(tp,{class:"btn",onClick:t[1]||(t[1]=e=>f())},{default:(0,i.w5)((()=>[(0,i.Uk)("清空")])),_:1})]),(0,i._)("div",iw,[(0,i.Wm)(tp,{class:"btn",onClick:t[2]||(t[2]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(tp,{type:"primary",class:"btn",onClick:t[3]||(t[3]=e=>h()),style:{"margin-left":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])]))}});const cw=(0,Vl.Z)(uw,[["__scopeId","data-v-f7b59928"]]);var dw=cw;const pw=e=>((0,i.dD)("data-v-26bf4835"),e=e(),(0,i.Cn)(),e),vw=pw((()=>(0,i._)("span",{class:"checkbox-input"},null,-1))),mw=pw((()=>(0,i._)("input",{class:"checkbox-original",type:"checkbox"},null,-1))),hw={class:"checkbox-label"};var fw=(0,i.aZ)({__name:"Checkbox",props:{value:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=t,n=e=>{l.disabled||a("update:value",e.target.checked)};return(e,t)=>((0,i.wg)(),(0,i.iD)("label",{class:(0,oe.C_)(["checkbox",{checked:e.value,disabled:e.disabled}]),onChange:t[0]||(t[0]=e=>n(e))},[vw,mw,(0,i._)("span",hw,[(0,i.WI)(e.$slots,"default")])],34))}});const gw=(0,Vl.Z)(fw,[["__scopeId","data-v-26bf4835"]]);var yw=gw;const ww=e=>((0,i.dD)("data-v-45827db6"),e=e(),(0,i.Cn)(),e),xw={class:"chart-style-panel"},kw={class:"row"},bw={class:"row"},_w={key:1,class:"row"},Iw={key:2,class:"row"},Sw={class:"row"},Cw=ww((()=>(0,i._)("div",{style:{width:"40%"}},"图例:",-1))),Lw={class:"row"},Tw=ww((()=>(0,i._)("div",{style:{width:"40%"}},"背景填充:",-1))),Ew={class:"row"},Mw=ww((()=>(0,i._)("div",{style:{width:"40%"}},"网格颜色:",-1))),Uw={style:{width:"40%"}},Ww={class:"color-btn-wrap",style:{width:"100%"}},Dw=["onClick"],Hw={class:"preset-themes"},Fw=["onClick","onMouseenter"];var Aw=(0,i.aZ)({__name:"index",setup(e){const t=[["#d87c7c","#919e8b","#d7ab82","#6e7074","#61a0a8","#efa18d"],["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78"],["#516b91","#59c4e6","#edafda","#93b7e3","#a5e7f0","#cbb0e3"],["#893448","#d95850","#eb8146","#ffb248","#f2d643","#ebdba4"],["#4ea397","#22c3aa","#7bd9a5","#d0648a","#f58db2","#f2b3c9"],["#3fb1e3","#6be6c1","#626c91","#a0a7e6","#c4ebad","#96dee8"],["#fc97af","#87f7cf","#f7f494","#72ccff","#f7c5a0","#d4a4eb"],["#c1232b","#27727b","#fcce10","#e87c25","#b5c334","#fe8463"],["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3"],["#e01f54","#001852","#f5e8c8","#b8d2c7","#c6b38e","#a4d8c2"],["#c12e34","#e6b600","#0098d9","#2b821d","#005eaa","#339ca8"],["#8a7ca8","#e098c7","#8fd3e8","#71669e","#cc70af","#7cb4cc"]],l=R(),a=$(),{handleElement:r,handleElementId:u}=(0,o.Jk)(l),{theme:c}=(0,o.Jk)(a),d=r,p=(0,s.iH)(!1),v=(0,s.iH)(!1),m=(0,s.iH)([-1,-1]),{addHistorySnapshot:h}=da(),f=(0,s.iH)("#000"),g=(0,s.iH)([]),y=(0,s.iH)(""),w=(0,s.iH)(""),x=(0,s.iH)(!0),k=(0,s.iH)(!0),b=(0,s.iH)(!1),_=(0,s.iH)(!1),I=(0,s.iH)(!1),S=(0,s.iH)(!1);(0,i.YP)(r,(()=>{if(r.value&&"chart"===r.value.type){if(f.value=r.value.fill||"#fff",r.value.options){const{lineSmooth:e,showLine:t,showArea:l,horizontalBars:a,donut:n,stackBars:o}=r.value.options;x.value=!!e,k.value=!!t,b.value=!!l,_.value=!!a,I.value=!!n,S.value=!!o}g.value=r.value.themeColor,y.value=r.value.gridColor||"#333",w.value=r.value.legend||""}}),{deep:!0,immediate:!0});const C=e=>{a.updateElement({id:u.value,props:e}),h()},L=e=>{p.value=!1,C({data:e})},T=e=>{C({fill:e})},E=e=>{const t=r.value,l={...t.options,...e};C({options:l})},M=(e,t)=>{const l={themeColor:g.value.map(((l,a)=>a===t?e:l))};C(l)},U=()=>{const e={themeColor:[...g.value,c.value.themeColor]};C(e)},W=(e,t)=>{const l=e.slice(0,t+1);C({themeColor:l}),v.value=!1},D=e=>{const t={themeColor:g.value.filter(((t,l)=>l!==e))};C(t)},H=e=>{C({gridColor:e})},F=e=>{C({legend:e})},A=()=>p.value=!0;return Oi.on(Ai.OPEN_CHART_DATA_EDITOR,A),(0,i.Ah)((()=>{Oi.off(Ai.OPEN_CHART_DATA_EDITOR,A)})),(e,l)=>{const a=(0,i.up)("IconEdit"),o=(0,i.up)("IconCloseSmall"),r=(0,i.up)("IconPlus"),u=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",xw,[(0,i.Wm)(tp,{class:"full-width-btn",onClick:l[0]||(l[0]=e=>p.value=!0)},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"btn-icon"}),(0,i.Uk)(" 编辑图表数据 ")])),_:1}),(0,i.Wm)(Zc),"line"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",kw,[(0,i.Wm)(yw,{"onUpdate:value":l[1]||(l[1]=e=>E({showArea:e})),value:b.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("面积图样式")])),_:1},8,["value"]),(0,i.Wm)(yw,{"onUpdate:value":l[2]||(l[2]=e=>E({showLine:e})),value:!k.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("散点图样式")])),_:1},8,["value"])]),(0,i._)("div",bw,[(0,i.Wm)(yw,{"onUpdate:value":l[3]||(l[3]=e=>E({lineSmooth:e})),value:x.value},{default:(0,i.w5)((()=>[(0,i.Uk)("使用平滑曲线")])),_:1},8,["value"])])],64)):(0,i.kq)("",!0),"bar"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)("div",_w,[(0,i.Wm)(yw,{"onUpdate:value":l[4]||(l[4]=e=>E({horizontalBars:e})),value:_.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("条形图样式")])),_:1},8,["value"]),(0,i.Wm)(yw,{"onUpdate:value":l[5]||(l[5]=e=>E({stackBars:e})),value:S.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("堆叠样式")])),_:1},8,["value"])])):(0,i.kq)("",!0),"pie"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)("div",Iw,[(0,i.Wm)(yw,{"onUpdate:value":l[6]||(l[6]=e=>E({donut:e})),value:I.value},{default:(0,i.w5)((()=>[(0,i.Uk)("环形图样式")])),_:1},8,["value"])])):(0,i.kq)("",!0),(0,i.Wm)(Zc),(0,i._)("div",Sw,[Cw,(0,i.Wm)(cp,{style:{width:"60%"},value:w.value,"onUpdate:value":l[7]||(l[7]=e=>F(e)),options:[{label:"不显示",value:""},{label:"显示在上方",value:"top"},{label:"显示在下方",value:"bottom"}]},null,8,["value"])]),(0,i.Wm)(Zc),(0,i._)("div",Lw,[Tw,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:f.value,"onUpdate:modelValue":l[8]||(l[8]=e=>T(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:f.value},null,8,["color"])])),_:1})]),(0,i._)("div",Ew,[Mw,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:y.value,"onUpdate:modelValue":l[9]||(l[9]=e=>H(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:y.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Zc),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(g.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"row",key:t},[(0,i._)("div",Uw,(0,oe.zw)(0===t?"主题配色:":""),1),(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:e,"onUpdate:modelValue":e=>M(e,t)},null,8,["modelValue","onUpdate:modelValue"])])),default:(0,i.w5)((()=>[(0,i._)("div",Ww,[(0,i.Wm)(ih,{color:e},null,8,["color"]),0!==t?(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{key:0,class:"delete-color-btn",onClick:(0,n.iM)((e=>D(t)),["stop"])},[(0,i.Wm)(o)],8,Dw)),[[u,"删除"]]):(0,i.kq)("",!0)])])),_:2},1024)])))),128)),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,{trigger:"click",open:v.value,"onUpdate:open":l[11]||(l[11]=e=>v.value=e),style:{width:"40%"}},{content:(0,i.w5)((()=>[(0,i._)("div",Hw,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((e,t)=>(0,i._)("div",{class:"preset-theme",key:t},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e,((a,n)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["preset-theme-color",{select:m.value[0]===t&&n<=m.value[1]}]),key:a,style:(0,oe.j5)({backgroundColor:a}),onClick:t=>W(e,n),onMouseenter:e=>m.value=[t,n],onMouseleave:l[10]||(l[10]=e=>m.value=[-1,-1])},null,46,Fw)))),128))]))),64))])])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{first:"",style:{width:"100%"}},{default:(0,i.w5)((()=>[(0,i.Uk)("推荐主题")])),_:1})])),_:1},8,["open"]),(0,i.Wm)(tp,{last:"",disabled:g.value.length>=10,style:{width:"60%"},onClick:l[12]||(l[12]=e=>U())},{default:(0,i.w5)((()=>[(0,i.Wm)(r,{class:"btn-icon"}),(0,i.Uk)(" 添加主题色 ")])),_:1},8,["disabled"])])),_:1}),(0,i.Wm)(Zc),(0,i.Wm)(Cf),(0,i.Wm)(kp,{visible:p.value,"onUpdate:visible":l[15]||(l[15]=e=>p.value=e),width:640},{default:(0,i.w5)((()=>[(0,i.Wm)(dw,{data:(0,s.SU)(d).data,onClose:l[13]||(l[13]=e=>p.value=!1),onSave:l[14]||(l[14]=e=>L(e))},null,8,["data"])])),_:1},8,["visible"])])}}});const $w=(0,Vl.Z)(Aw,[["__scopeId","data-v-45827db6"]]);var Zw=$w;const Ow=e=>((0,i.dD)("data-v-e5523cbc"),e=e(),(0,i.Cn)(),e),Rw={class:"table-style-panel"},zw={class:"row"},Pw=Ow((()=>(0,i._)("div",{style:{width:"40%"}},"行数:",-1))),Bw={class:"set-count",style:{width:"60%"}},Nw={class:"count-text"},jw={class:"row"},Yw=Ow((()=>(0,i._)("div",{style:{width:"40%"}},"列数:",-1))),Vw={class:"set-count",style:{width:"60%"}},Jw={class:"count-text"},qw={class:"row theme-switch"},Xw=Ow((()=>(0,i._)("div",{style:{width:"40%"}},"启用主题表格:",-1))),Gw={class:"switch-wrapper",style:{width:"60%"}},Kw={class:"row"},Qw={class:"row"},ex={class:"row"},tx=Ow((()=>(0,i._)("div",{style:{width:"40%"}},"主题颜色:",-1)));var lx=(0,i.aZ)({__name:"TableStylePanel",setup(e){const t=$(),{handleElement:l,handleElementId:a,selectedTableCells:n,availableFonts:u}=(0,o.Jk)(R()),c=(0,i.Fl)((()=>t.theme.themeColor)),d=["12px","14px","16px","18px","20px","22px","24px","28px","32px"],p=(0,s.iH)({bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}),v=(0,s.iH)(),m=(0,s.iH)(!1),h=(0,s.iH)(0),f=(0,s.iH)(0),g=(0,s.iH)(0),y=(0,s.iH)(0);(0,i.YP)(l,(()=>{l.value&&"table"===l.value.type&&(v.value=l.value.theme,m.value=!!v.value,h.value=l.value.data.length,f.value=l.value.data[0].length,g.value=l.value.data.length,y.value=l.value.data[0].length)}),{deep:!0,immediate:!0});const{addHistorySnapshot:w}=da(),x=()=>{if(!l.value||"table"!==l.value.type)return;let e=0,t=0;if(n.value.length){const l=n.value[0];e=+l.split("_")[0],t=+l.split("_")[1]}const a=l.value.data[e][t].style;p.value=a?{bold:!!a.bold,em:!!a.em,underline:!!a.underline,strikethrough:!!a.strikethrough,color:a.color||"#000",backcolor:a.backcolor||"",fontsize:a.fontsize||"12px",fontname:a.fontname||"微软雅黑",align:a.align||"left"}:{bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}};(0,i.bv)((()=>{n.value.length&&x()})),(0,i.YP)(n,x);const k=e=>{t.updateElement({id:a.value,props:e}),w()},b=e=>{const t=l.value,a=JSON.parse(JSON.stringify(t.data));for(let l=0;l{if(!v.value)return;const t={...v.value,...e};k({theme:t})},I=e=>{if(e){const e={theme:{color:c.value,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1}};k(e)}else t.removeElementProps({id:a.value,propName:"theme"}),w()},S=e=>{const t=l.value,a=t.data.length;if(e>a){const l=new Array(f.value).fill({id:(0,r.x0)(10),colspan:1,rowspan:1,text:""}),n=new Array(e-a).fill(l),o=JSON.parse(JSON.stringify(t.data));o.push(...n),k({data:o})}else{const l=t.data.slice(0,e);k({data:l})}},C=e=>{const t=l.value,a=t.data[0].length;let n=t.data,o=t.colWidths.map((e=>e*t.width));if(e>a){n=n.map((t=>{const l=new Array(e-a).fill({id:(0,r.x0)(10),colspan:1,rowspan:1,text:""});return t.push(...l),t}));const t=new Array(e-a).fill(100);o.push(...t)}else n=n.map((t=>t.slice(0,e))),o=o.slice(0,e);const i=o.reduce(((e,t)=>e+t)),s=o.map((e=>e/i)),u={width:i,data:n,colWidths:s};k(u)};return(e,t)=>{const l=(0,i.up)("IconFontSize"),a=(0,i.up)("IconAddText"),n=(0,i.up)("IconText"),o=(0,i.up)("IconFill"),r=(0,i.up)("IconTextBold"),c=(0,i.up)("IconTextItalic"),g=(0,i.up)("IconTextUnderline"),y=(0,i.up)("IconStrikethrough"),w=(0,i.up)("IconAlignTextLeft"),x=(0,i.up)("IconAlignTextCenter"),k=(0,i.up)("IconAlignTextRight"),L=(0,i.up)("IconMinus"),T=(0,i.up)("IconPlus"),E=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Rw,[(0,i.Wm)(ug,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(cp,{style:{width:"50%"},value:p.value.fontname,"onUpdate:value":t[0]||(t[0]=e=>b({fontname:e})),options:[...(0,s.SU)(u),...(0,s.SU)(M)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(l)])),_:1},8,["value","options"]),(0,i.Wm)(cp,{style:{width:"50%"},value:p.value.fontsize,"onUpdate:value":t[1]||(t[1]=e=>b({fontsize:e})),options:d.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,{trigger:"click",style:{width:"50%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:p.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>b({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{first:"",color:p.value.color},{default:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["color"])),[[E,"文字颜色"]])])),_:1}),(0,i.Wm)(dn,{trigger:"click",style:{width:"50%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:p.value.backcolor,"onUpdate:modelValue":t[3]||(t[3]=e=>b({backcolor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{last:"",color:p.value.backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[E,"单元格填充"]])])),_:1})])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:p.value.bold,onClick:t[4]||(t[4]=e=>b({bold:!p.value.bold}))},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["checked"])),[[E,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:p.value.em,onClick:t[5]||(t[5]=e=>b({em:!p.value.em}))},{default:(0,i.w5)((()=>[(0,i.Wm)(c)])),_:1},8,["checked"])),[[E,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:p.value.underline,onClick:t[6]||(t[6]=e=>b({underline:!p.value.underline}))},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1},8,["checked"])),[[E,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(qf,{style:{flex:"1"},checked:p.value.strikethrough,onClick:t[7]||(t[7]=e=>b({strikethrough:!p.value.strikethrough}))},{default:(0,i.w5)((()=>[(0,i.Wm)(y)])),_:1},8,["checked"])),[[E,"删除线"]])])),_:1}),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:p.value.align,"onUpdate:value":t[8]||(t[8]=e=>b({align:e}))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(w)])),_:1})),[[E,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(x)])),_:1})),[[E,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(k)])),_:1})),[[E,"右对齐"]])])),_:1},8,["value"]),(0,i.Wm)(Zc),(0,i.Wm)(Cf,{fixed:!0}),(0,i.Wm)(Zc),(0,i._)("div",zw,[Pw,(0,i._)("div",Bw,[(0,i.Wm)(tp,{class:"btn",disabled:h.value<=1,onClick:t[9]||(t[9]=e=>S(h.value-1))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1},8,["disabled"]),(0,i._)("div",Nw,(0,oe.zw)(h.value),1),(0,i.Wm)(tp,{class:"btn",disabled:h.value>=30,onClick:t[10]||(t[10]=e=>S(h.value+1))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["disabled"])])]),(0,i._)("div",jw,[Yw,(0,i._)("div",Vw,[(0,i.Wm)(tp,{class:"btn",disabled:f.value<=1,onClick:t[11]||(t[11]=e=>C(f.value-1))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1},8,["disabled"]),(0,i._)("div",Jw,(0,oe.zw)(f.value),1),(0,i.Wm)(tp,{class:"btn",disabled:f.value>=30,onClick:t[12]||(t[12]=e=>C(f.value+1))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["disabled"])])]),(0,i.Wm)(Zc),(0,i._)("div",qw,[Xw,(0,i._)("div",Gw,[(0,i.Wm)(pf,{value:m.value,"onUpdate:value":t[13]||(t[13]=e=>I(e))},null,8,["value"])])]),v.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Kw,[(0,i.Wm)(yw,{"onUpdate:value":t[14]||(t[14]=e=>_({rowHeader:e})),value:v.value.rowHeader,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("标题行")])),_:1},8,["value"]),(0,i.Wm)(yw,{"onUpdate:value":t[15]||(t[15]=e=>_({rowFooter:e})),value:v.value.rowFooter,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("汇总行")])),_:1},8,["value"])]),(0,i._)("div",Qw,[(0,i.Wm)(yw,{"onUpdate:value":t[16]||(t[16]=e=>_({colHeader:e})),value:v.value.colHeader,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("第一列")])),_:1},8,["value"]),(0,i.Wm)(yw,{"onUpdate:value":t[17]||(t[17]=e=>_({colFooter:e})),value:v.value.colFooter,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("最后一列")])),_:1},8,["value"])]),(0,i._)("div",ex,[tx,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:v.value.color,"onUpdate:modelValue":t[18]||(t[18]=e=>_({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:v.value.color},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0)])}}});const ax=(0,Vl.Z)(lx,[["__scopeId","data-v-e5523cbc"]]);var nx=ax;const ox=e=>((0,i.dD)("data-v-3a5ca316"),e=e(),(0,i.Cn)(),e),ix={class:"latex-style-panel"},sx={class:"row"},rx={class:"row"},ux=ox((()=>(0,i._)("div",{style:{width:"40%"}},"颜色:",-1))),cx={class:"row"},dx=ox((()=>(0,i._)("div",{style:{width:"40%"}},"粗细:",-1)));var px=(0,i.aZ)({__name:"LatexStylePanel",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=l,n=(0,s.iH)(!1),{addHistorySnapshot:r}=da(),u=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),r())},c=e=>{u({path:e.path,latex:e.latex,width:e.w,height:e.h,viewBox:[e.w,e.h]})},d=()=>n.value=!0;return Oi.on(Ai.OPEN_LATEX_EDITOR,d),(0,i.Ah)((()=>{Oi.off(Ai.OPEN_LATEX_EDITOR,d)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",ix,[(0,i._)("div",sx,[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[0]||(t[0]=e=>n.value=!0)},{default:(0,i.w5)((()=>[(0,i.Uk)("编辑 LaTeX")])),_:1})]),(0,i.Wm)(Zc),(0,i._)("div",rx,[ux,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[1]||(t[1]=e=>u({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",cx,[dx,(0,i.Wm)(mv,{min:1,max:3,value:(0,s.SU)(a).strokeWidth,"onUpdate:value":t[2]||(t[2]=e=>u({strokeWidth:e})),style:{width:"60%"}},null,8,["value"])]),(0,i.Wm)(kp,{visible:n.value,"onUpdate:visible":t[5]||(t[5]=e=>n.value=e),width:880},{default:(0,i.w5)((()=>[(0,i.Wm)(fm,{value:(0,s.SU)(a).latex,onClose:t[3]||(t[3]=e=>n.value=!1),onUpdate:t[4]||(t[4]=e=>{c(e),n.value=!1})},null,8,["value"])])),_:1},8,["visible"])]))}});const vx=(0,Vl.Z)(px,[["__scopeId","data-v-3a5ca316"]]);var mx=vx;const hx=e=>((0,i.dD)("data-v-b3551c8c"),e=e(),(0,i.Cn)(),e),fx={class:"video-style-panel"},gx=hx((()=>(0,i._)("div",{class:"title"},"视频预览封面",-1))),yx={class:"background-image-wrapper"},wx={class:"background-image"},xx={class:"row"},kx={class:"row switch-row"},bx=hx((()=>(0,i._)("div",{style:{width:"40%"}},"自动播放:",-1))),_x={class:"switch-wrapper",style:{width:"60%"}};var Ix=(0,i.aZ)({__name:"VideoStylePanel",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=l,{addHistorySnapshot:n}=da(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())},u=e=>{const t=e[0];t&&na(t).then((e=>r({poster:e})))};return(e,t)=>{const l=(0,i.up)("IconPlus");return(0,i.wg)(),(0,i.iD)("div",fx,[gx,(0,i._)("div",yx,[(0,i.Wm)(Pa,{onChange:t[0]||(t[0]=e=>u(e))},{default:(0,i.w5)((()=>[(0,i._)("div",wx,[(0,i._)("div",{class:"content",style:(0,oe.j5)({backgroundImage:(0,s.SU)(a).poster?`url(${(0,s.SU)(a).poster})`:""})},[(0,i.Wm)(l)],4)])])),_:1})]),(0,i._)("div",xx,[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>r({poster:""}))},{default:(0,i.w5)((()=>[(0,i.Uk)("重置封面")])),_:1})]),(0,i._)("div",kx,[bx,(0,i._)("div",_x,[(0,i.Wm)(pf,{value:(0,s.SU)(a).autoplay,"onUpdate:value":t[2]||(t[2]=e=>r({autoplay:e}))},null,8,["value"])])])])}}});const Sx=(0,Vl.Z)(Ix,[["__scopeId","data-v-b3551c8c"]]);var Cx=Sx;const Lx=e=>((0,i.dD)("data-v-32517bcf"),e=e(),(0,i.Cn)(),e),Tx={class:"audio-style-panel"},Ex={class:"row"},Mx=Lx((()=>(0,i._)("div",{style:{width:"40%"}},"图标颜色:",-1))),Ux={class:"row switch-row"},Wx=Lx((()=>(0,i._)("div",{style:{width:"40%"}},"自动播放:",-1))),Dx={class:"switch-wrapper",style:{width:"60%"}},Hx={class:"row switch-row"},Fx=Lx((()=>(0,i._)("div",{style:{width:"40%"}},"循环播放:",-1))),Ax={class:"switch-wrapper",style:{width:"60%"}};var $x=(0,i.aZ)({__name:"AudioStylePanel",setup(e){const t=$(),{handleElement:l}=(0,o.Jk)(R()),a=l,{addHistorySnapshot:n}=da(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Tx,[(0,i._)("div",Ex,[Mx,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[0]||(t[0]=e=>r({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",Ux,[Wx,(0,i._)("div",Dx,[(0,i.Wm)(pf,{value:(0,s.SU)(a).autoplay,"onUpdate:value":t[1]||(t[1]=e=>r({autoplay:e}))},null,8,["value"])])]),(0,i._)("div",Hx,[Fx,(0,i._)("div",Ax,[(0,i.Wm)(pf,{value:(0,s.SU)(a).loop,"onUpdate:value":t[2]||(t[2]=e=>r({loop:e}))},null,8,["value"])])])]))}});const Zx=(0,Vl.Z)($x,[["__scopeId","data-v-32517bcf"]]);var Ox=Zx;const Rx=e=>((0,i.dD)("data-v-80f1bc4e"),e=e(),(0,i.Cn)(),e),zx={class:"multi-style-panel"},Px={class:"row"},Bx=Rx((()=>(0,i._)("div",{style:{width:"40%"}},"填充颜色:",-1))),Nx={class:"row"},jx=Rx((()=>(0,i._)("div",{style:{width:"40%"}},"边框样式:",-1))),Yx={class:"row"},Vx=Rx((()=>(0,i._)("div",{style:{width:"40%"}},"边框颜色:",-1))),Jx={class:"row"},qx=Rx((()=>(0,i._)("div",{style:{width:"40%"}},"边框粗细:",-1)));var Xx=(0,i.aZ)({__name:"MultiStylePanel",setup(e){const t=$(),{richTextAttrs:l,availableFonts:a,activeElementList:n}=(0,o.Jk)(R()),{addHistorySnapshot:r}=da(),u=(e,l)=>{t.updateElement({id:e,props:l}),r()},c=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],d=(0,s.iH)("#fff"),p=(0,s.iH)({width:0,color:"#fff",style:"solid"}),v=e=>{for(const t of n.value){if("text"!==t.type&&"shape"!==t.type&&"chart"!==t.type||u(t.id,{fill:e}),"table"===t.type){const l=JSON.parse(JSON.stringify(t.data));for(let t=0;t{for(const t of n.value){if("text"===t.type||"image"===t.type||"shape"===t.type||"table"===t.type||"chart"===t.type){const l=t.outline||{width:2,color:"#000",style:"solid"},a={outline:{...l,...e}};u(t.id,a)}"line"===t.type&&u(t.id,e)}p.value={...p.value,...e}},h=(e,t)=>{for(const l of n.value){if(("text"===l.type||"shape"===l.type&&l.text?.content)&&Oi.emit(Ai.RICH_TEXT_COMMAND,{target:l.id,action:{command:e,value:t}}),"table"===l.type){const a=JSON.parse(JSON.stringify(l.data));for(let l=0;l{const n=(0,i.up)("IconFontSize"),o=(0,i.up)("IconAddText"),r=(0,i.up)("IconText"),u=(0,i.up)("IconHighLight"),f=(0,i.up)("IconAlignTextLeft"),g=(0,i.up)("IconAlignTextCenter"),y=(0,i.up)("IconAlignTextRight"),w=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",zx,[(0,i._)("div",Px,[Bx,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:d.value,"onUpdate:modelValue":t[0]||(t[0]=e=>v(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:d.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Zc),(0,i._)("div",Nx,[jx,(0,i.Wm)(cp,{style:{width:"60%"},value:p.value.style||"","onUpdate:value":t[1]||(t[1]=e=>m({style:e})),options:[{label:"实线边框",value:"solid"},{label:"虚线边框",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",Yx,[Vx,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:p.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>m({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:p.value.color||"#000"},null,8,["color"])])),_:1})]),(0,i._)("div",Jx,[qx,(0,i.Wm)(mv,{value:p.value.width||0,"onUpdate:value":t[3]||(t[3]=e=>m({width:e})),style:{width:"60%"}},null,8,["value"])]),(0,i.Wm)(Zc),(0,i.Wm)(ug,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(l).fontname,"onUpdate:value":t[4]||(t[4]=e=>h("fontname",e)),options:[...(0,s.SU)(a),...(0,s.SU)(M)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"]),(0,i.Wm)(cp,{style:{width:"40%"},value:(0,s.SU)(l).fontsize,"onUpdate:value":t[5]||(t[5]=e=>h("fontsize",e)),options:c.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(Kf,{class:"row",passive:""},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(l).color,"onUpdate:modelValue":t[6]||(t[6]=e=>h("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{first:"",color:(0,s.SU)(l).color},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["color"])),[[w,"文字颜色"]])])),_:1}),(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(l).backcolor,"onUpdate:modelValue":t[7]||(t[7]=e=>h("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Yf,{color:(0,s.SU)(l).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(u)])),_:1},8,["color"])),[[w,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{class:"font-size-btn",style:{width:"20%"},onClick:t[8]||(t[8]=e=>h("fontsize-add","2"))},{default:(0,i.w5)((()=>[(0,i.Wm)(n),(0,i.Uk)("+")])),_:1})),[[w,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:t[9]||(t[9]=e=>h("fontsize-reduce","2"))},{default:(0,i.w5)((()=>[(0,i.Wm)(n),(0,i.Uk)("-")])),_:1})),[[w,"减小字号"]])])),_:1}),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:(0,s.SU)(l).align,"onUpdate:value":t[10]||(t[10]=e=>h("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1})),[[w,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1})),[[w,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tg,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(y)])),_:1})),[[w,"右对齐"]])])),_:1},8,["value"])])}}});const Gx=(0,Vl.Z)(Xx,[["__scopeId","data-v-80f1bc4e"]]);var Kx=Gx;const Qx={class:"element-style-panel"};var ek=(0,i.aZ)({__name:"index",setup(e){const t={[sa.TEXT]:Zg,[sa.IMAGE]:wy,[sa.SHAPE]:Zy,[sa.LINE]:Qy,[sa.CHART]:Zw,[sa.TABLE]:nx,[sa.LATEX]:mx,[sa.VIDEO]:Cx,[sa.AUDIO]:Ox},{activeElementIdList:l,activeElementList:a,handleElement:n,activeGroupElementId:s}=(0,o.Jk)(R()),r=(0,i.Fl)((()=>{if(l.value.length>1){if(!s.value)return Kx;const e=a.value.find((e=>e.id===s.value));return e&&t[e.type]||null}return n.value&&t[n.value.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Qx,[((0,i.wg)(),(0,i.j4)((0,i.LL)(r.value)))]))}});const tk=ek;var lk=tk;const ak=e=>((0,i.dD)("data-v-a2bcea28"),e=e(),(0,i.Cn)(),e),nk={class:"element-positopn-panel"},ok=ak((()=>(0,i._)("div",{class:"title"},"层级:",-1))),ik=ak((()=>(0,i._)("div",{class:"title"},"对齐:",-1))),sk={class:"row"},rk=ak((()=>(0,i._)("div",{style:{width:"10%"}},null,-1))),uk={key:0,class:"row"},ck={key:1,style:{width:"10%"}},dk={class:"row"},pk=ak((()=>(0,i._)("div",{style:{width:"7%"}},null,-1)));var vk=(0,i.aZ)({__name:"ElementPositionPanel",setup(e){const t=$(),{handleElement:l,handleElementId:a}=(0,o.Jk)(R()),n=(0,s.iH)(0),r=(0,s.iH)(0),u=(0,s.iH)(0),c=(0,s.iH)(0),d=(0,s.iH)(0),p=(0,s.iH)(!1),v=(0,i.Fl)((()=>l.value&&Zn[l.value.type]||20)),m=(0,i.Fl)((()=>"text"===l.value?.type&&!l.value.vertical)),h=(0,i.Fl)((()=>"text"===l.value?.type&&l.value.vertical));(0,i.YP)(l,(()=>{l.value&&(n.value=(0,D.round)(l.value.left,1),r.value=(0,D.round)(l.value.top,1),p.value="fixedRatio"in l.value&&!!l.value.fixedRatio,"line"!==l.value.type&&(u.value=(0,D.round)(l.value.width,1),c.value=(0,D.round)(l.value.height,1),d.value="rotate"in l.value&&void 0!==l.value.rotate?(0,D.round)(l.value.rotate,1):0))}),{deep:!0,immediate:!0});const{orderElement:f}=ba(),{alignElementToCanvas:g}=qn(),{addHistorySnapshot:y}=da(),w=e=>{const l={left:e};t.updateElement({id:a.value,props:l}),y()},x=e=>{const l={top:e};t.updateElement({id:a.value,props:l}),y()},k=(e,t)=>{if(l.value&&"shape"===l.value.type&&"pathFormula"in l.value&&l.value.pathFormula){const a=ra[l.value.pathFormula];let n="";return n="editable"in a?a.formula(e,t,l.value.keypoint):a.formula(e,t),{viewBox:[e,t],path:n}}return null},b=e=>{let l={width:e};const n=k(e,c.value);n&&(l={...l,...n}),t.updateElement({id:a.value,props:l}),y()},_=e=>{let l={height:e};const n=k(u.value,e);n&&(l={...l,...n}),t.updateElement({id:a.value,props:l}),y()},I=e=>{const l={rotate:e};t.updateElement({id:a.value,props:l}),y()},S=e=>{const l={fixedRatio:e};t.updateElement({id:a.value,props:l}),y()},C=e=>{let l=45*Math.floor(d.value/45);"+"===e?l+=45:"-"===e&&(l-=45),l<-180&&(l=-180),l>180&&(l=180);const n={rotate:l};t.updateElement({id:a.value,props:n}),y()};return(e,t)=>{const a=(0,i.up)("IconSendToBack"),o=(0,i.up)("IconBringToFrontOne"),y=(0,i.up)("IconBringToFront"),k=(0,i.up)("IconSentToBack"),L=(0,i.up)("IconAlignLeft"),T=(0,i.up)("IconAlignVertically"),E=(0,i.up)("IconAlignRight"),M=(0,i.up)("IconAlignTop"),U=(0,i.up)("IconAlignHorizontally"),W=(0,i.up)("IconAlignBottom"),D=(0,i.up)("IconLock"),H=(0,i.up)("IconUnlock"),F=(0,i.up)("IconRotate"),A=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",nk,[ok,(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[0]||(t[0]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(Q).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"btn-icon"}),(0,i.Uk)(" 置顶")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(Q).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:"btn-icon"}),(0,i.Uk)(" 置底")])),_:1})])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[2]||(t[2]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(Q).UP))},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{class:"btn-icon"}),(0,i.Uk)(" 上移")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[3]||(t[3]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(Q).DOWN))},{default:(0,i.w5)((()=>[(0,i.Wm)(k,{class:"btn-icon"}),(0,i.Uk)(" 下移")])),_:1})])),_:1}),(0,i.Wm)(Zc),ik,(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[4]||(t[4]=e=>(0,s.SU)(g)((0,s.SU)(ee).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1})),[[A,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[5]||(t[5]=e=>(0,s.SU)(g)((0,s.SU)(ee).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1})),[[A,"水平居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[6]||(t[6]=e=>(0,s.SU)(g)((0,s.SU)(ee).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(E)])),_:1})),[[A,"右对齐"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[7]||(t[7]=e=>(0,s.SU)(g)((0,s.SU)(ee).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(M)])),_:1})),[[A,"上对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[8]||(t[8]=e=>(0,s.SU)(g)((0,s.SU)(ee).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(U)])),_:1})),[[A,"垂直居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:t[9]||(t[9]=e=>(0,s.SU)(g)((0,s.SU)(ee).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(W)])),_:1})),[[A,"下对齐"]])])),_:1}),(0,i.Wm)(Zc),(0,i._)("div",sk,[(0,i.Wm)(mv,{step:5,value:n.value,"onUpdate:value":t[10]||(t[10]=e=>w(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 水平: ")])),_:1},8,["value"]),rk,(0,i.Wm)(mv,{step:5,value:r.value,"onUpdate:value":t[11]||(t[11]=e=>x(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 垂直: ")])),_:1},8,["value"])]),"line"!==(0,s.SU)(l).type?((0,i.wg)(),(0,i.iD)("div",uk,[(0,i.Wm)(mv,{min:v.value,max:1500,step:5,disabled:h.value,value:u.value,"onUpdate:value":t[12]||(t[12]=e=>b(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 宽度: ")])),_:1},8,["min","disabled","value"]),["image","shape","audio"].includes((0,s.SU)(l).type)?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[p.value?(0,i.wy)(((0,i.wg)(),(0,i.j4)(D,{key:0,style:{width:"10%"},class:"icon-btn",onClick:t[13]||(t[13]=e=>S(!1))},null,512)),[[A,"解除宽高比锁定"]]):(0,i.wy)(((0,i.wg)(),(0,i.j4)(H,{key:1,style:{width:"10%"},class:"icon-btn",onClick:t[14]||(t[14]=e=>S(!0))},null,512)),[[A,"宽高比锁定"]])],64)):((0,i.wg)(),(0,i.iD)("div",ck)),(0,i.Wm)(mv,{min:v.value,max:800,step:5,disabled:m.value||"table"===(0,s.SU)(l).type,value:c.value,"onUpdate:value":t[15]||(t[15]=e=>_(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 高度: ")])),_:1},8,["min","disabled","value"])])):(0,i.kq)("",!0),["line","video","audio"].includes((0,s.SU)(l).type)?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(Zc),(0,i._)("div",dk,[(0,i.Wm)(mv,{min:-180,max:180,step:5,value:d.value,"onUpdate:value":t[16]||(t[16]=e=>I(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 旋转: ")])),_:1},8,["value"]),pk,(0,i._)("div",{class:"text-btn",onClick:t[17]||(t[17]=e=>C("-")),style:{width:"24%"}},[(0,i.Wm)(F),(0,i.Uk)(" -45°")]),(0,i._)("div",{class:"text-btn",onClick:t[18]||(t[18]=e=>C("+")),style:{width:"24%"}},[(0,i.Wm)(F,{style:(0,oe.j5)({transform:"rotateY(180deg)"})},null,8,["style"]),(0,i.Uk)(" +45°")])])],64))])}}});const mk=(0,Vl.Z)(vk,[["__scopeId","data-v-a2bcea28"]]);var hk=mk;const fk=1e3,gk="click",yk="animate__",wk=[{type:"bounce",name:"弹跳",children:[{name:"弹入",value:"bounceIn"},{name:"向右弹入",value:"bounceInLeft"},{name:"向左弹入",value:"bounceInRight"},{name:"向上弹入",value:"bounceInUp"},{name:"向下弹入",value:"bounceInDown"}]},{type:"fade",name:"浮现",children:[{name:"浮入",value:"fadeIn"},{name:"向下浮入",value:"fadeInDown"},{name:"向下长距浮入",value:"fadeInDownBig"},{name:"向右浮入",value:"fadeInLeft"},{name:"向右长距浮入",value:"fadeInLeftBig"},{name:"向左浮入",value:"fadeInRight"},{name:"向左长距浮入",value:"fadeInRightBig"},{name:"向上浮入",value:"fadeInUp"},{name:"向上长距浮入",value:"fadeInUpBig"},{name:"从左上浮入",value:"fadeInTopLeft"},{name:"从右上浮入",value:"fadeInTopRight"},{name:"从左下浮入",value:"fadeInBottomLeft"},{name:"从右下浮入",value:"fadeInBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转进入",value:"rotateIn"},{name:"绕左下进入",value:"rotateInDownLeft"},{name:"绕右下进入",value:"rotateInDownRight"},{name:"绕左上进入",value:"rotateInUpLeft"},{name:"绕右上进入",value:"rotateInUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"放大进入",value:"zoomIn"},{name:"向下放大进入",value:"zoomInDown"},{name:"从左放大进入",value:"zoomInLeft"},{name:"从右放大进入",value:"zoomInRight"},{name:"向上放大进入",value:"zoomInUp"}]},{type:"slide",name:"滑入",children:[{name:"向下滑入",value:"slideInDown"},{name:"从右滑入",value:"slideInLeft"},{name:"从左滑入",value:"slideInRight"},{name:"向上滑入",value:"slideInUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转进入",value:"flipInX"},{name:"Y轴翻转进入",value:"flipInY"}]},{type:"back",name:"放大滑入",children:[{name:"向下放大滑入",value:"backInDown"},{name:"从左放大滑入",value:"backInLeft"},{name:"从右放大滑入",value:"backInRight"},{name:"向上放大滑入",value:"backInUp"}]},{type:"lightSpeed",name:"飞入",children:[{name:"从右飞入",value:"lightSpeedInRight"},{name:"从左飞入",value:"lightSpeedInLeft"}]}],xk=[{type:"bounce",name:"弹跳",children:[{name:"弹出",value:"bounceOut"},{name:"向左弹出",value:"bounceOutLeft"},{name:"向右弹出",value:"bounceOutRight"},{name:"向上弹出",value:"bounceOutUp"},{name:"向下弹出",value:"bounceOutDown"}]},{type:"fade",name:"浮现",children:[{name:"浮出",value:"fadeOut"},{name:"向下浮出",value:"fadeOutDown"},{name:"向下长距浮出",value:"fadeOutDownBig"},{name:"向左浮出",value:"fadeOutLeft"},{name:"向左长距浮出",value:"fadeOutLeftBig"},{name:"向右浮出",value:"fadeOutRight"},{name:"向右长距浮出",value:"fadeOutRightBig"},{name:"向上浮出",value:"fadeOutUp"},{name:"向上长距浮出",value:"fadeOutUpBig"},{name:"从左上浮出",value:"fadeOutTopLeft"},{name:"从右上浮出",value:"fadeOutTopRight"},{name:"从左下浮出",value:"fadeOutBottomLeft"},{name:"从右下浮出",value:"fadeOutBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转退出",value:"rotateOut"},{name:"绕左下退出",value:"rotateOutDownLeft"},{name:"绕右下退出",value:"rotateOutDownRight"},{name:"绕左上退出",value:"rotateOutUpLeft"},{name:"绕右上退出",value:"rotateOutUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"缩小退出",value:"zoomOut"},{name:"向下缩小退出",value:"zoomOutDown"},{name:"从左缩小退出",value:"zoomOutLeft"},{name:"从右缩小退出",value:"zoomOutRight"},{name:"向上缩小退出",value:"zoomOutUp"}]},{type:"slide",name:"滑出",children:[{name:"向下滑出",value:"slideOutDown"},{name:"从左滑出",value:"slideOutLeft"},{name:"从右滑出",value:"slideOutRight"},{name:"向上滑出",value:"slideOutUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转退出",value:"flipOutX"},{name:"Y轴翻转退出",value:"flipOutY"}]},{type:"back",name:"缩小滑出",children:[{name:"向下缩小滑出",value:"backOutDown"},{name:"从左缩小滑出",value:"backOutLeft"},{name:"从右缩小滑出",value:"backOutRight"},{name:"向上缩小滑出",value:"backOutUp"}]},{type:"lightSpeed",name:"飞出",children:[{name:"从右飞出",value:"lightSpeedOutRight"},{name:"从左飞出",value:"lightSpeedOutLeft"}]}],kk=[{type:"shake",name:"晃动",children:[{name:"左右摇晃",value:"shakeX"},{name:"上下摇晃",value:"shakeY"},{name:"摇头",value:"headShake"},{name:"摆动",value:"swing"},{name:"晃动",value:"wobble"},{name:"惊恐",value:"tada"},{name:"果冻",value:"jello"}]},{type:"other",name:"其他",children:[{name:"弹跳",value:"bounce"},{name:"闪烁",value:"flash"},{name:"脉搏",value:"pulse"},{name:"橡皮筋",value:"rubberBand"},{name:"心跳(快)",value:"heartBeat"}]}],bk=[{label:"无",value:"no"},{label:"随机",value:"random"},{label:"左右推移",value:"slideX"},{label:"上下推移",value:"slideY"},{label:"左右推移(3D)",value:"slideX3D"},{label:"上下推移(3D)",value:"slideY3D"},{label:"淡入淡出",value:"fade"},{label:"旋转",value:"rotate"},{label:"上下展开",value:"scaleY"},{label:"左右展开",value:"scaleX"},{label:"放大",value:"scale"},{label:"缩小",value:"scaleReverse"}],_k=e=>((0,i.dD)("data-v-5abd2ee4"),e=e(),(0,i.Cn)(),e),Ik={class:"element-animation-panel"},Sk={key:0,class:"element-animation"},Ck={class:"type-title"},Lk={class:"pool-item-wrapper"},Tk=["onMouseenter","onClick"],Ek={key:0,class:"mask"},Mk={key:1,class:"tip"},Uk={class:"sequence-content"},Wk={class:"index"},Dk={class:"text"},Hk={class:"handler"},Fk={key:0,class:"configs"},Ak={class:"config-item"},$k=_k((()=>(0,i._)("div",{style:{width:"35%"}},"持续时长:",-1))),Zk={class:"config-item"},Ok=_k((()=>(0,i._)("div",{style:{width:"35%"}},"触发方式:",-1))),Rk={class:"config-item"};var zk=(0,i.aZ)({__name:"ElementAnimationPanel",setup(e){const t={};for(const o of wk)for(const e of o.children)t[e.value]=e.name;for(const o of xk)for(const e of o.children)t[e.value]=e.name;for(const o of kk)for(const e of o.children)t[e.value]=e.name;const l=["in","out","attention"],a=$(),{handleElement:n,handleElementId:u}=(0,o.Jk)(R()),{currentSlide:c,formatedAnimations:d,currentSlideAnimations:p}=(0,o.Jk)(a),v=[{key:"in",label:"入场",color:"#68a490"},{key:"out",label:"退场",color:"#d86344"},{key:"attention",label:"强调",color:"#e8b76a"}],m=(0,s.iH)("in"),h=(0,s.iH)(!1);(0,i.YP)((()=>u.value),(()=>{g.value=!1}));const f=(0,s.iH)(""),g=(0,s.iH)(!1),{addHistorySnapshot:y}=da(),w=(0,i.Fl)((()=>{const e=[];for(let l=0;le.id===o.elId));if(!i)continue;const s=$n[i.type],r=t[o.effect];e.push({...o,index:0===n?l+1:"",elType:s,animationEffect:r})}}return e})),x=(0,i.Fl)((()=>{const e=p.value,t=e.filter((e=>e.elId===u.value));return t||[]})),k=e=>{const t=p.value.filter((t=>t.id!==e));a.updateSlide({animations:t}),y()},b=e=>{const{newIndex:t,oldIndex:l}=e;if(void 0===t||void 0===l||t===l)return;const n=JSON.parse(JSON.stringify(p.value)),o=n[l];n.splice(l,1),n.splice(t,0,o),a.updateSlide({animations:n}),y()},_=(e,t,l)=>{const a=document.querySelector(`#editable-element-${e} [class^=editable-element-]`);if(a){const e=`${yk}${t}`;document.documentElement.style.setProperty("--animate-duration",`${l}ms`),a.classList.add(`${yk}animated`,e);const n=()=>{document.documentElement.style.removeProperty("--animate-duration"),a.classList.remove(`${yk}animated`,e)};a.addEventListener("animationend",n,{once:!0})}},I=async()=>{h.value=!h.value;for(let e=0;esetTimeout(e,t.duration+100))),_(t.elId,t.effect,t.duration),e>=w.value.length-1&&(h.value=!1)}},S=(e,t)=>{if(t<100||t>5e3)return;const l=p.value.map((l=>l.id===e?{...l,duration:t}:l));a.updateSlide({animations:l}),y()},C=(e,t)=>{const l=p.value.map((l=>l.id===e?{...l,trigger:t}:l));a.updateSlide({animations:l}),y()},L=(e,t)=>{const l=p.value.map((l=>l.id===T.value?{...l,type:e,effect:t}:l));a.updateSlide({animations:l}),g.value=!1,y();const n=p.value.find((e=>e.elId===u.value)),o=n?.duration||fk;setTimeout((()=>{_(u.value,t,o)}),0)},T=(0,s.iH)(""),E=(e,t)=>{if(T.value)return void L(e,t);const l=JSON.parse(JSON.stringify(p.value));l.push({id:(0,r.x0)(10),elId:u.value,type:e,effect:t,duration:fk,trigger:gk}),a.updateSlide({animations:l}),g.value=!1,y(),setTimeout((()=>{_(u.value,t,fk)}),0)},M=(0,s.iH)(!1),U=e=>{e?setTimeout((()=>M.value=!0),600):M.value=!1},W=e=>{g.value=!0,T.value=e,U(!0)},D={in:wk,out:xk,attention:kk};return(e,t)=>{const a=(0,i.up)("IconEffects"),o=(0,i.up)("IconClick"),r=(0,i.up)("IconPlayOne"),u=(0,i.up)("IconCloseSmall"),c=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Ik,[(0,s.SU)(n)?((0,i.wg)(),(0,i.iD)("div",Sk,[(0,i.Wm)(dn,{trigger:"click",value:g.value,"onUpdate:value":[t[3]||(t[3]=e=>g.value=e),t[4]||(t[4]=e=>U(e))],style:{width:"100%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(Kd,{tabs:v,value:m.value,"onUpdate:value":t[0]||(t[0]=e=>m.value=e),tabsStyle:{marginBottom:"20px"},tabStyle:{width:"33.333%"},spaceAround:""},null,8,["value"]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>((0,i.wg)(),(0,i.iD)(i.HY,null,[m.value===e?((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["animation-pool",e]),key:e},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(D[e],(l=>((0,i.wg)(),(0,i.iD)("div",{class:"pool-type",key:l.name},[(0,i._)("div",Ck,(0,oe.zw)(l.name)+":",1),(0,i._)("div",Lk,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.children,(l=>((0,i.wg)(),(0,i.iD)("div",{class:"pool-item",key:l.name,onMouseenter:e=>f.value=l.value,onMouseleave:t[1]||(t[1]=e=>f.value=""),onClick:t=>E(e,l.value)},[(0,i._)("div",{class:(0,oe.C_)(["animation-box",[`${(0,s.SU)(yk)}animated`,`${(0,s.SU)(yk)}fast`,f.value===l.value&&`${(0,s.SU)(yk)}${l.value}`]])},(0,oe.zw)(l.name),3)],40,Tk)))),128))])])))),128)),M.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",Ek))],2)):(0,i.kq)("",!0)],64)))),64))])),default:(0,i.w5)((()=>[(0,i.Wm)(tp,{class:"element-animation-btn",onClick:t[2]||(t[2]=e=>T.value="")},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{style:{"margin-right":"5px"}}),(0,i.Uk)(" 添加动画 ")])),_:1})])),_:1},8,["value"])])):((0,i.wg)(),(0,i.iD)("div",Mk,[(0,i.Wm)(o,{style:{"margin-right":"5px"}}),(0,i.Uk)(" 选中画布中的元素添加动画")])),(0,i.Wm)(Zc),(0,i.Wm)((0,s.SU)(Dm()),{class:"animation-sequence",modelValue:w.value,animation:200,scroll:!0,scrollSensitivity:50,handle:".sequence-content",itemKey:"id",onEnd:b},{item:(0,i.w5)((({element:e})=>[(0,i._)("div",{class:(0,oe.C_)(["sequence-item",[e.type,{active:(0,s.SU)(n)?.id===e.elId}]])},[(0,i._)("div",Uk,[(0,i._)("div",Wk,(0,oe.zw)(e.index),1),(0,i._)("div",Dk,"【"+(0,oe.zw)(e.elType)+"】"+(0,oe.zw)(e.animationEffect),1),(0,i._)("div",Hk,[(0,i.wy)((0,i.Wm)(r,{class:"handler-btn",onClick:t=>_(e.elId,e.effect,e.duration)},null,8,["onClick"]),[[c,"预览"]]),(0,i.wy)((0,i.Wm)(u,{class:"handler-btn",onClick:t=>k(e.id)},null,8,["onClick"]),[[c,"删除"]])])]),x.value[0]?.elId===e.elId?((0,i.wg)(),(0,i.iD)("div",Fk,[(0,i.Wm)(Zc,{style:{margin:"16px 0"}}),(0,i._)("div",Ak,[$k,(0,i.Wm)(mv,{min:500,max:3e3,step:500,value:e.duration,"onUpdate:value":t=>S(e.id,t),style:{width:"65%"}},null,8,["value","onUpdate:value"])]),(0,i._)("div",Zk,[Ok,(0,i.Wm)(cp,{value:e.trigger,"onUpdate:value":t=>C(e.id,t),style:{width:"65%"},options:[{label:"主动触发",value:"click"},{label:"与上一动画同时",value:"meantime"},{label:"上一动画之后",value:"auto"}]},null,8,["value","onUpdate:value"])]),(0,i._)("div",Rk,[(0,i.Wm)(tp,{style:{width:"100%"},onClick:t=>W(e.id)},{default:(0,i.w5)((()=>[(0,i.Uk)("更换动画")])),_:2},1032,["onClick"])])])):(0,i.kq)("",!0)],2)])),_:1},8,["modelValue"]),w.value.length>=2?((0,i.wg)(),(0,i.iD)(i.HY,{key:2},[(0,i.Wm)(Zc),(0,i.Wm)(tp,{onClick:t[5]||(t[5]=e=>I())},{default:(0,i.w5)((()=>[(0,i.Uk)((0,oe.zw)(h.value?"停止预览":"预览全部"),1)])),_:1})],64)):(0,i.kq)("",!0)])}}});const Pk=(0,Vl.Z)(zk,[["__scopeId","data-v-5abd2ee4"]]);var Bk=Pk;const Nk=[{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#5b9bd5","#ed7d31","#a5a5a5","#ffc000","#4472c4","#70ad47"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#83992a","#3c9670","#44709d","#a23b32","#d87728","#deb340"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#e48312","#bd582c","#865640","#9b8357","#c2bc80","#94a088"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#90c225","#54a121","#e6b91e","#e86618","#c42f19","#918756"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#1cade4","#2683c6","#27ced7","#42ba97","#3e8853","#62a39f"]},{background:"#e9efd6",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#a5300f","#de7e18","#9f8351","#728653","#92aa4c","#6aac91"]},{background:"#17444e",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#b01513","#ea6312","#e6b729","#6bab90","#55839a","#9e5d9d"]},{background:"#36234d",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#b31166","#e33d6f","#e45f3c","#e9943a","#9b6bf2","#d63cd0"]},{background:"#247fad",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#052f61","#a50e82","#14967c","#6a9e1f","#e87d37","#c62324"]},{background:"#103f55",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#40aebd","#97e8d5","#a1cf49","#628f3e","#f2df3a","#fcb01c"]},{background:"#242367",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#ac3ec1","#477bd1","#46b298","#90ba4c","#dd9d31","#e25345"]},{background:"#e4b75e",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#f0a22e","#a5644e","#b58b80","#c3986d","#a19574","#c17529"]},{background:"#333333",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]}];var jk=()=>{const e=$(),{slides:t,currentSlide:l,theme:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=da(),i=e=>{const t=[];for(const l of e.elements){if("shape"===l.type&&0!==(0,W.Z)(l.fill).getAlpha()){const e=(0,W.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("text"===l.type&&l.fill&&0!==(0,W.Z)(l.fill).getAlpha()){const e=(0,W.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("table"===l.type&&l.theme&&0!==(0,W.Z)(l.theme.color).getAlpha()){const e=(0,W.Z)(l.theme.color).toRgbString();t.includes(e)||t.push(e)}if("chart"===l.type&&l.fill&&0!==(0,W.Z)(l.fill).getAlpha()){const e=(0,W.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("line"===l.type&&0!==(0,W.Z)(l.color).getAlpha()){const e=(0,W.Z)(l.color).toRgbString();t.includes(e)||t.push(e)}if("audio"===l.type&&0!==(0,W.Z)(l.color).getAlpha()){const e=(0,W.Z)(l.color).toRgbString();t.includes(e)||t.push(e)}}return t},s=(e,t)=>{const l=i(e),a={};if(l.length>t.length){const e=(0,W.Z)(t[0]).analogous(l.length-t.length+10),a=e.map((e=>e.toHexString())).slice(1);t.push(...a)}for(let n=0;n{const l=s(e,t.colors);e.background&&"image"===e.background.type||(e.background={type:"solid",color:t.background});for(const a of e.elements){if("shape"===a.type&&(a.fill=l[(0,W.Z)(a.fill).toRgbString()]||a.fill,a.gradient&&delete a.gradient),"text"===a.type&&(a.fill&&(a.fill=l[(0,W.Z)(a.fill).toRgbString()]||a.fill),a.defaultColor=t.fontColor,a.defaultFontName=t.fontname),"table"===a.type){a.theme&&(a.theme.color=l[(0,W.Z)(a.theme.color).toRgbString()]||a.theme.color);for(const e of a.data)for(const l of e)l.style&&(l.style.color=t.fontColor,l.style.fontname=t.fontname)}"chart"===a.type&&(a.themeColor=[l[(0,W.Z)(a.themeColor[0]).toRgbString()]]||0,a.gridColor=t.fontColor),"line"===a.type&&(a.color=l[(0,W.Z)(a.color).toRgbString()]||a.color),"audio"===a.type&&(a.color=l[(0,W.Z)(a.color).toRgbString()]||a.color),"latex"===a.type&&(a.color=t.fontColor)}},u=t=>{const a=JSON.parse(JSON.stringify(l.value));r(a,t),e.updateSlide({background:a.background,elements:a.elements}),n()},c=l=>{const a=JSON.parse(JSON.stringify(t.value));for(const e of a)r(e,l);e.setTheme({backgroundColor:l.background,themeColor:l.colors[0],fontColor:l.fontColor,fontName:l.fontname}),e.setSlides(a),n()},d=(l=!1)=>{const o=JSON.parse(JSON.stringify(t.value)),{themeColor:i,backgroundColor:s,fontColor:r,fontName:u,outline:c,shadow:d}=a.value;for(const e of o){e.background&&"image"===e.background.type||(e.background={type:"solid",color:s});for(const t of e.elements)if(l&&("outline"in t&&t.outline&&(t.outline=c),"shadow"in t&&t.shadow&&(t.shadow=d)),"shape"===t.type)t.fill=i;else if("line"===t.type)t.color=i;else if("text"===t.type)t.defaultColor=r,t.defaultFontName=u,t.fill&&(t.fill=i);else if("table"===t.type){t.theme&&(t.theme.color=i);for(const e of t.data)for(const t of e)t.style&&(t.style.color=r,t.style.fontname=u)}else"chart"===t.type?(t.themeColor=[i],t.gridColor=r):"latex"===t.type?t.color=r:"audio"===t.type&&(t.color=i)}e.setSlides(o),n()};return{applyPresetThemeToSingleSlide:u,applyPresetThemeToAllSlides:c,applyThemeToAllSlides:d}};const Yk=e=>((0,i.dD)("data-v-9a96acfa"),e=e(),(0,i.Cn)(),e),Vk={class:"slide-design-panel"},Jk=Yk((()=>(0,i._)("div",{class:"title"},"背景填充",-1))),qk={class:"row"},Xk=Yk((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Gk={key:0,class:"background-image-wrapper"},Kk={class:"background-image"},Qk={key:1,class:"background-gradient-wrapper"},eb={class:"row"},tb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"起点颜色:",-1))),lb={class:"row"},ab=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"终点颜色:",-1))),nb={key:0,class:"row"},ob=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"渐变角度:",-1))),ib={class:"row"},sb={class:"row"},rb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"画布尺寸:",-1))),ub={class:"title"},cb=Yk((()=>(0,i._)("span",null,"全局主题",-1))),db=Yk((()=>(0,i._)("span",{class:"text"},"更多",-1))),pb={class:"row"},vb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"字体:",-1))),mb={class:"row"},hb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"字体颜色:",-1))),fb={class:"row"},gb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"背景颜色:",-1))),yb={class:"row"},wb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"主题色:",-1))),xb={class:"row"},kb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"边框样式:",-1))),bb={class:"row"},_b=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"边框颜色:",-1))),Ib={class:"row"},Sb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"边框粗细:",-1))),Cb={class:"row",style:{height:"30px"}},Lb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"水平阴影:",-1))),Tb={class:"row",style:{height:"30px"}},Eb=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"垂直阴影:",-1))),Mb={class:"row",style:{height:"30px"}},Ub=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"模糊距离:",-1))),Wb={class:"row"},Db=Yk((()=>(0,i._)("div",{style:{width:"40%"}},"阴影颜色:",-1))),Hb={class:"row"},Fb=Yk((()=>(0,i._)("div",{class:"title"},"预置主题",-1))),Ab={class:"theme-list"},$b={class:"theme-item-content"},Zb={class:"colors"},Ob={class:"btns"},Rb=["onClick"],zb=["onClick"];var Pb=(0,i.aZ)({__name:"SlideDesignPanel",setup(e){const t=$(),{availableFonts:l}=(0,o.Jk)(R()),{slides:a,currentSlide:n,viewportRatio:r,theme:u}=(0,o.Jk)(t),c=(0,s.iH)(!1),d=(0,i.Fl)((()=>n.value.background?n.value.background:{type:"solid",value:"#fff"})),{addHistorySnapshot:p}=da(),{applyPresetThemeToSingleSlide:v,applyPresetThemeToAllSlides:m,applyThemeToAllSlides:h}=jk(),f=e=>{if("solid"===e){const e={...d.value,type:"solid",color:d.value.color||"#fff"};t.updateSlide({background:e})}else if("image"===e){const e={...d.value,type:"image",image:d.value.image||"",imageSize:d.value.imageSize||"cover"};t.updateSlide({background:e})}else{const e={...d.value,type:"gradient",gradientType:d.value.gradientType||"linear",gradientColor:d.value.gradientColor||["#fff","#fff"],gradientRotate:d.value.gradientRotate||0};t.updateSlide({background:e})}p()},g=e=>{t.updateSlide({background:{...d.value,...e}}),p()},y=e=>{const t=e[0];t&&na(t).then((e=>g({image:e})))},w=()=>{const e=a.value.map((e=>({...e,background:n.value.background})));t.setSlides(e),p()},x=e=>{t.setTheme(e)},k=e=>{t.setViewportRatio(e)};return(e,t)=>{const a=(0,i.up)("IconPlus"),n=(0,i.up)("IconDown"),o=(0,i.up)("IconRight");return(0,i.wg)(),(0,i.iD)("div",Vk,[Jk,(0,i._)("div",qk,[(0,i.Wm)(cp,{style:{flex:"1"},value:d.value.type,"onUpdate:value":t[0]||(t[0]=e=>f(e)),options:[{label:"纯色填充",value:"solid"},{label:"图片填充",value:"image"},{label:"渐变填充",value:"gradient"}]},null,8,["value"]),Xk,"solid"===d.value.type?((0,i.wg)(),(0,i.j4)(dn,{key:0,trigger:"click",style:{flex:"1"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:d.value.color,"onUpdate:modelValue":t[1]||(t[1]=e=>g({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:d.value.color||"#fff"},null,8,["color"])])),_:1})):"image"===d.value.type?((0,i.wg)(),(0,i.j4)(cp,{key:1,style:{flex:"1"},value:d.value.imageSize||"cover","onUpdate:value":t[2]||(t[2]=e=>g({imageSize:e})),options:[{label:"缩放",value:"contain"},{label:"拼贴",value:"repeat"},{label:"缩放铺满",value:"cover"}]},null,8,["value"])):((0,i.wg)(),(0,i.j4)(cp,{key:2,style:{flex:"1"},value:d.value.gradientType||"","onUpdate:value":t[3]||(t[3]=e=>g({gradientType:e})),options:[{label:"线性渐变",value:"linear"},{label:"径向渐变",value:"radial"}]},null,8,["value"]))]),"image"===d.value.type?((0,i.wg)(),(0,i.iD)("div",Gk,[(0,i.Wm)(Pa,{onChange:t[4]||(t[4]=e=>y(e))},{default:(0,i.w5)((()=>[(0,i._)("div",Kk,[(0,i._)("div",{class:"content",style:(0,oe.j5)({backgroundImage:`url(${d.value.image})`})},[(0,i.Wm)(a)],4)])])),_:1})])):(0,i.kq)("",!0),"gradient"===d.value.type?((0,i.wg)(),(0,i.iD)("div",Qk,[(0,i._)("div",eb,[tb,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:d.value.gradientColor[0],"onUpdate:modelValue":t[5]||(t[5]=e=>g({gradientColor:[e,d.value.gradientColor[1]]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:d.value.gradientColor[0]},null,8,["color"])])),_:1})]),(0,i._)("div",lb,[ab,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:d.value.gradientColor[1],"onUpdate:modelValue":t[6]||(t[6]=e=>g({gradientColor:[d.value.gradientColor[0],e]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:d.value.gradientColor[1]},null,8,["color"])])),_:1})]),"linear"===d.value.gradientType?((0,i.wg)(),(0,i.iD)("div",nb,[ob,(0,i.Wm)(qm,{min:0,max:360,step:15,value:d.value.gradientRotate||0,"onUpdate:value":t[7]||(t[7]=e=>g({gradientRotate:e})),style:{width:"60%"}},null,8,["value"])])):(0,i.kq)("",!0)])):(0,i.kq)("",!0),(0,i._)("div",ib,[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[8]||(t[8]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用背景到全部")])),_:1})]),(0,i.Wm)(Zc),(0,i._)("div",sb,[rb,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(r),"onUpdate:value":t[9]||(t[9]=e=>k(e)),options:[{label:"宽屏 16 : 9",value:.5625},{label:"宽屏 16 : 10",value:.625},{label:"标准 4 : 3",value:.75},{label:"纸张 A3 / A4",value:.70710678}]},null,8,["value"])]),(0,i.Wm)(Zc),(0,i._)("div",ub,[cb,(0,i._)("span",{class:"more",onClick:t[10]||(t[10]=e=>c.value=!c.value)},[db,c.value?((0,i.wg)(),(0,i.j4)(n,{key:0})):((0,i.wg)(),(0,i.j4)(o,{key:1}))])]),(0,i._)("div",pb,[vb,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(u).fontName,"onUpdate:value":t[11]||(t[11]=e=>x({fontName:e})),options:[...(0,s.SU)(l),...(0,s.SU)(M)]},null,8,["value","options"])]),(0,i._)("div",mb,[hb,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).fontColor,"onUpdate:modelValue":t[12]||(t[12]=e=>x({fontColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(u).fontColor},null,8,["color"])])),_:1})]),(0,i._)("div",fb,[gb,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).backgroundColor,"onUpdate:modelValue":t[13]||(t[13]=e=>x({backgroundColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(u).backgroundColor},null,8,["color"])])),_:1})]),(0,i._)("div",yb,[wb,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).themeColor,"onUpdate:modelValue":t[14]||(t[14]=e=>x({themeColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(u).themeColor},null,8,["color"])])),_:1})]),c.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:2},[(0,i._)("div",xb,[kb,(0,i.Wm)(cp,{style:{width:"60%"},value:(0,s.SU)(u).outline.style||"","onUpdate:value":t[15]||(t[15]=e=>x({outline:{...(0,s.SU)(u).outline,style:e}})),options:[{label:"实线边框",value:"solid"},{label:"虚线边框",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",bb,[_b,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).outline.color,"onUpdate:modelValue":t[16]||(t[16]=e=>x({outline:{...(0,s.SU)(u).outline,color:e}}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(u).outline.color||"#000"},null,8,["color"])])),_:1})]),(0,i._)("div",Ib,[Sb,(0,i.Wm)(mv,{value:(0,s.SU)(u).outline.width||0,"onUpdate:value":t[17]||(t[17]=e=>x({outline:{...(0,s.SU)(u).outline,width:e}})),style:{width:"60%"}},null,8,["value"])]),(0,i._)("div",Cb,[Lb,(0,i.Wm)(qm,{style:{width:"60%"},min:-10,max:10,step:1,value:(0,s.SU)(u).shadow.h,"onUpdate:value":t[18]||(t[18]=e=>x({shadow:{...(0,s.SU)(u).shadow,h:e}}))},null,8,["value"])]),(0,i._)("div",Tb,[Eb,(0,i.Wm)(qm,{style:{width:"60%"},min:-10,max:10,step:1,value:(0,s.SU)(u).shadow.v,"onUpdate:value":t[19]||(t[19]=e=>x({shadow:{...(0,s.SU)(u).shadow,v:e}}))},null,8,["value"])]),(0,i._)("div",Mb,[Ub,(0,i.Wm)(qm,{style:{width:"60%"},min:1,max:20,step:1,value:(0,s.SU)(u).shadow.blur,"onUpdate:value":t[20]||(t[20]=e=>x({shadow:{...(0,s.SU)(u).shadow,blur:e}}))},null,8,["value"])]),(0,i._)("div",Wb,[Db,(0,i.Wm)(dn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:(0,s.SU)(u).shadow.color,"onUpdate:modelValue":t[21]||(t[21]=e=>x({shadow:{...(0,s.SU)(u).shadow,color:e}}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(ih,{color:(0,s.SU)(u).shadow.color},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0),(0,i._)("div",Hb,[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[22]||(t[22]=e=>(0,s.SU)(h)(c.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("应用主题到全部")])),_:1})]),(0,i.Wm)(Zc),Fb,(0,i._)("div",Ab,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(Nk),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"theme-item",key:t,style:(0,oe.j5)({backgroundColor:e.background,fontFamily:e.fontname})},[(0,i._)("div",$b,[(0,i._)("div",{class:"text",style:(0,oe.j5)({color:e.fontColor})},"文字 Aa",4),(0,i._)("div",Zb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.colors,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"color-block",key:t,style:(0,oe.j5)({backgroundColor:e})},null,4)))),128))]),(0,i._)("div",Ob,[(0,i._)("div",{class:"btn",onClick:t=>(0,s.SU)(v)(e)},"应用",8,Rb),(0,i._)("div",{class:"btn",onClick:t=>(0,s.SU)(m)(e)},"应用全局",8,zb)])])],4)))),128))])])}}});const Bb=(0,Vl.Z)(Pb,[["__scopeId","data-v-9a96acfa"]]);var Nb=Bb;const jb={class:"slide-animation-panel"},Yb={class:"animation-pool"},Vb=["onClick"],Jb={class:"animation-text"};var qb=(0,i.aZ)({__name:"SlideAnimationPanel",setup(e){const t=$(),{slides:l,currentSlide:a}=(0,o.Jk)(t),n=(0,i.Fl)((()=>a.value.turningMode||"slideY")),r=bk,{addHistorySnapshot:u}=da(),c=e=>{e!==n.value&&(t.updateSlide({turningMode:e}),u())},d=()=>{const e=l.value.map((e=>({...e,turningMode:a.value.turningMode})));t.setSlides(e),ta.success("已应用到全部"),u()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",jb,[(0,i._)("div",Yb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(r),(e=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["animation-item",{active:n.value===e.value}]),key:e.label,onClick:t=>c(e.value)},[(0,i._)("div",{class:(0,oe.C_)(["animation-block",e.value])},null,2),(0,i._)("div",Jb,(0,oe.zw)(e.label),1)],10,Vb)))),128))]),(0,i.Wm)(tp,{style:{width:"100%"},onClick:t[0]||(t[0]=e=>d())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用到全部")])),_:1})]))}});const Xb=(0,Vl.Z)(qb,[["__scopeId","data-v-0562c530"]]);var Gb=Xb,Kb=()=>{const e=$(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(R()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=da(),i=o=>{const{minX:i,maxX:s,minY:r,maxY:u}=ke(l.value),c=JSON.parse(JSON.stringify(a.value.elements)),d={};for(const e of l.value)if(e.groupId&&!d[e.groupId]){const t=l.value.filter((t=>t.groupId===e.groupId));d[e.groupId]=ke(t)}if(o===ee.LEFT)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.minX-i;e.left=e.left-l}else if("rotate"in e&&e.rotate){const{offsetX:t}=we({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=i-t}else e.left=i}));else if(o===ee.RIGHT)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.maxX-s;e.left=e.left-l}else{const t="line"===e.type?Math.max(e.start[0],e.end[0]):e.width;if("rotate"in e&&e.rotate){const{offsetX:l}=we({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=s-t+l}else e.left=s-t}}));else if(o===ee.TOP)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.minY-r;e.top=e.top-l}else if("rotate"in e&&e.rotate){const{offsetY:t}=we({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=r-t}else e.top=r}));else if(o===ee.BOTTOM)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.maxY-u;e.top=e.top-l}else{const t="line"===e.type?Math.max(e.start[1],e.end[1]):e.height;if("rotate"in e&&e.rotate){const{offsetY:l}=we({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=u-t+l}else e.top=u-t}}));else if(o===ee.HORIZONTAL){const e=(i+s)/2;c.forEach((l=>{if(t.value.includes(l.id))if(l.groupId){const t=d[l.groupId],a=(t.maxX+t.minX)/2,n=a-e;l.left=l.left-n}else{const t="line"===l.type?Math.max(l.start[0],l.end[0]):l.width;l.left=e-t/2}}))}else if(o===ee.VERTICAL){const e=(r+u)/2;c.forEach((l=>{if(t.value.includes(l.id))if(l.groupId){const t=d[l.groupId],a=(t.maxY+t.minY)/2,n=a-e;l.top=l.top-n}else{const t="line"===l.type?Math.max(l.start[1],l.end[1]):l.height;l.top=e-t/2}}))}e.updateSlide({elements:c}),n()};return{alignActiveElement:i}},Qb=()=>{const e=$(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(R()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=da(),s=(0,i.Fl)((()=>{let e=0;const t=[];for(const a of l.value)a.groupId?t.includes(a.groupId)||(t.push(a.groupId),e+=1):e+=1;return e})),r=()=>{const{minX:o,maxX:i}=ke(l.value),s=JSON.parse(JSON.stringify(l.value)),r=JSON.parse(JSON.stringify(a.value.elements)),u=[];let c=[];for(const e of s)if(e.groupId){const t=c.find((t=>t.groupId===e.groupId));t?c=c.map((t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t)):c.push({groupId:e.groupId,els:[e]})}else{const{minX:t,maxX:l}=xe(e);u.push({min:t,max:l,el:e})}const d=[];for(const e of c){const{minX:t,maxX:l}=ke(e.els);d.push({min:t,max:l,els:e.els})}const p=[...u,...d];p.sort(((e,t)=>e.min-t.min));let v=0;for(const e of p){const t=e.max-e.min;v+=t}const m=(i-o-v)/(p.length-1),h=[],f=p[0];let g={min:f.min,max:f.max};if("el"in f)h.push({pos:f.min,el:f.el});else for(const e of f.els){const{minX:t}=xe(e);h.push({pos:t,el:e})}for(let e=1;e{const{minY:o,maxY:i}=ke(l.value),s=JSON.parse(JSON.stringify(l.value)),r=JSON.parse(JSON.stringify(a.value.elements)),u=[];let c=[];for(const e of s)if(e.groupId){const t=c.find((t=>t.groupId===e.groupId));t?c=c.map((t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t)):c.push({groupId:e.groupId,els:[e]})}else{const{minY:t,maxY:l}=xe(e);u.push({min:t,max:l,el:e})}const d=[];for(const e of c){const{minY:t,maxY:l}=ke(e.els);d.push({min:t,max:l,els:e.els})}const p=[...u,...d];p.sort(((e,t)=>e.min-t.min));let v=0;for(const e of p){const t=e.max-e.min;v+=t}const m=(i-o-v)/(p.length-1),h=[],f=p[0];let g={min:f.min,max:f.max};if("el"in f)h.push({pos:f.min,el:f.el});else for(const e of f.els){const{minY:t}=xe(e);h.push({pos:t,el:e})}for(let e=1;e{t.value?n(e):o(e)};return(e,n)=>{const o=(0,i.up)("IconAlignLeft"),p=(0,i.up)("IconAlignHorizontally"),v=(0,i.up)("IconAlignRight"),m=(0,i.up)("IconAlignTop"),h=(0,i.up)("IconAlignVertically"),f=(0,i.up)("IconAlignBottom"),g=(0,i.up)("IconGroup"),y=(0,i.up)("IconUngroup"),w=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",e_,[(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[0]||(n[0]=e=>d((0,s.SU)(ee).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1})),[[w,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[1]||(n[1]=e=>d((0,s.SU)(ee).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(p)])),_:1})),[[w,"水平居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[2]||(n[2]=e=>d((0,s.SU)(ee).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(v)])),_:1})),[[w,"右对齐"]])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[3]||(n[3]=e=>d((0,s.SU)(ee).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(m)])),_:1})),[[w,"上对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[4]||(n[4]=e=>d((0,s.SU)(ee).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(h)])),_:1})),[[w,"垂直居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(tp,{style:{flex:"1"},onClick:n[5]||(n[5]=e=>d((0,s.SU)(ee).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1})),[[w,"下对齐"]])])),_:1}),(0,s.SU)(r)>2?((0,i.wg)(),(0,i.j4)(Kf,{key:0,class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:n[6]||(n[6]=e=>(0,s.SU)(u)())},{default:(0,i.w5)((()=>[(0,i.Uk)("水平均匀分布")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:n[7]||(n[7]=e=>(0,s.SU)(c)())},{default:(0,i.w5)((()=>[(0,i.Uk)("垂直均匀分布")])),_:1})])),_:1})):(0,i.kq)("",!0),(0,i.Wm)(Zc),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{disabled:!(0,s.SU)(t),onClick:n[8]||(n[8]=e=>(0,s.SU)(l)()),style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(g,{style:{"margin-right":"3px"}}),(0,i.Uk)("组合")])),_:1},8,["disabled"]),(0,i.Wm)(tp,{disabled:(0,s.SU)(t),onClick:n[9]||(n[9]=e=>(0,s.SU)(a)()),style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{style:{"margin-right":"3px"}}),(0,i.Uk)("取消组合")])),_:1},8,["disabled"])])),_:1})])}}});const l_=(0,Vl.Z)(t_,[["__scopeId","data-v-e95a4c6c"]]);var a_=l_;const n_=[{key:"letter",label:"字母",children:["α","β","γ","δ","ϵ","ε","ζ","η","θ","ϑ","ι","κ","λ","μ","ν","ξ","π","ϖ","ρ","ϱ","σ","ς","τ","υ","ϕ","φ","χ","ψ","ω","Γ","Δ","Θ","Λ","Ξ","Π","Σ","Υ","Φ","Ψ","Ω","𝐀","𝐁","𝐂","𝐃","𝐄","𝐅","𝐆","𝐇","𝐈","𝐉","𝐊","𝐋","𝐌","𝐍","𝐎","𝐏","𝐐","𝐑","𝐒","𝐓","𝐔","𝐕","𝐖","𝐗","𝐘","𝐙","𝐚","𝐛","𝐜","𝐝","𝐞","𝐟","𝐠","𝐡","𝐢","𝐣","𝐤","𝐥","𝐦","𝐧","𝐨","𝐩","𝐪","𝐫","𝐬","𝐭","𝐮","𝐯","𝐰","𝐱","𝐲","𝐳","𝓐","𝓑","𝓒","𝓓","𝓔","𝓕","𝓖","𝓗","𝓘","𝓙","𝓚","𝓛","𝓜","𝓝","𝓞","𝓟","𝓠","𝓡","𝓢","𝓣","𝓤","𝓥","𝓦","𝓧","𝓨","𝓩","𝓪","𝓫","𝓬","𝓭","𝓮","𝓯","𝓰","𝓱","𝓲","𝓳","𝓴","𝓵","𝓶","𝓷","𝓸","𝓹","𝓺","𝓻","𝓼","𝓽","𝓾","𝓿","𝔀","𝔁","𝔂","𝔃"]},{key:"number",label:"序号",children:["①","②","③","④","⑤","⑥","⑦","⑧","⑨","⑩","⑪","⑫","⑬","⑭","⑮","⑯","⑰","⑱","⑲","⑳","⑴","⑵","⑶","⑷","⑸","⑹","⑺","⑻","⑼","⑽","⑾","⑿","⒀","⒁","⒂","⒃","⒄","⒅","⒆","⒇","º","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","₀","₁","₂","₃","₄","₅","₆","₇","₈","₉","Ⅰ","Ⅱ","Ⅲ","Ⅳ","Ⅴ","Ⅵ","Ⅶ","Ⅷ","Ⅸ","Ⅹ","Ⅺ","Ⅻ","Ⅼ","Ⅽ","Ⅾ","Ⅿ","ⅰ","ⅱ","ⅲ","ⅳ","ⅴ","ⅵ","ⅶ","ⅷ","ⅸ","ⅹ","ⅺ","ⅻ","ⅼ","ⅽ","ⅾ","ⅿ","ↀ","ↁ","ↂ","㊀","㊁","㊂","㊃","㊄","㊅","㊆","㊇","㊈","㊉","㈠","㈡","㈢","㈣","㈤","㈥","㈦","㈧","㈨","㈩","𝟘","𝟙","𝟚","𝟛","𝟜","𝟝","𝟞","𝟟","𝟠","𝟡"]},{key:"math",label:"数学",children:["+","-","×","÷","=","~","¬","±","%","°","ǃ","‰","‱","½","⅓","⅔","¼","¾","<",">","l","o","g","l","g","l","n","⨂","⨁","⨄","⨃","⨅","⨆","√","∛","∜","∝","∞","∟","∠","∡","∢","∧","∨","∩","∪","∫","∬","∭","∮","∯","∰","∱","∲","∳","∴","∵","∼","∽","∾","∿","≃","≄","≅","≆","≇","≈","≊","≋","≌","≍","≎","≏","≐","≑","≒","≓","≔","≕","≤","≥","≦","≧","≨","≩","≪","≫","≺","≻","≼","≽","≾","≿","⊀","⊁","⊂","⊃","⊄","⊅","⊆","⊇","⊈","⊉","⊊","⊋","⊏","⊐","⊑","⊒","⊓","⊔","⊢","⊣","⊤","⊥","⊦","⊧","⊨","⊩","⊪","⊫","⊬","⊭","⊮","⊯","⊲","⊳","⊴","⊵","⋀","⋁","⋂","⋃","⋉","⋊","⋋","⋌","⟨","⟩","⟪","⟫","⟮","⟯","⧼","⧽","⦰"]},{key:"arrow",label:"箭头",children:["←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿"]},{key:"graph",label:"图形",children:["▢","▣","▤","▥","▦","▧","▨","▩","▭","▮","▯","▰","▱","▲","▷","▼","◁","◈","◉","◍","◐","◑","◒","◓","◔","◕","◧","◨","◩","◪","◫","◬","◭","◮"]}],o_={class:"symbol-panel"},i_={class:"pool"},s_=["onClick"],r_={class:"symbol"};var u_=(0,i.aZ)({__name:"SymbolPanel",setup(e){const t=(0,s.iH)(n_[0].key),l=(0,i.Fl)((()=>{const e=n_.find((e=>e.key===t.value));return e?.children||[]})),a=n_.map((e=>({key:e.key,label:e.label}))),n=e=>{Oi.emit(Ai.RICH_TEXT_COMMAND,{action:{command:"insert",value:e}})};return(e,o)=>((0,i.wg)(),(0,i.iD)("div",o_,[(0,i.Wm)(Kd,{tabs:(0,s.SU)(a),value:t.value,"onUpdate:value":o[0]||(o[0]=e=>t.value=e),tabsStyle:{marginBottom:"8px"},spaceBetween:""},null,8,["tabs","value"]),(0,i._)("div",i_,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-item",key:t,onClick:t=>n(e)},[(0,i._)("div",r_,(0,oe.zw)(e),1)],8,s_)))),128))])]))}});const c_=(0,Vl.Z)(u_,[["__scopeId","data-v-2bb5f257"]]);var d_=c_;const p_={class:"toolbar"},v_={class:"content"};var m_=(0,i.aZ)({__name:"index",setup(e){const t=R(),{activeElementIdList:l,handleElement:n,toolbarState:r}=(0,o.Jk)(t),u=(0,i.Fl)((()=>"text"===n.value?.type?[{label:"样式",key:a.EL_STYLE},{label:"符号",key:a.SYMBOL},{label:"位置",key:a.EL_POSITION},{label:"动画",key:a.EL_ANIMATION}]:[{label:"样式",key:a.EL_STYLE},{label:"位置",key:a.EL_POSITION},{label:"动画",key:a.EL_ANIMATION}])),c=[{label:"设计",key:a.SLIDE_DESIGN},{label:"切换",key:a.SLIDE_ANIMATION},{label:"动画",key:a.EL_ANIMATION}],d=[{label:"样式",key:a.EL_STYLE},{label:"位置",key:a.MULTI_POSITION}],p=e=>{t.setToolbarState(e)},v=(0,i.Fl)((()=>l.value.length?l.value.length>1?d:u.value:c));(0,i.YP)(v,(()=>{const e=v.value.map((e=>e.key));e.includes(r.value)||t.setToolbarState(e[0])}));const m=(0,i.Fl)((()=>{const e={[a.EL_STYLE]:lk,[a.EL_POSITION]:hk,[a.EL_ANIMATION]:Bk,[a.SLIDE_DESIGN]:Nb,[a.SLIDE_ANIMATION]:Gb,[a.MULTI_POSITION]:a_,[a.SYMBOL]:d_};return e[r.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",p_,[(0,i.Wm)(Kd,{tabs:v.value,value:(0,s.SU)(r),card:"","onUpdate:value":t[0]||(t[0]=e=>p(e))},null,8,["tabs","value"]),(0,i._)("div",v_,[((0,i.wg)(),(0,i.j4)((0,i.LL)(m.value)))])]))}});const h_=(0,Vl.Z)(m_,[["__scopeId","data-v-6c9ece83"]]);var f_=h_;const g_={class:"editor"};var y_=(0,i.aZ)({__name:"Editor",props:{value:{}},emits:["update"],setup(e,{expose:t,emit:l}){const a=e,n=l,o=R(),r=(0,s.iH)();let c;const v=(0,s.iH)(),m=(0,s.iH)(),h=(0,s.iH)(),f=()=>{m.value&&m.value.hide()},g=(0,D.debounce)((function(){n("update",c.dom.innerHTML)}),300,{trailing:!0}),y=()=>{o.setDisableHotkeysState(!0)},w=()=>{o.setDisableHotkeysState(!1)},x=()=>{if(!c)return;const{doc:e,tr:t}=c.state;c.dispatch(t.replaceRangeWith(0,e.content.size,Hi(a.value)))};t({updateTextContent:x});const k=()=>{const e=window.getSelection();if(!e||!e.anchorNode||!e.focusNode||e.isCollapsed||"Caret"===e.type||"None"===e.type)return;const t=e.getRangeAt(0);if(m.value){v.value=C(c);const{x:e,y:l,left:a,top:n}=t.getBoundingClientRect();m.value.setProps({getReferenceClientRect:()=>({x:e,y:l,left:a,top:n,height:0,width:0,right:a,bottom:n})}),m.value.show()}},b=(e,t)=>{if("color"===e&&t){const e=c.state.schema.marks.forecolor.create({color:t});d(c),p(c,e)}else if("backcolor"===e&&t){const e=c.state.schema.marks.backcolor.create({backcolor:t});d(c),p(c,e)}else if("bold"===e)d(c),(0,u.w9)(c.state.schema.marks.strong)(c.state,c.dispatch);else if("em"===e)d(c),(0,u.w9)(c.state.schema.marks.em)(c.state,c.dispatch);else if("underline"===e)d(c),(0,u.w9)(c.state.schema.marks.underline)(c.state,c.dispatch);else if("strikethrough"===e)d(c),(0,u.w9)(c.state.schema.marks.strikethrough)(c.state,c.dispatch);else if("bulletList"===e){const{bullet_list:e,list_item:t}=c.state.schema.nodes;Yi(e,t,"")(c.state,c.dispatch)}else if("orderedList"===e){const{ordered_list:e,list_item:t}=c.state.schema.nodes;Yi(e,t,"")(c.state,c.dispatch)}else if("clear"===e){d(c);const{$from:e,$to:t}=c.state.selection;c.dispatch(c.state.tr.removeMark(e.pos,t.pos))}c.focus(),g(),v.value=C(c)};return(0,i.bv)((()=>{c=Fi(r.value,a.value,{handleDOMEvents:{focus:y,blur:w,mouseup:k,mousedown:()=>{window.getSelection()?.removeAllRanges(),f()},keydown:f,input:g}},{placeholder:"点击输入演讲者备注"}),m.value=(0,rn.ZP)(r.value,{duration:0,content:h.value,interactive:!0,trigger:"manual",placement:"top-start",hideOnClick:"toggle",offset:[0,6]})})),(0,i.Ah)((()=>{c&&c.destroy()})),(e,t)=>{const l=(0,i.up)("IconTextBold"),a=(0,i.up)("IconTextItalic"),n=(0,i.up)("IconTextUnderline"),o=(0,i.up)("IconStrikethrough"),s=(0,i.up)("IconText"),u=(0,i.up)("IconHighLight"),c=(0,i.up)("IconList"),d=(0,i.up)("IconOrderedList"),p=(0,i.up)("IconFormat"),m=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",g_,[(0,i._)("div",{class:"prosemirror-editor",ref_key:"editorViewRef",ref:r},null,512),(0,i._)("div",{class:"menu",ref_key:"menuRef",ref:h},[(0,i._)("button",{class:(0,oe.C_)({active:v.value?.bold}),onClick:t[0]||(t[0]=e=>b("bold"))},[(0,i.Wm)(l)],2),(0,i._)("button",{class:(0,oe.C_)({active:v.value?.em}),onClick:t[1]||(t[1]=e=>b("em"))},[(0,i.Wm)(a)],2),(0,i._)("button",{class:(0,oe.C_)({active:v.value?.underline}),onClick:t[2]||(t[2]=e=>b("underline"))},[(0,i.Wm)(n)],2),(0,i._)("button",{class:(0,oe.C_)({active:v.value?.strikethrough}),onClick:t[3]||(t[3]=e=>b("strikethrough"))},[(0,i.Wm)(o)],2),(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:v.value?.color,"onUpdate:modelValue":t[4]||(t[4]=e=>b("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i._)("button",null,[(0,i.Wm)(s)])])),_:1}),(0,i.Wm)(dn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(of,{modelValue:v.value?.backcolor,"onUpdate:modelValue":t[5]||(t[5]=e=>b("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i._)("button",null,[(0,i.Wm)(u)])])),_:1}),(0,i._)("button",{class:(0,oe.C_)({active:v.value?.bulletList}),onClick:t[6]||(t[6]=e=>b("bulletList"))},[(0,i.Wm)(c)],2),(0,i._)("button",{class:(0,oe.C_)({active:v.value?.orderedList}),onClick:t[7]||(t[7]=e=>b("orderedList"))},[(0,i.Wm)(d)],2),(0,i._)("button",{onClick:t[8]||(t[8]=e=>b("clear"))},[(0,i.Wm)(p)])],512)])),[[m,f]])}}});const w_=(0,Vl.Z)(y_,[["__scopeId","data-v-31d96c24"]]);var x_=w_;const k_={class:"remark"};var b_=(0,i.aZ)({__name:"index",props:{height:{}},emits:["update:height"],setup(e,{emit:t}){const l=e,a=t,n=$(),{currentSlide:r}=(0,o.Jk)(n),u=(0,s.iH)();(0,i.YP)((()=>r.value.id),(()=>{(0,i.Y3)((()=>{u.value.updateTextContent()}))}),{immediate:!0});const c=(0,i.Fl)((()=>r.value?.remark||"")),d=e=>{n.updateSlide({remark:e})},p=e=>{let t=!0;const n=e.pageY,o=l.height;document.onmousemove=e=>{if(!t)return;const l=e.pageY,i=l-n;let s=-i+o;s<40&&(s=40),s>360&&(s=360),a("update:height",s)},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",k_,[(0,i._)("div",{class:"resize-handler",onMousedown:t[0]||(t[0]=e=>p(e))},null,32),(0,i.Wm)(x_,{value:c.value,ref_key:"editorRef",ref:u,onUpdate:t[1]||(t[1]=e=>d(e))},null,8,["value"])]))}});const __=(0,Vl.Z)(b_,[["__scopeId","data-v-458a41b9"]]);var I_=__,S_=l(3162),C_=l(3907);const L_=["style","script","template"],T_=["html","head","body","p","dt","dd","li","option","thead","th","tbody","tr","td","tfoot","colgroup"],E_={li:["ul","ol","menu"],dt:["dl"],dd:["dl"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table"],td:["table"]},M_=["!doctype","area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],U_=(e,t)=>{const l=t-e.position;W_(e,l)},W_=(e,t)=>{e.position=e.position+t},D_=(e,t)=>{const l=!1;while(!l){const l=e.indexOf("<",t);if(-1===l)return l;const a=e.charAt(l+1);if("/"===a||"!"===a||/[A-Za-z0-9]/.test(a))return l;t=l+1}return-1},H_=e=>{const{str:t}=e;let l=D_(t,e.position);if(l===e.position)return;-1===l&&(l=t.length);const a=t.slice(e.position,l);U_(e,l),e.tokens.push({type:"text",content:a})},F_=e=>{const{str:t}=e;W_(e,4);let l=t.indexOf("--\x3e",e.position),a=l+3;-1===l&&(l=a=t.length);const n=t.slice(e.position,l);U_(e,a),e.tokens.push({type:"comment",content:n})},A_=e=>{const{str:t}=e,l=t.length;let a=e.position;while(a"===e);if(l)break;a++}let n=a+1;while(n"===e);if(!l)break;n++}U_(e,n);const o=t.slice(a,n);return e.tokens.push({type:"tag",content:o}),o},$_=e=>{const{str:t,tokens:l}=e;let a=e.position,n=null,o=a;const i=[],s=t.length;while(a"===e;if(l){a!==o&&i.push(t.slice(o,a));break}const s=/\s/.test(e);if(s){a!==o&&i.push(t.slice(o,a)),o=a+1,a++;continue}const r="'"===e||'"'===e;r?(n=e,a++):a++}U_(e,a);const r="attribute";for(let u=0;u1){const a=e+t;l.push({type:r,content:a}),u+=1;continue}const a=i[u+2];if(u+=1,a){const t=e+"="+a;l.push({type:r,content:t}),u+=1;continue}}}if((0,D.endsWith)(e,"=")){const t=i[u+1];if(t&&-1===t.indexOf("=")){const a=e+t;l.push({type:r,content:a}),u+=1;continue}const a=e.slice(0,-1);l.push({type:r,content:a})}else l.push({type:r,content:e})}},Z_=(e,t)=>{const{str:l,tokens:a}=t,n=e.toLowerCase(),o=l.length;let i=t.position;while(i{const{str:t}=e,l=t.charAt(e.position+1),a="/"===l;W_(e,a?2:1),e.tokens.push({type:"tag-start",close:a});const n=A_(e);$_(e);const o=t.charAt(e.position),i="/"===o;return W_(e,i?2:1),e.tokens.push({type:"tag-end",close:i}),n},R_=e=>{const t=e.str,l=t.length;while(e.position{const t={str:e,position:0,tokens:[]};return R_(t),t.tokens},P_=e=>{const t={tagName:null,children:[]},l={tokens:e,cursor:0,stack:[t]};return j_(l),t.children},B_=(e,t)=>{const l=E_[e];if(l){let a=t.length-1;while(a>=0){const n=t[a].tagName;if(n===e)break;if(n&&l.includes(n))return!0;a--}}return!1},N_=(e,t)=>{e.splice(t)},j_=e=>{const{stack:t,tokens:l}=e;let{cursor:a}=e,n=t[t.length-1].children;const o=l.length;while(a-1)if(t[e].tagName===s){n=!0;break}while(a0){if(s===t[e].tagName){N_(t,e);const l=e-1;n=t[l].children;break}e-=1}}const c=[];let d;while(a{const l=e.indexOf(t);return-1===l?[e]:[e.slice(0,l),e.slice(l+t.length)]},V_=e=>{const t=e.charAt(0),l=e.length-1,a='"'===t||"'"===t;return a&&t===e.charAt(l)?e.slice(1,l):e},J_=e=>e.map((e=>{const t=Y_(e.trim(),"="),l=t[0],a="string"===typeof t[1]?V_(t[1]):null;return{key:l,value:a}})),q_=e=>e.map((e=>{if("element"===e.type){const t=q_(e.children),l={type:"element",tagName:e.tagName.toLowerCase(),attributes:J_(e.attributes),children:t};return l}const t={type:e.type,content:e.content};return t})),X_=e=>{const t=z_(e),l=P_(t);return q_(l)};var G_=l(5851),K_=l(7943);const Q_={1:"Z",2:"M",4:"H",8:"V",16:"L",32:"C",64:"S",128:"Q",256:"T",512:"A"},eI=e=>{const t=new G_.OU(e),l=[];for(const a of t.commands){const e=Q_[a.type];if(2!==a.type&&16!==a.type||l.push({x:a.x,y:a.y,relative:a.relative,type:e}),32===a.type)l.push({x:a.x,y:a.y,curve:{type:"cubic",x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},relative:a.relative,type:e});else if(128===a.type)l.push({x:a.x,y:a.y,curve:{type:"quadratic",x1:a.x1,y1:a.y1},relative:a.relative,type:e});else if(512===a.type){const e=l[l.length-1];if(!["M","L","Q","C"].includes(e.type))continue;const t=(0,K_.Z)({px:e.x,py:e.y,cx:a.x,cy:a.y,rx:a.rX,ry:a.rY,xAxisRotation:a.xRot,largeArcFlag:a.lArcFlag,sweepFlag:a.sweepFlag});for(const a of t)l.push({x:a.x,y:a.y,curve:{type:"cubic",x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},relative:!1,type:"C"})}else{if(1!==a.type)continue;l.push({close:!0,type:e})}}return l},tI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",lI="data:image/svg+xml;base64,",aI=e=>{e=e.replace(/\r\n/g,"\n");let t="";for(let l=0;l127&&a<2048?(t+=String.fromCharCode(a>>6|192),t+=String.fromCharCode(63&a|128)):(t+=String.fromCharCode(a>>12|224),t+=String.fromCharCode(a>>6&63|128),t+=String.fromCharCode(63&a|128))}return t},nI=e=>{let t,l,a,n,o,i,s,r="",u=0;e=aI(e);while(u>2,o=(3&t)<<4|l>>4,i=(15&l)<<2|a>>6,s=63&a,isNaN(l)?i=s=64:isNaN(a)&&(s=64),r=r+tI.charAt(n)+tI.charAt(o)+tI.charAt(i)+tI.charAt(s);return r},oI=e=>{const t=new XMLSerializer,l=t.serializeToString(e);return lI+nI(l)},iI=100,sI=.75;var rI=()=>{const e=$(),{slides:t,theme:l,viewportRatio:a,title:n}=(0,o.Jk)(e),i=(0,s.iH)(!1),r=(e,t,l,a=!0)=>{i.value=!0;const o="png"===t?sh.YM:sh.hi,s=e.querySelectorAll("foreignObject [xmlns]");s.forEach((e=>e.removeAttribute("xmlns"))),setTimeout((()=>{const s={quality:l,width:1600};a&&(s.fontEmbedCSS=""),o(e,s).then((e=>{i.value=!1,(0,S_.saveAs)(e,`${n.value}.${t}`)})).catch((()=>{i.value=!1,ta.error("导出图片失败")}))}),200)},u=e=>{const t=new Blob([pe(JSON.stringify(e))],{type:""});(0,S_.saveAs)(t,`${n.value}.pptist`)},c=()=>{const e=new Blob([JSON.stringify(t.value)],{type:""});(0,S_.saveAs)(e,`${n.value}.json`)},d=e=>{const t=(0,W.Z)(e),l=t.getAlpha(),a=0===l?"#ffffff":t.setAlpha(1).toHexString();return{alpha:l,color:a}},p=e=>{const t=X_(e);let l=!1,a=0;const n=[],o=(e,t={})=>{for(const i of e){const e="tagName"in i&&["div","li","p"].includes(i.tagName);if(e&&n.length){const e=n[n.length-1];e.options||(e.options={}),e.options.breakLine=!0}const s={...t},r="attributes"in i?i.attributes.find((e=>"style"===e.key)):null;if(r&&r.value){const e=r.value.split(";");for(const t of e){const[e,l]=t.split(": "),[a,n]=[(0,D.trim)(e),(0,D.trim)(l)];a&&n&&(s[a]=n)}}if("tagName"in i){if("em"===i.tagName&&(s["font-style"]="italic"),"strong"===i.tagName&&(s["font-weight"]="bold"),"sup"===i.tagName&&(s["vertical-align"]="super"),"sub"===i.tagName&&(s["vertical-align"]="sub"),"a"===i.tagName){const e=i.attributes.find((e=>"href"===e.key));s["href"]=e?.value||""}if("ul"===i.tagName&&(s["list-type"]="ul"),"ol"===i.tagName&&(s["list-type"]="ol"),"li"===i.tagName&&(l=!0),"p"===i.tagName&&"attributes"in i){const e=i.attributes.find((e=>"data-indent"===e.key));e&&e.value&&(a=+e.value)}}if("tagName"in i&&"br"===i.tagName)n.push({text:"",options:{breakLine:!0}});else if("content"in i){const e=i.content.replace(/ /g," ").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,""),t={};s["font-size"]&&(t.fontSize=parseInt(s["font-size"])*sI),s["color"]&&(t.color=d(s["color"]).color),s["background-color"]&&(t.highlight=d(s["background-color"]).color),s["text-decoration-line"]&&(-1!==s["text-decoration-line"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==s["text-decoration-line"].indexOf("line-through")&&(t.strike="sngStrike")),s["text-decoration"]&&(-1!==s["text-decoration"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==s["text-decoration"].indexOf("line-through")&&(t.strike="sngStrike")),s["vertical-align"]&&("super"===s["vertical-align"]&&(t.superscript=!0),"sub"===s["vertical-align"]&&(t.subscript=!0)),s["text-align"]&&(t.align=s["text-align"]),s["font-weight"]&&(t.bold="bold"===s["font-weight"]),s["font-style"]&&(t.italic="italic"===s["font-style"]),s["font-family"]&&(t.fontFace=s["font-family"]),s["href"]&&(t.hyperlink={url:s["href"]}),l&&"ol"===s["list-type"]&&(t.bullet={type:"number",indent:1.25*(t.fontSize||20)},t.paraSpaceBefore=.1,l=!1),l&&"ul"===s["list-type"]&&(t.bullet={indent:1.25*(t.fontSize||20)},t.paraSpaceBefore=.1,l=!1),a&&(t.indentLevel=a,a=0),n.push({text:e,options:t})}else"children"in i&&o(i.children,s)}};return o(t),n},v=(e,t={x:1,y:1})=>e.map((e=>{if(void 0!==e.close)return{close:!0};if("M"===e.type)return{x:e.x/iI*t.x,y:e.y/iI*t.y,moveTo:!0};if(e.curve){if("cubic"===e.curve.type)return{x:e.x/iI*t.x,y:e.y/iI*t.y,curve:{type:"cubic",x1:e.curve.x1/iI*t.x,y1:e.curve.y1/iI*t.y,x2:e.curve.x2/iI*t.x,y2:e.curve.y2/iI*t.y}};if("quadratic"===e.curve.type)return{x:e.x/iI*t.x,y:e.y/iI*t.y,curve:{type:"quadratic",x1:e.curve.x1/iI*t.x,y1:e.curve.y1/iI*t.y}}}return{x:e.x/iI*t.x,y:e.y/iI*t.y}})),m=e=>{const t=d(e.color),{h:l,v:a}=e;let n=4,o=45;return 0===l&&0===a?(n=4,o=45):0===l?a>0?(n=a,o=90):(n=-a,o=270):0===a?l>0?(n=l,o=1):(n=-l,o=180):l>0&&a>0?(n=Math.max(l,a),o=45):l>0&&a<0?(n=Math.max(l,-a),o=315):l<0&&a>0?(n=Math.max(-l,a),o=135):l<0&&a<0&&(n=Math.max(-l,-a),o=225),{type:"outer",color:t.color.replace("#",""),opacity:t.alpha,blur:e.blur*sI,offset:n,angle:o}},h=e=>{const t=d(e?.color||"#000000");return{color:t.color,transparency:100*(1-t.alpha),width:(e.width||1)*sI,dashType:"solid"===e.style?"solid":"dash"}},f=e=>{const{type:l,target:a}=e;if("web"===l)return{url:a};if("slide"===l){const e=t.value.findIndex((e=>e.id===a));if(-1!==e)return{slide:e+1}}return null},g=(e,t,o)=>{i.value=!0;const s=new C_.Z;if(.625===a.value?s.layout="LAYOUT_16x10":.75===a.value?s.layout="LAYOUT_4x3":.70710678===a.value?(s.defineLayout({name:"A3",width:10,height:7.0710678}),s.layout="A3"):s.layout="LAYOUT_16x9",t){const{color:e,alpha:t}=d(l.value.backgroundColor);s.defineSlideMaster({title:"PPTIST_MASTER",background:{color:e,transparency:100*(1-t)}})}for(const l of e){const e=s.addSlide();if(l.background){const t=l.background;if("image"===t.type&&t.image)e.background={data:t.image};else if("solid"===t.type&&t.color){const l=d(t.color);e.background={color:l.color,transparency:100*(1-l.alpha)}}else if("gradient"===t.type&&t.gradientColor){const[l,a]=t.gradientColor,n=W.Z.mix(l,a).toHexString(),o=d(n);e.background={color:o.color,transparency:100*(1-o.alpha)}}}if(l.remark&&e.addNotes(l.remark),l.elements)for(const t of l.elements)if("text"===t.type){const l=p(t.content),a={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,fontSize:20*sI,fontFace:"微软雅黑",color:"#000000",valign:"top",margin:10*sI,paraSpaceBefore:5*sI,lineSpacingMultiple:1.2,autoFit:!0};if(t.rotate&&(a.rotate=t.rotate),t.wordSpace&&(a.charSpacing=t.wordSpace*sI),t.lineHeight&&(a.lineSpacingMultiple=t.lineHeight/1.25),t.fill){const e=d(t.fill),l=void 0===t.opacity?1:t.opacity;a.fill={color:e.color,transparency:100*(1-e.alpha*l)}}t.defaultColor&&(a.color=d(t.defaultColor).color),t.defaultFontName&&(a.fontFace=t.defaultFontName),t.shadow&&(a.shadow=m(t.shadow)),t.outline?.width&&(a.line=h(t.outline)),void 0!==t.opacity&&(a.transparency=100*(1-t.opacity)),void 0!==t.paragraphSpace&&(a.paraSpaceBefore=t.paragraphSpace*sI),t.vertical&&(a.vert="eaVert"),e.addText(l,a)}else if("image"===t.type){const l={path:t.src,x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI};if(t.flipH&&(l.flipH=t.flipH),t.flipV&&(l.flipV=t.flipV),t.rotate&&(l.rotate=t.rotate),t.link){const e=f(t.link);e&&(l.hyperlink=e)}if(t.filters?.opacity&&(l.transparency=100-parseInt(t.filters?.opacity)),t.clip){"ellipse"===t.clip.shape&&(l.rounding=!0);const[e,a]=t.clip.range,[n,o]=e,[i,s]=a,r=t.width/((i-n)/iI),u=t.height/((s-o)/iI);l.w=r/iI,l.h=u/iI,l.sizing={type:"crop",x:n/iI*r/iI,y:o/iI*u/iI,w:(i-n)/iI*r/iI,h:(s-o)/iI*u/iI}}e.addImage(l)}else if("shape"===t.type){if(t.special){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),a=oI(l),n={data:a,x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI};if(t.rotate&&(n.rotate=t.rotate),t.link){const e=f(t.link);e&&(n.hyperlink=e)}e.addImage(n)}else{const l={x:t.width/t.viewBox[0],y:t.height/t.viewBox[1]},a=v(eI(t.path),l),n=d(t.fill),o=void 0===t.opacity?1:t.opacity,i={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,fill:{color:n.color,transparency:100*(1-n.alpha*o)},points:a};if(t.flipH&&(i.flipH=t.flipH),t.flipV&&(i.flipV=t.flipV),t.shadow&&(i.shadow=m(t.shadow)),t.outline?.width&&(i.line=h(t.outline)),t.rotate&&(i.rotate=t.rotate),t.link){const e=f(t.link);e&&(i.hyperlink=e)}e.addShape("custGeom",i)}if(t.text){const l=p(t.text.content),a={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,fontSize:20*sI,fontFace:"微软雅黑",color:"#000000",paraSpaceBefore:5*sI,valign:t.text.align};t.rotate&&(a.rotate=t.rotate),t.text.defaultColor&&(a.color=d(t.text.defaultColor).color),t.text.defaultFontName&&(a.fontFace=t.text.defaultFontName),e.addText(l,a)}}else if("line"===t.type){const l=Ce(t),a=v(eI(l)),{minX:n,maxX:o,minY:i,maxY:s}=xe(t),r=d(t.color),u={x:t.left/iI,y:t.top/iI,w:(o-n)/iI,h:(s-i)/iI,line:{color:r.color,transparency:100*(1-r.alpha),width:t.width*sI,dashType:"solid"===t.style?"solid":"dash",beginArrowType:t.points[0]?"arrow":"none",endArrowType:t.points[1]?"arrow":"none"},points:a};t.shadow&&(u.shadow=m(t.shadow)),e.addShape("custGeom",u)}else if("chart"===t.type){const l=[];for(let e=0;ed(e).color));else if(1===t.themeColor.length)a=(0,W.Z)(t.themeColor[0]).analogous(10).map((e=>d(e.toHexString()).color));else{const e=t.themeColor.length,l=(0,W.Z)(t.themeColor[e-1]).analogous(11-e).map((e=>e.toHexString()));a=[...t.themeColor.slice(0,e-1),...l].map((e=>d(e).color))}const n={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,chartColors:"pie"===t.chartType?a:a.slice(0,t.data.series.length)};t.fill&&(n.plotArea={fill:{color:d(t.fill).color}}),t.legend&&(n.showLegend=!0,n.legendPos="top"===t.legend?"t":"b",n.legendColor=d(t.gridColor||"#000000").color,n.legendFontSize=14*sI);let o=s.ChartType.bar;"bar"===t.chartType?(o=s.ChartType.bar,n.barDir=t.options?.horizontalBars?"bar":"col"):"line"===t.chartType?(t.options?.showArea?o=s.ChartType.area:!1===t.options?.showLine?(o=s.ChartType.scatter,l.unshift({name:"X-Axis",values:Array(t.data.series[0].length).fill(0).map(((e,t)=>t))}),n.lineSize=0):o=s.ChartType.line,t.options?.lineSmooth&&(n.lineSmooth=!0)):"pie"===t.chartType&&(t.options?.donut?(o=s.ChartType.doughnut,n.holeSize=75):o=s.ChartType.pie),e.addChart(o,l,n)}else if("table"===t.type){const l=[];for(let e=0;e1||n.rowspan>1)for(let a=e;ad(e))));for(let e=0;et.width*e/iI))};t.theme&&(s.fill={color:"#ffffff"}),t.outline.width&&t.outline.color&&(s.border={type:"solid"===t.outline.style?"solid":"dash",pt:t.outline.width*sI,color:d(t.outline.color).color}),e.addTable(a,s)}else if("latex"===t.type){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),a=oI(l),n={data:a,x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI};if(t.link){const e=f(t.link);e&&(n.hyperlink=e)}e.addImage(n)}else if(!o&&("video"===t.type||"audio"===t.type)){const l={x:t.left/iI,y:t.top/iI,w:t.width/iI,h:t.height/iI,path:t.src,type:t.type};"video"===t.type&&t.poster&&(l.cover=t.poster);const a=t.src.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);a&&a[1]?l.extn=a[1]:t.ext&&(l.extn=t.ext);const n=["avi","mp4","m4v","mov","wmv"],o=["mp3","m4a","mp4","wav","wma"];l.extn&&[...n,...o].includes(l.extn)&&e.addMedia(l)}}setTimeout((()=>{s.writeFile({fileName:`${n.value}.pptx`}).then((()=>i.value=!1)).catch((()=>{i.value=!1,ta.error("导出失败")}))}),200)};return{exporting:i,exportImage:r,exportJSON:c,exportSpecificFile:u,exportPPTX:g}};const uI=e=>((0,i.dD)("data-v-1df3f398"),e=e(),(0,i.Cn)(),e),cI={class:"export-img-dialog"},dI={class:"thumbnails-view"},pI={class:"configs"},vI={class:"row"},mI=uI((()=>(0,i._)("div",{class:"title"},"导出格式:",-1))),hI={class:"row"},fI=uI((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),gI={key:0,class:"row"},yI=["data-range"],wI={class:"row"},xI=uI((()=>(0,i._)("div",{class:"title"},"图片质量:",-1))),kI={class:"row"},bI=uI((()=>(0,i._)("div",{class:"title"},"忽略在线字体:",-1))),_I={class:"config-item"},II={class:"btns"};var SI=(0,i.aZ)({__name:"ExportImage",emits:["close"],setup(e,{emit:t}){const l=t,{slides:a,currentSlide:n}=(0,o.Jk)($()),r=(0,s.iH)(),u=(0,s.iH)("all"),c=(0,s.iH)([1,a.value.length]),d=(0,s.iH)("jpeg"),p=(0,s.iH)(1),v=(0,s.iH)(!0),m=(0,i.Fl)((()=>"all"===u.value?a.value:"current"===u.value?[n.value]:a.value.filter(((e,t)=>{const[l,a]=c.value;return t>=l-1&&t<=a-1})))),{exportImage:h,exporting:f}=rI(),g=()=>{r.value&&h(r.value,d.value,p.value,v.value)};return(e,t)=>{const n=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",cI,[(0,i._)("div",dI,[(0,i._)("div",{class:"thumbnails",ref_key:"imageThumbnailsRef",ref:r},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(m.value,(e=>((0,i.wg)(),(0,i.j4)(Jd,{class:"thumbnail",key:e.id,slide:e,size:1600},null,8,["slide"])))),128))],512)]),(0,i._)("div",pI,[(0,i._)("div",vI,[mI,(0,i.Wm)(ng,{class:"config-item",value:d.value,"onUpdate:value":t[0]||(t[0]=e=>d.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{style:{width:"50%"},value:"jpeg"},{default:(0,i.w5)((()=>[(0,i.Uk)("JPEG")])),_:1}),(0,i.Wm)(tg,{style:{width:"50%"},value:"png"},{default:(0,i.w5)((()=>[(0,i.Uk)("PNG")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",hI,[fI,(0,i.Wm)(ng,{class:"config-item",value:u.value,"onUpdate:value":t[1]||(t[1]=e=>u.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===u.value?((0,i.wg)(),(0,i.iD)("div",gI,[(0,i._)("div",{class:"title","data-range":`(${c.value[0]} ~ ${c.value[1]})`},"自定义范围:",8,yI),(0,i.Wm)(qm,{class:"config-item",range:"",min:1,max:(0,s.SU)(a).length,step:1,value:c.value,"onUpdate:value":t[2]||(t[2]=e=>c.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),(0,i._)("div",wI,[xI,(0,i.Wm)(qm,{class:"config-item",min:0,max:1,step:.1,value:p.value,"onUpdate:value":t[3]||(t[3]=e=>p.value=e)},null,8,["value"])]),(0,i._)("div",kI,[bI,(0,i._)("div",_I,[(0,i.wy)((0,i.Wm)(pf,{value:v.value,"onUpdate:value":t[4]||(t[4]=e=>v.value=e)},null,8,["value"]),[[n,"导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭【忽略在线字体】选项,但要注意这将会增加导出用时。"]])])])]),(0,i._)("div",II,[(0,i.Wm)(tp,{class:"btn export",type:"primary",onClick:t[5]||(t[5]=e=>g())},{default:(0,i.w5)((()=>[(0,i.Uk)("导出图片")])),_:1}),(0,i.Wm)(tp,{class:"btn close",onClick:t[6]||(t[6]=e=>l("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})]),(0,i.Wm)(Xa,{loading:(0,s.SU)(f),tip:"正在导出..."},null,8,["loading"])])}}});const CI=(0,Vl.Z)(SI,[["__scopeId","data-v-1df3f398"]]);var LI=CI;const TI={class:"export-json-dialog"},EI={class:"preview"},MI={class:"btns"};var UI=(0,i.aZ)({__name:"ExportJSON",emits:["close"],setup(e,{emit:t}){const l=t,{slides:a}=(0,o.Jk)($()),{exportJSON:n}=rI();return(e,t)=>((0,i.wg)(),(0,i.iD)("div",TI,[(0,i._)("div",EI,[(0,i._)("pre",null,(0,oe.zw)((0,s.SU)(a)),1)]),(0,i._)("div",MI,[(0,i.Wm)(tp,{class:"btn export",type:"primary",onClick:t[0]||(t[0]=e=>(0,s.SU)(n)())},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 JSON")])),_:1}),(0,i.Wm)(tp,{class:"btn close",onClick:t[1]||(t[1]=e=>l("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const WI=(0,Vl.Z)(UI,[["__scopeId","data-v-6a7223ca"]]);var DI=WI;const HI=()=>{const e=document.createElement("iframe");return e.style.width="0",e.style.height="0",e.style.position="absolute",e.style.right="0",e.style.top="0",e.style.border="0",document.body.appendChild(e),e},FI=(e,t,l)=>{const a="";let n="";const o=document.styleSheets;if(o)for(const d of o)if(d.cssRules)for(const e of d.cssRules)n+=e.cssText;const{width:i,height:s,margin:r}=l,u=`\n \n \n \n `,c=""+t.innerHTML+"";e.open(),e.write(`\n ${a}\n \n ${u}\n ${c}\n \n `),e.close()},AI=(e,t)=>{const l=HI(),a=l.contentWindow;if(!l.contentDocument||!a)return;FI(l.contentDocument,e,t);const n=()=>{a.focus(),a.print()},o=()=>{l.removeEventListener("load",n),a.removeEventListener("afterprint",o),document.body.removeChild(l)};l.addEventListener("load",n),a.addEventListener("afterprint",o)},$I=e=>((0,i.dD)("data-v-1668f898"),e=e(),(0,i.Cn)(),e),ZI={class:"export-pdf-dialog"},OI={class:"thumbnails-view"},RI={class:"configs"},zI={class:"row"},PI=$I((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),BI={class:"row"},NI=$I((()=>(0,i._)("div",{class:"title"},"每页数量:",-1))),jI={class:"row"},YI=$I((()=>(0,i._)("div",{class:"title"},"边缘留白:",-1))),VI={class:"config-item"},JI=$I((()=>(0,i._)("div",{class:"tip"}," 提示:若打印预览与实际样式不一致,请在弹出的打印窗口中勾选【背景图形】选项。 ",-1))),qI={class:"btns"};var XI=(0,i.aZ)({__name:"ExportPDF",emits:["close"],setup(e,{emit:t}){const l=t,{slides:a,currentSlide:n,viewportRatio:r}=(0,o.Jk)($()),u=(0,s.iH)(),c=(0,s.iH)("all"),d=(0,s.iH)(1),p=(0,s.iH)(!0),v=()=>{if(!u.value)return;const e={width:1600,height:"all"===c.value?1600*r.value*d.value:1600*r.value,margin:p.value?50:0};AI(u.value,e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ZI,[(0,i._)("div",OI,[(0,i._)("div",{class:"thumbnails",ref_key:"pdfThumbnailsRef",ref:u},["current"===c.value?((0,i.wg)(),(0,i.j4)(Jd,{key:0,class:"thumbnail",slide:(0,s.SU)(n),size:1600},null,8,["slide"])):((0,i.wg)(!0),(0,i.iD)(i.HY,{key:1},(0,i.Ko)((0,s.SU)(a),((e,t)=>((0,i.wg)(),(0,i.j4)(Jd,{class:(0,oe.C_)(["thumbnail",{"break-page":(t+1)%d.value===0}]),key:e.id,slide:e,size:1600},null,8,["class","slide"])))),128))],512)]),(0,i._)("div",RI,[(0,i._)("div",zI,[PI,(0,i.Wm)(ng,{class:"config-item",value:c.value,"onUpdate:value":t[0]||(t[0]=e=>c.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{style:{width:"50%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(tg,{style:{width:"50%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",BI,[NI,(0,i.Wm)(cp,{class:"config-item",value:d.value,"onUpdate:value":t[1]||(t[1]=e=>d.value=e),options:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3}]},null,8,["value"])]),(0,i._)("div",jI,[YI,(0,i._)("div",VI,[(0,i.Wm)(pf,{value:p.value,"onUpdate:value":t[2]||(t[2]=e=>p.value=e)},null,8,["value"])])]),JI]),(0,i._)("div",qI,[(0,i.Wm)(tp,{class:"btn export",type:"primary",onClick:t[3]||(t[3]=e=>v())},{default:(0,i.w5)((()=>[(0,i.Uk)("打印 / 导出 PDF")])),_:1}),(0,i.Wm)(tp,{class:"btn close",onClick:t[4]||(t[4]=e=>l("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const GI=(0,Vl.Z)(XI,[["__scopeId","data-v-1668f898"]]);var KI=GI;const QI=e=>((0,i.dD)("data-v-265d4b60"),e=e(),(0,i.Cn)(),e),eS={class:"export-pptx-dialog"},tS={class:"configs"},lS={class:"row"},aS=QI((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),nS={key:0,class:"row"},oS=["data-range"],iS={class:"row"},sS=QI((()=>(0,i._)("div",{class:"title"},"忽略音频/视频:",-1))),rS={class:"config-item"},uS={class:"row"},cS=QI((()=>(0,i._)("div",{class:"title"},"覆盖默认母版:",-1))),dS={class:"config-item"},pS={key:1,class:"tip"},vS={class:"btns"};var mS=(0,i.aZ)({__name:"ExportPPTX",emits:["close"],setup(e,{emit:t}){const l=t,{slides:a,currentSlide:n}=(0,o.Jk)($()),{exportPPTX:r,exporting:u}=rI(),c=(0,s.iH)("all"),d=(0,s.iH)([1,a.value.length]),p=(0,s.iH)(!0),v=(0,s.iH)(!0),m=(0,i.Fl)((()=>"all"===c.value?a.value:"current"===c.value?[n.value]:a.value.filter(((e,t)=>{const[l,a]=d.value;return t>=l-1&&t<=a-1}))));return(e,t)=>{const n=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",eS,[(0,i._)("div",tS,[(0,i._)("div",lS,[aS,(0,i.Wm)(ng,{class:"config-item",value:c.value,"onUpdate:value":t[0]||(t[0]=e=>c.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===c.value?((0,i.wg)(),(0,i.iD)("div",nS,[(0,i._)("div",{class:"title","data-range":`(${d.value[0]} ~ ${d.value[1]})`},"自定义范围:",8,oS),(0,i.Wm)(qm,{class:"config-item",range:"",min:1,max:(0,s.SU)(a).length,step:1,value:d.value,"onUpdate:value":t[1]||(t[1]=e=>d.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),(0,i._)("div",iS,[sS,(0,i._)("div",rS,[(0,i.wy)((0,i.Wm)(pf,{value:v.value,"onUpdate:value":t[2]||(t[2]=e=>v.value=e)},null,8,["value"]),[[n,"导出时默认忽略音视频,若您的幻灯片中存在音视频元素,且希望将其导出到PPTX文件中,可选择关闭【忽略音视频】选项,但要注意这将会大幅增加导出用时。"]])])]),(0,i._)("div",uS,[cS,(0,i._)("div",dS,[(0,i.Wm)(pf,{value:p.value,"onUpdate:value":t[3]||(t[3]=e=>p.value=e)},null,8,["value"])])]),v.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",pS," 提示:1. 支持导出格式:avi、mp4、mov、wmv、mp3、wav;2. 跨域资源无法导出。 "))]),(0,i._)("div",vS,[(0,i.Wm)(tp,{class:"btn export",type:"primary",onClick:t[4]||(t[4]=e=>(0,s.SU)(r)(m.value,p.value,v.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 PPTX")])),_:1}),(0,i.Wm)(tp,{class:"btn close",onClick:t[5]||(t[5]=e=>l("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})]),(0,i.Wm)(Xa,{loading:(0,s.SU)(u),tip:"正在导出..."},null,8,["loading"])])}}});const hS=(0,Vl.Z)(mS,[["__scopeId","data-v-265d4b60"]]);var fS=hS;const gS=e=>((0,i.dD)("data-v-26422ed7"),e=e(),(0,i.Cn)(),e),yS={class:"export-pptist-dialog"},wS={class:"configs"},xS={class:"row"},kS=gS((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),bS={key:0,class:"row"},_S=["data-range"],IS=gS((()=>(0,i._)("div",{class:"tip"}," 提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。 ",-1))),SS={class:"btns"};var CS=(0,i.aZ)({__name:"ExportSpecificFile",emits:["close"],setup(e,{emit:t}){const l=t,{slides:a,currentSlide:n}=(0,o.Jk)($()),{exportSpecificFile:r}=rI(),u=(0,s.iH)("all"),c=(0,s.iH)([1,a.value.length]),d=(0,i.Fl)((()=>"all"===u.value?a.value:"current"===u.value?[n.value]:a.value.filter(((e,t)=>{const[l,a]=c.value;return t>=l-1&&t<=a-1}))));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",yS,[(0,i._)("div",wS,[(0,i._)("div",xS,[kS,(0,i.Wm)(ng,{class:"config-item",value:u.value,"onUpdate:value":t[0]||(t[0]=e=>u.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(tg,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===u.value?((0,i.wg)(),(0,i.iD)("div",bS,[(0,i._)("div",{class:"title","data-range":`(${c.value[0]} ~ ${c.value[1]})`},"自定义范围:",8,_S),(0,i.Wm)(qm,{class:"config-item",range:"",min:1,max:(0,s.SU)(a).length,step:1,value:c.value,"onUpdate:value":t[1]||(t[1]=e=>c.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),IS]),(0,i._)("div",SS,[(0,i.Wm)(tp,{class:"btn export",type:"primary",onClick:t[2]||(t[2]=e=>(0,s.SU)(r)(d.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 .pptist 文件")])),_:1}),(0,i.Wm)(tp,{class:"btn close",onClick:t[3]||(t[3]=e=>l("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const LS=(0,Vl.Z)(CS,[["__scopeId","data-v-26422ed7"]]);var TS=LS;const ES={class:"export-dialog"},MS={class:"content"};var US=(0,i.aZ)({__name:"index",setup(e){const t=R(),{dialogForExport:l}=(0,o.Jk)(t),a=t.setDialogForExport,n=[{key:"pptist",label:"导出 pptist 文件"},{key:"pptx",label:"导出 PPTX"},{key:"image",label:"导出图片"},{key:"json",label:"导出 JSON"},{key:"pdf",label:"打印 / 导出 PDF"}],r=(0,i.Fl)((()=>{const e={image:LI,json:DI,pdf:KI,pptx:fS,pptist:TS};return l.value&&e[l.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ES,[(0,i.Wm)(Kd,{tabs:n,value:(0,s.SU)(l),card:"","onUpdate:value":t[0]||(t[0]=e=>(0,s.SU)(a)(e))},null,8,["value"]),(0,i._)("div",MS,[((0,i.wg)(),(0,i.j4)((0,i.LL)(r.value),{onClose:t[1]||(t[1]=e=>(0,s.SU)(a)(""))},null,32))])]))}});const WS=(0,Vl.Z)(US,[["__scopeId","data-v-b20137f0"]]);var DS=WS;const HS={class:"title"},FS={class:"content"};var AS=(0,i.aZ)({__name:"MoveablePanel",props:{width:{},height:{},left:{default:10},top:{default:10},title:{default:""},moveable:{type:Boolean,default:!0}},emits:["close"],setup(e,{emit:t}){const l=e,a=t,n=(0,s.iH)(0),o=(0,s.iH)(0),r=(0,s.iH)(),u=(0,i.Fl)((()=>l.height?l.height:r.value?.clientHeight||0));(0,i.bv)((()=>{l.left>=0?n.value=l.left:n.value=document.body.clientWidth+l.left-l.width,l.top>=0?o.value=l.top:o.value=document.body.clientHeight+l.top-u.value}));const c=e=>{if(!l.moveable)return;let t=!0;const a=document.body.clientWidth,i=document.body.clientHeight,s=e.pageX,r=e.pageY,c=n.value,d=o.value;document.onmousemove=e=>{if(!t)return;const p=e.pageX-s,v=e.pageY-r;let m=c+p,h=d+v;m<0&&(m=0),h<0&&(h=0),m+l.width>a&&(m=a-l.width),h+u.value>i&&(h=i-u.value),n.value=m,o.value=h},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null}};return(e,t)=>{const l=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.iD)("div",{class:"moveable-panel",ref_key:"moveablePanelRef",ref:r,style:(0,oe.j5)({width:e.width+"px",height:e.height?e.height+"px":"auto",left:n.value+"px",top:o.value+"px"})},[e.title?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",{class:"header",onMousedown:t[1]||(t[1]=e=>c(e))},[(0,i._)("div",HS,(0,oe.zw)(e.title),1),(0,i._)("div",{class:"close-btn",onClick:t[0]||(t[0]=e=>a("close"))},[(0,i.Wm)(l)])],32),(0,i._)("div",FS,[(0,i.WI)(e.$slots,"default")])],64)):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"content",onMousedown:t[2]||(t[2]=e=>c(e))},[(0,i.WI)(e.$slots,"default")],32))],4)}}});const $S=(0,Vl.Z)(AS,[["__scopeId","data-v-fc791e00"]]);var ZS=$S;const OS=e=>((0,i.dD)("data-v-15470598"),e=e(),(0,i.Cn)(),e),RS={key:0,class:"handler"},zS={class:"btns"},PS={key:0,class:"icon-btns"},BS={class:"element-list"},NS={key:0,class:"group-els"},jS=OS((()=>(0,i._)("div",{class:"group-title"},"组合",-1))),YS=["onClick","onDblclick"],VS=["id","value","onBlur","onKeydown"],JS={key:1,class:"name"},qS={class:"icons"},XS=["onClick","onDblclick"],GS=["id","value","onBlur","onKeydown"],KS={key:1,class:"name"},QS={class:"icons"};var eC=(0,i.aZ)({__name:"SelectPanel",setup(e){const t=$(),l=R(),{currentSlide:a}=(0,o.Jk)(t),{handleElement:r,handleElementId:u,activeElementIdList:c,activeGroupElementId:d,hiddenElementIdList:p}=(0,o.Jk)(l),{orderElement:v}=ba(),m=(0,i.Fl)((()=>{const e=[];for(const t of a.value.elements)if(t.groupId){const l=e[e.length-1];l&&"group"===l.type&&l.id&&l.id===t.groupId?l.elements.push(t):e.push({type:"group",id:t.groupId,elements:[t]})}else e.push(t);return e})),h=(e,t)=>{if(u.value===t)return;if(p.value.includes(t))return;const a=e.elements.map((e=>e.id));l.setActiveElementIdList(a),l.setHandleElementId(t),(0,i.Y3)((()=>l.setActiveGroupElementId(t)))},f=e=>{u.value!==e&&(p.value.includes(e)||l.setActiveElementIdList([e]))},g=e=>{p.value.includes(e)?l.setHiddenElementIdList(p.value.filter((t=>t!==e))):l.setHiddenElementIdList([...p.value,e]),c.value.includes(e)&&l.setActiveElementIdList([])},y=()=>{const e=a.value.elements.map((e=>e.id)),t=p.value.filter((t=>!e.includes(t)));l.setHiddenElementIdList(t)},w=()=>{const e=a.value.elements.map((e=>e.id));l.setHiddenElementIdList([...p.value,...e]),c.value.length&&l.setActiveElementIdList([])},x=(0,s.iH)(""),k=(e,l)=>{const a=e.target.value;t.updateElement({id:l,props:{name:a}}),x.value=""},b=e=>{x.value=e,(0,i.Y3)((()=>{const t=document.querySelector(`#input-${e}`);t.focus()}))},_=()=>{l.setSelectPanelState(!1)};return(e,t)=>{const l=(0,i.up)("IconDown"),o=(0,i.up)("IconUp"),u=(0,i.up)("IconPreviewClose"),I=(0,i.up)("IconPreviewOpen");return(0,i.wg)(),(0,i.j4)(ZS,{class:"select-panel",width:200,height:360,title:`选择(${(0,s.SU)(c).length}/${(0,s.SU)(a).elements.length})`,left:-270,top:90,onClose:t[4]||(t[4]=e=>_())},{default:(0,i.w5)((()=>[m.value.length?((0,i.wg)(),(0,i.iD)("div",RS,[(0,i._)("div",zS,[(0,i.Wm)(tp,{size:"small",style:{"margin-right":"5px"},onClick:t[0]||(t[0]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部显示")])),_:1}),(0,i.Wm)(tp,{size:"small",onClick:t[1]||(t[1]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部隐藏")])),_:1})]),(0,s.SU)(r)?((0,i.wg)(),(0,i.iD)("div",PS,[(0,i.Wm)(l,{class:"icon-btn",onClick:t[2]||(t[2]=e=>(0,s.SU)(v)((0,s.SU)(r),(0,s.SU)(Q).UP))}),(0,i.Wm)(o,{class:"icon-btn",onClick:t[3]||(t[3]=e=>(0,s.SU)(v)((0,s.SU)(r),(0,s.SU)(Q).DOWN))})])):(0,i.kq)("",!0)])):(0,i.kq)("",!0),(0,i._)("div",BS,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(m.value,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.id},["group"===e.type?((0,i.wg)(),(0,i.iD)("div",NS,[jS,((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.elements,(t=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["item",{active:(0,s.SU)(c).includes(t.id),"group-active":(0,s.SU)(d).includes(t.id)}]),key:t.id,onClick:l=>h(e,t.id),onDblclick:e=>b(t.id)},[x.value===t.id?((0,i.wg)(),(0,i.iD)("input",{key:0,id:`input-${t.id}`,value:t.name||(0,s.SU)($n)[t.type],class:"input",type:"text",onBlur:e=>k(e,t.id),onKeydown:(0,n.D2)((e=>k(e,t.id)),["enter"])},null,40,VS)):((0,i.wg)(),(0,i.iD)("div",JS,(0,oe.zw)(t.name||(0,s.SU)($n)[t.type]),1)),(0,i._)("div",qS,[(0,s.SU)(p).includes(t.id)?((0,i.wg)(),(0,i.j4)(u,{key:0,style:{"font-size":"17px"},onClick:(0,n.iM)((e=>g(t.id)),["stop"])},null,8,["onClick"])):((0,i.wg)(),(0,i.j4)(I,{key:1,style:{"font-size":"17px"},onClick:(0,n.iM)((e=>g(t.id)),["stop"])},null,8,["onClick"]))])],42,YS)))),128))])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:(0,oe.C_)(["item",{active:(0,s.SU)(c).includes(e.id)}]),onClick:t=>f(e.id),onDblclick:t=>b(e.id)},[x.value===e.id?((0,i.wg)(),(0,i.iD)("input",{key:0,id:`input-${e.id}`,value:e.name||(0,s.SU)($n)[e.type],class:"input",type:"text",onBlur:t=>k(t,e.id),onKeydown:(0,n.D2)((t=>k(t,e.id)),["enter"])},null,40,GS)):((0,i.wg)(),(0,i.iD)("div",KS,(0,oe.zw)(e.name||(0,s.SU)($n)[e.type]),1)),(0,i._)("div",QS,[(0,s.SU)(p).includes(e.id)?((0,i.wg)(),(0,i.j4)(u,{key:0,style:{"font-size":"17px"},onClick:(0,n.iM)((t=>g(e.id)),["stop"])},null,8,["onClick"])):((0,i.wg)(),(0,i.j4)(I,{key:1,style:{"font-size":"17px"},onClick:(0,n.iM)((t=>g(e.id)),["stop"])},null,8,["onClick"]))])],42,XS))],64)))),128))])])),_:1},8,["title"])}}});const tC=(0,Vl.Z)(eC,[["__scopeId","data-v-15470598"]]);var lC=tC,aC=()=>{const e=R(),t=$(),{handleElement:l}=(0,o.Jk)(e),{slides:a,slideIndex:n,currentSlide:r}=(0,o.Jk)(t),u=(0,s.iH)(""),c=(0,s.iH)(""),d=(0,s.iH)([]),p=(0,s.iH)(-1),v=(0,s.iH)("g"),m=()=>{const e=[],t=new RegExp(u.value,v.value),l=/(<([^>]+)>)/g;for(const n of a.value)for(const a of n.elements)if("text"===a.type){const o=a.content.replace(l,""),i=o.match(t);i&&e.push(...new Array(i.length).fill({slideId:n.id,elId:a.id,elType:a.type}))}else if("shape"===a.type&&a.text&&a.text.content){const o=a.text.content.replace(l,""),i=o.match(t);i&&e.push(...new Array(i.length).fill({slideId:n.id,elId:a.id,elType:a.type}))}else if("table"===a.type)for(let o=0;o{const t=[...e.childNodes],l=[];while(t.length){const e=t.shift();e.nodeType===e.TEXT_NODE?e.wholeText&&l.push(e):t.unshift(...e.childNodes)}return l},f=e=>{let t=0;const l=e.map((e=>{const l=t,a=t+e.wholeText.length;return t=a,{text:e.wholeText,startIdx:l,endIdx:a}}));return l},g=(e,t)=>{const l=new RegExp(t,v.value),a=[];let n=l.exec(e);while(n)a.push(n),n=l.exec(e);return a},y=(e,t,l,a)=>{for(let n=l.length-1;n>=0;n--){const o=l[n],i=o.index,s=i+o[0].length;for(let l=0;l=s)break;let c=e[l];const d=Math.max(0,i-r),p=Math.min(u,s)-r-d;d>0&&(c=c.splitText(d)),p{for(const l of e)l.innerHTML=l.innerHTML.replace(new RegExp(u.value,v.value),(()=>`${u.value}`))},x=()=>{const e=document.querySelectorAll(".editable-element mark");for(const t of e)setTimeout((()=>{const e=t.parentNode,l=t.textContent;e.replaceChild(document.createTextNode(l),t)}),0)},k=()=>{x(),setTimeout((()=>{for(let e=0;ee)).join(""),o=g(n,u.value);y(t,l,o,e)}}}),0)},b=()=>{const e=document.querySelectorAll("mark[data-index]");for(const t of e)setTimeout((()=>{const e=t.dataset.index;void 0!==e&&+e===p.value?t.classList.add("active"):t.classList.remove("active")}),0)},_=()=>{if(-1===p.value)return;const e=d.value[p.value];if(e.slideId===r.value.id)setTimeout(b,0);else{const l=a.value.findIndex((t=>t.id===e.slideId));-1!==l&&t.updateSlideIndex(l)}},I=()=>{if(!u.value)return ta.warning("请先输入查找内容");e.setActiveElementIdList([]),-1===p.value?m():p.value{if(!u.value)return ta.warning("请先输入查找内容");e.setActiveElementIdList([]),-1===p.value?m():p.value>0?p.value-=1:p.value=d.value.length-1,_()},C=()=>{if(!u.value)return;if(-1===p.value)return void I();const e=d.value[p.value];let l=null;if("table"===e.elType){const[t,a]=e.cellIndex;l=document.querySelector(`#editable-element-${e.elId} .cell[data-cell-index="${t}_${a}"] .cell-text`)}else l=document.querySelector(`#editable-element-${e.elId} .ProseMirror`);if(!l)return;const a=document.createElement("div");a.innerHTML=l.innerHTML;let n=!1;const o=a.querySelectorAll("mark[data-index]");for(const t of o){const e=t.parentNode;if(t.classList.contains("active"))n?e.removeChild(t):(e.replaceChild(document.createTextNode(c.value),t),n=!0);else{const l=t.textContent;e.replaceChild(document.createTextNode(l),t)}}if("text"===e.elType){const l={content:a.innerHTML};t.updateElement({id:e.elId,props:l})}else if("shape"===e.elType){const l=r.value.elements.find((t=>t.id===e.elId));if(l&&"shape"===l.type&&l.text){const n={text:{...l.text,content:a.innerHTML}};t.updateElement({id:e.elId,props:n})}}else if("table"===e.elType){const l=r.value.elements.find((t=>t.id===e.elId));if(l&&"table"===l.type){const n=l.data.map(((t,l)=>l===e.cellIndex[0]?t.map(((t,l)=>l===e.cellIndex[1]?{...t,text:a.innerHTML}:t)):t)),o={data:n};t.updateElement({id:e.elId,props:o})}}d.value.splice(p.value,1),d.value.length?(p.value>d.value.length-1&&(p.value=0),(0,i.Y3)((()=>{k(),_()}))):p.value=-1},L=()=>{if(u.value)if(-1!==p.value){for(let e=0;ee.id===n.slideId));if(!o)continue;const i=o.elements.find((e=>e.id===n.elId));if(!i)continue;const s=document.createElement("div");if("text"===i.type?s.innerHTML=i.content:"shape"===i.type&&(s.innerHTML=i.text?.content||""),"table"===n.elType){const e=i.data.map((e=>e.map((e=>e.text?{...e,text:e.text.replaceAll(u.value,c.value)}:e)))),l={data:e};t.updateElement({id:n.elId,slideId:n.slideId,props:l})}else{const l=h(s),a=f(l),o=a.map((({text:e})=>e)).join(""),i=g(o,u.value);y(l,a,i,e);const d=s.querySelectorAll("mark[data-index]");let p=-1;for(const e of d){const t=+e.dataset.index,l=e.parentNode;t===p?l.removeChild(e):(l.replaceChild(document.createTextNode(c.value),e),p=t)}if("text"===n.elType){const e={content:s.innerHTML};t.updateElement({id:n.elId,slideId:n.slideId,props:e})}else if("shape"===n.elType){const e=r.value.elements.find((e=>e.id===n.elId));if(e&&"shape"===e.type&&e.text){const l={text:{...e.text,content:s.innerHTML}};t.updateElement({id:n.elId,slideId:n.slideId,props:l})}}}}d.value=[],p.value=-1}else I()},T=()=>{p.value=-1,d.value=[],u.value||x()};(0,i.YP)(u,T),(0,i.YP)(n,(()=>{(0,i.Y3)((()=>{k(),setTimeout(b,0)}))})),(0,i.YP)(l,(()=>{l.value&&(p.value=-1,d.value=[],x())})),(0,i.Jd)(x);const E=()=>{v.value="g"===v.value?"gi":"g",T()};return{searchWord:u,replaceWord:c,searchResults:d,searchIndex:p,modifiers:v,searchNext:I,searchPrev:S,replace:C,replaceAll:L,toggleModifiers:E}};const nC={class:"count"},oC={key:1,class:"footer"};var iC=(0,i.aZ)({__name:"SearchPanel",setup(e){const t=R(),{searchWord:l,replaceWord:a,searchResults:o,searchIndex:r,modifiers:u,searchNext:c,searchPrev:d,replace:p,replaceAll:v,toggleModifiers:m}=aC(),h=(0,s.iH)("search"),f=[{key:"search",label:"查找"},{key:"replace",label:"替换"}],g=()=>{t.setSearchPanelState(!1)},y=(0,s.iH)();return(0,i.bv)((()=>{y.value.focus()})),(0,i.YP)(h,(()=>{(0,i.Y3)((()=>{y.value.focus()}))})),(e,t)=>{const w=(0,i.up)("IconClose"),x=(0,i.up)("IconLeft"),k=(0,i.up)("IconRight"),b=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.j4)(ZS,{class:"search-panel",width:330,height:0,left:-270,top:90},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"close-btn",onClick:t[0]||(t[0]=e=>g()),onMousedown:t[1]||(t[1]=(0,n.iM)((()=>{}),["stop"]))},[(0,i.Wm)(w)],32),(0,i.Wm)(Kd,{tabs:f,value:h.value,"onUpdate:value":t[2]||(t[2]=e=>h.value=e)},null,8,["value"]),(0,i._)("div",{class:(0,oe.C_)(["content",h.value]),onMousedown:t[12]||(t[12]=(0,n.iM)((()=>{}),["stop"]))},[(0,i.Wm)(sn,{class:"input",value:(0,s.SU)(l),"onUpdate:value":t[6]||(t[6]=e=>(0,s.dq)(l)?l.value=e:null),placeholder:"输入查找内容",onEnter:t[7]||(t[7]=e=>(0,s.SU)(c)()),ref_key:"searchInpRef",ref:y},{suffix:(0,i.w5)((()=>[(0,i._)("span",nC,(0,oe.zw)((0,s.SU)(r)+1)+"/"+(0,oe.zw)((0,s.SU)(o).length),1),(0,i.Wm)(Zc,{type:"vertical"}),(0,i.wy)(((0,i.wg)(),(0,i.iD)("span",{class:(0,oe.C_)(["ignore-case",{active:"g"===(0,s.SU)(u)}]),onClick:t[3]||(t[3]=e=>(0,s.SU)(m)())},[(0,i.Uk)("Aa")],2)),[[b,"忽略大小写"]]),(0,i.Wm)(Zc,{type:"vertical"}),(0,i.wy)((0,i.Wm)(x,{class:"next-btn left",onClick:t[4]||(t[4]=e=>(0,s.SU)(d)())},null,512),[[b,"上一个"]]),(0,i.wy)((0,i.Wm)(k,{class:"next-btn right",onClick:t[5]||(t[5]=e=>(0,s.SU)(c)())},null,512),[[b,"下一个"]])])),_:1},8,["value"]),"replace"===h.value?((0,i.wg)(),(0,i.j4)(sn,{key:0,class:"input",value:(0,s.SU)(a),"onUpdate:value":t[8]||(t[8]=e=>(0,s.dq)(a)?a.value=e:null),placeholder:"输入替换内容",onEnter:t[9]||(t[9]=e=>(0,s.SU)(p)())},null,8,["value"])):(0,i.kq)("",!0),"replace"===h.value?((0,i.wg)(),(0,i.iD)("div",oC,[(0,i.Wm)(tp,{disabled:!(0,s.SU)(l),style:{"margin-left":"5px"},onClick:t[10]||(t[10]=e=>(0,s.SU)(p)())},{default:(0,i.w5)((()=>[(0,i.Uk)("替换")])),_:1},8,["disabled"]),(0,i.Wm)(tp,{disabled:!(0,s.SU)(l),type:"primary",style:{"margin-left":"5px"},onClick:t[11]||(t[11]=e=>(0,s.SU)(v)())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部替换")])),_:1},8,["disabled"])])):(0,i.kq)("",!0)],34)])),_:1})}}});const sC=(0,Vl.Z)(iC,[["__scopeId","data-v-fb93ddde"]]);var rC=sC;const uC={class:"pptist-editor"},cC={class:"layout-content"},dC={class:"layout-content-center"};var pC=(0,i.aZ)({__name:"index",setup(e){const t=R(),{dialogForExport:l,showSelectPanel:a,showSearchPanel:n}=(0,o.Jk)(t),r=()=>t.setDialogForExport(""),u=(0,s.iH)(40);return Ta(),Ea(),(e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i._)("div",uC,[(0,i.Wm)(Ln,{class:"layout-header"}),(0,i._)("div",cC,[(0,i.Wm)(Rm,{class:"layout-content-left"}),(0,i._)("div",dC,[(0,i.Wm)(Sm,{class:"center-top"}),(0,i.Wm)(Cp,{class:"center-body",style:(0,oe.j5)({height:`calc(100% - ${u.value+40}px)`})},null,8,["style"]),(0,i.Wm)(I_,{class:"center-bottom",height:u.value,"onUpdate:height":t[0]||(t[0]=e=>u.value=e),style:(0,oe.j5)({height:`${u.value}px`})},null,8,["height","style"])]),(0,i.Wm)(f_,{class:"layout-content-right"})])]),(0,s.SU)(a)?((0,i.wg)(),(0,i.j4)(lC,{key:0})):(0,i.kq)("",!0),(0,s.SU)(n)?((0,i.wg)(),(0,i.j4)(rC,{key:1})):(0,i.kq)("",!0),(0,i.Wm)(kp,{visible:!!(0,s.SU)(l),width:680,onClosed:t[1]||(t[1]=e=>r())},{default:(0,i.w5)((()=>[(0,i.Wm)(DS)])),_:1},8,["visible"])],64))}});const vC=(0,Vl.Z)(pC,[["__scopeId","data-v-1e00f97b"]]);var mC=vC,hC=()=>{const e=$(),{slides:t,slideIndex:l,formatedAnimations:a}=(0,o.Jk)(e),n=(0,s.iH)(0),r=(0,s.iH)(!1),u=(0,s.iH)(l.value),c=()=>{if(r.value)return;const{animations:e,autoNext:t}=a.value[n.value];n.value+=1,r.value=!0;let l=0;for(const a of e){const n=document.querySelector(`#screen-element-${a.elId} [class^=base-element-]`);if(!n){l+=1;continue}const o=`${yk}${a.effect}`;n.style.removeProperty("--animate-duration");for(const e of n.classList)-1!==e.indexOf(yk)&&n.classList.remove(e,`${yk}animated`);n.style.setProperty("--animate-duration",`${a.duration}ms`),n.classList.add(o,`${yk}animated`);const i=()=>{"out"!==a.type&&(n.style.removeProperty("--animate-duration"),n.classList.remove(o,`${yk}animated`)),l+=1,l===e.length&&(r.value=!1,t&&c())};n.addEventListener("animationend",i,{once:!0})}},d=()=>{n.value-=1;const{animations:e}=a.value[n.value];for(const t of e){const e=document.querySelector(`#screen-element-${t.elId} [class^=base-element-]`);if(e){e.style.removeProperty("--animate-duration");for(const t of e.classList)-1!==t.indexOf(yk)&&e.classList.remove(t,`${yk}animated`)}}e.every((e=>"attention"===e.type))&&g()},p=(0,s.iH)(0),v=()=>{p.value&&(clearInterval(p.value),p.value=0)};(0,i.Ah)(v);const m=(0,s.iH)(!1),h=e=>{m.value=e},f=(0,D.throttle)((function(e){ta.success(e)}),1e3,{leading:!0,trailing:!1}),g=()=>{a.value.length&&n.value>0?d():l.value>0?(e.updateSlideIndex(l.value-1),l.value{a.value.length&&n.value{v(),ta.success("开始自动放映"),p.value=setInterval(y,w.value)},k=e=>{v(),w.value=e,x()},b=(0,D.throttle)((function(e){e.deltaY<0?g():e.deltaY>0&&y()}),500,{leading:!0,trailing:!1}),_=(0,s.iH)(null),I=e=>{_.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},S=e=>{if(!_.value)return;const t=Math.abs(_.value.x-e.changedTouches[0].pageX),l=e.changedTouches[0].pageY-_.value.y;Math.abs(l)>t&&Math.abs(l)>50&&(_.value=null,l>0?g():y())},C=e=>{const t=e.key.toUpperCase();t===ne.UP||t===ne.LEFT||t===ne.PAGEUP?g():t!==ne.DOWN&&t!==ne.RIGHT&&t!==ne.SPACE&&t!==ne.ENTER&&t!==ne.PAGEDOWN||y()};(0,i.bv)((()=>document.addEventListener("keydown",C))),(0,i.Ah)((()=>document.removeEventListener("keydown",C)));const L=()=>{e.updateSlideIndex(l.value-1),n.value=0},T=()=>{e.updateSlideIndex(l.value+1),n.value=0},E=t=>{e.updateSlideIndex(t),n.value=0},M=l=>{const a=t.value.findIndex((e=>e.id===l));-1!==a&&(e.updateSlideIndex(a),n.value=0)};return{autoPlayTimer:p,autoPlayInterval:w,setAutoPlayInterval:k,autoPlay:x,closeAutoPlay:v,loopPlay:m,setLoopPlay:h,mousewheelListener:b,touchStartListener:I,touchEndListener:S,turnPrevSlide:L,turnNextSlide:T,turnSlideToIndex:E,turnSlideToId:M,execPrev:g,execNext:y,animationIndex:n}},fC=e=>{const t=$(),{viewportRatio:l}=(0,o.Jk)(t),a=(0,s.iH)(0),n=(0,s.iH)(0),r=()=>{const t=e?.value||document.body,o=t.clientWidth,i=t.clientHeight;let s,r;i/o===l.value?(s=o,r=i):i/o>l.value?(s=o,r=o*l.value):(s=i/l.value,r=i),a.value=s,n.value=r};return(0,i.bv)((()=>{r(),window.addEventListener("resize",r)})),(0,i.Ah)((()=>{window.removeEventListener("resize",r)})),{slideWidth:a,slideHeight:n}},gC=()=>{const e=(0,s.iH)(!0),t=(0,s.iH)(!0),{exitScreening:l}=Ca(),a=()=>{e.value=Sa(),!e.value&&t.value&&l(),t.value=!0};(0,i.bv)((()=>{e.value=Sa(),document.addEventListener("fullscreenchange",a),document.addEventListener("webkitfullscreenchange",a)})),(0,i.Ah)((()=>{document.removeEventListener("fullscreenchange",a),document.removeEventListener("webkitfullscreenchange",a)}));const n=()=>{e.value&&(t.value=!1,Ia())};return{fullscreenState:e,manualExitFullscreen:n}};const yC={class:"element-content"};var wC=(0,i.aZ)({__name:"ScreenVideoElement",props:{elementInfo:{}},setup(e){const{currentSlide:t}=(0,o.Jk)($()),l=(0,i.f3)(Tn)||(0,s.iH)(1),a=(0,i.f3)(En)||(0,s.iH)(""),n=(0,i.Fl)((()=>t.value.id===a.value));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-video screen-element-video",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",yC,[n.value?((0,i.wg)(),(0,i.j4)(Fr,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,autoplay:e.elementInfo.autoplay,scale:(0,s.SU)(l)},null,8,["width","height","src","poster","autoplay","scale"])):(0,i.kq)("",!0)])],4)],4))}});const xC=(0,Vl.Z)(wC,[["__scopeId","data-v-76bf5b3f"]]);var kC=xC;const bC={class:"element-content"};var _C=(0,i.aZ)({__name:"ScreenAudioElement",props:{elementInfo:{}},setup(e){const t=e,{viewportRatio:l,currentSlide:a}=(0,o.Jk)($()),n=(0,i.f3)(Tn)||(0,s.iH)(1),r=(0,i.f3)(En)||(0,s.iH)(""),u=(0,i.Fl)((()=>a.value.id===r.value)),c=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px")),d=(0,i.Fl)((()=>{const e=oa,a=oa*l.value,o=280/n.value,i=50/n.value,s=t.elementInfo.width,r=t.elementInfo.height,u=t.elementInfo.left,c=t.elementInfo.top;let d=0,p=r;return u+o>=e&&(d=s-o),c+r+i>=a&&(p=-i),{left:d+"px",top:p+"px"}})),p=(0,s.iH)(),v=()=>{p.value&&p.value.toggle()};return(e,t)=>{const l=(0,i.up)("IconVolumeNotice");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-audio screen-element-audio",style:(0,oe.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,oe.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",bC,[(0,i.Wm)(l,{class:"audio-icon",style:(0,oe.j5)({fontSize:c.value,color:e.elementInfo.color}),onClick:t[0]||(t[0]=e=>v())},null,8,["style"]),u.value?((0,i.wg)(),(0,i.j4)(lu,{key:0,class:"audio-player",ref_key:"audioPlayerRef",ref:p,style:(0,oe.j5)({...d.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,autoplay:e.elementInfo.autoplay,scale:(0,s.SU)(n)},null,8,["style","src","loop","autoplay","scale"])):(0,i.kq)("",!0)])],4)],4)}}});const IC=(0,Vl.Z)(_C,[["__scopeId","data-v-adf39436"]]);var SC=IC;const CC=["id","title"];var LC=(0,i.aZ)({__name:"ScreenElement",props:{elementInfo:{},elementIndex:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[sa.IMAGE]:Gc,[sa.TEXT]:td,[sa.SHAPE]:ud,[sa.LINE]:md,[sa.CHART]:gd,[sa.TABLE]:Ld,[sa.LATEX]:Hd,[sa.VIDEO]:kC,[sa.AUDIO]:SC};return e[t.elementInfo.type]||null})),{formatedAnimations:a,theme:n}=(0,o.Jk)($()),r=(0,i.Fl)((()=>{const e=a.value.findIndex((e=>{const l=e.animations.map((e=>e.elId));return l.includes(t.elementInfo.id)}));if(-1===e)return!1;if(ee.elId===t.elementInfo.id));return"in"===l?.type})),u=()=>{const e=t.elementInfo.link;e&&("web"===e.type?(t.manualExitFullscreen(),window.open(e.target)):"slide"===e.type&&t.turnSlideToId(e.target))};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["screen-element",{link:e.elementInfo.link}]),id:`screen-element-${e.elementInfo.id}`,style:(0,oe.j5)({zIndex:e.elementIndex,color:(0,s.SU)(n).fontColor,fontFamily:(0,s.SU)(n).fontName,visibility:r.value?"hidden":"visible"}),title:e.elementInfo.link?.target||"",onClick:t[0]||(t[0]=e=>u())},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo},null,8,["elementInfo"]))],14,CC))}});const TC=(0,Vl.Z)(LC,[["__scopeId","data-v-2139723a"]]);var EC=TC,MC=(0,i.aZ)({__name:"ScreenSlide",props:{slide:{},scale:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{viewportRatio:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.slide.background)),{backgroundStyle:n}=yu(a),r=(0,i.Fl)((()=>t.slide.id));return(0,i.JJ)(En,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"screen-slide",style:(0,oe.j5)({width:(0,s.SU)(oa)+"px",height:(0,s.SU)(oa)*(0,s.SU)(l)+"px",transform:`scale(${e.scale})`})},[(0,i._)("div",{class:"background",style:(0,oe.j5)({...(0,s.SU)(n)})},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.slide.elements,((t,l)=>((0,i.wg)(),(0,i.j4)(EC,{key:t.id,elementInfo:t,elementIndex:l+1,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["elementInfo","elementIndex","animationIndex","turnSlideToId","manualExitFullscreen"])))),128))],4))}});const UC=(0,Vl.Z)(MC,[["__scopeId","data-v-016af5da"]]);var WC=UC;const DC={class:"screen-slide-list"};var HC=(0,i.aZ)({__name:"ScreenSlideList",props:{slideWidth:{},slideHeight:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a}=(0,o.Jk)($()),n=(0,i.Fl)((()=>l.value.map((e=>{let t=e.turningMode;if(t||(t="slideY"),"random"===t){const e=bk.filter((e=>!["random","no"].includes(e.value))).map((e=>e.value));t=e[Math.floor(Math.random()*e.length)]}return{...e,turningMode:t}})))),r=(0,i.Fl)((()=>t.slideWidth/oa));return(0,i.JJ)(Tn,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",DC,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(n.value,((t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["slide-item",`turning-mode-${t.turningMode}`,{current:l===(0,s.SU)(a),before:l<(0,s.SU)(a),after:l>(0,s.SU)(a),hide:(l===(0,s.SU)(a)-1||l===(0,s.SU)(a)+1)&&t.turningMode!==n.value[(0,s.SU)(a)].turningMode}]),key:t.id},[Math.abs((0,s.SU)(a)-l)<2||t.animations?.length?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"slide-content",style:(0,oe.j5)({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[(0,i.Wm)(WC,{slide:t,scale:r.value,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["slide","scale","animationIndex","turnSlideToId","manualExitFullscreen"])],4)):(0,i.kq)("",!0)],2)))),128))]))}});const FC=(0,Vl.Z)(HC,[["__scopeId","data-v-552b63d2"]]);var AC=FC;const $C={class:"slide-thumbnails"},ZC={class:"return-button"},OC={class:"slide-thumbnails-content"},RC=["onClick"];var zC=(0,i.aZ)({__name:"SlideThumbnails",props:{turnSlideToIndex:{type:Function}},emits:["close"],setup(e,{emit:t}){const l=e,a=t,{slides:n,slideIndex:r}=(0,o.Jk)($()),{slidesLoadLimit:u}=Cm(),c=e=>{l.turnSlideToIndex(e),a("close")};return(e,t)=>{const l=(0,i.up)("IconArrowCircleLeft");return(0,i.wg)(),(0,i.iD)("div",$C,[(0,i._)("div",ZC,[(0,i.Wm)(l,{class:"icon",onClick:t[0]||(t[0]=e=>a("close"))})]),(0,i._)("div",OC,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(n),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["thumbnail",{active:t===(0,s.SU)(r)}]),key:e.id,onClick:e=>c(t)},[(0,i.Wm)(Jd,{slide:e,size:150,visible:t<(0,s.SU)(u)},null,8,["slide","visible"])],10,RC)))),128))])])}}});const PC=(0,Vl.Z)(zC,[["__scopeId","data-v-15912b32"]]);var BC=PC;const NC={key:0,class:"blackboard"};var jC=(0,i.aZ)({__name:"WritingBoard",props:{color:{default:"#ffcc00"},model:{default:"pen"},blackboard:{type:Boolean,default:!1},penSize:{default:6},markSize:{default:24},rubberSize:{default:80}},emits:["end"],setup(e,{expose:t,emit:l}){const a=e,n=l;let o=null;const r=(0,s.iH)(),u=(0,s.iH)();let c={x:0,y:0},d=!1,p=0,v=-1;const m=(0,s.iH)({x:0,y:0}),h=(0,s.iH)(!1),f=(0,s.iH)(0),g=(0,s.iH)(0),y=(0,i.Fl)((()=>u.value?f.value/u.value.width:1)),w=(0,i.Fl)((()=>u.value?g.value/u.value.height:1)),x=()=>{r.value&&(f.value=r.value.clientWidth,g.value=r.value.clientHeight)},k=new ResizeObserver(x);(0,i.bv)((()=>{r.value&&k.observe(r.value)})),(0,i.Ah)((()=>{r.value&&k.unobserve(r.value)}));const b=()=>{u.value&&r.value&&(o=u.value.getContext("2d"),o&&(u.value.width=r.value.clientWidth,u.value.height=r.value.clientHeight,o.lineCap="round",o.lineJoin="round"))};(0,i.bv)(b);const _=()=>{o&&("mark"===a.model?(o.globalCompositeOperation="xor",o.globalAlpha=.5):"pen"===a.model&&(o.globalCompositeOperation="source-over",o.globalAlpha=1))};(0,i.YP)((()=>a.model),_);const I=(e,t,l)=>{if(!o)return;const n=c.x,i=c.y;o.lineWidth=l,o.strokeStyle=a.color,o.beginPath(),o.moveTo(n,i),o.lineTo(e,t),o.stroke(),o.closePath()},S=(e,t)=>{if(!o||!u.value)return;const l=c.x,n=c.y,i=a.rubberSize/2,s=i*Math.sin(Math.atan((t-n)/(e-l))),r=i*Math.cos(Math.atan((t-n)/(e-l))),d=[l+s,n-r],p=[l-s,n+r],v=[e+s,t-r],m=[e-s,t+r];o.save(),o.beginPath(),o.arc(e,t,i,0,2*Math.PI),o.clip(),o.clearRect(0,0,u.value.width,u.value.height),o.restore(),o.save(),o.beginPath(),o.moveTo(...d),o.lineTo(...v),o.lineTo(...m),o.lineTo(...p),o.closePath(),o.clip(),o.clearRect(0,0,u.value.width,u.value.height),o.restore()},C=(e,t)=>{const l=c.x,a=c.y;return Math.sqrt((e-l)*(e-l)+(t-a)*(t-a))},L=(e,t)=>{const l=10,n=.1,o=a.penSize,i=3,s=e/t;let r;return r=s<=n?o:s>=l?i:o-s/l*o,-1===v?r:1*r/3+2*v/3},T=(e,t)=>{const l=(new Date).getTime();if("pen"===a.model){const a=C(e,t),n=l-p,o=L(a,n);I(e,t,o),v=o}else"mark"===a.model?I(e,t,a.markSize):S(e,t);c={x:e,y:t},p=(new Date).getTime()},E=e=>{if(!u.value)return[0,0];const t=e instanceof MouseEvent?e:e.changedTouches[0],l=u.value.getBoundingClientRect(),a=t.pageX-l.x,n=t.pageY-l.y;return[a,n]},M=e=>{const[t,l]=E(e),a=t/y.value,n=l/w.value;d=!0,c={x:a,y:n},p=(new Date).getTime(),e instanceof MouseEvent||(m.value={x:t,y:l},h.value=!0)},U=e=>{const[t,l]=E(e),a=t/y.value,n=l/w.value;m.value={x:t,y:l},d&&T(a,n)},W=()=>{d&&(d=!1,n("end"))},D=()=>{o&&u.value&&(o.clearRect(0,0,u.value.width,u.value.height),n("end"))},H=()=>u.value?.toDataURL(),F=e=>{if(o&&u.value&&(o.clearRect(0,0,u.value.width,u.value.height),e)){o.globalCompositeOperation="source-over",o.globalAlpha=1;const t=new Image;t.src=e,t.onload=()=>{o.drawImage(t,0,0),_()}}};return t({clearCanvas:D,getImageDataURL:H,setImageDataURL:F}),(e,t)=>{const l=(0,i.up)("IconWrite"),a=(0,i.up)("IconHighLight");return(0,i.wg)(),(0,i.iD)("div",{class:"writing-board",ref_key:"writingBoardRef",ref:r},[e.blackboard?((0,i.wg)(),(0,i.iD)("div",NC)):(0,i.kq)("",!0),(0,i._)("canvas",{class:"canvas",ref_key:"canvasRef",ref:u,style:(0,oe.j5)({width:f.value+"px",height:g.value+"px"}),onMousedown:t[0]||(t[0]=e=>M(e)),onMousemove:t[1]||(t[1]=e=>U(e)),onMouseup:t[2]||(t[2]=e=>W()),onTouchstart:t[3]||(t[3]=e=>M(e)),onTouchmove:t[4]||(t[4]=e=>U(e)),onTouchend:t[5]||(t[5]=e=>{W(),h.value=!1}),onMouseleave:t[6]||(t[6]=e=>{W(),h.value=!1}),onMouseenter:t[7]||(t[7]=e=>h.value=!0)},null,36),h.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},["eraser"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"eraser",style:(0,oe.j5)({left:m.value.x-e.rubberSize/2+"px",top:m.value.y-e.rubberSize/2+"px",width:e.rubberSize+"px",height:e.rubberSize+"px"})},null,4)):(0,i.kq)("",!0),"pen"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:1,class:"pen",style:(0,oe.j5)({left:m.value.x-e.penSize/2+"px",top:m.value.y-6*e.penSize+e.penSize/2+"px",color:e.color})},["pen"===e.model?((0,i.wg)(),(0,i.j4)(l,{key:0,class:"icon",size:6*e.penSize},null,8,["size"])):(0,i.kq)("",!0)],4)):(0,i.kq)("",!0),"mark"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:2,class:"pen",style:(0,oe.j5)({left:m.value.x-e.markSize/2+"px",top:m.value.y+"px",color:e.color})},["mark"===e.model?((0,i.wg)(),(0,i.j4)(a,{key:0,class:"icon",size:1.5*e.markSize},null,8,["size"])):(0,i.kq)("",!0)],4)):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0)],512)}}});const YC=(0,Vl.Z)(jC,[["__scopeId","data-v-d8027742"]]);var VC=YC;const JC=e=>((0,i.dD)("data-v-92cd0b5a"),e=e(),(0,i.Cn)(),e),qC={class:"writing-board-tool"},XC={class:"tool-content"},GC={class:"size"},KC=JC((()=>(0,i._)("div",{class:"label"},"墨迹粗细:",-1))),QC={class:"size"},eL=JC((()=>(0,i._)("div",{class:"label"},"墨迹粗细:",-1))),tL={class:"size"},lL=JC((()=>(0,i._)("div",{class:"label"},"橡皮大小:",-1))),aL={class:"colors"},nL=["onClick"];var oL=(0,i.aZ)({__name:"WritingBoardTool",props:{slideWidth:{},slideHeight:{},left:{default:-5},top:{default:-5}},emits:["close"],setup(e,{emit:t}){const l=["#000000","#ffffff","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#ffff3a"],a=t,{currentSlide:r}=(0,o.Jk)($()),u=(0,s.iH)(),c=(0,s.iH)("#e2534d"),d=(0,s.iH)("pen"),p=(0,s.iH)(!1),v=(0,s.iH)(""),m=(0,s.iH)(6),h=(0,s.iH)(24),f=(0,s.iH)(80),g=e=>{d.value===e?v.value=v.value===e?"":e:(v.value&&(v.value=""),d.value=e)},y=()=>{u.value.clearCanvas()},w=e=>{"eraser"===d.value&&(d.value="pen"),c.value=e},x=()=>{a("close")};(0,i.YP)(r,(()=>{V.writingBoardImgs.where("id").equals(r.value.id).toArray().then((e=>{const t=e[0];u.value.setImageDataURL(t?.dataURL||"")}))}),{immediate:!0});const k=()=>{const e=u.value.getImageDataURL();e&&V.writingBoardImgs.where("id").equals(r.value.id).toArray().then((t=>{const l=t[0];l?V.writingBoardImgs.update(l,{dataURL:e}):V.writingBoardImgs.add({id:r.value.id,dataURL:e})}))};return(e,t)=>{const a=(0,i.up)("IconWrite"),o=(0,i.up)("IconHighLight"),s=(0,i.up)("IconErase"),r=(0,i.up)("IconClear"),b=(0,i.up)("IconFill"),_=(0,i.up)("IconClose"),I=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",qC,[(0,i._)("div",{class:"writing-board-wrap",style:(0,oe.j5)({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[(0,i.Wm)(VC,{ref_key:"writingBoardRef",ref:u,color:c.value,blackboard:p.value,model:d.value,penSize:m.value,markSize:h.value,rubberSize:f.value,onEnd:t[0]||(t[0]=e=>k())},null,8,["color","blackboard","model","penSize","markSize","rubberSize"])],4),(0,i.Wm)(ZS,{class:"tools-panel",width:520,height:50,left:e.left,top:e.top,moveable:""===v.value},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"tools",onMousedown:t[10]||(t[10]=(0,n.iM)((()=>{}),["stop"]))},[(0,i._)("div",XC,[(0,i.Wm)(dn,{trigger:"manual",value:"pen"===v.value},{content:(0,i.w5)((()=>[(0,i._)("div",GC,[KC,(0,i.Wm)(qm,{class:"size-slider",min:4,max:10,step:2,value:m.value,"onUpdate:value":t[1]||(t[1]=e=>m.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["btn",{active:"pen"===d.value}]),onClick:t[2]||(t[2]=e=>g("pen"))},[(0,i.Wm)(a,{class:"icon"})],2)),[[I,"画笔"]])])),_:1},8,["value"]),(0,i.Wm)(dn,{trigger:"manual",value:"mark"===v.value},{content:(0,i.w5)((()=>[(0,i._)("div",QC,[eL,(0,i.Wm)(qm,{class:"size-slider",min:16,max:40,step:4,value:h.value,"onUpdate:value":t[3]||(t[3]=e=>h.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["btn",{active:"mark"===d.value}]),onClick:t[4]||(t[4]=e=>g("mark"))},[(0,i.Wm)(o,{class:"icon"})],2)),[[I,"荧光笔"]])])),_:1},8,["value"]),(0,i.Wm)(dn,{trigger:"manual",value:"eraser"===v.value},{content:(0,i.w5)((()=>[(0,i._)("div",tL,[lL,(0,i.Wm)(qm,{class:"size-slider",min:20,max:200,step:20,value:f.value,"onUpdate:value":t[5]||(t[5]=e=>f.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["btn",{active:"eraser"===d.value}]),onClick:t[6]||(t[6]=e=>g("eraser"))},[(0,i.Wm)(s,{class:"icon"})],2)),[[I,"橡皮擦"]])])),_:1},8,["value"]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"btn",onClick:t[7]||(t[7]=e=>y())},[(0,i.Wm)(r,{class:"icon"})])),[[I,"清除墨迹"]]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["btn",{active:p.value}]),onClick:t[8]||(t[8]=e=>p.value=!p.value)},[(0,i.Wm)(b,{class:"icon"})],2)),[[I,"黑板"]]),(0,i._)("div",aL,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>(0,i._)("div",{class:(0,oe.C_)(["color",{active:e===c.value}]),key:e,style:(0,oe.j5)({backgroundColor:e}),onClick:t=>w(e)},null,14,nL))),64))])]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"btn",onClick:t[9]||(t[9]=e=>x())},[(0,i.Wm)(_,{class:"icon"})])),[[I,"关闭画笔"]])],32)])),_:1},8,["left","top","moveable"])])}}});const iL=(0,Vl.Z)(oL,[["__scopeId","data-v-92cd0b5a"]]);var sL=iL;const rL=e=>((0,i.dD)("data-v-83a589f0"),e=e(),(0,i.Cn)(),e),uL={class:"header"},cL={class:"content"},dL={class:"timer"},pL=["value","disabled"],vL=rL((()=>(0,i._)("div",{class:"colon"},":",-1))),mL={class:"timer"},hL=["value","disabled"];var fL=(0,i.aZ)({__name:"CountdownTimer",props:{left:{default:5},top:{default:5}},emits:["close"],setup(e,{emit:t}){const l=t,a=(0,s.iH)(null),o=(0,s.iH)(!1),r=(0,s.iH)(!1),u=(0,s.iH)(0),c=(0,i.Fl)((()=>Math.floor(u.value/60))),d=(0,i.Fl)((()=>u.value%60)),p=(0,i.Fl)((()=>!r.value||o.value)),v=()=>{a.value&&clearInterval(a.value)};(0,i.Ah)(v);const m=()=>{v(),o.value=!1},h=()=>{v(),o.value=!1,r.value?u.value=600:u.value=0},f=()=>{v(),r.value?a.value=setInterval((()=>{u.value=u.value-1,u.value<=0&&h()}),1e3):a.value=setInterval((()=>{u.value=u.value+1,u.value>36e3&&m()}),1e3),o.value=!0},g=()=>{o.value?m():f()},y=()=>{r.value=!r.value,h()},w=(e,t)=>{const l=e.target;let a=l.value;const n=/^(\d)+$/.test(a);n?("second"===t&&+a>=60&&(a="59"),u.value="minute"===t?60*+a+d.value:+a+60*c.value):l.value=G("minute"===t?c.value:d.value,2)};return(e,t)=>{const a=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.j4)(ZS,{class:"countdown-timer",width:180,height:110,left:e.left,top:e.top},{default:(0,i.w5)((()=>[(0,i._)("div",uL,[(0,i._)("span",{class:"text-btn",onClick:t[0]||(t[0]=e=>g())},(0,oe.zw)(o.value?"暂停":"开始"),1),(0,i._)("span",{class:"text-btn",onClick:t[1]||(t[1]=e=>h())},"重置"),(0,i._)("span",{class:(0,oe.C_)(["text-btn",{active:r.value}]),onClick:t[2]||(t[2]=e=>y())},"倒计时",2)]),(0,i._)("div",cL,[(0,i._)("div",dL,[(0,i._)("input",{type:"text",value:(0,s.SU)(G)(c.value,2),maxlength:3,disabled:p.value,onMousedown:t[3]||(t[3]=(0,n.iM)((()=>{}),["stop"])),onBlur:t[4]||(t[4]=e=>w(e,"minute")),onKeydown:[t[5]||(t[5]=(0,n.iM)((()=>{}),["stop"])),t[6]||(t[6]=(0,n.D2)((0,n.iM)((e=>w(e,"minute")),["stop"]),["enter"]))]},null,40,pL)]),vL,(0,i._)("div",mL,[(0,i._)("input",{type:"text",value:(0,s.SU)(G)(d.value,2),maxlength:3,disabled:p.value,onMousedown:t[7]||(t[7]=(0,n.iM)((()=>{}),["stop"])),onBlur:t[8]||(t[8]=e=>w(e,"second")),onKeydown:[t[9]||(t[9]=(0,n.iM)((()=>{}),["stop"])),t[10]||(t[10]=(0,n.D2)((0,n.iM)((e=>w(e,"second")),["stop"]),["enter"]))]},null,40,hL)])]),(0,i._)("div",{class:"close-btn",onClick:t[11]||(t[11]=e=>l("close"))},[(0,i.Wm)(a,{class:"icon"})])])),_:1},8,["left","top"])}}});const gL=(0,Vl.Z)(fL,[["__scopeId","data-v-83a589f0"]]);var yL=gL;const wL={class:"tools-left"},xL={class:"content"};var kL=(0,i.aZ)({__name:"BaseView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a}=(0,o.Jk)($()),{autoPlayTimer:n,autoPlay:r,closeAutoPlay:u,autoPlayInterval:c,setAutoPlayInterval:d,loopPlay:p,setLoopPlay:v,mousewheelListener:m,touchStartListener:h,touchEndListener:f,turnPrevSlide:g,turnNextSlide:y,turnSlideToIndex:w,turnSlideToId:x,execPrev:k,execNext:b,animationIndex:_}=hC(),{slideWidth:I,slideHeight:S}=fC(),{exitScreening:C}=Ca(),{fullscreenState:L,manualExitFullscreen:T}=gC(),E=(0,s.iH)(!1),M=(0,s.iH)(!1),U=(0,s.iH)(!1),W=(0,s.iH)(!1),D=(0,s.iH)(!1),H=()=>[{text:"上一页",subText:"↑ ←",disable:a.value<=0,handler:()=>g()},{text:"下一页",subText:"↓ →",disable:a.value>=l.value.length-1,handler:()=>y()},{text:"第一页",disable:0===a.value,handler:()=>w(0)},{text:"最后一页",disable:a.value===l.value.length-1,handler:()=>w(l.value.length-1)},{divider:!0},{text:n.value?"取消自动放映":"自动放映",handler:n.value?u:r,children:[{text:"2.5秒",subText:2500===c.value?"√":"",handler:()=>d(2500)},{text:"5秒",subText:5e3===c.value?"√":"",handler:()=>d(5e3)},{text:"7.5秒",subText:7500===c.value?"√":"",handler:()=>d(7500)},{text:"10秒",subText:1e4===c.value?"√":"",handler:()=>d(1e4)}]},{text:"循环放映",subText:p.value?"√":"",handler:()=>v(!p.value)},{divider:!0},{text:"显示工具栏",handler:()=>E.value=!0},{text:"查看所有幻灯片",handler:()=>W.value=!0},{text:"画笔工具",handler:()=>M.value=!0},{text:"演讲者视图",handler:()=>t.changeViewMode("presenter")},{divider:!0},{text:"结束放映",subText:"ESC",handler:C}];return(e,t)=>{const n=(0,i.up)("IconLeftTwo"),o=(0,i.up)("IconRightTwo"),r=(0,i.up)("IconWrite"),u=(0,i.up)("IconMagic"),c=(0,i.up)("IconStopwatchStart"),d=(0,i.up)("IconListView"),p=(0,i.up)("IconOffScreenOne"),v=(0,i.up)("IconFullScreenOne"),g=(0,i.up)("IconPower"),y=(0,i.Q2)("contextmenu"),F=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["base-view",{"laser-pen":D.value}])},[(0,i.wy)((0,i.Wm)(AC,{slideWidth:(0,s.SU)(I),slideHeight:(0,s.SU)(S),animationIndex:(0,s.SU)(_),turnSlideToId:(0,s.SU)(x),manualExitFullscreen:(0,s.SU)(T),onWheel:t[0]||(t[0]=e=>(0,s.SU)(m)(e)),onTouchstart:t[1]||(t[1]=e=>(0,s.SU)(h)(e)),onTouchend:t[2]||(t[2]=e=>(0,s.SU)(f)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[y,H]]),W.value?((0,i.wg)(),(0,i.j4)(BC,{key:0,turnSlideToIndex:(0,s.SU)(w),onClose:t[3]||(t[3]=e=>W.value=!1)},null,8,["turnSlideToIndex"])):(0,i.kq)("",!0),M.value?((0,i.wg)(),(0,i.j4)(sL,{key:1,slideWidth:(0,s.SU)(I),slideHeight:(0,s.SU)(S),onClose:t[4]||(t[4]=e=>M.value=!1)},null,8,["slideWidth","slideHeight"])):(0,i.kq)("",!0),U.value?((0,i.wg)(),(0,i.j4)(yL,{key:2,onClose:t[5]||(t[5]=e=>U.value=!1)})):(0,i.kq)("",!0),(0,i._)("div",wL,[(0,i.Wm)(n,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:t[6]||(t[6]=e=>(0,s.SU)(k)())}),(0,i.Wm)(o,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:t[7]||(t[7]=e=>(0,s.SU)(b)())})]),(0,i._)("div",{class:(0,oe.C_)(["tools-right",{visible:E.value}]),onMouseleave:t[16]||(t[16]=e=>E.value=!1),onMouseenter:t[17]||(t[17]=e=>E.value=!0)},[(0,i._)("div",xL,[(0,i._)("div",{class:"tool-btn page-number",onClick:t[8]||(t[8]=e=>W.value=!0)},"幻灯片 "+(0,oe.zw)((0,s.SU)(a)+1)+" / "+(0,oe.zw)((0,s.SU)(l).length),1),(0,i.wy)((0,i.Wm)(r,{class:"tool-btn",onClick:t[9]||(t[9]=e=>M.value=!0)},null,512),[[F,"画笔工具"]]),(0,i.wy)((0,i.Wm)(u,{class:(0,oe.C_)(["tool-btn",{active:D.value}]),onClick:t[10]||(t[10]=e=>D.value=!D.value)},null,8,["class"]),[[F,"激光笔"]]),(0,i.wy)((0,i.Wm)(c,{class:(0,oe.C_)(["tool-btn",{active:U.value}]),onClick:t[11]||(t[11]=e=>U.value=!U.value)},null,8,["class"]),[[F,"计时器"]]),(0,i.wy)((0,i.Wm)(d,{class:"tool-btn",onClick:t[12]||(t[12]=t=>e.changeViewMode("presenter"))},null,512),[[F,"演讲者视图"]]),(0,s.SU)(L)?(0,i.wy)(((0,i.wg)(),(0,i.j4)(p,{key:0,class:"tool-btn",onClick:t[13]||(t[13]=e=>(0,s.SU)(T)())},null,512)),[[F,"退出全屏"]]):(0,i.wy)(((0,i.wg)(),(0,i.j4)(v,{key:1,class:"tool-btn",onClick:t[14]||(t[14]=e=>(0,s.SU)(_a)())},null,512)),[[F,"进入全屏"]]),(0,i.wy)((0,i.Wm)(g,{class:"tool-btn",onClick:t[15]||(t[15]=e=>(0,s.SU)(C)())},null,512),[[F,"结束放映"]])])],34)],2)}}});const bL=(0,Vl.Z)(kL,[["__scopeId","data-v-e9c1efea"]]);var _L=bL;const IL=e=>((0,i.dD)("data-v-77a65275"),e=e(),(0,i.Cn)(),e),SL={class:"presenter-view"},CL={class:"toolbar"},LL=IL((()=>(0,i._)("span",null,"普通视图",-1))),TL=IL((()=>(0,i._)("span",null,"画笔",-1))),EL=IL((()=>(0,i._)("span",null,"激光笔",-1))),ML=IL((()=>(0,i._)("span",null,"计时器",-1))),UL=IL((()=>(0,i._)("span",null,"结束放映",-1))),WL={class:"content"},DL=["onClick"],HL={class:"remark"},FL={class:"header"},AL=IL((()=>(0,i._)("span",null,"演讲者备注",-1))),$L=["innerHTML"],ZL={class:"remark-scale"};var OL=(0,i.aZ)({__name:"PresenterView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a,viewportRatio:r,currentSlide:u}=(0,o.Jk)($()),c=(0,s.iH)(),d=(0,s.iH)(),p=(0,s.iH)(!1),v=(0,s.iH)(!1),m=(0,s.iH)(!1),{mousewheelListener:h,touchStartListener:f,touchEndListener:g,turnPrevSlide:y,turnNextSlide:w,turnSlideToIndex:x,turnSlideToId:k,animationIndex:b}=hC(),{slideWidth:_,slideHeight:I}=fC(c),{exitScreening:S}=Ca(),{slidesLoadLimit:C}=Cm(),{fullscreenState:L,manualExitFullscreen:T}=gC(),E=(0,s.iH)(16),M=(0,i.Fl)((()=>la(u.value.remark||"无备注"))),U=e=>{d.value&&d.value.scrollBy(e.deltaY,0)},W=e=>{e<12||e>40||(E.value=e)};(0,i.YP)(a,(()=>{(0,i.Y3)((()=>{if(!d.value)return;const e=d.value.querySelector(".thumbnail.active");if(!e)return;const t=d.value.offsetWidth,l=e.offsetLeft;d.value.scrollTo({left:l-t/2,behavior:"smooth"})}))}));const D=()=>[{text:"上一页",subText:"↑ ←",disable:a.value<=0,handler:()=>y()},{text:"下一页",subText:"↓ →",disable:a.value>=l.value.length-1,handler:()=>w()},{text:"第一页",disable:0===a.value,handler:()=>x(0)},{text:"最后一页",disable:a.value===l.value.length-1,handler:()=>x(l.value.length-1)},{divider:!0},{text:"画笔工具",handler:()=>p.value=!0},{text:"普通视图",handler:()=>t.changeViewMode("base")},{divider:!0},{text:"结束放映",subText:"ESC",handler:S}];return(e,t)=>{const o=(0,i.up)("IconListView"),u=(0,i.up)("IconWrite"),y=(0,i.up)("IconMagic"),w=(0,i.up)("IconStopwatchStart"),H=(0,i.up)("IconOffScreenOne"),F=(0,i.up)("IconPower"),A=(0,i.up)("IconMinus"),$=(0,i.up)("IconPlus"),Z=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",SL,[(0,i._)("div",CL,[(0,i._)("div",{class:"tool-btn",onClick:t[0]||(t[0]=t=>e.changeViewMode("base"))},[(0,i.Wm)(o,{class:"tool-icon"}),LL]),(0,i._)("div",{class:(0,oe.C_)(["tool-btn",{active:p.value}]),onClick:t[1]||(t[1]=e=>p.value=!p.value)},[(0,i.Wm)(u,{class:"tool-icon"}),TL],2),(0,i._)("div",{class:(0,oe.C_)(["tool-btn",{active:m.value}]),onClick:t[2]||(t[2]=e=>m.value=!m.value)},[(0,i.Wm)(y,{class:"tool-icon"}),EL],2),(0,i._)("div",{class:(0,oe.C_)(["tool-btn",{active:v.value}]),onClick:t[3]||(t[3]=e=>v.value=!v.value)},[(0,i.Wm)(w,{class:"tool-icon"}),ML],2),(0,i._)("div",{class:"tool-btn",onClick:t[4]||(t[4]=()=>(0,s.SU)(L)?(0,s.SU)(T)():(0,s.SU)(_a)())},[(0,s.SU)(L)?((0,i.wg)(),(0,i.j4)(H,{key:0,class:"tool-icon"})):((0,i.wg)(),(0,i.j4)(H,{key:1,class:"tool-icon"})),(0,i._)("span",null,(0,oe.zw)((0,s.SU)(L)?"退出全屏":"全屏"),1)]),(0,i.Wm)(Zc,{class:"divider"}),(0,i._)("div",{class:"tool-btn",onClick:t[5]||(t[5]=e=>(0,s.SU)(S)())},[(0,i.Wm)(F,{class:"tool-icon"}),UL])]),(0,i._)("div",WL,[(0,i._)("div",{class:(0,oe.C_)(["slide-list-wrap",{"laser-pen":m.value}]),ref_key:"slideListWrapRef",ref:c},[(0,i.wy)((0,i.Wm)(AC,{slideWidth:(0,s.SU)(_),slideHeight:(0,s.SU)(I),animationIndex:(0,s.SU)(b),turnSlideToId:(0,s.SU)(k),manualExitFullscreen:(0,s.SU)(T),onWheel:t[6]||(t[6]=e=>(0,s.SU)(h)(e)),onTouchstart:t[7]||(t[7]=e=>(0,s.SU)(f)(e)),onTouchend:t[8]||(t[8]=e=>(0,s.SU)(g)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[Z,D]]),p.value?((0,i.wg)(),(0,i.j4)(sL,{key:0,slideWidth:(0,s.SU)(_),slideHeight:(0,s.SU)(I),left:-365,top:-155,onClose:t[9]||(t[9]=e=>p.value=!1)},null,8,["slideWidth","slideHeight"])):(0,i.kq)("",!0),v.value?((0,i.wg)(),(0,i.j4)(yL,{key:1,left:75,onClose:t[10]||(t[10]=e=>v.value=!1)})):(0,i.kq)("",!0)],2),(0,i._)("div",{class:"thumbnails",ref_key:"thumbnailsRef",ref:d,onWheel:t[11]||(t[11]=(0,n.iM)((e=>U(e)),["prevent"]))},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["thumbnail",{active:t===(0,s.SU)(a)}]),key:e.id,onClick:e=>(0,s.SU)(x)(t)},[(0,i.Wm)(Jd,{slide:e,size:120/(0,s.SU)(r),visible:t<(0,s.SU)(C)},null,8,["slide","size","visible"])],10,DL)))),128))],544)]),(0,i._)("div",HL,[(0,i._)("div",FL,[AL,(0,i._)("span",null,"P "+(0,oe.zw)((0,s.SU)(a)+1)+" / "+(0,oe.zw)((0,s.SU)(l).length),1)]),(0,i._)("div",{class:"remark-content ProseMirror-static",style:(0,oe.j5)({fontSize:E.value+"px"}),innerHTML:M.value},null,12,$L),(0,i._)("div",ZL,[(0,i._)("div",{class:(0,oe.C_)(["scale-btn",{disable:12===E.value}]),onClick:t[12]||(t[12]=e=>W(E.value-2))},[(0,i.Wm)(A)],2),(0,i._)("div",{class:(0,oe.C_)(["scale-btn",{disable:40===E.value}]),onClick:t[13]||(t[13]=e=>W(E.value+2))},[(0,i.Wm)($)],2)])])])}}});const RL=(0,Vl.Z)(OL,[["__scopeId","data-v-77a65275"]]);var zL=RL;const PL={class:"pptist-screen"};var BL=(0,i.aZ)({__name:"index",setup(e){const t=(0,s.iH)("base"),l=e=>{t.value=e},{exitScreening:a}=Ca(),n=e=>{const t=e.key.toUpperCase();t===ne.ESC&&a()};return(0,i.bv)((()=>document.addEventListener("keydown",n))),(0,i.Ah)((()=>document.removeEventListener("keydown",n))),(e,a)=>((0,i.wg)(),(0,i.iD)("div",PL,["base"===t.value?((0,i.wg)(),(0,i.j4)(_L,{key:0,changeViewMode:l})):"presenter"===t.value?((0,i.wg)(),(0,i.j4)(zL,{key:1,changeViewMode:l})):(0,i.kq)("",!0)]))}});const NL=(0,Vl.Z)(BL,[["__scopeId","data-v-6bf3d190"]]);var jL=NL,YL=(0,i.aZ)({__name:"MobileEditableElement",props:{elementInfo:{},elementIndex:{},selectElement:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[sa.IMAGE]:$o,[sa.TEXT]:ls,[sa.SHAPE]:ys,[sa.LINE]:Es,[sa.CHART]:As,[sa.TABLE]:lr,[sa.LATEX]:rr,[sa.VIDEO]:Zr,[sa.AUDIO]:ou};return e[t.elementInfo.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"mobile-editable-element",style:(0,oe.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:()=>null},null,8,["elementInfo","selectElement"]))],4))}});const VL=YL;var JL=VL,qL=(0,i.aZ)({__name:"MobileOperate",props:{elementInfo:{},isSelected:{type:Boolean},canvasScale:{},scaleElement:{type:Function},rotateElement:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0)),a=(0,i.Fl)((()=>t.elementInfo.width*t.canvasScale)),o=(0,i.Fl)((()=>t.elementInfo.height*t.canvasScale)),{borderLines:r,resizeHandlers:u,textElementResizeHandlers:c}=Ou(a,o),d="text"===t.elementInfo.type||"table"===t.elementInfo.type?c:u,p=(0,i.Fl)((()=>["chart","video","audio"].includes(t.elementInfo.type)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"mobile-operate",style:(0,oe.j5)({top:e.elementInfo.top*e.canvasScale+"px",left:e.elementInfo.left*e.canvasScale+"px",transform:`rotate(${l.value}deg)`,transformOrigin:`${e.elementInfo.width*e.canvasScale/2}px ${e.elementInfo.height*e.canvasScale/2}px`})},[e.isSelected?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(r),(e=>((0,i.wg)(),(0,i.j4)(ju,{class:"operate-border-line",key:e.type,type:e.type,style:(0,oe.j5)(e.style)},null,8,["type","style"])))),128)),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(t=>((0,i.wg)(),(0,i.j4)(Pu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,oe.j5)(t.style),onTouchstart:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onTouchstart"])))),128)),p.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.j4)(Qu,{key:0,class:"operate-rotate-handler",style:(0,oe.j5)({left:a.value/2+"px"}),onTouchstart:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]))],64)):(0,i.kq)("",!0)],4))}});const XL=(0,Vl.Z)(qL,[["__scopeId","data-v-fd451ff6"]]);var GL=XL;const KL={class:"mobile-thumbnails"},QL=["onClick"],eT={class:"label"};var tT=(0,i.aZ)({__name:"MobileThumbnails",setup(e){const t=$(),{slides:l,slideIndex:a}=(0,o.Jk)(t),{sortSlides:n}=ha(),{slidesLoadLimit:r}=Cm(),u=e=>{t.updateSlideIndex(e)},c=e=>{const{newIndex:t,oldIndex:l}=e;void 0!==t&&void 0!==l&&t!==l&&n(t,l)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",KL,[(0,i.Wm)((0,s.SU)(Dm()),{class:"thumbnail-list",modelValue:(0,s.SU)(l),animation:200,scroll:!0,scrollSensitivity:50,delayOnTouchOnly:!0,delay:800,itemKey:"id",onEnd:c},{item:(0,i.w5)((({element:e,index:t})=>[(0,i._)("div",{class:(0,oe.C_)(["thumbnail-item",{active:(0,s.SU)(a)===t}]),onClick:e=>u(t)},[(0,i._)("div",eT,(0,oe.zw)(t+1),1),(0,i.Wm)(Jd,{class:"thumbnail",slide:e,size:120,visible:t<(0,s.SU)(r)},null,8,["slide","visible"])],10,QL)])),_:1},8,["modelValue"])]))}});const lT=(0,Vl.Z)(tT,[["__scopeId","data-v-2c80920e"]]);var aT=lT;const nT={class:"slide-toolbar"},oT={class:"remark"},iT=["value"],sT={class:"toolbar"};var rT=(0,i.aZ)({__name:"SlideToolbar",setup(e){const t=$(),{viewportRatio:l,currentSlide:a}=(0,o.Jk)(t),{createSlide:n,copyAndPasteSlide:r,deleteSlide:u}=ha(),{createTextElement:c,createImageElement:d,createShapeElement:p}=pa(),v=()=>{const e=400,t=56;c({left:(oa-e)/2,top:(oa*l.value-t)/2,width:e,height:t},{content:"

新添加文本

"})},m=e=>{e&&e[0]&&na(e[0]).then((e=>d(e)))},h=e=>{const t={viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"},a={viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"},n={square:t,round:a},o=200;p({left:(oa-o)/2,top:(oa*l.value-o)/2,width:o,height:o},n[e])},f=(0,i.Fl)((()=>a.value?.remark||"")),g=e=>{const l=e.target.value;t.updateSlide({remark:l})};return(e,t)=>{const l=(0,i.up)("IconPlus"),a=(0,i.up)("IconCopy"),o=(0,i.up)("IconDelete"),c=(0,i.up)("IconFontSize"),d=(0,i.up)("IconPicture"),p=(0,i.up)("IconSquare"),y=(0,i.up)("IconRound");return(0,i.wg)(),(0,i.iD)("div",nT,[(0,i._)("div",oT,[(0,i._)("textarea",{value:f.value,placeholder:"点击输入演讲者备注",onInput:t[0]||(t[0]=e=>g(e))},null,40,iT)]),(0,i._)("div",sT,[(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>(0,s.SU)(n)())},{default:(0,i.w5)((()=>[(0,i.Wm)(l,{class:"icon"}),(0,i.Uk)(" 新幻灯片")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[2]||(t[2]=e=>(0,s.SU)(r)())},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"icon"}),(0,i.Uk)(" 复制")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[3]||(t[3]=e=>(0,s.SU)(u)())},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:"icon"}),(0,i.Uk)(" 删除")])),_:1})])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[4]||(t[4]=e=>v())},{default:(0,i.w5)((()=>[(0,i.Wm)(c,{class:"icon"}),(0,i.Uk)(" 文字")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(Pa,{onChange:t[5]||(t[5]=e=>m(e))},{default:(0,i.w5)((()=>[(0,i.Wm)(d,{class:"icon"}),(0,i.Uk)("图片 ")])),_:1})])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[6]||(t[6]=e=>h("square"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p,{class:"icon"}),(0,i.Uk)(" 矩形")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:t[7]||(t[7]=e=>h("round"))},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{class:"icon"}),(0,i.Uk)(" 圆形")])),_:1})])),_:1})]),(0,i.Wm)(aT)])}}});const uT=(0,Vl.Z)(rT,[["__scopeId","data-v-24150aba"]]);var cT=uT;const dT=e=>((0,i.dD)("data-v-f3d1ac70"),e=e(),(0,i.Cn)(),e),pT={class:"element-toolbar"},vT={class:"content"},mT={key:0,class:"style"},hT={class:"row-block"},fT=dT((()=>(0,i._)("div",{class:"label"},"文字颜色:",-1))),gT={class:"colors"},yT=["onClick"],wT={class:"row-block"},xT=dT((()=>(0,i._)("div",{class:"label"},"填充色:",-1))),kT={class:"colors"},bT=["onClick"],_T={key:1,class:"common"};var IT=(0,i.aZ)({__name:"ElementToolbar",setup(e){const t=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57"],l=R(),a=$(),{handleElement:n,handleElementId:r,richTextAttrs:u}=(0,o.Jk)(l),{addHistorySnapshot:c}=da(),d=(e,t)=>{a.updateElement({id:e,props:t}),c()},p=[{key:"style",label:"样式"},{key:"common",label:"布局"}],v=(0,s.iH)("common"),{orderElement:m}=ba(),{alignElementToCanvas:h}=qn(),{addElementsFromData:f}=va(),{deleteElement:g}=ga(),y=()=>{const e=JSON.parse(JSON.stringify(n.value));f([e])},w=(e,t)=>{Oi.emit(Ai.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},x=e=>{if(n.value){if(("text"===n.value.type||"shape"===n.value.type&&n.value.text?.content)&&Oi.emit(Ai.RICH_TEXT_COMMAND,{action:{command:"color",value:e}}),"table"===n.value.type){const t=JSON.parse(JSON.stringify(n.value.data));for(let l=0;l{if(n.value){if("text"!==n.value.type&&"shape"!==n.value.type&&"chart"!==n.value.type||d(r.value,{fill:e}),"table"===n.value.type){const t=JSON.parse(JSON.stringify(n.value.data));for(let l=0;l{const a=(0,i.up)("IconTextBold"),o=(0,i.up)("IconTextItalic"),r=(0,i.up)("IconTextUnderline"),c=(0,i.up)("IconStrikethrough"),d=(0,i.up)("IconFontSize"),f=(0,i.up)("IconAlignTextLeft"),b=(0,i.up)("IconAlignTextCenter"),_=(0,i.up)("IconAlignTextRight"),I=(0,i.up)("IconCopy"),S=(0,i.up)("IconDelete"),C=(0,i.up)("IconSendToBack"),L=(0,i.up)("IconBringToFrontOne"),T=(0,i.up)("IconBringToFront"),E=(0,i.up)("IconSentToBack"),M=(0,i.up)("IconAlignLeft"),U=(0,i.up)("IconAlignVertically"),W=(0,i.up)("IconAlignRight"),D=(0,i.up)("IconAlignTop"),H=(0,i.up)("IconAlignHorizontally"),F=(0,i.up)("IconAlignBottom");return(0,i.wg)(),(0,i.iD)("div",pT,[(0,i.Wm)(Kd,{tabs:p,value:v.value,"onUpdate:value":l[0]||(l[0]=e=>v.value=e),tabsStyle:{marginBottom:"8px"},tabStyle:{width:"30%",margin:"0 10%"}},null,8,["value"]),(0,i._)("div",vT,["style"===v.value?((0,i.wg)(),(0,i.iD)("div",mT,[(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).bold,onClick:l[1]||(l[1]=e=>w("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["checked"]),(0,i.Wm)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).em,onClick:l[2]||(l[2]=e=>w("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["checked"]),(0,i.Wm)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).underline,onClick:l[3]||(l[3]=e=>w("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["checked"]),(0,i.Wm)(qf,{style:{flex:"1"},checked:(0,s.SU)(u).strikethrough,onClick:l[4]||(l[4]=e=>w("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(c)])),_:1},8,["checked"])])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[5]||(l[5]=e=>w("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(d),(0,i.Uk)("+")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[6]||(l[6]=e=>w("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(d),(0,i.Uk)("-")])),_:1})])),_:1}),(0,i.Wm)(Zc,{style:{margin:"20px 0"}}),(0,i.Wm)(ng,{class:"row","button-style":"solid",value:(0,s.SU)(u).align,"onUpdate:value":l[7]||(l[7]=e=>w("align",e))},{default:(0,i.w5)((()=>[(0,i.Wm)(tg,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1}),(0,i.Wm)(tg,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(b)])),_:1}),(0,i.Wm)(tg,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(_)])),_:1})])),_:1},8,["value"]),(0,i.Wm)(Zc,{style:{margin:"20px 0"}}),(0,i._)("div",hT,[fT,(0,i._)("div",gT,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"color",key:e,onClick:t=>x(e)},[(0,i._)("div",{class:"color-block",style:(0,oe.j5)({backgroundColor:e})},null,4)],8,yT))),64))])]),(0,i._)("div",wT,[xT,(0,i._)("div",kT,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"color",key:e,onClick:t=>k(e)},[(0,i._)("div",{class:"color-block",style:(0,oe.j5)({backgroundColor:e})},null,4)],8,bT))),64))])])])):(0,i.kq)("",!0),"common"===v.value?((0,i.wg)(),(0,i.iD)("div",_T,[(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[8]||(l[8]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Wm)(I,{class:"icon"}),(0,i.Uk)(" 复制")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[9]||(l[9]=e=>(0,s.SU)(g)())},{default:(0,i.w5)((()=>[(0,i.Wm)(S,{class:"icon"}),(0,i.Uk)(" 删除")])),_:1})])),_:1}),(0,i.Wm)(Zc,{style:{margin:"20px 0"}}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[10]||(l[10]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(Q).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(C,{class:"icon"}),(0,i.Uk)(" 置顶")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[11]||(l[11]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(Q).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(L,{class:"icon"}),(0,i.Uk)(" 置底")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[12]||(l[12]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(Q).UP))},{default:(0,i.w5)((()=>[(0,i.Wm)(T,{class:"icon"}),(0,i.Uk)(" 上移")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[13]||(l[13]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(Q).DOWN))},{default:(0,i.w5)((()=>[(0,i.Wm)(E,{class:"icon"}),(0,i.Uk)(" 下移")])),_:1})])),_:1}),(0,i.Wm)(Zc,{style:{margin:"20px 0"}}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[14]||(l[14]=e=>(0,s.SU)(h)((0,s.SU)(ee).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(M,{class:"icon"}),(0,i.Uk)(" 左对齐")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[15]||(l[15]=e=>(0,s.SU)(h)((0,s.SU)(ee).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(U,{class:"icon"}),(0,i.Uk)(" 水平居中")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[16]||(l[16]=e=>(0,s.SU)(h)((0,s.SU)(ee).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(W,{class:"icon"}),(0,i.Uk)(" 右对齐")])),_:1})])),_:1}),(0,i.Wm)(Kf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[17]||(l[17]=e=>(0,s.SU)(h)((0,s.SU)(ee).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(D,{class:"icon"}),(0,i.Uk)(" 上对齐")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[18]||(l[18]=e=>(0,s.SU)(h)((0,s.SU)(ee).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(H,{class:"icon"}),(0,i.Uk)(" 垂直居中")])),_:1}),(0,i.Wm)(tp,{style:{flex:"1"},onClick:l[19]||(l[19]=e=>(0,s.SU)(h)((0,s.SU)(ee).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(F,{class:"icon"}),(0,i.Uk)(" 下对齐")])),_:1})])),_:1})])):(0,i.kq)("",!0)])])}}});const ST=(0,Vl.Z)(IT,[["__scopeId","data-v-f3d1ac70"]]);var CT=ST;const LT={class:"mobile-editor-header"},TT={class:"history"};var ET=(0,i.aZ)({__name:"Header",props:{changeMode:{type:Function}},setup(e){const{canUndo:t,canRedo:l}=(0,o.Jk)(J()),{redo:a,undo:r}=da();return(e,o)=>{const u=(0,i.up)("IconBack"),c=(0,i.up)("IconNext"),d=(0,i.up)("IconLogout");return(0,i.wg)(),(0,i.iD)("div",LT,[(0,i._)("div",TT,[(0,i._)("div",{class:(0,oe.C_)(["history-item",{disable:!(0,s.SU)(t)}]),onClick:o[0]||(o[0]=(0,n.iM)((e=>(0,s.SU)(r)()),["stop"]))},[(0,i.Wm)(u),(0,i.Uk)(" 撤销")],2),(0,i._)("div",{class:(0,oe.C_)(["history-item",{disable:!(0,s.SU)(l)}]),onClick:o[1]||(o[1]=(0,n.iM)((e=>(0,s.SU)(a)()),["stop"]))},[(0,i.Wm)(c),(0,i.Uk)(" 重做")],2)]),(0,i._)("div",{class:"back",onClick:o[2]||(o[2]=t=>e.changeMode("preview"))},[(0,i.Wm)(d),(0,i.Uk)(" 退出编辑")])])}}});const MT=(0,Vl.Z)(ET,[["__scopeId","data-v-5c34ab81"]]);var UT=MT;const WT={class:"mobile-editor"};var DT=(0,i.aZ)({__name:"index",props:{changeMode:{type:Function}},setup(e){const t=$(),l=R(),{slideIndex:a,currentSlide:n,viewportRatio:r}=(0,o.Jk)(t),{activeElementIdList:u,handleElement:c}=(0,o.Jk)(l),d=(0,s.iH)(),p=(0,s.iH)(),v=(0,s.iH)([]),m=(0,i.Fl)((()=>n.value.background)),{backgroundStyle:h}=yu(m),f=(0,i.Fl)((()=>{if(!d.value)return 1;const e=d.value.clientWidth,t=d.value.clientHeight,l=t/e;return l>=r.value?(e-20)/oa:(t-20)/r.value/oa}));(0,i.bv)((()=>{u.value.length&&l.setActiveElementIdList([]),0!==a.value&&t.updateSlideIndex(0)}));const g=(0,i.Fl)((()=>({width:oa*f.value+"px",height:oa*r.value*f.value+"px"}))),y=(0,s.iH)([]),w=()=>{y.value=n.value?JSON.parse(JSON.stringify(n.value.elements)):[]};(0,i.m0)(w);const{dragElement:x}=jn(y,v,f),{scaleElement:k}=Bn(y,v,f),{rotateElement:b}=An(y,p,f),_=(e,t,a=!0)=>{u.value.includes(t.id)||(l.setActiveElementIdList([t.id]),l.setHandleElementId(t.id)),a&&x(e,t)},I=()=>{l.setActiveElementIdList([])};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",WT,[(0,i.Wm)(UT,{changeMode:e.changeMode},null,8,["changeMode"]),(0,i._)("div",{class:"content",ref_key:"contentRef",ref:d,onTouchstart:t[0]||(t[0]=e=>I())},[(0,i._)("div",{class:"viewport-wrapper",style:(0,oe.j5)(g.value)},[(0,i._)("div",{class:"background",style:(0,oe.j5)((0,s.SU)(h))},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(v.value,((e,t)=>((0,i.wg)(),(0,i.j4)(Iu,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:f.value},null,8,["type","axis","length","canvasScale"])))),128)),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.id},["line"!==e.type?((0,i.wg)(),(0,i.j4)(GL,{key:0,elementInfo:e,isSelected:(0,s.SU)(u).includes(e.id),canvasScale:f.value,scaleElement:(0,s.SU)(k),rotateElement:(0,s.SU)(b)},null,8,["elementInfo","isSelected","canvasScale","scaleElement","rotateElement"])):(0,i.kq)("",!0)],64)))),128)),(0,i._)("div",{class:"viewport",ref_key:"viewportRef",ref:p,style:(0,oe.j5)({transform:`scale(${f.value})`})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,((e,t)=>((0,i.wg)(),(0,i.j4)(JL,{key:e.id,elementInfo:e,elementIndex:t+1,selectElement:_},null,8,["elementInfo","elementIndex"])))),128))],4)],4)],544),(0,i.Wm)(cT),(0,s.SU)(c)?((0,i.wg)(),(0,i.j4)(CT,{key:0})):(0,i.kq)("",!0)]))}});const HT=(0,Vl.Z)(DT,[["__scopeId","data-v-3756d058"]]);var FT=HT;const AT={class:"header"};var $T=(0,i.aZ)({__name:"MobilePlayer",props:{changeMode:{type:Function}},setup(e){const t=$(),{slides:l,slideIndex:a,currentSlide:n,viewportRatio:r}=(0,o.Jk)(t),u=(0,s.iH)(!1),c=(0,s.iH)({width:0,height:0});(0,i.bv)((()=>{0!==a.value&&t.updateSlideIndex(0),c.value={width:document.body.clientHeight,height:document.body.clientWidth}}));const d=(0,i.Fl)((()=>{const e=c.value.height/c.value.width;let t=0,l=0;return e>=r.value?(t=c.value.width,l=t*r.value):(l=c.value.height,t=l/r.value),{width:t,height:l}})),p=(0,s.iH)(null),v=e=>{p.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},m=e=>{if(!p.value)return;const n=Math.abs(p.value.y-e.changedTouches[0].pageY),o=e.changedTouches[0].pageX-p.value.x;Math.abs(o)>n&&Math.abs(o)>50&&(p.value=null,o<0&&a.value>0&&t.updateSlideIndex(a.value-1),o>0&&a.value{const o=(0,i.up)("IconLogout");return(0,i.wg)(),(0,i.iD)("div",{class:"mobile-player",style:(0,oe.j5)({width:c.value.width+"px",height:c.value.height+"px",transform:`rotate(90deg) translateY(-${c.value.height}px)`})},[(0,i._)("div",{class:"screen-slide-list",onClick:t[0]||(t[0]=e=>u.value=!u.value),onTouchstart:t[1]||(t[1]=e=>v(e)),onTouchend:t[2]||(t[2]=e=>m(e))},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,oe.C_)(["slide-item",`turning-mode-${e.turningMode||"slideY"}`,{current:t===(0,s.SU)(a),before:t<(0,s.SU)(a),after:t>(0,s.SU)(a),hide:(t===(0,s.SU)(a)-1||t===(0,s.SU)(a)+1)&&e.turningMode!==(0,s.SU)(n).turningMode}]),key:e.id},[Math.abs((0,s.SU)(a)-t)<2?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"slide-content",style:(0,oe.j5)({width:d.value.width+"px",height:d.value.height+"px"})},[(0,i.Wm)(Jd,{slide:e,size:d.value.width},null,8,["slide","size"])],4)):(0,i.kq)("",!0)],2)))),128))],32),u.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",AT,[(0,i._)("div",{class:"back",onClick:t[3]||(t[3]=t=>e.changeMode("preview"))},[(0,i.Wm)(o),(0,i.Uk)(" 退出播放")])]),(0,i.Wm)(aT,{class:"thumbnails"})],64)):(0,i.kq)("",!0)],4)}}});const ZT=(0,Vl.Z)($T,[["__scopeId","data-v-62f26eba"]]);var OT=ZT;const RT={class:"thumbnail-list"},zT={class:"menu"};var PT=(0,i.aZ)({__name:"MobilePreview",props:{changeMode:{type:Function}},setup(e){const{slides:t}=(0,o.Jk)($()),{slidesLoadLimit:l}=Cm(),a=(0,s.iH)(),n=(0,s.iH)(0);return(0,i.bv)((()=>{a.value&&(n.value=a.value.clientWidth)})),(e,o)=>{const r=(0,i.up)("IconEdit"),u=(0,i.up)("IconFullScreenPlay");return(0,i.wg)(),(0,i.iD)("div",{class:"mobile-preview",ref_key:"mobileRef",ref:a},[(0,i._)("div",RT,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(t),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"thumbnail-item",key:e.id},[(0,i.Wm)(Jd,{slide:e,size:n.value-20,visible:t<(0,s.SU)(l)},null,8,["slide","size","visible"])])))),128))]),(0,i._)("div",zT,[(0,i._)("div",{class:"menu-item",onClick:o[0]||(o[0]=t=>e.changeMode("editor"))},[(0,i.Wm)(r,{class:"icon"}),(0,i.Uk)(" 编辑")]),(0,i.Wm)(Zc,{type:"vertical",style:{height:"30px"}}),(0,i._)("div",{class:"menu-item",onClick:o[1]||(o[1]=t=>e.changeMode("player"))},[(0,i.Wm)(u,{class:"icon"}),(0,i.Uk)(" 播放")])])],512)}}});const BT=(0,Vl.Z)(PT,[["__scopeId","data-v-53dd42dc"]]);var NT=BT;const jT={class:"mobile"};var YT=(0,i.aZ)({__name:"index",setup(e){const t=(0,s.iH)("preview"),l=e=>t.value=e,a=(0,i.Fl)((()=>{const e={editor:FT,player:OT,preview:NT};return e[t.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",jT,[((0,i.wg)(),(0,i.j4)((0,i.LL)(a.value),{changeMode:l}))]))}});const VT=(0,Vl.Z)(YT,[["__scopeId","data-v-9826ff08"]]);var JT=VT,qT=(0,i.aZ)({__name:"App",setup(e){const t=K(),l=R(),a=J(),{databaseId:n}=(0,o.Jk)(l),{screening:r}=(0,o.Jk)(X());return window.onbeforeunload=()=>!1,(0,i.bv)((async()=>{await j(),a.initSnapshotDatabase(),l.setAvailableFonts()})),window.addEventListener("unload",(()=>{const e=localStorage.getItem(B),t=e?JSON.parse(e):[];t.push(n.value);const l=JSON.stringify(t);localStorage.setItem(B,l)})),(e,l)=>(0,s.SU)(r)?((0,i.wg)(),(0,i.j4)(jL,{key:0})):(0,s.SU)(t)?((0,i.wg)(),(0,i.j4)(mC,{key:1})):((0,i.wg)(),(0,i.j4)(JT,{key:2}))}});const XT=qT;var GT=XT,KT=l(5205);(0,KT.z)("service-worker.js",{ready(){console.log("App is being served from cache by a service worker.\nFor more details, visit https://goo.gl/AFskqB")},registered(){console.log("Service worker has been registered.")},cached(){console.log("Content has been cached for offline use.")},updatefound(){console.log("New content is downloading.")},updated(){console.log("New content is available; please refresh.")},offline(){console.log("No internet connection found. App is running in offline mode.")},error(e){console.error("Error during service worker registration:",e)}});l(9744),l(9091);const QT={class:"menu-content"},eE=["onClick"],tE={class:"text"},lE={key:0,class:"sub-text"};var aE=(0,i.aZ)({__name:"MenuContent",props:{menus:{},handleClickMenuItem:{type:Function}},setup(e){return(e,t)=>{const l=(0,i.up)("menu-content",!0);return(0,i.wg)(),(0,i.iD)("ul",QT,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.menus,((t,a)=>((0,i.wg)(),(0,i.iD)(i.HY,{key:t.text||a},[t.hide?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("li",{key:0,class:(0,oe.C_)(["menu-item",{divider:t.divider,disable:t.disable}]),onClick:(0,n.iM)((l=>e.handleClickMenuItem(t)),["stop"])},[t.divider?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,oe.C_)(["menu-item-content",{"has-children":t.children,"has-handler":t.handler}])},[(0,i._)("span",tE,(0,oe.zw)(t.text),1),t.subText&&!t.children?((0,i.wg)(),(0,i.iD)("span",lE,(0,oe.zw)(t.subText),1)):(0,i.kq)("",!0),t.children&&t.children.length?((0,i.wg)(),(0,i.j4)(l,{key:1,class:"sub-menu",menus:t.children,handleClickMenuItem:e.handleClickMenuItem},null,8,["menus","handleClickMenuItem"])):(0,i.kq)("",!0)],2))],10,eE))],64)))),128))])}}});const nE=(0,Vl.Z)(aE,[["__scopeId","data-v-77e74b43"]]);var oE=nE,iE=(0,i.aZ)({__name:"index",props:{axis:{},el:{},menus:{},removeContextmenu:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e=170,l=30,a=11,n=5,{x:o,y:i}=t.axis,s=t.menus.filter((e=>!(e.divider||e.hide))).length,r=t.menus.filter((e=>e.divider)).length,u=e,c=s*l+r*a+2*n,d=document.body.clientWidth,p=document.body.clientHeight;return{left:d<=o+u?o-u:o,top:p<=i+c?i-c:i}})),a=e=>{e.disable||e.children&&!e.handler||(e.handler&&e.handler(t.el),t.removeContextmenu())};return(e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i._)("div",{class:"mask",onContextmenu:t[0]||(t[0]=(0,n.iM)((t=>e.removeContextmenu()),["prevent"])),onMousedown:t[1]||(t[1]=t=>e.removeContextmenu())},null,32),(0,i._)("div",{class:"contextmenu",style:(0,oe.j5)({left:l.value.left+"px",top:l.value.top+"px"}),onContextmenu:t[2]||(t[2]=(0,n.iM)((()=>{}),["prevent"]))},[(0,i.Wm)(oE,{menus:e.menus,handleClickMenuItem:a},null,8,["menus"])],36)],64))}});const sE=iE;var rE=sE;const uE="CTX_CONTEXTMENU_HANDLER",cE=(e,t,l)=>{t.stopPropagation(),t.preventDefault();const a=l.value(e);if(!a)return;let o=null;const s=()=>{o&&(document.body.removeChild(o),o=null),e.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",s),window.removeEventListener("resize",s)},r={axis:{x:t.x,y:t.y},el:e,menus:a,removeContextmenu:s};o=document.createElement("div");const u=(0,i.Wm)(rE,r,null);(0,n.sY)(u,o),document.body.appendChild(o),e.classList.add("contextmenu-active"),document.body.addEventListener("scroll",s),window.addEventListener("resize",s)},dE={mounted(e,t){e[uE]=l=>cE(e,l,t),e.addEventListener("contextmenu",e[uE])},unmounted(e){e&&e[uE]&&(e.removeEventListener("contextmenu",e[uE]),delete e[uE])}};var pE=dE;const vE="CTX_CLICK_OUTSIDE_HANDLER",mE=(e,t,l)=>{const a=l.value,n=t.composedPath(),o=n?n.indexOf(e)<0:!e.contains(t.target);o&&a(t)},hE={mounted(e,t){e[vE]=l=>mE(e,l,t),setTimeout((()=>{document.addEventListener("click",e[vE])}),0)},unmounted(e){e[vE]&&(document.removeEventListener("click",e[vE]),delete e[vE])}};var fE=hE;const gE="TOOLTIP_INSTANCE",yE={mounted(e,t){let l="",a="top",n=[300,0];"string"===typeof t.value?l=t.value:(l=t.value.content,void 0!==t.value.placement&&(a=t.value.placement),void 0!==t.value.delay&&(n=t.value.delay)),e[gE]=(0,rn.ZP)(e,{content:l,theme:"tooltip",duration:100,animation:"scale",allowHTML:!0,placement:a,delay:n})},updated(e,t){let l="";l="string"===typeof t.value?t.value:t.value.content,e[gE]&&e[gE].setContent(l)},unmounted(e){e[gE]&&e[gE].destroy()}};var wE=yE,xE={install(e){e.directive("contextmenu",pE),e.directive("click-outside",fE),e.directive("tooltip",wE)}};const kE=(0,n.ri)(GT);kE.use(Ol),kE.use(xE),kE.use((0,o.WB)()),kE.mount("#app")},2480:function(){},3180:function(){},7687:function(){}},t={};function l(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(o.exports,o,o.exports,l),o.loaded=!0,o.exports}l.m=e,function(){var e=[];l.O=function(t,a,n,o){if(!a){var i=1/0;for(c=0;c=o)&&Object.keys(l.O).every((function(e){return l.O[e](a[r])}))?a.splice(r--,1):(s=!1,o0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[a,n,o]}}(),function(){l.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(t,{a:t}),t}}(),function(){l.d=function(e,t){for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}}(),function(){l.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){l.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={143:0};l.O.j=function(t){return 0===e[t]};var t=function(t,a){var n,o,i=a[0],s=a[1],r=a[2],u=0;if(i.some((function(t){return 0!==e[t]}))){for(n in s)l.o(s,n)&&(l.m[n]=s[n]);if(r)var c=r(l)}for(t&&t(a);u {\n return (\n node.type === schema.nodes.bullet_list ||\n node.type === schema.nodes.ordered_list\n )\n}\n\nexport const autoSelectAll = (view: EditorView) => {\n const { empty } = view.state.selection\n if (empty) selectAll(view.state, view.dispatch)\n}\n\nexport const addMark = (editorView: EditorView, mark: Mark, selection?: { from: number; to: number; }) => {\n if (selection) {\n editorView.dispatch(editorView.state.tr.addMark(selection.from, selection.to, mark))\n }\n else {\n const { $from, $to } = editorView.state.selection\n editorView.dispatch(editorView.state.tr.addMark($from.pos, $to.pos, mark))\n }\n}\n\nexport const findNodesWithSameMark = (doc: Node, from: number, to: number, markType: MarkType) => {\n let ii = from\n const finder = (mark: Mark) => mark.type === markType\n let firstMark = null\n let fromNode = null\n let toNode = null\n\n while (ii <= to) {\n const node = doc.nodeAt(ii)\n if (!node || !node.marks) return null\n\n const mark = node.marks.find(finder)\n if (!mark) return null\n\n if (firstMark && mark !== firstMark) return null\n\n fromNode = fromNode || node\n firstMark = firstMark || mark\n toNode = node\n ii++\n }\n\n let fromPos = from\n let toPos = to\n\n let jj = 0\n ii = from - 1\n while (ii > jj) {\n const node = doc.nodeAt(ii)\n const mark = node && node.marks.find(finder)\n if (!mark || mark !== firstMark) break\n fromPos = ii\n fromNode = node\n ii--\n }\n\n ii = to + 1\n jj = doc.nodeSize - 2\n while (ii < jj) {\n const node = doc.nodeAt(ii)\n const mark = node && node.marks.find(finder)\n if (!mark || mark !== firstMark) break\n toPos = ii\n toNode = node\n ii++\n }\n\n return {\n mark: firstMark,\n from: {\n node: fromNode,\n pos: fromPos,\n },\n to: {\n node: toNode,\n pos: toPos,\n },\n }\n}\n\nconst equalNodeType = (nodeType: NodeType, node: Node) => {\n return Array.isArray(nodeType) && nodeType.indexOf(node.type) > -1 || node.type === nodeType\n}\n\nconst findParentNodeClosestToPos = ($pos: ResolvedPos, predicate: (node: Node) => boolean) => {\n for (let i = $pos.depth; i > 0; i--) {\n const node = $pos.node(i)\n if (predicate(node)) {\n return {\n pos: i > 0 ? $pos.before(i) : 0,\n start: $pos.start(i),\n depth: i,\n node,\n }\n }\n }\n}\n\nexport const findParentNode = (predicate: (node: Node) => boolean) => {\n return (_ref: Selection) => findParentNodeClosestToPos(_ref.$from, predicate)\n}\n\nexport const findParentNodeOfType = (nodeType: NodeType) => {\n return (selection: Selection) => {\n return findParentNode((node: Node) => {\n return equalNodeType(nodeType, node)\n })(selection)\n }\n}\n\nexport const isActiveOfParentNodeType = (nodeType: string, state: EditorState) => {\n const node = state.schema.nodes[nodeType]\n return !!findParentNodeOfType(node)(state.selection)\n}\n\nexport const getLastTextNode = (node: Node | null): Node | null => {\n if (!node) return null\n if (node.type.name === 'text') return node\n if (!node.lastChild) return null\n\n return getLastTextNode(node.lastChild)\n}\n\nexport const getMarkAttrs = (view: EditorView) => {\n const { selection, doc } = view.state\n const { from } = selection\n\n let node = doc.nodeAt(from) || doc.nodeAt(from - 1)\n node = getLastTextNode(node)\n\n return node?.marks || []\n}\n\nexport const getAttrValue = (marks: readonly Mark[], markType: string, attr: string): string | null => {\n for (const mark of marks) {\n if (mark.type.name === markType && mark.attrs[attr]) return mark.attrs[attr]\n }\n return null\n}\n\nexport const isActiveMark = (marks: readonly Mark[], markType: string) => {\n for (const mark of marks) {\n if (mark.type.name === markType) return true\n }\n return false\n}\n\nexport const markActive = (state: EditorState, type: MarkType) => {\n const { from, $from, to, empty } = state.selection\n if (empty) return type.isInSet(state.storedMarks || $from.marks())\n return state.doc.rangeHasMark(from, to, type)\n}\n\nexport const getAttrValueInSelection = (view: EditorView, attr: string) => {\n const { selection, doc } = view.state\n const { from, to } = selection\n\n let keepChecking = true\n let value = ''\n doc.nodesBetween(from, to, node => {\n if (keepChecking && node.attrs[attr]) {\n keepChecking = false\n value = node.attrs[attr]\n }\n return keepChecking\n })\n return value\n}\n\ntype Align = 'left' | 'right' | 'center'\n\ninterface DefaultAttrs {\n color: string\n backcolor: string\n fontsize: string\n fontname: string\n align: Align\n}\nconst _defaultAttrs: DefaultAttrs = {\n color: '#000',\n backcolor: '',\n fontsize: '20px',\n fontname: '微软雅黑',\n align: 'left',\n}\nexport const getTextAttrs = (view: EditorView, attrs: Partial = {}) => {\n const defaultAttrs: DefaultAttrs = { ..._defaultAttrs, ...attrs }\n\n const marks = getMarkAttrs(view)\n\n const isBold = isActiveMark(marks, 'strong')\n const isEm = isActiveMark(marks, 'em')\n const isUnderline = isActiveMark(marks, 'underline')\n const isStrikethrough = isActiveMark(marks, 'strikethrough')\n const isSuperscript = isActiveMark(marks, 'superscript')\n const isSubscript = isActiveMark(marks, 'subscript')\n const isCode = isActiveMark(marks, 'code')\n const color = getAttrValue(marks, 'forecolor', 'color') || defaultAttrs.color\n const backcolor = getAttrValue(marks, 'backcolor', 'backcolor') || defaultAttrs.backcolor\n const fontsize = getAttrValue(marks, 'fontsize', 'fontsize') || defaultAttrs.fontsize\n const fontname = getAttrValue(marks, 'fontname', 'fontname') || defaultAttrs.fontname\n const link = getAttrValue(marks, 'link', 'href') || ''\n const align = (getAttrValueInSelection(view, 'align') || defaultAttrs.align) as Align\n const isBulletList = isActiveOfParentNodeType('bullet_list', view.state)\n const isOrderedList = isActiveOfParentNodeType('ordered_list', view.state)\n const isBlockquote = isActiveOfParentNodeType('blockquote', view.state)\n\n return {\n bold: isBold,\n em: isEm,\n underline: isUnderline,\n strikethrough: isStrikethrough,\n superscript: isSuperscript,\n subscript: isSubscript,\n code: isCode,\n color: color,\n backcolor: backcolor,\n fontsize: fontsize,\n fontname: fontname,\n link: link,\n align: align,\n bulletList: isBulletList,\n orderedList: isOrderedList,\n blockquote: isBlockquote,\n }\n}\n\nexport type TextAttrs = ReturnType\n\nexport const getFontsize = (view: EditorView) => {\n const marks = getMarkAttrs(view)\n const fontsize = getAttrValue(marks, 'fontsize', 'fontsize') || _defaultAttrs.fontsize\n return parseInt(fontsize)\n}\n\nexport const defaultRichTextAttrs: TextAttrs = {\n bold: false,\n em: false,\n underline: false,\n strikethrough: false,\n superscript: false,\n subscript: false,\n code: false,\n color: '#000',\n backcolor: '',\n fontsize: '20px',\n fontname: '微软雅黑',\n link: '',\n align: 'left',\n bulletList: false,\n orderedList: false,\n blockquote: false,\n}","export const SYS_FONTS = [\n { label: 'Arial', value: 'Arial' },\n { label: '微软雅黑', value: 'Microsoft Yahei' },\n { label: '宋体', value: 'SimSun' },\n { label: '黑体', value: 'SimHei' },\n { label: '楷体', value: 'KaiTi' },\n { label: '新宋体', value: 'NSimSun' },\n { label: '仿宋', value: 'FangSong' },\n { label: '苹方', value: 'PingFang SC' },\n { label: '华文黑体', value: 'STHeiti' },\n { label: '华文楷体', value: 'STKaiti' },\n { label: '华文宋体', value: 'STSong' },\n { label: '华文仿宋', value: 'STFangSong' },\n { label: '华文中宋', value: 'STZhongSong' },\n { label: '华文琥珀', value: 'STHupo' },\n { label: '华文新魏', value: 'STXinwei' },\n { label: '华文隶书', value: 'STLiti' },\n { label: '华文行楷', value: 'STXingkai' },\n { label: '冬青黑体', value: 'Hiragino Sans GB' },\n { label: '兰亭黑', value: 'Lantinghei SC' },\n { label: '偏偏体', value: 'Hanzipen SC' },\n { label: '手札体', value: 'Hannotate SC' },\n { label: '宋体', value: 'Songti SC' },\n { label: '娃娃体', value: 'Wawati SC' },\n { label: '行楷', value: 'Xingkai SC' },\n { label: '圆体', value: 'Yuanti SC' },\n { label: '华文细黑', value: 'STXihei' },\n { label: '幼圆', value: 'YouYuan' },\n { label: '隶书', value: 'LiSu' },\n]\n\nexport const WEB_FONTS = [\n { label: '得意黑', value: '得意黑' },\n { label: '仓耳小丸子', value: '仓耳小丸子' },\n { label: '优设标题黑', value: '优设标题黑' },\n { label: '峰广明锐体', value: '峰广明锐体' },\n { label: '摄图摩登小方体', value: '摄图摩登小方体' },\n { label: '站酷快乐体', value: '站酷快乐体' },\n { label: '字制区喜脉体', value: '字制区喜脉体' },\n { label: '素材集市康康体', value: '素材集市康康体' },\n { label: '素材集市酷方体', value: '素材集市酷方体' },\n { label: '途牛类圆体', value: '途牛类圆体' },\n { label: '锐字真言体', value: '锐字真言体' },\n]","/**\n * 判断操作系统是否存在某字体\n * @param fontName 字体名\n */\nexport const isSupportFont = (fontName: string) => {\n if (typeof fontName !== 'string') return false\n\n const arial = 'Arial'\n if (fontName.toLowerCase() === arial.toLowerCase()) return true\n\n const size = 100\n const width = 100\n const height = 100\n const str = 'a'\n\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d', { willReadFrequently: true })\n\n if (!ctx) return false\n\n canvas.width = width\n canvas.height = height\n ctx.textAlign = 'center'\n ctx.fillStyle = 'black'\n ctx.textBaseline = 'middle'\n\n const getDotArray = (_fontFamily: string) => {\n ctx.clearRect(0, 0, width, height)\n ctx.font = `${size}px ${_fontFamily}, ${arial}`\n ctx.fillText(str, width / 2, height / 2)\n const imageData = ctx.getImageData(0, 0, width, height).data\n return [].slice.call(imageData).filter(item => item !== 0)\n }\n\n return getDotArray(arial).join('') !== getDotArray(fontName).join('')\n}","import type { Slide } from '@/types/slides'\n\nexport const slides: Slide[] = [\n {\n id: 'test-slide-1',\n elements: [\n {\n type: 'shape',\n id: '4cbRxp',\n left: 0,\n top: 200,\n width: 546,\n height: 362.5,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n opacity: 0.7,\n rotate: 0\n },\n {\n type: 'shape',\n id: 'ookHrf',\n left: 0,\n top: 0,\n width: 300,\n height: 320,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n flipV: true,\n rotate: 0\n },\n {\n type: 'text',\n id: 'idn7Mx',\n left: 355,\n top: 65.25,\n width: 585,\n height: 188,\n lineHeight: 1.2,\n content: '

PPTIST

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333'\n },\n {\n type: 'text',\n id: '7stmVP',\n left: 355,\n top: 253.25,\n width: 585,\n height: 56,\n content: '

基于 Vue 3.x + TypeScript 的在线演示文稿应用

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333'\n },\n {\n type: 'line',\n id: 'FnpZs4',\n left: 361,\n top: 238,\n start: [0, 0],\n end: [549, 0],\n points: ['', ''],\n color: '#5b9bd5',\n style: 'solid',\n width: 2,\n },\n ],\n background: {\n type: 'solid',\n color: '#ffffff',\n },\n },\n {\n id: 'test-slide-2',\n elements: [\n {\n type: 'text',\n id: 'ptNnUJ',\n left: 145,\n top: 148,\n width: 711,\n height: 77,\n lineHeight: 1.2,\n content: '

在此处添加标题

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333',\n }, \n {\n type: 'text',\n id: 'mRHvQN',\n left: 207.50000000000003,\n top: 249.84259259259264,\n width: 585,\n height: 56,\n content: '

在此处添加副标题

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333',\n }, \n {\n type: 'line',\n id: '7CQDwc',\n left: 323.09259259259267,\n top: 238.33333333333334,\n start: [0, 0],\n end: [354.8148148148148, 0],\n points: ['', ''],\n color: '#5b9bd5',\n style: 'solid',\n width: 4\n }, \n {\n type: 'shape',\n id: '09wqWw',\n left: -27.648148148148138,\n top: 432.73148148148147,\n width: 1056.2962962962963,\n height: 162.96296296296296,\n viewBox: [200, 200],\n path: 'M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n rotate: 0\n }\n ],\n background: {\n type: 'solid',\n color: '#fff',\n },\n },\n {\n id: 'test-slide-3',\n elements: [\n {\n type: 'shape',\n id: 'vSheCJ',\n left: 183.5185185185185,\n top: 175.5092592592593,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n rotate: 0\n }, \n {\n type: 'shape',\n id: 'Mpwv7x',\n left: 211.29629629629628,\n top: 201.80555555555557,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '#5b9bd5',\n fixedRatio: false,\n rotate: 0,\n opacity: 0.7\n }, \n {\n type: 'text',\n id: 'WQOTAp',\n left: 304.9074074074074,\n top: 198.10185185185182,\n width: 417.9629629629629,\n height: 140,\n content: '

感谢观看

',\n rotate: 0,\n defaultFontName: 'Microsoft Yahei',\n defaultColor: '#333',\n wordSpace: 5\n }\n ],\n background: {\n type: 'solid',\n color: '#fff',\n },\n },\n]","import type { SlideTheme } from '@/types/slides'\n\nexport const theme: SlideTheme = {\n themeColor: '#5b9bd5',\n fontColor: '#333',\n fontName: 'Microsoft Yahei',\n backgroundColor: '#fff',\n shadow: {\n h: 3,\n v: 3,\n blur: 2,\n color: '#808080',\n },\n outline: {\n width: 2,\n color: '#525252',\n style: 'solid',\n },\n}","/* eslint-disable max-lines */\n\nimport type { Slide } from '@/types/slides'\n\nexport const layouts: Slide[] = [\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: '4cbRxp',\n left: 0,\n top: 200,\n width: 546,\n height: 362.5,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n opacity: 0.7,\n rotate: 0\n },\n {\n type: 'shape',\n id: 'ookHrf',\n left: 0,\n top: 0,\n width: 300,\n height: 320,\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n flipV: true,\n rotate: 0\n },\n {\n type: 'text',\n id: 'AkIh3E',\n left: 355,\n top: 95.11111111111111,\n width: 585,\n height: 116,\n lineHeight: 1.2,\n content: '

输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n wordSpace: 6\n },\n {\n type: 'text',\n id: '7stmVP',\n left: 355,\n top: 253.25,\n width: 585,\n height: 56,\n content: '

请在此处输入副标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n },\n {\n type: 'line',\n id: 'FnpZs4',\n left: 361,\n top: 238,\n start: [0, 0],\n end: [549, 0],\n points: ['', ''],\n color: '{{themeColor}}',\n style: 'solid',\n width: 2,\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'ptNnUJ',\n left: 145,\n top: 148,\n width: 711,\n height: 77,\n lineHeight: 1.2,\n content: '

在此处添加标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: 'mRHvQN',\n left: 207.50000000000003,\n top: 249.84259259259264,\n width: 585,\n height: 56,\n content: '

在此处添加副标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'line',\n id: '7CQDwc',\n left: 323.09259259259267,\n top: 238.33333333333334,\n start: [0, 0],\n end: [354.8148148148148, 0],\n points: ['', ''],\n color: '{{themeColor}}',\n style: 'solid',\n width: 4\n }, \n {\n type: 'shape',\n id: '09wqWw',\n left: -27.648148148148138,\n top: 432.73148148148147,\n width: 1056.2962962962963,\n height: 162.96296296296296,\n viewBox: [200, 200],\n path: 'M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'vSheCJ',\n left: 183.5185185185185,\n top: 175.5092592592593,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0\n }, \n {\n type: 'shape',\n id: 'Mpwv7x',\n left: 211.29629629629628,\n top: 201.80555555555557,\n width: 605.1851851851851,\n height: 185.18518518518516,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n opacity: 0.7\n }, \n {\n type: 'text',\n id: 'WQOTAp',\n left: 304.9074074074074,\n top: 198.10185185185182,\n width: 417.9629629629629,\n height: 140,\n content: '

感谢观看

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n wordSpace: 5\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'MZVO1kkj',\n elements: [\n {\n type: 'shape',\n id: 'cql0h8',\n left: 0,\n top: 0,\n width: 352.59259259259255,\n height: 562.5,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0\n },\n {\n type: 'shape',\n id: '_RTaF4',\n left: 171.4814814814814,\n top: 100.13888888888887,\n width: 362.22222222222223,\n height: 362.22222222222223,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: 'rgba(255,255,255,0)',\n fixedRatio: false,\n rotate: 0,\n outline: {\n width: 10,\n color: '{{backgroundColor}}',\n style: 'solid'\n }\n },\n {\n type: 'shape',\n id: 'UZfo8N',\n left: 216.66666666666663,\n top: 145.32407407407408,\n width: 271.85185185185185,\n height: 271.85185185185185,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{backgroundColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

01

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n },\n {\n type: 'text',\n id: 'ysqtBg',\n left: 561.4814814814814,\n top: 100.1388888888889,\n width: 359.25925925925924,\n height: 80,\n content: '

在此处输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n },\n {\n type: 'text',\n id: 'lXsoHa',\n left: 572.5925925925925,\n top: 202.3611111111111,\n width: 257.77777777777777,\n height: 260,\n content: '
  1. 在此处输入内容

  2. 在此处输入内容

  3. 在此处输入内容

  4. 在此处输入内容

  5. 在此处输入内容

  6. 在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n lineHeight: 2,\n fill: '{{subColor}}'\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'EBBnTr',\n left: 360.5996472663139,\n top: 141.8496472663139,\n width: 278.80070546737215,\n height: 278.80070546737215,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 0,\n color: '{{backgroundColor}}',\n style: 'solid'\n }\n }, \n {\n type: 'shape',\n id: 'gDIWDH',\n left: 456.4373897707231,\n top: 98.287037037037,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

1

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'shape',\n id: 'DUWT7E',\n left: 317.037037037037,\n top: 237.68738977072314,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

4

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'shape',\n id: 'pbhn38',\n left: 456.43738977072303,\n top: 377.08774250440916,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

3

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'shape',\n id: 'CvMKrO',\n left: 595.8377425044091,\n top: 237.6873897707231,\n width: 87.12522045855381,\n height: 87.12522045855381,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: true,\n rotate: 0,\n outline: {\n width: 4,\n color: '{{backgroundColor}}',\n style: 'solid'\n },\n text: {\n content: '

2

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'adudHB',\n left: 402.962962962963,\n top: 39.39814814814815,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: '9UpDwg',\n left: 402.962962962963,\n top: 473.1018518518518,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: 'GERdpB',\n left: 111.48148148148151,\n top: 256.25,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'text',\n id: 'G5qoho',\n left: 691.1111111111111,\n top: 256.25,\n width: 194.07407407407408,\n height: 50,\n content: '

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }, \n {\n type: 'shape',\n id: 'vdZcI6',\n left: 415.18518518518516,\n top: 196.4351851851852,\n width: 169.62962962962962,\n height: 169.62962962962962,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{backgroundColor}}',\n fixedRatio: false,\n rotate: 0\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'tYUmrx',\n left: 156.66666666666683,\n top: 149.02777777777771,\n width: 264.4444444444445,\n height: 264.4444444444445,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

01

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n },\n {\n type: 'shape',\n id: '0GVHf8',\n left: 342.2222222222223,\n top: 217.17592592592587,\n width: 128.14814814814812,\n height: 128.14814814814812,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{backgroundColor}}',\n fixedRatio: false,\n rotate: 0\n },\n {\n type: 'text',\n id: 'BO33Sv',\n left: 378.8888888888889,\n top: 235.24999999999994,\n width: 464.4444444444444,\n height: 92,\n content: '

在此处添加标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'Hj7ttp',\n left: 69.35185185185185,\n top: 49.21759259259262,\n width: 420,\n height: 63,\n lineHeight: 1.2,\n content: '

1.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'FmKMNB',\n left: 69.35185185185185,\n top: 129.28240740740745,\n width: 420,\n height: 384,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'rI7ZeO',\n left: 510.64814814814815,\n top: 49.21759259259262,\n width: 420,\n height: 63,\n lineHeight: 1.2,\n content: '

2.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'KspwGc',\n left: 510.64814814814815,\n top: 129.28240740740745,\n width: 420,\n height: 384,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'Rx63Jo',\n left: 69.35185185185179,\n top: 51.71759259259262,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

1.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'ulyuzE',\n left: 69.35185185185179,\n top: 131.78240740740745,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'kr35Ca',\n left: 510.6481481481481,\n top: 51.71759259259262,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

2.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'BNQSpC',\n left: 510.6481481481481,\n top: 131.78240740740745,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'Vr38Nu',\n left: 69.35185185185185,\n top: 301.71759259259255,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

3.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'IwKRSu',\n left: 69.35185185185185,\n top: 381.7824074074074,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: '0Opr1v',\n left: 510.64814814814815,\n top: 301.71759259259255,\n width: 420,\n height: 58,\n lineHeight: 1.2,\n content: '

4.请输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: '4L9Uzz',\n left: 510.64814814814815,\n top: 381.7824074074074,\n width: 420,\n height: 129,\n content: '

在此处输入内容

在此处输入内容

在此处输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'text',\n id: 'GdEGxg',\n left: 134.53703703703704,\n top: 127.25,\n width: 152.77777777777777,\n height: 308,\n lineHeight: 1.8,\n content: '

请在此处输入标题

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n wordSpace: 8,\n fill: '{{themeColor}}',\n },\n {\n type: 'text',\n id: 'y5sAfw',\n left: 332.8703703703704,\n top: 127.25,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容1

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'VeuocM',\n left: 332.8703703703704,\n top: 212.0648148148148,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容2

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'RyFWQe',\n left: 332.8703703703704,\n top: 296.8796296296296,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容3

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n {\n type: 'text',\n id: 'Q56viI',\n left: 332.8703703703704,\n top: 381.69444444444446,\n width: 532.5925925925926,\n height: 50,\n content: '

请在此处输入内容4

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}',\n },\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n {\n id: 'template',\n elements: [\n {\n type: 'shape',\n id: 'SUWirT',\n left: 73.8888888888889,\n top: 64.21296296296302,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

1

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'YjzN1M',\n left: 148.70370370370372,\n top: 64.21296296296302,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'fS09I7',\n left: 527.5925925925926,\n top: 64.21296296296302,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

2

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'qCnfB1',\n left: 602.4074074074074,\n top: 64.21296296296302,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n },\n {\n type: 'shape',\n id: 'difAAT',\n left: 73.8888888888889,\n top: 221.25000000000003,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

3

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: 'EUlvMo',\n left: 148.70370370370372,\n top: 221.25000000000003,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'US_9jB',\n left: 527.5925925925926,\n top: 221.25000000000003,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

4

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: '243MnQ',\n left: 602.4074074074074,\n top: 221.25000000000003,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'Y_KUj0',\n left: 73.8888888888889,\n top: 378.287037037037,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

5

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: '9GglMe',\n left: 148.70370370370372,\n top: 378.287037037037,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }, \n {\n type: 'shape',\n id: 'eSInje',\n left: 527.5925925925926,\n top: 378.287037037037,\n width: 49.629629629629626,\n height: 49.629629629629626,\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n fill: '{{themeColor}}',\n fixedRatio: false,\n rotate: 0,\n text: {\n content: '

6

',\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n align: 'middle'\n }\n }, \n {\n type: 'text',\n id: '0S3yUg',\n left: 602.4074074074074,\n top: 378.287037037037,\n width: 323.7037037037037,\n height: 120,\n content: '

在此输入内容

在此输入内容

在此输入内容

',\n rotate: 0,\n defaultFontName: '{{fontName}}',\n defaultColor: '{{fontColor}}',\n fill: '{{subColor}}'\n }\n ],\n background: {\n type: 'solid',\n color: '{{backgroundColor}}',\n },\n },\n]","import { defineStore } from 'pinia'\nimport tinycolor from 'tinycolor2'\nimport { omit } from 'lodash'\nimport type { Slide, SlideTheme, PPTElement, PPTAnimation } from '@/types/slides'\nimport { slides } from '@/mocks/slides'\nimport { theme } from '@/mocks/theme'\nimport { layouts } from '@/mocks/layout'\n\ninterface RemoveElementPropData {\n id: string\n propName: string | string[]\n}\n\ninterface UpdateElementData {\n id: string | string[]\n props: Partial\n slideId?: string\n}\n\ninterface FormatedAnimation {\n animations: PPTAnimation[]\n autoNext: boolean\n}\n\nexport interface SlidesState {\n title: string\n theme: SlideTheme\n slides: Slide[]\n slideIndex: number\n viewportRatio: number\n}\n\nexport const useSlidesStore = defineStore('slides', {\n state: (): SlidesState => ({\n title: '未命名演示文稿', // 幻灯片标题\n theme: theme, // 主题样式\n slides: slides, // 幻灯片页面数据\n slideIndex: 0, // 当前页面索引\n viewportRatio: 0.5625, // 可视区域比例,默认16:9\n }),\n\n getters: {\n currentSlide(state) {\n return state.slides[state.slideIndex]\n },\n \n currentSlideAnimations(state) {\n const currentSlide = state.slides[state.slideIndex]\n if (!currentSlide?.animations) return []\n\n const els = currentSlide.elements\n const elIds = els.map(el => el.id)\n return currentSlide.animations.filter(animation => elIds.includes(animation.elId))\n },\n\n // 格式化的当前页动画\n // 将触发条件为“与上一动画同时”的项目向上合并到序列中的同一位置\n // 为触发条件为“上一动画之后”项目的上一项添加自动向下执行标记\n formatedAnimations(state) {\n const currentSlide = state.slides[state.slideIndex]\n if (!currentSlide?.animations) return []\n\n const els = currentSlide.elements\n const elIds = els.map(el => el.id)\n const animations = currentSlide.animations.filter(animation => elIds.includes(animation.elId))\n\n const formatedAnimations: FormatedAnimation[] = []\n for (const animation of animations) {\n if (animation.trigger === 'click' || !formatedAnimations.length) {\n formatedAnimations.push({ animations: [animation], autoNext: false })\n }\n else if (animation.trigger === 'meantime') {\n const last = formatedAnimations[formatedAnimations.length - 1]\n last.animations = last.animations.filter(item => item.elId !== animation.elId)\n last.animations.push(animation)\n formatedAnimations[formatedAnimations.length - 1] = last\n }\n else if (animation.trigger === 'auto') {\n const last = formatedAnimations[formatedAnimations.length - 1]\n last.autoNext = true\n formatedAnimations[formatedAnimations.length - 1] = last\n formatedAnimations.push({ animations: [animation], autoNext: false })\n }\n }\n return formatedAnimations\n },\n \n layouts(state) {\n const {\n themeColor,\n fontColor,\n fontName,\n backgroundColor,\n } = state.theme\n \n const subColor = tinycolor(fontColor).isDark() ? 'rgba(230, 230, 230, 0.5)' : 'rgba(180, 180, 180, 0.5)'\n \n const layoutsString = JSON.stringify(layouts)\n .replaceAll('{{themeColor}}', themeColor)\n .replaceAll('{{fontColor}}', fontColor)\n .replaceAll('{{fontName}}', fontName)\n .replaceAll('{{backgroundColor}}', backgroundColor)\n .replaceAll('{{subColor}}', subColor)\n \n return JSON.parse(layoutsString)\n },\n },\n\n actions: {\n setTitle(title: string) {\n if (!title) this.title = '未命名演示文稿'\n else this.title = title\n },\n\n setTheme(themeProps: Partial) {\n this.theme = { ...this.theme, ...themeProps }\n },\n \n setViewportRatio(viewportRatio: number) {\n this.viewportRatio = viewportRatio\n },\n \n setSlides(slides: Slide[]) {\n this.slides = slides\n },\n \n addSlide(slide: Slide | Slide[]) {\n const slides = Array.isArray(slide) ? slide : [slide]\n const addIndex = this.slideIndex + 1\n this.slides.splice(addIndex, 0, ...slides)\n this.slideIndex = addIndex\n },\n \n updateSlide(props: Partial) {\n const slideIndex = this.slideIndex\n this.slides[slideIndex] = { ...this.slides[slideIndex], ...props }\n },\n \n deleteSlide(slideId: string | string[]) {\n const slidesId = Array.isArray(slideId) ? slideId : [slideId]\n \n const deleteSlidesIndex = []\n for (let i = 0; i < slidesId.length; i++) {\n const index = this.slides.findIndex(item => item.id === slidesId[i])\n deleteSlidesIndex.push(index)\n }\n let newIndex = Math.min(...deleteSlidesIndex)\n \n const maxIndex = this.slides.length - slidesId.length - 1\n if (newIndex > maxIndex) newIndex = maxIndex\n \n this.slideIndex = newIndex\n this.slides = this.slides.filter(item => !slidesId.includes(item.id))\n },\n \n updateSlideIndex(index: number) {\n this.slideIndex = index\n },\n \n addElement(element: PPTElement | PPTElement[]) {\n const elements = Array.isArray(element) ? element : [element]\n const currentSlideEls = this.slides[this.slideIndex].elements\n const newEls = [...currentSlideEls, ...elements]\n this.slides[this.slideIndex].elements = newEls\n },\n\n deleteElement(elementId: string | string[]) {\n const elementIdList = Array.isArray(elementId) ? elementId : [elementId]\n const currentSlideEls = this.slides[this.slideIndex].elements\n const newEls = currentSlideEls.filter(item => !elementIdList.includes(item.id))\n this.slides[this.slideIndex].elements = newEls\n },\n \n updateElement(data: UpdateElementData) {\n const { id, props, slideId } = data\n const elIdList = typeof id === 'string' ? [id] : id\n\n const slideIndex = slideId ? this.slides.findIndex(item => item.id === slideId) : this.slideIndex\n const slide = this.slides[slideIndex]\n const elements = slide.elements.map(el => {\n return elIdList.includes(el.id) ? { ...el, ...props } : el\n })\n this.slides[slideIndex].elements = (elements as PPTElement[])\n },\n \n removeElementProps(data: RemoveElementPropData) {\n const { id, propName } = data\n const propsNames = typeof propName === 'string' ? [propName] : propName\n \n const slideIndex = this.slideIndex\n const slide = this.slides[slideIndex]\n const elements = slide.elements.map(el => {\n return el.id === id ? omit(el, propsNames) : el\n })\n this.slides[slideIndex].elements = (elements as PPTElement[])\n },\n },\n})","import { customAlphabet } from 'nanoid'\nimport { defineStore } from 'pinia'\nimport { ToolbarStates } from '@/types/toolbar'\nimport type { CreatingElement, ShapeFormatPainter, TextFormatPainter } from '@/types/edit'\nimport type { DialogForExportTypes } from '@/types/export'\nimport { type TextAttrs, defaultRichTextAttrs } from '@/utils/prosemirror/utils'\nimport { SYS_FONTS } from '@/configs/font'\nimport { isSupportFont } from '@/utils/font'\n\nimport { useSlidesStore } from './slides'\n\nexport interface MainState {\n activeElementIdList: string[]\n handleElementId: string\n activeGroupElementId: string\n hiddenElementIdList: string[]\n canvasPercentage: number\n canvasScale: number\n canvasDragged: boolean\n thumbnailsFocus: boolean\n editorAreaFocus: boolean\n disableHotkeys: boolean\n gridLineSize: number\n showRuler: boolean\n creatingElement: CreatingElement | null\n creatingCustomShape: boolean\n availableFonts: typeof SYS_FONTS\n toolbarState: ToolbarStates\n clipingImageElementId: string\n isScaling: boolean\n richTextAttrs: TextAttrs\n selectedTableCells: string[]\n selectedSlidesIndex: number[]\n dialogForExport: DialogForExportTypes\n databaseId: string\n textFormatPainter: TextFormatPainter | null\n shapeFormatPainter: ShapeFormatPainter | null\n showSelectPanel: boolean\n showSearchPanel: boolean\n}\n\nconst nanoid = customAlphabet('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')\nexport const databaseId = nanoid(10)\n\nexport const useMainStore = defineStore('main', {\n state: (): MainState => ({\n activeElementIdList: [], // 被选中的元素ID集合,包含 handleElementId\n handleElementId: '', // 正在操作的元素ID\n activeGroupElementId: '', // 组合元素成员中,被选中可独立操作的元素ID\n hiddenElementIdList: [], // 被隐藏的元素ID集合\n canvasPercentage: 90, // 画布可视区域百分比\n canvasScale: 1, // 画布缩放比例(基于宽度1000px)\n canvasDragged: false, // 画布被拖拽移动\n thumbnailsFocus: false, // 左侧导航缩略图区域聚焦\n editorAreaFocus: false, // 编辑区域聚焦\n disableHotkeys: false, // 禁用快捷键\n gridLineSize: 0, // 网格线尺寸(0表示不显示网格线)\n showRuler: false, // 显示标尺\n creatingElement: null, // 正在插入的元素信息,需要通过绘制插入的元素(文字、形状、线条)\n creatingCustomShape: false, // 正在绘制任意多边形\n availableFonts: SYS_FONTS, // 当前环境可用字体\n toolbarState: ToolbarStates.SLIDE_DESIGN, // 右侧工具栏状态\n clipingImageElementId: '', // 当前正在裁剪的图片ID \n richTextAttrs: defaultRichTextAttrs, // 富文本状态\n selectedTableCells: [], // 选中的表格单元格\n isScaling: false, // 正在进行元素缩放\n selectedSlidesIndex: [], // 当前被选中的页面索引集合\n dialogForExport: '', // 导出面板\n databaseId, // 标识当前应用的indexedDB数据库ID\n textFormatPainter: null, // 文字格式刷\n shapeFormatPainter: null, // 形状格式刷\n showSelectPanel: false, // 打开选择面板\n showSearchPanel: false, // 打开查找替换面板\n }),\n\n getters: {\n activeElementList(state) {\n const slidesStore = useSlidesStore()\n const currentSlide = slidesStore.currentSlide\n if (!currentSlide || !currentSlide.elements) return []\n return currentSlide.elements.filter(element => state.activeElementIdList.includes(element.id))\n },\n \n handleElement(state) {\n const slidesStore = useSlidesStore()\n const currentSlide = slidesStore.currentSlide\n if (!currentSlide || !currentSlide.elements) return null\n return currentSlide.elements.find(element => state.handleElementId === element.id) || null\n },\n },\n\n actions: {\n setActiveElementIdList(activeElementIdList: string[]) {\n if (activeElementIdList.length === 1) this.handleElementId = activeElementIdList[0]\n else this.handleElementId = ''\n \n this.activeElementIdList = activeElementIdList\n },\n \n setHandleElementId(handleElementId: string) {\n this.handleElementId = handleElementId\n },\n \n setActiveGroupElementId(activeGroupElementId: string) {\n this.activeGroupElementId = activeGroupElementId\n },\n \n setHiddenElementIdList(hiddenElementIdList: string[]) {\n this.hiddenElementIdList = hiddenElementIdList\n },\n \n setCanvasPercentage(percentage: number) {\n this.canvasPercentage = percentage\n },\n \n setCanvasScale(scale: number) {\n this.canvasScale = scale\n },\n \n setCanvasDragged(isDragged: boolean) {\n this.canvasDragged = isDragged\n },\n \n setThumbnailsFocus(isFocus: boolean) {\n this.thumbnailsFocus = isFocus\n },\n \n setEditorareaFocus(isFocus: boolean) {\n this.editorAreaFocus = isFocus\n },\n \n setDisableHotkeysState(disable: boolean) {\n this.disableHotkeys = disable\n },\n \n setGridLineSize(size: number) {\n this.gridLineSize = size\n },\n \n setRulerState(show: boolean) {\n this.showRuler = show\n },\n \n setCreatingElement(element: CreatingElement | null) {\n this.creatingElement = element\n },\n \n setCreatingCustomShapeState(state: boolean) {\n this.creatingCustomShape = state\n },\n \n setAvailableFonts() {\n this.availableFonts = SYS_FONTS.filter(font => isSupportFont(font.value))\n },\n \n setToolbarState(toolbarState: ToolbarStates) {\n this.toolbarState = toolbarState\n },\n \n setClipingImageElementId(elId: string) {\n this.clipingImageElementId = elId\n },\n \n setRichtextAttrs(attrs: TextAttrs) {\n this.richTextAttrs = attrs\n },\n \n setSelectedTableCells(cells: string[]) {\n this.selectedTableCells = cells\n },\n \n setScalingState(isScaling: boolean) {\n this.isScaling = isScaling\n },\n \n updateSelectedSlidesIndex(selectedSlidesIndex: number[]) {\n this.selectedSlidesIndex = selectedSlidesIndex\n },\n\n setDialogForExport(type: DialogForExportTypes) {\n this.dialogForExport = type\n },\n\n setTextFormatPainter(textFormatPainter: TextFormatPainter | null) {\n this.textFormatPainter = textFormatPainter\n },\n\n setShapeFormatPainter(shapeFormatPainter: ShapeFormatPainter | null) {\n this.shapeFormatPainter = shapeFormatPainter\n },\n\n setSelectPanelState(show: boolean) {\n this.showSelectPanel = show\n },\n\n setSearchPanelState(show: boolean) {\n this.showSearchPanel = show\n },\n },\n})","export const LOCALSTORAGE_KEY_DISCARDED_DB = 'PPTIST_DISCARDED_DB'","import Dexie from 'dexie'\nimport { databaseId } from '@/store/main'\nimport type { Slide } from '@/types/slides'\nimport { LOCALSTORAGE_KEY_DISCARDED_DB } from '@/configs/storage'\n\nexport interface writingBoardImg {\n id: string\n dataURL: string\n}\n\nexport interface Snapshot {\n index: number\n slides: Slide[]\n}\n\nconst databaseNamePrefix = 'PPTist'\n\n// 删除失效/过期的数据库\n// 应用关闭时(关闭或刷新浏览器),会将其数据库ID记录在 localStorage 中,表示该ID指向的数据库已失效\n// 当应用初始化时,检查当前所有数据库,将被记录失效的数据库删除\n// 另外,距离初始化时间超过12小时的数据库也将被删除(这是为了防止出现因意外未被正确删除的库)\nexport const deleteDiscardedDB = async () => {\n const now = new Date().getTime()\n\n const localStorageDiscardedDB = localStorage.getItem(LOCALSTORAGE_KEY_DISCARDED_DB)\n const localStorageDiscardedDBList: string[] = localStorageDiscardedDB ? JSON.parse(localStorageDiscardedDB) : []\n\n const databaseNames = await Dexie.getDatabaseNames()\n const discardedDBNames = databaseNames.filter(name => {\n if (name.indexOf(databaseNamePrefix) === -1) return false\n \n const [prefix, id, time] = name.split('_')\n if (prefix !== databaseNamePrefix || !id || !time) return true\n if (localStorageDiscardedDBList.includes(id)) return true\n if (now - (+time) >= 1000 * 60 * 60 * 12) return true\n\n return false\n })\n\n for (const name of discardedDBNames) Dexie.delete(name)\n localStorage.removeItem(LOCALSTORAGE_KEY_DISCARDED_DB)\n}\n\nclass PPTistDB extends Dexie {\n public snapshots: Dexie.Table\n public writingBoardImgs: Dexie.Table\n\n public constructor() {\n super(`${databaseNamePrefix}_${databaseId}_${new Date().getTime()}`)\n this.version(1).stores({\n snapshots: '++id',\n writingBoardImgs: '++id',\n })\n this.snapshots = this.table('snapshots')\n this.writingBoardImgs = this.table('writingBoardImgs')\n }\n}\n\nexport const db = new PPTistDB()","import { defineStore } from 'pinia'\nimport type { IndexableTypeArray } from 'dexie'\nimport { db, type Snapshot } from '@/utils/database'\n\nimport { useSlidesStore } from './slides'\nimport { useMainStore } from './main'\n\nexport interface ScreenState {\n snapshotCursor: number\n snapshotLength: number\n}\n\nexport const useSnapshotStore = defineStore('snapshot', {\n state: (): ScreenState => ({\n snapshotCursor: -1, // 历史快照指针\n snapshotLength: 0, // 历史快照长度\n }),\n\n getters: {\n canUndo(state) {\n return state.snapshotCursor > 0\n },\n canRedo(state) {\n return state.snapshotCursor < state.snapshotLength - 1\n },\n },\n\n actions: {\n setSnapshotCursor(cursor: number) {\n this.snapshotCursor = cursor\n },\n setSnapshotLength(length: number) {\n this.snapshotLength = length\n },\n\n async initSnapshotDatabase() {\n const slidesStore = useSlidesStore()\n \n const newFirstSnapshot = {\n index: slidesStore.slideIndex,\n slides: slidesStore.slides,\n }\n await db.snapshots.add(newFirstSnapshot)\n this.setSnapshotCursor(0)\n this.setSnapshotLength(1)\n },\n \n async addSnapshot() {\n const slidesStore = useSlidesStore()\n\n // 获取当前indexeddb中全部快照的ID\n const allKeys = await db.snapshots.orderBy('id').keys()\n \n let needDeleteKeys: IndexableTypeArray = []\n \n // 记录需要删除的快照ID\n // 若当前快照指针不处在最后一位,那么再添加快照时,应该将当前指针位置后面的快照全部删除,对应的实际情况是:\n // 用户撤回多次后,再进行操作(添加快照),此时原先被撤销的快照都应该被删除\n if (this.snapshotCursor >= 0 && this.snapshotCursor < allKeys.length - 1) {\n needDeleteKeys = allKeys.slice(this.snapshotCursor + 1)\n }\n \n // 添加新快照\n const snapshot = {\n index: slidesStore.slideIndex,\n slides: slidesStore.slides,\n }\n await db.snapshots.add(snapshot)\n \n // 计算当前快照长度,用于设置快照指针的位置(此时指针应该处在最后一位,即:快照长度 - 1)\n let snapshotLength = allKeys.length - needDeleteKeys.length + 1\n \n // 快照数量超过长度限制时,应该将头部多余的快照删除\n const snapshotLengthLimit = 20\n if (snapshotLength > snapshotLengthLimit) {\n needDeleteKeys.push(allKeys[0])\n snapshotLength--\n }\n \n // 快照数大于1时,需要保证撤回操作后维持页面焦点不变:也就是将倒数第二个快照对应的索引设置为当前页的索引\n // https://github.com/pipipi-pikachu/PPTist/issues/27\n if (snapshotLength >= 2) {\n db.snapshots.update(allKeys[snapshotLength - 2] as number, { index: slidesStore.slideIndex })\n }\n \n await db.snapshots.bulkDelete(needDeleteKeys)\n \n this.setSnapshotCursor(snapshotLength - 1)\n this.setSnapshotLength(snapshotLength)\n },\n \n async unDo() {\n if (this.snapshotCursor <= 0) return\n\n const slidesStore = useSlidesStore()\n const mainStore = useMainStore()\n \n const snapshotCursor = this.snapshotCursor - 1\n const snapshots: Snapshot[] = await db.snapshots.orderBy('id').toArray()\n const snapshot = snapshots[snapshotCursor]\n const { index, slides } = snapshot\n \n const slideIndex = index > slides.length - 1 ? slides.length - 1 : index\n \n slidesStore.setSlides(slides)\n slidesStore.updateSlideIndex(slideIndex)\n this.setSnapshotCursor(snapshotCursor)\n mainStore.setActiveElementIdList([])\n },\n \n async reDo() {\n if (this.snapshotCursor >= this.snapshotLength - 1) return\n\n const slidesStore = useSlidesStore()\n const mainStore = useMainStore()\n \n const snapshotCursor = this.snapshotCursor + 1\n const snapshots: Snapshot[] = await db.snapshots.orderBy('id').toArray()\n const snapshot = snapshots[snapshotCursor]\n const { index, slides } = snapshot\n \n const slideIndex = index > slides.length - 1 ? slides.length - 1 : index\n \n slidesStore.setSlides(slides)\n slidesStore.updateSlideIndex(slideIndex)\n this.setSnapshotCursor(snapshotCursor)\n mainStore.setActiveElementIdList([])\n },\n },\n})","import { defineStore } from 'pinia'\n\nexport interface KeyboardState {\n ctrlKeyState: boolean\n shiftKeyState: boolean\n spaceKeyState: boolean\n}\n\nexport const useKeyboardStore = defineStore('keyboard', {\n state: (): KeyboardState => ({\n ctrlKeyState: false, // ctrl键按下状态\n shiftKeyState: false, // shift键按下状态\n spaceKeyState: false, // space键按下状态\n }),\n\n getters: {\n ctrlOrShiftKeyActive(state) {\n return state.ctrlKeyState || state.shiftKeyState\n },\n },\n\n actions: {\n setCtrlKeyState(active: boolean) {\n this.ctrlKeyState = active\n },\n setShiftKeyState(active: boolean) {\n this.shiftKeyState = active\n },\n setSpaceKeyState(active: boolean) {\n this.spaceKeyState = active\n },\n },\n})","import { defineStore } from 'pinia'\n\nexport interface ScreenState {\n screening: boolean\n}\n\nexport const useScreenStore = defineStore('screen', {\n state: (): ScreenState => ({\n screening: false, // 是否进入放映状态\n }),\n\n actions: {\n setScreening(screening: boolean) {\n this.screening = screening\n },\n },\n})","import { padStart } from 'lodash'\n\n/**\n * 补足数字位数\n * @param digit 数字\n * @param len 位数\n */\nexport const fillDigit = (digit: number, len: number) => {\n return padStart('' + digit, len, '0')\n}\n\n/**\n * 判断设备\n */\nexport const isPC = () => {\n return !navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile|BlackBerry|Symbian|Windows Phone)/i)\n}","import type { ShapePoolItem } from '@/configs/shapes'\r\nimport type { LinePoolItem } from '@/configs/lines'\r\nimport type { ImageClipDataRange, PPTElementOutline, PPTElementShadow, ShapeGradient } from './slides'\r\n\r\nexport enum ElementOrderCommands {\r\n UP = 'up',\r\n DOWN = 'down',\r\n TOP = 'top',\r\n BOTTOM = 'bottom',\r\n}\r\n\r\nexport enum ElementAlignCommands {\r\n TOP = 'top',\r\n BOTTOM = 'bottom',\r\n LEFT = 'left',\r\n RIGHT = 'right',\r\n VERTICAL = 'vertical',\r\n HORIZONTAL = 'horizontal',\r\n CENTER = 'center',\r\n}\r\n\r\nexport const enum OperateBorderLines {\r\n T = 'top',\r\n B = 'bottom',\r\n L = 'left',\r\n R = 'right',\r\n}\r\n\r\nexport const enum OperateResizeHandlers {\r\n LEFT_TOP = 'left-top',\r\n TOP = 'top',\r\n RIGHT_TOP = 'right-top',\r\n LEFT = 'left',\r\n RIGHT = 'right',\r\n LEFT_BOTTOM = 'left-bottom',\r\n BOTTOM = 'bottom',\r\n RIGHT_BOTTOM = 'right-bottom',\r\n}\r\n\r\nexport const enum OperateLineHandlers {\r\n START = 'start',\r\n END = 'end',\r\n C = 'ctrl',\r\n C1 = 'ctrl1',\r\n C2 = 'ctrl2',\r\n}\r\n\r\nexport interface AlignmentLineAxis {\r\n x: number\r\n y: number\r\n}\r\n\r\nexport interface AlignmentLineProps {\r\n type: 'vertical' | 'horizontal'\r\n axis: AlignmentLineAxis\r\n length: number\r\n}\r\n\r\nexport interface MultiSelectRange {\r\n minX: number\r\n maxX: number\r\n minY: number\r\n maxY: number\r\n}\r\n\r\nexport interface ImageClipedEmitData {\r\n range: ImageClipDataRange\r\n position: {\r\n left: number\r\n top: number\r\n width: number\r\n height: number\r\n }\r\n}\r\n\r\nexport interface CreateElementSelectionData {\r\n start: [number, number]\r\n end: [number, number]\r\n}\r\n\r\nexport interface CreateCustomShapeData {\r\n start: [number, number]\r\n end: [number, number]\r\n path: string\r\n viewBox: [number, number]\r\n}\r\n\r\nexport interface CreatingTextElement {\r\n type: 'text'\r\n vertical?: boolean\r\n}\r\nexport interface CreatingShapeElement {\r\n type: 'shape'\r\n data: ShapePoolItem\r\n}\r\nexport interface CreatingLineElement {\r\n type: 'line'\r\n data: LinePoolItem\r\n}\r\nexport type CreatingElement = CreatingTextElement | CreatingShapeElement | CreatingLineElement\r\n\r\nexport type TextFormatPainterKeys = 'bold' | 'em' | 'underline' | 'strikethrough' | 'color' | 'backcolor' | 'fontsize' | 'fontname' | 'align'\r\n\r\nexport interface TextFormatPainter {\r\n keep: boolean\r\n bold?: boolean\r\n em?: boolean\r\n underline?: boolean\r\n strikethrough?: boolean\r\n color?: string\r\n backcolor?: string\r\n fontsize?: string\r\n fontname?: string\r\n align?: 'left' | 'right' | 'center'\r\n}\r\n\r\nexport interface ShapeFormatPainter {\r\n keep: boolean\r\n fill?: string\r\n gradient?: ShapeGradient\r\n outline?: PPTElementOutline\r\n opacity?: number\r\n shadow?: PPTElementShadow\r\n}","export const enum KEYS {\n C = 'C',\n X = 'X',\n Z = 'Z',\n Y = 'Y',\n A = 'A',\n G = 'G',\n L = 'L',\n F = 'F',\n D = 'D',\n B = 'B',\n P = 'P',\n MINUS = '-',\n EQUAL = '=',\n DIGIT_0 = '0',\n DELETE = 'DELETE',\n UP = 'ARROWUP',\n DOWN = 'ARROWDOWN',\n LEFT = 'ARROWLEFT',\n RIGHT = 'ARROWRIGHT',\n ENTER = 'ENTER',\n SPACE = ' ',\n TAB = 'TAB',\n BACKSPACE = 'BACKSPACE',\n ESC = 'ESCAPE',\n PAGEUP = 'PAGEUP',\n PAGEDOWN = 'PAGEDOWN',\n F5 = 'F5',\n}\n\nexport const HOTKEY_DOC = [\n {\n type: '通用',\n children: [\n { label: '剪切', value: 'Ctrl + X' },\n { label: '复制', value: 'Ctrl + C' },\n { label: '粘贴', value: 'Ctrl + V' },\n { label: '粘贴为纯文本', value: 'Ctrl + Shift + V' },\n { label: '快速复制粘贴', value: 'Ctrl + D' },\n { label: '全选', value: 'Ctrl + A' },\n { label: '撤销', value: 'Ctrl + Z' },\n { label: '恢复', value: 'Ctrl + Y' },\n { label: '删除', value: 'Delete / Backspace' },\n { label: '多选', value: '按住 Ctrl 或 Shift' },\n { label: '打开搜索替换', value: 'Ctrl + F' },\n { label: '打印', value: 'Ctrl + P' },\n { label: '关闭弹窗', value: 'ESC' },\n ],\n },\n {\n type: '幻灯片放映',\n children: [\n { label: '从头开始放映幻灯片', value: 'F5' },\n { label: '从当前开始放映幻灯片', value: 'Shift + F5' },\n { label: '切换上一页', value: '↑ / ← / PgUp' },\n { label: '切换下一页', value: '↓ / → / PgDown' },\n { label: '切换下一页', value: 'Enter / Space' },\n { label: '退出放映', value: 'ESC' },\n ],\n },\n {\n type: '幻灯片编辑',\n children: [\n { label: '新建幻灯片', value: 'Enter' },\n { label: '移动画布', value: 'Space + 鼠标拖拽' },\n { label: '缩放画布', value: 'Ctrl + 鼠标滚轮' },\n { label: '放大画布', value: 'Ctrl + =' },\n { label: '缩小画布', value: 'Ctrl + -' },\n { label: '使画布适应当前屏幕', value: 'Ctrl + 0' },\n { label: '上一页(未选中元素)', value: '↑ / ←' },\n { label: '下一页(未选中元素)', value: '↓ / →' },\n { label: '上一页', value: '鼠标上滚 / PgUp' },\n { label: '下一页', value: '鼠标下滚 / PgDown' },\n ],\n },\n {\n type: '元素操作',\n children: [\n { label: '移动', value: '↑ / ← / ↓ / →' },\n { label: '锁定', value: 'Ctrl + L' },\n { label: '组合', value: 'Ctrl + G' },\n { label: '取消组合', value: 'Ctrl + Shift + G' },\n { label: '置顶层', value: 'Alt + F' },\n { label: '置底层', value: 'Alt + B' },\n { label: '锁定宽高比例', value: '按住 Ctrl 或 Shift' },\n { label: '创建水平 / 垂直线条', value: '按住 Ctrl 或 Shift' },\n { label: '切换焦点元素', value: 'Tab' },\n { label: '确认图片裁剪', value: 'Enter' },\n ],\n },\n {\n type: '表格编辑',\n children: [\n { label: '聚焦到下一个单元格', value: 'Tab' },\n { label: '在上方插入一行', value: 'Ctrl + ↑' },\n { label: '在下方插入一行', value: 'Ctrl + ↓' },\n { label: '在左侧插入一列', value: 'Ctrl + ←' },\n { label: '在右侧插入一列', value: 'Ctrl + →' },\n ],\n },\n {\n type: '图表数据编辑',\n children: [\n { label: '聚焦到下一行', value: 'Enter' },\n ],\n },\n {\n type: '文本编辑',\n children: [\n { label: '加粗', value: 'Ctrl + B' },\n { label: '斜体', value: 'Ctrl + I' },\n { label: '下划线', value: 'Ctrl + U' },\n { label: '行内代码', value: 'Ctrl + E' },\n { label: '上角标', value: 'Ctrl + ;' },\n { label: '下角标', value: `Ctrl + '` },\n { label: '选中段落', value: `ESC` },\n ],\n },\n]","import CryptoJS from 'crypto-js'\n\nconst CRYPTO_KEY = 'pptist'\n\n/**\n * 加密\n * @param msg 待加密字符串\n */\nexport const encrypt = (msg: string) => {\n return CryptoJS.AES.encrypt(msg, CRYPTO_KEY).toString()\n}\n\n/**\n * 解密\n * @param ciphertext 待解密字符串\n */\nexport const decrypt = (ciphertext: string) => {\n const bytes = CryptoJS.AES.decrypt(ciphertext, CRYPTO_KEY)\n return bytes.toString(CryptoJS.enc.Utf8)\n}","import Clipboard from 'clipboard'\nimport { decrypt } from '@/utils/crypto'\n\n/**\n * 复制文本到剪贴板\n * @param text 文本内容\n */\nexport const copyText = (text: string) => {\n return new Promise((resolve, reject) => {\n const fakeElement = document.createElement('button')\n const clipboard = new Clipboard(fakeElement, {\n text: () => text,\n action: () => 'copy',\n container: document.body,\n })\n clipboard.on('success', e => {\n clipboard.destroy()\n resolve(e)\n })\n clipboard.on('error', e => {\n clipboard.destroy()\n reject(e)\n })\n document.body.appendChild(fakeElement)\n fakeElement.click()\n document.body.removeChild(fakeElement)\n })\n}\n\n// 读取剪贴板\nexport const readClipboard = (): Promise => {\n return new Promise((resolve, reject) => {\n if (navigator.clipboard?.readText) {\n navigator.clipboard.readText().then(text => {\n if (!text) reject('剪贴板为空或者不包含文本')\n return resolve(text)\n })\n }\n else reject('浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V')\n })\n}\n\n// 解析加密后的剪贴板内容\nexport const pasteCustomClipboardString = (text: string) => {\n let clipboardData\n try {\n clipboardData = JSON.parse(decrypt(text))\n }\n catch {\n clipboardData = text\n }\n\n return clipboardData\n}\n\n// 尝试解析剪贴板内容是否为Excel表格(或类似的)数据格式\nexport const pasteExcelClipboardString = (text: string): string[][] | null => {\n const lines: string[] = text.split('\\r\\n')\n\n if (lines[lines.length - 1] === '') lines.pop()\n\n let colCount = -1\n const data: string[][] = []\n for (const index in lines) {\n data[index] = lines[index].split('\\t')\n\n if (data[index].length === 1) return null\n if (colCount === -1) colCount = data[index].length\n else if (colCount !== data[index].length) return null\n }\n return data\n}","import tinycolor from 'tinycolor2'\r\nimport { nanoid } from 'nanoid'\r\nimport type { PPTElement, PPTLineElement, Slide } from '@/types/slides'\r\n\r\ninterface RotatedElementData {\r\n left: number\r\n top: number\r\n width: number\r\n height: number\r\n rotate: number\r\n}\r\n\r\ninterface IdMap {\r\n [id: string]: string\r\n}\r\n\r\n/**\r\n * 计算元素在画布中的矩形范围旋转后的新位置范围\r\n * @param element 元素的位置大小和旋转角度信息\r\n */\r\nexport const getRectRotatedRange = (element: RotatedElementData) => {\r\n const { left, top, width, height, rotate = 0 } = element\r\n\r\n const radius = Math.sqrt( Math.pow(width, 2) + Math.pow(height, 2) ) / 2\r\n const auxiliaryAngle = Math.atan(height / width) * 180 / Math.PI\r\n\r\n const tlbraRadian = (180 - rotate - auxiliaryAngle) * Math.PI / 180\r\n const trblaRadian = (auxiliaryAngle - rotate) * Math.PI / 180\r\n\r\n const middleLeft = left + width / 2\r\n const middleTop = top + height / 2\r\n\r\n const xAxis = [\r\n middleLeft + radius * Math.cos(tlbraRadian),\r\n middleLeft + radius * Math.cos(trblaRadian),\r\n middleLeft - radius * Math.cos(tlbraRadian),\r\n middleLeft - radius * Math.cos(trblaRadian),\r\n ]\r\n const yAxis = [\r\n middleTop - radius * Math.sin(tlbraRadian),\r\n middleTop - radius * Math.sin(trblaRadian),\r\n middleTop + radius * Math.sin(tlbraRadian),\r\n middleTop + radius * Math.sin(trblaRadian),\r\n ]\r\n\r\n return {\r\n xRange: [Math.min(...xAxis), Math.max(...xAxis)],\r\n yRange: [Math.min(...yAxis), Math.max(...yAxis)],\r\n }\r\n}\r\n\r\n/**\r\n * 计算元素在画布中的矩形范围旋转后的新位置与旋转之前位置的偏离距离\r\n * @param element 元素的位置大小和旋转角度信息\r\n */\r\nexport const getRectRotatedOffset = (element: RotatedElementData) => {\r\n const { xRange: originXRange, yRange: originYRange } = getRectRotatedRange({\r\n left: element.left,\r\n top: element.top,\r\n width: element.width,\r\n height: element.height,\r\n rotate: 0,\r\n })\r\n const { xRange: rotatedXRange, yRange: rotatedYRange } = getRectRotatedRange({\r\n left: element.left,\r\n top: element.top,\r\n width: element.width,\r\n height: element.height,\r\n rotate: element.rotate,\r\n })\r\n return {\r\n offsetX: rotatedXRange[0] - originXRange[0],\r\n offsetY: rotatedYRange[0] - originYRange[0],\r\n }\r\n}\r\n\r\n/**\r\n * 计算元素在画布中的位置范围\r\n * @param element 元素信息\r\n */\r\nexport const getElementRange = (element: PPTElement) => {\r\n let minX, maxX, minY, maxY\r\n\r\n if (element.type === 'line') {\r\n minX = element.left\r\n maxX = element.left + Math.max(element.start[0], element.end[0])\r\n minY = element.top\r\n maxY = element.top + Math.max(element.start[1], element.end[1])\r\n }\r\n else if ('rotate' in element && element.rotate) {\r\n const { left, top, width, height, rotate } = element\r\n const { xRange, yRange } = getRectRotatedRange({ left, top, width, height, rotate })\r\n minX = xRange[0]\r\n maxX = xRange[1]\r\n minY = yRange[0]\r\n maxY = yRange[1]\r\n }\r\n else {\r\n minX = element.left\r\n maxX = element.left + element.width\r\n minY = element.top\r\n maxY = element.top + element.height\r\n }\r\n return { minX, maxX, minY, maxY }\r\n}\r\n\r\n/**\r\n * 计算一组元素在画布中的位置范围\r\n * @param elementList 一组元素信息\r\n */\r\nexport const getElementListRange = (elementList: PPTElement[]) => {\r\n const leftValues: number[] = []\r\n const topValues: number[] = []\r\n const rightValues: number[] = []\r\n const bottomValues: number[] = []\r\n\r\n elementList.forEach(element => {\r\n const { minX, maxX, minY, maxY } = getElementRange(element)\r\n leftValues.push(minX)\r\n topValues.push(minY)\r\n rightValues.push(maxX)\r\n bottomValues.push(maxY)\r\n })\r\n\r\n const minX = Math.min(...leftValues)\r\n const maxX = Math.max(...rightValues)\r\n const minY = Math.min(...topValues)\r\n const maxY = Math.max(...bottomValues)\r\n\r\n return { minX, maxX, minY, maxY }\r\n}\r\n\r\nexport interface AlignLine {\r\n value: number\r\n range: [number, number]\r\n}\r\n\r\n/**\r\n * 将一组对齐吸附线进行去重:同位置的的多条对齐吸附线仅留下一条,取该位置所有对齐吸附线的最大值和最小值为新的范围\r\n * @param lines 一组对齐吸附线信息\r\n */\r\nexport const uniqAlignLines = (lines: AlignLine[]) => {\r\n const uniqLines: AlignLine[] = []\r\n lines.forEach(line => {\r\n const index = uniqLines.findIndex(_line => _line.value === line.value)\r\n if (index === -1) uniqLines.push(line)\r\n else {\r\n const uniqLine = uniqLines[index]\r\n const rangeMin = Math.min(uniqLine.range[0], line.range[0])\r\n const rangeMax = Math.max(uniqLine.range[1], line.range[1])\r\n const range: [number, number] = [rangeMin, rangeMax]\r\n const _line = { value: line.value, range }\r\n uniqLines[index] = _line\r\n }\r\n })\r\n return uniqLines\r\n}\r\n\r\n/**\r\n * 以页面列表为基础,为每一个页面生成新的ID,并关联到旧ID形成一个字典\r\n * 主要用于页面元素时,维持数据中各处页面ID原有的关系\r\n * @param slides 页面列表\r\n */\r\nexport const createSlideIdMap = (slides: Slide[]) => {\r\n const slideIdMap: IdMap = {}\r\n for (const slide of slides) {\r\n slideIdMap[slide.id] = nanoid(10)\r\n }\r\n return slideIdMap\r\n}\r\n\r\n/**\r\n * 以元素列表为基础,为每一个元素生成新的ID,并关联到旧ID形成一个字典\r\n * 主要用于复制元素时,维持数据中各处元素ID原有的关系\r\n * 例如:原本两个组合的元素拥有相同的groupId,复制后依然会拥有另一个相同的groupId\r\n * @param elements 元素列表数据\r\n */\r\nexport const createElementIdMap = (elements: PPTElement[]) => {\r\n const groupIdMap: IdMap = {}\r\n const elIdMap: IdMap = {}\r\n for (const element of elements) {\r\n const groupId = element.groupId\r\n if (groupId && !groupIdMap[groupId]) {\r\n groupIdMap[groupId] = nanoid(10)\r\n }\r\n elIdMap[element.id] = nanoid(10)\r\n }\r\n return {\r\n groupIdMap,\r\n elIdMap,\r\n }\r\n}\r\n\r\n/**\r\n * 根据表格的主题色,获取对应用于配色的子颜色\r\n * @param themeColor 主题色\r\n */\r\nexport const getTableSubThemeColor = (themeColor: string) => {\r\n const rgba = tinycolor(themeColor)\r\n return [\r\n rgba.setAlpha(0.3).toRgbString(),\r\n rgba.setAlpha(0.1).toRgbString(),\r\n ]\r\n}\r\n\r\n/**\r\n * 获取线条元素路径字符串\r\n * @param element 线条元素\r\n */\r\nexport const getLineElementPath = (element: PPTLineElement) => {\r\n const start = element.start.join(',')\r\n const end = element.end.join(',')\r\n if (element.broken) {\r\n const mid = element.broken.join(',')\r\n return `M${start} L${mid} L${end}`\r\n }\r\n else if (element.curve) {\r\n const mid = element.curve.join(',')\r\n return `M${start} Q${mid} ${end}`\r\n }\r\n else if (element.cubic) {\r\n const [c1, c2] = element.cubic\r\n const p1 = c1.join(',')\r\n const p2 = c2.join(',')\r\n return `M${start} C${p1} ${p2} ${end}`\r\n }\r\n return `M${start} L${end}`\r\n}\r\n\r\n/**\r\n * 判断一个元素是否在可视范围内\r\n * @param element 元素\r\n * @param parent 父元素\r\n */\r\nexport const isElementInViewport = (element: HTMLElement, parent: HTMLElement): boolean => {\r\n const elementRect = element.getBoundingClientRect()\r\n const parentRect = parent.getBoundingClientRect()\r\n\r\n return (\r\n elementRect.top >= parentRect.top &&\r\n elementRect.bottom <= parentRect.bottom\r\n )\r\n}","// https://iconpark.bytedance.com/official\n\nimport type { App } from 'vue'\nimport {\n PlayOne,\n FullScreenPlay,\n Lock,\n Unlock,\n Ppt,\n Format,\n Picture,\n FullScreen,\n List,\n OrderedList,\n FlipVertically,\n FlipHorizontally,\n FontSize,\n Code,\n TextBold,\n TextItalic,\n TextUnderline,\n Strikethrough,\n Edit,\n Quote,\n BackgroundColor,\n Group,\n Ungroup,\n Back,\n Next,\n Fullwidth,\n AlignTop,\n AlignLeft,\n AlignRight,\n AlignBottom,\n AlignVertically,\n AlignHorizontally,\n BringToFront,\n SendToBack,\n AlignTextLeft,\n AlignTextRight,\n AlignTextCenter,\n AlignTextBoth,\n RowHeight,\n Write,\n InsertTable,\n AddText,\n Fill,\n Tailoring,\n Effects,\n ColorFilter,\n Up,\n Down,\n Plus,\n Minus,\n Connection,\n BringToFrontOne,\n SentToBack,\n Github,\n ChartProportion,\n ChartHistogram,\n ChartHistogramOne,\n ChartLineArea,\n ChartRing,\n ChartScatter,\n ChartLine,\n ChartPie,\n Text,\n Rotate,\n LeftTwo,\n RightTwo,\n Platte,\n Close,\n CloseSmall,\n Undo,\n Transform,\n Click,\n Theme,\n ArrowCircleLeft,\n GraphicDesign,\n Logout,\n Erase,\n Clear,\n AlignTextTopOne,\n AlignTextBottomOne,\n AlignTextMiddleOne,\n Pause,\n VolumeMute,\n VolumeNotice,\n VolumeSmall,\n VideoTwo,\n Formula,\n LinkOne,\n FullScreenOne,\n OffScreenOne,\n Power,\n ListView,\n Magic,\n HighLight,\n Download,\n IndentLeft,\n IndentRight,\n VerticalSpacingBetweenItems,\n Copy,\n Delete,\n Square,\n Round,\n Needle,\n TextRotationNone,\n TextRotationDown,\n FormatBrush,\n PreviewOpen,\n PreviewClose,\n StopwatchStart,\n Search,\n Left,\n Right,\n MoveOne,\n HamburgerButton,\n Attention,\n CheckOne,\n CloseOne,\n Info,\n} from '@icon-park/vue-next'\n\nexport interface Icons {\n [key: string]: typeof PlayOne\n}\n\nexport const icons: Icons = {\n IconPlayOne: PlayOne,\n IconFullScreenPlay: FullScreenPlay,\n IconLock: Lock,\n IconUnlock: Unlock,\n IconPpt: Ppt,\n IconFormat: Format,\n IconPicture: Picture,\n IconFullScreen: FullScreen,\n IconList: List,\n IconOrderedList: OrderedList,\n IconFlipVertically: FlipVertically,\n IconFlipHorizontally: FlipHorizontally,\n IconFontSize: FontSize,\n IconCode: Code,\n IconTextBold: TextBold,\n IconTextItalic: TextItalic,\n IconTextUnderline: TextUnderline,\n IconStrikethrough: Strikethrough,\n IconEdit: Edit,\n IconQuote: Quote,\n IconBackgroundColor: BackgroundColor,\n IconGroup: Group,\n IconUngroup: Ungroup,\n IconBack: Back,\n IconNext: Next,\n IconFullwidth: Fullwidth,\n IconAlignTop: AlignTop,\n IconAlignLeft: AlignLeft,\n IconAlignRight: AlignRight,\n IconAlignBottom: AlignBottom,\n IconAlignVertically: AlignVertically,\n IconAlignHorizontally: AlignHorizontally,\n IconBringToFront: BringToFront,\n IconSendToBack: SendToBack,\n IconAlignTextLeft: AlignTextLeft,\n IconAlignTextRight: AlignTextRight,\n IconAlignTextCenter: AlignTextCenter,\n IconAlignTextBoth: AlignTextBoth,\n IconRowHeight: RowHeight,\n IconWrite: Write,\n IconInsertTable: InsertTable,\n IconAddText: AddText,\n IconFill: Fill,\n IconTailoring: Tailoring,\n IconEffects: Effects,\n IconColorFilter: ColorFilter,\n IconUp: Up,\n IconDown: Down,\n IconPlus: Plus,\n IconMinus: Minus,\n IconConnection: Connection,\n IconBringToFrontOne: BringToFrontOne,\n IconSentToBack: SentToBack,\n IconGithub: Github,\n IconChartProportion: ChartProportion,\n IconChartHistogram: ChartHistogram,\n IconChartHistogramOne: ChartHistogramOne,\n IconChartLineArea: ChartLineArea,\n IconChartRing: ChartRing,\n IconChartScatter: ChartScatter,\n IconChartLine: ChartLine,\n IconChartPie: ChartPie,\n IconText: Text,\n IconRotate: Rotate,\n IconLeftTwo: LeftTwo,\n IconRightTwo: RightTwo,\n IconPlatte: Platte,\n IconClose: Close,\n IconCloseSmall: CloseSmall,\n IconUndo: Undo,\n IconTransform: Transform,\n IconClick: Click,\n IconTheme: Theme,\n IconArrowCircleLeft: ArrowCircleLeft,\n IconGraphicDesign: GraphicDesign,\n IconLogout: Logout,\n IconErase: Erase,\n IconClear: Clear,\n IconAlignTextTopOne: AlignTextTopOne,\n IconAlignTextBottomOne: AlignTextBottomOne,\n IconAlignTextMiddleOne: AlignTextMiddleOne,\n IconPause: Pause,\n IconVolumeMute: VolumeMute,\n IconVolumeNotice: VolumeNotice,\n IconVolumeSmall: VolumeSmall,\n IconVideoTwo: VideoTwo,\n IconFormula: Formula,\n IconLinkOne: LinkOne,\n IconFullScreenOne: FullScreenOne,\n IconOffScreenOne: OffScreenOne,\n IconPower: Power,\n IconListView: ListView,\n IconMagic: Magic,\n IconHighLight: HighLight,\n IconDownload: Download,\n IconIndentLeft: IndentLeft,\n IconIndentRight: IndentRight,\n IconVerticalSpacingBetweenItems: VerticalSpacingBetweenItems,\n IconCopy: Copy,\n IconDelete: Delete,\n IconSquare: Square,\n IconRound: Round,\n IconNeedle: Needle,\n IconTextRotationNone: TextRotationNone,\n IconTextRotationDown: TextRotationDown,\n IconFormatBrush: FormatBrush,\n IconPreviewOpen: PreviewOpen,\n IconPreviewClose: PreviewClose,\n IconStopwatchStart: StopwatchStart,\n IconSearch: Search,\n IconLeft: Left,\n IconRight: Right,\n IconMoveOne: MoveOne,\n IconHamburgerButton: HamburgerButton,\n IconAttention: Attention,\n IconCheckOne: CheckOne,\n IconCloseOne: CloseOne,\n IconInfo: Info,\n}\n\nexport default {\n install(app: App) {\n for (const key of Object.keys(icons)) {\n app.component(key, icons[key])\n }\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Transition as _Transition, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2231702e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"id\"]\nconst _hoisted_2 = { class: \"icons\" }\nconst _hoisted_3 = { class: \"content\" }\nconst _hoisted_4 = {\n key: 0,\n class: \"title\"\n}\nconst _hoisted_5 = { class: \"description\" }\nconst _hoisted_6 = {\n key: 0,\n class: \"control\"\n}\n\nimport { onMounted, ref, onBeforeMount } from 'vue'\nimport { icons } from '@/plugins/icon'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Message',\n props: {\n id: {},\n message: {},\n type: { default: 'success' },\n title: { default: '' },\n duration: { default: 3000 },\n closable: { type: Boolean, default: false }\n },\n emits: [\"close\", \"destroy\"],\n setup(__props: any, { expose: __expose, emit: __emit }) {\n\nconst {\n IconAttention,\n IconCheckOne,\n IconCloseOne,\n IconInfo,\n IconCloseSmall,\n} = icons\n\nconst props = __props\n\nconst emit = __emit\n\nconst visible = ref(true)\nconst timer = ref(null)\n\nconst startTimer = () => {\n if (props.duration <= 0) return\n timer.value = setTimeout(close, props.duration)\n}\nconst clearTimer = () => {\n if (timer.value) clearTimeout(timer.value)\n}\n\nconst close = () => visible.value = false\n\nonBeforeMount(() => {\n clearTimer()\n})\nonMounted(() => {\n startTimer()\n})\n\n__expose({\n close,\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Transition, {\n name: \"message-fade\",\n appear: \"\",\n mode: \"in-out\",\n onBeforeLeave: _cache[3] || (_cache[3] = ($event: any) => (emit('close'))),\n onAfterLeave: _cache[4] || (_cache[4] = ($event: any) => (emit('destroy')))\n }, {\n default: _withCtx(() => [\n (visible.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"message\",\n id: _ctx.id\n }, [\n _createElementVNode(\"div\", {\n class: \"message-container\",\n onMouseenter: _cache[1] || (_cache[1] = ($event: any) => (clearTimer())),\n onMouseleave: _cache[2] || (_cache[2] = ($event: any) => (startTimer()))\n }, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_ctx.type === 'warning')\n ? (_openBlock(), _createBlock(_unref(IconAttention), {\n key: 0,\n theme: \"filled\",\n size: \"18\",\n fill: \"#faad14\"\n }))\n : _createCommentVNode(\"\", true),\n (_ctx.type === 'success')\n ? (_openBlock(), _createBlock(_unref(IconCheckOne), {\n key: 1,\n theme: \"filled\",\n size: \"18\",\n fill: \"#52c41a\"\n }))\n : _createCommentVNode(\"\", true),\n (_ctx.type === 'error')\n ? (_openBlock(), _createBlock(_unref(IconCloseOne), {\n key: 2,\n theme: \"filled\",\n size: \"18\",\n fill: \"#ff4d4f\"\n }))\n : _createCommentVNode(\"\", true),\n (_ctx.type === 'info')\n ? (_openBlock(), _createBlock(_unref(IconInfo), {\n key: 3,\n theme: \"filled\",\n size: \"18\",\n fill: \"#1677ff\"\n }))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n (_ctx.title)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, _toDisplayString(_ctx.title), 1))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_5, _toDisplayString(_ctx.message), 1)\n ]),\n (_ctx.closable)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n _createElementVNode(\"span\", {\n class: \"close-btn\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (close()))\n }, [\n _createVNode(_unref(IconCloseSmall))\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ], 32)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }))\n}\n}\n\n})","\n\n\n\n","import script from \"./Message.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Message.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Message.vue?vue&type=style&index=0&id=2231702e&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2231702e\"]])\n\nexport default __exports__","import { createVNode, render, type AppContext } from 'vue'\nimport MessageComponent from '@/components/Message.vue'\n\nexport interface MessageOptions {\n type?: 'info' | 'success' | 'warning' | 'error'\n title?: string\n message?: string\n duration?: number\n closable?: boolean\n ctx?: AppContext\n onClose?: () => void\n}\n\nexport type MessageTypeOptions = Omit\nexport interface MessageIntance {\n id: string\n close: () => void\n}\n\nexport type MessageFn = (message: string, options?: MessageTypeOptions) => MessageIntance\nexport interface Message {\n (options: MessageOptions): MessageIntance\n info: MessageFn\n success: MessageFn\n error: MessageFn\n warning: MessageFn\n closeAll: () => void\n _context?: AppContext | null\n}\n\nconst instances: MessageIntance[] = []\nlet wrap: HTMLDivElement | null = null\nlet seed = 0\nconst defaultOptions: MessageOptions = {\n duration: 3000,\n}\n\nconst message: Message = (options: MessageOptions) => {\n const id = 'message-' + seed++\n const props = {\n ...defaultOptions,\n ...options,\n id,\n }\n\n if (!wrap) {\n wrap = document.createElement('div')\n wrap.className = 'message-wrap'\n wrap.style.cssText = `\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 6000;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: 15px;\n background-color: rgba(255, 255, 255, 0);\n transition: all 1s ease-in-out;\n align-items: center;\n `\n document.body.appendChild(wrap)\n }\n\n const vm = createVNode(MessageComponent, props, null)\n const div = document.createElement('div')\n\n vm.appContext = options.ctx || message._context || null\n vm.props!.onClose = options.onClose\n vm.props!.onDestroy = () => {\n if (wrap && wrap.childNodes.length <= 1) {\n wrap.remove()\n wrap = null\n }\n render(null, div)\n }\n\n render(vm, div)\n wrap.appendChild(div.firstElementChild!)\n\n const instance = {\n id,\n close: () => vm?.component?.exposed?.close(),\n }\n\n instances.push(instance)\n return instance\n}\n\nmessage.success = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'success', message: msg })\nmessage.info = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'info', message: msg })\nmessage.warning = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'warning', message: msg })\nmessage.error = (msg: string, options?: MessageTypeOptions) => message({ ...options, type: 'error', message: msg })\n\nmessage.closeAll = function() {\n for (let i = instances.length - 1; i >= 0; i--) {\n instances[i].close()\n }\n}\n\nexport default message","/**\r\n * 将普通文本转为带段落信息的HTML字符串\r\n * @param text 文本\r\n */\r\nexport const parseText2Paragraphs = (text: string) => {\r\n const htmlText = text.replace(/[\\n\\r]+/g, '
')\r\n const paragraphs = htmlText.split('
')\r\n let string = ''\r\n for (const paragraph of paragraphs) {\r\n if (paragraph) string += `
${paragraph}
`\r\n }\r\n return string\r\n}","interface ImageSize {\n width: number\n height: number\n}\n\n/**\n * 获取图片的原始宽高\n * @param src 图片地址\n */\nexport const getImageSize = (src: string): Promise => {\n return new Promise(resolve => {\n const img = document.createElement('img')\n img.src = src\n img.style.opacity = '0'\n document.body.appendChild(img)\n\n img.onload = () => {\n const imgWidth = img.clientWidth\n const imgHeight = img.clientHeight\n \n img.onload = null\n img.onerror = null\n\n document.body.removeChild(img)\n\n resolve({ width: imgWidth, height: imgHeight })\n }\n\n img.onerror = () => {\n img.onload = null\n img.onerror = null\n }\n })\n}\n\n/**\n * 读取图片文件的dataURL\n * @param file 图片文件\n */\nexport const getImageDataURL = (file: File): Promise => {\n return new Promise(resolve => {\n const reader = new FileReader()\n reader.addEventListener('load', () => {\n resolve(reader.result as string)\n })\n reader.readAsDataURL(file)\n })\n}","export const VIEWPORT_SIZE = 1000","import type { BarChartOptions, LineChartOptions, PieChartOptions } from 'chartist'\n\nexport const enum ShapePathFormulasKeys {\n ROUND_RECT = 'roundRect',\n ROUND_RECT_DIAGONAL = 'roundRectDiagonal',\n ROUND_RECT_SINGLE = 'roundRectSingle',\n ROUND_RECT_SAMESIDE = 'roundRectSameSide',\n CUT_RECT_DIAGONAL = 'cutRectDiagonal',\n CUT_RECT_SINGLE = 'cutRectSingle',\n CUT_RECT_SAMESIDE = 'cutRectSameSide',\n CUT_ROUND_RECT = 'cutRoundRect',\n MESSAGE = 'message',\n ROUND_MESSAGE = 'roundMessage',\n L = 'L',\n RING_RECT = 'ringRect',\n PLUS = 'plus',\n TRIANGLE = 'triangle',\n PARALLELOGRAM_LEFT = 'parallelogramLeft',\n PARALLELOGRAM_RIGHT = 'parallelogramRight',\n TRAPEZOID = 'trapezoid',\n BULLET = 'bullet',\n INDICATOR = 'indicator',\n}\n\nexport const enum ElementTypes {\n TEXT = 'text',\n IMAGE = 'image',\n SHAPE = 'shape',\n LINE = 'line',\n CHART = 'chart',\n TABLE = 'table',\n LATEX = 'latex',\n VIDEO = 'video',\n AUDIO = 'audio',\n}\n\n/**\n * 元素阴影\n * \n * h: 水平偏移量\n * \n * v: 垂直偏移量\n * \n * blur: 模糊程度\n * \n * color: 阴影颜色\n */\nexport interface PPTElementShadow {\n h: number\n v: number\n blur: number\n color: string\n}\n\n/**\n * 元素边框\n * \n * style?: 边框样式(实线或虚线)\n * \n * width?: 边框宽度\n * \n * color?: 边框颜色\n */\nexport interface PPTElementOutline {\n style?: 'dashed' | 'solid'\n width?: number\n color?: string\n}\n\n/**\n * 元素超链接\n * \n * type: 链接类型(网页、幻灯片页面)\n * \n * target: 目标地址(网页链接、幻灯片页面ID)\n */\nexport interface PPTElementLink {\n type: 'web' | 'slide'\n target: string\n}\n\n\n/**\n * 元素通用属性\n * \n * id: 元素ID\n * \n * left: 元素水平方向位置(距离画布左侧)\n * \n * top: 元素垂直方向位置(距离画布顶部)\n * \n * lock?: 锁定元素\n * \n * groupId?: 组合ID(拥有相同组合ID的元素即为同一组合元素成员)\n * \n * width: 元素宽度\n * \n * height: 元素高度\n * \n * rotate: 旋转角度\n * \n * link?: 超链接\n * \n * name?: 元素名\n */\ninterface PPTBaseElement {\n id: string\n left: number\n top: number\n lock?: boolean\n groupId?: string\n width: number\n height: number\n rotate: number\n link?: PPTElementLink\n name?: string\n}\n\n\n/**\n * 文本元素\n * \n * type: 元素类型(text)\n * \n * content: 文本内容(HTML字符串)\n * \n * defaultFontName: 默认字体(会被文本内容中的HTML内联样式覆盖)\n * \n * defaultColor: 默认颜色(会被文本内容中的HTML内联样式覆盖)\n * \n * outline?: 边框\n * \n * fill?: 填充色\n * \n * lineHeight?: 行高(倍),默认1.5\n * \n * wordSpace?: 字间距,默认0\n * \n * opacity?: 不透明度,默认1\n * \n * shadow?: 阴影\n * \n * paragraphSpace?: 段间距,默认 5px\n * \n * vertical?: 竖向文本\n */\nexport interface PPTTextElement extends PPTBaseElement {\n type: 'text'\n content: string\n defaultFontName: string\n defaultColor: string\n outline?: PPTElementOutline\n fill?: string\n lineHeight?: number\n wordSpace?: number\n opacity?: number\n shadow?: PPTElementShadow\n paragraphSpace?: number\n vertical?: boolean\n}\n\n\n/**\n * 图片翻转、形状翻转\n * \n * flipH?: 水平翻转\n * \n * flipV?: 垂直翻转\n */\nexport interface ImageOrShapeFlip {\n flipH?: boolean\n flipV?: boolean\n}\n\n/**\n * 图片滤镜\n * \n * https://developer.mozilla.org/zh-CN/docs/Web/CSS/filter\n * \n * 'blur'?: 模糊,默认0(px)\n * \n * 'brightness'?: 亮度,默认100(%)\n * \n * 'contrast'?: 对比度,默认100(%)\n * \n * 'grayscale'?: 灰度,默认0(%)\n * \n * 'saturate'?: 饱和度,默认100(%)\n * \n * 'hue-rotate'?: 色相旋转,默认0(deg)\n * \n * 'opacity'?: 不透明度,默认100(%)\n */\nexport type ImageElementFilterKeys = 'blur' | 'brightness' | 'contrast' | 'grayscale' | 'saturate' | 'hue-rotate' | 'opacity'\nexport interface ImageElementFilters {\n 'blur'?: string\n 'brightness'?: string\n 'contrast'?: string\n 'grayscale'?: string\n 'saturate'?: string\n 'hue-rotate'?: string\n 'opacity'?: string\n}\n\nexport type ImageClipDataRange = [[number, number], [number, number]]\n\n/**\n * 图片裁剪\n * \n * range: 裁剪范围,例如:[[10, 10], [90, 90]] 表示裁取原图从左上角 10%, 10% 到 90%, 90% 的范围\n * \n * shape: 裁剪形状,见 configs/imageClip.ts CLIPPATHS \n */\nexport interface ImageElementClip {\n range: ImageClipDataRange\n shape: string\n}\n\n/**\n * 图片元素\n * \n * type: 元素类型(image)\n * \n * fixedRatio: 固定图片宽高比例\n * \n * src: 图片地址\n * \n * outline?: 边框\n * \n * filters?: 图片滤镜\n * \n * clip?: 裁剪信息\n * \n * flipH?: 水平翻转\n * \n * flipV?: 垂直翻转\n * \n * shadow?: 阴影\n */\nexport interface PPTImageElement extends PPTBaseElement {\n type: 'image'\n fixedRatio: boolean\n src: string\n outline?: PPTElementOutline\n filters?: ImageElementFilters\n clip?: ImageElementClip\n flipH?: boolean\n flipV?: boolean\n shadow?: PPTElementShadow\n colorMask?: string\n}\n\n\n/**\n * 形状渐变\n * \n * type: 渐变类型(径向、线性)\n * \n * color: 渐变颜色\n * \n * rotate: 渐变角度(线性渐变)\n */\nexport interface ShapeGradient {\n type: 'linear' | 'radial'\n color: [string, string]\n rotate: number\n}\n\nexport type ShapeTextAlign = 'top' | 'middle' | 'bottom' \n\n/**\n * 形状内文本\n * \n * content: 文本内容(HTML字符串)\n * \n * defaultFontName: 默认字体(会被文本内容中的HTML内联样式覆盖)\n * \n * defaultColor: 默认颜色(会被文本内容中的HTML内联样式覆盖)\n * \n * align: 文本对齐方向(垂直方向)\n */\nexport interface ShapeText {\n content: string\n defaultFontName: string\n defaultColor: string\n align: ShapeTextAlign\n}\n\n/**\n * 形状元素\n * \n * type: 元素类型(shape)\n * \n * viewBox: SVG的viewBox属性,例如 [1000, 1000] 表示 '0 0 1000 1000'\n * \n * path: 形状路径,SVG path 的 d 属性\n * \n * fixedRatio: 固定形状宽高比例\n * \n * fill: 填充,不存在渐变时生效\n * \n * gradient?: 渐变,该属性存在时将优先作为填充\n * \n * outline?: 边框\n * \n * opacity?: 不透明度\n * \n * flipH?: 水平翻转\n * \n * flipV?: 垂直翻转\n * \n * shadow?: 阴影\n * \n * special?: 特殊形状(标记一些难以解析的形状,例如路径使用了 L Q C A 以外的类型,该类形状在导出后将变为图片的形式)\n * \n * text?: 形状内文本\n * \n * pathFormula?: 形状路径计算公式\n * 一般情况下,形状的大小变化时仅由宽高基于 viewBox 的缩放比例来调整形状,而 viewBox 本身和 path 不会变化,\n * 但也有一些形状希望能更精确的控制一些关键点的位置,此时就需要提供路径计算公式,通过在缩放时更新 viewBox 并重新计算 path 来重新绘制形状\n * \n * keypoint?: 关键点位置百分比\n */\nexport interface PPTShapeElement extends PPTBaseElement {\n type: 'shape'\n viewBox: [number, number]\n path: string\n fixedRatio: boolean\n fill: string\n gradient?: ShapeGradient\n outline?: PPTElementOutline\n opacity?: number\n flipH?: boolean\n flipV?: boolean\n shadow?: PPTElementShadow\n special?: boolean\n text?: ShapeText\n pathFormula?: ShapePathFormulasKeys\n keypoint?: number\n}\n\n\nexport type LinePoint = '' | 'arrow' | 'dot' \n\n/**\n * 线条元素\n * \n * type: 元素类型(line)\n * \n * start: 起点位置([x, y])\n * \n * end: 终点位置([x, y])\n * \n * style: 线条样式(实线、虚线)\n * \n * color: 线条颜色\n * \n * points: 端点样式([起点样式, 终点样式],可选:无、箭头、圆点)\n * \n * shadow?: 阴影\n * \n * broken?: 折线控制点位置([x, y])\n * \n * curve?: 二次曲线控制点位置([x, y])\n * \n * cubic?: 三次曲线控制点位置([[x1, y1], [x2, y2]])\n */\nexport interface PPTLineElement extends Omit {\n type: 'line'\n start: [number, number]\n end: [number, number]\n style: 'solid' | 'dashed'\n color: string\n points: [LinePoint, LinePoint]\n shadow?: PPTElementShadow\n broken?: [number, number]\n curve?: [number, number]\n cubic?: [[number, number], [number, number]]\n}\n\n\nexport type PresetChartType = 'bar' | 'horizontalBar' | 'line' | 'area' | 'scatter' | 'pie' | 'ring'\nexport type ChartType = 'bar' | 'line' | 'pie'\nexport type ChartOptions = LineChartOptions & BarChartOptions & PieChartOptions\nexport interface ChartData {\n labels: string[]\n legends: string[]\n series: number[][]\n}\n\n/**\n * 图表元素\n * \n * type: 元素类型(chart)\n * \n * fill?: 填充色\n * \n * chartType: 图表基础类型(bar/line/pie),所有图表类型都是由这三种基本类型衍生而来\n * \n * data: 图表数据\n * \n * options?: 图表配置项\n * \n * outline?: 边框\n * \n * themeColor: 主题色\n * \n * gridColor?: 网格&坐标颜色\n * \n * legend?: 图例/位置\n */\nexport interface PPTChartElement extends PPTBaseElement {\n type: 'chart'\n fill?: string\n chartType: ChartType\n data: ChartData\n options?: ChartOptions\n outline?: PPTElementOutline\n themeColor: string[]\n gridColor?: string\n legend?: '' | 'top' | 'bottom'\n}\n\n\n/**\n * 表格单元格样式\n * \n * bold?: 加粗\n * \n * em?: 斜体\n * \n * underline?: 下划线\n * \n * strikethrough?: 删除线\n * \n * color?: 字体颜色\n * \n * backcolor?: 填充色\n * \n * fontsize?: 字体大小\n * \n * fontname?: 字体\n * \n * align?: 对齐方式\n */\nexport interface TableCellStyle {\n bold?: boolean\n em?: boolean\n underline?: boolean\n strikethrough?: boolean\n color?: string\n backcolor?: string\n fontsize?: string\n fontname?: string\n align?: 'left' | 'center' | 'right'\n}\n\n\n/**\n * 表格单元格\n * \n * id: 单元格ID\n * \n * colspan: 合并列数\n * \n * rowspan: 合并行数\n * \n * text: 文字内容\n * \n * style?: 单元格样式\n */\nexport interface TableCell {\n id: string\n colspan: number\n rowspan: number\n text: string\n style?: TableCellStyle\n}\n\n/**\n * 表格主题\n * \n * color: 主题色\n * \n * rowHeader: 标题行\n * \n * rowFooter: 汇总行\n * \n * colHeader: 第一列\n * \n * colFooter: 最后一列\n */\nexport interface TableTheme {\n color: string\n rowHeader: boolean\n rowFooter: boolean\n colHeader: boolean\n colFooter: boolean\n}\n\n/**\n * 表格元素\n * \n * type: 元素类型(table)\n * \n * outline: 边框\n * \n * theme?: 主题\n * \n * colWidths: 列宽数组,如[30, 50, 20]表示三列宽度分别为30%, 50%, 20%\n * \n * cellMinHeight: 单元格最小高度\n * \n * data: 表格数据\n */\nexport interface PPTTableElement extends PPTBaseElement {\n type: 'table'\n outline: PPTElementOutline\n theme?: TableTheme\n colWidths: number[]\n cellMinHeight: number\n data: TableCell[][]\n}\n\n\n/**\n * LaTeX元素(公式)\n * \n * type: 元素类型(latex)\n * \n * latex: latex代码\n * \n * path: svg path\n * \n * color: 颜色\n * \n * strokeWidth: 路径宽度\n * \n * viewBox: SVG的viewBox属性\n * \n * fixedRatio: 固定形状宽高比例\n */\nexport interface PPTLatexElement extends PPTBaseElement {\n type: 'latex'\n latex: string\n path: string\n color: string\n strokeWidth: number\n viewBox: [number, number]\n fixedRatio: boolean\n}\n\n/**\n * 视频元素\n * \n * type: 元素类型(video)\n * \n * src: 视频地址\n * \n * autoplay: 自动播放\n * \n * poster: 预览封面\n * \n * ext: 视频后缀,当资源链接缺少后缀时用该字段确认资源类型\n */\nexport interface PPTVideoElement extends PPTBaseElement {\n type: 'video'\n src: string\n autoplay: boolean\n poster?: string\n ext?: string\n}\n\n/**\n * 音频元素\n * \n * type: 元素类型(audio)\n * \n * fixedRatio: 固定图标宽高比例\n * \n * color: 图标颜色\n * \n * loop: 循环播放\n * \n * autoplay: 自动播放\n * \n * src: 音频地址\n * \n * ext: 音频后缀,当资源链接缺少后缀时用该字段确认资源类型\n */\nexport interface PPTAudioElement extends PPTBaseElement {\n type: 'audio'\n fixedRatio: boolean\n color: string\n loop: boolean\n autoplay: boolean\n src: string\n ext?: string\n}\n\n\nexport type PPTElement = PPTTextElement | PPTImageElement | PPTShapeElement | PPTLineElement | PPTChartElement | PPTTableElement | PPTLatexElement | PPTVideoElement | PPTAudioElement\n\n\n/**\n * 元素动画\n * \n * id: 动画id\n * \n * elId: 元素ID\n * \n * effect: 动画效果\n * \n * type: 动画类型(入场、退场、强调)\n * \n * duration: 动画持续时间\n * \n * trigger: 动画触发方式(click - 单击时、meantime - 与上一动画同时、auto - 上一动画之后)\n */\nexport interface PPTAnimation {\n id: string\n elId: string\n effect: string\n type: 'in' | 'out' | 'attention'\n duration: number\n trigger: 'click' | 'meantime' | 'auto'\n}\n\n/**\n * 幻灯片背景\n * \n * type: 背景类型(纯色、图片、渐变)\n * \n * color?: 背景颜色(纯色)\n * \n * image?: 图片地址(图片)\n * \n * imageSize?: 图片填充方式\n * \n * gradientType?: 渐变类型(线性、径向)\n * \n * gradientColor?: 渐变颜色\n * \n * gradientRotate?: 渐变角度(线性)\n */\nexport interface SlideBackground {\n type: 'solid' | 'image' | 'gradient'\n color?: string\n image?: string\n imageSize?: 'cover' | 'contain' | 'repeat'\n gradientType?: 'linear' | 'radial'\n gradientColor?: [string, string]\n gradientRotate?: number\n}\n\n\nexport type TurningMode = 'no' | 'fade' | 'slideX' | 'slideY' | 'random' | 'slideX3D' | 'slideY3D' | 'rotate' | 'scaleY' | 'scaleX' | 'scale' | 'scaleReverse'\n\n/**\n * 幻灯片页面\n * \n * id: 页面ID\n * \n * elements: 元素集合\n * \n * remark?: 备注\n * \n * background?: 页面背景\n * \n * animations?: 元素动画集合\n * \n * turningMode?: 翻页方式\n */\nexport interface Slide {\n id: string\n elements: PPTElement[]\n remark?: string\n background?: SlideBackground\n animations?: PPTAnimation[]\n turningMode?: TurningMode\n}\n\n/**\n * 幻灯片主题\n * \n * backgroundColor: 页面背景颜色\n * \n * themeColor: 主题色,用于默认创建的形状颜色等\n * \n * fontColor: 字体颜色\n * \n * fontName: 字体\n */\nexport interface SlideTheme {\n backgroundColor: string\n themeColor: string\n fontColor: string\n fontName: string\n outline: PPTElementOutline\n shadow: PPTElementShadow\n}\n","/* eslint-disable max-lines */\n\n// 非专业设计人士可以用该应用绘制基本形状:https://github.com/pipipi-pikachu/svgPathCreator\n\nimport { ShapePathFormulasKeys } from '@/types/slides'\n\nexport interface ShapePoolItem {\n viewBox: [number, number]\n path: string\n special?: boolean\n pathFormula?: ShapePathFormulasKeys\n outlined?: boolean\n pptxShapeType?: string\n title?: string\n}\n\ninterface ShapeListItem {\n type: string\n children: ShapePoolItem[]\n}\n\nexport const SHAPE_PATH_FORMULAS = {\n [ShapePathFormulasKeys.ROUND_RECT]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M ${radius} 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height - radius} Q ${width} ${height} ${width - radius} ${height} L ${radius} ${height} Q 0 ${height} 0 ${height - radius} L 0 ${radius} Q 0 0 ${radius} 0 Z`\n }\n },\n [ShapePathFormulasKeys.CUT_RECT_DIAGONAL]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${height - radius} L 0 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} L ${radius} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.CUT_RECT_SINGLE]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${height} L 0 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.CUT_RECT_SAMESIDE]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${radius} L ${radius} 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_RECT_DIAGONAL]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 1],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M ${radius} 0 L ${width} 0 L ${width} ${height - radius} Q ${width} ${height} ${width - radius} ${height} L 0 ${height} L 0 ${radius} Q 0 0 ${radius} 0 Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_RECT_SINGLE]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 1],\n relative: 'right',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height} L 0 ${height} L 0 0 Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_RECT_SAMESIDE]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M 0 ${radius} Q 0 0 ${radius} 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.CUT_ROUND_RECT]: {\n editable: true,\n defaultValue: 0.125,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const radius = Math.min(width, height) * value\n return `M ${radius} 0 L ${width - radius} 0 L ${width} ${radius} L ${width} ${height} L 0 ${height} L 0 ${radius} Q 0 0 ${radius} 0 Z`\n }\n },\n [ShapePathFormulasKeys.MESSAGE]: {\n formula: (width: number, height: number) => {\n const arrowWidth = width * 0.2\n const arrowheight = height * 0.2\n return `M 0 0 L ${width} 0 L ${width} ${height - arrowheight} L ${width / 2} ${height - arrowheight} L ${width / 2 - arrowWidth} ${height} L ${width / 2 - arrowWidth} ${height - arrowheight} L 0 ${height - arrowheight} Z`\n }\n },\n [ShapePathFormulasKeys.ROUND_MESSAGE]: {\n formula: (width: number, height: number) => {\n const radius = Math.min(width, height) * 0.125\n const arrowWidth = width * 0.2\n const arrowheight = height * 0.2\n return `M 0 ${radius} Q 0 0 ${radius} 0 L ${width - radius} 0 Q ${width} 0 ${width} ${radius} L ${width} ${height - radius - arrowheight} Q ${width} ${height - arrowheight} ${width - radius} ${height - arrowheight} L ${width / 2} ${height - arrowheight} L ${width / 2 - arrowWidth} ${height} L ${width / 2 - arrowWidth} ${height - arrowheight} L ${radius} ${height - arrowheight} Q 0 ${height - arrowheight} 0 ${height - radius - arrowheight} L 0 ${radius} Z`\n }\n },\n [ShapePathFormulasKeys.L]: {\n editable: true,\n defaultValue: 0.25,\n range: [0.1, 0.9],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const lineWidth = Math.min(width, height) * value\n return `M 0 0 L 0 ${height} L ${width} ${height} L ${width} ${height - lineWidth} L ${lineWidth} ${height - lineWidth} L ${lineWidth} 0 Z`\n }\n },\n [ShapePathFormulasKeys.RING_RECT]: {\n editable: true,\n defaultValue: 0.25,\n range: [0.1, 0.45],\n relative: 'left',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const lineWidth = Math.min(width, height) * value\n return `M 0 0 ${width} 0 ${width} ${height} L 0 ${height} L 0 0 Z M ${lineWidth} ${lineWidth} L ${lineWidth} ${height - lineWidth} L ${width - lineWidth} ${height - lineWidth} L ${width - lineWidth} ${lineWidth} Z`\n }\n },\n [ShapePathFormulasKeys.PLUS]: {\n editable: true,\n defaultValue: 0.25,\n range: [0.1, 0.9],\n relative: 'center',\n getBaseSize: (width: number, height: number) => Math.min(width, height),\n formula: (width: number, height: number, value: number) => {\n const lineWidth = Math.min(width, height) * value\n return `M ${width / 2 - lineWidth / 2} 0 L ${width / 2 - lineWidth / 2} ${height / 2 - lineWidth / 2} L 0 ${height / 2 - lineWidth / 2} L 0 ${height / 2 + lineWidth / 2} L ${width / 2 - lineWidth / 2} ${height / 2 + lineWidth / 2} L ${width / 2 - lineWidth / 2} ${height} L ${width / 2 + lineWidth / 2} ${height} L ${width / 2 + lineWidth / 2} ${height / 2 + lineWidth / 2} L ${width} ${height / 2 + lineWidth / 2} L ${width} ${height / 2 - lineWidth / 2} L ${width / 2 + lineWidth / 2} ${height / 2 - lineWidth / 2} L ${width / 2 + lineWidth / 2} 0 Z`\n }\n },\n [ShapePathFormulasKeys.TRIANGLE]: {\n editable: true,\n defaultValue: 0.5,\n range: [0, 1],\n relative: 'left',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const vertex = width * value\n return `M ${vertex} 0 L 0 ${height} L ${width} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.PARALLELOGRAM_LEFT]: {\n editable: true,\n defaultValue: 0.25,\n range: [0, 0.9],\n relative: 'left',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M ${point} 0 L ${width} 0 L ${width - point} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.PARALLELOGRAM_RIGHT]: {\n editable: true,\n defaultValue: 0.25,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M 0 0 L ${width - point} 0 L ${width} ${height} L ${point} ${height} Z`\n }\n },\n [ShapePathFormulasKeys.TRAPEZOID]: {\n editable: true,\n defaultValue: 0.25,\n range: [0, 0.5],\n relative: 'left',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M ${point} 0 L ${width - point} 0 L ${width} ${height} L 0 ${height} Z`\n }\n },\n [ShapePathFormulasKeys.BULLET]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 1],\n relative: 'top',\n getBaseSize: (width: number, height: number) => height,\n formula: (width: number, height: number, value: number) => {\n const point = height * value\n return `M ${width / 2} 0 L 0 ${point} L 0 ${height} L ${width} ${height} L ${width} ${point} Z`\n }\n },\n [ShapePathFormulasKeys.INDICATOR]: {\n editable: true,\n defaultValue: 0.2,\n range: [0, 0.9],\n relative: 'right',\n getBaseSize: (width: number) => width,\n formula: (width: number, height: number, value: number) => {\n const point = width * value\n return `M ${width} ${height / 2} L ${width - point} 0 L 0 0 L ${point} ${height / 2} L 0 ${height} L ${width - point} ${height} Z`\n }\n },\n}\n\nexport const SHAPE_LIST: ShapeListItem[] = [\n {\n type: '矩形',\n children: [\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n pptxShapeType: 'rect',\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 Q 200 0 200 50 L 200 150 Q 200 200 150 200 L 50 200 Q 0 200 0 150 L 0 50 Q 0 0 50 0 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT,\n pptxShapeType: 'roundRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z',\n pathFormula: ShapePathFormulasKeys.CUT_RECT_SINGLE,\n pptxShapeType: 'snip1Rect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z',\n pathFormula: ShapePathFormulasKeys.CUT_RECT_SAMESIDE,\n pptxShapeType: 'snip2SameRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z',\n pathFormula: ShapePathFormulasKeys.CUT_RECT_DIAGONAL,\n pptxShapeType: 'snip2DiagRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Q 0 0 50 0 Z',\n pathFormula: ShapePathFormulasKeys.CUT_ROUND_RECT,\n pptxShapeType: 'snipRoundRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 0 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT_SINGLE,\n pptxShapeType: 'round1Rect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT_SAMESIDE,\n pptxShapeType: 'round2SameRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 200 0 L 200 150 Q 200 200 150 200 L 0 200 L 0 50 Q 0 0 50 0 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_RECT_DIAGONAL,\n pptxShapeType: 'round2DiagRect',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 80 L 60 0 L 100 40 L 180 20 L 200 120 L 160 200 L 0 200 L 60 140 Z',\n title: '任意多边形',\n },\n ]\n },\n\n {\n type: '常用形状',\n children: [\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',\n pptxShapeType: 'ellipse',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 200 L 200 200 L 100 0 Z',\n pathFormula: ShapePathFormulasKeys.TRIANGLE,\n pptxShapeType: 'triangle',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 70 20 L 0 160 Q 0 200 40 200 L 160 200 Q 200 200 200 160 L 130 20 Q 100 -20 70 20 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z',\n pathFormula: ShapePathFormulasKeys.PARALLELOGRAM_LEFT,\n pptxShapeType: 'parallelogram',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z',\n pathFormula: ShapePathFormulasKeys.PARALLELOGRAM_RIGHT,\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z',\n pathFormula: ShapePathFormulasKeys.TRAPEZOID,\n pptxShapeType: 'trapezoid',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z',\n pptxShapeType: 'diamond',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z',\n pathFormula: ShapePathFormulasKeys.BULLET,\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z',\n pathFormula: ShapePathFormulasKeys.INDICATOR,\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 C 80 20 120 20 200 0 C 180 80 180 120 200 200 C 80 180 120 180 0 200 C 20 120 20 80 0 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 10 10 C 60 0 140 0 190 10 C 200 60 200 140 190 190 C 140 200 60 200 10 190 C 0 140 0 60 10 10 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 40 20 A 100 100 0 1 0 200 100 L 100 100 L 40 20 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z',\n pptxShapeType: 'pie',\n },\n {\n viewBox: [200, 200],\n path: 'M 160 20 A 100 100 0 1 0 200 100 L 100 100 L 160 20 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z',\n pptxShapeType: 'chord',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z',\n pptxShapeType: 'teardrop',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 90 L 50 200 L 150 200 L 200 90 L 100 0 Z',\n pptxShapeType: 'pentagon',\n },\n {\n viewBox: [200, 200],\n path: 'M 40 0 L 160 0 L 200 100 L 160 200 L 40 200 L 0 100 Z',\n pptxShapeType: 'hexagon',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z',\n pptxShapeType: 'octagon',\n },\n {\n viewBox: [200, 200],\n path: 'M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 A 25 50 0 1 0 50 200 L 150 200 A 25 50 0 1 0 150 0 L 50 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z',\n pathFormula: ShapePathFormulasKeys.L\n },\n {\n viewBox: [200, 200],\n path: 'M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z',\n pathFormula: ShapePathFormulasKeys.RING_RECT,\n },\n {\n viewBox: [200, 200],\n path: 'M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z',\n pathFormula: ShapePathFormulasKeys.PLUS,\n },\n {\n viewBox: [200, 200],\n path: 'M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 Z',\n pathFormula: ShapePathFormulasKeys.MESSAGE,\n },\n {\n viewBox: [200, 200],\n path: 'M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z',\n pathFormula: ShapePathFormulasKeys.ROUND_MESSAGE,\n },\n {\n viewBox: [200, 200],\n path: 'M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 Q 0 50 0 175 Q 100 225 200 175 Q 200 50 100 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 A 50 50 0 1 1 200 100 L 100 200 L 0 100 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 120 80 L 200 100 L 120 120 L 100 200 L 80 120 L 0 100 L 80 80 L 100 0 Z',\n pptxShapeType: 'star4',\n },\n {\n viewBox: [1024, 1024],\n path: 'M1018.67652554 400.05983681l-382.95318779-5.89158658L512 34.78141155 388.27666225 394.16825023l-382.95318779 5.89158658L311.68602415 629.83174977l-117.83174978 365.27842665 312.25413766-223.88032637 312.25413904 223.88032637-117.83175116-365.27842665 318.14572563-229.77191296z',\n pptxShapeType: 'star5',\n special: true,\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 60 60 L 0 100 L 60 140 L 100 200 L 140 140 L 200 100 L 140 60 L 100 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 140 60 L 200 60 L 160 100 L 200 140 L 140 140 L 100 200 L 60 140 L 0 140 L 40 100 L 0 60 L 60 60 L 100 0 Z',\n pptxShapeType: 'star6',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 80 40 L 20 20 L 40 80 L 0 100 L 40 120 L 20 180 L 80 160 L 100 200 L 120 160 L 180 180 L 160 120 L 200 100 L 160 80 L 180 20 L 120 40 L 100 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 C 80 40 80 160 200 200 C -60 200 -60 0 200 0 Z',\n },\n ],\n },\n \n {\n type: '箭头',\n children: [\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 100 L 50 100 L 50 200 L 150 200 L 150 100 L 200 100 L 100 0 Z',\n pptxShapeType: 'upArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 200 L 200 100 L 150 100 L 150 0 L 50 0 L 50 100 L 0 100 L 100 200 Z',\n pptxShapeType: 'downArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 100 0 L 100 50 L 200 50 L 200 150 L 100 150 L 100 200 L 0 100 Z',\n pptxShapeType: 'leftArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 100 0 L 100 50 L 0 50 L 0 150 L 100 150 L 100 200 L 200 100 Z',\n pptxShapeType: 'rightArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 0 60 L 60 60 L 60 140 L 0 140 L 100 200 L 200 140 L 140 140 L 140 60 L 200 60 L 100 0 Z',\n pptxShapeType: 'upDownArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 60 0 L 60 60 L 140 60 L 140 0 L 200 100 L 140 200 L 140 140 L 60 140 L 60 200 L 0 100 Z',\n pptxShapeType: 'leftRightArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 100 0 L 60 40 L 80 40 L 80 80 L 40 80 L 40 60 L 0 100 L 40 140 L 40 120 L 80 120 L 80 160 L 60 160 L 100 200 L 140 160 L 120 160 L 120 120 L 160 120 L 160 140 L 200 100 L 160 60 L 160 80 L 120 80 L 120 40 L 140 40 L 100 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 100 0 L 100 50 L 200 50 L 150 100 L 200 150 L 100 150 L 100 200 L 0 100 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 100 0 L 100 50 L 0 50 L 50 100 L 0 150 L 100 150 L 100 200 L 200 100 Z',\n pptxShapeType: 'notchedRightArrow',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 100 L 80 20 L 80 80 L 120 80 L 120 0 L 200 0 L 200 200 L 120 200 L 120 120 L 80 120 L 80 180 L 0 100 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 100 L 120 20 L 120 80 L 80 80 L 80 0 L 0 0 L 0 200 L 80 200 L 80 120 L 120 120 L 120 180 L 200 100 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 120 0 L 200 100 L 120 200 L 0 200 L 80 100 L 0 0 Z',\n pptxShapeType: 'chevron',\n },\n {\n viewBox: [200, 200],\n path: 'M 80 0 L 200 0 L 120 100 L 200 200 L 80 200 L 0 100 L 80 0 Z',\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 140 0 L 200 100 L 140 200 L 0 200 L 0 100 L 0 0 Z',\n pptxShapeType: 'homePlate',\n },\n {\n viewBox: [200, 200],\n path: 'M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 200 100 L 0 200 L 60 100 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 0 100 L 200 200 L 140 100 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 0 L 80 0 L 200 100 L 80 200 L 0 200 L 120 100 L 0 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 200 0 L 120 0 L 0 100 L 120 200 L 200 200 L 80 100 L 200 0 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 L 180 200 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 160 L 0 160 L 0 200 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 0 200 L 0 20 L 160 20 L 160 0 L 200 40 L 160 80 L 160 60 L 40 60 L 40 200 L 0 200 Z'\n },\n {\n viewBox: [200, 200],\n path: 'M 40 180 L 180 180 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 140 L 40 140 L 40 120 L 0 160 L 40 200 L 40 180 Z'\n },\n {\n viewBox: [1024, 1024],\n path: 'M398.208 302.912V64L0 482.112l398.208 418.176V655.36c284.48 0 483.584 95.552 625.792 304.64-56.896-298.688-227.584-597.312-625.792-657.088z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M625.792 302.912V64L1024 482.112l-398.208 418.176V655.36C341.312 655.36 142.208 750.912 0 960c56.896-298.688 227.584-597.312 625.792-657.088z',\n special: true,\n },\n ],\n },\n\n {\n type: '其他形状',\n children: [\n {\n viewBox: [1024, 1024],\n path: 'M995.336 243.4016c-15.7584-36.5736-38.3376-69.26639999-66.91440001-97.37280001-28.5768-27.98879999-61.73999999-49.8624-98.78399999-65.26799998-38.22-15.876-78.6744-23.8728-120.4224-23.87280001-57.97680001 0-114.5424 15.876-163.69919999 45.864-11.76 7.17360001-22.932 15.05279999-33.51600001 23.63760001-10.584-8.5848-21.75600001-16.46400001-33.51600001-23.63760001-49.1568-29.98799999-105.7224-45.86399999-163.69919999-45.864-41.74799999 0-82.2024 7.9968-120.4224 23.87280001-36.9264 15.28799999-70.2072 37.27919999-98.78399999 65.26799998-28.6944 28.10640001-51.156 60.79919999-66.91440001 97.37280001-16.34639999 37.9848-24.696 78.3216-24.696 119.83439999 0 39.1608 7.9968 79.96800001 23.8728 121.48080001 13.28880001 34.692 32.34000001 70.67760001 56.6832 107.016 38.57279999 57.5064 91.61040001 117.4824 157.4664 178.28160001 109.1328 100.78319999 217.2072 170.4024 221.79359999 173.22479998l27.87120001 17.8752c12.348 7.8792 28.224 7.8792 40.572 0l27.87119999-17.8752c4.58639999-2.94 112.54319999-72.44159999 221.79360001-173.22479998 65.85599999-60.79919999 118.89359999-120.7752 157.4664-178.28160001 24.3432-36.33839999 43.512-72.324 56.68319999-107.016 15.876-41.5128 23.8728-82.32 23.87280001-121.48080001 0.1176-41.5128-8.232-81.8496-24.5784-119.83439999z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M985.20746667 343.50079998l-303.32586667-44.08319999L546.28693333 24.5248c-3.70346666-7.5264-9.79626667-13.6192-17.32266665-17.32266668-18.87573334-9.3184-41.81333333-1.55306667-51.25120001 17.32266668L342.1184 299.41759999l-303.32586667 44.08319999c-8.36266667 1.19466667-16.00853333 5.13706667-21.8624 11.11040001-14.69440001 15.17226667-14.45546667 39.30453334 0.71679999 54.1184l219.46026668 213.9648-51.84853333 302.1312c-1.43359999 8.24320001-0.11946667 16.8448 3.82293333 24.25173333 9.79626667 18.6368 32.9728 25.92426667 51.6096 16.00853334L512 822.44266665l271.3088 142.64320001c7.40693333 3.9424 16.00853333 5.25653333 24.25173333 3.82293333 20.78719999-3.584 34.7648-23.296 31.1808-44.0832l-51.84853333-302.1312 219.46026668-213.9648c5.97333334-5.85386666 9.91573333-13.49973334 11.11039999-21.8624 3.2256-20.90666667-11.34933333-40.26026667-32.256-43.36640001z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M852.65066667 405.84533333C800.54044445 268.40177778 667.76177778 170.66666667 512.22755555 170.66666667S223.91466667 268.288 171.80444445 405.73155555C74.29688889 431.33155555 2.27555555 520.07822222 2.27555555 625.77777778c0 125.72444445 101.83111111 227.55555555 227.44177778 227.55555555h564.56533334C919.89333333 853.33333333 1021.72444445 751.50222222 1021.72444445 625.77777778c0-105.472-71.79377778-194.21866667-169.07377778-219.93244445z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M926.25224691 323.7371485H654.6457886L898.88200917 15.14388241c5.05486373-6.53433603 0.49315743-16.02761669-7.76722963-16.02761668H418.30008701c-3.45210206 0-6.78091476 1.84934039-8.50696579 4.93157436L90.35039154 555.76772251c-3.82197013 6.53433603 0.86302552 14.7947231 8.50696578 14.79472311h215.01664245l-110.22068713 440.88274851c-2.34249783 9.61657002 9.24670194 16.39748478 16.39748477 9.49328065L933.03316167 340.62779071c6.41104668-6.0411786 2.09591911-16.8906422-6.78091476-16.89064221z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M878.47822222 463.30311111c-22.18666667-49.83466667-53.93066667-93.98044445-94.32177777-131.072l-33.10933334-30.37866666c-4.89244445-4.32355555-12.62933333-2.38933333-14.79111111 3.75466666l-14.79111111 42.43911111c-9.216 26.624-26.16888889 53.81688889-50.176 80.55466667-1.59288889 1.70666667-3.41333333 2.16177778-4.66488889 2.27555556-1.25155555 0.11377778-3.18577778-0.11377778-4.89244445-1.70666667-1.59288889-1.36533333-2.38933333-3.41333333-2.27555555-5.46133333 4.20977778-68.49422222-16.27022222-145.74933333-61.09866667-229.83111112C561.26577778 124.01777778 509.72444445 69.51822222 445.32622222 31.51644445l-46.99022222-27.648c-6.144-3.64088889-13.99466667 1.13777778-13.65333333 8.30577777l2.50311111 54.61333333c1.70666667 37.31911111-2.61688889 70.31466667-12.85688889 97.73511112-12.51555555 33.56444445-30.49244445 64.73955555-53.47555556 92.72888888-16.15644445 19.56977778-34.24711111 37.20533333-54.04444444 52.45155556-47.90044445 36.75022222-87.38133333 84.65066667-114.11911111 138.24C125.72444445 502.10133333 111.50222222 562.74488889 111.50222222 623.50222222c0 53.70311111 10.58133333 105.69955555 31.51644445 154.73777778 20.25244445 47.21777778 49.152 89.77066667 85.90222222 126.17955555 36.864 36.40888889 79.64444445 65.08088889 127.31733333 84.992C405.61777778 1010.11911111 457.95555555 1020.58666667 512 1020.58666667s106.38222222-10.46755555 155.76177778-31.06133334c47.67288889-19.91111111 90.56711111-48.46933333 127.31733333-84.992 36.864-36.40888889 65.76355555-78.96177778 85.90222222-126.17955555 20.93511111-49.03822222 31.51644445-101.03466667 31.51644445-154.73777778 0-55.52355555-11.37777778-109.45422222-34.01955556-160.31288889z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M968.20337778 20.11591112H705.44042667c-22.17301333 0-41.92483556 15.16430222-47.14951111 37.33731555C642.36202666 124.73685332 582.08711111 173.03324444 512 173.03324444s-130.36202666-48.29639112-146.29091556-115.58001777c-5.22467555-22.17301333-24.84906667-37.33731556-47.14951111-37.33731555H55.79662222c-30.96576 0-56.06968889 25.10392889-56.06968888 56.06968888v321.12639999c0 30.96576 25.10392889 56.06968889 56.06968888 56.06968889h95.57333334v494.43271112c0 30.96576 25.10392889 56.06968889 56.06968889 56.06968888h609.1207111c30.96576 0 56.06968889-25.10392889 56.06968889-56.06968888V453.38168888h95.57333334c30.96576 0 56.06968889-25.10392889 56.06968888-56.06968889V76.1856c0-30.96576-25.10392889-56.06968889-56.06968888-56.06968888z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.94648889 239.80714666H523.46880001L373.99210666 96.82944c-1.91146667-1.78403556-4.46008889-2.80348444-7.00871111-2.80348445H43.05351111c-22.55530667 0-40.77795555 18.22264888-40.77795555 40.77795557v754.39217776c0 22.55530667 18.22264888 40.77795555 40.77795555 40.77795557h937.89297778c22.55530667 0 40.77795555-18.22264888 40.77795555-40.77795557V280.58510222c0-22.55530667-18.22264888-40.77795555-40.77795555-40.77795556z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M972.60904597 164.57058577L841.30587843 33.39070759c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480282-29.3428675-26.75379095 0-51.90482023 10.47959553-70.76809219 29.3428675L558.60337778 174.68031322c-18.86327195 18.86327195-29.34286748 44.1375906-29.34286749 70.64480283 0 26.75379095 10.47959553 51.90482023 29.34286749 70.76809218l103.31648301 103.31648302c-24.28800376 53.50758189-57.69942011 101.59043198-99.24793416 143.13894603-41.42522469 41.67180341-89.63136414 75.08321976-143.13894603 99.61780223L316.21649759 558.84995649c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480283-29.34286747-26.75379095 0-51.90482023 10.47959553-70.76809217 29.34286747L33.39070759 700.01627278c-18.86327195 18.86327195-29.34286748 44.1375906-29.3428675 70.76809217 0 26.75379095 10.47959553 51.90482023 29.3428675 70.76809219l131.05658883 131.05658883c30.08260365 30.205893 71.63111769 47.34311394 114.28923598 47.34311394 9.00012323 0 17.63037836-0.73973616 26.13734414-2.21920846 166.19405621-27.37023774 331.03192945-115.76870829 464.06114804-248.67463751C901.84095379 636.27567408 990.11613498 471.56109018 1017.85624079 304.87387654c8.38367642-50.91850535-8.50696579-103.31648302-45.24719482-140.30329077z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M910.60451556 640.96028445c-20.38897778-65.49959112-43.83630221-120.54983112-79.89930667-210.64362666C836.31217778 193.67708444 737.93535999 2.27555556 511.36284444 2.27555556 282.24170667 2.27555556 186.03121778 197.50001778 192.14791111 430.31665779c-36.19043555 90.22122667-59.51032888 144.88917333-79.89930667 210.64362666-43.32657778 139.53706668-29.30915556 197.26336001-18.60494222 198.53767111 22.9376 2.80348444 89.32920888-105.00323556 89.32920889-105.00323556 0 62.44124445 32.11264001 143.86972444 101.69002667 202.61546667-33.64181333 10.32192-109.20846222 38.10190221-91.24067556 68.55793777 14.52714667 24.59420444 250.01984 15.67402668 317.94062222 8.02816 67.92078222 7.64586667 303.41347556 16.56604444 317.94062223-8.02816 17.96778667-30.32860444-57.72629333-58.23601779-91.24067555-68.55793777 69.57738667-58.87317334 101.69002667-140.30165333 101.69002667-202.61546667 0 0 66.39160889 107.80672 89.32920888 105.00323556 10.83164445-1.40174222 24.84906667-59.12803556-18.47751111-198.53767111z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1016.86992592 199.24764445c-37.13706667 16.01991111-77.55093333 27.54939259-119.17842962 32.03982222 42.96248889-25.60758518 75.60912592-66.02145185 91.02222222-114.08118519-39.68568889 23.66577778-84.58998518 41.02068148-131.31472593 50.00154074C819.53374815 126.79395555 765.76995555 101.79318518 706.18074075 101.79318518c-114.688 0-206.92385185 92.96402963-206.92385186 207.04521482 0 16.01991111 1.94180741 32.03982222 5.09724444 47.45291852-171.72859259-8.98085925-324.88865185-91.02222222-426.71217778-216.63288889-17.96171852 30.82619259-28.15620741 66.02145185-28.1562074 104.49351112 0 71.84687408 36.53025185 135.19834075 92.23585185 172.45677036-33.98162963-1.33499259-66.02145185-10.92266667-93.57084445-26.33576296v2.54862222c0 100.6098963 71.1186963 183.98625185 165.90317037 203.1616-17.3549037 4.49042963-35.92343703 7.03905185-54.49197037 7.03905185-13.47128889 0-26.2144-1.33499259-39.07887407-3.15543704C146.69748148 681.90814815 223.03478518 741.49736297 313.93564445 743.43917037c-71.1186963 55.7056-160.19911111 88.4736-256.9253926 88.4736-17.3549037 0-33.37481482-0.60681482-50.00154074-2.54862222C98.75911111 888.22518518 207.62168889 922.20681482 324.85831111 922.20681482 705.45256297 922.20681482 913.71140741 606.90583703 913.71140741 333.23235555c0-8.98085925 0-17.96171852-0.60681482-26.94257777 40.2925037-29.4912 75.60912592-66.02145185 103.76533333-107.04213333z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M917.96720197 1.08889505H106.03279803C53.56084718 1.08889505 9.37393998 45.27580225 9.37393998 97.74775309v5.52336372c0 19.33177108 8.28504494 41.42522469 22.0934536 55.23363205l331.40179753 392.15879462v325.87843379c0 16.57008987 8.28504494 30.37849854 22.09345359 35.90186098l209.88780469 104.94390299 2.76168121 2.76168121c27.61681602 11.04672615 55.23363335-8.28504494 55.23363335-38.66354218V550.66354348l331.40179753-392.15879462c35.90186097-41.42522469 30.37849854-102.18222047-11.04672616-135.32240022-11.04672615-13.80840865-33.14017975-22.0934536-55.23363335-22.09345359z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M491.70164031 97.48884502a25.89076502 25.89076502 0 0 1 40.59671938 0L745.66415762 367.01171317a25.89076502 25.89076502 0 0 0 30.49932208 7.72839349l208.00640948-89.14190458a25.89076502 25.89076502 0 0 1 35.56096592 29.06238339l-115.18801541 554.96855704A103.56306132 103.56306132 0 0 1 803.14165689 952.14301275H220.85834311a103.56306132 103.56306132 0 0 1-101.4011828-82.51387024l-115.18801541-554.96855704a25.89076502 25.89076502 0 0 1 35.54802012-29.06238339l208.01935528 89.14190458a25.89076502 25.89076502 0 0 0 30.49932208-7.72839349l213.36579793-269.52286815z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M643.02466884 387.7801525c19.85376751-88.69205333 33.718272-152.84087467 41.61900049-192.57389433C704.52292267 95.17283515 652.90057916 2.27555515 550.58614084 2.27555515c-92.26012484 0-138.59407685 45.84971417-165.91530666 137.49816969l-0.70087152 2.67605334c-16.40038399 74.13942085-41.47882668 131.61085116-74.6746315 172.73287031a189.06953915 189.06953915 0 0 1-143.04142182 70.44391902l-26.17434983 0.5606965C77.66380049 387.52529067 27.76177817 438.90551468 27.76177817 501.84374084V881.55022182c0 77.4144 62.25009818 140.17422182 139.05282766 140.17422303h492.82707951c101.23127467 0 191.59267516-63.995904 225.93535999-159.98976l102.37815468-286.22301868c26.04691951-72.82688-11.39234134-153.15945284-83.63303784-179.42300483a138.04612267 138.04612267 0 0 0-47.17499733-8.30850884H643.02466884z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 512c140.82958222 0 254.86222222-114.03264 254.86222222-254.86222222S652.82958222 2.27555555 512 2.27555555a254.78940445 254.78940445 0 0 0-254.86222222 254.86222223C257.13777778 397.96736 371.17041778 512 512 512z m0 72.81777778c-170.10232889 0-509.72444445 97.57582222-509.72444445 291.27111111v145.63555556h1019.4488889v-145.63555556c0-193.69528889-339.62211555-291.27111111-509.72444445-291.27111111z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1019.81297778 564.50161779l-138.89991111-472.51456c-8.66531556-25.99594668-29.43658667-43.45400889-57.21656889-43.45400891s-50.33528889 15.67402668-59.00060446 41.66997334l-92.00526221 274.48661334H351.69166222L259.6864 90.33045333c-8.66531556-25.99594668-31.22062222-41.66997333-59.00060444-41.66997332s-50.33528889 17.33063112-57.2165689 43.45400887L4.69674667 564.50161779c-5.22467555 17.33063112 1.78403556 36.44529778 15.67402667 46.89464887l491.11950221 368.27591113 492.77610666-368.27591113c13.76256-10.32192 20.77127111-29.43658667 15.54659557-46.89464887z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M927.78951111 340.39277037c-12.01493333-47.81700741 12.01493333-124.03294815 89.08041481-150.97552592l-82.40545184-4.36906667s-31.19028148-109.22666667-174.27721483-118.9357037c-143.08693333-9.8304-236.65777778-3.64088889-236.65777777-3.6408889s106.07122963 67.47780741 63.5941926 187.74850371c-31.06891852 63.71555555-79.85682963 116.02299259-132.04290371 175.61220741-1.57771852 1.57771852-3.03407408 3.15543703-4.2477037 4.49042962C278.25493333 624.86755555 7.13007408 934.34311111 7.13007408 934.34311111c298.43152592 78.15774815 498.43768889-7.64586667 616.76657777-110.56165926 24.87940741-0.24272592 43.5693037-0.36408889 56.19105185-0.36408888 164.8109037 0 304.13558518-142.72284445 298.43152593-301.4656-3.88361482-109.1053037-38.71478518-133.74198518-50.72971852-181.5589926z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M997.8886764 504.17210418L537.2729208 43.89182982c-13.97838539-13.97838539-36.56745619-13.97838539-50.5458416 0L26.1113236 504.17210418c-13.41924998 13.41924998-21.02349164 31.64706454-21.02349163 50.65766867 0 39.47496036 32.09437288 71.56933323 71.56933324 71.56933323h48.53295408V954.83524937c0 19.79339373 15.99127289 35.78466661 35.78466663 35.78466662H440.43066677V740.12724968h125.24633315v250.49266631h297.34821416c19.79339373 0 35.78466661-15.99127289 35.78466663-35.78466662V626.39910608h48.53295408c19.01060414 0 37.23841869-7.49241457 50.65766869-21.02349163 27.84494371-27.95677079 27.84494371-73.24673948-0.11182708-101.20351027z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1009.13013121 349.27572283L674.72427717 14.86986879c-8.82158299-8.82158299-20.35749924-13.16451618-31.89341544-13.16451618s-23.07183245 4.34293316-31.89341547 13.16451618L392.29790453 233.6451272c-16.5574327-1.90003326-33.25058207-2.71433322-49.94373146-2.71433324-99.34459624 0-198.68919249 32.70771543-280.25490606 98.12314628-20.90036589 16.69314938-22.52896582 48.04369819-3.66434987 67.04403081l246.59717401 246.59717401-292.33368895 292.06225564c-3.52863319 3.52863319-5.83581644 8.27871636-6.24296642 13.30023282l-4.61436649 50.48659809c-1.22144996 12.75736619 8.95729967 23.6146991 21.57894918 23.6146991 0.6785833 0 1.35716662 0 2.03574992-0.13571666l50.48659809-4.61436649c5.02151649-0.40714999 9.77159962-2.71433322 13.30023282-6.24296643l292.33368896-292.33368896 246.59717402 246.59717401c8.82158299 8.82158299 20.35749924 13.16451618 31.89341544 13.16451618 13.16451618 0 26.19331567-5.70009979 35.15061536-16.82886604 76.40848044-95.40881307 108.16617924-214.83947521 95.27309638-330.33435417l218.63954175-218.63954173c17.50744934-17.37173267 17.50744934-45.8722316 0-63.51539759z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M976.62005979 160.47737905c-0.39452595-0.39452595-80.35178503 78.64217259-239.47725131 237.50462156l-111.6508437-111.65084369 237.89914752-237.89914752c-125.19623464-75.35445635-286.03131335-56.02268482-390.31767264 48.26367449-81.92988882 81.92988882-112.57140424 200.15616502-83.37648398 310.09739626l2.36715569 8.81107954-372.82702222 372.69551356c-8.15353628 8.15353628-8.15353628 21.56741857 0 29.72095487l185.95323084 185.95323084c8.15353628 8.15353628 21.56741857 8.15353628 29.72095485 0l372.56400493-372.56400493 8.81107953 2.3671557c110.07273989 29.32642892 228.29901608-1.18357785 310.36041356-83.24497533 104.41786795-104.2863593 123.74963948-265.12143802 49.97328693-390.05465535z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m220.16 343.26755556l-239.616 332.23111111c-14.44977778 20.13866667-44.37333333 20.13866667-58.82311111 0L291.84 481.16622222c-4.32355555-6.03022222 0-14.44977778 7.39555555-14.44977777h53.36177778c11.60533333 0 22.64177778 5.57511111 29.46844445 15.13244444l81.00977777 112.41244444 178.85866667-248.03555555c6.82666667-9.44355555 17.74933333-15.13244445 29.46844445-15.13244445H724.76444445c7.39555555 0 11.71911111 8.41955555 7.39555555 14.44977778z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h418.70222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m188.18844445 703.37422223l-75.09333334-0.34133333L512 570.48177778l-112.98133333 134.71288889-75.20711112 0.34133333c-5.00622222 0-9.10222222-3.98222222-9.10222222-9.10222222 0-2.16177778 0.79644445-4.20977778 2.16177778-5.91644445l148.02488889-176.35555555L316.87111111 337.92c-1.36533333-1.70666667-2.16177778-3.75466667-2.16177778-5.91644445 0-5.00622222 4.096-9.10222222 9.10222222-9.10222222l75.20711112 0.34133334L512 458.06933333l112.98133333-134.71288888 75.09333334-0.34133334c5.00622222 0 9.10222222 3.98222222 9.10222222 9.10222222 0 2.16177778-0.79644445 4.20977778-2.16177778 5.91644445L559.21777778 514.27555555l147.91111111 176.35555556c1.36533333 1.70666667 2.16177778 3.75466667 2.16177778 5.91644444 0 5.00622222-4.096 9.10222222-9.10222222 9.10222223z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H548.40888889v172.94222222c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222h-54.61333334c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V548.40888889H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h172.94222222V302.64888889c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h54.61333334c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v172.94222222h172.94222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m163.95377778 517.57511112L427.46311111 700.64355555c-1.59288889 1.13777778-3.41333333 1.70666667-5.34755556 1.70666667-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V331.88977778c0-1.93422222 0.56888889-3.75466667 1.70666667-5.34755556 2.95822222-4.096 8.64711111-5.00622222 12.74311111-2.048L675.95377778 505.17333333c0.79644445 0.56888889 1.47911111 1.25155555 2.048 2.048 2.95822222 3.98222222 2.048 9.67111111-2.048 12.62933334z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m200.81777778 666.39644445l-32.54044445 44.37333333c-2.95822222 4.096-8.64711111 4.89244445-12.74311111 1.93422222L479.34577778 577.76355555c-2.38933333-1.70666667-3.75466667-4.43733333-3.75466667-7.39555555V257.13777778c0-5.00622222 4.096-9.10222222 9.10222222-9.10222223h54.72711112c5.00622222 0 9.10222222 4.096 9.10222222 9.10222223v281.6l162.24711111 117.30488889c4.096 2.84444445 5.00622222 8.53333333 2.048 12.62933333z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M981.10577778 314.48177778c-25.6-61.09866667-62.464-115.93955555-109.34044445-163.04355556-46.87644445-46.99022222-101.60355555-83.968-162.70222222-109.568C646.59911111 15.58755555 580.38044445 2.27555555 512 2.27555555h-2.27555555c-68.83555555 0.34133333-135.39555555 13.99466667-198.08711112 40.84622223-60.52977778 25.94133333-114.80177778 62.80533333-161.22311111 109.79555555-46.42133333 46.99022222-82.83022222 101.60355555-108.08888889 162.47466667C16.27022222 378.42488889 3.072 445.44 3.41333333 514.38933333c0.34133333 78.96177778 19.22844445 157.35466667 54.49955556 227.44177778v172.94222222c0 28.89955555 23.43822222 52.33777778 52.224 52.33777778h172.71466666c69.97333333 35.38488889 148.13866667 54.272 226.98666667 54.61333334h2.38933333c68.03911111 0 133.91644445-13.19822222 196.03911112-39.02577778 60.75733333-25.37244445 115.37066667-61.78133333 162.13333333-108.31644445 46.87644445-46.53511111 83.74044445-100.92088889 109.568-161.56444444 26.73777778-62.80533333 40.39111111-129.59288889 40.73244445-198.54222223 0.22755555-69.29066667-13.19822222-136.53333333-39.59466667-199.79377777zM284.89955555 566.61333333c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955556 54.61333333-24.34844445 54.61333333-54.49955556 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955556-54.61333333s24.46222222-54.61333333 54.49955556-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM745.4750693 325.8561164l-267.95558363 371.52436096c-16.15876501 22.52048353-49.62140436 22.52048353-65.78016939 0L253.07805667 477.51948567c-4.83490607-6.74342161 0-16.15876501 8.27023406-16.15876499h59.67291961c12.97790576 0 25.31963967 6.23448413 32.95370188 16.92217123l90.59087157 125.70755774 200.01242995-277.37092701c7.63406221-10.56045272 19.84856175-16.92217125 32.95370189-16.92217124H737.20483524c8.27023407 0 13.10514012 9.41534338 8.27023406 16.158765z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h468.2224823c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM720.79160148 697.63494611c5.59831228 6.61618726 0.8906406 16.6677025-7.76129658 16.66770249h-74.94104404c-5.98001539 0-11.70556205-2.67192177-15.64982754-7.25235911L512 575.36271635l-110.43943332 131.68757314c-3.81703111 4.58043732-9.54257777 7.25235911-15.64982754 7.25235911H310.9696951c-8.65193717 0-13.35960887-10.05151525-7.76129658-16.66770249L458.81603326 512 303.20839852 326.36505389c-5.59831228-6.61618726-0.8906406-16.6677025 7.76129658-16.66770249h74.94104404c5.98001539 0 11.70556205 2.67192177 15.64982754 7.25235911L512 448.63728365l110.43943332-131.68757314c3.81703111-4.58043732 9.54257777-7.25235911 15.64982754-7.25235911H713.0303049c8.65193717 0 13.35960887 10.05151525 7.76129658 16.66770249L565.18396674 512l155.60763474 185.63494611z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM677.02297814 523.19662459L423.31764398 722.70011704c-9.41534338 7.37959347-23.28388974 0.76340622-23.28388975-11.19662459V312.62374191c0-11.9600308 13.86854636-18.70345241 23.28388975-11.19662457l253.70533416 199.37625807c7.25235911 5.72554666 7.25235911 16.6677025 0 22.39324918z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H552.71499847v193.39624268c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962h-61.0724977c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962V552.71499847H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h193.39624268V277.88875885c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h61.0724977c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v193.39624268h193.39624268c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M902.67315697 135.41705551L528.62204754 7.94466448C524.10877635 6.40354749 518.05438818 5.63298899 512 5.63298899s-12.10877635 0.7705585-16.62204754 2.31167549L121.32684303 135.41705551c-9.13662215 3.08223399-16.62204754 13.64989334-16.62204753 23.33691443v531.02488283c0 9.68702108 6.27454775 22.45627614 13.87005291 28.51066431L498.0198673 1013.9638196c3.85279247 2.9721542 8.8063828 4.51327118 13.87005291 4.51327118s10.12734022-1.54111698 13.87005291-4.51327118l379.4450189-295.67430252c7.59550517-5.94430839 13.87005291-18.71356345 13.87005291-28.51066431V158.75396994c0.22015956-9.68702108-7.26526581-20.14460066-16.40188796-23.33691443zM712.89560763 323.43332829L478.86598471 645.63685899c-7.04510625 9.68702108-21.57563786 9.68702108-28.6207441 0l-139.14084824-191.5388259c-4.18303182-5.8342286 0-13.9801327 7.15518603-13.9801327h60.76404132c5.61406904 0 11.0079785 2.75199463 14.31037204 7.26526582l71.22162091 97.97100864 166.11039557-228.74579323c3.30239355-4.51327118 8.58622323-7.26526581 14.31037204-7.26526581H705.7404216c7.15518602 0.11007979 11.33821785 8.25598388 7.15518603 14.09021248z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M959.86498307 186.28001231H797.00498922v-101.78749614c0-44.91373267-36.51626425-81.42999692-81.42999691-81.42999693H308.42500769c-44.91373267 0-81.42999692 36.51626425-81.42999691 81.42999693v101.78749614H64.13501693c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499847v40.71499845c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874962h76.8495596l31.42688945 665.43575611c2.03574992 43.38692024 37.91584233 77.61296581 81.30276254 77.6129658h577.64404066c43.5141546 0 79.26701262-34.09881122 81.30276254-77.6129658l31.42688945-665.43575611H990.40123192c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874962v-40.71499845c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499847z m-254.46874039 0H318.60375732v-91.60874653h386.79248536v91.60874653z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.2224823 248.62485371H654.50249462V104.85001539c0-22.52048353-18.19451494-40.71499847-40.71499847-40.71499846H94.67126578v-50.89374808c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-71.25124732c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v997.5174623c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h71.25124732c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961V674.85999383h315.54123807v143.77483833c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h529.29497999c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V289.33985217c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M804.63905145 265.16532183V94.67126578h109.42155836c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961H109.93939019c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h109.42155836v170.49405605c0 103.6960117 53.94737296 194.92305513 135.3773699 246.83467817-81.42999692 51.91162303-135.37736988 143.13866646-135.3773699 246.83467817v170.49405605h-109.42155836c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h804.12121962c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-109.42155836V758.83467817c0-103.6960117-53.94737296-194.92305513-135.3773699-246.83467817 81.42999692-51.91162303 135.37736988-143.13866646 135.3773699-246.83467817z',\n special: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1020.928 448.44373333l-35.36213334-373.4528c-1.79200001-19.3536-17.2032-34.64533332-36.55679999-36.55679999L575.55626667 3.072h-0.47786666c-3.82293334 0-6.8096 1.19466667-9.07946669 3.46453333L6.53653333 565.99893332c-4.65919999 4.65919999-4.65919999 12.1856 0 16.84480001l434.61973334 434.61973334c2.26986667 2.26986667 5.25653333 3.46453333 8.48213333 3.46453333s6.21226667-1.19466667 8.48213333-3.46453333l559.46239999-559.46239999c2.38933332-2.5088 3.584-5.97333334 3.34506668-9.55733335zM735.40266668 362.66666667c-42.17173333 0-76.45866667-34.28693333-76.45866667-76.45866667s34.28693333-76.45866667 76.45866667-76.45866667 76.45866667 34.28693333 76.45866665 76.45866667-34.28693333 76.45866667-76.45866665 76.45866667z',\n special: true,\n },\n ],\n },\n\n {\n type: '线性',\n children: [\n {\n viewBox: [1024, 1024],\n path: 'M1009.55537674 75.96950982l-61.38012212-61.38012214c-4.48769762-4.48769762-11.870684-4.48769762-16.3583816 0L14.44462326 931.67210859c-4.48769762 4.48769762-4.48769762 11.870684 0 16.35838159l61.38012212 61.38012214c4.48769762 4.48769762 11.870684 4.48769762 16.3583816 0L1009.41061232 92.18312698c4.63246205-4.34293316 4.63246205-11.72591956 0.14476442-16.21361716zM210.88996692 419.35075905c114.94296453 0 208.46079213-93.51782759 208.46079213-208.46079213s-93.51782759-208.46079213-208.46079213-208.4607921-208.46079213 93.51782759-208.4607921 208.4607921 93.51782759 208.46079213 208.4607921 208.46079213z m0-312.69118816c57.47148228 0 104.23039605 46.75891379 104.23039607 104.23039603s-46.75891379 104.23039605-104.23039607 104.23039607-104.23039605-46.75891379-104.23039603-104.23039607 46.75891379-104.23039605 104.23039603-104.23039603zM813.11003308 604.64924095c-114.94296453 0-208.46079213 93.51782759-208.46079213 208.46079213s93.51782759 208.46079213 208.46079213 208.4607921 208.46079213-93.51782759 208.4607921-208.4607921-93.51782759-208.46079213-208.4607921-208.46079213z m0 312.69118816c-57.47148228 0-104.23039605-46.75891379-104.23039607-104.23039603s46.75891379-104.23039605 104.23039607-104.23039607 104.23039605 46.75891379 104.23039603 104.23039607-46.75891379 104.23039605-104.23039603 104.23039603z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1004.96017383 478.58365209L483.27851088 25.80594621c-4.00443838-3.45210207-9.11354943-5.3852792-14.49882864-5.38527921h-122.20441284c-10.21822208 0-14.91308089 12.70373557-7.18037228 19.33177152l483.57045622 419.77561022H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672657v82.85044938c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672657h807.92996557L339.25681303 984.24756148c-7.7327086 6.76612003-3.0378498 19.33177153 7.18037229 19.33177152h126.34693531c2.62359757 0 5.24719513-0.96658859 7.18037228-2.76168164L1004.96017383 545.41634791c20.2983601-17.67476253 20.2983601-49.1579333 0-66.83269582z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1011.38217956 558.9924242L545.80649025 22.43713295c-17.81503843-20.62055629-49.79794206-20.62055629-67.75325638 0L12.61782044 558.9924242c-6.31241519 7.29434645-1.12220714 18.51641789 8.41655359 18.51641789h113.62347344c6.45269109 0 12.62483038-2.80551785 16.97338308-7.71517411L458.69516062 215.87758959V1005.77114384c0 6.1721393 5.04993216 11.22207145 11.22207144 11.22207145h84.16553588c6.1721393 0 11.22207145-5.04993216 11.22207144-11.22207145V215.87758959l307.06393007 353.91607839c4.20827679 4.90965626 10.38041608 7.71517413 16.97338308 7.71517411h113.62347344c9.53876074 0 14.72896878-11.22207145 8.41655359-18.51641789z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1009.1026963 459.52804874H201.17273073l483.57045624-419.77561022c7.7327086-6.76612003 3.0378498-19.33177153-7.18037229-19.33177152h-122.20441283c-5.3852792 0-10.49439025 1.93317715-14.49882866 5.38527921L19.03982617 478.58365209c-20.2983601 17.67476253-20.2983601 49.1579333 0 66.69461175L543.89742302 1000.81765136c2.07126124 1.79509307 4.55677472 2.76168163 7.18037228 2.76168164h126.3469353c10.21822208 0 14.91308089-12.70373557 7.18037228-19.33177152L201.17273073 564.47195126H1009.1026963c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672657v-82.85044938c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672657z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1002.96562597 446.49115791h-113.62347344c-6.45269109 0-12.62483038 2.80551785-16.97338308 7.71517411L565.30483938 808.12241041V18.22885616c0-6.1721393-5.04993216-11.22207145-11.22207144-11.22207145h-84.16553588c-6.1721393 0-11.22207145 5.04993216-11.22207144 11.22207145v789.89355425L151.63123055 454.20633202c-4.20827679-4.90965626-10.38041608-7.71517413-16.97338308-7.71517411h-113.62347344c-9.53876074 0-14.72896878 11.36234735-8.41655359 18.51641789L478.19350975 1001.56286705c17.81503843 20.62055629 49.79794206 20.62055629 67.75325638 0L1011.38217956 465.0075758c6.31241519-7.29434645 1.12220714-18.51641789-8.41655359-18.51641789z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M975.82443246 622.46726585H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672658v82.85044937c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672659h835.6848661L651.32683905 980.10503902c-5.66144737 7.18037229-0.55233633 17.9509307 8.69929718 17.9509307h100.11095967c6.76612003 0 13.11798782-3.0378498 17.39859437-8.42312903l233.08593092-295.63802022c22.78387358-28.99765728 2.20934532-71.52755463-34.79718873-71.52755462zM1009.1026963 296.58883161H173.4178302l199.25533075-252.69387063c5.66144737-7.18037229 0.55233633-17.9509307-8.69929718-17.9509307h-100.11095967c-6.76612003 0-13.11798782 3.0378498-17.39859437 8.42312903L13.37837881 330.00517953c-22.78387358 28.99765728-2.20934532 71.52755463 34.65910466 71.52755462h961.06521283c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672658v-82.85044937c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M1010.75873115 64.13501693H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874964h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874964v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961zM1010.75873115 858.07748691H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874964v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874964zM1010.75873115 461.10625194H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874959v81.42999694c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874959h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874959v-81.42999694c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874959z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M591.98717801 512l405.34042913-483.16579151c6.79427767-8.02960089 1.08090782-20.22841761-9.41933951-20.2284176h-123.22349044c-7.25752386 0-14.20621693 3.24272343-18.99309439 8.80167789L511.38233839 415.95362022 177.07299399 17.40746878c-4.63246205-5.55895447-11.58115512-8.80167789-18.99309439-8.80167789H34.85640916c-10.50024731 0-16.21361717 12.19881672-9.41933952 20.2284176L430.77749876 512 25.43706964 995.16579151c-6.79427767 8.02960089-1.08090782 20.22841761 9.41933952 20.2284176h123.22349044c7.25752386 0 14.20621693-3.24272343 18.99309439-8.80167789l334.3093444-398.54615144 334.30934441 398.54615144c4.63246205 5.55895447 11.58115512 8.80167789 18.99309439 8.80167789h123.22349044c10.50024731 0 16.21361717-12.19881672 9.41933951-20.2284176L591.98717801 512z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M953.5488 832.61667556c-24.08448-57.08913778-58.74574221-108.31644445-102.70947556-152.28017777-43.96373333-43.96373333-95.19104-78.49756444-152.28017777-102.70947558-0.50972445-0.25486222-1.01944888-0.38229333-1.52917334-0.63715555C776.41955556 519.64586667 828.02915556 426.23886221 828.02915556 320.85333332c0-174.58062221-141.44853334-316.02915556-316.02915556-316.02915554S195.97084444 146.27271111 195.97084444 320.85333332c0 105.38552889 51.6096 198.79253333 130.99918223 256.26396447-0.50972445 0.25486222-1.01944888 0.38229333-1.52917334 0.63715555-57.08913778 24.08448-108.31644445 58.61831112-152.28017777 102.70947554-43.96373333 43.96373333-78.49756444 95.19104-102.70947556 152.28017779C46.74901333 888.55893332 34.13333334 947.8144 32.85902222 1008.72647111c-0.12743111 5.7344 4.46008889 10.44935111 10.19448889 10.44935111h76.45866667c5.60696888 0 10.06705778-4.46008889 10.19448889-9.93962666 2.54862221-98.37681778 42.05226667-190.50951112 111.88451555-260.34176001 72.25344-72.25344 168.20906666-112.01194667 270.40881778-112.01194667s198.15537778 39.75850667 270.40881778 112.01194667C852.24106667 818.72668444 891.74471111 910.85937779 894.29333333 1009.23619556c0.12743111 5.60696888 4.58752 9.93962667 10.19448889 9.93962666h76.45866667c5.7344 0 10.32192-4.71495112 10.19448889-10.44935111-1.27431111-60.91207112-13.88999112-120.16753779-37.59217778-176.10979555zM512 540.03484444c-58.49088 0-113.54112-22.81016889-154.95623111-64.22527999S292.81848888 379.34421333 292.81848888 320.85333332c0-58.49088 22.81016889-113.54112 64.22528001-154.9562311S453.50912 101.67182221 512 101.67182221s113.54112 22.81016889 154.95623111 64.22528001S731.18151112 262.36245333 731.18151112 320.85333332c0 58.49088-22.81016889 113.54112-64.22528001 154.95623113S570.49088 540.03484444 512 540.03484444z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M985.31555555 111.50222222H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888889v728.17777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h946.6311111c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V147.91111111c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888889z m-45.5111111 126.06577778V830.57777778H84.19555555V237.568l-31.40266666-24.46222222 44.71466666-57.45777778 48.6968889 37.888h731.70488888l48.69688889-37.888 44.71466667 57.45777778-31.51644444 24.46222222z M877.90933333 193.42222222L512 477.86666667 146.09066667 193.42222222l-48.69688889-37.888-44.71466667 57.45777778 31.40266667 24.46222222 388.66488889 302.19377778c22.98311111 17.86311111 55.18222222 17.86311111 78.16533333 0L939.80444445 237.568l31.40266666-24.46222222-44.71466666-57.45777778-48.58311112 37.77422222z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M985.31555555 88.74666667H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888888v564.33777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h432.35555555v127.43111111H275.34222222c-10.01244445 0-18.20444445 8.192-18.20444444 18.20444445v54.61333333c0 5.00622222 4.096 9.10222222 9.10222222 9.10222222h491.52c5.00622222 0 9.10222222-4.096 9.10222222-9.10222222v-54.61333333c0-10.01244445-8.192-18.20444445-18.20444444-18.20444445H552.96V725.90222222h432.35555555c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V125.15555555c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888888z m-45.5111111 555.23555555H84.19555555V170.66666667h855.6088889v473.31555555z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m0 932.97777778c-233.69955555 0-423.25333333-189.55377778-423.25333333-423.25333333 0-101.26222222 35.61244445-194.33244445 95.00444444-267.15022222l595.39911111 595.39911111C706.33244445 899.64088889 613.26222222 935.25333333 512 935.25333333z m328.24888889-156.10311111L244.84977778 183.75111111C317.66755555 124.35911111 410.73777778 88.74666667 512 88.74666667c233.69955555 0 423.25333333 189.55377778 423.25333333 423.25333333 0 101.26222222-35.61244445 194.33244445-95.00444444 267.15022222z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M901.80266667 257.82044445L656.95288889 12.97066667c-6.82666667-6.82666667-16.04266667-10.69511111-25.71377778-10.69511112H147.91111111c-20.13866667 0-36.40888889 16.27022222-36.40888889 36.4088889v946.6311111c0 20.13866667 16.27022222 36.40888889 36.40888889 36.4088889h728.17777778c20.13866667 0 36.40888889-16.27022222 36.40888889-36.4088889V283.648c0-9.67111111-3.86844445-19.00088889-10.69511111-25.82755555zM828.52977778 300.37333333H614.4V86.24355555L828.52977778 300.37333333z m2.048 639.43111112H193.42222222V84.19555555h343.60888889v245.76c0 26.39644445 21.39022222 47.78666667 47.78666667 47.78666667h245.76v562.06222223z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M981.07392 55.79662222H42.92608c-31.22062222 0-50.71758221 34.02410666-35.04355556 61.16693334L304.28728889 620.82616888V927.42542221c0 22.55530667 18.09521779 40.77795555 40.52309333 40.77795557h334.37923556c22.42787556 0 40.52309333-18.22264888 40.52309333-40.77795557V620.82616888L1016.24490667 116.96355556c15.54659555-27.14282666-3.95036444-61.16693333-35.17098667-61.16693334zM628.47203556 876.45297779H395.52796444V677.66044445h233.07150222v198.79253334z m12.23338666-301.50200891l-12.10595556 21.15356445h-233.19893332l-12.10595556-21.15356445L130.59868445 147.54702221h762.8026311L640.70542222 574.95096888z',\n special: true,\n outlined: true,\n },\n {\n viewBox: [1024, 1024],\n path: 'M980.62285431 4.54099753H654.39920987c-4.2719763 0-7.76722963 3.49525333-7.76722962 7.76722964v72.4941432c0 4.2719763 3.49525333 7.76722963 7.76722962 7.76722963h207.64393877L604.04167111 350.57107753c-64.72691358-49.83972347-143.69374815-76.7661195-226.67365136-76.7661195-99.54999309 0-193.27456395 38.83614815-263.5679921 109.25903012S4.54099753 547.08198717 4.54099753 646.63198025s38.83614815 193.27456395 109.25903012 263.5679921C184.09345581 980.62285431 277.81802667 1019.45900247 377.36801975 1019.45900247s193.27456395-38.83614815 263.5679921-109.25903012C711.35889383 839.90654419 750.19504197 746.18197333 750.19504197 646.63198025c0-82.9799032-26.92639605-161.68783013-76.63666567-226.41474372L931.4304 162.34521283V369.60079013c0 4.2719763 3.49525333 7.76722963 7.76722963 7.76722962h72.4941432c4.2719763 0 7.76722963-3.49525333 7.76722964-7.76722962V43.37714569c0-21.35988148-17.47626667-38.83614815-38.83614816-38.83614816zM377.36801975 921.07409383c-151.33152395 0-274.44211358-123.11058963-274.44211358-274.44211358s123.11058963-274.44211358 274.44211358-274.44211358 274.44211358 123.11058963 274.44211358 274.44211358-123.11058963 274.44211358-274.44211358 274.44211358z',\n special: true,\n outlined: true,\n },\n ],\n }\n]","import type { ChartType } from '@/types/slides'\n\ninterface ChartTypes {\n [propName: string]: ChartType\n}\n\nexport const CHART_TYPES: ChartTypes = {\n bar: 'bar',\n horizontalBar: 'bar',\n line: 'line',\n area: 'line',\n scatter: 'line',\n pie: 'pie',\n ring: 'pie',\n}","import { debounce, throttle} from 'lodash'\nimport { useSnapshotStore } from '@/store'\n\nexport default () => {\n const snapshotStore = useSnapshotStore()\n\n // 添加历史快照(历史记录)\n const addHistorySnapshot = debounce(function() {\n snapshotStore.addSnapshot()\n }, 300, { trailing: true })\n\n // 重做\n const redo = throttle(function() {\n snapshotStore.reDo()\n }, 100, { leading: true, trailing: false })\n\n // 撤销\n const undo = throttle(function() {\n snapshotStore.unDo()\n }, 100, { leading: true, trailing: false })\n\n return {\n addHistorySnapshot,\n redo,\n undo,\n }\n}","import { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport { getImageSize } from '@/utils/image'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport type { PPTLineElement, PPTElement, TableCell, TableCellStyle, PPTShapeElement, PPTChartElement, ChartOptions, PresetChartType } from '@/types/slides'\nimport { type ShapePoolItem, SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport type { LinePoolItem } from '@/configs/lines'\nimport { CHART_TYPES } from '@/configs/chartTypes'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\ninterface CommonElementPosition {\n top: number\n left: number\n width: number\n height: number\n}\n\ninterface LineElementPosition {\n top: number\n left: number\n start: [number, number]\n end: [number, number]\n}\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { creatingElement } = storeToRefs(mainStore)\n const { theme, viewportRatio } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 创建(插入)一个元素并将其设置为被选中元素\n const createElement = (element: PPTElement, callback?: () => void) => {\n slidesStore.addElement(element)\n mainStore.setActiveElementIdList([element.id])\n\n if (creatingElement.value) mainStore.setCreatingElement(null)\n\n setTimeout(() => {\n mainStore.setEditorareaFocus(true)\n }, 0)\n\n if (callback) callback()\n\n addHistorySnapshot()\n }\n\n /**\n * 创建图片元素\n * @param src 图片地址\n */\n const createImageElement = (src: string) => {\n getImageSize(src).then(({ width, height }) => {\n const scale = height / width\n \n if (scale < viewportRatio.value && width > VIEWPORT_SIZE) {\n width = VIEWPORT_SIZE\n height = width * scale\n }\n else if (height > VIEWPORT_SIZE * viewportRatio.value) {\n height = VIEWPORT_SIZE * viewportRatio.value\n width = height / scale\n }\n\n createElement({\n type: 'image',\n id: nanoid(10),\n src,\n width,\n height,\n left: (VIEWPORT_SIZE - width) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - height) / 2,\n fixedRatio: true,\n rotate: 0,\n })\n })\n }\n \n /**\n * 创建图表元素\n * @param chartType 图表类型\n */\n const createChartElement = (type: PresetChartType) => {\n const newElement: PPTChartElement = {\n type: 'chart',\n id: nanoid(10),\n chartType: CHART_TYPES[type],\n left: 300,\n top: 81.25,\n width: 400,\n height: 400,\n rotate: 0,\n themeColor: [theme.value.themeColor],\n gridColor: theme.value.fontColor,\n data: {\n labels: ['类别1', '类别2', '类别3', '类别4', '类别5'],\n legends: ['系列1'],\n series: [\n [12, 19, 5, 2, 18],\n ],\n },\n }\n\n const options: ChartOptions = {\n ...(type === 'bar' ? { horizontalBars: false, stackBars: false } : {}),\n ...(type === 'horizontalBar' ? { horizontalBars: true, stackBars: false } : {}),\n ...(type === 'line' ? { showLine: true, lineSmooth: true, showArea: false } : {}),\n ...(type === 'area' ? { showLine: true, lineSmooth: true, showArea: true } : {}),\n ...(type === 'scatter' ? { showLine: false, lineSmooth: true, showArea: false } : {}),\n ...(type === 'pie' ? { donut: false } : {}),\n ...(type === 'ring' ? { donut: true } : {}),\n }\n\n createElement({\n ...newElement,\n options,\n })\n }\n \n /**\n * 创建表格元素\n * @param row 行数\n * @param col 列数\n */\n const createTableElement = (row: number, col: number) => {\n const style: TableCellStyle = {\n fontname: theme.value.fontName,\n color: theme.value.fontColor,\n }\n const data: TableCell[][] = []\n for (let i = 0; i < row; i++) {\n const rowCells: TableCell[] = []\n for (let j = 0; j < col; j++) {\n rowCells.push({ id: nanoid(10), colspan: 1, rowspan: 1, text: '', style })\n }\n data.push(rowCells)\n }\n\n const DEFAULT_CELL_WIDTH = 100\n const DEFAULT_CELL_HEIGHT = 36\n\n const colWidths: number[] = new Array(col).fill(1 / col)\n\n const width = col * DEFAULT_CELL_WIDTH\n const height = row * DEFAULT_CELL_HEIGHT\n\n createElement({\n type: 'table',\n id: nanoid(10),\n width,\n height,\n colWidths,\n rotate: 0,\n data,\n left: (VIEWPORT_SIZE - width) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - height) / 2,\n outline: {\n width: 2,\n style: 'solid',\n color: '#eeece1',\n },\n theme: {\n color: theme.value.themeColor,\n rowHeader: true,\n rowFooter: false,\n colHeader: false,\n colFooter: false,\n },\n cellMinHeight: 36,\n })\n }\n \n /**\n * 创建文本元素\n * @param position 位置大小信息\n * @param content 文本内容\n */\n \n interface CreateTextData {\n content?: string\n vertical?: boolean\n }\n const createTextElement = (position: CommonElementPosition, data?: CreateTextData) => {\n const { left, top, width, height } = position\n const content = data?.content || ''\n const vertical = data?.vertical || false\n\n const id = nanoid(10)\n createElement({\n type: 'text',\n id,\n left, \n top, \n width, \n height,\n content,\n rotate: 0,\n defaultFontName: theme.value.fontName,\n defaultColor: theme.value.fontColor,\n vertical,\n }, () => {\n setTimeout(() => {\n const editorRef: HTMLElement | null = document.querySelector(`#editable-element-${id} .ProseMirror`)\n if (editorRef) editorRef.focus()\n }, 0)\n })\n }\n \n /**\n * 创建形状元素\n * @param position 位置大小信息\n * @param data 形状路径信息\n */\n const createShapeElement = (position: CommonElementPosition, data: ShapePoolItem) => {\n const { left, top, width, height } = position\n const newElement: PPTShapeElement = {\n type: 'shape',\n id: nanoid(10),\n left, \n top, \n width, \n height,\n viewBox: data.viewBox,\n path: data.path,\n fill: theme.value.themeColor,\n fixedRatio: false,\n rotate: 0,\n }\n if (data.special) newElement.special = true\n if (data.pathFormula) {\n newElement.pathFormula = data.pathFormula\n newElement.viewBox = [width, height]\n\n const pathFormula = SHAPE_PATH_FORMULAS[data.pathFormula]\n if ('editable' in pathFormula) {\n newElement.path = pathFormula.formula(width, height, pathFormula.defaultValue)\n newElement.keypoint = pathFormula.defaultValue\n }\n else newElement.path = pathFormula.formula(width, height)\n }\n createElement(newElement)\n }\n \n /**\n * 创建线条元素\n * @param position 位置大小信息\n * @param data 线条的路径和样式\n */\n const createLineElement = (position: LineElementPosition, data: LinePoolItem) => {\n const { left, top, start, end } = position\n\n const newElement: PPTLineElement = {\n type: 'line',\n id: nanoid(10),\n left, \n top, \n start,\n end,\n points: data.points,\n color: theme.value.themeColor,\n style: data.style,\n width: 2,\n }\n if (data.isBroken) newElement.broken = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (data.isCurve) newElement.curve = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (data.isCubic) newElement.cubic = [[(start[0] + end[0]) / 2, (start[1] + end[1]) / 2], [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]]\n createElement(newElement)\n }\n \n /**\n * 创建LaTeX元素\n * @param svg SVG代码\n */\n const createLatexElement = (data: { path: string; latex: string; w: number; h: number; }) => {\n createElement({\n type: 'latex',\n id: nanoid(10),\n width: data.w,\n height: data.h,\n rotate: 0,\n left: (VIEWPORT_SIZE - data.w) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - data.h) / 2,\n path: data.path,\n latex: data.latex,\n color: theme.value.fontColor,\n strokeWidth: 2,\n viewBox: [data.w, data.h],\n fixedRatio: true,\n })\n }\n \n /**\n * 创建视频元素\n * @param src 视频地址\n */\n const createVideoElement = (src: string) => {\n createElement({\n type: 'video',\n id: nanoid(10),\n width: 500,\n height: 300,\n rotate: 0,\n left: (VIEWPORT_SIZE - 500) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - 300) / 2,\n src,\n autoplay: false,\n })\n }\n \n /**\n * 创建音频元素\n * @param src 音频地址\n */\n const createAudioElement = (src: string) => {\n createElement({\n type: 'audio',\n id: nanoid(10),\n width: 50,\n height: 50,\n rotate: 0,\n left: (VIEWPORT_SIZE - 50) / 2,\n top: (VIEWPORT_SIZE * viewportRatio.value - 50) / 2,\n loop: false,\n autoplay: false,\n fixedRatio: true,\n color: theme.value.themeColor,\n src,\n })\n }\n\n return {\n createImageElement,\n createChartElement,\n createTableElement,\n createTextElement,\n createShapeElement,\n createLineElement,\n createLatexElement,\n createVideoElement,\n createAudioElement,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useSlidesStore, useMainStore } from '@/store'\nimport type { PPTElement, Slide } from '@/types/slides'\nimport { createSlideIdMap, createElementIdMap, getElementRange } from '@/utils/element'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { currentSlide, slides } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 添加指定的元素数据(一组)\n * @param elements 元素列表数据\n */\n const addElementsFromData = (elements: PPTElement[]) => {\n const { groupIdMap, elIdMap } = createElementIdMap(elements)\n\n const firstElement = elements[0]\n let offset = 0\n let lastSameElement: PPTElement | undefined\n \n do {\n lastSameElement = currentSlide.value.elements.find(el => {\n if (el.type !== firstElement.type) return false\n \n const { minX: oMinX, maxX: oMaxX, minY: oMinY, maxY: oMaxY } = getElementRange(el)\n const { minX: nMinX, maxX: nMaxX, minY: nMinY, maxY: nMaxY } = getElementRange({\n ...firstElement,\n left: firstElement.left + offset,\n top: firstElement.top + offset\n })\n if (\n oMinX === nMinX &&\n oMaxX === nMaxX &&\n oMinY === nMinY &&\n oMaxY === nMaxY\n ) return true\n \n return false\n })\n if (lastSameElement) offset += 10\n\n } while (lastSameElement)\n \n for (const element of elements) {\n element.id = elIdMap[element.id]\n\n element.left = element.left + offset\n element.top = element.top + offset\n\n if (element.groupId) element.groupId = groupIdMap[element.groupId]\n }\n slidesStore.addElement(elements)\n mainStore.setActiveElementIdList(Object.values(elIdMap))\n addHistorySnapshot()\n }\n\n /**\n * 添加指定的页面数据\n * @param slide 页面数据\n */\n const addSlidesFromData = (slides: Slide[]) => {\n const slideIdMap = createSlideIdMap(slides)\n const newSlides = slides.map(slide => {\n const { groupIdMap, elIdMap } = createElementIdMap(slide.elements)\n\n for (const element of slide.elements) {\n element.id = elIdMap[element.id]\n if (element.groupId) element.groupId = groupIdMap[element.groupId]\n\t\t\n // 若元素绑定了页面跳转链接\n if (element.link && element.link.type === 'slide') {\n\n // 待添加页面中包含该页面,则替换相关绑定关系\n if (slideIdMap[element.link.target]) {\n element.link.target = slideIdMap[element.link.target]\n }\n // 待添加页面中不包含该页面,则删除该元素绑定的页面跳转\n else delete element.link\n }\n }\n // 动画id替换\n if (slide.animations) {\n for (const animation of slide.animations) {\n animation.id = nanoid(10)\n animation.elId = elIdMap[animation.elId]\n }\n }\n return {\n ...slide,\n id: slideIdMap[slide.id],\n }\n })\n slidesStore.addSlide(newSlides)\n addHistorySnapshot()\n }\n\n const isEmptySlide = computed(() => {\n if (slides.value.length > 1) return false\n if (slides.value[0].elements.length > 0) return false\n return true\n })\n\n return {\n addElementsFromData,\n addSlidesFromData,\n isEmptySlide,\n }\n}","import { pasteCustomClipboardString } from '@/utils/clipboard'\nimport { parseText2Paragraphs } from '@/utils/textParser'\nimport useCreateElement from '@/hooks/useCreateElement'\nimport useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'\n\ninterface PasteTextClipboardDataOptions {\n onlySlide?: boolean\n onlyElements?: boolean\n}\n\nexport default () => {\n const { createTextElement } = useCreateElement()\n const { addElementsFromData, addSlidesFromData } = useAddSlidesOrElements()\n\n /**\n * 粘贴普通文本:创建为新的文本元素\n * @param text 文本\n */\n const createTextElementFromClipboard = (text: string) => {\n createTextElement({\n left: 0,\n top: 0,\n width: 600,\n height: 50,\n }, { content: text })\n }\n\n /**\n * 解析剪贴板内容,根据解析结果选择合适的粘贴方式\n * @param text 剪贴板内容\n * @param options 配置项:onlySlide -- 仅处理页面粘贴;onlyElements -- 仅处理元素粘贴;\n */\n const pasteTextClipboardData = (text: string, options?: PasteTextClipboardDataOptions) => {\n const onlySlide = options?.onlySlide || false\n const onlyElements = options?.onlyElements || false\n\n const clipboardData = pasteCustomClipboardString(text)\n\n // 元素或页面\n if (typeof clipboardData === 'object') {\n const { type, data } = clipboardData\n\n if (type === 'elements' && !onlySlide) addElementsFromData(data)\n else if (type === 'slides' && !onlyElements) addSlidesFromData(data)\n }\n\n // 普通文本\n else if (!onlyElements && !onlySlide) {\n const string = parseText2Paragraphs(clipboardData)\n createTextElementFromClipboard(string)\n }\n }\n\n return {\n pasteTextClipboardData,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { Slide } from '@/types/slides'\nimport { copyText, readClipboard } from '@/utils/clipboard'\nimport { encrypt } from '@/utils/crypto'\nimport { createElementIdMap } from '@/utils/element'\nimport { KEYS } from '@/configs/hotkey'\nimport message from '@/utils/message'\nimport usePasteTextClipboardData from '@/hooks/usePasteTextClipboardData'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport useAddSlidesOrElements from '@/hooks//useAddSlidesOrElements'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { selectedSlidesIndex: _selectedSlidesIndex, activeElementIdList } = storeToRefs(mainStore)\n const { currentSlide, slides, theme, slideIndex } = storeToRefs(slidesStore)\n\n const selectedSlidesIndex = computed(() => [..._selectedSlidesIndex.value, slideIndex.value])\n const selectedSlides = computed(() => slides.value.filter((item, index) => selectedSlidesIndex.value.includes(index)))\n const selectedSlidesId = computed(() => selectedSlides.value.map(item => item.id))\n\n const { pasteTextClipboardData } = usePasteTextClipboardData()\n const { addSlidesFromData } = useAddSlidesOrElements()\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 重置幻灯片\n const resetSlides = () => {\n const emptySlide: Slide = {\n id: nanoid(10),\n elements: [],\n background: {\n type: 'solid',\n color: theme.value.backgroundColor,\n },\n }\n slidesStore.updateSlideIndex(0)\n mainStore.setActiveElementIdList([])\n slidesStore.setSlides([emptySlide])\n }\n\n /**\n * 移动页面焦点\n * @param command 移动页面焦点命令:上移、下移\n */\n const updateSlideIndex = (command: string) => {\n if (command === KEYS.UP && slideIndex.value > 0) {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n slidesStore.updateSlideIndex(slideIndex.value - 1)\n }\n else if (command === KEYS.DOWN && slideIndex.value < slides.value.length - 1) {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n slidesStore.updateSlideIndex(slideIndex.value + 1)\n }\n }\n\n // 将当前页面数据加密后复制到剪贴板\n const copySlide = () => {\n const text = encrypt(JSON.stringify({\n type: 'slides',\n data: selectedSlides.value,\n }))\n\n copyText(text).then(() => {\n mainStore.setThumbnailsFocus(true)\n })\n }\n\n // 尝试将剪贴板页面数据解密后添加到下一页(粘贴)\n const pasteSlide = () => {\n readClipboard().then(text => {\n pasteTextClipboardData(text, { onlySlide: true })\n }).catch(err => message.warning(err))\n }\n\n // 创建一页空白页并添加到下一页\n const createSlide = () => {\n const emptySlide: Slide = {\n id: nanoid(10),\n elements: [],\n background: {\n type: 'solid',\n color: theme.value.backgroundColor,\n },\n }\n mainStore.setActiveElementIdList([])\n slidesStore.addSlide(emptySlide)\n addHistorySnapshot()\n }\n\n // 根据模板创建新页面\n const createSlideByTemplate = (slide: Slide) => {\n const { groupIdMap, elIdMap } = createElementIdMap(slide.elements)\n\n for (const element of slide.elements) {\n element.id = elIdMap[element.id]\n if (element.groupId) element.groupId = groupIdMap[element.groupId]\n }\n const newSlide = {\n ...slide,\n id: nanoid(10),\n }\n mainStore.setActiveElementIdList([])\n slidesStore.addSlide(newSlide)\n addHistorySnapshot()\n }\n\n // 将当前页复制一份到下一页\n const copyAndPasteSlide = () => {\n const slide = JSON.parse(JSON.stringify(currentSlide.value))\n addSlidesFromData([slide])\n }\n\n // 删除当前页,若将删除全部页面,则执行重置幻灯片操作\n const deleteSlide = (targetSlidesId = selectedSlidesId.value) => {\n if (slides.value.length === targetSlidesId.length) resetSlides()\n else slidesStore.deleteSlide(targetSlidesId)\n\n mainStore.updateSelectedSlidesIndex([])\n\n addHistorySnapshot()\n }\n\n // 将当前页复制后删除(剪切)\n // 由于复制操作会导致多选状态消失,所以需要提前将需要删除的页面ID进行缓存\n const cutSlide = () => {\n const targetSlidesId = [...selectedSlidesId.value]\n copySlide()\n deleteSlide(targetSlidesId)\n }\n\n // 选中全部幻灯片\n const selectAllSlide = () => {\n const newSelectedSlidesIndex = Array.from(Array(slides.value.length), (item, index) => index)\n mainStore.setActiveElementIdList([])\n mainStore.updateSelectedSlidesIndex(newSelectedSlidesIndex)\n }\n\n // 拖拽调整幻灯片顺序同步数据\n const sortSlides = (newIndex: number, oldIndex: number) => {\n if (oldIndex === newIndex) return\n \n const _slides = JSON.parse(JSON.stringify(slides.value))\n const _slide = _slides[oldIndex]\n _slides.splice(oldIndex, 1)\n _slides.splice(newIndex, 0, _slide)\n slidesStore.setSlides(_slides)\n slidesStore.updateSlideIndex(newIndex)\n }\n\n return {\n resetSlides,\n updateSlideIndex,\n copySlide,\n pasteSlide,\n createSlide,\n createSlideByTemplate,\n copyAndPasteSlide,\n deleteSlide,\n cutSlide,\n selectAllSlide,\n sortSlides,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 锁定选中的元素,并清空选中元素状态\n const lockElement = () => {\n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n \n for (const element of newElementList) {\n if (activeElementIdList.value.includes(element.id)) element.lock = true\n }\n slidesStore.updateSlide({ elements: newElementList })\n mainStore.setActiveElementIdList([])\n addHistorySnapshot()\n }\n\n /**\n * 解除元素的锁定状态,并将其设置为当前选择元素\n * @param handleElement 需要解锁的元素\n */\n const unlockElement = (handleElement: PPTElement) => {\n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n\n if (handleElement.groupId) {\n const groupElementIdList = []\n for (const element of newElementList) {\n if (element.groupId === handleElement.groupId) {\n element.lock = false\n groupElementIdList.push(element.id)\n }\n }\n slidesStore.updateSlide({ elements: newElementList })\n mainStore.setActiveElementIdList(groupElementIdList)\n }\n else {\n for (const element of newElementList) {\n if (element.id === handleElement.id) {\n element.lock = false\n break\n }\n }\n slidesStore.updateSlide({ elements: newElementList })\n mainStore.setActiveElementIdList([handleElement.id])\n }\n addHistorySnapshot()\n }\n\n return {\n lockElement,\n unlockElement,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeGroupElementId } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 删除全部选中元素\n // 组合元素成员中,存在被选中可独立操作的元素时,优先删除该元素。否则默认删除所有被选中的元素\n const deleteElement = () => {\n if (!activeElementIdList.value.length) return\n\n let newElementList: PPTElement[] = []\n if (activeGroupElementId.value) {\n newElementList = currentSlide.value.elements.filter(el => el.id !== activeGroupElementId.value)\n }\n else {\n newElementList = currentSlide.value.elements.filter(el => !activeElementIdList.value.includes(el.id))\n }\n\n mainStore.setActiveElementIdList([])\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n // 删除内面内全部元素(无论是否选中)\n const deleteAllElements = () => {\n if (!currentSlide.value.elements.length) return\n mainStore.setActiveElementIdList([])\n slidesStore.updateSlide({ elements: [] })\n addHistorySnapshot()\n }\n\n return {\n deleteElement,\n deleteAllElements,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeElementList, handleElementId } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 判断当前选中的元素是否可以组合\n */\n const canCombine = computed(() => {\n if (activeElementList.value.length < 2) return false\n\n const firstGroupId = activeElementList.value[0].groupId\n if (!firstGroupId) return true\n\n const inSameGroup = activeElementList.value.every(el => (el.groupId && el.groupId) === firstGroupId)\n return !inSameGroup\n })\n\n /**\n * 组合当前选中的元素:给当前选中的元素赋予一个相同的分组ID\n */\n const combineElements = () => {\n if (!activeElementList.value.length) return\n\n // 生成一个新元素列表进行后续操作\n let newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n\n // 生成分组ID\n const groupId = nanoid(10)\n\n // 收集需要组合的元素列表,并赋上唯一分组ID\n const combineElementList: PPTElement[] = []\n for (const element of newElementList) {\n if (activeElementIdList.value.includes(element.id)) {\n element.groupId = groupId\n combineElementList.push(element)\n }\n }\n\n // 确保该组合内所有元素成员的层级是连续的,具体操作方法为:\n // 先获取到该组合内最上层元素的层级,将本次需要组合的元素从新元素列表中移除,\n // 再根据最上层元素的层级位置,将上面收集到的需要组合的元素列表一起插入到新元素列表中合适的位置\n const combineElementMaxLevel = newElementList.findIndex(_element => _element.id === combineElementList[combineElementList.length - 1].id)\n const combineElementIdList = combineElementList.map(_element => _element.id)\n newElementList = newElementList.filter(_element => !combineElementIdList.includes(_element.id))\n\n const insertLevel = combineElementMaxLevel - combineElementList.length + 1\n newElementList.splice(insertLevel, 0, ...combineElementList)\n\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n /**\n * 取消组合元素:移除选中元素的分组ID\n */\n const uncombineElements = () => {\n if (!activeElementList.value.length) return\n const hasElementInGroup = activeElementList.value.some(item => item.groupId)\n if (!hasElementInGroup) return\n \n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n for (const element of newElementList) {\n if (activeElementIdList.value.includes(element.id) && element.groupId) delete element.groupId\n }\n slidesStore.updateSlide({ elements: newElementList })\n\n // 取消组合后,需要重置激活元素状态\n // 默认重置为当前正在操作的元素,如果不存在则重置为空\n const handleElementIdList = handleElementId.value ? [handleElementId.value] : []\n mainStore.setActiveElementIdList(handleElementIdList)\n\n addHistorySnapshot()\n }\n\n return {\n canCombine,\n combineElements,\n uncombineElements,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport { copyText, readClipboard } from '@/utils/clipboard'\nimport { encrypt } from '@/utils/crypto'\nimport message from '@/utils/message'\nimport usePasteTextClipboardData from '@/hooks/usePasteTextClipboardData'\nimport useDeleteElement from './useDeleteElement'\n\nexport default () => {\n const mainStore = useMainStore()\n const { activeElementIdList, activeElementList } = storeToRefs(mainStore)\n\n const { pasteTextClipboardData } = usePasteTextClipboardData()\n const { deleteElement } = useDeleteElement()\n\n // 将选中元素数据加密后复制到剪贴板\n const copyElement = () => {\n if (!activeElementIdList.value.length) return\n\n const text = encrypt(JSON.stringify({\n type: 'elements',\n data: activeElementList.value,\n }))\n\n copyText(text).then(() => {\n mainStore.setEditorareaFocus(true)\n })\n }\n\n // 将选中元素复制后删除(剪切)\n const cutElement = () => {\n copyElement()\n deleteElement()\n }\n\n // 尝试将剪贴板元素数据解密后进行粘贴\n const pasteElement = () => {\n readClipboard().then(text => {\n pasteTextClipboardData(text)\n }).catch(err => message.warning(err))\n }\n\n // 将选中元素复制后立刻粘贴\n const quickCopyElement = () => {\n copyElement()\n pasteElement()\n }\n\n return {\n copyElement,\n cutElement,\n pasteElement,\n quickCopyElement,\n }\n}","import { storeToRefs } from 'pinia'\r\nimport { useMainStore, useSlidesStore } from '@/store'\r\n\r\nexport default () => {\r\n const mainStore = useMainStore()\r\n const { currentSlide } = storeToRefs(useSlidesStore())\r\n const { hiddenElementIdList } = storeToRefs(mainStore)\r\n\r\n // 将当前页面全部元素设置为被选择状态\r\n const selectAllElement = () => {\r\n const unlockedElements = currentSlide.value.elements.filter(el => !el.lock && !hiddenElementIdList.value.includes(el.id))\r\n const newActiveElementIdList = unlockedElements.map(el => el.id)\r\n mainStore.setActiveElementIdList(newActiveElementIdList)\r\n }\r\n\r\n return {\r\n selectAllElement,\r\n }\r\n}","import { storeToRefs } from 'pinia'\r\nimport { useMainStore, useSlidesStore } from '@/store'\r\nimport type { PPTElement } from '@/types/slides'\r\nimport { KEYS } from '@/configs/hotkey'\r\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\r\n\r\nexport default () => {\r\n const slidesStore = useSlidesStore()\r\n const { activeElementIdList, activeGroupElementId } = storeToRefs(useMainStore())\r\n const { currentSlide } = storeToRefs(slidesStore)\r\n\r\n const { addHistorySnapshot } = useHistorySnapshot()\r\n\r\n /**\r\n * 将元素向指定方向移动指定的距离\r\n * 组合元素成员中,存在被选中可独立操作的元素时,优先移动该元素。否则默认移动所有被选中的元素\r\n * @param command 移动方向\r\n * @param step 移动距离\r\n */\r\n const moveElement = (command: string, step = 1) => {\r\n let newElementList: PPTElement[] = []\r\n\r\n const move = (el: PPTElement) => {\r\n let { left, top } = el\r\n switch (command) {\r\n case KEYS.LEFT: \r\n left = left - step\r\n break\r\n case KEYS.RIGHT: \r\n left = left + step\r\n break\r\n case KEYS.UP: \r\n top = top - step\r\n break\r\n case KEYS.DOWN: \r\n top = top + step\r\n break\r\n default: break\r\n }\r\n return { ...el, left, top }\r\n }\r\n\r\n if (activeGroupElementId.value) {\r\n newElementList = currentSlide.value.elements.map(el => {\r\n return activeGroupElementId.value === el.id ? move(el) : el\r\n })\r\n }\r\n else {\r\n newElementList = currentSlide.value.elements.map(el => {\r\n return activeElementIdList.value.includes(el.id) ? move(el) : el\r\n })\r\n }\r\n\r\n slidesStore.updateSlide({ elements: newElementList })\r\n addHistorySnapshot()\r\n }\r\n\r\n return {\r\n moveElement,\r\n }\r\n}","import { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { ElementOrderCommands } from '@/types/edit'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n const { currentSlide } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 获取组合元素层级范围\n * @param elementList 本页所有元素列表\n * @param combineElementList 组合元素列表\n */\n const getCombineElementLevelRange = (elementList: PPTElement[], combineElementList: PPTElement[]) => {\n return {\n minLevel: elementList.findIndex(_element => _element.id === combineElementList[0].id),\n maxLevel: elementList.findIndex(_element => _element.id === combineElementList[combineElementList.length - 1].id),\n }\n }\n\n /**\n * 上移一层\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveUpElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n // 如果被操作的元素是组合元素成员,需要将该组合全部成员一起进行移动\n if (element.groupId) {\n\n // 获取到该组合全部成员,以及所有成员的层级范围\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel, maxLevel } = getCombineElementLevelRange(elementList, combineElementList)\n\n // 已经处在顶层,无法继续移动\n if (maxLevel === elementList.length - 1) return\n\n // 通过组合成员范围的最大值,获取到该组合上一层的元素,然后将该组合元素从元素列表中移除(并缓存被移除的元素列表)\n // 若上层元素处在另一个组合中,则将上述被移除的组合元素插入到该上层组合上方\n // 若上层元素不处于任何分组中,则将上述被移除的组合元素插入到该上层元素上方\n const nextElement = copyOfElementList[maxLevel + 1]\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n\n if (nextElement.groupId) {\n const nextCombineElementList = copyOfElementList.filter(_element => _element.groupId === nextElement.groupId)\n copyOfElementList.splice(minLevel + nextCombineElementList.length, 0, ...movedElementList)\n }\n else copyOfElementList.splice(minLevel + 1, 0, ...movedElementList)\n }\n\n // 如果被操作的元素不是组合元素成员\n else {\n\n // 获取该元素在列表中的层级\n const level = elementList.findIndex(item => item.id === element.id)\n\n // 已经处在顶层,无法继续移动\n if (level === elementList.length - 1) return\n\n // 获取到该组合上一层的元素,然后将该组合元素从元素列表中移除(并缓存被移除的元素列表)\n const nextElement = copyOfElementList[level + 1]\n const movedElement = copyOfElementList.splice(level, 1)[0]\n\n // 通过组合成员范围的最大值,获取到该组合上一层的元素,然后将该组合元素从元素列表中移除(并缓存被移除的元素列表)\n // 若上层元素处在另一个组合中,则将上述被移除的组合元素插入到该上层组合上方\n // 若上层元素不处于任何分组中,则将上述被移除的组合元素插入到该上层元素上方\n if (nextElement.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === nextElement.groupId)\n copyOfElementList.splice(level + combineElementList.length, 0, movedElement)\n }\n else copyOfElementList.splice(level + 1, 0, movedElement)\n }\n\n return copyOfElementList\n }\n\n /**\n * 下移一层,操作方式同上移\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveDownElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n if (element.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel } = getCombineElementLevelRange(elementList, combineElementList)\n if (minLevel === 0) return\n\n const prevElement = copyOfElementList[minLevel - 1]\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n\n if (prevElement.groupId) {\n const prevCombineElementList = copyOfElementList.filter(_element => _element.groupId === prevElement.groupId)\n copyOfElementList.splice(minLevel - prevCombineElementList.length, 0, ...movedElementList)\n }\n else copyOfElementList.splice(minLevel - 1, 0, ...movedElementList)\n }\n\n else {\n const level = elementList.findIndex(item => item.id === element.id)\n if (level === 0) return\n\n const prevElement = copyOfElementList[level - 1]\n const movedElement = copyOfElementList.splice(level, 1)[0]\n\n if (prevElement.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === prevElement.groupId)\n copyOfElementList.splice(level - combineElementList.length, 0, movedElement)\n }\n else copyOfElementList.splice(level - 1, 0, movedElement)\n }\n\n return copyOfElementList\n }\n\n /**\n * 置顶层\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveTopElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n // 如果被操作的元素是组合元素成员,需要将该组合全部成员一起进行移动\n if (element.groupId) {\n\n // 获取到该组合全部成员,以及所有成员的层级范围\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel, maxLevel } = getCombineElementLevelRange(elementList, combineElementList)\n\n // 已经处在顶层,无法继续移动\n if (maxLevel === elementList.length - 1) return null\n\n // 将该组合元素从元素列表中移除,然后将被移除的元素添加到元素列表顶部\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n copyOfElementList.push(...movedElementList)\n }\n\n // 如果被操作的元素不是组合元素成员\n else {\n\n // 获取该元素在列表中的层级\n const level = elementList.findIndex(item => item.id === element.id)\n\n // 已经处在顶层,无法继续移动\n if (level === elementList.length - 1) return null\n\n // 将该组合元素从元素列表中移除,然后将被移除的元素添加到元素列表底部\n copyOfElementList.splice(level, 1)\n copyOfElementList.push(element)\n }\n\n return copyOfElementList\n }\n\n /**\n * 置底层,操作方式同置顶\n * @param elementList 本页所有元素列表\n * @param element 当前操作的元素\n */\n const moveBottomElement = (elementList: PPTElement[], element: PPTElement) => {\n const copyOfElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList))\n\n if (element.groupId) {\n const combineElementList = copyOfElementList.filter(_element => _element.groupId === element.groupId)\n const { minLevel } = getCombineElementLevelRange(elementList, combineElementList)\n if (minLevel === 0) return\n\n const movedElementList = copyOfElementList.splice(minLevel, combineElementList.length)\n copyOfElementList.unshift(...movedElementList)\n }\n\n else {\n const level = elementList.findIndex(item => item.id === element.id)\n if (level === 0) return\n\n copyOfElementList.splice(level, 1)\n copyOfElementList.unshift(element)\n }\n\n return copyOfElementList\n }\n\n /**\n * 调整元素层级\n * @param element 需要调整层级的元素\n * @param command 调整命令:上移、下移、置顶、置底\n */\n const orderElement = (element: PPTElement, command: ElementOrderCommands) => {\n let newElementList\n \n if (command === ElementOrderCommands.UP) newElementList = moveUpElement(currentSlide.value.elements, element)\n else if (command === ElementOrderCommands.DOWN) newElementList = moveDownElement(currentSlide.value.elements, element)\n else if (command === ElementOrderCommands.TOP) newElementList = moveTopElement(currentSlide.value.elements, element)\n else if (command === ElementOrderCommands.BOTTOM) newElementList = moveBottomElement(currentSlide.value.elements, element)\n\n if (!newElementList) return\n\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n return {\n orderElement,\n }\n}","// 进入全屏\nexport const enterFullscreen = () => {\n const docElm = document.documentElement\n if (docElm.requestFullscreen) docElm.requestFullscreen() \n else if (docElm.mozRequestFullScreen) docElm.mozRequestFullScreen() \n else if (docElm.webkitRequestFullScreen) docElm.webkitRequestFullScreen()\n else if (docElm.msRequestFullscreen) docElm.msRequestFullscreen()\n}\n\n// 退出全屏\nexport const exitFullscreen = () => {\n if (document.exitFullscreen) document.exitFullscreen()\n else if (document.mozCancelFullScreen) document.mozCancelFullScreen()\n else if (document.webkitExitFullscreen) document.webkitExitFullscreen()\n else if (document.msExitFullscreen) document.msExitFullscreen()\n}\n\n// 判断是否全屏\nexport const isFullscreen = () => {\n const fullscreenElement = \n document.fullscreenElement ||\n document.mozFullScreenElement ||\n document.webkitFullscreenElement ||\n document.msFullscreenElement ||\n document.webkitCurrentFullScreenElement\n return !!fullscreenElement\n}","import { useScreenStore, useSlidesStore } from '@/store'\nimport { enterFullscreen, exitFullscreen, isFullscreen } from '@/utils/fullscreen'\n\nexport default () => {\n const screenStore = useScreenStore()\n const slidesStore = useSlidesStore()\n\n // 进入放映状态(从当前页开始)\n const enterScreening = () => {\n enterFullscreen()\n screenStore.setScreening(true)\n }\n\n // 进入放映状态(从第一页开始)\n const enterScreeningFromStart = () => {\n slidesStore.updateSlideIndex(0)\n enterScreening()\n }\n\n // 退出放映状态\n const exitScreening = () => {\n screenStore.setScreening(false)\n if (isFullscreen()) exitFullscreen()\n }\n\n return {\n enterScreening,\n enterScreeningFromStart,\n exitScreening,\n }\n}","import { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\n\nexport default () => {\n const mainStore = useMainStore()\n const { canvasPercentage, canvasScale, canvasDragged } = storeToRefs(mainStore)\n\n const canvasScalePercentage = computed(() => Math.round(canvasScale.value * 100) + '%')\n\n /**\n * 缩放画布百分比\n * @param command 缩放命令:放大、缩小\n */\n const scaleCanvas = (command: '+' | '-') => {\n let percentage = canvasPercentage.value\n const step = 5\n const max = 200\n const min = 30\n if (command === '+' && percentage <= max) percentage += step\n if (command === '-' && percentage >= min) percentage -= step\n\n mainStore.setCanvasPercentage(percentage)\n }\n\n /**\n * 设置画布缩放比例\n * 但不是直接设置该值,而是通过设置画布可视区域百分比来动态计算\n * @param value 目标画布缩放比例\n */\n const setCanvasScalePercentage = (value: number) => {\n const percentage = Math.round(value / canvasScale.value * canvasPercentage.value) / 100\n mainStore.setCanvasPercentage(percentage)\n }\n\n /**\n * 重置画布尺寸和位置\n */\n const resetCanvas = () => {\n mainStore.setCanvasPercentage(90)\n if (canvasDragged) mainStore.setCanvasDragged(false)\n }\n\n return {\n canvasScalePercentage,\n setCanvasScalePercentage,\n scaleCanvas,\n resetCanvas,\n }\n}","import { onMounted, onUnmounted } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport { ElementOrderCommands } from '@/types/edit'\nimport { KEYS } from '@/configs/hotkey'\n\nimport useSlideHandler from './useSlideHandler'\nimport useLockElement from './useLockElement'\nimport useDeleteElement from './useDeleteElement'\nimport useCombineElement from './useCombineElement'\nimport useCopyAndPasteElement from './useCopyAndPasteElement'\nimport useSelectAllElement from './useSelectAllElement'\nimport useMoveElement from './useMoveElement'\nimport useOrderElement from './useOrderElement'\nimport useHistorySnapshot from './useHistorySnapshot'\nimport useScreening from './useScreening'\nimport useScaleCanvas from './useScaleCanvas'\n\nexport default () => {\n const mainStore = useMainStore()\n const keyboardStore = useKeyboardStore()\n const {\n activeElementIdList,\n disableHotkeys,\n handleElement,\n handleElementId,\n editorAreaFocus,\n thumbnailsFocus,\n showSearchPanel,\n } = storeToRefs(mainStore)\n const { currentSlide } = storeToRefs(useSlidesStore())\n const { ctrlKeyState, shiftKeyState, spaceKeyState } = storeToRefs(keyboardStore)\n\n const {\n updateSlideIndex,\n copySlide,\n createSlide,\n deleteSlide,\n cutSlide,\n copyAndPasteSlide,\n selectAllSlide,\n } = useSlideHandler()\n\n const { combineElements, uncombineElements } = useCombineElement()\n const { deleteElement } = useDeleteElement()\n const { lockElement } = useLockElement()\n const { copyElement, cutElement, quickCopyElement } = useCopyAndPasteElement()\n const { selectAllElement } = useSelectAllElement()\n const { moveElement } = useMoveElement()\n const { orderElement } = useOrderElement()\n const { redo, undo } = useHistorySnapshot()\n const { enterScreening, enterScreeningFromStart } = useScreening()\n const { scaleCanvas, resetCanvas } = useScaleCanvas()\n\n const copy = () => {\n if (activeElementIdList.value.length) copyElement()\n else if (thumbnailsFocus.value) copySlide()\n }\n\n const cut = () => {\n if (activeElementIdList.value.length) cutElement()\n else if (thumbnailsFocus.value) cutSlide()\n }\n\n const quickCopy = () => {\n if (activeElementIdList.value.length) quickCopyElement()\n else if (thumbnailsFocus.value) copyAndPasteSlide()\n }\n\n const selectAll = () => {\n if (editorAreaFocus.value) selectAllElement()\n if (thumbnailsFocus.value) selectAllSlide()\n }\n\n const lock = () => {\n if (!editorAreaFocus.value) return\n lockElement()\n }\n const combine = () => {\n if (!editorAreaFocus.value) return\n combineElements()\n }\n\n const uncombine = () => {\n if (!editorAreaFocus.value) return\n uncombineElements()\n }\n\n const remove = () => {\n if (activeElementIdList.value.length) deleteElement()\n else if (thumbnailsFocus.value) deleteSlide()\n }\n\n const move = (key: string) => {\n if (activeElementIdList.value.length) moveElement(key)\n else if (key === KEYS.UP || key === KEYS.DOWN) updateSlideIndex(key)\n }\n\n const moveSlide = (key: string) => {\n if (key === KEYS.PAGEUP) updateSlideIndex(KEYS.UP)\n else if (key === KEYS.PAGEDOWN) updateSlideIndex(KEYS.DOWN)\n }\n\n const order = (command: ElementOrderCommands) => {\n if (!handleElement.value) return\n orderElement(handleElement.value, command)\n }\n\n const create = () => {\n if (!thumbnailsFocus.value) return\n createSlide()\n }\n\n const tabActiveElement = () => {\n if (!currentSlide.value.elements.length) return\n if (!handleElementId.value) {\n const firstElement = currentSlide.value.elements[0]\n mainStore.setActiveElementIdList([firstElement.id])\n return\n }\n const currentIndex = currentSlide.value.elements.findIndex(el => el.id === handleElementId.value)\n const nextIndex = currentIndex >= currentSlide.value.elements.length - 1 ? 0 : currentIndex + 1\n const nextElementId = currentSlide.value.elements[nextIndex].id\n\n mainStore.setActiveElementIdList([nextElementId])\n }\n\n const keydownListener = (e: KeyboardEvent) => {\n const { ctrlKey, shiftKey, altKey, metaKey } = e\n const ctrlOrMetaKeyActive = ctrlKey || metaKey\n \n const key = e.key.toUpperCase()\n\n if (ctrlOrMetaKeyActive && !ctrlKeyState.value) keyboardStore.setCtrlKeyState(true)\n if (shiftKey && !shiftKeyState.value) keyboardStore.setShiftKeyState(true)\n if (!disableHotkeys.value && key === KEYS.SPACE) keyboardStore.setSpaceKeyState(true)\n\n \n if (ctrlOrMetaKeyActive && key === KEYS.P) {\n e.preventDefault()\n mainStore.setDialogForExport('pdf')\n return\n }\n if (shiftKey && key === KEYS.F5) {\n e.preventDefault()\n enterScreening()\n keyboardStore.setShiftKeyState(false)\n return\n }\n if (key === KEYS.F5) {\n e.preventDefault()\n enterScreeningFromStart()\n return\n }\n if (ctrlKey && key === KEYS.F) {\n e.preventDefault()\n mainStore.setSearchPanelState(!showSearchPanel.value)\n return\n }\n \n if (!editorAreaFocus.value && !thumbnailsFocus.value) return \n\n if (ctrlOrMetaKeyActive && key === KEYS.C) {\n if (disableHotkeys.value) return\n e.preventDefault()\n copy()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.X) {\n if (disableHotkeys.value) return\n e.preventDefault()\n cut()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.D) {\n if (disableHotkeys.value) return\n e.preventDefault()\n quickCopy()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.Z) {\n if (disableHotkeys.value) return\n e.preventDefault()\n undo()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.Y) {\n if (disableHotkeys.value) return\n e.preventDefault()\n redo()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.A) {\n if (disableHotkeys.value) return\n e.preventDefault()\n selectAll()\n }\n if (ctrlOrMetaKeyActive && key === KEYS.L) {\n if (disableHotkeys.value) return\n e.preventDefault()\n lock()\n }\n if (!shiftKey && ctrlOrMetaKeyActive && key === KEYS.G) {\n if (disableHotkeys.value) return\n e.preventDefault()\n combine()\n }\n if (shiftKey && ctrlOrMetaKeyActive && key === KEYS.G) {\n if (disableHotkeys.value) return\n e.preventDefault()\n uncombine()\n }\n if (altKey && key === KEYS.F) {\n if (disableHotkeys.value) return\n e.preventDefault()\n order(ElementOrderCommands.TOP)\n }\n if (altKey && key === KEYS.B) {\n if (disableHotkeys.value) return\n e.preventDefault()\n order(ElementOrderCommands.BOTTOM)\n }\n if (key === KEYS.DELETE || key === KEYS.BACKSPACE) {\n if (disableHotkeys.value) return\n e.preventDefault()\n remove()\n }\n if (key === KEYS.UP) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.UP)\n }\n if (key === KEYS.DOWN) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.DOWN)\n }\n if (key === KEYS.LEFT) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.LEFT)\n }\n if (key === KEYS.RIGHT) {\n if (disableHotkeys.value) return\n e.preventDefault()\n move(KEYS.RIGHT)\n }\n if (key === KEYS.PAGEUP) {\n if (disableHotkeys.value) return\n e.preventDefault()\n moveSlide(KEYS.PAGEUP)\n }\n if (key === KEYS.PAGEDOWN) {\n if (disableHotkeys.value) return\n e.preventDefault()\n moveSlide(KEYS.PAGEDOWN)\n }\n if (key === KEYS.ENTER) {\n if (disableHotkeys.value) return\n e.preventDefault()\n create()\n }\n if (key === KEYS.MINUS) {\n if (disableHotkeys.value) return\n e.preventDefault()\n scaleCanvas('-')\n }\n if (key === KEYS.EQUAL) {\n if (disableHotkeys.value) return\n e.preventDefault()\n scaleCanvas('+')\n }\n if (key === KEYS.DIGIT_0) {\n if (disableHotkeys.value) return\n e.preventDefault()\n resetCanvas()\n }\n if (key === KEYS.TAB) {\n if (disableHotkeys.value) return\n e.preventDefault()\n tabActiveElement()\n }\n }\n \n const keyupListener = () => {\n if (ctrlKeyState.value) keyboardStore.setCtrlKeyState(false)\n if (shiftKeyState.value) keyboardStore.setShiftKeyState(false)\n if (spaceKeyState.value) keyboardStore.setSpaceKeyState(false)\n }\n\n onMounted(() => {\n document.addEventListener('keydown', keydownListener)\n document.addEventListener('keyup', keyupListener)\n window.addEventListener('blur', keyupListener)\n })\n onUnmounted(() => {\n document.removeEventListener('keydown', keydownListener)\n document.removeEventListener('keyup', keyupListener)\n window.removeEventListener('blur', keyupListener)\n })\n}","import { onMounted, onUnmounted } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport { getImageDataURL } from '@/utils/image'\nimport usePasteTextClipboardData from './usePasteTextClipboardData'\nimport useCreateElement from './useCreateElement'\n\nexport default () => {\n const { editorAreaFocus, thumbnailsFocus, disableHotkeys } = storeToRefs(useMainStore())\n\n const { pasteTextClipboardData } = usePasteTextClipboardData()\n const { createImageElement } = useCreateElement()\n\n // 粘贴图片到幻灯片元素\n const pasteImageFile = (imageFile: File) => {\n getImageDataURL(imageFile).then(dataURL => createImageElement(dataURL))\n }\n\n /**\n * 粘贴事件监听\n * @param e ClipboardEvent\n */\n const pasteListener = (e: ClipboardEvent) => {\n if (!editorAreaFocus.value && !thumbnailsFocus.value) return\n if (disableHotkeys.value) return\n\n if (!e.clipboardData) return\n\n const clipboardDataItems = e.clipboardData.items\n const clipboardDataFirstItem = clipboardDataItems[0]\n\n if (!clipboardDataFirstItem) return\n\n // 如果剪贴板内有图片,优先尝试读取图片\n for (const item of clipboardDataItems) {\n if (item.kind === 'file' && item.type.indexOf('image') !== -1) {\n const imageFile = item.getAsFile()\n if (imageFile) pasteImageFile(imageFile)\n return\n }\n }\n \n // 如果剪贴板内没有图片,但有文字内容,尝试解析文字内容\n if (clipboardDataFirstItem.kind === 'string' && clipboardDataFirstItem.type === 'text/plain') {\n clipboardDataFirstItem.getAsString(text => pasteTextClipboardData(text))\n }\n }\n\n onMounted(() => {\n document.addEventListener('paste', pasteListener)\n })\n onUnmounted(() => {\n document.removeEventListener('paste', pasteListener)\n })\n}","import { ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { parse, type Shape, type Element, type ChartItem } from 'pptxtojson'\nimport { nanoid } from 'nanoid'\nimport { useSlidesStore } from '@/store'\nimport { decrypt } from '@/utils/crypto'\nimport { type ShapePoolItem, SHAPE_LIST, SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'\nimport message from '@/utils/message'\nimport type {\n Slide,\n TableCellStyle,\n TableCell,\n ChartType,\n ChartOptions,\n SlideBackground,\n PPTShapeElement,\n PPTLineElement,\n ShapeTextAlign,\n PPTTextElement,\n} from '@/types/slides'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n const { theme } = storeToRefs(useSlidesStore())\n\n const { addSlidesFromData, isEmptySlide } = useAddSlidesOrElements()\n\n const exporting = ref(false)\n\n // 导入pptist文件\n const importSpecificFile = (files: FileList, cover = false) => {\n const file = files[0]\n\n const reader = new FileReader()\n reader.addEventListener('load', () => {\n try {\n const slides = JSON.parse(decrypt(reader.result as string))\n if (cover) slidesStore.setSlides(slides)\n else if (isEmptySlide.value) slidesStore.setSlides(slides)\n else addSlidesFromData(slides)\n }\n catch {\n message.error('无法正确读取 / 解析该文件')\n }\n })\n reader.readAsText(file)\n }\n\n const parseLineElement = (el: Shape): PPTLineElement => {\n let start: [number, number] = [0, 0]\n let end: [number, number] = [0, 0]\n\n if (!el.isFlipV && !el.isFlipH) { // 右下\n start = [0, 0]\n end = [el.width, el.height]\n }\n else if (el.isFlipV && el.isFlipH) { // 左上\n start = [el.width, el.height]\n end = [0, 0]\n }\n else if (el.isFlipV && !el.isFlipH) { // 右上\n start = [0, el.height]\n end = [el.width, 0]\n }\n else { // 左下\n start = [el.width, 0]\n end = [0, el.height]\n }\n return {\n type: 'line',\n id: nanoid(10),\n width: el.borderWidth || 1,\n left: el.left,\n top: el.top,\n start,\n end,\n style: el.borderType === 'solid' ? 'solid' : 'dashed',\n color: el.borderColor,\n points: ['', el.shapType === 'straightConnector1' ? 'arrow' : '']\n }\n }\n\n // 导入PPTX文件\n const importPPTXFile = (files: FileList) => {\n const file = files[0]\n if (!file) return\n\n exporting.value = true\n\n const shapeList: ShapePoolItem[] = []\n for (const item of SHAPE_LIST) {\n shapeList.push(...item.children)\n }\n \n const reader = new FileReader()\n reader.onload = async e => {\n const json = await parse(e.target!.result as ArrayBuffer, {\n slideFactor: 75 / 914400,\n fontsizeFactor: 100 / 98,\n })\n\n const width = json.size.width\n const scale = VIEWPORT_SIZE / width\n\n const slides: Slide[] = []\n for (const item of json.slides) {\n const { type, value } = item.fill\n let background: SlideBackground\n if (type === 'image') {\n background = {\n type: 'image',\n image: value.picBase64,\n imageSize: 'cover',\n }\n }\n else if (type === 'gradient') {\n background = {\n type: 'gradient',\n gradientType: 'linear',\n gradientColor: [value.colors[0].color, value.colors[value.colors.length - 1].color],\n gradientRotate: value.rot,\n }\n }\n else {\n background = {\n type: 'solid',\n color: value,\n }\n }\n\n const slide: Slide = {\n id: nanoid(10),\n elements: [],\n background,\n }\n\n const parseElements = (elements: Element[]) => {\n for (const el of elements) {\n el.width = el.width * scale\n el.height = el.height * scale\n el.left = el.left * scale\n el.top = el.top * scale\n \n if (el.type === 'text') {\n const textEl: PPTTextElement = {\n type: 'text',\n id: nanoid(10),\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n rotate: el.rotate,\n defaultFontName: theme.value.fontName,\n defaultColor: theme.value.fontColor,\n content: el.content,\n lineHeight: 1,\n outline: {\n color: el.borderColor,\n width: el.borderWidth,\n style: el.borderType === 'solid' ? 'solid' : 'dashed',\n },\n fill: el.fillColor,\n vertical: el.isVertical,\n }\n if (el.shadow) textEl.shadow = el.shadow\n slide.elements.push(textEl)\n }\n else if (el.type === 'image') {\n slide.elements.push({\n type: 'image',\n id: nanoid(10),\n src: el.src,\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n fixedRatio: true,\n rotate: el.rotate,\n })\n }\n else if (el.type === 'audio') {\n slide.elements.push({\n type: 'audio',\n id: nanoid(10),\n src: el.blob,\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n rotate: 0,\n fixedRatio: false,\n color: theme.value.themeColor,\n loop: false,\n autoplay: false,\n })\n }\n else if (el.type === 'video') {\n slide.elements.push({\n type: 'video',\n id: nanoid(10),\n src: (el.blob || el.src)!,\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n rotate: 0,\n autoplay: false,\n })\n }\n else if (el.type === 'shape') {\n if (el.shapType === 'line' || /Connector/.test(el.shapType)) {\n const lineElement = parseLineElement(el)\n slide.elements.push(lineElement)\n }\n else {\n const shape = shapeList.find(item => item.pptxShapeType === el.shapType)\n\n const vAlignMap: { [key: string]: ShapeTextAlign } = {\n 'mid': 'middle',\n 'down': 'bottom',\n 'up': 'top',\n }\n \n const element: PPTShapeElement = {\n type: 'shape',\n id: nanoid(10),\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n viewBox: [200, 200],\n path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',\n fill: el.fillColor || 'none',\n fixedRatio: false,\n rotate: el.rotate,\n outline: {\n color: el.borderColor,\n width: el.borderWidth,\n style: el.borderType === 'solid' ? 'solid' : 'dashed',\n },\n text: {\n content: el.content,\n defaultFontName: theme.value.fontName,\n defaultColor: theme.value.fontColor,\n align: vAlignMap[el.vAlign] || 'middle',\n },\n flipH: el.isFlipH,\n flipV: el.isFlipV,\n }\n if (el.shadow) element.shadow = el.shadow\n \n if (shape) {\n element.path = shape.path\n element.viewBox = shape.viewBox\n \n if (shape.pathFormula) {\n element.pathFormula = shape.pathFormula\n element.viewBox = [el.width, el.height]\n \n const pathFormula = SHAPE_PATH_FORMULAS[shape.pathFormula]\n if ('editable' in pathFormula) {\n element.path = pathFormula.formula(el.width, el.height, pathFormula.defaultValue)\n element.keypoint = pathFormula.defaultValue\n }\n else element.path = pathFormula.formula(el.width, el.height)\n }\n }\n if (el.shapType === 'custom') {\n element.special = true\n element.path = el.path!\n element.viewBox = [el.width, el.height]\n }\n \n slide.elements.push(element)\n }\n }\n else if (el.type === 'table') {\n const row = el.data.length\n const col = el.data[0].length\n \n const style: TableCellStyle = {\n fontname: theme.value.fontName,\n color: theme.value.fontColor,\n }\n const data: TableCell[][] = []\n for (let i = 0; i < row; i++) {\n const rowCells: TableCell[] = []\n for (let j = 0; j < col; j++) {\n const cellData = el.data[i][j]\n rowCells.push({\n id: nanoid(10),\n colspan: cellData.colSpan || 1,\n rowspan: cellData.rowSpan || 1,\n text: cellData.text,\n style,\n })\n }\n data.push(rowCells)\n }\n \n const colWidths: number[] = new Array(col).fill(1 / col)\n \n slide.elements.push({\n type: 'table',\n id: nanoid(10),\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n colWidths,\n rotate: 0,\n data,\n outline: {\n width: 2,\n style: 'solid',\n color: '#eeece1',\n },\n theme: {\n color: el.themeColor,\n rowHeader: true,\n rowFooter: false,\n colHeader: false,\n colFooter: false,\n },\n cellMinHeight: 36,\n })\n }\n else if (el.type === 'chart') {\n let labels: string[]\n let legends: string[]\n let series: number[][]\n \n if (el.chartType === 'scatterChart' || el.chartType === 'bubbleChart') {\n const data = el.data\n labels = data[0].map(item => item + '')\n legends = ['系列1']\n series = [data[1]]\n }\n else {\n const data = el.data as ChartItem[]\n labels = Object.values(data[0].xlabels)\n legends = data.map(item => item.key)\n series = data.map(item => item.values.map(v => v.y))\n }\n \n const options: ChartOptions = {}\n \n let chartType: ChartType = 'bar'\n\n switch (el.chartType) {\n case 'barChart':\n case 'bar3DChart':\n chartType = 'bar'\n if (el.barDir === 'bar') options.horizontalBars = true\n if (el.grouping === 'stacked' || el.grouping === 'percentStacked') options.stackBars = true\n break\n case 'lineChart':\n case 'line3DChart':\n case 'areaChart':\n case 'area3DChart':\n case 'scatterChart':\n case 'bubbleChart':\n chartType = 'line'\n if (el.chartType === 'areaChart' || el.chartType === 'area3DChart') options.showArea = true\n if (el.chartType === 'scatterChart' || el.chartType === 'bubbleChart') options.showLine = false\n break\n case 'pieChart':\n case 'pie3DChart':\n case 'doughnutChart':\n chartType = 'pie'\n if (el.chartType === 'doughnutChart') options.donut = true\n break\n default:\n }\n \n slide.elements.push({\n type: 'chart',\n id: nanoid(10),\n chartType: chartType,\n width: el.width,\n height: el.height,\n left: el.left,\n top: el.top,\n rotate: 0,\n themeColor: [theme.value.themeColor],\n gridColor: theme.value.fontColor,\n data: {\n labels,\n legends,\n series,\n },\n options,\n })\n }\n else if (el.type === 'group' || el.type === 'diagram') {\n const elements = el.elements.map(_el => ({\n ..._el,\n left: _el.left + el.left,\n top: _el.top + el.top,\n }))\n parseElements(elements)\n }\n }\n }\n parseElements(item.elements)\n slides.push(slide)\n }\n if (isEmptySlide.value) slidesStore.setSlides(slides)\n else addSlidesFromData(slides)\n exporting.value = false\n }\n reader.readAsArrayBuffer(file)\n }\n\n return {\n importSpecificFile,\n importPPTXFile,\n exporting,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-a0322054\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"hotkey-doc\" }\nconst _hoisted_2 = { class: \"title\" }\nconst _hoisted_3 = { class: \"label\" }\nconst _hoisted_4 = { class: \"value\" }\n\nimport { HOTKEY_DOC } from '@/configs/hotkey' \n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'HotkeyDoc',\n setup(__props) {\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(HOTKEY_DOC), (item) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: item.type\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(item.type), 1),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.children, (hotkey) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"hotkey-item\",\n key: hotkey.label\n }, [\n _createElementVNode(\"div\", _hoisted_3, _toDisplayString(hotkey.label), 1),\n _createElementVNode(\"div\", _hoisted_4, _toDisplayString(hotkey.value), 1)\n ]))\n }), 128))\n ], 64))\n }), 128))\n ]))\n}\n}\n\n})","import script from \"./HotkeyDoc.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./HotkeyDoc.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./HotkeyDoc.vue?vue&type=style&index=0&id=a0322054&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-a0322054\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-64bedb34\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"accept\"]\n\nimport { ref } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'FileInput',\n props: {\n accept: { default: 'image/*' }\n },\n emits: [\"change\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit\n\nconst inputRef = ref()\n\nconst handleClick = () => {\n if (!inputRef.value) return\n inputRef.value.value = ''\n inputRef.value.click()\n}\nconst handleChange = (e: Event) => {\n const files = (e.target as HTMLInputElement).files\n if (files) emit('change', files)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"file-input\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (handleClick()))\n }, [\n _renderSlot(_ctx.$slots, \"default\"),\n _createElementVNode(\"input\", {\n class: \"input\",\n type: \"file\",\n name: \"upload\",\n ref_key: \"inputRef\",\n ref: inputRef,\n accept: _ctx.accept,\n onChange: _cache[0] || (_cache[0] = $event => handleChange($event))\n }, null, 40, _hoisted_1)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./FileInput.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./FileInput.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./FileInput.vue?vue&type=style&index=0&id=64bedb34&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-64bedb34\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-a5c6b41c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"fullscreen-spin\"\n}\nconst _hoisted_2 = { class: \"spin\" }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"spinner\" }, null, -1))\nconst _hoisted_4 = { class: \"text\" }\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'FullscreenSpin',\n props: {\n loading: { type: Boolean, default: false },\n tip: { default: '' }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.loading)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _hoisted_3,\n _createElementVNode(\"div\", _hoisted_4, _toDisplayString(_ctx.tip), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./FullscreenSpin.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./FullscreenSpin.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./FullscreenSpin.vue?vue&type=style&index=0&id=a5c6b41c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-a5c6b41c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, vShow as _vShow, normalizeClass as _normalizeClass, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx, Teleport as _Teleport, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-749dadac\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"header\" }\n\nimport { computed, ref, type CSSProperties } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Drawer',\n props: {\n visible: { type: Boolean },\n width: { default: 320 },\n contentStyle: {},\n placement: { default: 'right' }\n },\n emits: [\"update:visible\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst contentVisible = ref(false)\n\nconst contentStyle = computed(() => {\n return {\n width: props.width + 'px',\n ...(props.contentStyle || {})\n }\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconClose = _resolveComponent(\"IconClose\")!\n\n return (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createVNode(_Transition, {\n name: `drawer-slide-${_ctx.placement}`,\n onAfterLeave: _cache[1] || (_cache[1] = ($event: any) => (contentVisible.value = false)),\n onBeforeEnter: _cache[2] || (_cache[2] = ($event: any) => (contentVisible.value = true))\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", {\n class: _normalizeClass(['drawer', _ctx.placement]),\n style: _normalizeStyle({ width: props.width + 'px' })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"title\"),\n _createElementVNode(\"span\", {\n class: \"close-btn\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('update:visible', false)))\n }, [\n _createVNode(_component_IconClose)\n ])\n ]),\n (contentVisible.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"content\",\n style: _normalizeStyle(contentStyle.value)\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 4))\n : _createCommentVNode(\"\", true)\n ], 6), [\n [_vShow, _ctx.visible]\n ])\n ]),\n _: 3\n }, 8, [\"name\"])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Drawer.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Drawer.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Drawer.vue?vue&type=style&index=0&id=749dadac&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-749dadac\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, withKeys as _withKeys, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-a97ba0dc\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"prefix\" }\nconst _hoisted_2 = [\"disabled\", \"value\", \"placeholder\"]\nconst _hoisted_3 = { class: \"suffix\" }\n\nimport { ref } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Input',\n props: {\n value: {},\n disabled: { type: Boolean, default: false },\n placeholder: { default: '' }\n },\n emits: [\"update:value\", \"input\", \"change\", \"blur\", \"focus\", \"enter\"],\n setup(__props: any, { expose: __expose, emit: __emit }) {\n\n\n\nconst emit = __emit\n\nconst focused = ref(false)\n\nconst handleInput = (e: Event) => {\n emit('update:value', (e.target as HTMLInputElement).value)\n}\nconst handleBlur = (e: Event) => {\n focused.value = false\n emit('blur', e)\n}\nconst handleFocus = (e: Event) => {\n focused.value = true\n emit('focus', e)\n}\n\nconst inputRef = ref()\nconst focus = () => {\n if (inputRef.value) inputRef.value.focus()\n}\n\n__expose({\n focus,\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"input\", {\n 'disabled': _ctx.disabled,\n 'focused': focused.value,\n }])\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prefix\")\n ]),\n _createElementVNode(\"input\", {\n type: \"text\",\n ref_key: \"inputRef\",\n ref: inputRef,\n disabled: _ctx.disabled,\n value: _ctx.value,\n placeholder: _ctx.placeholder,\n onInput: _cache[0] || (_cache[0] = $event => handleInput($event)),\n onFocus: _cache[1] || (_cache[1] = $event => handleFocus($event)),\n onBlur: _cache[2] || (_cache[2] = $event => handleBlur($event)),\n onChange: _cache[3] || (_cache[3] = $event => emit('change', $event)),\n onKeydown: _cache[4] || (_cache[4] = _withKeys($event => emit('enter', $event), [\"enter\"]))\n }, null, 40, _hoisted_2),\n _createElementVNode(\"span\", _hoisted_3, [\n _renderSlot(_ctx.$slots, \"suffix\")\n ])\n ], 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./Input.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Input.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Input.vue?vue&type=style&index=0&id=a97ba0dc&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-a97ba0dc\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { type CSSProperties, onMounted, ref, watch, computed } from 'vue'\nimport tippy, { type Instance, type Placement } from 'tippy.js'\n\nimport 'tippy.js/animations/scale.css'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Popover',\n props: {\n value: { type: Boolean, default: false },\n trigger: { default: 'click' },\n placement: { default: 'bottom' },\n appendTo: {},\n contentStyle: {},\n center: { type: Boolean, default: false }\n },\n emits: [\"update:value\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst instance = ref()\nconst triggerRef = ref()\nconst contentRef = ref()\nconst contentVisible = ref(false)\n\nconst contentStyle = computed(() => {\n return props.contentStyle || {}\n})\n\nwatch(() => props.value, () => {\n if (!instance.value) return\n if (props.value) instance.value.show()\n else instance.value.hide()\n})\n\nonMounted(() => {\n instance.value = tippy(triggerRef.value!, {\n content: contentRef.value!,\n allowHTML: true,\n trigger: props.trigger,\n placement: props.placement,\n interactive: true,\n appendTo: props.appendTo || document.body,\n maxWidth: 'none',\n offset: [0, 8],\n duration: 200,\n animation: 'scale',\n theme: 'popover',\n onShow() {\n contentVisible.value = true\n },\n onShown() {\n if (!props.value) emit('update:value', true)\n },\n onHidden() {\n if (props.value) emit('update:value', false)\n contentVisible.value = false\n },\n })\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"popover\", { 'center': _ctx.center }]),\n ref_key: \"triggerRef\",\n ref: triggerRef\n }, [\n _createElementVNode(\"div\", {\n class: \"popover-content\",\n style: _normalizeStyle(contentStyle.value),\n ref_key: \"contentRef\",\n ref: contentRef\n }, [\n (contentVisible.value)\n ? _renderSlot(_ctx.$slots, \"content\", { key: 0 })\n : _createCommentVNode(\"\", true)\n ], 4),\n _renderSlot(_ctx.$slots, \"default\")\n ], 2))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./Popover.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Popover.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Popover.vue?vue&type=style&index=0&id=70fabe9a&lang=scss&scoped=true\"\nimport \"./Popover.vue?vue&type=style&index=1&id=70fabe9a&lang=scss\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-70fabe9a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'PopoverMenuItem',\n props: {\n center: { type: Boolean, default: false }\n },\n emits: [\"click\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"popover-menu-item\", { 'center': _ctx.center }]),\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('click')))\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./PopoverMenuItem.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./PopoverMenuItem.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./PopoverMenuItem.vue?vue&type=style&index=0&id=2f137c4f&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2f137c4f\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, unref as _unref, resolveComponent as _resolveComponent, createElementVNode as _createElementVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-0b9f8c7b\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"editor-header\" }\nconst _hoisted_2 = { class: \"left\" }\nconst _hoisted_3 = { class: \"menu-item\" }\nconst _hoisted_4 = { class: \"title\" }\nconst _hoisted_5 = [\"title\"]\nconst _hoisted_6 = { class: \"right\" }\nconst _hoisted_7 = { class: \"group-menu-item\" }\nconst _hoisted_8 = { class: \"arrow-btn\" }\nconst _hoisted_9 = {\n class: \"github-link\",\n href: \"https://github.com/pipipi-pikachu/PPTist\",\n target: \"_blank\"\n}\nconst _hoisted_10 = { class: \"menu-item\" }\n\nimport { nextTick, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport useScreening from '@/hooks/useScreening'\nimport useImport from '@/hooks/useImport'\nimport useSlideHandler from '@/hooks/useSlideHandler'\nimport type { DialogForExportTypes } from '@/types/export'\n\nimport HotkeyDoc from './HotkeyDoc.vue'\nimport FileInput from '@/components/FileInput.vue'\nimport FullscreenSpin from '@/components/FullscreenSpin.vue'\nimport Drawer from '@/components/Drawer.vue'\nimport Input from '@/components/Input.vue'\nimport Popover from '@/components/Popover.vue'\nimport PopoverMenuItem from '@/components/PopoverMenuItem.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n setup(__props) {\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { title } = storeToRefs(slidesStore)\nconst { enterScreening, enterScreeningFromStart } = useScreening()\nconst { importSpecificFile, importPPTXFile, exporting } = useImport()\nconst { resetSlides } = useSlideHandler()\n\nconst mainMenuVisible = ref(false)\nconst hotkeyDrawerVisible = ref(false)\nconst editingTitle = ref(false)\nconst titleInputRef = ref>()\nconst titleValue = ref('')\n\nconst startEditTitle = () => {\n titleValue.value = title.value\n editingTitle.value = true\n nextTick(() => titleInputRef.value?.focus())\n}\n\nconst handleUpdateTitle = () => {\n slidesStore.setTitle(titleValue.value)\n editingTitle.value = false\n}\n\nconst goLink = (url: string) => {\n window.open(url)\n mainMenuVisible.value = false\n}\n\nconst setDialogForExport = (type: DialogForExportTypes) => {\n mainStore.setDialogForExport(type)\n mainMenuVisible.value = false\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconHamburgerButton = _resolveComponent(\"IconHamburgerButton\")!\n const _component_IconPpt = _resolveComponent(\"IconPpt\")!\n const _component_IconDown = _resolveComponent(\"IconDown\")!\n const _component_IconDownload = _resolveComponent(\"IconDownload\")!\n const _component_IconGithub = _resolveComponent(\"IconGithub\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Popover, {\n trigger: \"click\",\n placement: \"bottom-start\",\n value: mainMenuVisible.value,\n \"onUpdate:value\": _cache[7] || (_cache[7] = ($event: any) => ((mainMenuVisible).value = $event))\n }, {\n content: _withCtx(() => [\n _createVNode(FileInput, {\n accept: \".pptist\",\n onChange: _cache[0] || (_cache[0] = files => {\n _unref(importSpecificFile)(files)\n mainMenuVisible.value = false\n })\n }, {\n default: _withCtx(() => [\n _createVNode(PopoverMenuItem, null, {\n default: _withCtx(() => [\n _createTextVNode(\"导入 pptist 文件\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(FileInput, {\n accept: \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n onChange: _cache[1] || (_cache[1] = files => {\n _unref(importPPTXFile)(files)\n mainMenuVisible.value = false\n })\n }, {\n default: _withCtx(() => [\n _createVNode(PopoverMenuItem, null, {\n default: _withCtx(() => [\n _createTextVNode(\"导入 pptx 文件(测试版)\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (setDialogForExport('pptx')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"导出文件\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[3] || (_cache[3] = ($event: any) => {_unref(resetSlides)(); mainMenuVisible.value = false})\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"重置幻灯片\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[4] || (_cache[4] = ($event: any) => (goLink('https://github.com/pipipi-pikachu/PPTist/issues')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"意见反馈\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (goLink('https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Q&A.md')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"常见问题\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[6] || (_cache[6] = ($event: any) => {mainMenuVisible.value = false; hotkeyDrawerVisible.value = true})\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"快捷键\")\n ]),\n _: 1\n })\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(_component_IconHamburgerButton, { class: \"icon\" })\n ])\n ]),\n _: 1\n }, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_4, [\n (editingTitle.value)\n ? (_openBlock(), _createBlock(Input, {\n key: 0,\n class: \"title-input\",\n ref_key: \"titleInputRef\",\n ref: titleInputRef,\n value: titleValue.value,\n \"onUpdate:value\": _cache[8] || (_cache[8] = ($event: any) => ((titleValue).value = $event)),\n onBlur: _cache[9] || (_cache[9] = ($event: any) => (handleUpdateTitle()))\n }, null, 8, [\"value\"]))\n : (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"title-text\",\n onClick: _cache[10] || (_cache[10] = ($event: any) => (startEditTitle())),\n title: _unref(title)\n }, _toDisplayString(_unref(title)), 9, _hoisted_5))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", _hoisted_7, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"menu-item\",\n onClick: _cache[11] || (_cache[11] = ($event: any) => (_unref(enterScreening)()))\n }, [\n _createVNode(_component_IconPpt, { class: \"icon\" })\n ])), [\n [_directive_tooltip, '幻灯片放映']\n ]),\n _createVNode(Popover, {\n trigger: \"click\",\n center: \"\"\n }, {\n content: _withCtx(() => [\n _createVNode(PopoverMenuItem, {\n onClick: _cache[12] || (_cache[12] = ($event: any) => (_unref(enterScreeningFromStart)()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"从头开始\")\n ]),\n _: 1\n }),\n _createVNode(PopoverMenuItem, {\n onClick: _cache[13] || (_cache[13] = ($event: any) => (_unref(enterScreening)()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"从当前页开始\")\n ]),\n _: 1\n })\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_8, [\n _createVNode(_component_IconDown, { class: \"arrow\" })\n ])\n ]),\n _: 1\n })\n ]),\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"menu-item\",\n onClick: _cache[14] || (_cache[14] = ($event: any) => (setDialogForExport('pptx')))\n }, [\n _createVNode(_component_IconDownload, { class: \"icon\" })\n ])), [\n [_directive_tooltip, '导出']\n ]),\n _createElementVNode(\"a\", _hoisted_9, [\n _createElementVNode(\"div\", _hoisted_10, [\n _createVNode(_component_IconGithub, { class: \"icon\" })\n ])\n ])\n ]),\n _createVNode(Drawer, {\n width: 320,\n visible: hotkeyDrawerVisible.value,\n \"onUpdate:visible\": _cache[15] || (_cache[15] = ($event: any) => ((hotkeyDrawerVisible).value = $event)),\n placement: \"right\"\n }, {\n default: _withCtx(() => [\n _createVNode(HotkeyDoc)\n ]),\n _: 1\n }, 8, [\"visible\"]),\n _createVNode(FullscreenSpin, {\n loading: _unref(exporting),\n tip: \"正在导入...\"\n }, null, 8, [\"loading\"])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=0b9f8c7b&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-0b9f8c7b\"]])\n\nexport default __exports__","import type { InjectionKey, Ref } from 'vue'\n\nexport type SlideScale = Ref\nexport type SlideId = Ref\nexport type RadioGroupValue = {\n value: Ref\n updateValue: (value: string) => void\n}\n\nexport const injectKeySlideScale: InjectionKey = Symbol()\nexport const injectKeySlideId: InjectionKey = Symbol()\nexport const injectKeyRadioGroupValue: InjectionKey = Symbol()","// 清除文字选区\nexport const removeAllRanges = () => {\n const selection = window.getSelection()\n selection && selection.removeAllRanges()\n}","import { ref, computed, onMounted, onUnmounted, watch, type Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\n\nexport default (canvasRef: Ref) => {\n const viewportLeft = ref(0)\n const viewportTop = ref(0)\n\n const mainStore = useMainStore()\n const { canvasPercentage, canvasDragged } = storeToRefs(mainStore)\n const { viewportRatio } = storeToRefs(useSlidesStore())\n\n // 初始化画布可视区域的位置\n const initViewportPosition = () => {\n if (!canvasRef.value) return\n const canvasWidth = canvasRef.value.clientWidth\n const canvasHeight = canvasRef.value.clientHeight\n\n if (canvasHeight / canvasWidth > viewportRatio.value) {\n const viewportActualWidth = canvasWidth * (canvasPercentage.value / 100)\n mainStore.setCanvasScale(viewportActualWidth / VIEWPORT_SIZE)\n viewportLeft.value = (canvasWidth - viewportActualWidth) / 2\n viewportTop.value = (canvasHeight - viewportActualWidth * viewportRatio.value) / 2\n }\n else {\n const viewportActualHeight = canvasHeight * (canvasPercentage.value / 100)\n mainStore.setCanvasScale(viewportActualHeight / (VIEWPORT_SIZE * viewportRatio.value))\n viewportLeft.value = (canvasWidth - viewportActualHeight / viewportRatio.value) / 2\n viewportTop.value = (canvasHeight - viewportActualHeight) / 2\n }\n }\n\n // 更新画布可视区域的位置\n const setViewportPosition = (newValue: number, oldValue: number) => {\n if (!canvasRef.value) return\n const canvasWidth = canvasRef.value.clientWidth\n const canvasHeight = canvasRef.value.clientHeight\n\n const newViewportActualWidth = canvasWidth * (newValue / 100)\n const oldViewportActualWidth = canvasWidth * (oldValue / 100)\n const newViewportActualHeight = canvasHeight * (newValue / 100)\n const oldViewportActualHeight = canvasHeight * (oldValue / 100)\n\n if (canvasHeight / canvasWidth > viewportRatio.value) {\n mainStore.setCanvasScale(newViewportActualWidth / VIEWPORT_SIZE)\n }\n else {\n mainStore.setCanvasScale(newViewportActualHeight / (VIEWPORT_SIZE * viewportRatio.value))\n }\n viewportLeft.value = viewportLeft.value - (newViewportActualWidth - oldViewportActualWidth) / 2\n viewportTop.value = viewportTop.value - (newViewportActualHeight - oldViewportActualHeight) / 2\n }\n\n // 可视区域缩放或比例变化时,重置/更新可视区域的位置\n watch(canvasPercentage, setViewportPosition)\n watch(viewportRatio, initViewportPosition)\n\n // 画布拖拽状态改变(复原)时,重置可视区域的位置\n watch(canvasDragged, () => {\n if (!canvasDragged.value) initViewportPosition()\n })\n\n // 画布可视区域位置和大小的样式\n const viewportStyles = computed(() => ({\n width: VIEWPORT_SIZE,\n height: VIEWPORT_SIZE * viewportRatio.value,\n left: viewportLeft.value,\n top: viewportTop.value,\n }))\n\n // 监听画布尺寸发生变化时,重置可视区域的位置\n const resizeObserver = new ResizeObserver(initViewportPosition)\n\n onMounted(() => {\n if (canvasRef.value) resizeObserver.observe(canvasRef.value)\n })\n onUnmounted(() => {\n if (canvasRef.value) resizeObserver.unobserve(canvasRef.value)\n })\n\n // 拖拽画布\n const dragViewport = (e: MouseEvent) => {\n let isMouseDown = true\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const originLeft = viewportLeft.value\n const originTop = viewportTop.value\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n viewportLeft.value = originLeft + (currentPageX - startPageX)\n viewportTop.value = originTop + (currentPageY - startPageY)\n }\n\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n mainStore.setCanvasDragged(true)\n }\n }\n\n return {\n viewportStyles,\n dragViewport,\n }\n}","import { type Ref, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { getElementRange } from '@/utils/element'\n\nexport default (elementList: Ref, viewportRef: Ref) => {\n const mainStore = useMainStore()\n const { canvasScale, hiddenElementIdList } = storeToRefs(mainStore)\n\n const mouseSelectionVisible = ref(false)\n const mouseSelectionQuadrant = ref(1)\n const mouseSelection = ref({\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n })\n\n // 更新鼠标框选范围\n const updateMouseSelection = (e: MouseEvent) => {\n if (!viewportRef.value) return\n\n let isMouseDown = true\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const minSelectionRange = 5\n \n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const left = (startPageX - viewportRect.x) / canvasScale.value\n const top = (startPageY - viewportRect.y) / canvasScale.value\n\n // 确定框选的起始位置和其他默认值初始化\n mouseSelection.value = {\n top: top,\n left: left,\n width: 0,\n height: 0,\n }\n mouseSelectionVisible.value = false\n mouseSelectionQuadrant.value = 4\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n const offsetWidth = (currentPageX - startPageX) / canvasScale.value\n const offsetHeight = (currentPageY - startPageY) / canvasScale.value\n\n const width = Math.abs(offsetWidth)\n const height = Math.abs(offsetHeight)\n\n if ( width < minSelectionRange || height < minSelectionRange ) return\n \n // 计算鼠标框选(移动)的方向\n // 按四个象限的位置区分,如右下角为第四象限\n let quadrant = 0\n if ( offsetWidth > 0 && offsetHeight > 0 ) quadrant = 4\n else if ( offsetWidth < 0 && offsetHeight < 0 ) quadrant = 2\n else if ( offsetWidth > 0 && offsetHeight < 0 ) quadrant = 1\n else if ( offsetWidth < 0 && offsetHeight > 0 ) quadrant = 3\n\n // 更新框选范围\n mouseSelection.value = {\n ...mouseSelection.value,\n width: width,\n height: height,\n }\n mouseSelectionVisible.value = true\n mouseSelectionQuadrant.value = quadrant\n }\n\n document.onmouseup = () => {\n document.onmousemove = null\n document.onmouseup = null\n isMouseDown = false\n\n // 计算画布中的元素是否处在鼠标选择范围中,处在范围中的元素设置为被选中状态\n let inRangeElementList: PPTElement[] = []\n for (let i = 0; i < elementList.value.length; i++) {\n const element = elementList.value[i]\n const mouseSelectionLeft = mouseSelection.value.left\n const mouseSelectionTop = mouseSelection.value.top\n const mouseSelectionWidth = mouseSelection.value.width\n const mouseSelectionHeight = mouseSelection.value.height\n\n const { minX, maxX, minY, maxY } = getElementRange(element)\n\n // 计算元素是否处在框选范围内时,四个框选方向的计算方式有差异\n let isInclude = false\n if (mouseSelectionQuadrant.value === 4) {\n isInclude = minX > mouseSelectionLeft && \n maxX < mouseSelectionLeft + mouseSelectionWidth && \n minY > mouseSelectionTop && \n maxY < mouseSelectionTop + mouseSelectionHeight\n }\n else if (mouseSelectionQuadrant.value === 2) {\n isInclude = minX > (mouseSelectionLeft - mouseSelectionWidth) && \n maxX < (mouseSelectionLeft - mouseSelectionWidth) + mouseSelectionWidth && \n minY > (mouseSelectionTop - mouseSelectionHeight) && \n maxY < (mouseSelectionTop - mouseSelectionHeight) + mouseSelectionHeight\n }\n else if (mouseSelectionQuadrant.value === 1) {\n isInclude = minX > mouseSelectionLeft && \n maxX < mouseSelectionLeft + mouseSelectionWidth && \n minY > (mouseSelectionTop - mouseSelectionHeight) && \n maxY < (mouseSelectionTop - mouseSelectionHeight) + mouseSelectionHeight\n }\n else if (mouseSelectionQuadrant.value === 3) {\n isInclude = minX > (mouseSelectionLeft - mouseSelectionWidth) && \n maxX < (mouseSelectionLeft - mouseSelectionWidth) + mouseSelectionWidth && \n minY > mouseSelectionTop && \n maxY < mouseSelectionTop + mouseSelectionHeight\n }\n\n // 被锁定或被隐藏的元素即使在范围内,也不需要设置为选中状态\n if (isInclude && !element.lock && !hiddenElementIdList.value.includes(element.id)) inRangeElementList.push(element)\n }\n\n // 如果范围内有组合元素的成员,需要该组全部成员都处在范围内,才会被设置为选中状态\n inRangeElementList = inRangeElementList.filter(inRangeElement => {\n if (inRangeElement.groupId) {\n const inRangeElementIdList = inRangeElementList.map(inRangeElement => inRangeElement.id)\n const groupElementList = elementList.value.filter(element => element.groupId === inRangeElement.groupId)\n return groupElementList.every(groupElement => inRangeElementIdList.includes(groupElement.id))\n }\n return true\n })\n const inRangeElementIdList = inRangeElementList.map(inRangeElement => inRangeElement.id)\n mainStore.setActiveElementIdList(inRangeElementIdList)\n\n mouseSelectionVisible.value = false\n }\n }\n\n return {\n mouseSelection,\n mouseSelectionVisible,\n mouseSelectionQuadrant,\n updateMouseSelection,\n }\n}","import { onMounted, onUnmounted, type Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport { getImageDataURL } from '@/utils/image'\nimport { parseText2Paragraphs } from '@/utils/textParser'\nimport useCreateElement from '@/hooks/useCreateElement'\n\nexport default (elementRef: Ref) => {\n const { disableHotkeys } = storeToRefs(useMainStore())\n\n const { createImageElement, createTextElement } = useCreateElement()\n\n // 拖拽元素到画布中\n const handleDrop = (e: DragEvent) => {\n if (!e.dataTransfer || e.dataTransfer.items.length === 0) return\n const dataTransferItem = e.dataTransfer.items[0]\n\n // 检查事件对象中是否存在图片,存在则插入图片,否则继续检查是否存在文字,存在则插入文字\n if (dataTransferItem.kind === 'file' && dataTransferItem.type.indexOf('image') !== -1) {\n const imageFile = dataTransferItem.getAsFile()\n if (imageFile) {\n getImageDataURL(imageFile).then(dataURL => createImageElement(dataURL))\n }\n }\n else if (dataTransferItem.kind === 'string' && dataTransferItem.type === 'text/plain') {\n dataTransferItem.getAsString(text => {\n if (disableHotkeys.value) return\n const string = parseText2Paragraphs(text)\n createTextElement({\n left: 0,\n top: 0,\n width: 600,\n height: 50,\n }, { content: string })\n })\n }\n }\n\n onMounted(() => {\n elementRef.value && elementRef.value.addEventListener('drop', handleDrop)\n\n document.ondragleave = e => e.preventDefault()\n document.ondrop = e => e.preventDefault()\n document.ondragenter = e => e.preventDefault()\n document.ondragover = e => e.preventDefault()\n })\n onUnmounted(() => {\n elementRef.value && elementRef.value.removeEventListener('drop', handleDrop)\n\n document.ondragleave = null\n document.ondrop = null\n document.ondragenter = null\n document.ondragover = null\n })\n}","import type { Ref } from 'vue'\nimport { useSlidesStore } from '@/store'\nimport type { PPTElement, PPTLineElement, PPTVideoElement, PPTAudioElement, PPTChartElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\n/**\n * 计算给定坐标到原点连线的弧度\n * @param x 坐标x\n * @param y 坐标y\n */\nconst getAngleFromCoordinate = (x: number, y: number) => {\n const radian = Math.atan2(x, y)\n const angle = 180 / Math.PI * radian\n return angle\n}\n\nexport default (\n elementList: Ref,\n viewportRef: Ref,\n canvasScale: Ref,\n) => {\n const slidesStore = useSlidesStore()\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 旋转元素\n const rotateElement = (e: MouseEvent | TouchEvent, element: Exclude) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n \n let isMouseDown = true\n let angle = 0\n const elOriginRotate = element.rotate || 0\n\n const elLeft = element.left\n const elTop = element.top\n const elWidth = element.width\n const elHeight = element.height\n\n // 元素中心点(旋转中心点)\n const centerX = elLeft + elWidth / 2\n const centerY = elTop + elHeight / 2\n\n if (!viewportRef.value) return\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n if (!isMouseDown) return\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n \n // 计算当前鼠标位置相对元素中心点连线的角度(弧度)\n const mouseX = (currentPageX - viewportRect.left) / canvasScale.value\n const mouseY = (currentPageY - viewportRect.top) / canvasScale.value\n const x = mouseX - centerX\n const y = centerY - mouseY\n\n angle = getAngleFromCoordinate(x, y)\n\n // 靠近45倍数的角度时有吸附效果\n const sorptionRange = 5\n if ( Math.abs(angle) <= sorptionRange ) angle = 0\n else if ( angle > 0 && Math.abs(angle - 45) <= sorptionRange ) angle -= (angle - 45)\n else if ( angle < 0 && Math.abs(angle + 45) <= sorptionRange ) angle -= (angle + 45)\n else if ( angle > 0 && Math.abs(angle - 90) <= sorptionRange ) angle -= (angle - 90)\n else if ( angle < 0 && Math.abs(angle + 90) <= sorptionRange ) angle -= (angle + 90)\n else if ( angle > 0 && Math.abs(angle - 135) <= sorptionRange ) angle -= (angle - 135)\n else if ( angle < 0 && Math.abs(angle + 135) <= sorptionRange ) angle -= (angle + 135)\n else if ( angle > 0 && Math.abs(angle - 180) <= sorptionRange ) angle -= (angle - 180)\n else if ( angle < 0 && Math.abs(angle + 180) <= sorptionRange ) angle -= (angle + 180)\n\n elementList.value = elementList.value.map(el => element.id === el.id ? { ...el, rotate: angle } : el)\n }\n\n const handleMouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n if (elOriginRotate === angle) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n return {\n rotateElement,\n }\n}","export const ELEMENT_TYPE_ZH: { [key: string]: string } = {\n text: '文本',\n image: '图片',\n shape: '形状',\n line: '线条',\n chart: '图表',\n table: '表格',\n video: '视频',\n audio: '音频',\n latex: '公式',\n}\n\nexport const MIN_SIZE: { [key: string]: number } = {\n text: 20,\n image: 20,\n shape: 15,\n chart: 200,\n table: 20,\n video: 250,\n audio: 20,\n latex: 20,\n}","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport type { PPTElement, PPTImageElement, PPTLineElement, PPTShapeElement } from '@/types/slides'\nimport { OperateResizeHandlers, type AlignmentLineProps, type MultiSelectRange } from '@/types/edit'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport { MIN_SIZE } from '@/configs/element'\nimport { SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport { type AlignLine, uniqAlignLines } from '@/utils/element'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\ninterface RotateElementData {\n left: number\n top: number\n width: number\n height: number\n}\n\n/**\n * 计算旋转后的元素八个缩放点的位置\n * @param element 元素原始位置大小信息\n * @param angle 旋转角度\n */\nconst getRotateElementPoints = (element: RotateElementData, angle: number) => {\n const { left, top, width, height } = element\n\n const radius = Math.sqrt( Math.pow(width, 2) + Math.pow(height, 2) ) / 2\n const auxiliaryAngle = Math.atan(height / width) * 180 / Math.PI\n\n const tlbraRadian = (180 - angle - auxiliaryAngle) * Math.PI / 180\n const trblaRadian = (auxiliaryAngle - angle) * Math.PI / 180\n const taRadian = (90 - angle) * Math.PI / 180\n const raRadian = angle * Math.PI / 180\n\n const halfWidth = width / 2\n const halfHeight = height / 2\n\n const middleLeft = left + halfWidth\n const middleTop = top + halfHeight\n\n const leftTopPoint = {\n left: middleLeft + radius * Math.cos(tlbraRadian),\n top: middleTop - radius * Math.sin(tlbraRadian),\n }\n const topPoint = {\n left: middleLeft + halfHeight * Math.cos(taRadian),\n top: middleTop - halfHeight * Math.sin(taRadian),\n }\n const rightTopPoint = {\n left: middleLeft + radius * Math.cos(trblaRadian),\n top: middleTop - radius * Math.sin(trblaRadian),\n }\n const rightPoint = {\n left: middleLeft + halfWidth * Math.cos(raRadian),\n top: middleTop + halfWidth * Math.sin(raRadian),\n }\n const rightBottomPoint = {\n left: middleLeft - radius * Math.cos(tlbraRadian),\n top: middleTop + radius * Math.sin(tlbraRadian),\n }\n const bottomPoint = {\n left: middleLeft - halfHeight * Math.sin(raRadian),\n top: middleTop + halfHeight * Math.cos(raRadian),\n }\n const leftBottomPoint = {\n left: middleLeft - radius * Math.cos(trblaRadian),\n top: middleTop + radius * Math.sin(trblaRadian),\n }\n const leftPoint = {\n left: middleLeft - halfWidth * Math.cos(raRadian),\n top: middleTop - halfWidth * Math.sin(raRadian),\n }\n\n return { leftTopPoint, topPoint, rightTopPoint, rightPoint, rightBottomPoint, bottomPoint, leftBottomPoint, leftPoint }\n}\n\n/**\n * 获取元素某缩放点相对的另一个点的位置,如:【上】对应【下】、【左上】对应【右下】\n * @param direction 当前操作的缩放点\n * @param points 旋转后的元素八个缩放点的位置\n */\nconst getOppositePoint = (direction: OperateResizeHandlers, points: ReturnType): { left: number; top: number } => {\n const oppositeMap = {\n [OperateResizeHandlers.RIGHT_BOTTOM]: points.leftTopPoint,\n [OperateResizeHandlers.LEFT_BOTTOM]: points.rightTopPoint,\n [OperateResizeHandlers.LEFT_TOP]: points.rightBottomPoint,\n [OperateResizeHandlers.RIGHT_TOP]: points.leftBottomPoint,\n [OperateResizeHandlers.TOP]: points.bottomPoint,\n [OperateResizeHandlers.BOTTOM]: points.topPoint,\n [OperateResizeHandlers.LEFT]: points.rightPoint,\n [OperateResizeHandlers.RIGHT]: points.leftPoint,\n }\n return oppositeMap[direction]\n}\n\nexport default (\n elementList: Ref,\n alignmentLines: Ref,\n canvasScale: Ref,\n) => {\n const mainStore = useMainStore()\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeGroupElementId } = storeToRefs(mainStore)\n const { viewportRatio } = storeToRefs(slidesStore)\n const { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 缩放元素\n const scaleElement = (e: MouseEvent | TouchEvent, element: Exclude, command: OperateResizeHandlers) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n\n let isMouseDown = true\n mainStore.setScalingState(true)\n\n const elOriginLeft = element.left\n const elOriginTop = element.top\n const elOriginWidth = element.width\n const elOriginHeight = element.height\n\n const originTableCellMinHeight = element.type === 'table' ? element.cellMinHeight : 0\n \n const elRotate = ('rotate' in element && element.rotate) ? element.rotate : 0\n const rotateRadian = Math.PI * elRotate / 180\n\n const fixedRatio = ctrlOrShiftKeyActive.value || ('fixedRatio' in element && element.fixedRatio)\n const aspectRatio = elOriginWidth / elOriginHeight\n\n const startPageX = isTouchEvent ? e.changedTouches[0].pageX : e.pageX\n const startPageY = isTouchEvent ? e.changedTouches[0].pageY : e.pageY\n\n // 元素最小缩放限制\n const minSize = MIN_SIZE[element.type] || 20\n const getSizeWithinRange = (size: number) => size < minSize ? minSize : size\n const getHeightWithinRange = (height: number) => {\n const minHeight = minSize / aspectRatio\n return height < minHeight ? minHeight : height\n }\n\n let points: ReturnType\n let baseLeft = 0\n let baseTop = 0\n let horizontalLines: AlignLine[] = []\n let verticalLines: AlignLine[] = []\n\n // 旋转后的元素进行缩放时,引入基点的概念,以当前操作的缩放点相对的点为基点\n // 例如拖动右下角缩放时,左上角为基点,需要保持左上角不变然后修改其他的点的位置来达到所放的效果\n if ('rotate' in element && element.rotate) {\n const { left, top, width, height } = element\n points = getRotateElementPoints({ left, top, width, height }, elRotate)\n const oppositePoint = getOppositePoint(command, points)\n\n baseLeft = oppositePoint.left\n baseTop = oppositePoint.top\n }\n\n // 未旋转的元素具有缩放时的对齐吸附功能,在此处收集对齐对齐吸附线\n // 包括页面内除目标元素外的其他元素在画布中的各个可吸附对齐位置:上下左右四边\n // 其中线条和被旋转过的元素不参与吸附对齐\n else {\n const edgeWidth = VIEWPORT_SIZE\n const edgeHeight = VIEWPORT_SIZE * viewportRatio.value\n const isActiveGroupElement = element.id === activeGroupElementId.value\n \n for (const el of elementList.value) {\n if ('rotate' in el && el.rotate) continue\n if (el.type === 'line') continue\n if (isActiveGroupElement && el.id === element.id) continue\n if (!isActiveGroupElement && activeElementIdList.value.includes(el.id)) continue\n\n const left = el.left\n const top = el.top\n const width = el.width\n const height = el.height\n const right = left + width\n const bottom = top + height\n\n const topLine: AlignLine = { value: top, range: [left, right] }\n const bottomLine: AlignLine = { value: bottom, range: [left, right] }\n const leftLine: AlignLine = { value: left, range: [top, bottom] }\n const rightLine: AlignLine = { value: right, range: [top, bottom] }\n\n horizontalLines.push(topLine, bottomLine)\n verticalLines.push(leftLine, rightLine)\n }\n\n // 画布可视区域的四个边界、水平中心、垂直中心\n const edgeTopLine: AlignLine = { value: 0, range: [0, edgeWidth] }\n const edgeBottomLine: AlignLine = { value: edgeHeight, range: [0, edgeWidth] }\n const edgeHorizontalCenterLine: AlignLine = { value: edgeHeight / 2, range: [0, edgeWidth] }\n const edgeLeftLine: AlignLine = { value: 0, range: [0, edgeHeight] }\n const edgeRightLine: AlignLine = { value: edgeWidth, range: [0, edgeHeight] }\n const edgeVerticalCenterLine: AlignLine = { value: edgeWidth / 2, range: [0, edgeHeight] }\n\n horizontalLines.push(edgeTopLine, edgeBottomLine, edgeHorizontalCenterLine)\n verticalLines.push(edgeLeftLine, edgeRightLine, edgeVerticalCenterLine)\n \n horizontalLines = uniqAlignLines(horizontalLines)\n verticalLines = uniqAlignLines(verticalLines)\n }\n \n // 对齐吸附方法\n // 将收集到的对齐吸附线与计算的目标元素当前的位置大小相关数据做对比,差值小于设定的值时执行自动缩放校正\n // 水平和垂直两个方向需要分开计算\n const alignedAdsorption = (currentX: number | null, currentY: number | null) => {\n const sorptionRange = 5\n\n const _alignmentLines: AlignmentLineProps[] = []\n let isVerticalAdsorbed = false\n let isHorizontalAdsorbed = false\n const correctionVal = { offsetX: 0, offsetY: 0 }\n \n if (currentY || currentY === 0) {\n for (let i = 0; i < horizontalLines.length; i++) {\n const { value, range } = horizontalLines[i]\n const min = Math.min(...range, currentX || 0)\n const max = Math.max(...range, currentX || 0)\n \n if (Math.abs(currentY - value) < sorptionRange && !isHorizontalAdsorbed) {\n correctionVal.offsetY = currentY - value\n isHorizontalAdsorbed = true\n _alignmentLines.push({ type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100 })\n }\n }\n }\n if (currentX || currentX === 0) {\n for (let i = 0; i < verticalLines.length; i++) {\n const { value, range } = verticalLines[i]\n const min = Math.min(...range, (currentY || 0))\n const max = Math.max(...range, (currentY || 0))\n\n if (Math.abs(currentX - value) < sorptionRange && !isVerticalAdsorbed) {\n correctionVal.offsetX = currentX - value\n isVerticalAdsorbed = true\n _alignmentLines.push({ type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100 })\n }\n }\n }\n alignmentLines.value = _alignmentLines\n return correctionVal\n }\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n if (!isMouseDown) return\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n const x = currentPageX - startPageX\n const y = currentPageY - startPageY\n\n let width = elOriginWidth\n let height = elOriginHeight\n let left = elOriginLeft\n let top = elOriginTop\n \n // 元素被旋转的情况下,需要根据元素旋转的角度,重新计算需要缩放的距离(鼠标按下后移动的距离)\n if (elRotate) {\n const revisedX = (Math.cos(rotateRadian) * x + Math.sin(rotateRadian) * y) / canvasScale.value\n let revisedY = (Math.cos(rotateRadian) * y - Math.sin(rotateRadian) * x) / canvasScale.value\n\n // 锁定宽高比例(仅四个角可能触发,四条边不会触发)\n // 以水平方向上缩放的距离为基础,计算垂直方向上的缩放距离,保持二者具有相同的缩放比例\n if (fixedRatio) {\n if (command === OperateResizeHandlers.RIGHT_BOTTOM || command === OperateResizeHandlers.LEFT_TOP) revisedY = revisedX / aspectRatio\n if (command === OperateResizeHandlers.LEFT_BOTTOM || command === OperateResizeHandlers.RIGHT_TOP) revisedY = -revisedX / aspectRatio\n }\n\n // 根据不同的操作点分别计算元素缩放后的大小和位置\n // 需要注意:\n // 此处计算的位置需要在后面重新进行校正,因为旋转后再缩放事实上会改变元素基点的位置(虽然视觉上基点保持不动,但这是【旋转】+【移动】共同作用的结果)\n // 但此处计算的大小不需要重新校正,因为前面已经重新计算需要缩放的距离,相当于大小已经经过了校正\n if (command === OperateResizeHandlers.RIGHT_BOTTOM) {\n width = getSizeWithinRange(elOriginWidth + revisedX)\n height = getHeightWithinRange(elOriginHeight + revisedY)\n }\n else if (command === OperateResizeHandlers.LEFT_BOTTOM) {\n width = getSizeWithinRange(elOriginWidth - revisedX)\n height = getHeightWithinRange(elOriginHeight + revisedY)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.LEFT_TOP) {\n width = getSizeWithinRange(elOriginWidth - revisedX)\n height = getHeightWithinRange(elOriginHeight - revisedY)\n left = elOriginLeft - (width - elOriginWidth)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.RIGHT_TOP) {\n width = getSizeWithinRange(elOriginWidth + revisedX)\n height = getHeightWithinRange(elOriginHeight - revisedY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.TOP) {\n height = getSizeWithinRange(elOriginHeight - revisedY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.BOTTOM) {\n height = getSizeWithinRange(elOriginHeight + revisedY)\n }\n else if (command === OperateResizeHandlers.LEFT) {\n width = getSizeWithinRange(elOriginWidth - revisedX)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.RIGHT) {\n width = getSizeWithinRange(elOriginWidth + revisedX)\n }\n\n // 获取当前元素的基点坐标,与初始状态时的基点坐标进行对比,并计算差值进行元素位置的校正\n const currentPoints = getRotateElementPoints({ width, height, left, top }, elRotate)\n const currentOppositePoint = getOppositePoint(command, currentPoints)\n const currentBaseLeft = currentOppositePoint.left\n const currentBaseTop = currentOppositePoint.top\n\n const offsetX = currentBaseLeft - baseLeft\n const offsetY = currentBaseTop - baseTop\n\n left = left - offsetX\n top = top - offsetY\n }\n\n // 元素未被旋转的情况下,正常计算新的位置大小即可,无需复杂的校正等工作\n // 额外需要处理对齐吸附相关的操作\n // 锁定宽高比例相关的操作同上,不再赘述\n else {\n let moveX = x / canvasScale.value\n let moveY = y / canvasScale.value\n\n if (fixedRatio) {\n if (command === OperateResizeHandlers.RIGHT_BOTTOM || command === OperateResizeHandlers.LEFT_TOP) moveY = moveX / aspectRatio\n if (command === OperateResizeHandlers.LEFT_BOTTOM || command === OperateResizeHandlers.RIGHT_TOP) moveY = -moveX / aspectRatio\n }\n\n if (command === OperateResizeHandlers.RIGHT_BOTTOM) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + elOriginWidth + moveX, elOriginTop + elOriginHeight + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = moveY * aspectRatio\n else moveY = moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth + moveX)\n height = getHeightWithinRange(elOriginHeight + moveY)\n }\n else if (command === OperateResizeHandlers.LEFT_BOTTOM) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + moveX, elOriginTop + elOriginHeight + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = -moveY * aspectRatio\n else moveY = -moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth - moveX)\n height = getHeightWithinRange(elOriginHeight + moveY)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.LEFT_TOP) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + moveX, elOriginTop + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = moveY * aspectRatio\n else moveY = moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth - moveX)\n height = getHeightWithinRange(elOriginHeight - moveY)\n left = elOriginLeft - (width - elOriginWidth)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.RIGHT_TOP) {\n const { offsetX, offsetY } = alignedAdsorption(elOriginLeft + elOriginWidth + moveX, elOriginTop + moveY)\n moveX = moveX - offsetX\n moveY = moveY - offsetY\n if (fixedRatio) {\n if (offsetY) moveX = -moveY * aspectRatio\n else moveY = -moveX / aspectRatio\n }\n width = getSizeWithinRange(elOriginWidth + moveX)\n height = getHeightWithinRange(elOriginHeight - moveY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.LEFT) {\n const { offsetX } = alignedAdsorption(elOriginLeft + moveX, null)\n moveX = moveX - offsetX\n width = getSizeWithinRange(elOriginWidth - moveX)\n left = elOriginLeft - (width - elOriginWidth)\n }\n else if (command === OperateResizeHandlers.RIGHT) {\n const { offsetX } = alignedAdsorption(elOriginLeft + elOriginWidth + moveX, null)\n moveX = moveX - offsetX\n width = getSizeWithinRange(elOriginWidth + moveX)\n }\n else if (command === OperateResizeHandlers.TOP) {\n const { offsetY } = alignedAdsorption(null, elOriginTop + moveY)\n moveY = moveY - offsetY\n height = getSizeWithinRange(elOriginHeight - moveY)\n top = elOriginTop - (height - elOriginHeight)\n }\n else if (command === OperateResizeHandlers.BOTTOM) {\n const { offsetY } = alignedAdsorption(null, elOriginTop + elOriginHeight + moveY)\n moveY = moveY - offsetY\n height = getSizeWithinRange(elOriginHeight + moveY)\n }\n }\n \n elementList.value = elementList.value.map(el => {\n if (element.id !== el.id) return el\n if (el.type === 'shape' && 'pathFormula' in el && el.pathFormula) {\n const pathFormula = SHAPE_PATH_FORMULAS[el.pathFormula]\n\n let path = ''\n if ('editable' in pathFormula) path = pathFormula.formula(width, height, el.keypoint!)\n else path = pathFormula.formula(width, height)\n\n return {\n ...el, left, top, width, height,\n viewBox: [width, height],\n path,\n }\n }\n if (el.type === 'table') {\n let cellMinHeight = originTableCellMinHeight + (height - elOriginHeight) / el.data.length\n cellMinHeight = cellMinHeight < 36 ? 36 : cellMinHeight\n\n if (cellMinHeight === originTableCellMinHeight) return { ...el, left, width }\n return {\n ...el, left, top, width, height,\n cellMinHeight: cellMinHeight < 36 ? 36 : cellMinHeight,\n }\n }\n return { ...el, left, top, width, height }\n })\n }\n\n const handleMouseup = (e: MouseEvent | TouchEvent) => {\n isMouseDown = false\n \n document.ontouchmove = null\n document.ontouchend = null\n document.onmousemove = null\n document.onmouseup = null\n\n alignmentLines.value = []\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n \n if (startPageX === currentPageX && startPageY === currentPageY) return\n \n slidesStore.updateSlide({ elements: elementList.value })\n mainStore.setScalingState(false)\n \n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n // 多选元素缩放\n const scaleMultiElement = (e: MouseEvent, range: MultiSelectRange, command: OperateResizeHandlers) => {\n let isMouseDown = true\n \n const { minX, maxX, minY, maxY } = range\n const operateWidth = maxX - minX\n const operateHeight = maxY - minY\n const aspectRatio = operateWidth / operateHeight\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const originElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList.value))\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n \n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n const x = (currentPageX - startPageX) / canvasScale.value\n let y = (currentPageY - startPageY) / canvasScale.value\n\n // 锁定宽高比例,逻辑同上\n if (ctrlOrShiftKeyActive.value) {\n if (command === OperateResizeHandlers.RIGHT_BOTTOM || command === OperateResizeHandlers.LEFT_TOP) y = x / aspectRatio\n if (command === OperateResizeHandlers.LEFT_BOTTOM || command === OperateResizeHandlers.RIGHT_TOP) y = -x / aspectRatio\n }\n\n // 所有选中元素的整体范围\n let currentMinX = minX\n let currentMaxX = maxX\n let currentMinY = minY\n let currentMaxY = maxY\n\n if (command === OperateResizeHandlers.RIGHT_BOTTOM) {\n currentMaxX = maxX + x\n currentMaxY = maxY + y\n }\n else if (command === OperateResizeHandlers.LEFT_BOTTOM) {\n currentMinX = minX + x\n currentMaxY = maxY + y\n }\n else if (command === OperateResizeHandlers.LEFT_TOP) {\n currentMinX = minX + x\n currentMinY = minY + y\n }\n else if (command === OperateResizeHandlers.RIGHT_TOP) {\n currentMaxX = maxX + x\n currentMinY = minY + y\n }\n else if (command === OperateResizeHandlers.TOP) {\n currentMinY = minY + y\n }\n else if (command === OperateResizeHandlers.BOTTOM) {\n currentMaxY = maxY + y\n }\n else if (command === OperateResizeHandlers.LEFT) {\n currentMinX = minX + x\n }\n else if (command === OperateResizeHandlers.RIGHT) {\n currentMaxX = maxX + x\n }\n\n // 所有选中元素的整体宽高\n const currentOppositeWidth = currentMaxX - currentMinX\n const currentOppositeHeight = currentMaxY - currentMinY\n\n // 当前正在操作元素宽高占所有选中元素的整体宽高的比例\n let widthScale = currentOppositeWidth / operateWidth\n let heightScale = currentOppositeHeight / operateHeight\n\n if (widthScale <= 0) widthScale = 0\n if (heightScale <= 0) heightScale = 0\n \n // 根据前面计算的比例,计算并修改所有选中元素的位置大小\n elementList.value = elementList.value.map(el => {\n if ((el.type === 'image' || el.type === 'shape') && activeElementIdList.value.includes(el.id)) {\n const originElement = originElementList.find(originEl => originEl.id === el.id) as PPTImageElement | PPTShapeElement\n return {\n ...el,\n width: originElement.width * widthScale,\n height: originElement.height * heightScale,\n left: currentMinX + (originElement.left - minX) * widthScale,\n top: currentMinY + (originElement.top - minY) * heightScale,\n }\n }\n return el\n })\n }\n\n document.onmouseup = e => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n if (startPageX === e.pageX && startPageY === e.pageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n }\n\n return {\n scaleElement,\n scaleMultiElement,\n }\n}","export const enum ClipPathTypes {\n RECT = 'rect',\n ELLIPSE = 'ellipse',\n POLYGON = 'polygon',\n}\n\nexport const enum ClipPaths {\n RECT = 'rect',\n ROUNDRECT = 'roundRect',\n ELLIPSE = 'ellipse',\n TRIANGLE = 'triangle',\n PENTAGON = 'pentagon',\n RHOMBUS = 'rhombus',\n STAR = 'star',\n}\n\ninterface ClipPath {\n [key: string]: {\n name: string\n type: ClipPathTypes\n style: string\n radius?: string\n createPath?: (width: number, height: number) => string\n }\n}\n\nexport const CLIPPATHS: ClipPath = {\n rect: {\n name: '矩形',\n type: ClipPathTypes.RECT,\n radius: '0',\n style: '',\n },\n rect2: {\n name: '矩形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width * 0.8} 0 L ${width} ${height * 0.2} L ${width} ${height} L 0 ${height} Z`\n },\n },\n rect3: {\n name: '矩形3',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width * 0.8} 0 L ${width} ${height * 0.2} L ${width} ${height} L ${width * 0.2} ${height} L 0 ${height * 0.8} Z`\n },\n },\n roundRect: {\n name: '圆角矩形',\n type: ClipPathTypes.RECT,\n radius: '10px',\n style: 'inset(0 0 0 0 round 10px 10px 10px 10px)',\n },\n ellipse: {\n name: '圆形',\n type: ClipPathTypes.ELLIPSE,\n style: 'ellipse(50% 50% at 50% 50%)',\n },\n triangle: {\n name: '三角形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 0% 100%, 100% 100%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L 0 ${height} L ${width} ${height} Z`\n },\n },\n triangle2: {\n name: '三角形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 100%, 0% 0%, 100% 0%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} ${height} L 0 0 L ${width} 0 Z`\n },\n },\n triangle3: {\n name: '三角形3',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 0% 100%, 100% 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L 0 ${height} L ${width} ${height} Z`\n },\n },\n rhombus: {\n name: '菱形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L ${width} ${height * 0.5} L ${width * 0.5} ${height} L 0 ${height * 0.5} Z`\n },\n },\n pentagon: {\n name: '五边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L ${width} ${0.38 * height} L ${0.82 * width} ${height} L ${0.18 * width} ${height} L 0 ${0.38 * height} Z`\n },\n },\n hexagon: {\n name: '六边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.2} 0 L ${width * 0.8} 0 L ${width} ${height * 0.5} L ${width * 0.8} ${height} L ${width * 0.2} ${height} L 0 ${height * 0.5} Z`\n },\n },\n heptagon: {\n name: '七边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.5} 0 L ${width * 0.9} ${height * 0.2} L ${width} ${height * 0.6} L ${width * 0.75} ${height} L ${width * 0.25} ${height} L 0 ${height * 0.6} L ${width * 0.1} ${height * 0.2} Z`\n },\n },\n octagon: {\n name: '八边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.3} 0 L ${width * 0.7} 0 L ${width} ${height * 0.3} L ${width} ${height * 0.7} L ${width * 0.7} ${height} L ${width * 0.3} ${height} L 0 ${height * 0.7} L 0 ${height * 0.3} Z`\n },\n },\n chevron: {\n name: 'V形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.75} 0 L ${width} ${height * 0.5} L ${width * 0.75} ${height} L 0 ${height} L ${width * 0.25} ${height * 0.5} L 0 0 Z`\n },\n },\n point: {\n name: '点',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width * 0.75} 0 L ${width} ${height * 0.5} L ${width * 0.75} ${height} L 0 ${height} Z`\n },\n },\n arrow: {\n name: '箭头',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)',\n createPath: (width: number, height: number) => {\n return `M 0 ${height * 0.2} L ${width * 0.6} ${height * 0.2} L ${width * 0.6} 0 L ${width} ${height * 0.5} L ${width * 0.6} ${height} L ${width * 0.6} ${height * 0.8} L 0 ${height * 0.8} Z`\n },\n },\n parallelogram: {\n name: '平行四边形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.3} 0 L ${width} 0 L ${width * 0.7} ${height} L 0 ${height} Z`\n },\n },\n parallelogram2: {\n name: '平行四边形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.3} ${height} L ${width} ${height} L ${width * 0.7} 0 L 0 0 Z`\n },\n },\n trapezoid: {\n name: '梯形',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)',\n createPath: (width: number, height: number) => {\n return `M ${width * 0.25} 0 L ${width * 0.75} 0 L ${width} ${height} L 0 ${height} Z`\n },\n },\n trapezoid2: {\n name: '梯形2',\n type: ClipPathTypes.POLYGON,\n style: 'polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)',\n createPath: (width: number, height: number) => {\n return `M 0 0 L ${width} 0 L ${width * 0.75} ${height} L ${width * 0.25} ${height} Z`\n },\n },\n}","import type { Ref } from 'vue'\nimport { uniq } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useKeyboardStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\n\nexport default (\n elementList: Ref,\n moveElement: (e: MouseEvent | TouchEvent, element: PPTElement) => void,\n) => {\n const mainStore = useMainStore()\n const { activeElementIdList, activeGroupElementId, handleElementId, editorAreaFocus } = storeToRefs(mainStore)\n const { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\n // 选中元素\n // startMove 表示是否需要再选中操作后进入到开始移动的状态\n const selectElement = (e: MouseEvent | TouchEvent, element: PPTElement, startMove = true) => {\n if (!editorAreaFocus.value) mainStore.setEditorareaFocus(true)\n\n // 如果目标元素当前未被选中,则将他设为选中状态\n // 此时如果按下Ctrl键或Shift键,则进入多选状态,将当前已选中的元素和目标元素一起设置为选中状态,否则仅将目标元素设置为选中状态\n // 如果目标元素是分组成员,需要将该组合的其他元素一起设置为选中状态\n if (!activeElementIdList.value.includes(element.id)) {\n let newActiveIdList: string[] = []\n\n if (ctrlOrShiftKeyActive.value) {\n newActiveIdList = [...activeElementIdList.value, element.id]\n }\n else newActiveIdList = [element.id]\n \n if (element.groupId) {\n const groupMembersId: string[] = []\n elementList.value.forEach((el: PPTElement) => {\n if (el.groupId === element.groupId) groupMembersId.push(el.id)\n })\n newActiveIdList = [...newActiveIdList, ...groupMembersId]\n }\n\n mainStore.setActiveElementIdList(uniq(newActiveIdList))\n mainStore.setHandleElementId(element.id)\n }\n\n // 如果目标元素已被选中,且按下了Ctrl键或Shift键,则取消其被选中状态\n // 除非目标元素是最后的一个被选中元素,或者目标元素所在的组合是最后一组选中组合\n // 如果目标元素是分组成员,需要将该组合的其他元素一起取消选中状态\n else if (ctrlOrShiftKeyActive.value) {\n let newActiveIdList: string[] = []\n\n if (element.groupId) {\n const groupMembersId: string[] = []\n elementList.value.forEach((el: PPTElement) => {\n if (el.groupId === element.groupId) groupMembersId.push(el.id)\n })\n newActiveIdList = activeElementIdList.value.filter(id => !groupMembersId.includes(id))\n }\n else {\n newActiveIdList = activeElementIdList.value.filter(id => id !== element.id)\n }\n\n if (newActiveIdList.length > 0) {\n mainStore.setActiveElementIdList(newActiveIdList)\n }\n }\n\n // 如果目标元素已被选中,同时目标元素不是当前操作元素,则将其设置为当前操作元素\n else if (handleElementId.value !== element.id) {\n mainStore.setHandleElementId(element.id)\n }\n\n // 如果目标元素已被选中,同时也是当前操作元素,那么当目标元素在该状态下再次被点击时,将被设置为多选元素中的激活成员\n else if (activeGroupElementId.value !== element.id) {\n const startPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const startPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n ;(e.target as HTMLElement).onmouseup = (e: MouseEvent) => {\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) {\n mainStore.setActiveGroupElementId(element.id)\n ;(e.target as HTMLElement).onmouseup = null\n }\n }\n }\n\n if (startMove) moveElement(e, element)\n }\n\n return {\n selectElement,\n }\n}\n","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport type { AlignmentLineProps } from '@/types/edit'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport { getRectRotatedRange, uniqAlignLines, type AlignLine } from '@/utils/element'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nexport default (\n elementList: Ref,\n alignmentLines: Ref,\n canvasScale: Ref,\n) => {\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeGroupElementId } = storeToRefs(useMainStore())\n const { shiftKeyState } = storeToRefs(useKeyboardStore())\n const { viewportRatio } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n const dragElement = (e: MouseEvent | TouchEvent, element: PPTElement) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n\n if (!activeElementIdList.value.includes(element.id)) return\n let isMouseDown = true\n\n const edgeWidth = VIEWPORT_SIZE\n const edgeHeight = VIEWPORT_SIZE * viewportRatio.value\n \n const sorptionRange = 5\n\n const originElementList: PPTElement[] = JSON.parse(JSON.stringify(elementList.value))\n const originActiveElementList = originElementList.filter(el => activeElementIdList.value.includes(el.id))\n \n const elOriginLeft = element.left\n const elOriginTop = element.top\n const elOriginWidth = element.width\n const elOriginHeight = ('height' in element && element.height) ? element.height : 0\n const elOriginRotate = ('rotate' in element && element.rotate) ? element.rotate : 0\n \n const startPageX = isTouchEvent ? e.changedTouches[0].pageX : e.pageX\n const startPageY = isTouchEvent ? e.changedTouches[0].pageY : e.pageY\n\n let isMisoperation: boolean | null = null\n\n const isActiveGroupElement = element.id === activeGroupElementId.value\n\n // 收集对齐对齐吸附线\n // 包括页面内除目标元素外的其他元素在画布中的各个可吸附对齐位置:上下左右四边,水平中心、垂直中心\n // 其中线条和被旋转过的元素需要重新计算他们在画布中的中心点位置的范围\n let horizontalLines: AlignLine[] = []\n let verticalLines: AlignLine[] = []\n\n for (const el of elementList.value) {\n if (el.type === 'line') continue\n if (isActiveGroupElement && el.id === element.id) continue\n if (!isActiveGroupElement && activeElementIdList.value.includes(el.id)) continue\n\n let left, top, width, height\n if ('rotate' in el && el.rotate) {\n const { xRange, yRange } = getRectRotatedRange({\n left: el.left,\n top: el.top,\n width: el.width,\n height: el.height,\n rotate: el.rotate,\n })\n left = xRange[0]\n top = yRange[0]\n width = xRange[1] - xRange[0]\n height = yRange[1] - yRange[0]\n }\n else {\n left = el.left\n top = el.top\n width = el.width\n height = el.height\n }\n \n const right = left + width\n const bottom = top + height\n const centerX = top + height / 2\n const centerY = left + width / 2\n\n const topLine: AlignLine = { value: top, range: [left, right] }\n const bottomLine: AlignLine = { value: bottom, range: [left, right] }\n const horizontalCenterLine: AlignLine = { value: centerX, range: [left, right] }\n const leftLine: AlignLine = { value: left, range: [top, bottom] }\n const rightLine: AlignLine = { value: right, range: [top, bottom] }\n const verticalCenterLine: AlignLine = { value: centerY, range: [top, bottom] }\n\n horizontalLines.push(topLine, bottomLine, horizontalCenterLine)\n verticalLines.push(leftLine, rightLine, verticalCenterLine)\n }\n\n // 画布可视区域的四个边界、水平中心、垂直中心\n const edgeTopLine: AlignLine = { value: 0, range: [0, edgeWidth] }\n const edgeBottomLine: AlignLine = { value: edgeHeight, range: [0, edgeWidth] }\n const edgeHorizontalCenterLine: AlignLine = { value: edgeHeight / 2, range: [0, edgeWidth] }\n const edgeLeftLine: AlignLine = { value: 0, range: [0, edgeHeight] }\n const edgeRightLine: AlignLine = { value: edgeWidth, range: [0, edgeHeight] }\n const edgeVerticalCenterLine: AlignLine = { value: edgeWidth / 2, range: [0, edgeHeight] }\n\n horizontalLines.push(edgeTopLine, edgeBottomLine, edgeHorizontalCenterLine)\n verticalLines.push(edgeLeftLine, edgeRightLine, edgeVerticalCenterLine)\n \n // 对齐吸附线去重\n horizontalLines = uniqAlignLines(horizontalLines)\n verticalLines = uniqAlignLines(verticalLines)\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n // 如果鼠标滑动距离过小,则将操作判定为误操作:\n // 如果误操作标记为null,表示是第一次触发移动,需要计算当前是否是误操作\n // 如果误操作标记为true,表示当前还处在误操作范围内,但仍然需要继续计算检查后续操作是否还处于误操作\n // 如果误操作标记为false,表示已经脱离了误操作范围,不需要再次计算\n if (isMisoperation !== false) {\n isMisoperation = Math.abs(startPageX - currentPageX) < sorptionRange && \n Math.abs(startPageY - currentPageY) < sorptionRange\n }\n if (!isMouseDown || isMisoperation) return\n \n let moveX = (currentPageX - startPageX) / canvasScale.value\n let moveY = (currentPageY - startPageY) / canvasScale.value\n\n if (shiftKeyState.value) {\n if (Math.abs(moveX) > Math.abs(moveY)) moveY = 0\n if (Math.abs(moveX) < Math.abs(moveY)) moveX = 0\n }\n\n // 基础目标位置\n let targetLeft = elOriginLeft + moveX\n let targetTop = elOriginTop + moveY\n\n // 计算目标元素在画布中的位置范围,用于吸附对齐\n // 需要区分单选和多选两种情况,其中多选状态下需要计算多选元素的整体范围;单选状态下需要继续区分线条、普通元素、旋转后的普通元素三种情况\n let targetMinX: number, targetMaxX: number, targetMinY: number, targetMaxY: number\n\n if (activeElementIdList.value.length === 1 || isActiveGroupElement) {\n if (elOriginRotate) {\n const { xRange, yRange } = getRectRotatedRange({\n left: targetLeft,\n top: targetTop,\n width: elOriginWidth,\n height: elOriginHeight,\n rotate: elOriginRotate,\n })\n targetMinX = xRange[0]\n targetMaxX = xRange[1]\n targetMinY = yRange[0]\n targetMaxY = yRange[1]\n }\n else if (element.type === 'line') {\n targetMinX = targetLeft\n targetMaxX = targetLeft + Math.max(element.start[0], element.end[0])\n targetMinY = targetTop\n targetMaxY = targetTop + Math.max(element.start[1], element.end[1])\n }\n else {\n targetMinX = targetLeft\n targetMaxX = targetLeft + elOriginWidth\n targetMinY = targetTop\n targetMaxY = targetTop + elOriginHeight\n }\n }\n else {\n const leftValues = []\n const topValues = []\n const rightValues = []\n const bottomValues = []\n \n for (let i = 0; i < originActiveElementList.length; i++) {\n const element = originActiveElementList[i]\n const left = element.left + moveX\n const top = element.top + moveY\n const width = element.width\n const height = ('height' in element && element.height) ? element.height : 0\n const rotate = ('rotate' in element && element.rotate) ? element.rotate : 0\n\n if ('rotate' in element && element.rotate) {\n const { xRange, yRange } = getRectRotatedRange({ left, top, width, height, rotate })\n leftValues.push(xRange[0])\n topValues.push(yRange[0])\n rightValues.push(xRange[1])\n bottomValues.push(yRange[1])\n }\n else if (element.type === 'line') {\n leftValues.push(left)\n topValues.push(top)\n rightValues.push(left + Math.max(element.start[0], element.end[0]))\n bottomValues.push(top + Math.max(element.start[1], element.end[1]))\n }\n else {\n leftValues.push(left)\n topValues.push(top)\n rightValues.push(left + width)\n bottomValues.push(top + height)\n }\n }\n\n targetMinX = Math.min(...leftValues)\n targetMaxX = Math.max(...rightValues)\n targetMinY = Math.min(...topValues)\n targetMaxY = Math.max(...bottomValues)\n }\n \n const targetCenterX = targetMinX + (targetMaxX - targetMinX) / 2\n const targetCenterY = targetMinY + (targetMaxY - targetMinY) / 2\n\n // 将收集到的对齐吸附线与计算的目标元素位置范围做对比,二者的差小于设定的值时执行自动对齐校正\n // 水平和垂直两个方向需要分开计算\n const _alignmentLines: AlignmentLineProps[] = []\n let isVerticalAdsorbed = false\n let isHorizontalAdsorbed = false\n for (let i = 0; i < horizontalLines.length; i++) {\n const { value, range } = horizontalLines[i]\n const min = Math.min(...range, targetMinX, targetMaxX)\n const max = Math.max(...range, targetMinX, targetMaxX)\n \n if (Math.abs(targetMinY - value) < sorptionRange && !isHorizontalAdsorbed) {\n targetTop = targetTop - (targetMinY - value)\n isHorizontalAdsorbed = true\n _alignmentLines.push({type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100})\n }\n if (Math.abs(targetMaxY - value) < sorptionRange && !isHorizontalAdsorbed) {\n targetTop = targetTop - (targetMaxY - value)\n isHorizontalAdsorbed = true\n _alignmentLines.push({type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100})\n }\n if (Math.abs(targetCenterY - value) < sorptionRange && !isHorizontalAdsorbed) {\n targetTop = targetTop - (targetCenterY - value)\n isHorizontalAdsorbed = true\n _alignmentLines.push({type: 'horizontal', axis: {x: min - 50, y: value}, length: max - min + 100})\n }\n }\n for (let i = 0; i < verticalLines.length; i++) {\n const { value, range } = verticalLines[i]\n const min = Math.min(...range, targetMinY, targetMaxY)\n const max = Math.max(...range, targetMinY, targetMaxY)\n\n if (Math.abs(targetMinX - value) < sorptionRange && !isVerticalAdsorbed) {\n targetLeft = targetLeft - (targetMinX - value)\n isVerticalAdsorbed = true\n _alignmentLines.push({type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100})\n }\n if (Math.abs(targetMaxX - value) < sorptionRange && !isVerticalAdsorbed) {\n targetLeft = targetLeft - (targetMaxX - value)\n isVerticalAdsorbed = true\n _alignmentLines.push({type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100})\n }\n if (Math.abs(targetCenterX - value) < sorptionRange && !isVerticalAdsorbed) {\n targetLeft = targetLeft - (targetCenterX - value)\n isVerticalAdsorbed = true\n _alignmentLines.push({type: 'vertical', axis: {x: value, y: min - 50}, length: max - min + 100})\n }\n }\n alignmentLines.value = _alignmentLines\n \n // 单选状态下,或者当前选中的多个元素中存在正在操作的元素时,仅修改正在操作的元素的位置\n if (activeElementIdList.value.length === 1 || isActiveGroupElement) {\n elementList.value = elementList.value.map(el => {\n return el.id === element.id ? { ...el, left: targetLeft, top: targetTop } : el\n })\n }\n\n // 多选状态下,除了修改正在操作的元素的位置,其他被选中的元素也需要修改位置信息\n // 其他被选中的元素的位置信息通过正在操作的元素的移动偏移量来进行计算\n else {\n const handleElement = elementList.value.find(el => el.id === element.id)\n if (!handleElement) return\n\n elementList.value = elementList.value.map(el => {\n if (activeElementIdList.value.includes(el.id)) {\n if (el.id === element.id) {\n return {\n ...el,\n left: targetLeft,\n top: targetTop,\n }\n }\n return {\n ...el,\n left: el.left + (targetLeft - handleElement.left),\n top: el.top + (targetTop - handleElement.top),\n }\n }\n return el\n })\n }\n }\n\n const handleMouseup = (e: MouseEvent | TouchEvent) => {\n isMouseDown = false\n \n document.ontouchmove = null\n document.ontouchend = null\n document.onmousemove = null\n document.onmouseup = null\n\n alignmentLines.value = []\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n return {\n dragElement,\n }\n}","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useKeyboardStore, useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement, PPTLineElement } from '@/types/slides'\nimport { OperateLineHandlers } from '@/types/edit'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\ninterface AdsorptionPoint {\n x: number\n y: number\n}\n\nexport default (elementList: Ref) => {\n const slidesStore = useSlidesStore()\n const { canvasScale } = storeToRefs(useMainStore())\n const { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n const { addHistorySnapshot } = useHistorySnapshot()\n\n // 拖拽线条端点\n const dragLineElement = (e: MouseEvent, element: PPTLineElement, command: OperateLineHandlers) => {\n let isMouseDown = true\n\n const sorptionRange = 8\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n\n const adsorptionPoints: AdsorptionPoint[] = []\n\n // 获取所有线条以外的未旋转的元素的8个缩放点作为吸附位置\n for (let i = 0; i < elementList.value.length; i++) {\n const _element = elementList.value[i]\n if (_element.type === 'line' || _element.rotate) continue\n\n const left = _element.left\n const top = _element.top\n const width = _element.width\n const height = _element.height\n \n const right = left + width\n const bottom = top + height\n const centerX = top + height / 2\n const centerY = left + width / 2\n\n const topPoint = { x: centerY, y: top }\n const bottomPoint = { x: centerY, y: bottom }\n const leftPoint = { x: left, y: centerX }\n const rightPoint = { x: right, y: centerX }\n\n const leftTopPoint = { x: left, y: top }\n const rightTopPoint = { x: right, y: top }\n const leftBottomPoint = { x: left, y: bottom }\n const rightBottomPoint = { x: right, y: bottom }\n\n adsorptionPoints.push(\n topPoint,\n bottomPoint,\n leftPoint,\n rightPoint,\n leftTopPoint,\n rightTopPoint,\n leftBottomPoint,\n rightBottomPoint,\n )\n }\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n const moveX = (currentPageX - startPageX) / canvasScale.value\n const moveY = (currentPageY - startPageY) / canvasScale.value\n \n // 线条起点和终点在编辑区域中的位置\n let startX = element.left + element.start[0]\n let startY = element.top + element.start[1]\n let endX = element.left + element.end[0]\n let endY = element.top + element.end[1]\n\n const mid = element.broken || element.curve || [0, 0]\n let midX = element.left + mid[0]\n let midY = element.top + mid[1]\n\n const [c1, c2] = element.cubic || [[0, 0], [0, 0]]\n let c1X = element.left + c1[0]\n let c1Y = element.top + c1[1]\n let c2X = element.left + c2[0]\n let c2Y = element.top + c2[1]\n\n // 拖拽起点或终点的位置\n // 水平和垂直方向上有吸附\n if (command === OperateLineHandlers.START) {\n startX = startX + moveX\n startY = startY + moveY\n\n if (Math.abs(startX - endX) < sorptionRange) startX = endX\n if (Math.abs(startY - endY) < sorptionRange) startY = endY\n\n for (const adsorptionPoint of adsorptionPoints) {\n const { x, y } = adsorptionPoint\n if (Math.abs(x - startX) < sorptionRange && Math.abs(y - startY) < sorptionRange) {\n startX = x\n startY = y\n break\n }\n }\n }\n else if (command === OperateLineHandlers.END) {\n endX = endX + moveX\n endY = endY + moveY\n\n if (Math.abs(startX - endX) < sorptionRange) endX = startX\n if (Math.abs(startY - endY) < sorptionRange) endY = startY\n\n for (const adsorptionPoint of adsorptionPoints) {\n const { x, y } = adsorptionPoint\n if (Math.abs(x - endX) < sorptionRange && Math.abs(y - endY) < sorptionRange) {\n endX = x\n endY = y\n break\n }\n }\n }\n else if (command === OperateLineHandlers.C) {\n midX = midX + moveX\n midY = midY + moveY\n\n if (Math.abs(midX - startX) < sorptionRange) midX = startX\n if (Math.abs(midY - startY) < sorptionRange) midY = startY\n if (Math.abs(midX - endX) < sorptionRange) midX = endX\n if (Math.abs(midY - endY) < sorptionRange) midY = endY\n if (Math.abs(midX - (startX + endX) / 2) < sorptionRange && Math.abs(midY - (startY + endY) / 2) < sorptionRange) {\n midX = (startX + endX) / 2\n midY = (startY + endY) / 2\n }\n }\n else if (command === OperateLineHandlers.C1) {\n c1X = c1X + moveX\n c1Y = c1Y + moveY\n\n if (Math.abs(c1X - startX) < sorptionRange) c1X = startX\n if (Math.abs(c1Y - startY) < sorptionRange) c1Y = startY\n if (Math.abs(c1X - endX) < sorptionRange) c1X = endX\n if (Math.abs(c1Y - endY) < sorptionRange) c1Y = endY\n }\n else if (command === OperateLineHandlers.C2) {\n c2X = c2X + moveX\n c2Y = c2Y + moveY\n\n if (Math.abs(c2X - startX) < sorptionRange) c2X = startX\n if (Math.abs(c2Y - startY) < sorptionRange) c2Y = startY\n if (Math.abs(c2X - endX) < sorptionRange) c2X = endX\n if (Math.abs(c2Y - endY) < sorptionRange) c2Y = endY\n }\n\n // 计算更新起点和终点基于自身元素位置的坐标\n const minX = Math.min(startX, endX)\n const minY = Math.min(startY, endY)\n const maxX = Math.max(startX, endX)\n const maxY = Math.max(startY, endY)\n\n const start: [number, number] = [0, 0]\n const end: [number, number] = [maxX - minX, maxY - minY]\n if (startX > endX) {\n start[0] = maxX - minX\n end[0] = 0\n }\n if (startY > endY) {\n start[1] = maxY - minY\n end[1] = 0\n }\n\n elementList.value = elementList.value.map(el => {\n if (el.id === element.id) {\n const newEl: PPTLineElement = {\n ...(el as PPTLineElement),\n left: minX,\n top: minY,\n start: start,\n end: end,\n }\n if (command === OperateLineHandlers.START || command === OperateLineHandlers.END) {\n if (ctrlOrShiftKeyActive.value) {\n if (element.broken) newEl.broken = [midX - minX, midY - minY]\n if (element.curve) newEl.curve = [midX - minX, midY - minY]\n if (element.cubic) newEl.cubic = [[c1X - minX, c1Y - minY], [c2X - minX, c2Y - minY]]\n }\n else {\n if (element.broken) newEl.broken = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (element.curve) newEl.curve = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]\n if (element.cubic) newEl.cubic = [[(start[0] + end[0]) / 2, (start[1] + end[1]) / 2], [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]]\n }\n }\n else if (command === OperateLineHandlers.C) {\n if (element.broken) newEl.broken = [midX - minX, midY - minY]\n if (element.curve) newEl.curve = [midX - minX, midY - minY]\n }\n else {\n if (element.cubic) newEl.cubic = [[c1X - minX, c1Y - minY], [c2X - minX, c2Y - minY]]\n }\n return newEl\n }\n return el\n })\n }\n\n document.onmouseup = e => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n }\n\n return {\n dragLineElement,\n }\n}","import type { Ref } from 'vue'\nimport { useSlidesStore } from '@/store'\nimport type { PPTElement, PPTShapeElement } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport { SHAPE_PATH_FORMULAS } from '@/configs/shapes'\n\ninterface ShapePathData {\n baseSize: number,\n originPos: number,\n min: number,\n max: number,\n relative: string,\n}\n\nexport default (\n elementList: Ref,\n canvasScale: Ref,\n) => {\n const slidesStore = useSlidesStore()\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n const moveShapeKeypoint = (e: MouseEvent | TouchEvent, element: PPTShapeElement) => {\n const isTouchEvent = !(e instanceof MouseEvent)\n if (isTouchEvent && (!e.changedTouches || !e.changedTouches[0])) return\n\n let isMouseDown = true\n \n const startPageX = isTouchEvent ? e.changedTouches[0].pageX : e.pageX\n const startPageY = isTouchEvent ? e.changedTouches[0].pageY : e.pageY\n\n const pathFormula = SHAPE_PATH_FORMULAS[element.pathFormula!]\n let shapePathData: ShapePathData | null = null\n if ('editable' in pathFormula) {\n const baseSize = pathFormula.getBaseSize(element.width, element.height)\n const originPos = baseSize * element.keypoint!\n const [min, max] = pathFormula.range\n const relative = pathFormula.relative\n\n shapePathData = { baseSize, originPos, min, max, relative }\n }\n\n const handleMousemove = (e: MouseEvent | TouchEvent) => {\n if (!isMouseDown) return\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n const moveX = (currentPageX - startPageX) / canvasScale.value\n const moveY = (currentPageY - startPageY) / canvasScale.value\n\n elementList.value = elementList.value.map(el => {\n if (el.id === element.id && shapePathData) {\n const { baseSize, originPos, min, max, relative } = shapePathData\n const shapeElement = el as PPTShapeElement\n\n let keypoint = 0\n\n if (relative === 'left') keypoint = (originPos + moveX) / baseSize\n if (relative === 'right') keypoint = (originPos - moveX) / baseSize\n if (relative === 'center') keypoint = (originPos - moveX * 2) / baseSize\n if (relative === 'top') keypoint = (originPos + moveY) / baseSize\n if (relative === 'bottom') keypoint = (originPos - moveY) / baseSize\n\n if (keypoint < min) keypoint = min\n if (keypoint > max) keypoint = max\n\n return {\n ...el,\n keypoint,\n path: pathFormula.formula(shapeElement.width, shapeElement.height, keypoint),\n }\n }\n return el\n })\n }\n\n const handleMouseup = (e: MouseEvent | TouchEvent) => {\n isMouseDown = false\n \n document.ontouchmove = null\n document.ontouchend = null\n document.onmousemove = null\n document.onmouseup = null\n\n const currentPageX = e instanceof MouseEvent ? e.pageX : e.changedTouches[0].pageX\n const currentPageY = e instanceof MouseEvent ? e.pageY : e.changedTouches[0].pageY\n\n if (startPageX === currentPageX && startPageY === currentPageY) return\n\n slidesStore.updateSlide({ elements: elementList.value })\n addHistorySnapshot()\n }\n\n if (isTouchEvent) {\n document.ontouchmove = handleMousemove\n document.ontouchend = handleMouseup\n }\n else {\n document.onmousemove = handleMousemove\n document.onmouseup = handleMouseup\n }\n }\n\n return {\n moveShapeKeypoint,\n }\n}","import type { Ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { CreateElementSelectionData } from '@/types/edit'\nimport useCreateElement from '@/hooks/useCreateElement'\n\nexport default (viewportRef: Ref) => {\n const mainStore = useMainStore()\n const { canvasScale, creatingElement } = storeToRefs(mainStore)\n\n // 通过鼠标框选时的起点和终点,计算选区的位置大小\n const formatCreateSelection = (selectionData: CreateElementSelectionData) => {\n const { start, end } = selectionData\n\n if (!viewportRef.value) return\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const [startX, startY] = start\n const [endX, endY] = end\n const minX = Math.min(startX, endX)\n const maxX = Math.max(startX, endX)\n const minY = Math.min(startY, endY)\n const maxY = Math.max(startY, endY)\n\n const left = (minX - viewportRect.x) / canvasScale.value\n const top = (minY - viewportRect.y) / canvasScale.value\n const width = (maxX - minX) / canvasScale.value\n const height = (maxY - minY) / canvasScale.value\n\n return { left, top, width, height }\n }\n\n // 通过鼠标框选时的起点和终点,计算线条在画布中的位置和起点终点\n const formatCreateSelectionForLine = (selectionData: CreateElementSelectionData) => {\n const { start, end } = selectionData\n\n if (!viewportRef.value) return\n const viewportRect = viewportRef.value.getBoundingClientRect()\n\n const [startX, startY] = start\n const [endX, endY] = end\n const minX = Math.min(startX, endX)\n const maxX = Math.max(startX, endX)\n const minY = Math.min(startY, endY)\n const maxY = Math.max(startY, endY)\n\n const left = (minX - viewportRect.x) / canvasScale.value\n const top = (minY - viewportRect.y) / canvasScale.value\n const width = (maxX - minX) / canvasScale.value\n const height = (maxY - minY) / canvasScale.value\n\n const _start: [number, number] = [\n startX === minX ? 0 : width,\n startY === minY ? 0 : height,\n ]\n const _end: [number, number] = [\n endX === minX ? 0 : width,\n endY === minY ? 0 : height,\n ]\n\n return {\n left,\n top,\n start: _start,\n end: _end,\n }\n }\n\n const { createTextElement, createShapeElement, createLineElement } = useCreateElement()\n\n // 根据鼠标选区的位置大小插入元素\n const insertElementFromCreateSelection = (selectionData: CreateElementSelectionData) => {\n if (!creatingElement.value) return\n\n const type = creatingElement.value.type\n if (type === 'text') {\n const position = formatCreateSelection(selectionData)\n position && createTextElement(position, { vertical: creatingElement.value.vertical })\n }\n else if (type === 'shape') {\n const position = formatCreateSelection(selectionData)\n position && createShapeElement(position, creatingElement.value.data)\n }\n else if (type === 'line') {\n const position = formatCreateSelectionForLine(selectionData)\n position && createLineElement(position, creatingElement.value.data)\n }\n mainStore.setCreatingElement(null)\n }\n\n return {\n formatCreateSelection,\n insertElementFromCreateSelection,\n }\n}","import { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { ElementAlignCommands } from '@/types/edit'\nimport { getElementListRange } from '@/utils/element'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useHistorySnapshot from './useHistorySnapshot'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n const { activeElementIdList, activeElementList } = storeToRefs(useMainStore())\n const { currentSlide, viewportRatio } = storeToRefs(slidesStore)\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n /**\n * 将所有选中的元素对齐到画布\n * @param command 对齐方向\n */\n const alignElementToCanvas = (command: ElementAlignCommands) => {\n const viewportWidth = VIEWPORT_SIZE\n const viewportHeight = VIEWPORT_SIZE * viewportRatio.value\n const { minX, maxX, minY, maxY } = getElementListRange(activeElementList.value)\n \n const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))\n for (const element of newElementList) {\n if (!activeElementIdList.value.includes(element.id)) continue\n \n // 水平垂直居中\n if (command === ElementAlignCommands.CENTER) {\n const offsetY = minY + (maxY - minY) / 2 - viewportHeight / 2\n const offsetX = minX + (maxX - minX) / 2 - viewportWidth / 2\n element.top = element.top - offsetY \n element.left = element.left - offsetX \n }\n\n // 顶部对齐\n if (command === ElementAlignCommands.TOP) {\n const offsetY = minY - 0\n element.top = element.top - offsetY \n }\n\n // 垂直居中\n else if (command === ElementAlignCommands.VERTICAL) {\n const offsetY = minY + (maxY - minY) / 2 - viewportHeight / 2\n element.top = element.top - offsetY \n }\n\n // 底部对齐\n else if (command === ElementAlignCommands.BOTTOM) {\n const offsetY = maxY - viewportHeight\n element.top = element.top - offsetY \n }\n \n // 左侧对齐\n else if (command === ElementAlignCommands.LEFT) {\n const offsetX = minX - 0\n element.left = element.left - offsetX \n }\n\n // 水平居中\n else if (command === ElementAlignCommands.HORIZONTAL) {\n const offsetX = minX + (maxX - minX) / 2 - viewportWidth / 2\n element.left = element.left - offsetX \n }\n\n // 右侧对齐\n else if (command === ElementAlignCommands.RIGHT) {\n const offsetX = maxX - viewportWidth\n element.left = element.left - offsetX \n }\n }\n\n slidesStore.updateSlide({ elements: newElementList })\n addHistorySnapshot()\n }\n\n return {\n alignElementToCanvas,\n }\n}","import { computed, type Ref } from 'vue'\nimport type { PPTElementShadow } from '@/types/slides'\n\n// 计算元素的阴影样式\nexport default (shadow: Ref) => {\n const shadowStyle = computed(() => {\n if (shadow.value) {\n const { h, v, blur, color } = shadow.value\n return `${h}px ${v}px ${blur}px ${color}`\n }\n return ''\n })\n\n return {\n shadowStyle,\n }\n}","import { computed, type Ref } from 'vue'\n\n// 计算元素的翻转样式\nexport default (flipH: Ref, flipV: Ref) => {\n const flipStyle = computed(() => {\n let style = ''\n \n if (flipH.value && flipV.value) style = 'rotateX(180deg) rotateY(180deg)'\n else if (flipV.value) style = 'rotateX(180deg)'\n else if (flipH.value) style = 'rotateY(180deg)'\n\n return style\n })\n\n return {\n flipStyle,\n }\n}","import { computed, type Ref } from 'vue'\nimport { CLIPPATHS, ClipPathTypes } from '@/configs/imageClip'\nimport type { ImageElementClip } from '@/types/slides'\n\nexport default (clip: Ref) => {\n const clipShape = computed(() => {\n if (!clip.value) return CLIPPATHS.rect\n const shape = clip.value.shape || ClipPathTypes.RECT\n\n return CLIPPATHS[shape]\n })\n\n const imgPosition = computed(() => {\n if (!clip.value) {\n return {\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n }\n }\n\n const [start, end] = clip.value.range\n\n const widthScale = (end[0] - start[0]) / 100\n const heightScale = (end[1] - start[1]) / 100\n const left = start[0] / widthScale\n const top = start[1] / heightScale\n\n return {\n left: -left + '%',\n top: -top + '%',\n width: 100 / widthScale + '%',\n height: 100 / heightScale + '%',\n }\n })\n\n return {\n clipShape,\n imgPosition,\n }\n}","import { computed, type Ref } from 'vue'\nimport type { ImageElementFilters, ImageElementFilterKeys } from '@/types/slides'\n\nexport default (filters: Ref) => {\n const filter = computed(() => {\n if (!filters.value) return ''\n let filter = ''\n const keys = Object.keys(filters.value) as ImageElementFilterKeys[]\n for (const key of keys) {\n filter += `${key}(${filters.value[key]}) `\n }\n return filter\n })\n\n return {\n filter,\n }\n}","import { computed, type Ref } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\n\n// 计算边框相关属性值,主要是对默认值的处理\nexport default (outline: Ref) => {\n const outlineWidth = computed(() => outline.value?.width ?? 0)\n const outlineStyle = computed(() => outline.value?.style || 'solid')\n const outlineColor = computed(() => outline.value?.color || '#d14424')\n\n const strokeDashArray = computed(() => {\n if (outlineStyle.value !== 'dashed') return '0 0'\n const size = outlineWidth.value\n return size <= 6 ? `${size * 4.5} ${size * 2}` : `${size * 4} ${size * 1.5}`\n })\n\n return {\n outlineWidth,\n outlineStyle,\n outlineColor,\n strokeDashArray,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-35e36256\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"rx\", \"ry\", \"width\", \"height\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImageRectOutline',\n props: {\n width: {},\n height: {},\n outline: {},\n radius: { default: '0' }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"image-rect-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"rect\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n rx: _ctx.radius,\n ry: _ctx.radius,\n width: _ctx.width,\n height: _ctx.height,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ImageRectOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageRectOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageRectOutline.vue?vue&type=style&index=0&id=35e36256&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-35e36256\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-11836cf8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"cx\", \"cy\", \"rx\", \"ry\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImageEllipseOutline',\n props: {\n width: {},\n height: {},\n outline: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"image-ellipse-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"ellipse\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n cx: _ctx.width / 2,\n cy: _ctx.height / 2,\n rx: _ctx.width / 2,\n ry: _ctx.height / 2,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ImageEllipseOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageEllipseOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageEllipseOutline.vue?vue&type=style&index=0&id=11836cf8&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-11836cf8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6e021ee2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImagePolygonOutline',\n props: {\n width: {},\n height: {},\n createPath: { type: Function },\n outline: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"image-polygon-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"path\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n d: _ctx.createPath(_ctx.width, _ctx.height),\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ImagePolygonOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImagePolygonOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImagePolygonOutline.vue?vue&type=style&index=0&id=6e021ee2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6e021ee2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"image-outline\" }\n\nimport { computed } from 'vue'\nimport type { PPTImageElement } from '@/types/slides'\nimport useClipImage from '../useClipImage'\n\nimport ImageRectOutline from './ImageRectOutline.vue'\nimport ImageEllipseOutline from './ImageEllipseOutline.vue'\nimport ImagePolygonOutline from './ImagePolygonOutline.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst clip = computed(() => props.elementInfo.clip)\nconst { clipShape } = useClipImage(clip)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(clipShape).type === 'rect')\n ? (_openBlock(), _createBlock(ImageRectOutline, {\n key: 0,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n radius: _unref(clipShape).radius,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"radius\", \"outline\"]))\n : (_unref(clipShape).type === 'ellipse')\n ? (_openBlock(), _createBlock(ImageEllipseOutline, {\n key: 1,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]))\n : (_unref(clipShape).type === 'polygon')\n ? (_openBlock(), _createBlock(ImagePolygonOutline, {\n key: 2,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline,\n createPath: _unref(clipShape).createPath!\n }, null, 8, [\"width\", \"height\", \"outline\", \"createPath\"]))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5984406b\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\"]\nconst _hoisted_2 = [\"src\"]\nconst _hoisted_3 = [\"onMousedown\"]\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n width: \"16\",\n height: \"16\",\n fill: \"#fff\",\n stroke: \"#333\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n \"stroke-width\": \"0.3\",\n \"shape-rendering\": \"crispEdges\",\n d: \"M 16 0 L 0 0 L 0 16 L 4 16 L 4 4 L 16 4 L 16 0 Z\"\n })\n], -1))\nconst _hoisted_5 = [\n _hoisted_4\n]\nconst _hoisted_6 = [\"onMousedown\"]\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n width: \"16\",\n height: \"16\",\n fill: \"#fff\",\n stroke: \"#333\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n \"stroke-width\": \"0.3\",\n \"shape-rendering\": \"crispEdges\",\n d: \"M 16 0 L 0 0 L 0 4 L 16 4 Z\"\n })\n], -1))\nconst _hoisted_8 = [\n _hoisted_7\n]\n\nimport { computed, onMounted, onUnmounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useKeyboardStore } from '@/store'\nimport { KEYS } from '@/configs/hotkey'\nimport { type ImageClipedEmitData, OperateResizeHandlers } from '@/types/edit'\nimport type { ImageClipDataRange, ImageElementClip } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ImageClipHandler',\n props: {\n src: {},\n clipPath: {},\n width: {},\n height: {},\n top: {},\n left: {},\n rotate: {},\n clipData: {}\n },\n emits: [\"clip\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst { canvasScale } = storeToRefs(useMainStore())\nconst { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\nconst clipWrapperPositionStyle = ref({\n top: '0',\n left: '0',\n})\nconst isSettingClipRange = ref(false)\nconst currentRange = ref(null)\n\n// 获取裁剪区域信息(裁剪区域占原图的宽高比例,处在原图中的位置)\nconst getClipDataTransformInfo = () => {\n const [start, end] = props.clipData ? props.clipData.range : [[0, 0], [100, 100]]\n\n const widthScale = (end[0] - start[0]) / 100\n const heightScale = (end[1] - start[1]) / 100\n const left = start[0] / widthScale\n const top = start[1] / heightScale\n\n return { widthScale, heightScale, left, top }\n}\n\n// 底层图片位置大小(遮罩区域图片)\nconst imgPosition = computed(() => {\n const { widthScale, heightScale, left, top } = getClipDataTransformInfo()\n return {\n left: -left,\n top: -top,\n width: 100 / widthScale,\n height: 100 / heightScale,\n }\n})\n\n// 底层图片位置大小样式(遮罩区域图片)\nconst bottomImgPositionStyle = computed(() => {\n return {\n top: imgPosition.value.top + '%',\n left: imgPosition.value.left + '%',\n width: imgPosition.value.width + '%',\n height: imgPosition.value.height + '%',\n }\n})\n\n// 顶层图片容器位置大小(裁剪高亮区域)\nconst topImgWrapperPosition = ref({\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n})\n\n// 顶层图片容器位置大小样式(裁剪高亮区域)\nconst topImgWrapperPositionStyle = computed(() => {\n const { top, left, width, height } = topImgWrapperPosition.value\n return {\n top: top + '%',\n left: left + '%',\n width: width + '%',\n height: height + '%',\n }\n})\n\n// 顶层图片位置大小样式(裁剪区域图片)\nconst topImgPositionStyle = computed(() => {\n const bottomWidth = imgPosition.value.width\n const bottomHeight = imgPosition.value.height\n \n const { top, left, width, height } = topImgWrapperPosition.value\n \n return {\n left: -left * (100 / width) + '%',\n top: -top * (100 / height) + '%',\n width: bottomWidth / width * 100 + '%',\n height: bottomHeight / height * 100 + '%',\n }\n})\n\n// 初始化裁剪位置信息\nconst initClipPosition = () => {\n const { left, top } = getClipDataTransformInfo()\n topImgWrapperPosition.value = {\n left: left,\n top: top,\n width: 100,\n height: 100,\n }\n \n clipWrapperPositionStyle.value = {\n top: -top + '%',\n left: -left + '%',\n }\n}\n\n// 执行裁剪:计算裁剪后的图片位置大小和裁剪信息,并将数据同步出去\nconst handleClip = () => {\n if (isSettingClipRange.value) return\n\n if (!currentRange.value) {\n emit('clip', null)\n return\n }\n\n const { left, top } = getClipDataTransformInfo()\n\n const position = {\n left: (topImgWrapperPosition.value.left - left) / 100 * props.width,\n top: (topImgWrapperPosition.value.top - top) / 100 * props.height,\n width: (topImgWrapperPosition.value.width - 100) / 100 * props.width,\n height: (topImgWrapperPosition.value.height - 100) / 100 * props.height,\n }\n\n const clipedEmitData: ImageClipedEmitData = {\n range: currentRange.value,\n position,\n }\n emit('clip', clipedEmitData)\n}\n\n// 快捷键监听:回车确认裁剪\nconst keyboardListener = (e: KeyboardEvent) => {\n const key = e.key.toUpperCase()\n if (key === KEYS.ENTER) handleClip()\n}\n\nonMounted(() => {\n initClipPosition()\n document.addEventListener('keydown', keyboardListener)\n})\nonUnmounted(() => {\n document.removeEventListener('keydown', keyboardListener)\n})\n\n// 计算并更新裁剪区域范围数据\nconst updateRange = () => {\n const retPosition = {\n left: parseInt(topImgPositionStyle.value.left),\n top: parseInt(topImgPositionStyle.value.top),\n width: parseInt(topImgPositionStyle.value.width),\n height: parseInt(topImgPositionStyle.value.height),\n }\n\n const widthScale = 100 / retPosition.width\n const heightScale = 100 / retPosition.height\n\n const start: [number, number] = [\n -retPosition.left * widthScale,\n -retPosition.top * heightScale,\n ]\n const end: [number, number] = [\n widthScale * 100 + start[0],\n heightScale * 100 + start[1],\n ]\n\n currentRange.value = [start, end]\n}\n\n// 移动裁剪区域\nconst moveClipRange = (e: MouseEvent) => {\n isSettingClipRange.value = true\n let isMouseDown = true\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n const bottomPosition = imgPosition.value\n const originPositopn = { ...topImgWrapperPosition.value }\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n let moveX = (currentPageX - startPageX) / canvasScale.value / props.width * 100\n let moveY = (currentPageY - startPageY) / canvasScale.value / props.height * 100\n\n if (props.rotate > 45 && props.rotate < 135) {\n moveX = (currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = -(currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n if ((props.rotate >= 135 && props.rotate <= 180) || (props.rotate >= -180 && props.rotate <= -135)) {\n moveX = -moveX\n moveY = -moveY\n }\n if (props.rotate > -135 && props.rotate < -45) {\n moveX = -(currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = (currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n\n let targetLeft = originPositopn.left + moveX\n let targetTop = originPositopn.top + moveY\n\n if (targetLeft < 0) targetLeft = 0\n else if (targetLeft + originPositopn.width > bottomPosition.width) {\n targetLeft = bottomPosition.width - originPositopn.width\n }\n if (targetTop < 0) targetTop = 0\n else if (targetTop + originPositopn.height > bottomPosition.height) {\n targetTop = bottomPosition.height - originPositopn.height\n }\n \n topImgWrapperPosition.value = {\n ...topImgWrapperPosition.value,\n left: targetLeft,\n top: targetTop,\n }\n }\n\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n updateRange()\n\n setTimeout(() => {\n isSettingClipRange.value = false\n }, 0)\n }\n}\n\n// 缩放裁剪区域\nconst scaleClipRange = (e: MouseEvent, type: OperateResizeHandlers) => {\n isSettingClipRange.value = true\n let isMouseDown = true\n\n const minWidth = 50 / props.width * 100\n const minHeight = 50 / props.height * 100\n \n const startPageX = e.pageX\n const startPageY = e.pageY\n const bottomPosition = imgPosition.value\n const originPositopn = { ...topImgWrapperPosition.value }\n\n const aspectRatio = topImgWrapperPosition.value.width / topImgWrapperPosition.value.height\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n\n const currentPageX = e.pageX\n const currentPageY = e.pageY\n\n let moveX = (currentPageX - startPageX) / canvasScale.value / props.width * 100\n let moveY = (currentPageY - startPageY) / canvasScale.value / props.height * 100\n\n if (props.rotate > 45 && props.rotate < 135) {\n moveX = (currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = -(currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n if ((props.rotate >= 135 && props.rotate <= 180) || (props.rotate >= -180 && props.rotate <= -135)) {\n moveX = -moveX\n moveY = -moveY\n }\n if (props.rotate > -135 && props.rotate < -45) {\n moveX = -(currentPageY - startPageY) / canvasScale.value / props.width * 100\n moveY = (currentPageX - startPageX) / canvasScale.value / props.height * 100\n }\n\n if (ctrlOrShiftKeyActive.value) {\n if (type === OperateResizeHandlers.RIGHT_BOTTOM || type === OperateResizeHandlers.LEFT_TOP) moveY = moveX / aspectRatio\n if (type === OperateResizeHandlers.LEFT_BOTTOM || type === OperateResizeHandlers.RIGHT_TOP) moveY = -moveX / aspectRatio\n }\n\n let targetLeft, targetTop, targetWidth, targetHeight\n\n if (type === OperateResizeHandlers.LEFT_TOP) {\n if (originPositopn.left + moveX < 0) {\n moveX = -originPositopn.left\n }\n if (originPositopn.top + moveY < 0) {\n moveY = -originPositopn.top\n }\n if (originPositopn.width - moveX < minWidth) {\n moveX = originPositopn.width - minWidth\n }\n if (originPositopn.height - moveY < minHeight) {\n moveY = originPositopn.height - minHeight\n }\n targetWidth = originPositopn.width - moveX\n targetHeight = originPositopn.height - moveY\n targetLeft = originPositopn.left + moveX\n targetTop = originPositopn.top + moveY\n }\n else if (type === OperateResizeHandlers.RIGHT_TOP) {\n if (originPositopn.left + originPositopn.width + moveX > bottomPosition.width) {\n moveX = bottomPosition.width - (originPositopn.left + originPositopn.width)\n }\n if (originPositopn.top + moveY < 0) {\n moveY = -originPositopn.top\n }\n if (originPositopn.width + moveX < minWidth) {\n moveX = minWidth - originPositopn.width\n }\n if (originPositopn.height - moveY < minHeight) {\n moveY = originPositopn.height - minHeight\n }\n targetWidth = originPositopn.width + moveX\n targetHeight = originPositopn.height - moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top + moveY\n }\n else if (type === OperateResizeHandlers.LEFT_BOTTOM) {\n if (originPositopn.left + moveX < 0) {\n moveX = -originPositopn.left\n }\n if (originPositopn.top + originPositopn.height + moveY > bottomPosition.height) {\n moveY = bottomPosition.height - (originPositopn.top + originPositopn.height)\n }\n if (originPositopn.width - moveX < minWidth) {\n moveX = originPositopn.width - minWidth\n }\n if (originPositopn.height + moveY < minHeight) {\n moveY = minHeight - originPositopn.height\n }\n targetWidth = originPositopn.width - moveX\n targetHeight = originPositopn.height + moveY\n targetLeft = originPositopn.left + moveX\n targetTop = originPositopn.top\n }\n else if (type === OperateResizeHandlers.RIGHT_BOTTOM) {\n if (originPositopn.left + originPositopn.width + moveX > bottomPosition.width) {\n moveX = bottomPosition.width - (originPositopn.left + originPositopn.width)\n }\n if (originPositopn.top + originPositopn.height + moveY > bottomPosition.height) {\n moveY = bottomPosition.height - (originPositopn.top + originPositopn.height)\n }\n if (originPositopn.width + moveX < minWidth) {\n moveX = minWidth - originPositopn.width\n }\n if (originPositopn.height + moveY < minHeight) {\n moveY = minHeight - originPositopn.height\n }\n targetWidth = originPositopn.width + moveX\n targetHeight = originPositopn.height + moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top\n }\n else if (type === OperateResizeHandlers.TOP) {\n if (originPositopn.top + moveY < 0) {\n moveY = -originPositopn.top\n }\n if (originPositopn.height - moveY < minHeight) {\n moveY = originPositopn.height - minHeight\n }\n targetWidth = originPositopn.width\n targetHeight = originPositopn.height - moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top + moveY\n }\n else if (type === OperateResizeHandlers.BOTTOM) {\n if (originPositopn.top + originPositopn.height + moveY > bottomPosition.height) {\n moveY = bottomPosition.height - (originPositopn.top + originPositopn.height)\n }\n if (originPositopn.height + moveY < minHeight) {\n moveY = minHeight - originPositopn.height\n }\n targetWidth = originPositopn.width\n targetHeight = originPositopn.height + moveY\n targetLeft = originPositopn.left\n targetTop = originPositopn.top\n }\n else if (type === OperateResizeHandlers.LEFT) {\n if (originPositopn.left + moveX < 0) {\n moveX = -originPositopn.left\n }\n if (originPositopn.width - moveX < minWidth) {\n moveX = originPositopn.width - minWidth\n }\n targetWidth = originPositopn.width - moveX\n targetHeight = originPositopn.height\n targetLeft = originPositopn.left + moveX\n targetTop = originPositopn.top\n }\n else {\n if (originPositopn.left + originPositopn.width + moveX > bottomPosition.width) {\n moveX = bottomPosition.width - (originPositopn.left + originPositopn.width)\n }\n if (originPositopn.width + moveX < minWidth) {\n moveX = minWidth - originPositopn.width\n }\n targetHeight = originPositopn.height\n targetWidth = originPositopn.width + moveX\n targetLeft = originPositopn.left\n targetTop = originPositopn.top\n }\n\n topImgWrapperPosition.value = {\n left: targetLeft,\n top: targetTop,\n width: targetWidth,\n height: targetHeight,\n }\n }\n\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n updateRange()\n\n setTimeout(() => isSettingClipRange.value = false, 0)\n }\n}\n\nconst rotateClassName = computed(() => {\n const prefix = 'rotate-'\n const rotate = props.rotate\n if (rotate > -22.5 && rotate <= 22.5) return prefix + 0\n else if (rotate > 22.5 && rotate <= 67.5) return prefix + 45\n else if (rotate > 67.5 && rotate <= 112.5) return prefix + 90\n else if (rotate > 112.5 && rotate <= 157.5) return prefix + 135\n else if (rotate > 157.5 || rotate <= -157.5) return prefix + 0\n else if (rotate > -157.5 && rotate <= -112.5) return prefix + 45\n else if (rotate > -112.5 && rotate <= -67.5) return prefix + 90\n else if (rotate > -67.5 && rotate <= -22.5) return prefix + 135\n return prefix + 0\n})\n\nconst cornerPoint = [\n OperateResizeHandlers.LEFT_TOP,\n OperateResizeHandlers.RIGHT_TOP,\n OperateResizeHandlers.LEFT_BOTTOM,\n OperateResizeHandlers.RIGHT_BOTTOM,\n]\nconst edgePoints = [\n OperateResizeHandlers.TOP,\n OperateResizeHandlers.BOTTOM,\n OperateResizeHandlers.LEFT,\n OperateResizeHandlers.RIGHT,\n]\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_click_outside = _resolveDirective(\"click-outside\")!\n\n return _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"image-clip-handler\",\n style: _normalizeStyle(clipWrapperPositionStyle.value)\n }, [\n _createElementVNode(\"img\", {\n class: \"bottom-img\",\n src: _ctx.src,\n draggable: false,\n alt: \"\",\n style: _normalizeStyle(bottomImgPositionStyle.value)\n }, null, 12, _hoisted_1),\n _createElementVNode(\"div\", {\n class: \"top-image-content\",\n style: _normalizeStyle({\n ...topImgWrapperPositionStyle.value,\n clipPath: _ctx.clipPath,\n })\n }, [\n _createElementVNode(\"img\", {\n class: \"top-img\",\n src: _ctx.src,\n draggable: false,\n alt: \"\",\n style: _normalizeStyle(topImgPositionStyle.value)\n }, null, 12, _hoisted_2)\n ], 4),\n _createElementVNode(\"div\", {\n class: \"operate\",\n style: _normalizeStyle(topImgWrapperPositionStyle.value),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => moveClipRange($event), [\"stop\"]))\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(cornerPoint, (point) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass(['clip-point', point, rotateClassName.value]),\n key: point,\n onMousedown: _withModifiers($event => scaleClipRange($event, point), [\"stop\"])\n }, _hoisted_5, 42, _hoisted_3)\n }), 64)),\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(edgePoints, (point) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass(['clip-point', point, rotateClassName.value]),\n key: point,\n onMousedown: _withModifiers($event => scaleClipRange($event, point), [\"stop\"])\n }, _hoisted_8, 42, _hoisted_6)\n }), 64))\n ], 36)\n ], 4)), [\n [_directive_click_outside, handleClip]\n ])\n}\n}\n\n})","\n\n\n\n","import script from \"./ImageClipHandler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageClipHandler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageClipHandler.vue?vue&type=style&index=0&id=5984406b&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5984406b\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, withModifiers as _withModifiers, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, resolveDirective as _resolveDirective, withDirectives as _withDirectives, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-1156b3e1\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\"]\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { ImageElementClip, PPTImageElement } from '@/types/slides'\nimport type { ImageClipedEmitData } from '@/types/edit'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport useClipImage from './useClipImage'\nimport useFilter from './useFilter'\n\nimport ImageOutline from './ImageOutline/index.vue'\nimport ImageClipHandler from './ImageClipHandler.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { clipingImageElementId } = storeToRefs(mainStore)\n\nconst isCliping = computed(() => clipingImageElementId.value === props.elementInfo.id)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst clip = computed(() => props.elementInfo.clip)\nconst { clipShape, imgPosition } = useClipImage(clip)\n\nconst filters = computed(() => props.elementInfo.filters)\nconst { filter } = useFilter(filters)\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n props.selectElement(e, props.elementInfo)\n}\n\nconst handleClip = (data: ImageClipedEmitData | null) => {\n mainStore.setClipingImageElementId('')\n \n if (!data) return\n\n const { range, position } = data\n const originClip: ImageElementClip = props.elementInfo.clip || { shape: 'rect', range: [[0, 0], [100, 100]] }\n\n const left = props.elementInfo.left + position.left\n const top = props.elementInfo.top + position.top\n const width = props.elementInfo.width + position.width\n const height = props.elementInfo.height + position.height\n\n let centerOffsetX = 0\n let centerOffsetY = 0\n\n if (props.elementInfo.rotate) {\n const centerX = (left + width / 2) - (props.elementInfo.left + props.elementInfo.width / 2)\n const centerY = -((top + height / 2) - (props.elementInfo.top + props.elementInfo.height / 2))\n\n const radian = -props.elementInfo.rotate * Math.PI / 180\n\n const rotatedCenterX = centerX * Math.cos(radian) - centerY * Math.sin(radian)\n const rotatedCenterY = centerX * Math.sin(radian) + centerY * Math.cos(radian)\n\n centerOffsetX = rotatedCenterX - centerX\n centerOffsetY = -(rotatedCenterY - centerY)\n }\n\n const _props = {\n clip: { ...originClip, range },\n left: left + centerOffsetX,\n top: top + centerOffsetY,\n width,\n height,\n }\n slidesStore.updateElement({ id: props.elementInfo.id, props: _props })\n \n addHistorySnapshot()\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-image\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n (isCliping.value)\n ? (_openBlock(), _createBlock(ImageClipHandler, {\n key: 0,\n src: _ctx.elementInfo.src,\n clipData: _ctx.elementInfo.clip,\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n top: _ctx.elementInfo.top,\n left: _ctx.elementInfo.left,\n rotate: _ctx.elementInfo.rotate,\n clipPath: _unref(clipShape).style,\n onClip: _cache[0] || (_cache[0] = range => handleClip(range))\n }, null, 8, [\"src\", \"clipData\", \"width\", \"height\", \"top\", \"left\", \"rotate\", \"clipPath\"]))\n : _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"element-content\",\n style: _normalizeStyle({\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n }),\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event)),\n onTouchstart: _cache[3] || (_cache[3] = $event => handleSelectElement($event))\n }, [\n _createVNode(ImageOutline, { elementInfo: _ctx.elementInfo }, null, 8, [\"elementInfo\"]),\n _createElementVNode(\"div\", {\n class: \"image-content\",\n style: _normalizeStyle({ clipPath: _unref(clipShape).style })\n }, [\n _createElementVNode(\"img\", {\n src: _ctx.elementInfo.src,\n draggable: false,\n style: _normalizeStyle({\n top: _unref(imgPosition).top,\n left: _unref(imgPosition).left,\n width: _unref(imgPosition).width,\n height: _unref(imgPosition).height,\n filter: _unref(filter),\n }),\n onDragstart: _cache[1] || (_cache[1] = _withModifiers(() => {}, [\"prevent\"])),\n alt: \"\"\n }, null, 44, _hoisted_1),\n (_ctx.elementInfo.colorMask)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"color-mask\",\n style: _normalizeStyle({\n backgroundColor: _ctx.elementInfo.colorMask,\n })\n }, null, 4))\n : _createCommentVNode(\"\", true)\n ], 4)\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=1156b3e1&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1156b3e1\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-efb76626\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { toRef } from 'vue'\nimport type { PPTElementOutline } from '@/types/slides'\n\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ElementOutline',\n props: {\n width: {},\n height: {},\n outline: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst {\n outlineWidth,\n outlineColor,\n strokeDashArray,\n} = useElementOutline(toRef(props, 'outline'))\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.outline)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n class: \"element-outline\",\n overflow: \"visible\",\n width: _ctx.width,\n height: _ctx.height\n }, [\n _createElementVNode(\"path\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: \"transparent\",\n d: `M0,0 L${_ctx.width},0 L${_ctx.width},${_ctx.height} L0,${_ctx.height} Z`,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","\n\n\n\n","import script from \"./ElementOutline.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ElementOutline.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ElementOutline.vue?vue&type=style&index=0&id=efb76626&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-efb76626\"]])\n\nexport default __exports__","import { splitListItem, liftListItem, sinkListItem } from 'prosemirror-schema-list'\nimport type { Schema } from 'prosemirror-model'\nimport { undo, redo } from 'prosemirror-history'\nimport { undoInputRule } from 'prosemirror-inputrules'\nimport type { Command } from 'prosemirror-state'\nimport {\n toggleMark,\n selectParentNode,\n joinUp,\n joinDown,\n chainCommands,\n newlineInCode,\n createParagraphNear,\n liftEmptyBlock,\n splitBlockKeepMarks,\n} from 'prosemirror-commands'\n\ninterface Keys {\n [key: string]: Command\n}\n\nexport const buildKeymap = (schema: Schema) => {\n const keys: Keys = {}\n const bind = (key: string, cmd: Command) => keys[key] = cmd\n\n bind('Alt-ArrowUp', joinUp)\n bind('Alt-ArrowDown', joinDown)\n bind('Mod-z', undo)\n bind('Mod-y', redo)\n bind('Backspace', undoInputRule)\n bind('Escape', selectParentNode)\n bind('Mod-b', toggleMark(schema.marks.strong))\n bind('Mod-i', toggleMark(schema.marks.em))\n bind('Mod-u', toggleMark(schema.marks.underline))\n bind('Mod-d', toggleMark(schema.marks.strikethrough))\n bind('Mod-e', toggleMark(schema.marks.code))\n bind('Mod-;', toggleMark(schema.marks.superscript))\n bind(`Mod-'`, toggleMark(schema.marks.subscript))\n bind('Enter', chainCommands(\n splitListItem(schema.nodes.list_item),\n newlineInCode,\n createParagraphNear,\n liftEmptyBlock,\n splitBlockKeepMarks,\n ))\n bind('Mod-[', liftListItem(schema.nodes.list_item))\n bind('Mod-]', sinkListItem(schema.nodes.list_item))\n bind('Tab', sinkListItem(schema.nodes.list_item))\n\n return keys\n}","import type { NodeType, Schema } from 'prosemirror-model'\nimport {\n inputRules,\n wrappingInputRule,\n smartQuotes,\n emDash,\n ellipsis,\n InputRule,\n} from 'prosemirror-inputrules'\n\nconst blockQuoteRule = (nodeType: NodeType) => wrappingInputRule(/^\\s*>\\s$/, nodeType)\n\nconst orderedListRule = (nodeType: NodeType) => (\n wrappingInputRule(\n /^(\\d+)\\.\\s$/, \n nodeType, \n match => ({order: +match[1]}),\n (match, node) => node.childCount + node.attrs.order === +match[1],\n )\n)\n\nconst bulletListRule = (nodeType: NodeType) => wrappingInputRule(/^\\s*([-+*])\\s$/, nodeType)\n\nconst codeRule = () => {\n const inputRegex = /(?:^|\\s)((?:`)((?:[^`]+))(?:`))$/\n \n return new InputRule(inputRegex, (state, match, start, end) => {\n const { schema } = state\n\n const tr = state.tr.insertText(`${match[2]} `, start, end)\n const mark = schema.marks.code.create()\n\n return tr.addMark(start, start + match[2].length, mark)\n })\n}\n\nconst linkRule = () => {\n const urlRegEx = /(?:https?:\\/\\/)?[\\w-]+(?:\\.[\\w-]+)+\\.?(?:\\d+)?(?:\\/\\S*)?$/\n \n return new InputRule(urlRegEx, (state, match, start, end) => {\n const { schema } = state\n\n const tr = state.tr.insertText(match[0], start, end)\n const mark = schema.marks.link.create({ href: match[0], title: match[0] })\n\n return tr.addMark(start, start + match[0].length, mark)\n })\n}\n\nexport const buildInputRules = (schema: Schema) => {\n const rules = [\n ...smartQuotes,\n ellipsis,\n emDash,\n ]\n rules.push(blockQuoteRule(schema.nodes.blockquote))\n rules.push(orderedListRule(schema.nodes.ordered_list))\n rules.push(bulletListRule(schema.nodes.bullet_list))\n rules.push(codeRule())\n rules.push(linkRule())\n\n return inputRules({ rules })\n}","import { Plugin } from 'prosemirror-state'\nimport { Decoration, DecorationSet } from 'prosemirror-view'\nimport type { Node } from 'prosemirror-model'\n\nconst isEmptyParagraph = (node: Node) => {\n return node.type.name === 'paragraph' && node.nodeSize === 2\n}\n\nexport const placeholderPlugin = (placeholder: string) => {\n return new Plugin({\n props: {\n decorations(state) {\n const { $from } = state.selection\n if (isEmptyParagraph($from.parent)) {\n const decoration = Decoration.node($from.before(), $from.after(), {\n 'data-placeholder': placeholder,\n })\n return DecorationSet.create(state.doc, [decoration])\n }\n },\n },\n })\n}","import { keymap } from 'prosemirror-keymap'\nimport type { Schema } from 'prosemirror-model'\nimport { history } from 'prosemirror-history'\nimport { baseKeymap } from 'prosemirror-commands'\nimport { dropCursor } from 'prosemirror-dropcursor'\nimport { gapCursor } from 'prosemirror-gapcursor'\n\nimport { buildKeymap } from './keymap'\nimport { buildInputRules } from './inputrules'\nimport { placeholderPlugin } from './placeholder'\n\nexport interface PluginOptions {\n placeholder?: string\n}\n\nexport const buildPlugins = (schema: Schema, options?: PluginOptions) => {\n const placeholder = options?.placeholder\n\n const plugins = [\n buildInputRules(schema),\n keymap(buildKeymap(schema)),\n keymap(baseKeymap),\n dropCursor(),\n gapCursor(),\n history(),\n ]\n\n if (placeholder) plugins.push(placeholderPlugin(placeholder))\n\n return plugins\n}","import { nodes } from 'prosemirror-schema-basic'\nimport type { Node, NodeSpec } from 'prosemirror-model'\nimport { listItem as _listItem } from 'prosemirror-schema-list'\n\ninterface Attr {\n [key: string]: number | string\n}\n\nconst orderedList: NodeSpec = {\n attrs: {\n order: {\n default: 1,\n },\n listStyleType: {\n default: '',\n },\n fontsize: {\n default: '',\n },\n color: {\n default: '',\n },\n },\n content: 'list_item+',\n group: 'block',\n parseDOM: [\n { \n tag: 'ol', \n getAttrs: dom => {\n const order = ((dom as HTMLElement).hasAttribute('start') ? (dom as HTMLElement).getAttribute('start') : 1) || 1\n const attr: Attr = { order: +order }\n\n const { listStyleType, fontSize, color } = (dom as HTMLElement).style\n if (listStyleType) attr['listStyleType'] = listStyleType\n if (fontSize) attr['fontsize'] = fontSize\n if (color) attr['color'] = color\n\n return attr\n }\n }\n ],\n toDOM: (node: Node) => {\n const { order, listStyleType, fontsize, color } = node.attrs\n let style = ''\n if (listStyleType) style += `list-style-type: ${listStyleType};`\n if (fontsize) style += `font-size: ${fontsize};`\n if (color) style += `color: ${color};`\n\n const attr: Attr = { style }\n if (order !== 1) attr['start'] = order\n\n\n return ['ol', attr, 0]\n },\n}\n\nconst bulletList: NodeSpec = {\n attrs: {\n listStyleType: {\n default: '',\n },\n fontsize: {\n default: '',\n },\n color: {\n default: '',\n },\n },\n content: 'list_item+',\n group: 'block',\n parseDOM: [\n {\n tag: 'ul',\n getAttrs: dom => {\n const attr: Attr = {}\n\n const { listStyleType, fontSize, color } = (dom as HTMLElement).style\n if (listStyleType) attr['listStyleType'] = listStyleType\n if (fontSize) attr['fontsize'] = fontSize\n if (color) attr['color'] = color\n\n return attr\n }\n }\n ],\n toDOM: (node: Node) => {\n const { listStyleType, fontsize, color } = node.attrs\n let style = ''\n if (listStyleType) style += `list-style-type: ${listStyleType};`\n if (fontsize) style += `font-size: ${fontsize};`\n if (color) style += `color: ${color};`\n\n return ['ul', { style }, 0]\n },\n}\n\nconst listItem: NodeSpec = {\n ..._listItem,\n content: 'paragraph block*',\n group: 'block',\n}\n\nconst paragraph: NodeSpec = {\n attrs: {\n align: {\n default: '',\n },\n indent: {\n default: 0,\n },\n textIndent: {\n default: 0,\n },\n },\n content: 'inline*',\n group: 'block',\n parseDOM: [\n {\n tag: 'p',\n getAttrs: dom => {\n const { textAlign, textIndent } = (dom as HTMLElement).style\n\n let align = (dom as HTMLElement).getAttribute('align') || textAlign || ''\n align = /(left|right|center|justify)/.test(align) ? align : ''\n\n let textIndentLevel = 0\n if (textIndent) {\n if (/em/.test(textIndent)) {\n textIndentLevel = parseInt(textIndent)\n }\n else if (/px/.test(textIndent)) {\n textIndentLevel = Math.floor(parseInt(textIndent) / 20)\n if (!textIndentLevel) textIndentLevel = 1\n }\n }\n\n const indent = +((dom as HTMLElement).getAttribute('data-indent') || 0)\n \n return { align, indent, textIndent: textIndentLevel }\n }\n },\n {\n tag: 'img',\n ignore: true,\n },\n {\n tag: 'pre',\n skip: true,\n },\n ],\n toDOM: (node: Node) => {\n const { align, indent, textIndent } = node.attrs\n let style = ''\n if (align && align !== 'left') style += `text-align: ${align};`\n if (textIndent) style += `text-indent: ${textIndent * 20}px;`\n\n const attr: Attr = { style }\n if (indent) attr['data-indent'] = indent\n\n return ['p', attr, 0]\n },\n}\n\nconst {\n doc,\n blockquote,\n text,\n} = nodes\n\nexport default {\n doc,\n paragraph,\n blockquote,\n text,\n 'ordered_list': orderedList,\n 'bullet_list': bulletList,\n 'list_item': listItem,\n}\n","import { marks } from 'prosemirror-schema-basic'\nimport type { MarkSpec } from 'prosemirror-model'\n\nconst subscript: MarkSpec = {\n excludes: 'subscript',\n parseDOM: [\n { tag: 'sub' },\n {\n style: 'vertical-align',\n getAttrs: value => value === 'sub' && null\n },\n ],\n toDOM: () => ['sub', 0],\n}\n\nconst superscript: MarkSpec = {\n excludes: 'superscript',\n parseDOM: [\n { tag: 'sup' },\n {\n style: 'vertical-align',\n getAttrs: value => value === 'super' && null\n },\n ],\n toDOM: () => ['sup', 0],\n}\n\nconst strikethrough: MarkSpec = {\n parseDOM: [\n { tag: 'strike' },\n {\n style: 'text-decoration',\n getAttrs: value => value === 'line-through' && null\n },\n {\n style: 'text-decoration-line',\n getAttrs: value => value === 'line-through' && null\n },\n ],\n toDOM: () => ['span', { style: 'text-decoration-line: line-through;' }, 0],\n}\n\nconst underline: MarkSpec = {\n parseDOM: [\n { tag: 'u' },\n {\n style: 'text-decoration',\n getAttrs: value => value === 'underline' && null\n },\n {\n style: 'text-decoration-line',\n getAttrs: value => value === 'underline' && null\n },\n ],\n toDOM: () => ['span', { style: 'text-decoration: underline;' }, 0],\n}\n\nconst forecolor: MarkSpec = {\n attrs: {\n color: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'color',\n getAttrs: color => color ? { color } : {}\n },\n ],\n toDOM: mark => {\n const { color } = mark.attrs\n let style = ''\n if (color) style += `color: ${color};`\n return ['span', { style }, 0]\n },\n}\n\nconst backcolor: MarkSpec = {\n attrs: {\n backcolor: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'background-color',\n getAttrs: backcolor => backcolor ? { backcolor } : {}\n },\n ],\n toDOM: mark => {\n const { backcolor } = mark.attrs\n let style = ''\n if (backcolor) style += `background-color: ${backcolor};`\n return ['span', { style }, 0]\n },\n}\n\nconst fontsize: MarkSpec = {\n attrs: {\n fontsize: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'font-size',\n getAttrs: fontsize => fontsize ? { fontsize } : {}\n },\n ],\n toDOM: mark => {\n const { fontsize } = mark.attrs\n let style = ''\n if (fontsize) style += `font-size: ${fontsize};`\n return ['span', { style }, 0]\n },\n}\n\nconst fontname: MarkSpec = {\n attrs: {\n fontname: {},\n },\n inline: true,\n group: 'inline',\n parseDOM: [\n {\n style: 'font-family',\n getAttrs: fontname => {\n return { fontname: fontname && typeof fontname === 'string' ? fontname.replace(/[\\\"\\']/g, '') : '' }\n }\n },\n ],\n toDOM: mark => {\n const { fontname } = mark.attrs\n let style = ''\n if (fontname) style += `font-family: ${fontname};`\n return ['span', { style }, 0]\n },\n}\n\nconst link: MarkSpec = {\n attrs: {\n href: {},\n title: { default: null },\n target: { default: '_blank' },\n },\n inclusive: false,\n parseDOM: [\n {\n tag: 'a[href]',\n getAttrs: dom => {\n const href = (dom as HTMLElement).getAttribute('href')\n const title = (dom as HTMLElement).getAttribute('title')\n return { href, title }\n }\n },\n ],\n toDOM: node => ['a', node.attrs, 0],\n}\n\nconst mark: MarkSpec = {\n attrs: {\n index: { default: null },\n },\n parseDOM: [\n {\n tag: 'mark',\n getAttrs: dom => {\n const index = (dom as HTMLElement).dataset.index\n return { index }\n }\n },\n ],\n toDOM: node => ['mark', { 'data-index': node.attrs.index }, 0],\n}\n\nconst { em, strong, code } = marks\n\nexport default {\n em,\n strong,\n fontsize,\n fontname,\n code,\n forecolor,\n backcolor,\n subscript,\n superscript,\n strikethrough,\n underline,\n link,\n mark,\n}","import nodes from './nodes'\nimport marks from './marks'\n\nexport const schemaNodes = nodes\nexport const schemaMarks = marks\n","import { EditorState } from 'prosemirror-state'\nimport { type DirectEditorProps, EditorView } from 'prosemirror-view'\nimport { Schema, DOMParser } from 'prosemirror-model'\nimport { buildPlugins, type PluginOptions } from './plugins/index'\nimport { schemaNodes, schemaMarks } from './schema/index'\n\nconst schema = new Schema({\n nodes: schemaNodes,\n marks: schemaMarks,\n})\n\nexport const createDocument = (content: string) => {\n const htmlString = `
${content}
`\n const parser = new window.DOMParser()\n const element = parser.parseFromString(htmlString, 'text/html').body.firstElementChild\n return DOMParser.fromSchema(schema).parse(element as Element)\n}\n\nexport const initProsemirrorEditor = (\n dom: Element,\n content: string,\n props: Omit,\n pluginOptions?: PluginOptions,\n) => {\n return new EditorView(dom, {\n state: EditorState.create({\n doc: createDocument(content),\n plugins: buildPlugins(schema, pluginOptions),\n }),\n ...props,\n })\n}","import mitt, { type Emitter } from 'mitt'\n\nexport const enum EmitterEvents {\n RICH_TEXT_COMMAND = 'RICH_TEXT_COMMAND',\n SYNC_RICH_TEXT_ATTRS_TO_STORE = 'SYNC_RICH_TEXT_ATTRS_TO_STORE',\n OPEN_CHART_DATA_EDITOR = 'OPEN_CHART_DATA_EDITOR',\n OPEN_LATEX_EDITOR = 'OPEN_LATEX_EDITOR',\n}\n\nexport interface RichTextAction {\n command: string\n value?: string\n}\n\nexport interface RichTextCommand {\n target?: string\n action: RichTextAction | RichTextAction[]\n}\n\ntype Events = {\n [EmitterEvents.RICH_TEXT_COMMAND]: RichTextCommand\n [EmitterEvents.SYNC_RICH_TEXT_ATTRS_TO_STORE]: void\n [EmitterEvents.OPEN_CHART_DATA_EDITOR]: void\n [EmitterEvents.OPEN_LATEX_EDITOR]: void\n} \n\nconst emitter: Emitter = mitt()\n\nexport default emitter","import type { Schema, Node, NodeType } from 'prosemirror-model'\nimport type { Transaction } from 'prosemirror-state'\nimport type { EditorView } from 'prosemirror-view'\n\nexport const setTextAlign = (tr: Transaction, schema: Schema, alignment: string) => {\n const { selection, doc } = tr\n if (!selection || !doc) return tr\n\n const { from, to } = selection\n const { nodes } = schema\n\n const blockquote = nodes.blockquote\n const listItem = nodes.list_item\n const paragraph = nodes.paragraph\n\n interface Task {\n node: Node\n pos: number\n nodeType: NodeType\n }\n\n const tasks: Task[] = []\n alignment = alignment || ''\n\n const allowedNodeTypes = new Set([blockquote, listItem, paragraph])\n\n doc.nodesBetween(from, to, (node, pos) => {\n const nodeType = node.type\n const align = node.attrs.align || ''\n if (align !== alignment && allowedNodeTypes.has(nodeType)) {\n tasks.push({\n node,\n pos,\n nodeType,\n })\n }\n return true\n })\n\n if (!tasks.length) return tr\n\n tasks.forEach(task => {\n const { node, pos, nodeType } = task\n let { attrs } = node\n if (alignment) attrs = { ...attrs, align: alignment }\n else attrs = { ...attrs, align: null }\n tr = tr.setNodeMarkup(pos, nodeType, attrs, node.marks)\n })\n\n return tr\n}\n\nexport const alignmentCommand = (view: EditorView, alignment: string) => {\n const { state } = view\n const { schema, selection } = state\n const tr = setTextAlign(\n state.tr.setSelection(selection),\n schema,\n alignment,\n )\n view.dispatch(tr)\n}","import type { Schema } from 'prosemirror-model'\nimport { type Transaction, TextSelection, AllSelection } from 'prosemirror-state'\nimport type { EditorView } from 'prosemirror-view'\nimport { isList } from '../utils'\n\ntype IndentKey = 'indent' | 'textIndent'\n\nfunction setNodeIndentMarkup(tr: Transaction, pos: number, delta: number, indentKey: IndentKey): Transaction {\n if (!tr.doc) return tr\n\n const node = tr.doc.nodeAt(pos)\n if (!node) return tr\n\n const minIndent = 0\n const maxIndent = 8\n\n let indent = (node.attrs[indentKey] || 0) + delta\n if (indent < minIndent) indent = minIndent\n if (indent > maxIndent) indent = maxIndent\n\n if (indent === node.attrs[indentKey]) return tr\n\n const nodeAttrs = {\n ...node.attrs,\n [indentKey]: indent,\n }\n\n return tr.setNodeMarkup(pos, node.type, nodeAttrs, node.marks)\n}\n\nconst setIndent = (tr: Transaction, schema: Schema, delta: number, indentKey: IndentKey): Transaction => {\n const { selection, doc } = tr\n if (!selection || !doc) return tr\n\n if (!(selection instanceof TextSelection || selection instanceof AllSelection)) return tr\n\n const { from, to } = selection\n\n doc.nodesBetween(from, to, (node, pos) => {\n const nodeType = node.type\n\n if (nodeType.name === 'paragraph' || nodeType.name === 'blockquote') {\n tr = setNodeIndentMarkup(tr, pos, delta, indentKey)\n return false\n } \n else if (isList(node, schema)) return false\n return true\n })\n\n return tr\n}\n\nexport const indentCommand = (view: EditorView, delta: number) => {\n const { state } = view\n const { schema, selection } = state\n\n const tr = setIndent(\n state.tr.setSelection(selection),\n schema,\n delta,\n 'indent',\n )\n if (tr.docChanged) {\n view.dispatch(tr)\n return true\n }\n\n return false\n}\n\nexport const textIndentCommand = (view: EditorView, delta: number) => {\n const { state } = view\n const { schema, selection } = state\n\n const tr = setIndent(\n state.tr.setSelection(selection),\n schema,\n delta,\n 'textIndent',\n )\n if (tr.docChanged) {\n view.dispatch(tr)\n return true\n }\n\n return false\n}","import { wrapInList, liftListItem } from 'prosemirror-schema-list'\nimport type { Node, NodeType } from 'prosemirror-model'\nimport type { Transaction, EditorState } from 'prosemirror-state'\nimport { findParentNode, isList } from '../utils'\n\ninterface Attr {\n [key: string]: number | string\n}\n\ninterface TextStyleAttr {\n color?: string\n fontsize?: string\n}\n\nexport const toggleList = (listType: NodeType, itemType: NodeType, listStyleType: string, textStyleAttr: TextStyleAttr = {}) => {\n return (state: EditorState, dispatch: (tr: Transaction) => void) => {\n const { schema, selection } = state\n const { $from, $to } = selection\n const range = $from.blockRange($to)\n\n if (!range) return false\n\n const parentList = findParentNode((node: Node) => isList(node, schema))(selection)\n\n if (range.depth >= 1 && parentList && range.depth - parentList.depth <= 1) {\n if (parentList.node.type === listType && !listStyleType) {\n return liftListItem(itemType)(state, dispatch)\n }\n\n if (isList(parentList.node, schema) && listType.validContent(parentList.node.content)) {\n const { tr } = state\n\n const nodeAttrs: Attr = {\n ...parentList.node.attrs,\n ...textStyleAttr,\n }\n if (listStyleType) nodeAttrs.listStyleType = listStyleType\n\n tr.setNodeMarkup(parentList.pos, listType, nodeAttrs)\n\n if (dispatch) dispatch(tr)\n\n return false\n }\n }\n\n const nodeAttrs: Attr = {\n ...textStyleAttr,\n }\n if (listStyleType) nodeAttrs.listStyleType = listStyleType\n\n return wrapInList(listType, nodeAttrs)(state, dispatch)\n }\n}","import type { EditorView } from 'prosemirror-view'\nimport { isList } from '../utils'\n\ninterface Style {\n [key: string]: string\n}\n\nexport const setListStyle = (view: EditorView, style: Style | Style[]) => {\n const { state } = view\n const { schema, selection } = state\n const tr = state.tr.setSelection(selection)\n \n const { doc } = tr\n if (!doc) return tr\n\n const { from, to } = selection\n doc.nodesBetween(from, to, (node, pos) => {\n if (isList(node, schema)) {\n if (from - 3 <= pos && to + 3 >= pos + node.nodeSize) {\n const styles = Array.isArray(style) ? style : [style]\n\n for (const style of styles) {\n tr.setNodeAttribute(pos, style.key, style.value)\n }\n }\n }\n return false\n })\n\n view.dispatch(tr)\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { debounce } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { EditorView } from 'prosemirror-view'\nimport { toggleMark, wrapIn, lift } from 'prosemirror-commands'\nimport { initProsemirrorEditor, createDocument } from '@/utils/prosemirror'\nimport { isActiveOfParentNodeType, findNodesWithSameMark, getTextAttrs, autoSelectAll, addMark, markActive, getFontsize } from '@/utils/prosemirror/utils'\nimport emitter, { EmitterEvents, type RichTextAction, type RichTextCommand } from '@/utils/emitter'\nimport { alignmentCommand } from '@/utils/prosemirror/commands/setTextAlign'\nimport { indentCommand, textIndentCommand } from '@/utils/prosemirror/commands/setTextIndent'\nimport { toggleList } from '@/utils/prosemirror/commands/toggleList'\nimport { setListStyle } from '@/utils/prosemirror/commands/setListStyle'\nimport type { TextFormatPainterKeys } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ProsemirrorEditor',\n props: {\n elementId: {},\n defaultColor: {},\n defaultFontName: {},\n value: {},\n editable: { type: Boolean, default: false },\n autoFocus: { type: Boolean, default: false }\n },\n emits: [\"update\", \"focus\", \"blur\", \"mousedown\"],\n setup(__props: any, { expose: __expose, emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst mainStore = useMainStore()\nconst { handleElementId, textFormatPainter, richTextAttrs } = storeToRefs(mainStore)\n\nconst editorViewRef = ref()\nlet editorView: EditorView\n\n// 富文本的各种交互事件监听:\n// 聚焦时取消全局快捷键事件\n// 输入文字时同步数据到vuex\n// 点击鼠标和键盘时同步富文本状态到工具栏\nconst handleInput = debounce(function() {\n emit('update', editorView.dom.innerHTML)\n}, 300, { trailing: true })\n\nconst handleFocus = () => {\n mainStore.setDisableHotkeysState(true)\n emit('focus')\n}\n\nconst handleBlur = () => {\n mainStore.setDisableHotkeysState(false)\n emit('blur')\n}\n\nconst handleClick = debounce(function() {\n const attrs = getTextAttrs(editorView, {\n color: props.defaultColor,\n fontname: props.defaultFontName,\n })\n mainStore.setRichtextAttrs(attrs)\n}, 30, { trailing: true })\n\nconst handleKeydown = () => {\n handleInput()\n handleClick()\n}\n\n// 将富文本内容同步到DOM\nconst textContent = computed(() => props.value)\nwatch(textContent, () => {\n if (!editorView) return\n if (editorView.hasFocus()) return\n\n const { doc, tr } = editorView.state\n editorView.dispatch(tr.replaceRangeWith(0, doc.content.size, createDocument(textContent.value)))\n})\n\n// 打开/关闭编辑器的编辑模式\nwatch(() => props.editable, () => {\n editorView.setProps({ editable: () => props.editable })\n})\n\n// 暴露 focus 方法\nconst focus = () => editorView.focus()\n__expose({ focus })\n\n// 执行富文本命令(可以是一个或多个)\n// 部分命令在执行前先判断当前选区是否为空,如果选区为空先进行全选操作\nconst execCommand = ({ target, action }: RichTextCommand) => {\n if (!target && handleElementId.value !== props.elementId) return\n if (target && target !== props.elementId) return\n\n const actions = ('command' in action) ? [action] : action\n\n for (const item of actions) {\n if (item.command === 'fontname' && item.value) {\n const mark = editorView.state.schema.marks.fontname.create({ fontname: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n }\n else if (item.command === 'fontsize' && item.value) {\n const mark = editorView.state.schema.marks.fontsize.create({ fontsize: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n setListStyle(editorView, { key: 'fontsize', value: item.value })\n }\n else if (item.command === 'fontsize-add') {\n const step = item.value ? +item.value : 2\n autoSelectAll(editorView)\n const fontsize = getFontsize(editorView) + step + 'px'\n const mark = editorView.state.schema.marks.fontsize.create({ fontsize })\n addMark(editorView, mark)\n setListStyle(editorView, { key: 'fontsize', value: fontsize })\n }\n else if (item.command === 'fontsize-reduce') {\n const step = item.value ? +item.value : 2\n autoSelectAll(editorView)\n let fontsize = getFontsize(editorView) - step\n if (fontsize < 12) fontsize = 12\n const mark = editorView.state.schema.marks.fontsize.create({ fontsize: fontsize + 'px' })\n addMark(editorView, mark)\n setListStyle(editorView, { key: 'fontsize', value: fontsize + 'px' })\n }\n else if (item.command === 'color' && item.value) {\n const mark = editorView.state.schema.marks.forecolor.create({ color: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n setListStyle(editorView, { key: 'color', value: item.value })\n }\n else if (item.command === 'backcolor' && item.value) {\n const mark = editorView.state.schema.marks.backcolor.create({ backcolor: item.value })\n autoSelectAll(editorView)\n addMark(editorView, mark)\n }\n else if (item.command === 'bold') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.strong)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'em') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.em)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'underline') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.underline)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'strikethrough') {\n autoSelectAll(editorView)\n toggleMark(editorView.state.schema.marks.strikethrough)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'subscript') {\n toggleMark(editorView.state.schema.marks.subscript)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'superscript') {\n toggleMark(editorView.state.schema.marks.superscript)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'blockquote') {\n const isBlockquote = isActiveOfParentNodeType('blockquote', editorView.state)\n if (isBlockquote) lift(editorView.state, editorView.dispatch)\n else wrapIn(editorView.state.schema.nodes.blockquote)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'code') {\n toggleMark(editorView.state.schema.marks.code)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'align' && item.value) {\n alignmentCommand(editorView, item.value)\n }\n else if (item.command === 'indent' && item.value) {\n indentCommand(editorView, +item.value)\n }\n else if (item.command === 'textIndent' && item.value) {\n textIndentCommand(editorView, +item.value)\n }\n else if (item.command === 'bulletList') {\n const listStyleType = item.value || ''\n const { bullet_list: bulletList, list_item: listItem } = editorView.state.schema.nodes\n const textStyle = {\n color: richTextAttrs.value.color,\n fontsize: richTextAttrs.value.fontsize\n }\n toggleList(bulletList, listItem, listStyleType, textStyle)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'orderedList') {\n const listStyleType = item.value || ''\n const { ordered_list: orderedList, list_item: listItem } = editorView.state.schema.nodes\n const textStyle = {\n color: richTextAttrs.value.color,\n fontsize: richTextAttrs.value.fontsize\n }\n toggleList(orderedList, listItem, listStyleType, textStyle)(editorView.state, editorView.dispatch)\n }\n else if (item.command === 'clear') {\n autoSelectAll(editorView)\n const { $from, $to } = editorView.state.selection\n editorView.dispatch(editorView.state.tr.removeMark($from.pos, $to.pos))\n setListStyle(editorView, [\n { key: 'fontsize', value: '' },\n { key: 'color', value: '' },\n ])\n }\n else if (item.command === 'link') {\n const markType = editorView.state.schema.marks.link\n const { from, to } = editorView.state.selection\n const result = findNodesWithSameMark(editorView.state.doc, from, to, markType)\n if (result) {\n if (item.value) {\n const mark = editorView.state.schema.marks.link.create({ href: item.value, title: item.value })\n addMark(editorView, mark, { from: result.from.pos, to: result.to.pos + 1 })\n }\n else editorView.dispatch(editorView.state.tr.removeMark(result.from.pos, result.to.pos + 1, markType))\n }\n else if (markActive(editorView.state, markType)) {\n if (item.value) {\n const mark = editorView.state.schema.marks.link.create({ href: item.value, title: item.value })\n addMark(editorView, mark)\n }\n else toggleMark(markType)(editorView.state, editorView.dispatch)\n }\n else if (item.value) {\n autoSelectAll(editorView)\n toggleMark(markType, { href: item.value, title: item.value })(editorView.state, editorView.dispatch)\n }\n }\n else if (item.command === 'insert' && item.value) {\n editorView.dispatch(editorView.state.tr.insertText(item.value))\n }\n }\n\n editorView.focus()\n handleInput()\n handleClick()\n}\n\n// 鼠标抬起时,执行格式刷命令\nconst handleMouseup = () => {\n if (!textFormatPainter.value) return\n const { keep, ...newProps } = textFormatPainter.value\n\n const actions: RichTextAction[] = [{ command: 'clear' }]\n for (const key of Object.keys(newProps) as TextFormatPainterKeys[]) {\n const command = key\n const value = textFormatPainter.value[key]\n if (value === true) actions.push({ command })\n else if (value) actions.push({ command, value })\n }\n execCommand({ action: actions })\n if (!keep) mainStore.setTextFormatPainter(null)\n}\n\n// Prosemirror编辑器的初始化和卸载\nonMounted(() => {\n editorView = initProsemirrorEditor((editorViewRef.value as Element), textContent.value, {\n handleDOMEvents: {\n focus: handleFocus,\n blur: handleBlur,\n keydown: handleKeydown,\n click: handleClick,\n mouseup: handleMouseup,\n },\n editable: () => props.editable,\n })\n if (props.autoFocus) editorView.focus()\n})\nonUnmounted(() => {\n editorView && editorView.destroy()\n})\n\nconst syncAttrsToStore = () => {\n if (handleElementId.value !== props.elementId) return\n handleClick()\n}\n\nemitter.on(EmitterEvents.RICH_TEXT_COMMAND, execCommand)\nemitter.on(EmitterEvents.SYNC_RICH_TEXT_ATTRS_TO_STORE, syncAttrsToStore)\nonUnmounted(() => {\n emitter.off(EmitterEvents.RICH_TEXT_COMMAND, execCommand)\n emitter.off(EmitterEvents.SYNC_RICH_TEXT_ATTRS_TO_STORE, syncAttrsToStore)\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"prosemirror-editor\", { 'format-painter': _unref(textFormatPainter) }]),\n ref_key: \"editorViewRef\",\n ref: editorViewRef,\n onMousedown: _cache[0] || (_cache[0] = $event => emit('mousedown', $event))\n }, null, 34))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./ProsemirrorEditor.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ProsemirrorEditor.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ProsemirrorEditor.vue?vue&type=style&index=0&id=653f533c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-653f533c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2a1e49ba\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"drag-handler top\" }, null, -1))\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"drag-handler bottom\" }, null, -1))\n\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { debounce } from 'lodash'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTTextElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\nimport ProsemirrorEditor from '@/views/components/element/ProsemirrorEditor.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { handleElementId, isScaling } = storeToRefs(mainStore)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst elementRef = ref()\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo, canMove)\n}\n\n// 监听文本元素的尺寸变化,当高度变化时,更新高度到vuex\n// 如果高度变化时正处在缩放操作中,则等待缩放操作结束后再更新\nconst realHeightCache = ref(-1)\nconst realWidthCache = ref(-1)\n\nwatch(isScaling, () => {\n if (handleElementId.value !== props.elementInfo.id) return\n\n if (!isScaling.value) {\n if (!props.elementInfo.vertical && realHeightCache.value !== -1) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeightCache.value },\n })\n realHeightCache.value = -1\n }\n if (props.elementInfo.vertical && realWidthCache.value !== -1) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { width: realWidthCache.value },\n })\n realWidthCache.value = -1\n }\n }\n})\n\nconst updateTextElementHeight = (entries: ResizeObserverEntry[]) => {\n const contentRect = entries[0].contentRect\n if (!elementRef.value) return\n\n const realHeight = contentRect.height + 20\n const realWidth = contentRect.width + 20\n\n if (!props.elementInfo.vertical && props.elementInfo.height !== realHeight) {\n if (!isScaling.value) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeight },\n })\n }\n else realHeightCache.value = realHeight\n }\n if (props.elementInfo.vertical && props.elementInfo.width !== realWidth) {\n if (!isScaling.value) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { width: realWidth },\n })\n }\n else realWidthCache.value = realWidth\n }\n}\nconst resizeObserver = new ResizeObserver(updateTextElementHeight)\n\nonMounted(() => {\n if (elementRef.value) resizeObserver.observe(elementRef.value)\n})\nonUnmounted(() => {\n if (elementRef.value) resizeObserver.unobserve(elementRef.value)\n})\n\nconst updateContent = (content: string) => {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { content },\n })\n \n addHistorySnapshot()\n}\n\nconst checkEmptyText = debounce(function() {\n const pureText = props.elementInfo.content.replaceAll(/<[^>]+>/g, '')\n if (!pureText) slidesStore.deleteElement(props.elementInfo.id)\n}, 300, { trailing: true })\n\nconst isHandleElement = computed(() => handleElementId.value === props.elementInfo.id)\nwatch(isHandleElement, () => {\n if (!isHandleElement.value) checkEmptyText()\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-text\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n ref_key: \"elementRef\",\n ref: elementRef,\n style: _normalizeStyle({\n width: _ctx.elementInfo.vertical ? 'auto' : _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.vertical ? _ctx.elementInfo.height + 'px' : 'auto',\n backgroundColor: _ctx.elementInfo.fill,\n opacity: _ctx.elementInfo.opacity,\n textShadow: _unref(shadowStyle),\n lineHeight: _ctx.elementInfo.lineHeight,\n letterSpacing: (_ctx.elementInfo.wordSpace || 0) + 'px',\n color: _ctx.elementInfo.defaultColor,\n fontFamily: _ctx.elementInfo.defaultFontName,\n writingMode: _ctx.elementInfo.vertical ? 'vertical-rl' : 'horizontal-tb',\n }),\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event)),\n onTouchstart: _cache[3] || (_cache[3] = $event => handleSelectElement($event))\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createVNode(ProsemirrorEditor, {\n class: \"text\",\n elementId: _ctx.elementInfo.id,\n defaultColor: _ctx.elementInfo.defaultColor,\n defaultFontName: _ctx.elementInfo.defaultFontName,\n editable: !_ctx.elementInfo.lock,\n value: _ctx.elementInfo.content,\n style: _normalizeStyle({\n '--paragraphSpace': `${_ctx.elementInfo.paragraphSpace === undefined ? 5 : _ctx.elementInfo.paragraphSpace}px`,\n }),\n onUpdate: _cache[0] || (_cache[0] = value => updateContent(value)),\n onMousedown: _cache[1] || (_cache[1] = $event => handleSelectElement($event, false))\n }, null, 8, [\"elementId\", \"defaultColor\", \"defaultFontName\", \"editable\", \"value\", \"style\"]),\n _hoisted_1,\n _hoisted_2\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=2a1e49ba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2a1e49ba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = [\"id\", \"gradientTransform\"]\nconst _hoisted_2 = [\"stop-color\"]\nconst _hoisted_3 = [\"stop-color\"]\nconst _hoisted_4 = [\"id\"]\nconst _hoisted_5 = [\"stop-color\"]\nconst _hoisted_6 = [\"stop-color\"]\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'GradientDefs',\n props: {\n id: {},\n type: {},\n color1: {},\n color2: {},\n rotate: { default: 0 }\n },\n setup(__props: any) {\n\r\n\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_ctx.type === 'linear')\n ? (_openBlock(), _createElementBlock(\"linearGradient\", {\n key: 0,\n id: _ctx.id,\n x1: \"0%\",\n y1: \"0%\",\n x2: \"100%\",\n y2: \"0%\",\n gradientTransform: `rotate(${_ctx.rotate},0.5,0.5)`\n }, [\n _createElementVNode(\"stop\", {\n offset: \"0%\",\n \"stop-color\": _ctx.color1\n }, null, 8, _hoisted_2),\n _createElementVNode(\"stop\", {\n offset: \"100%\",\n \"stop-color\": _ctx.color2\n }, null, 8, _hoisted_3)\n ], 8, _hoisted_1))\n : (_openBlock(), _createElementBlock(\"radialGradient\", {\n key: 1,\n id: _ctx.id\n }, [\n _createElementVNode(\"stop\", {\n offset: \"0%\",\n \"stop-color\": _ctx.color1\n }, null, 8, _hoisted_5),\n _createElementVNode(\"stop\", {\n offset: \"100%\",\n \"stop-color\": _ctx.color2\n }, null, 8, _hoisted_6)\n ], 8, _hoisted_4))\n}\n}\n\n})","import script from \"./GradientDefs.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./GradientDefs.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5d988de2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = { key: 0 }\nconst _hoisted_3 = [\"transform\"]\nconst _hoisted_4 = [\"d\", \"fill\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\n\nimport { computed, nextTick, ref, watch } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTShapeElement, ShapeText } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport GradientDefs from './GradientDefs.vue'\nimport ProsemirrorEditor from '@/views/components/element/ProsemirrorEditor.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { handleElementId, shapeFormatPainter } = storeToRefs(mainStore)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo, canMove)\n}\n\nconst execFormatPainter = () => {\n if (!shapeFormatPainter.value) return\n const { keep, ...newProps } = shapeFormatPainter.value\n\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: newProps,\n })\n \n addHistorySnapshot()\n if (!keep) mainStore.setShapeFormatPainter(null)\n}\n\nconst outline = computed(() => props.elementInfo.outline)\nconst { outlineWidth, outlineColor, strokeDashArray } = useElementOutline(outline)\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst editable = ref(false)\n\nwatch(handleElementId, () => {\n if (handleElementId.value !== props.elementInfo.id) {\n if (editable.value) editable.value = false\n }\n})\n\nconst text = computed(() => {\n const defaultText: ShapeText = {\n content: '',\n defaultFontName: '微软雅黑',\n defaultColor: '#000',\n align: 'middle',\n }\n if (!props.elementInfo.text) return defaultText\n\n return props.elementInfo.text\n})\n\nconst updateText = (content: string) => {\n const _text = { ...text.value, content }\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: { text: _text },\n })\n \n addHistorySnapshot()\n}\n\nconst checkEmptyText = () => {\n if (!props.elementInfo.text) return\n\n const pureText = props.elementInfo.text.content.replaceAll(/<[^>]+>/g, '')\n if (!pureText) {\n slidesStore.removeElementProps({ id: props.elementInfo.id, propName: 'text' })\n addHistorySnapshot()\n }\n}\n\nconst prosemirrorEditorRef = ref>()\nconst startEdit = () => {\n editable.value = true\n nextTick(() => prosemirrorEditorRef.value && prosemirrorEditorRef.value.focus())\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-shape\", {\n 'lock': _ctx.elementInfo.lock,\n 'format-painter': _unref(shapeFormatPainter),\n }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n opacity: _ctx.elementInfo.opacity,\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n color: text.value.defaultColor,\n fontFamily: text.value.defaultFontName,\n }),\n onMousedown: _cache[3] || (_cache[3] = $event => handleSelectElement($event)),\n onMouseup: _cache[4] || (_cache[4] = ($event: any) => (execFormatPainter())),\n onTouchstart: _cache[5] || (_cache[5] = $event => handleSelectElement($event)),\n onDblclick: _cache[6] || (_cache[6] = ($event: any) => (startEdit()))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height\n }, [\n (_ctx.elementInfo.gradient)\n ? (_openBlock(), _createElementBlock(\"defs\", _hoisted_2, [\n _createVNode(GradientDefs, {\n id: `editabel-gradient-${_ctx.elementInfo.id}`,\n type: _ctx.elementInfo.gradient.type,\n color1: _ctx.elementInfo.gradient.color[0],\n color2: _ctx.elementInfo.gradient.color[1],\n rotate: _ctx.elementInfo.gradient.rotate\n }, null, 8, [\"id\", \"type\", \"color1\", \"color2\", \"rotate\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n class: \"shape-path\",\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n d: _ctx.elementInfo.path,\n fill: _ctx.elementInfo.gradient ? `url(#editabel-gradient-${_ctx.elementInfo.id})` : _ctx.elementInfo.fill,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_4)\n ], 8, _hoisted_3)\n ], 8, _hoisted_1)),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"shape-text\", [text.value.align, { 'editable': editable.value || text.value.content }]])\n }, [\n (editable.value || text.value.content)\n ? (_openBlock(), _createBlock(ProsemirrorEditor, {\n key: 0,\n ref_key: \"prosemirrorEditorRef\",\n ref: prosemirrorEditorRef,\n elementId: _ctx.elementInfo.id,\n defaultColor: text.value.defaultColor,\n defaultFontName: text.value.defaultFontName,\n editable: !_ctx.elementInfo.lock,\n value: text.value.content,\n onUpdate: _cache[0] || (_cache[0] = value => updateText(value)),\n onBlur: _cache[1] || (_cache[1] = ($event: any) => (checkEmptyText())),\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event, false))\n }, null, 8, [\"elementId\", \"defaultColor\", \"defaultFontName\", \"editable\", \"value\"]))\n : _createCommentVNode(\"\", true)\n ], 2)\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=5d988de2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5d988de2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"id\", \"markerWidth\", \"markerHeight\", \"refX\", \"refY\"]\nconst _hoisted_2 = [\"d\", \"fill\", \"transform\"]\n\nimport { computed } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinePointMarker',\n props: {\n id: {},\n position: {},\n type: {},\n baseSize: {},\n color: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst pathMap = {\n dot: 'm0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z',\n arrow: 'M0,0 L10,5 0,10 Z',\n}\nconst rotateMap: { [key: string]: number } = {\n 'arrow-start': 180,\n 'arrow-end': 0,\n}\n\nconst path = computed(() => pathMap[props.type])\nconst rotate = computed(() => rotateMap[`${props.type}-${props.position}`] || 0)\nconst size = computed(() => props.baseSize < 2 ? 2 : props.baseSize)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"marker\", {\n id: `${_ctx.id}-${_ctx.type}-${_ctx.position}`,\n markerUnits: \"userSpaceOnUse\",\n orient: \"auto\",\n markerWidth: size.value * 3,\n markerHeight: size.value * 3,\n refX: size.value * 1.5,\n refY: size.value * 1.5\n }, [\n _createElementVNode(\"path\", {\n d: path.value,\n fill: _ctx.color,\n transform: `scale(${size.value * 0.3}, ${size.value * 0.3}) rotate(${rotate.value}, 5, 5)`\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n}\n}\n\n})","\n\n","import script from \"./LinePointMarker.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinePointMarker.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-16512454\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\", \"marker-start\", \"marker-end\"]\nconst _hoisted_3 = [\"d\"]\n\nimport { computed } from 'vue'\nimport type { PPTLineElement } from '@/types/slides'\nimport { getLineElementPath } from '@/utils/element'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\n\nimport LinePointMarker from './LinePointMarker.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst svgWidth = computed(() => {\n const width = Math.abs(props.elementInfo.start[0] - props.elementInfo.end[0])\n return width < 24 ? 24 : width\n})\nconst svgHeight = computed(() => {\n const height = Math.abs(props.elementInfo.start[1] - props.elementInfo.end[1])\n return height < 24 ? 24 : height\n})\n\nconst lineDashArray = computed(() => {\n if (props.elementInfo.style !== 'dashed') return '0 0'\n const size = props.elementInfo.width\n return size <= 8 ? `${size * 5} ${size * 2.5}` : `${size * 5} ${size * 1.5}`\n})\n\nconst path = computed(() => {\n return getLineElementPath(props.elementInfo)\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-shape\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({ filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '' }),\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: svgWidth.value,\n height: svgHeight.value\n }, [\n _createElementVNode(\"defs\", null, [\n (_ctx.elementInfo.points[0])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 0,\n id: _ctx.elementInfo.id,\n position: \"start\",\n type: _ctx.elementInfo.points[0],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.elementInfo.points[1])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 1,\n id: _ctx.elementInfo.id,\n position: \"end\",\n type: _ctx.elementInfo.points[1],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"path\", {\n class: \"line-point\",\n d: path.value,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.width,\n \"stroke-dasharray\": lineDashArray.value,\n fill: \"none\",\n \"marker-start\": _ctx.elementInfo.points[0] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[0]}-start)` : '',\n \"marker-end\": _ctx.elementInfo.points[1] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[1]}-end)` : ''\n }, null, 8, _hoisted_2),\n _withDirectives(_createElementVNode(\"path\", {\n class: \"line-path\",\n d: path.value,\n stroke: \"transparent\",\n \"stroke-width\": \"20\",\n fill: \"none\"\n }, null, 8, _hoisted_3), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 8, _hoisted_1))\n ], 36)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=16512454&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-16512454\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { computed, inject, onMounted, ref, watch } from 'vue'\nimport tinycolor from 'tinycolor2'\nimport { BarChart, LineChart, PieChart } from 'chartist'\nimport type { ChartData, ChartOptions, ChartType } from '@/types/slides'\nimport { injectKeySlideScale } from '@/types/injectKey'\n\nimport 'chartist/dist/index.css'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Chart',\n props: {\n width: {},\n height: {},\n type: {},\n data: {},\n themeColor: {},\n legends: {},\n options: {},\n gridColor: {},\n legend: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst chartRef = ref()\nconst slideScale = inject(injectKeySlideScale) || ref(1)\n\nlet chart: LineChart | BarChart | PieChart | undefined\n\nconst chartHeight = computed(() => {\n if (props.legend) return props.height - 20\n return props.height\n})\n\nconst getPieChartData = () => ({ ...props.data, series: props.data.series[0] })\n\nconst getOptions = () => {\n const propsOptopns = props.options || {}\n return {\n ...propsOptopns,\n width: props.width * slideScale.value,\n height: chartHeight.value * slideScale.value,\n }\n}\n\nconst renderChart = () => {\n if (!chartRef.value) return\n\n const options = getOptions()\n if (props.type === 'bar') chart = new BarChart(chartRef.value, props.data, options)\n if (props.type === 'line') chart = new LineChart(chartRef.value, props.data, options)\n if (props.type === 'pie') chart = new PieChart(chartRef.value, getPieChartData(), options)\n}\n\nconst updateChart = () => {\n if (!chart) {\n renderChart()\n return\n }\n const options = getOptions()\n const data = props.type === 'pie' ? getPieChartData() : props.data\n chart.update(data, options)\n}\n\nwatch([\n () => props.width,\n () => props.height,\n () => props.data,\n () => props.options,\n slideScale,\n], updateChart)\n\nonMounted(renderChart)\n\nconst themeColors = computed(() => {\n let colors: string[] = []\n if (props.themeColor.length >= 10) colors = props.themeColor\n else if (props.themeColor.length === 1) colors = tinycolor(props.themeColor[0]).analogous(10).map(color => color.toRgbString())\n else {\n const len = props.themeColor.length\n const supplement = tinycolor(props.themeColor[len - 1]).analogous(10 + 1 - len).map(color => color.toRgbString())\n colors = [...props.themeColor.slice(0, len - 1), ...supplement]\n }\n return colors\n})\n\n// 更新主题配色:\n// 如果当前所设置的主题色数小于10,剩余部分获取最后一个主题色的相近颜色作为配色\nconst updateTheme = () => {\n if (!chartRef.value) return\n\n for (let i = 0; i < 10; i++) {\n chartRef.value.style.setProperty(`--theme-color-${i + 1}`, themeColors.value[i])\n }\n}\n\nwatch(themeColors, updateTheme)\nonMounted(updateTheme)\n\n// 更新网格颜色,包括坐标的文字部分\nconst updateGridColor = () => {\n if (!chartRef.value) return\n if (props.gridColor) chartRef.value.style.setProperty(`--grid-color`, props.gridColor)\n}\n\nwatch(() => props.gridColor, updateGridColor)\nonMounted(updateGridColor)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"chart\",\n style: _normalizeStyle({ flexDirection: _ctx.legend === 'top' ? 'column-reverse' : 'column' })\n }, [\n _createElementVNode(\"div\", {\n class: \"chart-content\",\n ref_key: \"chartRef\",\n ref: chartRef,\n style: _normalizeStyle({\n width: _ctx.width + 'px',\n height: chartHeight.value + 'px',\n transform: `scale(${1 / _unref(slideScale)})`,\n })\n }, null, 4),\n (_ctx.legend)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"legends\",\n style: _normalizeStyle({ transform: `scale(${1 / _unref(slideScale)})` })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.legends, (legend, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"legend\",\n key: index,\n style: _normalizeStyle({ color: _ctx.gridColor })\n }, [\n _createElementVNode(\"div\", {\n class: \"block\",\n style: _normalizeStyle({ backgroundColor: themeColors.value[index] })\n }, null, 4),\n _createTextVNode(\" \" + _toDisplayString(legend), 1)\n ], 4))\n }), 128))\n ], 4))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./Chart.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Chart.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Chart.vue?vue&type=style&index=0&id=ae2a96a6&lang=scss&scoped=true\"\nimport \"./Chart.vue?vue&type=style&index=1&id=ae2a96a6&lang=scss\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-ae2a96a6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nimport type { PPTChartElement } from '@/types/slides'\r\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\r\nimport emitter, { EmitterEvents } from '@/utils/emitter'\r\n\r\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\r\nimport Chart from './Chart.vue'\r\n\r\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\r\nconst props = __props\r\n\r\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\r\n if (props.elementInfo.lock) return\r\n e.stopPropagation()\r\n\r\n props.selectElement(e, props.elementInfo)\r\n}\r\n\r\nconst openDataEditor = () => {\r\n emitter.emit(EmitterEvents.OPEN_CHART_DATA_EDITOR)\r\n}\r\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-chart\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\r\n top: _ctx.elementInfo.top + 'px',\r\n left: _ctx.elementInfo.left + 'px',\r\n width: _ctx.elementInfo.width + 'px',\r\n height: _ctx.elementInfo.height + 'px',\r\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\r\n backgroundColor: _ctx.elementInfo.fill,\r\n }),\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event)),\n onDblclick: _cache[2] || (_cache[2] = ($event: any) => (openDataEditor()))\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createVNode(Chart, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n type: _ctx.elementInfo.chartType,\n data: _ctx.elementInfo.data,\n options: _ctx.elementInfo.options,\n themeColor: _ctx.elementInfo.themeColor,\n gridColor: _ctx.elementInfo.gridColor,\n legends: _ctx.elementInfo.data.legends,\n legend: _ctx.elementInfo.legend || ''\n }, null, 8, [\"width\", \"height\", \"type\", \"data\", \"options\", \"themeColor\", \"gridColor\", \"legends\", \"legend\"])\n ], 36)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\r\n\r\n\r\n\r\n\r\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=6fc3de39&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6fc3de39\"]])\n\nexport default __exports__","import type { CSSProperties } from 'vue'\nimport type { TableCellStyle } from '@/types/slides'\n\n/**\n * 计算单元格文本样式\n * @param style 单元格文本样式原数据\n */\nexport const getTextStyle = (style?: TableCellStyle): CSSProperties => {\n if (!style) return {}\n const {\n bold,\n em,\n underline,\n strikethrough,\n color,\n backcolor,\n fontsize,\n fontname,\n align,\n } = style\n\n let textDecoration = `${underline ? 'underline' : ''} ${strikethrough ? 'line-through' : ''}`\n if (textDecoration === ' ') textDecoration = 'none'\n \n return {\n fontWeight: bold ? 'bold' : 'normal',\n fontStyle: em ? 'italic' : 'normal',\n textDecoration,\n color: color || '#000',\n backgroundColor: backcolor || '',\n fontSize: fontsize || '14px',\n fontFamily: fontname || '微软雅黑',\n textAlign: align || 'left',\n }\n}\n\nexport const formatText = (text: string) => {\n return text.replace(/\\n/g, '
').replace(/ /g, ' ')\n}","import { computed, type Ref } from 'vue'\nimport type { TableCell } from '@/types/slides'\n\n// 计算无效的单元格位置(被合并的单元格位置)集合\n\nexport default (cells: Ref) => {\n const hideCells = computed(() => {\n const hideCells = []\n \n for (let i = 0; i < cells.value.length; i++) {\n const rowCells = cells.value[i]\n\n for (let j = 0; j < rowCells.length; j++) {\n const cell = rowCells[j]\n \n if (cell.colspan > 1 || cell.rowspan > 1) {\n for (let row = i; row < i + cell.rowspan; row++) {\n for (let col = row === i ? j + 1 : j; col < j + cell.colspan; col++) {\n hideCells.push(`${row}_${col}`)\n }\n }\n }\n }\n }\n return hideCells\n })\n\n return {\n hideCells,\n }\n}","import { ref, watch, type Ref } from 'vue'\nimport type { TableTheme } from '@/types/slides'\nimport { getTableSubThemeColor } from '@/utils/element'\n\n// 通过表格的主题色计算辅助颜色\n\nexport default (theme: Ref) => {\n const subThemeColor = ref(['', ''])\n watch(() => theme.value, () => {\n if (theme.value) {\n subThemeColor.value = getTableSubThemeColor(theme.value.color)\n }\n }, { immediate: true })\n\n return {\n subThemeColor,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-7a7222ac\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"innerHTML\"]\n\nimport { onBeforeUnmount, ref, watch } from 'vue'\nimport { pasteCustomClipboardString, pasteExcelClipboardString } from '@/utils/clipboard'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'CustomTextarea',\n props: {\n value: { default: '' }\n },\n emits: [\"updateValue\", \"insertExcelData\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst textareaRef = ref()\nconst text = ref('')\nconst isFocus = ref(false)\n\n// 自定义v-modal,同步数据\n// 当文本框聚焦时,不执行数据同步\nwatch(() => props.value, () => {\n if (isFocus.value) return\n text.value = props.value\n if (textareaRef.value) textareaRef.value.innerHTML = props.value\n}, { immediate: true })\n\nconst handleInput = () => {\n if (!textareaRef.value) return\n const text = textareaRef.value.innerHTML\n emit('updateValue', text)\n}\n\n// 聚焦时更新焦点标记,并监听粘贴事件\nconst handleFocus = () => {\n isFocus.value = true\n\n if (!textareaRef.value) return\n textareaRef.value.onpaste = (e: ClipboardEvent) => {\n e.preventDefault()\n if (!e.clipboardData) return\n\n const clipboardDataFirstItem = e.clipboardData.items[0]\n\n if (clipboardDataFirstItem && clipboardDataFirstItem.kind === 'string' && clipboardDataFirstItem.type === 'text/plain') {\n clipboardDataFirstItem.getAsString(text => {\n const clipboardData = pasteCustomClipboardString(text)\n if (typeof clipboardData === 'object') return\n \n const excelData = pasteExcelClipboardString(text)\n if (excelData) {\n emit('insertExcelData', excelData)\n if (textareaRef.value) textareaRef.value.innerHTML = excelData[0][0]\n return\n }\n\n document.execCommand('insertText', false, text)\n })\n }\n }\n}\n\n// 失焦时更新焦点标记,清除粘贴事件监听\nconst handleBlur = () => {\n isFocus.value = false\n if (textareaRef.value) textareaRef.value.onpaste = null\n}\n\n// 清除粘贴事件监听\nonBeforeUnmount(() => {\n if (textareaRef.value) textareaRef.value.onpaste = null\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"custom-textarea\",\n ref_key: \"textareaRef\",\n ref: textareaRef,\n contenteditable: true,\n onFocus: _cache[0] || (_cache[0] = ($event: any) => (handleFocus())),\n onBlur: _cache[1] || (_cache[1] = ($event: any) => (handleBlur())),\n onInput: _cache[2] || (_cache[2] = ($event: any) => (handleInput())),\n innerHTML: text.value\n }, null, 40, _hoisted_1))\n}\n}\n\n})","\n\n\n\n","import script from \"./CustomTextarea.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./CustomTextarea.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./CustomTextarea.vue?vue&type=style&index=0&id=7a7222ac&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7a7222ac\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, unref as _unref, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, createBlock as _createBlock, vShow as _vShow, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-0236a619\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"handler\"\n}\nconst _hoisted_2 = [\"onMousedown\"]\nconst _hoisted_3 = [\"width\"]\nconst _hoisted_4 = [\"rowspan\", \"colspan\", \"data-cell-index\", \"onMousedown\", \"onMouseenter\"]\nconst _hoisted_5 = [\"innerHTML\"]\n\nimport { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { debounce, isEqual } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { nanoid } from 'nanoid'\nimport { useMainStore } from '@/store'\nimport type { PPTElementOutline, TableCell, TableTheme } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport { KEYS } from '@/configs/hotkey'\nimport { getTextStyle, formatText } from './utils'\nimport useHideCells from './useHideCells'\nimport useSubThemeColor from './useSubThemeColor'\n\nimport CustomTextarea from './CustomTextarea.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'EditableTable',\n props: {\n data: {},\n width: {},\n cellMinHeight: {},\n colWidths: {},\n outline: {},\n theme: {},\n editable: { type: Boolean, default: true }\n },\n emits: [\"change\", \"changeColWidths\", \"changeSelectedCells\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst { canvasScale } = storeToRefs(useMainStore())\n \nconst isStartSelect = ref(false)\nconst startCell = ref([])\nconst endCell = ref([])\n\nconst tableCells = computed({\n get() {\n return props.data\n },\n set(newData) {\n emit('change', newData)\n },\n})\n\n// 主题辅助色\nconst theme = computed(() => props.theme)\nconst { subThemeColor } = useSubThemeColor(theme)\n\n// 计算表格每一列的列宽和总宽度\nconst colSizeList = ref([])\nconst totalWidth = computed(() => colSizeList.value.reduce((a, b) => a + b))\nwatch([\n () => props.colWidths,\n () => props.width,\n], () => {\n colSizeList.value = props.colWidths.map(item => item * props.width)\n}, { immediate: true })\n\n// 清除全部单元格的选中状态\n// 表格处于不可编辑状态时也需要清除\nconst removeSelectedCells = () => {\n startCell.value = []\n endCell.value = []\n}\n\nwatch(() => props.editable, () => {\n if (!props.editable) removeSelectedCells()\n})\n\n// 用于拖拽列宽的操作节点位置\nconst dragLinePosition = computed(() => {\n const dragLinePosition: number[] = []\n for (let i = 1; i < colSizeList.value.length + 1; i++) {\n const pos = colSizeList.value.slice(0, i).reduce((a, b) => (a + b))\n dragLinePosition.push(pos)\n }\n return dragLinePosition\n})\n\n// 无效的单元格位置(被合并的单元格位置)集合\nconst cells = computed(() => props.data)\nconst { hideCells } = useHideCells(cells)\n\n// 当前选中的单元格集合\nconst selectedCells = computed(() => {\n if (!startCell.value.length) return []\n const [startX, startY] = startCell.value\n\n if (!endCell.value.length) return [`${startX}_${startY}`]\n const [endX, endY] = endCell.value\n\n if (startX === endX && startY === endY) return [`${startX}_${startY}`]\n\n const selectedCells = []\n\n const minX = Math.min(startX, endX)\n const minY = Math.min(startY, endY)\n const maxX = Math.max(startX, endX)\n const maxY = Math.max(startY, endY)\n\n for (let i = 0; i < tableCells.value.length; i++) {\n const rowCells = tableCells.value[i]\n for (let j = 0; j < rowCells.length; j++) {\n if (i >= minX && i <= maxX && j >= minY && j <= maxY) selectedCells.push(`${i}_${j}`)\n }\n }\n return selectedCells\n})\n\nwatch(selectedCells, (value, oldValue) => {\n if (isEqual(value, oldValue)) return\n emit('changeSelectedCells', selectedCells.value)\n})\n\n// 当前激活的单元格:当且仅当只有一个选中单元格时,该单元格为激活的单元格\nconst activedCell = computed(() => {\n if (selectedCells.value.length > 1) return null\n return selectedCells.value[0]\n})\n\n// 设置选中单元格状态(鼠标点击或拖选)\nconst handleMouseup = () => isStartSelect.value = false\n\nconst handleCellMousedown = (e: MouseEvent, rowIndex: number, colIndex: number) => {\n if (e.button === 0) {\n endCell.value = []\n isStartSelect.value = true\n startCell.value = [rowIndex, colIndex]\n }\n}\n\nconst handleCellMouseenter = (rowIndex: number, colIndex: number) => {\n if (!isStartSelect.value) return\n endCell.value = [rowIndex, colIndex]\n}\n\nonMounted(() => {\n document.addEventListener('mouseup', handleMouseup)\n})\nonUnmounted(() => {\n document.removeEventListener('mouseup', handleMouseup)\n})\n\n// 判断某位置是否为无效单元格(被合并掉的位置)\nconst isHideCell = (rowIndex: number, colIndex: number) => hideCells.value.includes(`${rowIndex}_${colIndex}`)\n\n// 选中指定的列\nconst selectCol = (index: number) => {\n const maxRow = tableCells.value.length - 1\n startCell.value = [0, index]\n endCell.value = [maxRow, index]\n}\n\n// 选中指定的行\nconst selectRow = (index: number) => {\n const maxCol = tableCells.value[index].length - 1\n startCell.value = [index, 0]\n endCell.value = [index, maxCol]\n}\n\n// 选中全部单元格\nconst selectAll = () => {\n const maxRow = tableCells.value.length - 1\n const maxCol = tableCells.value[maxRow].length - 1\n startCell.value = [0, 0]\n endCell.value = [maxRow, maxCol]\n}\n\n// 删除一行\nconst deleteRow = (rowIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n const targetCells = tableCells.value[rowIndex]\n const hideCellsPos = []\n for (let i = 0; i < targetCells.length; i++) {\n if (isHideCell(rowIndex, i)) hideCellsPos.push(i)\n }\n \n for (const pos of hideCellsPos) {\n for (let i = rowIndex; i >= 0; i--) {\n if (!isHideCell(i, pos)) {\n _tableCells[i][pos].rowspan = _tableCells[i][pos].rowspan - 1\n break\n }\n }\n }\n\n _tableCells.splice(rowIndex, 1)\n tableCells.value = _tableCells\n}\n\n// 删除一列\nconst deleteCol = (colIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n const hideCellsPos = []\n for (let i = 0; i < tableCells.value.length; i++) {\n if (isHideCell(i, colIndex)) hideCellsPos.push(i)\n }\n\n for (const pos of hideCellsPos) {\n for (let i = colIndex; i >= 0; i--) {\n if (!isHideCell(pos, i)) {\n _tableCells[pos][i].colspan = _tableCells[pos][i].colspan - 1\n break\n }\n }\n }\n\n tableCells.value = _tableCells.map(item => {\n item.splice(colIndex, 1)\n return item\n })\n colSizeList.value.splice(colIndex, 1)\n emit('changeColWidths', colSizeList.value)\n}\n\n// 插入一行\nconst insertRow = (rowIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n const rowCells: TableCell[] = []\n for (let i = 0; i < _tableCells[0].length; i++) {\n rowCells.push({\n colspan: 1,\n rowspan: 1,\n text: '',\n id: nanoid(10),\n })\n }\n\n _tableCells.splice(rowIndex, 0, rowCells)\n tableCells.value = _tableCells\n}\n\n// 插入一列\nconst insertCol = (colIndex: number) => {\n tableCells.value = tableCells.value.map(item => {\n const cell = {\n colspan: 1,\n rowspan: 1,\n text: '',\n id: nanoid(10),\n }\n item.splice(colIndex, 0, cell)\n return item\n })\n colSizeList.value.splice(colIndex, 0, 100)\n emit('changeColWidths', colSizeList.value)\n}\n\n// 填充指定的行/列数\nconst fillTable = (rowCount: number, colCount: number) => {\n let _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n const defaultCell = { colspan: 1, rowspan: 1, text: '' }\n \n if (rowCount) {\n const newRows = []\n for (let i = 0; i < rowCount; i++) {\n const rowCells: TableCell[] = []\n for (let j = 0; j < _tableCells[0].length; j++) {\n rowCells.push({\n ...defaultCell,\n id: nanoid(10),\n })\n }\n newRows.push(rowCells)\n }\n _tableCells = [..._tableCells, ...newRows]\n }\n if (colCount) {\n _tableCells = _tableCells.map(item => {\n const cells: TableCell[] = []\n for (let i = 0; i < colCount; i++) {\n const cell = {\n ...defaultCell,\n id: nanoid(10),\n }\n cells.push(cell)\n }\n return [...item, ...cells]\n })\n colSizeList.value = [...colSizeList.value, ...new Array(colCount).fill(100)]\n emit('changeColWidths', colSizeList.value)\n }\n\n tableCells.value = _tableCells\n}\n\n// 合并单元格\nconst mergeCells = () => {\n const [startX, startY] = startCell.value\n const [endX, endY] = endCell.value\n\n const minX = Math.min(startX, endX)\n const minY = Math.min(startY, endY)\n const maxX = Math.max(startX, endX)\n const maxY = Math.max(startY, endY)\n\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n \n _tableCells[minX][minY].rowspan = maxX - minX + 1\n _tableCells[minX][minY].colspan = maxY - minY + 1\n\n tableCells.value = _tableCells\n removeSelectedCells()\n}\n\n// 拆分单元格\nconst splitCells = (rowIndex: number, colIndex: number) => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n _tableCells[rowIndex][colIndex].rowspan = 1\n _tableCells[rowIndex][colIndex].colspan = 1\n\n tableCells.value = _tableCells\n removeSelectedCells()\n}\n\n// 鼠标拖拽调整列宽\nconst handleMousedownColHandler = (e: MouseEvent, colIndex: number) => {\n removeSelectedCells()\n let isMouseDown = true\n\n const originWidth = colSizeList.value[colIndex]\n const startPageX = e.pageX\n\n const minWidth = 50\n\n document.onmousemove = e => {\n if (!isMouseDown) return\n \n const moveX = (e.pageX - startPageX) / canvasScale.value\n const width = originWidth + moveX < minWidth ? minWidth : Math.round(originWidth + moveX)\n\n colSizeList.value[colIndex] = width\n }\n document.onmouseup = () => {\n isMouseDown = false\n document.onmousemove = null\n document.onmouseup = null\n\n emit('changeColWidths', colSizeList.value)\n }\n}\n\n// 清空选中单元格内的文字\nconst clearSelectedCellText = () => {\n const _tableCells: TableCell[][] = JSON.parse(JSON.stringify(tableCells.value))\n\n for (let i = 0; i < _tableCells.length; i++) {\n for (let j = 0; j < _tableCells[i].length; j++) {\n if (selectedCells.value.includes(`${i}_${j}`)) {\n _tableCells[i][j].text = ''\n }\n }\n }\n tableCells.value = _tableCells\n}\n\n// 将焦点移动到下一个单元格\n// 当前行右边有单元格时,焦点右移\n// 当前行右边无单元格(已处在行末),且存在下一行时,焦点移动至下一行行首\n// 当前行右边无单元格(已处在行末),且不存在下一行(已处在最后一行)时,新建一行并将焦点移动至下一行行首\nconst tabActiveCell = () => {\n const getNextCell = (i: number, j: number): [number, number] | null => {\n if (!tableCells.value[i]) return null\n if (!tableCells.value[i][j]) return getNextCell(i + 1, 0)\n if (isHideCell(i, j)) return getNextCell(i, j + 1)\n return [i, j]\n }\n\n endCell.value = []\n\n const nextRow = startCell.value[0]\n const nextCol = startCell.value[1] + 1\n\n const nextCell = getNextCell(nextRow, nextCol)\n if (!nextCell) {\n insertRow(nextRow + 1)\n startCell.value = [nextRow + 1, 0]\n }\n else startCell.value = nextCell\n\n // 移动焦点后自动聚焦文本\n nextTick(() => {\n const textRef = document.querySelector('.cell-text.active') as HTMLInputElement\n if (textRef) textRef.focus()\n })\n}\n\n// 表格快捷键监听\nconst keydownListener = (e: KeyboardEvent) => {\n if (!props.editable || !selectedCells.value.length) return\n\n const key = e.key.toUpperCase()\n if (selectedCells.value.length < 2) {\n if (key === KEYS.TAB) {\n e.preventDefault()\n tabActiveCell()\n }\n if (e.ctrlKey && key === KEYS.UP) {\n e.preventDefault()\n const rowIndex = +selectedCells.value[0].split('_')[0]\n insertRow(rowIndex)\n }\n if (e.ctrlKey && key === KEYS.DOWN) {\n e.preventDefault()\n const rowIndex = +selectedCells.value[0].split('_')[0]\n insertRow(rowIndex + 1)\n }\n if (e.ctrlKey && key === KEYS.LEFT) {\n e.preventDefault()\n const colIndex = +selectedCells.value[0].split('_')[1]\n insertCol(colIndex)\n }\n if (e.ctrlKey && key === KEYS.RIGHT) {\n e.preventDefault()\n const colIndex = +selectedCells.value[0].split('_')[1]\n insertCol(colIndex + 1)\n }\n }\n else if (key === KEYS.DELETE) {\n clearSelectedCellText()\n }\n}\n\nonMounted(() => {\n document.addEventListener('keydown', keydownListener)\n})\nonUnmounted(() => {\n document.removeEventListener('keydown', keydownListener)\n})\n\n// 单元格文字输入时更新表格数据\nconst handleInput = debounce(function(value, rowIndex, colIndex) {\n tableCells.value[rowIndex][colIndex].text = value\n emit('change', tableCells.value)\n}, 300, { trailing: true })\n\n// 插入来自Excel的数据,表格的行/列数不够时自动补足\nconst insertExcelData = (data: string[][], rowIndex: number, colIndex: number) => {\n const maxRow = data.length\n const maxCol = data[0].length\n\n let fillRowCount = 0\n let fillColCount = 0\n if (rowIndex + maxRow > tableCells.value.length) fillRowCount = rowIndex + maxRow - tableCells.value.length\n if (colIndex + maxCol > tableCells.value[0].length) fillColCount = colIndex + maxCol - tableCells.value[0].length\n if (fillRowCount || fillColCount) fillTable(fillRowCount, fillColCount)\n\n nextTick(() => {\n for (let i = 0; i < maxRow; i++) {\n for (let j = 0; j < maxCol; j++) {\n if (tableCells.value[rowIndex + i][colIndex + j]) {\n tableCells.value[rowIndex + i][colIndex + j].text = data[i][j]\n }\n }\n }\n emit('change', tableCells.value)\n })\n}\n\n// 获取有效的单元格(排除掉被合并的单元格)\nconst getEffectiveTableCells = () => {\n const effectiveTableCells = []\n\n for (let i = 0; i < tableCells.value.length; i++) {\n const rowCells = tableCells.value[i]\n const _rowCells = []\n for (let j = 0; j < rowCells.length; j++) {\n if (!isHideCell(i, j)) _rowCells.push(rowCells[j])\n }\n if (_rowCells.length) effectiveTableCells.push(_rowCells)\n }\n\n return effectiveTableCells\n}\n\n// 检查是否可以删除行和列:有效的行/列数大于1\nconst checkCanDeleteRowOrCol = () => {\n const effectiveTableCells = getEffectiveTableCells()\n const canDeleteRow = effectiveTableCells.length > 1\n const canDeleteCol = effectiveTableCells[0].length > 1\n\n return { canDeleteRow, canDeleteCol }\n}\n\n// 检查是否可以合并或拆分\n// 必须多选才可以合并\n// 必须单选且所选单元格为合并单元格才可以拆分\nconst checkCanMergeOrSplit = (rowIndex: number, colIndex: number) => {\n const isMultiSelected = selectedCells.value.length > 1\n const targetCell = tableCells.value[rowIndex][colIndex]\n\n const canMerge = isMultiSelected\n const canSplit = !isMultiSelected && (targetCell.rowspan > 1 || targetCell.colspan > 1)\n\n return { canMerge, canSplit }\n}\n\nconst contextmenus = (el: HTMLElement): ContextmenuItem[] => {\n const cellIndex = el.dataset.cellIndex as string\n const rowIndex = +cellIndex.split('_')[0]\n const colIndex = +cellIndex.split('_')[1]\n\n if (!selectedCells.value.includes(`${rowIndex}_${colIndex}`)) {\n startCell.value = [rowIndex, colIndex]\n endCell.value = []\n }\n\n const { canMerge, canSplit } = checkCanMergeOrSplit(rowIndex, colIndex)\n const { canDeleteRow, canDeleteCol } = checkCanDeleteRowOrCol()\n\n return [\n {\n text: '插入列',\n children: [\n { text: '到左侧', handler: () => insertCol(colIndex) },\n { text: '到右侧', handler: () => insertCol(colIndex + 1) },\n ],\n },\n {\n text: '插入行',\n children: [\n { text: '到上方', handler: () => insertRow(rowIndex) },\n { text: '到下方', handler: () => insertRow(rowIndex + 1) },\n ],\n },\n {\n text: '删除列',\n disable: !canDeleteCol,\n handler: () => deleteCol(colIndex),\n },\n {\n text: '删除行',\n disable: !canDeleteRow,\n handler: () => deleteRow(rowIndex),\n },\n { divider: true },\n {\n text: '合并单元格',\n disable: !canMerge,\n handler: mergeCells,\n },\n {\n text: '取消合并单元格',\n disable: !canSplit,\n handler: () => splitCells(rowIndex, colIndex),\n },\n { divider: true },\n {\n text: '选中当前列',\n handler: () => selectCol(colIndex),\n },\n {\n text: '选中当前行',\n handler: () => selectRow(rowIndex),\n },\n {\n text: '选中全部单元格',\n handler: selectAll,\n },\n ]\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"editable-table\",\n style: _normalizeStyle({ width: totalWidth.value + 'px' })\n }, [\n (_ctx.editable)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(dragLinePosition.value, (pos, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"drag-line\",\n key: index,\n style: _normalizeStyle({ left: pos + 'px' }),\n onMousedown: $event => handleMousedownColHandler($event, index)\n }, null, 44, _hoisted_2))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"table\", {\n class: _normalizeClass({\n 'theme': theme.value,\n 'row-header': theme.value?.rowHeader,\n 'row-footer': theme.value?.rowFooter,\n 'col-header': theme.value?.colHeader,\n 'col-footer': theme.value?.colFooter,\n }),\n style: _normalizeStyle(`--themeColor: ${theme.value?.color}; --subThemeColor1: ${_unref(subThemeColor)[0]}; --subThemeColor2: ${_unref(subThemeColor)[1]}`)\n }, [\n _createElementVNode(\"colgroup\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(colSizeList.value, (width, index) => {\n return (_openBlock(), _createElementBlock(\"col\", {\n span: \"1\",\n key: index,\n width: width\n }, null, 8, _hoisted_3))\n }), 128))\n ]),\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tableCells.value, (rowCells, rowIndex) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: rowIndex,\n style: _normalizeStyle({ height: _ctx.cellMinHeight + 'px' })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rowCells, (cell, colIndex) => {\n return _withDirectives((_openBlock(), _createElementBlock(\"td\", {\n class: _normalizeClass([\"cell\", {\n 'selected': selectedCells.value.includes(`${rowIndex}_${colIndex}`) && selectedCells.value.length > 1,\n 'active': activedCell.value === `${rowIndex}_${colIndex}`,\n }]),\n style: _normalizeStyle({\n borderStyle: _ctx.outline.style,\n borderColor: _ctx.outline.color,\n borderWidth: _ctx.outline.width + 'px',\n ..._unref(getTextStyle)(cell.style),\n }),\n key: cell.id,\n rowspan: cell.rowspan,\n colspan: cell.colspan,\n \"data-cell-index\": `${rowIndex}_${colIndex}`,\n onMousedown: $event => handleCellMousedown($event, rowIndex, colIndex),\n onMouseenter: ($event: any) => (handleCellMouseenter(rowIndex, colIndex))\n }, [\n (activedCell.value === `${rowIndex}_${colIndex}`)\n ? (_openBlock(), _createBlock(CustomTextarea, {\n key: 0,\n class: _normalizeClass([\"cell-text\", { 'active': activedCell.value === `${rowIndex}_${colIndex}` }]),\n style: _normalizeStyle({ minHeight: (_ctx.cellMinHeight - 4) + 'px' }),\n value: cell.text,\n onUpdateValue: value => _unref(handleInput)(value, rowIndex, colIndex),\n onInsertExcelData: value => insertExcelData(value, rowIndex, colIndex)\n }, null, 8, [\"class\", \"style\", \"value\", \"onUpdateValue\", \"onInsertExcelData\"]))\n : (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"cell-text\",\n style: _normalizeStyle({ minHeight: (_ctx.cellMinHeight - 4) + 'px' }),\n innerHTML: _unref(formatText)(cell.text)\n }, null, 12, _hoisted_5))\n ], 46, _hoisted_4)), [\n [_vShow, !_unref(hideCells).includes(`${rowIndex}_${colIndex}`)],\n [_directive_contextmenu, (el) => contextmenus(el)]\n ])\n }), 128))\n ], 4))\n }), 128))\n ])\n ], 6)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./EditableTable.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./EditableTable.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./EditableTable.vue?vue&type=style&index=0&id=0236a619&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-0236a619\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { withModifiers as _withModifiers, createVNode as _createVNode, unref as _unref, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-742a731e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\n\nimport { nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTTableElement, TableCell } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport EditableTable from './EditableTable.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { canvasScale, handleElementId, isScaling } = storeToRefs(mainStore)\n\nconst elementRef = ref()\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\n// 更新表格的可编辑状态,表格处于编辑状态时需要禁用全局快捷键\nconst editable = ref(false)\n\nwatch(handleElementId, () => {\n if (handleElementId.value !== props.elementInfo.id) editable.value = false\n})\n\nwatch(editable, () => {\n mainStore.setDisableHotkeysState(editable.value)\n})\n\nconst startEdit = () => {\n if (!props.elementInfo.lock) editable.value = true\n}\n\n// 监听表格元素的尺寸变化,当高度变化时,更新高度到vuex\n// 如果高度变化时正处在缩放操作中,则等待缩放操作结束后再更新\nconst realHeightCache = ref(-1)\n\nwatch(isScaling, () => {\n if (handleElementId.value !== props.elementInfo.id) return\n\n if (isScaling.value) editable.value = false\n\n if (!isScaling.value && realHeightCache.value !== -1) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeightCache.value },\n })\n realHeightCache.value = -1\n }\n})\n\nconst updateTableElementHeight = (entries: ResizeObserverEntry[]) => {\n const contentRect = entries[0].contentRect\n if (!elementRef.value) return\n\n const realHeight = contentRect.height\n\n if (props.elementInfo.height !== realHeight) {\n if (!isScaling.value) {\n slidesStore.updateElement({\n id: props.elementInfo.id,\n props: { height: realHeight },\n })\n }\n else realHeightCache.value = realHeight\n }\n}\n\nconst resizeObserver = new ResizeObserver(updateTableElementHeight)\n\nonMounted(() => {\n if (elementRef.value) resizeObserver.observe(elementRef.value)\n})\nonUnmounted(() => {\n if (elementRef.value) resizeObserver.unobserve(elementRef.value)\n})\n\n// 更新表格内容数据\nconst updateTableCells = (data: TableCell[][]) => {\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: { data },\n })\n addHistorySnapshot()\n}\n\n// 更新表格的列宽数据\nconst updateColWidths = (widths: number[]) => {\n const width = widths.reduce((a, b) => a + b)\n const colWidths = widths.map(item => item / width)\n\n slidesStore.updateElement({\n id: props.elementInfo.id, \n props: { width, colWidths },\n })\n addHistorySnapshot()\n}\n\n// 更新表格当前选中的单元格\nconst updateSelectedCells = (cells: string[]) => {\n nextTick(() => mainStore.setSelectedTableCells(cells))\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-table\", { 'lock': _ctx.elementInfo.lock }]),\n ref_key: \"elementRef\",\n ref: elementRef,\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(EditableTable, {\n onMousedown: _cache[0] || (_cache[0] = _withModifiers(() => {}, [\"stop\"])),\n data: _ctx.elementInfo.data,\n width: _ctx.elementInfo.width,\n cellMinHeight: _ctx.elementInfo.cellMinHeight,\n colWidths: _ctx.elementInfo.colWidths,\n outline: _ctx.elementInfo.outline,\n theme: _ctx.elementInfo.theme,\n editable: editable.value,\n onChange: _cache[1] || (_cache[1] = data => updateTableCells(data)),\n onChangeColWidths: _cache[2] || (_cache[2] = widths => updateColWidths(widths)),\n onChangeSelectedCells: _cache[3] || (_cache[3] = cells => updateSelectedCells(cells))\n }, null, 8, [\"data\", \"width\", \"cellMinHeight\", \"colWidths\", \"outline\", \"theme\", \"editable\"]),\n (!editable.value || _ctx.elementInfo.lock)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"table-mask\", { 'lock': _ctx.elementInfo.lock }]),\n onDblclick: _cache[4] || (_cache[4] = ($event: any) => (startEdit())),\n onMousedown: _cache[5] || (_cache[5] = $event => handleSelectElement($event)),\n onTouchstart: _cache[6] || (_cache[6] = $event => handleSelectElement($event))\n }, [\n (_unref(handleElementId) === _ctx.elementInfo.id)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"mask-tip\",\n style: _normalizeStyle({ transform: `scale(${ 1 / _unref(canvasScale) })` })\n }, \"双击编辑\", 4))\n : _createCommentVNode(\"\", true)\n ], 34))\n : _createCommentVNode(\"\", true)\n ])), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=742a731e&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-742a731e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveDirective as _resolveDirective, withDirectives as _withDirectives, normalizeStyle as _normalizeStyle, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-35c33b80\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\", \"stroke\", \"stroke-width\"]\nconst _hoisted_2 = [\"transform\"]\nconst _hoisted_3 = [\"d\"]\n\nimport type { PPTLatexElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport emitter, { EmitterEvents } from '@/utils/emitter'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\nconst openLatexEditor = () => {\n emitter.emit(EmitterEvents.OPEN_LATEX_EDITOR)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-latex\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event)),\n onDblclick: _cache[2] || (_cache[2] = ($event: any) => (openLatexEditor()))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.strokeWidth,\n fill: \"none\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\"\n }, [\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n d: _ctx.elementInfo.path\n }, null, 8, _hoisted_3)\n ], 8, _hoisted_2)\n ], 8, _hoisted_1))\n ], 32)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=35c33b80&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-35c33b80\"]])\n\nexport default __exports__","import { onMounted, type Ref } from 'vue'\n\nexport default (\n src: string,\n videoRef: Ref,\n) => {\n onMounted(() => {\n if (!videoRef.value) return\n\n let type = 'normal'\n if (/m3u8(#|\\?|$)/i.exec(src)) type = 'hls'\n else if (/.flv(#|\\?|$)/i.exec(src)) type = 'flv'\n\n if (videoRef.value && type === 'hls' && (videoRef.value.canPlayType('application/x-mpegURL') || videoRef.value.canPlayType('application/vnd.apple.mpegURL'))) {\n type = 'normal'\n }\n\n if (type === 'hls') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const Hls = (window as any).Hls\n \n if (Hls && Hls.isSupported()) {\n const hls = new Hls()\n hls.loadSource(src)\n hls.attachMedia(videoRef.value)\n }\n }\n else if (type === 'flv') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const flvjs = (window as any).flvjs\n if (flvjs && flvjs.isSupported()) {\n const flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: src,\n })\n flvPlayer.attachMediaElement(videoRef.value)\n flvPlayer.load()\n }\n }\n })\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, renderList as _renderList, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-e55352ca\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"load-error\"\n}\nconst _hoisted_2 = [\"src\", \"autoplay\", \"poster\"]\nconst _hoisted_3 = { class: \"bezel\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"controller-mask\" }, null, -1))\nconst _hoisted_5 = { class: \"controller\" }\nconst _hoisted_6 = { class: \"icons icons-left\" }\nconst _hoisted_7 = { class: \"icon-content\" }\nconst _hoisted_8 = { class: \"volume\" }\nconst _hoisted_9 = { class: \"icon-content\" }\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_11 = [\n _hoisted_10\n]\nconst _hoisted_12 = { class: \"time\" }\nconst _hoisted_13 = { class: \"ptime\" }\nconst _hoisted_14 = { class: \"dtime\" }\nconst _hoisted_15 = { class: \"icons icons-right\" }\nconst _hoisted_16 = { class: \"speed\" }\nconst _hoisted_17 = { class: \"icon speed-icon\" }\nconst _hoisted_18 = [\"onClick\"]\nconst _hoisted_19 = { class: \"icon-content\" }\nconst _hoisted_20 = { class: \"bar\" }\nconst _hoisted_21 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_22 = [\n _hoisted_21\n]\n\nimport { computed, ref } from 'vue'\nimport useMSE from './useMSE'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n width: {},\n height: {},\n src: {},\n poster: { default: '' },\n autoplay: { type: Boolean, default: false },\n scale: { default: 1 }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst secondToTime = (second = 0) => {\n if (second === 0 || isNaN(second)) return '00:00'\n\n const add0 = (num: number) => (num < 10 ? '0' + num : '' + num)\n const hour = Math.floor(second / 3600)\n const min = Math.floor((second - hour * 3600) / 60)\n const sec = Math.floor(second - hour * 3600 - min * 60)\n return (hour > 0 ? [hour, min, sec] : [min, sec]).map(add0).join(':')\n}\n\nconst getBoundingClientRectViewLeft = (element: HTMLElement) => {\n return element.getBoundingClientRect().left\n}\n\nconst videoRef = ref()\nconst playBarWrap = ref()\nconst volumeBarRef = ref()\n\nconst volume = ref(0.5)\nconst paused = ref(true)\nconst currentTime = ref(0)\nconst duration = ref(0)\nconst loaded = ref(0)\nconst loop = ref(false)\nconst bezelTransition = ref(false)\nconst playbackRate = ref(1)\n\nconst playBarTimeVisible = ref(false)\nconst playBarTime = ref('00:00')\nconst playBarTimeLeft = ref('0')\n\nconst ptime = computed(() => secondToTime(currentTime.value))\nconst dtime = computed(() => secondToTime(duration.value))\nconst playedBarWidth = computed(() => currentTime.value / duration.value * 100 + '%')\nconst loadedBarWidth = computed(() => loaded.value / duration.value * 100 + '%')\nconst volumeBarWidth = computed(() => volume.value * 100 + '%')\n\nconst speedMenuVisible = ref(false)\nconst speedOptions = [\n { label: '2x', value: 2 },\n { label: '1.5x', value: 1.5 },\n { label: '1.25x', value: 1.25 },\n { label: '1x', value: 1 },\n { label: '0.75x', value: 0.75 },\n { label: '0.5x', value: 0.5 },\n]\n\nconst seek = (time: number) => {\n if (!videoRef.value) return\n\n time = Math.max(time, 0)\n time = Math.min(time, duration.value)\n\n videoRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst play = () => {\n if (!videoRef.value) return\n\n paused.value = false\n videoRef.value.play()\n bezelTransition.value = true\n}\n\nconst pause = () => {\n if (!videoRef.value) return\n\n paused.value = true\n videoRef.value.pause()\n bezelTransition.value = true\n}\n\nconst toggle = () => {\n if (paused.value) play() \n else pause()\n}\n\nconst setVolume = (percentage: number) => {\n if (!videoRef.value) return\n\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n\n videoRef.value.volume = percentage\n volume.value = percentage\n if (videoRef.value.muted && percentage !== 0) videoRef.value.muted = false\n}\n\nconst speed = (rate: number) => {\n if (videoRef.value) videoRef.value.playbackRate = rate\n playbackRate.value = rate\n}\n\nconst handleDurationchange = () => {\n duration.value = videoRef.value?.duration || 0\n}\n\nconst handleTimeupdate = () => {\n currentTime.value = videoRef.value?.currentTime || 0\n}\n\nconst handleEnded = () => {\n if (!loop.value) pause()\n else {\n seek(0)\n play()\n }\n}\n\nconst handleProgress = () => {\n loaded.value = videoRef.value?.buffered.length ? videoRef.value.buffered.end(videoRef.value.buffered.length - 1) : 0\n}\n\nconst loadError = ref(false)\nconst handleError = () => loadError.value = true\n\nconst thumbMove = (e: MouseEvent | TouchEvent) => {\n if (!videoRef.value || !playBarWrap.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n videoRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst thumbUp = (e: MouseEvent | TouchEvent) => {\n if (!videoRef.value || !playBarWrap.value) return\n\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n videoRef.value.currentTime = time\n currentTime.value = time\n\n document.removeEventListener('mousemove', thumbMove)\n document.removeEventListener('touchmove', thumbMove)\n document.removeEventListener('mouseup', thumbUp)\n document.removeEventListener('touchend', thumbUp)\n}\n\nconst handleMousedownPlayBar = () => {\n document.addEventListener('mousemove', thumbMove)\n document.addEventListener('touchmove', thumbMove)\n document.addEventListener('mouseup', thumbUp)\n document.addEventListener('touchend', thumbUp)\n}\n\nconst volumeMove = (e: MouseEvent | TouchEvent) => {\n if (!volumeBarRef.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n const percentage = (clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst volumeUp = () => {\n document.removeEventListener('mousemove', volumeMove)\n document.removeEventListener('touchmove', volumeMove)\n document.removeEventListener('mouseup', volumeUp)\n document.removeEventListener('touchend', volumeUp)\n}\n\nconst handleMousedownVolumeBar = () => {\n document.addEventListener('mousemove', volumeMove)\n document.addEventListener('touchmove', volumeMove)\n document.addEventListener('mouseup', volumeUp)\n document.addEventListener('touchend', volumeUp)\n}\n\nconst handleClickVolumeBar = (e: MouseEvent) => {\n if (!volumeBarRef.value) return\n const percentage = (e.clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst handleMousemovePlayBar = (e: MouseEvent) => {\n if (duration.value && playBarWrap.value) {\n const px = playBarWrap.value.getBoundingClientRect().left\n const tx = e.clientX - px\n if (tx < 0 || tx > playBarWrap.value.offsetWidth) return\n\n const time = duration.value * (tx / playBarWrap.value.offsetWidth)\n playBarTimeLeft.value = `${tx - (time >= 3600 ? 25 : 20)}px`\n playBarTime.value = secondToTime(time)\n playBarTimeVisible.value = true\n }\n}\n\nconst toggleVolume = () => {\n if (!videoRef.value) return\n\n if (videoRef.value.muted) {\n videoRef.value.muted = false\n setVolume(0.5)\n }\n else {\n videoRef.value.muted = true\n setVolume(0)\n }\n}\n\nconst toggleLoop = () => {\n loop.value = !loop.value\n}\n\nconst autoHideControllerTimer = ref(-1)\nconst hideController = ref(false)\nconst autoHideController = () => {\n hideController.value = false\n clearTimeout(autoHideControllerTimer.value)\n autoHideControllerTimer.value = setTimeout(() => {\n if (videoRef.value?.played.length) hideController.value = true\n }, 3000)\n}\n\nuseMSE(props.src, videoRef)\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconPause = _resolveComponent(\"IconPause\")!\n const _component_IconPlayOne = _resolveComponent(\"IconPlayOne\")!\n const _component_IconVolumeMute = _resolveComponent(\"IconVolumeMute\")!\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n const _component_IconVolumeSmall = _resolveComponent(\"IconVolumeSmall\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"video-player\", { 'hide-controller': hideController.value }]),\n style: _normalizeStyle({\n width: _ctx.width * _ctx.scale + 'px',\n height: _ctx.height * _ctx.scale + 'px',\n transform: `scale(${1 / _ctx.scale})`,\n }),\n onMousemove: _cache[22] || (_cache[22] = ($event: any) => (autoHideController())),\n onClick: _cache[23] || (_cache[23] = ($event: any) => (autoHideController()))\n }, [\n _createElementVNode(\"div\", {\n class: \"video-wrap\",\n onClick: _cache[8] || (_cache[8] = ($event: any) => (toggle()))\n }, [\n (loadError.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, \"视频加载失败\"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"video\", {\n class: \"video\",\n ref_key: \"videoRef\",\n ref: videoRef,\n src: _ctx.src,\n autoplay: _ctx.autoplay,\n poster: _ctx.poster,\n \"webkit-playsinline\": \"\",\n playsinline: \"\",\n onDurationchange: _cache[0] || (_cache[0] = ($event: any) => (handleDurationchange())),\n onTimeupdate: _cache[1] || (_cache[1] = ($event: any) => (handleTimeupdate())),\n onEnded: _cache[2] || (_cache[2] = ($event: any) => (handleEnded())),\n onProgress: _cache[3] || (_cache[3] = ($event: any) => (handleProgress())),\n onPlay: _cache[4] || (_cache[4] = ($event: any) => {autoHideController(); paused.value = false}),\n onPause: _cache[5] || (_cache[5] = ($event: any) => (autoHideController())),\n onError: _cache[6] || (_cache[6] = ($event: any) => (handleError()))\n }, null, 40, _hoisted_2),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"span\", {\n class: _normalizeClass([\"bezel-icon\", { 'bezel-transition': bezelTransition.value }]),\n onAnimationend: _cache[7] || (_cache[7] = ($event: any) => (bezelTransition.value = false))\n }, [\n (paused.value)\n ? (_openBlock(), _createBlock(_component_IconPause, { key: 0 }))\n : (_openBlock(), _createBlock(_component_IconPlayOne, { key: 1 }))\n ], 34)\n ])\n ]),\n _hoisted_4,\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", {\n class: \"icon play-icon\",\n onClick: _cache[9] || (_cache[9] = ($event: any) => (toggle()))\n }, [\n _createElementVNode(\"span\", _hoisted_7, [\n (paused.value)\n ? (_openBlock(), _createBlock(_component_IconPlayOne, { key: 0 }))\n : (_openBlock(), _createBlock(_component_IconPause, { key: 1 }))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"div\", {\n class: \"icon volume-icon\",\n onClick: _cache[10] || (_cache[10] = ($event: any) => (toggleVolume()))\n }, [\n _createElementVNode(\"span\", _hoisted_9, [\n (volume.value === 0)\n ? (_openBlock(), _createBlock(_component_IconVolumeMute, { key: 0 }))\n : (volume.value === 1)\n ? (_openBlock(), _createBlock(_component_IconVolumeNotice, { key: 1 }))\n : (_openBlock(), _createBlock(_component_IconVolumeSmall, { key: 2 }))\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"volume-bar-wrap\",\n onMousedown: _cache[11] || (_cache[11] = ($event: any) => (handleMousedownVolumeBar())),\n onTouchstart: _cache[12] || (_cache[12] = ($event: any) => (handleMousedownVolumeBar())),\n onClick: _cache[13] || (_cache[13] = $event => handleClickVolumeBar($event))\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar\",\n ref_key: \"volumeBarRef\",\n ref: volumeBarRef\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar-inner\",\n style: _normalizeStyle({ width: volumeBarWidth.value })\n }, _hoisted_11, 4)\n ], 512)\n ], 32)\n ]),\n _createElementVNode(\"span\", _hoisted_12, [\n _createElementVNode(\"span\", _hoisted_13, _toDisplayString(ptime.value), 1),\n _createTextVNode(\" / \"),\n _createElementVNode(\"span\", _hoisted_14, _toDisplayString(dtime.value), 1)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"div\", _hoisted_16, [\n _createElementVNode(\"div\", _hoisted_17, [\n _createElementVNode(\"span\", {\n class: \"icon-content\",\n onClick: _cache[14] || (_cache[14] = ($event: any) => (speedMenuVisible.value = !speedMenuVisible.value))\n }, _toDisplayString(playbackRate.value === 1 ? '倍速' : (playbackRate.value + 'x')), 1),\n (speedMenuVisible.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"speed-menu\",\n onMouseleave: _cache[15] || (_cache[15] = ($event: any) => (speedMenuVisible.value = false))\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(speedOptions, (item) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass([\"speed-menu-item\", { 'active': item.value === playbackRate.value }]),\n key: item.label,\n onClick: ($event: any) => (speed(item.value))\n }, _toDisplayString(item.label), 11, _hoisted_18)\n }), 64))\n ], 32))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"loop\",\n onClick: _cache[16] || (_cache[16] = ($event: any) => (toggleLoop()))\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"icon loop-icon\", { 'active': loop.value }])\n }, [\n _createElementVNode(\"span\", _hoisted_19, \"循环\" + _toDisplayString(loop.value ? '开' : '关'), 1)\n ], 2)\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"bar-wrap\",\n ref_key: \"playBarWrap\",\n ref: playBarWrap,\n onMousedown: _cache[17] || (_cache[17] = ($event: any) => (handleMousedownPlayBar())),\n onTouchstart: _cache[18] || (_cache[18] = ($event: any) => (handleMousedownPlayBar())),\n onMousemove: _cache[19] || (_cache[19] = $event => handleMousemovePlayBar($event)),\n onMouseenter: _cache[20] || (_cache[20] = ($event: any) => (playBarTimeVisible.value = true)),\n onMouseleave: _cache[21] || (_cache[21] = ($event: any) => (playBarTimeVisible.value = false))\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"bar-time\", { 'hidden': !playBarTimeVisible.value }]),\n style: _normalizeStyle({ left: playBarTimeLeft.value })\n }, _toDisplayString(playBarTime.value), 7),\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"div\", {\n class: \"loaded\",\n style: _normalizeStyle({ width: loadedBarWidth.value })\n }, null, 4),\n _createElementVNode(\"div\", {\n class: \"played\",\n style: _normalizeStyle({ width: playedBarWidth.value })\n }, _hoisted_22, 4)\n ])\n ], 544)\n ])\n ], 38))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=e55352ca&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-e55352ca\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, normalizeStyle as _normalizeStyle } from \"vue\"\n\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTVideoElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\n\nimport VideoPlayer from './VideoPlayer/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent, canMove = true) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo, canMove)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-video\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n onMousedown: _cache[2] || (_cache[2] = $event => handleSelectElement($event, false)),\n onTouchstart: _cache[3] || (_cache[3] = $event => handleSelectElement($event, false))\n }, [\n _createVNode(VideoPlayer, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n src: _ctx.elementInfo.src,\n poster: _ctx.elementInfo.poster,\n scale: _unref(canvasScale)\n }, null, 8, [\"width\", \"height\", \"src\", \"poster\", \"scale\"]),\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(['t', 'b', 'l', 'r'], (item) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass(['handler-border', item]),\n key: item,\n onMousedown: _cache[0] || (_cache[0] = $event => handleSelectElement($event)),\n onTouchstart: _cache[1] || (_cache[1] = $event => handleSelectElement($event))\n }, null, 34)\n }), 64))\n ], 32)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=5dc89f2a&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5dc89f2a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-44037f56\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\", \"autoplay\"]\nconst _hoisted_2 = { class: \"controller\" }\nconst _hoisted_3 = { class: \"icons\" }\nconst _hoisted_4 = { class: \"icon-content\" }\nconst _hoisted_5 = { class: \"volume\" }\nconst _hoisted_6 = { class: \"icon-content\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_8 = [\n _hoisted_7\n]\nconst _hoisted_9 = { class: \"time\" }\nconst _hoisted_10 = { class: \"ptime\" }\nconst _hoisted_11 = { class: \"dtime\" }\nconst _hoisted_12 = { class: \"bar\" }\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"thumb\" }, null, -1))\nconst _hoisted_14 = [\n _hoisted_13\n]\n\nimport { computed, ref } from 'vue'\nimport message from '@/utils/message'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'AudioPlayer',\n props: {\n src: {},\n loop: { type: Boolean },\n autoplay: { type: Boolean, default: false },\n scale: { default: 1 }\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props\n\nconst secondToTime = (second = 0) => {\n if (second === 0 || isNaN(second)) return '00:00'\n\n const add0 = (num: number) => (num < 10 ? '0' + num : '' + num)\n const hour = Math.floor(second / 3600)\n const min = Math.floor((second - hour * 3600) / 60)\n const sec = Math.floor(second - hour * 3600 - min * 60)\n return (hour > 0 ? [hour, min, sec] : [min, sec]).map(add0).join(':')\n}\n\nconst getBoundingClientRectViewLeft = (element: HTMLElement) => {\n return element.getBoundingClientRect().left\n}\n\nconst audioRef = ref()\nconst playBarWrap = ref()\nconst volumeBarRef = ref()\n\nconst volume = ref(0.5)\nconst paused = ref(true)\nconst currentTime = ref(0)\nconst duration = ref(0)\nconst loaded = ref(0)\n\nconst playBarTimeVisible = ref(false)\nconst playBarTime = ref('00:00')\nconst playBarTimeLeft = ref('0')\n\nconst ptime = computed(() => secondToTime(currentTime.value))\nconst dtime = computed(() => secondToTime(duration.value))\nconst playedBarWidth = computed(() => currentTime.value / duration.value * 100 + '%')\nconst loadedBarWidth = computed(() => loaded.value / duration.value * 100 + '%')\nconst volumeBarWidth = computed(() => volume.value * 100 + '%')\n\nconst seek = (time: number) => {\n if (!audioRef.value) return\n\n time = Math.max(time, 0)\n time = Math.min(time, duration.value)\n\n audioRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst play = () => {\n if (!audioRef.value) return\n\n paused.value = false\n audioRef.value.play()\n}\n\nconst pause = () => {\n if (!audioRef.value) return\n\n paused.value = true\n audioRef.value.pause()\n}\n\nconst toggle = () => {\n if (paused.value) play() \n else pause()\n}\n\nconst setVolume = (percentage: number) => {\n if (!audioRef.value) return\n\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n\n audioRef.value.volume = percentage\n volume.value = percentage\n if (audioRef.value.muted && percentage !== 0) audioRef.value.muted = false\n}\n\nconst handleDurationchange = () => {\n duration.value = audioRef.value?.duration || 0\n}\n\nconst handleTimeupdate = () => {\n currentTime.value = audioRef.value?.currentTime || 0\n}\n\nconst handlePlayed = () => {\n paused.value = false\n}\n\nconst handleEnded = () => {\n if (!props.loop) pause()\n else {\n seek(0)\n play()\n }\n}\n\nconst handleProgress = () => {\n loaded.value = audioRef.value?.buffered.length ? audioRef.value.buffered.end(audioRef.value.buffered.length - 1) : 0\n}\n\nconst handleError = () => message.error('视频加载失败')\n\nconst thumbMove = (e: MouseEvent | TouchEvent) => {\n if (!audioRef.value || !playBarWrap.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n audioRef.value.currentTime = time\n currentTime.value = time\n}\n\nconst thumbUp = (e: MouseEvent | TouchEvent) => {\n if (!audioRef.value || !playBarWrap.value) return\n\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth\n percentage = Math.max(percentage, 0)\n percentage = Math.min(percentage, 1)\n const time = percentage * duration.value\n\n audioRef.value.currentTime = time\n currentTime.value = time\n\n document.removeEventListener('mousemove', thumbMove)\n document.removeEventListener('touchmove', thumbMove)\n document.removeEventListener('mouseup', thumbUp)\n document.removeEventListener('touchend', thumbUp)\n}\n\nconst handleMousedownPlayBar = () => {\n document.addEventListener('mousemove', thumbMove)\n document.addEventListener('touchmove', thumbMove)\n document.addEventListener('mouseup', thumbUp)\n document.addEventListener('touchend', thumbUp)\n}\n\nconst volumeMove = (e: MouseEvent | TouchEvent) => {\n if (!volumeBarRef.value) return\n const clientX = 'clientX' in e ? e.clientX : e.changedTouches[0].clientX\n const percentage = (clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst volumeUp = () => {\n document.removeEventListener('mousemove', volumeMove)\n document.removeEventListener('touchmove', volumeMove)\n document.removeEventListener('mouseup', volumeUp)\n document.removeEventListener('touchend', volumeUp)\n}\n\nconst handleMousedownVolumeBar = () => {\n document.addEventListener('mousemove', volumeMove)\n document.addEventListener('touchmove', volumeMove)\n document.addEventListener('mouseup', volumeUp)\n document.addEventListener('touchend', volumeUp)\n}\n\nconst handleClickVolumeBar = (e: MouseEvent) => {\n if (!volumeBarRef.value) return\n const percentage = (e.clientX - getBoundingClientRectViewLeft(volumeBarRef.value)) / 45\n setVolume(percentage)\n}\n\nconst handleMousemovePlayBar = (e: MouseEvent) => {\n if (duration.value && playBarWrap.value) {\n const px = playBarWrap.value.getBoundingClientRect().left\n const tx = e.clientX - px\n if (tx < 0 || tx > playBarWrap.value.offsetWidth) return\n\n const time = duration.value * (tx / playBarWrap.value.offsetWidth)\n playBarTimeLeft.value = `${tx - (time >= 3600 ? 25 : 20)}px`\n playBarTime.value = secondToTime(time)\n playBarTimeVisible.value = true\n }\n}\n\nconst toggleVolume = () => {\n if (!audioRef.value) return\n\n if (audioRef.value.muted) {\n audioRef.value.muted = false\n setVolume(0.5)\n }\n else {\n audioRef.value.muted = true\n setVolume(0)\n }\n}\n\n__expose({\n toggle,\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconPlayOne = _resolveComponent(\"IconPlayOne\")!\n const _component_IconPause = _resolveComponent(\"IconPause\")!\n const _component_IconVolumeMute = _resolveComponent(\"IconVolumeMute\")!\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n const _component_IconVolumeSmall = _resolveComponent(\"IconVolumeSmall\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"audio-player\",\n style: _normalizeStyle({ transform: `scale(${1 / _ctx.scale})` })\n }, [\n _createElementVNode(\"audio\", {\n class: \"audio\",\n ref_key: \"audioRef\",\n ref: audioRef,\n src: _ctx.src,\n autoplay: _ctx.autoplay,\n onDurationchange: _cache[0] || (_cache[0] = ($event: any) => (handleDurationchange())),\n onTimeupdate: _cache[1] || (_cache[1] = ($event: any) => (handleTimeupdate())),\n onPlay: _cache[2] || (_cache[2] = ($event: any) => (handlePlayed())),\n onEnded: _cache[3] || (_cache[3] = ($event: any) => (handleEnded())),\n onProgress: _cache[4] || (_cache[4] = ($event: any) => (handleProgress())),\n onError: _cache[5] || (_cache[5] = ($event: any) => (handleError()))\n }, null, 40, _hoisted_1),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", {\n class: \"icon play-icon\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (toggle()))\n }, [\n _createElementVNode(\"span\", _hoisted_4, [\n (paused.value)\n ? (_openBlock(), _createBlock(_component_IconPlayOne, { key: 0 }))\n : (_openBlock(), _createBlock(_component_IconPause, { key: 1 }))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", {\n class: \"icon volume-icon\",\n onClick: _cache[7] || (_cache[7] = ($event: any) => (toggleVolume()))\n }, [\n _createElementVNode(\"span\", _hoisted_6, [\n (volume.value === 0)\n ? (_openBlock(), _createBlock(_component_IconVolumeMute, { key: 0 }))\n : (volume.value === 1)\n ? (_openBlock(), _createBlock(_component_IconVolumeNotice, { key: 1 }))\n : (_openBlock(), _createBlock(_component_IconVolumeSmall, { key: 2 }))\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"volume-bar-wrap\",\n onMousedown: _cache[8] || (_cache[8] = ($event: any) => (handleMousedownVolumeBar())),\n onTouchstart: _cache[9] || (_cache[9] = ($event: any) => (handleMousedownVolumeBar())),\n onClick: _cache[10] || (_cache[10] = $event => handleClickVolumeBar($event))\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar\",\n ref_key: \"volumeBarRef\",\n ref: volumeBarRef\n }, [\n _createElementVNode(\"div\", {\n class: \"volume-bar-inner\",\n style: _normalizeStyle({ width: volumeBarWidth.value })\n }, _hoisted_8, 4)\n ], 512)\n ], 32)\n ])\n ]),\n _createElementVNode(\"span\", _hoisted_9, [\n _createElementVNode(\"span\", _hoisted_10, _toDisplayString(ptime.value), 1),\n _createTextVNode(\" / \"),\n _createElementVNode(\"span\", _hoisted_11, _toDisplayString(dtime.value), 1)\n ]),\n _createElementVNode(\"div\", {\n class: \"bar-wrap\",\n ref_key: \"playBarWrap\",\n ref: playBarWrap,\n onMousedown: _cache[11] || (_cache[11] = ($event: any) => (handleMousedownPlayBar())),\n onTouchstart: _cache[12] || (_cache[12] = ($event: any) => (handleMousedownPlayBar())),\n onMousemove: _cache[13] || (_cache[13] = $event => handleMousemovePlayBar($event)),\n onMouseenter: _cache[14] || (_cache[14] = ($event: any) => (playBarTimeVisible.value = true)),\n onMouseleave: _cache[15] || (_cache[15] = ($event: any) => (playBarTimeVisible.value = false))\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"bar-time\", { 'hidden': !playBarTimeVisible.value }]),\n style: _normalizeStyle({ left: playBarTimeLeft.value })\n }, _toDisplayString(playBarTime.value), 7),\n _createElementVNode(\"div\", _hoisted_12, [\n _createElementVNode(\"div\", {\n class: \"loaded\",\n style: _normalizeStyle({ width: loadedBarWidth.value })\n }, null, 4),\n _createElementVNode(\"div\", {\n class: \"played\",\n style: _normalizeStyle({ width: playedBarWidth.value })\n }, _hoisted_14, 4)\n ])\n ], 544)\n ])\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./AudioPlayer.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./AudioPlayer.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./AudioPlayer.vue?vue&type=style&index=0&id=44037f56&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-44037f56\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, normalizeStyle as _normalizeStyle, createVNode as _createVNode, unref as _unref, withModifiers as _withModifiers, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveDirective as _resolveDirective, createElementBlock as _createElementBlock, withDirectives as _withDirectives, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTAudioElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\n\nimport AudioPlayer from './AudioPlayer.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n selectElement: { type: Function },\n contextmenus: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { canvasScale, handleElementId } = storeToRefs(useMainStore())\nconst { viewportRatio } = storeToRefs(useSlidesStore())\n\nconst audioIconSize = computed(() => {\n return Math.min(props.elementInfo.width, props.elementInfo.height) + 'px'\n})\nconst audioPlayerPosition = computed(() => {\n const canvasWidth = VIEWPORT_SIZE\n const canvasHeight = VIEWPORT_SIZE * viewportRatio.value\n\n const audioWidth = 280 / canvasScale.value\n const audioHeight = 50 / canvasScale.value\n\n const elWidth = props.elementInfo.width\n const elHeight = props.elementInfo.height\n const elLeft = props.elementInfo.left\n const elTop = props.elementInfo.top\n\n let left = 0\n let top = elHeight\n \n if (elLeft + audioWidth >= canvasWidth) left = elWidth - audioWidth\n if (elTop + elHeight + audioHeight >= canvasHeight) top = -audioHeight\n\n return {\n left: left + 'px',\n top: top + 'px',\n }\n})\n\nconst handleSelectElement = (e: MouseEvent | TouchEvent) => {\n if (props.elementInfo.lock) return\n e.stopPropagation()\n\n props.selectElement(e, props.elementInfo)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"editable-element-audio\", { 'lock': _ctx.elementInfo.lock }]),\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"element-content\",\n onMousedown: _cache[1] || (_cache[1] = $event => handleSelectElement($event)),\n onTouchstart: _cache[2] || (_cache[2] = $event => handleSelectElement($event))\n }, [\n _createVNode(_component_IconVolumeNotice, {\n class: \"audio-icon\",\n style: _normalizeStyle({\n fontSize: audioIconSize.value,\n color: _ctx.elementInfo.color,\n })\n }, null, 8, [\"style\"]),\n (_unref(handleElementId) === _ctx.elementInfo.id)\n ? (_openBlock(), _createBlock(AudioPlayer, {\n key: 0,\n class: \"audio-player\",\n style: _normalizeStyle({ ...audioPlayerPosition.value }),\n src: _ctx.elementInfo.src,\n loop: _ctx.elementInfo.loop,\n scale: _unref(canvasScale),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers(() => {}, [\"stop\"]))\n }, null, 8, [\"style\", \"src\", \"loop\", \"scale\"]))\n : _createCommentVNode(\"\", true)\n ], 32)), [\n [_directive_contextmenu, _ctx.contextmenus]\n ])\n ], 4)\n ], 6))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=53bdc956&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-53bdc956\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"id\"]\n\nimport { computed } from 'vue'\nimport { ElementTypes, type PPTElement } from '@/types/slides'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\n\nimport useLockElement from '@/hooks/useLockElement'\nimport useDeleteElement from '@/hooks/useDeleteElement'\nimport useCombineElement from '@/hooks/useCombineElement'\nimport useOrderElement from '@/hooks/useOrderElement'\nimport useAlignElementToCanvas from '@/hooks/useAlignElementToCanvas'\nimport useCopyAndPasteElement from '@/hooks/useCopyAndPasteElement'\nimport useSelectAllElement from '@/hooks/useSelectAllElement'\n\nimport { ElementOrderCommands, ElementAlignCommands } from '@/types/edit'\n\nimport ImageElement from '@/views/components/element/ImageElement/index.vue'\nimport TextElement from '@/views/components/element/TextElement/index.vue'\nimport ShapeElement from '@/views/components/element/ShapeElement/index.vue'\nimport LineElement from '@/views/components/element/LineElement/index.vue'\nimport ChartElement from '@/views/components/element/ChartElement/index.vue'\nimport TableElement from '@/views/components/element/TableElement/index.vue'\nimport LatexElement from '@/views/components/element/LatexElement/index.vue'\nimport VideoElement from '@/views/components/element/VideoElement/index.vue'\nimport AudioElement from '@/views/components/element/AudioElement/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'EditableElement',\n props: {\n elementInfo: {},\n elementIndex: {},\n isMultiSelect: { type: Boolean },\n selectElement: { type: Function },\n openLinkDialog: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst currentElementComponent = computed(() => {\n const elementTypeMap = {\n [ElementTypes.IMAGE]: ImageElement,\n [ElementTypes.TEXT]: TextElement,\n [ElementTypes.SHAPE]: ShapeElement,\n [ElementTypes.LINE]: LineElement,\n [ElementTypes.CHART]: ChartElement,\n [ElementTypes.TABLE]: TableElement,\n [ElementTypes.LATEX]: LatexElement,\n [ElementTypes.VIDEO]: VideoElement,\n [ElementTypes.AUDIO]: AudioElement,\n }\n return elementTypeMap[props.elementInfo.type] || null\n})\n\nconst { orderElement } = useOrderElement()\nconst { alignElementToCanvas } = useAlignElementToCanvas()\nconst { combineElements, uncombineElements } = useCombineElement()\nconst { deleteElement } = useDeleteElement()\nconst { lockElement, unlockElement } = useLockElement()\nconst { copyElement, pasteElement, cutElement } = useCopyAndPasteElement()\nconst { selectAllElement } = useSelectAllElement()\n\nconst contextmenus = (): ContextmenuItem[] => {\n if (props.elementInfo.lock) {\n return [{\n text: '解锁', \n handler: () => unlockElement(props.elementInfo),\n }]\n }\n\n return [\n {\n text: '剪切',\n subText: 'Ctrl + X',\n handler: cutElement,\n },\n {\n text: '复制',\n subText: 'Ctrl + C',\n handler: copyElement,\n },\n {\n text: '粘贴',\n subText: 'Ctrl + V',\n handler: pasteElement,\n },\n { divider: true },\n {\n text: '水平居中',\n handler: () => alignElementToCanvas(ElementAlignCommands.HORIZONTAL),\n children: [\n { text: '水平垂直居中', handler: () => alignElementToCanvas(ElementAlignCommands.CENTER), },\n { text: '水平居中', handler: () => alignElementToCanvas(ElementAlignCommands.HORIZONTAL) },\n { text: '左对齐', handler: () => alignElementToCanvas(ElementAlignCommands.LEFT) },\n { text: '右对齐', handler: () => alignElementToCanvas(ElementAlignCommands.RIGHT) },\n ],\n },\n {\n text: '垂直居中',\n handler: () => alignElementToCanvas(ElementAlignCommands.VERTICAL),\n children: [\n { text: '水平垂直居中', handler: () => alignElementToCanvas(ElementAlignCommands.CENTER) },\n { text: '垂直居中', handler: () => alignElementToCanvas(ElementAlignCommands.VERTICAL) },\n { text: '顶部对齐', handler: () => alignElementToCanvas(ElementAlignCommands.TOP) },\n { text: '底部对齐', handler: () => alignElementToCanvas(ElementAlignCommands.BOTTOM) },\n ],\n },\n { divider: true },\n {\n text: '置于顶层',\n disable: props.isMultiSelect && !props.elementInfo.groupId,\n handler: () => orderElement(props.elementInfo, ElementOrderCommands.TOP),\n children: [\n { text: '置于顶层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.TOP) },\n { text: '上移一层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.UP) },\n ],\n },\n {\n text: '置于底层',\n disable: props.isMultiSelect && !props.elementInfo.groupId,\n handler: () => orderElement(props.elementInfo, ElementOrderCommands.BOTTOM),\n children: [\n { text: '置于底层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.BOTTOM) },\n { text: '下移一层', handler: () => orderElement(props.elementInfo, ElementOrderCommands.DOWN) },\n ],\n },\n { divider: true },\n {\n text: '设置链接',\n handler: props.openLinkDialog,\n },\n {\n text: props.elementInfo.groupId ? '取消组合' : '组合',\n subText: 'Ctrl + G',\n handler: props.elementInfo.groupId ? uncombineElements : combineElements,\n hide: !props.isMultiSelect,\n },\n {\n text: '全选',\n subText: 'Ctrl + A',\n handler: selectAllElement,\n },\n {\n text: '锁定',\n subText: 'Ctrl + L',\n handler: lockElement,\n },\n {\n text: '删除',\n subText: 'Delete',\n handler: deleteElement,\n },\n ]\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"editable-element\",\n ref: \"elementRef\",\n id: `editable-element-${_ctx.elementInfo.id}`,\n style: _normalizeStyle({\n zIndex: _ctx.elementIndex,\n })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(currentElementComponent.value), {\n elementInfo: _ctx.elementInfo,\n selectElement: _ctx.selectElement,\n contextmenus: contextmenus\n }, null, 8, [\"elementInfo\", \"selectElement\"]))\n ], 12, _hoisted_1))\n}\n}\n\n})","\n\n","import script from \"./EditableElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./EditableElement.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MouseSelection',\n props: {\n top: {},\n left: {},\n width: {},\n height: {},\n quadrant: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(`mouse-selection quadrant-${_ctx.quadrant}`),\n style: _normalizeStyle({\n top: _ctx.top + 'px',\n left: _ctx.left + 'px',\n width: _ctx.width + 'px',\n height: _ctx.height + 'px',\n })\n }, null, 6))\n}\n}\n\n})","import script from \"./MouseSelection.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MouseSelection.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MouseSelection.vue?vue&type=style&index=0&id=2c5e1d42&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2c5e1d42\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-05484a24\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"grid-lines\" }\nconst _hoisted_2 = [\"d\", \"stroke\"]\n\nimport { computed } from 'vue'\nimport tinycolor from 'tinycolor2'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport type { SlideBackground } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'GridLines',\n setup(__props) {\n\nconst { canvasScale, gridLineSize } = storeToRefs(useMainStore())\nconst { currentSlide, viewportRatio } = storeToRefs(useSlidesStore())\n\nconst background = computed(() => currentSlide.value?.background)\n\n// 计算网格线的颜色,避免与背景的颜色太接近\nconst gridColor = computed(() => {\n const bgColor = background.value?.color || '#fff'\n const colorList = ['#000', '#fff']\n return tinycolor.mostReadable(bgColor, colorList, { includeFallbackColors: true }).setAlpha(.5).toRgbString()\n})\n\n// 网格路径\nconst path = computed(() => {\n const maxX = VIEWPORT_SIZE\n const maxY = VIEWPORT_SIZE * viewportRatio.value\n\n let p = ''\n for (let i = 0; i <= Math.floor(maxY / gridLineSize.value); i++) {\n p += `M0 ${i * gridLineSize.value} L${maxX} ${i * gridLineSize.value} `\n }\n for (let i = 0; i <= Math.floor(maxX / gridLineSize.value); i++) {\n p += `M${i * gridLineSize.value} 0 L${i * gridLineSize.value} ${maxY} `\n }\n return p\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, [\n _createElementVNode(\"path\", {\n style: _normalizeStyle({\n transform: `scale(${_unref(canvasScale)})`,\n }),\n d: path.value,\n fill: \"none\",\n stroke: gridColor.value,\n \"stroke-width\": \"0.3\",\n \"stroke-dasharray\": \"5\"\n }, null, 12, _hoisted_2)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./GridLines.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./GridLines.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./GridLines.vue?vue&type=style&index=0&id=05484a24&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-05484a24\"]])\n\nexport default __exports__","import { type Ref, computed } from 'vue'\nimport type { SlideBackground } from '@/types/slides'\n\n// 将页面背景数据转换为css样式\nexport default (background: Ref) => {\n const backgroundStyle = computed(() => {\n if (!background.value) return { backgroundColor: '#fff' }\n\n const {\n type,\n color,\n image,\n imageSize,\n gradientColor,\n gradientRotate,\n gradientType,\n } = background.value\n\n // 纯色背景\n if (type === 'solid') return { backgroundColor: color }\n\n // 背景图模式\n // 包括:背景图、背景大小,是否重复\n else if (type === 'image') {\n if (!image) return { backgroundColor: '#fff' }\n if (imageSize === 'repeat') {\n return {\n backgroundImage: `url(${image}`,\n backgroundRepeat: 'repeat',\n backgroundSize: 'contain',\n }\n }\n return {\n backgroundImage: `url(${image}`,\n backgroundRepeat: 'no-repeat',\n backgroundSize: imageSize || 'cover',\n }\n }\n\n // 渐变色背景\n else if (type === 'gradient') {\n const rotate = gradientRotate || 0\n const color1 = gradientColor ? gradientColor[0] : '#fff'\n const color2 = gradientColor ? gradientColor[1] : '#fff'\n \n if (gradientType === 'radial') return { backgroundImage: `radial-gradient(${color1}, ${color2}` }\n return { backgroundImage: `linear-gradient(${rotate}deg, ${color1}, ${color2}` }\n }\n\n return { backgroundColor: '#fff' }\n })\n\n return {\n backgroundStyle,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { SlideBackground } from '@/types/slides'\nimport GridLines from './GridLines.vue'\nimport useSlideBackgroundStyle from '@/hooks/useSlideBackgroundStyle'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ViewportBackground',\n setup(__props) {\n\nconst { gridLineSize } = storeToRefs(useMainStore())\nconst { currentSlide } = storeToRefs(useSlidesStore())\nconst background = computed(() => currentSlide.value?.background)\n\nconst { backgroundStyle } = useSlideBackgroundStyle(background)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"viewport-background\",\n style: _normalizeStyle(_unref(backgroundStyle))\n }, [\n (_unref(gridLineSize))\n ? (_openBlock(), _createBlock(GridLines, { key: 0 }))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./ViewportBackground.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ViewportBackground.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ViewportBackground.vue?vue&type=style&index=0&id=b6b18502&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-b6b18502\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport type { AlignmentLineAxis } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'AlignmentLine',\n props: {\n type: {},\n axis: {},\n length: {},\n canvasScale: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\n// 吸附对齐线的位置\nconst left = computed(() => props.axis.x * props.canvasScale + 'px')\nconst top = computed(() => props.axis.y * props.canvasScale + 'px')\n\n// 吸附对齐线的长度\nconst sizeStyle = computed(() => {\n if (props.type === 'vertical') return { height: props.length * props.canvasScale + 'px' }\n return { width: props.length * props.canvasScale + 'px' }\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"alignment-line\",\n style: _normalizeStyle({ left: left.value, top: top.value })\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass(['line', _ctx.type]),\n style: _normalizeStyle(sizeStyle.value)\n }, null, 6)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./AlignmentLine.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./AlignmentLine.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./AlignmentLine.vue?vue&type=style&index=0&id=ed6fc00a&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-ed6fc00a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2963c74c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"ruler\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\n\ninterface ViewportStyles {\n top: number\n left: number\n width: number\n height: number\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Ruler',\n props: {\n viewportStyles: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst markerSize = computed(() => {\n return props.viewportStyles.width * canvasScale.value / 10\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: \"h\",\n style: _normalizeStyle({\n width: _ctx.viewportStyles.width * _unref(canvasScale) + 'px',\n left: _ctx.viewportStyles.left + 'px',\n })\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(20, (marker) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass([\"ruler-marker-100\", { 'hide': markerSize.value < 36, 'omit': markerSize.value < 72 }]),\n key: `marker-100-${marker}`\n }, [\n _createElementVNode(\"span\", null, _toDisplayString(marker), 1)\n ], 2)\n }), 64))\n ], 4),\n _createElementVNode(\"div\", {\n class: \"v\",\n style: _normalizeStyle({\n height: _ctx.viewportStyles.height * _unref(canvasScale) + 'px',\n top: _ctx.viewportStyles.top + 'px',\n })\n }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(20, (marker) => {\n return _createElementVNode(\"div\", {\n class: _normalizeClass([\"ruler-marker-100\", { 'hide': markerSize.value < 36, 'omit': markerSize.value < 72 }]),\n key: marker,\n style: _normalizeStyle({ height: markerSize.value + 'px' })\n }, [\n _createElementVNode(\"span\", null, _toDisplayString(marker), 1)\n ], 6)\n }), 64))\n ], 4)\n ]))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./Ruler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Ruler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Ruler.vue?vue&type=style&index=0&id=2963c74c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2963c74c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-85b0bbaa\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\"]\n\nimport { computed, onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useKeyboardStore } from '@/store'\nimport type { CreateElementSelectionData } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ElementCreateSelection',\n emits: [\"created\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\n\nconst mainStore = useMainStore()\nconst { creatingElement } = storeToRefs(mainStore)\nconst { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\nconst start = ref<[number, number]>()\nconst end = ref<[number, number]>()\n\nconst selectionRef = ref()\nconst offset = ref({\n x: 0,\n y: 0,\n})\nonMounted(() => {\n if (!selectionRef.value) return\n const { x, y } = selectionRef.value.getBoundingClientRect()\n offset.value = { x, y }\n})\n\n// 鼠标拖动创建元素生成位置大小\n// 获取范围的起始位置和终点位置\nconst createSelection = (e: MouseEvent) => {\n let isMouseDown = true\n\n const startPageX = e.pageX\n const startPageY = e.pageY\n start.value = [startPageX, startPageY]\n\n document.onmousemove = e => {\n if (!creatingElement.value || !isMouseDown) return\n\n let currentPageX = e.pageX\n let currentPageY = e.pageY\n\n // 按住Ctrl键或者Shift键时:\n // 对于非线条元素需要锁定宽高比例,对于线条元素需要锁定水平或垂直方向\n if (ctrlOrShiftKeyActive.value) {\n const moveX = currentPageX - startPageX\n const moveY = currentPageY - startPageY\n\n // 水平和垂直方向的拖动距离,后面以拖动距离较大的方向为基础计算另一方向的数据\n const absX = Math.abs(moveX)\n const absY = Math.abs(moveY)\n\n if (creatingElement.value.type === 'shape') {\n\n // 判断是否为反向拖动:从左上到右下为正向操作,此外所有情况都是反向操作\n const isOpposite = (moveY > 0 && moveX < 0) || (moveY < 0 && moveX > 0)\n\n if (absX > absY) {\n currentPageY = isOpposite ? startPageY - moveX : startPageY + moveX\n }\n else {\n currentPageX = isOpposite ? startPageX - moveY : startPageX + moveY\n }\n }\n\n else if (creatingElement.value.type === 'line') {\n if (absX > absY) currentPageY = startPageY\n else currentPageX = startPageX\n }\n }\n\n end.value = [currentPageX, currentPageY]\n }\n\n document.onmouseup = e => {\n document.onmousemove = null\n document.onmouseup = null\n\n if (e.button === 2) {\n setTimeout(() => mainStore.setCreatingElement(null), 0)\n return\n }\n\n isMouseDown = false\n\n const endPageX = e.pageX\n const endPageY = e.pageY\n\n const minSize = 30\n\n if (\n creatingElement.value?.type === 'line' &&\n (Math.abs(endPageX - startPageX) >= minSize || Math.abs(endPageY - startPageY) >= minSize)\n ) {\n emit('created', {\n start: start.value!,\n end: end.value!,\n })\n }\n else if (\n creatingElement.value?.type !== 'line' &&\n (Math.abs(endPageX - startPageX) >= minSize && Math.abs(endPageY - startPageY) >= minSize)\n ) {\n emit('created', {\n start: start.value!,\n end: end.value!,\n })\n }\n else {\n const defaultSize = 200\n const minX = Math.min(endPageX, startPageX)\n const minY = Math.min(endPageY, startPageY)\n const maxX = Math.max(endPageX, startPageX)\n const maxY = Math.max(endPageY, startPageY)\n const offsetX = maxX - minX >= minSize ? maxX - minX : defaultSize\n const offsetY = maxY - minY >= minSize ? maxY - minY : defaultSize\n emit('created', {\n start: [minX, minY],\n end: [minX + offsetX, minY + offsetY],\n })\n }\n }\n}\n\n// 绘制线条的路径相关数据(仅当绘制元素类型为线条时使用)\nconst lineData = computed(() => {\n if (!start.value || !end.value) return null\n if (!creatingElement.value || creatingElement.value.type !== 'line') return null\n\n const [_startX, _startY] = start.value\n const [_endX, _endY] = end.value\n const minX = Math.min(_startX, _endX)\n const maxX = Math.max(_startX, _endX)\n const minY = Math.min(_startY, _endY)\n const maxY = Math.max(_startY, _endY)\n\n const svgWidth = maxX - minX >= 24 ? maxX - minX : 24\n const svgHeight = maxY - minY >= 24 ? maxY - minY : 24\n\n const startX = _startX === minX ? 0 : maxX - minX\n const startY = _startY === minY ? 0 : maxY - minY\n const endX = _endX === minX ? 0 : maxX - minX\n const endY = _endY === minY ? 0 : maxY - minY\n\n const path = `M${startX}, ${startY} L${endX}, ${endY}`\n\n return {\n svgWidth,\n svgHeight,\n startX,\n startY,\n endX,\n endY,\n path,\n }\n})\n\n// 根据生成范围的起始位置和终点位置,计算元素创建时的位置和大小\nconst position = computed(() => {\n if (!start.value || !end.value) return {}\n\n const [startX, startY] = start.value\n const [endX, endY] = end.value\n const minX = Math.min(startX, endX)\n const maxX = Math.max(startX, endX)\n const minY = Math.min(startY, endY)\n const maxY = Math.max(startY, endY)\n\n const width = maxX - minX\n const height = maxY - minY\n\n return {\n left: minX - offset.value.x + 'px',\n top: minY - offset.value.y + 'px',\n width: width + 'px',\n height: height + 'px',\n }\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"element-create-selection\",\n ref_key: \"selectionRef\",\n ref: selectionRef,\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => createSelection($event), [\"stop\"])),\n onContextmenu: _cache[1] || (_cache[1] = _withModifiers(() => {}, [\"stop\",\"prevent\"]))\n }, [\n (start.value && end.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass(['selection', _unref(creatingElement)?.type]),\n style: _normalizeStyle(position.value)\n }, [\n (_unref(creatingElement)?.type === 'line' && lineData.value)\n ? (_openBlock(), _createElementBlock(\"svg\", {\n key: 0,\n overflow: \"visible\",\n width: lineData.value.svgWidth,\n height: lineData.value.svgHeight\n }, [\n _createElementVNode(\"path\", {\n d: lineData.value.path,\n stroke: \"#d14424\",\n fill: \"none\",\n \"stroke-width\": \"2\"\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n ], 544))\n}\n}\n\n})","\n\n\n\n","import script from \"./ElementCreateSelection.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ElementCreateSelection.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ElementCreateSelection.vue?vue&type=style&index=0&id=85b0bbaa&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-85b0bbaa\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-224f36be\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { overflow: \"visible\" }\nconst _hoisted_2 = [\"d\", \"fill\"]\n\nimport { computed, onMounted, onUnmounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useKeyboardStore, useMainStore } from '@/store'\nimport type { CreateCustomShapeData } from '@/types/edit'\nimport { KEYS } from '@/configs/hotkey'\nimport message from '@/utils/message'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ShapeCreateCanvas',\n emits: [\"created\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\nconst mainStore = useMainStore()\nconst { ctrlOrShiftKeyActive } = storeToRefs(useKeyboardStore())\n\nconst shapeCanvasRef = ref()\nconst offset = ref({\n x: 0,\n y: 0,\n})\nonMounted(() => {\n if (!shapeCanvasRef.value) return\n const { x, y } = shapeCanvasRef.value.getBoundingClientRect()\n offset.value = { x, y }\n})\n\nconst mousePosition = ref<[number, number]>()\nconst points = ref<[number, number][]>([])\nconst closed = ref(false)\n\nconst getPoint = (e: MouseEvent) => {\n let pageX = e.pageX - offset.value.x\n let pageY = e.pageY - offset.value.y\n\n if (ctrlOrShiftKeyActive.value && points.value.length) {\n const [lastPointX, lastPointY] = points.value[points.value.length - 1]\n if (Math.abs(lastPointX - pageX) - Math.abs(lastPointY - pageY) > 0) {\n pageY = lastPointY\n }\n else pageX = lastPointX\n }\n return { pageX, pageY }\n}\n\nconst updateMousePosition = (e: MouseEvent) => {\n const { pageX, pageY } = getPoint(e)\n mousePosition.value = [pageX, pageY]\n\n if (points.value.length >= 2) {\n const [firstPointX, firstPointY] = points.value[0]\n if (Math.abs(firstPointX - pageX) < 5 && Math.abs(firstPointY - pageY) < 5) {\n closed.value = true\n }\n else closed.value = false\n }\n else closed.value = false\n}\n\nconst path = computed(() => {\n let d = ''\n for (let i = 0; i < points.value.length; i++) {\n const point = points.value[i]\n if (i === 0) d += `M ${point[0]} ${point[1]} `\n else d += `L ${point[0]} ${point[1]} `\n }\n if (points.value.length && mousePosition.value) {\n d += `L ${mousePosition.value[0]} ${mousePosition.value[1]}`\n }\n return d\n})\n\nconst addPoint = (e: MouseEvent) => {\n const { pageX, pageY } = getPoint(e)\n\n if (closed.value) {\n const xList = points.value.map(item => item[0])\n const yList = points.value.map(item => item[1])\n const minX = Math.min(...xList)\n const minY = Math.min(...yList)\n const maxX = Math.max(...xList)\n const maxY = Math.max(...yList)\n\n const formatedPoints = points.value.map(point => {\n return [point[0] - minX, point[1] - minY]\n })\n let path = ''\n for (let i = 0; i < formatedPoints.length; i++) {\n const point = formatedPoints[i]\n if (i === 0) path += `M ${point[0]} ${point[1]} `\n else path += `L ${point[0]} ${point[1]} `\n }\n path += 'Z'\n \n emit('created', {\n start: [minX + offset.value.x, minY + offset.value.y],\n end: [maxX + offset.value.x, maxY + offset.value.y],\n path,\n viewBox: [maxX - minX, maxY - minY],\n })\n }\n else points.value.push([pageX, pageY])\n}\n\nconst close = () => {\n mainStore.setCreatingCustomShapeState(false)\n}\n\nconst keydownListener = (e: KeyboardEvent) => {\n const key = e.key.toUpperCase()\n if (key === KEYS.ESC) close()\n}\nonMounted(() => {\n message.success('点击开始绘制任意多边形,首尾闭合完成绘制,按 ESC 键或鼠标右键关闭')\n document.addEventListener('keydown', keydownListener)\n})\nonUnmounted(() => document.removeEventListener('keydown', keydownListener))\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"shape-create-canvas\",\n ref_key: \"shapeCanvasRef\",\n ref: shapeCanvasRef,\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => addPoint($event), [\"stop\"])),\n onMousemove: _cache[1] || (_cache[1] = $event => updateMousePosition($event)),\n onContextmenu: _cache[2] || (_cache[2] = _withModifiers(($event: any) => (close()), [\"stop\",\"prevent\"]))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, [\n _createElementVNode(\"path\", {\n d: path.value,\n stroke: \"#d14424\",\n fill: closed.value ? 'rgba(226, 83, 77, 0.15)' : 'none',\n \"stroke-width\": \"2\"\n }, null, 8, _hoisted_2)\n ]))\n ], 544))\n}\n}\n\n})","\n\n\n\n","import script from \"./ShapeCreateCanvas.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapeCreateCanvas.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapeCreateCanvas.vue?vue&type=style&index=0&id=224f36be&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-224f36be\"]])\n\nexport default __exports__","import { computed, type Ref } from 'vue'\nimport { OperateResizeHandlers, OperateBorderLines } from '@/types/edit'\n\nexport default (width: Ref, height: Ref) => {\n // 元素缩放点\n const resizeHandlers = computed(() => {\n return [\n { direction: OperateResizeHandlers.LEFT_TOP, style: {} },\n { direction: OperateResizeHandlers.TOP, style: {left: width.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.RIGHT_TOP, style: {left: width.value + 'px'} },\n { direction: OperateResizeHandlers.LEFT, style: {top: height.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.RIGHT, style: {left: width.value + 'px', top: height.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.LEFT_BOTTOM, style: {top: height.value + 'px'} },\n { direction: OperateResizeHandlers.BOTTOM, style: {left: width.value / 2 + 'px', top: height.value + 'px'} },\n { direction: OperateResizeHandlers.RIGHT_BOTTOM, style: {left: width.value + 'px', top: height.value + 'px'} },\n ]\n })\n\n // 文本元素缩放点\n const textElementResizeHandlers = computed(() => {\n return [\n { direction: OperateResizeHandlers.LEFT, style: {top: height.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.RIGHT, style: {left: width.value + 'px', top: height.value / 2 + 'px'} },\n ]\n })\n const verticalTextElementResizeHandlers = computed(() => {\n return [\n { direction: OperateResizeHandlers.TOP, style: {left: width.value / 2 + 'px'} },\n { direction: OperateResizeHandlers.BOTTOM, style: {left: width.value / 2 + 'px', top: height.value + 'px'} },\n ]\n })\n\n // 元素选中边框线\n const borderLines = computed(() => {\n return [\n { type: OperateBorderLines.T, style: {width: width.value + 'px'} },\n { type: OperateBorderLines.B, style: {top: height.value + 'px', width: width.value + 'px'} },\n { type: OperateBorderLines.L, style: {height: height.value + 'px'} },\n { type: OperateBorderLines.R, style: {left: width.value + 'px', height: height.value + 'px'} },\n ]\n })\n\n return {\n resizeHandlers,\n textElementResizeHandlers,\n verticalTextElementResizeHandlers,\n borderLines,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport type { OperateResizeHandlers } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ResizeHandler',\n props: {\n type: {},\n rotate: { default: 0 }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst rotateClassName = computed(() => {\n const prefix = 'rotate-'\n const rotate = props.rotate\n if (rotate > -22.5 && rotate <= 22.5) return prefix + 0\n else if (rotate > 22.5 && rotate <= 67.5) return prefix + 45\n else if (rotate > 67.5 && rotate <= 112.5) return prefix + 90\n else if (rotate > 112.5 && rotate <= 157.5) return prefix + 135\n else if (rotate > 157.5 || rotate <= -157.5) return prefix + 0\n else if (rotate > -157.5 && rotate <= -112.5) return prefix + 45\n else if (rotate > -112.5 && rotate <= -67.5) return prefix + 90\n else if (rotate > -67.5 && rotate <= -22.5) return prefix + 135\n return prefix + 0\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(['resize-handler', rotateClassName.value, _ctx.type])\n }, null, 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./ResizeHandler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ResizeHandler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ResizeHandler.vue?vue&type=style&index=0&id=1e66197f&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1e66197f\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport type { OperateBorderLines } from '@/types/edit'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BorderLine',\n props: {\n type: {},\n isWide: { type: Boolean, default: false }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(['border-line', _ctx.type, { 'wide': _ctx.isWide }])\n }, null, 2))\n}\n}\n\n})","import script from \"./BorderLine.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BorderLine.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BorderLine.vue?vue&type=style&index=0&id=8346cf6c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8346cf6c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { computed, ref, watchEffect } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport { getElementListRange } from '@/utils/element'\nimport type { OperateResizeHandlers, MultiSelectRange } from '@/types/edit'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MultiSelectOperate',\n props: {\n elementList: {},\n scaleMultiElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { activeElementIdList, canvasScale } = storeToRefs(useMainStore())\n\nconst localActiveElementList = computed(() => props.elementList.filter(el => activeElementIdList.value.includes(el.id)))\n\nconst range = ref({\n minX: 0,\n maxX: 0,\n minY: 0,\n maxY: 0,\n})\n\n// 根据多选元素整体在画布中的范围,计算边框线和缩放点的位置信息\nconst width = computed(() => (range.value.maxX - range.value.minX) * canvasScale.value)\nconst height = computed(() => (range.value.maxY - range.value.minY) * canvasScale.value)\nconst { resizeHandlers, borderLines } = useCommonOperate(width, height)\n\n// 计算多选元素整体在画布中的范围\nconst setRange = () => {\n const { minX, maxX, minY, maxY } = getElementListRange(localActiveElementList.value)\n range.value = { minX, maxX, minY, maxY }\n}\nwatchEffect(setRange)\n\n// 禁用多选状态下缩放:仅未旋转的图片和形状可以在多选状态下缩放\nconst disableResize = computed(() => {\n return localActiveElementList.value.some(item => {\n if (\n (item.type === 'image' || item.type === 'shape') && \n !item.rotate\n ) return false\n return true\n })\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"multi-select-operate\",\n style: _normalizeStyle({\n left: range.value.minX * _unref(canvasScale) + 'px',\n top: range.value.minY * _unref(canvasScale) + 'px',\n })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (!disableResize.value)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n key: point.direction,\n type: point.direction,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers(($event: any) => (_ctx.scaleMultiElement($event, range.value, point.direction)), [\"stop\"])\n }, null, 8, [\"type\", \"style\", \"onMousedown\"]))\n }), 128))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./MultiSelectOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MultiSelectOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MultiSelectOperate.vue?vue&type=style&index=0&id=97dc9b9a&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-97dc9b9a\"]])\n\nexport default __exports__","\n\n\n\n","import { render } from \"./RotateHandler.vue?vue&type=template&id=b99d8dae&scoped=true\"\nconst script = {}\n\nimport \"./RotateHandler.vue?vue&type=style&index=0&id=b99d8dae&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-b99d8dae\"]])\n\nexport default __exports__","\r\n\r\n\r\n\r\n\r\n\r\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nimport { computed } from 'vue'\r\nimport { storeToRefs } from 'pinia'\r\nimport { useMainStore } from '@/store'\r\nimport type { PPTImageElement } from '@/types/slides'\r\nimport type { OperateResizeHandlers } from '@/types/edit'\r\nimport useCommonOperate from '../hooks/useCommonOperate'\r\n\r\nimport RotateHandler from './RotateHandler.vue'\r\nimport ResizeHandler from './ResizeHandler.vue'\r\nimport BorderLine from './BorderLine.vue'\r\n\r\n\r\nconst __default__ = {\r\n inheritAttrs: false,\r\n}\r\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'ImageElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\r\nconst props = __props\r\n\r\nconst { canvasScale, clipingImageElementId } = storeToRefs(useMainStore())\r\n\r\nconst isCliping = computed(() => clipingImageElementId.value === props.elementInfo.id)\r\n\r\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\r\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\r\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"image-element-operate\", { 'cliping': isCliping.value }])\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ], 2))\n}\n}\n\n})","import script from \"./ImageElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ImageElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ImageElementOperate.vue?vue&type=style&index=0&id=7bcad5a9&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7bcad5a9\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"text-element-operate\" }\n\nimport { computed } from 'vue'\r\nimport { storeToRefs } from 'pinia'\r\nimport { useMainStore } from '@/store'\r\nimport type { PPTTextElement } from '@/types/slides'\r\nimport type { OperateResizeHandlers } from '@/types/edit'\r\nimport useCommonOperate from '../hooks/useCommonOperate'\r\n\r\nimport RotateHandler from './RotateHandler.vue'\r\nimport ResizeHandler from './ResizeHandler.vue'\r\nimport BorderLine from './BorderLine.vue'\r\n\r\n\r\nconst __default__ = {\r\n inheritAttrs: false,\r\n}\r\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'TextElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\r\nconst props = __props\r\n\r\nconst { canvasScale } = storeToRefs(useMainStore())\r\n\r\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\r\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\r\n\r\nconst { textElementResizeHandlers, verticalTextElementResizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\r\nconst resizeHandlers = computed(() => props.elementInfo.vertical ? verticalTextElementResizeHandlers.value : textElementResizeHandlers.value)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(resizeHandlers.value, (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\r\n\r\n\r\n\r\n","import script from \"./TextElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TextElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-52dcdbf8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"shape-element-operate\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTShapeElement } from '@/types/slides'\nimport type { OperateResizeHandlers } from '@/types/edit'\nimport { SHAPE_PATH_FORMULAS } from '@/configs/shapes'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport RotateHandler from './RotateHandler.vue'\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'ShapeElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function },\n moveShapeKeypoint: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\n\nconst keypointStyle = computed(() => {\n if (!props.elementInfo.pathFormula || props.elementInfo.keypoint === undefined) return {}\n\n const pathFormula = SHAPE_PATH_FORMULAS[props.elementInfo.pathFormula]\n if ('editable' in pathFormula) {\n const keypointPos = pathFormula.getBaseSize(props.elementInfo.width, props.elementInfo.height) * props.elementInfo.keypoint\n if (pathFormula.relative === 'left') return { left: keypointPos * canvasScale.value + 'px' }\n if (pathFormula.relative === 'right') return { left: (props.elementInfo.width - keypointPos) * canvasScale.value + 'px' }\n if (pathFormula.relative === 'center') return { left: (props.elementInfo.width - keypointPos) / 2 * canvasScale.value + 'px' }\n if (pathFormula.relative === 'top') return { top: keypointPos * canvasScale.value + 'px' }\n if (pathFormula.relative === 'bottom') return { top: (props.elementInfo.height - keypointPos) * canvasScale.value + 'px' }\n }\n return {}\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"]),\n (_ctx.elementInfo.keypoint !== undefined)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"operate-keypoint-handler\",\n style: _normalizeStyle(keypointStyle.value),\n onMousedown: _cache[1] || (_cache[1] = _withModifiers($event => _ctx.moveShapeKeypoint($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 36))\n : _createCommentVNode(\"\", true)\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./ShapeElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapeElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapeElementOperate.vue?vue&type=style&index=0&id=52dcdbf8&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-52dcdbf8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers, normalizeStyle as _normalizeStyle, createBlock as _createBlock, unref as _unref, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3aa5cc44\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"line-element-operate\" }\nconst _hoisted_2 = [\"width\", \"height\", \"stroke\"]\nconst _hoisted_3 = { key: 0 }\nconst _hoisted_4 = [\"x1\", \"y1\", \"x2\", \"y2\"]\nconst _hoisted_5 = [\"x1\", \"y1\", \"x2\", \"y2\"]\nconst _hoisted_6 = [\"x1\", \"y1\", \"x2\", \"y2\"]\nconst _hoisted_7 = [\"x1\", \"y1\", \"x2\", \"y2\"]\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTLineElement } from '@/types/slides'\nimport { OperateLineHandlers } from '@/types/edit'\n\nimport ResizeHandler from './ResizeHandler.vue'\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'LineElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n dragLineElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst svgWidth = computed(() => Math.max(props.elementInfo.start[0], props.elementInfo.end[0]))\nconst svgHeight = computed(() => Math.max(props.elementInfo.start[1], props.elementInfo.end[1]))\n\nconst resizeHandlers = computed(() => {\n const handlers = [\n {\n handler: OperateLineHandlers.START,\n style: {\n left: props.elementInfo.start[0] * canvasScale.value + 'px',\n top: props.elementInfo.start[1] * canvasScale.value + 'px',\n }\n },\n {\n handler: OperateLineHandlers.END,\n style: {\n left: props.elementInfo.end[0] * canvasScale.value + 'px',\n top: props.elementInfo.end[1] * canvasScale.value + 'px',\n }\n },\n ]\n\n if (props.elementInfo.curve || props.elementInfo.broken) {\n const ctrlHandler = (props.elementInfo.curve || props.elementInfo.broken) as [number, number]\n\n handlers.push({\n handler: OperateLineHandlers.C,\n style: {\n left: ctrlHandler[0] * canvasScale.value + 'px',\n top: ctrlHandler[1] * canvasScale.value + 'px',\n }\n })\n }\n else if (props.elementInfo.cubic) {\n const [ctrlHandler1, ctrlHandler2] = props.elementInfo.cubic\n handlers.push({\n handler: OperateLineHandlers.C1,\n style: {\n left: ctrlHandler1[0] * canvasScale.value + 'px',\n top: ctrlHandler1[1] * canvasScale.value + 'px',\n }\n })\n handlers.push({\n handler: OperateLineHandlers.C2,\n style: {\n left: ctrlHandler2[0] * canvasScale.value + 'px',\n top: ctrlHandler2[1] * canvasScale.value + 'px',\n }\n })\n }\n\n return handlers\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(resizeHandlers.value, (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.handler,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.dragLineElement($event, _ctx.elementInfo, point.handler), [\"stop\"])\n }, null, 8, [\"style\", \"onMousedown\"]))\n }), 128)),\n (_openBlock(), _createElementBlock(\"svg\", {\n width: svgWidth.value || 1,\n height: svgHeight.value || 1,\n stroke: _ctx.elementInfo.color,\n overflow: \"visible\",\n style: _normalizeStyle({ transform: `scale(${_unref(canvasScale)})` })\n }, [\n (_ctx.elementInfo.curve)\n ? (_openBlock(), _createElementBlock(\"g\", _hoisted_3, [\n _createElementVNode(\"line\", {\n class: \"anchor-line\",\n x1: _ctx.elementInfo.start[0],\n y1: _ctx.elementInfo.start[1],\n x2: _ctx.elementInfo.curve[0],\n y2: _ctx.elementInfo.curve[1]\n }, null, 8, _hoisted_4),\n _createElementVNode(\"line\", {\n class: \"anchor-line\",\n x1: _ctx.elementInfo.end[0],\n y1: _ctx.elementInfo.end[1],\n x2: _ctx.elementInfo.curve[0],\n y2: _ctx.elementInfo.curve[1]\n }, null, 8, _hoisted_5)\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.elementInfo.cubic)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 1 }, _renderList(_ctx.elementInfo.cubic, (item, index) => {\n return (_openBlock(), _createElementBlock(\"g\", { key: index }, [\n (index === 0)\n ? (_openBlock(), _createElementBlock(\"line\", {\n key: 0,\n class: \"anchor-line\",\n x1: _ctx.elementInfo.start[0],\n y1: _ctx.elementInfo.start[1],\n x2: item[0],\n y2: item[1]\n }, null, 8, _hoisted_6))\n : _createCommentVNode(\"\", true),\n (index === 1)\n ? (_openBlock(), _createElementBlock(\"line\", {\n key: 1,\n class: \"anchor-line\",\n x1: _ctx.elementInfo.end[0],\n y1: _ctx.elementInfo.end[1],\n x2: item[0],\n y2: item[1]\n }, null, 8, _hoisted_7))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n : _createCommentVNode(\"\", true)\n ], 12, _hoisted_2))\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n\n\n","import script from \"./LineElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LineElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LineElementOperate.vue?vue&type=style&index=0&id=3aa5cc44&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3aa5cc44\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createVNode as _createVNode, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"table-element-operate\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTTableElement } from '@/types/slides'\nimport type { OperateResizeHandlers } from '@/types/edit'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport RotateHandler from './RotateHandler.vue'\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'TableElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst outlineWidth = computed(() => props.elementInfo.outline.width || 1)\n\nconst scaleWidth = computed(() => (props.elementInfo.width + outlineWidth.value) * canvasScale.value)\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\n\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n _createVNode(RotateHandler, {\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./TableElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TableElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createBlock as _createBlock, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"common-element-operate\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore } from '@/store'\nimport type { PPTVideoElement, PPTLatexElement, PPTAudioElement, PPTChartElement } from '@/types/slides'\nimport type { OperateResizeHandlers } from '@/types/edit'\nimport useCommonOperate from '../hooks/useCommonOperate'\n\nimport RotateHandler from './RotateHandler.vue'\nimport ResizeHandler from './ResizeHandler.vue'\nimport BorderLine from './BorderLine.vue'\n\ntype PPTElement = PPTVideoElement | PPTLatexElement | PPTAudioElement | PPTChartElement\n\n\nconst __default__ = {\n inheritAttrs: false,\n}\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'CommonElementOperate',\n props: {\n elementInfo: {},\n handlerVisible: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { canvasScale } = storeToRefs(useMainStore())\n\nconst scaleWidth = computed(() => props.elementInfo.width * canvasScale.value)\nconst scaleHeight = computed(() => props.elementInfo.height * canvasScale.value)\nconst { resizeHandlers, borderLines } = useCommonOperate(scaleWidth, scaleHeight)\n\nconst cannotRotate = computed(() => ['chart', 'video', 'audio'].includes(props.elementInfo.type))\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(borderLines), (line) => {\n return (_openBlock(), _createBlock(BorderLine, {\n class: \"operate-border-line\",\n key: line.type,\n type: line.type,\n style: _normalizeStyle(line.style)\n }, null, 8, [\"type\", \"style\"]))\n }), 128)),\n (_ctx.handlerVisible)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(resizeHandlers), (point) => {\n return (_openBlock(), _createBlock(ResizeHandler, {\n class: \"operate-resize-handler\",\n key: point.direction,\n type: point.direction,\n rotate: _ctx.elementInfo.rotate,\n style: _normalizeStyle(point.style),\n onMousedown: _withModifiers($event => _ctx.scaleElement($event, _ctx.elementInfo, point.direction), [\"stop\"])\n }, null, 8, [\"type\", \"rotate\", \"style\", \"onMousedown\"]))\n }), 128)),\n (!cannotRotate.value)\n ? (_openBlock(), _createBlock(RotateHandler, {\n key: 0,\n class: \"operate-rotate-handler\",\n style: _normalizeStyle({ left: scaleWidth.value / 2 + 'px' }),\n onMousedown: _cache[0] || (_cache[0] = _withModifiers($event => _ctx.rotateElement($event, _ctx.elementInfo), [\"stop\"]))\n }, null, 8, [\"style\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./CommonElementOperate.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./CommonElementOperate.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { useSlidesStore } from '@/store'\nimport type { PPTElement, PPTElementLink } from '@/types/slides'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\nimport message from '@/utils/message'\n\nexport default () => {\n const slidesStore = useSlidesStore()\n\n const { addHistorySnapshot } = useHistorySnapshot()\n\n const setLink = (handleElement: PPTElement, link: PPTElementLink) => {\n const linkRegExp = /^(https?):\\/\\/[\\w\\-]+(\\.[\\w\\-]+)+([\\w\\-.,@?^=%&:\\/~+#]*[\\w\\-@?^=%&\\/~+#])?$/\n if (link.type === 'web' && !linkRegExp.test(link.target)) {\n message.error('不是正确的网页链接地址')\n return false\n }\n if (link.type === 'slide' && !link.target) {\n message.error('请先选择链接目标')\n return false\n }\n const props = { link }\n slidesStore.updateElement({ id: handleElement.id, props })\n addHistorySnapshot()\n\n return true\n }\n\n const removeLink = (handleElement: PPTElement) => {\n slidesStore.removeElementProps({ id: handleElement.id, propName: 'link' })\n addHistorySnapshot()\n }\n\n return {\n setLink,\n removeLink,\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Divider',\n props: {\n type: { default: 'horizontal' },\n margin: { default: 0 }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass(['divider', _ctx.type]),\n style: _normalizeStyle({\n margin: _ctx.type === 'horizontal' ? `${_ctx.margin || 24}px 0` : `0 ${_ctx.margin || 8}px`\n })\n }, null, 6))\n}\n}\n\n})","import script from \"./Divider.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Divider.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Divider.vue?vue&type=style&index=0&id=6b66cde8&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6b66cde8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createVNode as _createVNode, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-316c4664\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"href\"]\nconst _hoisted_2 = { class: \"btns\" }\n\nimport { computed } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement, PPTElementLink } from '@/types/slides'\nimport useLink from '@/hooks/useLink'\nimport Divider from '@/components/Divider.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinkHandler',\n props: {\n elementInfo: {},\n link: {},\n openLinkDialog: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { canvasScale } = storeToRefs(mainStore)\nconst { slides } = storeToRefs(slidesStore)\nconst { removeLink } = useLink()\nconst height = computed(() => props.elementInfo.type === 'line' ? 0 : props.elementInfo.height)\n\nconst turnTarget = (slideId: string) => {\n const targetIndex = slides.value.findIndex(item => item.id === slideId)\n if (targetIndex !== -1) {\n mainStore.setActiveElementIdList([])\n slidesStore.updateSlideIndex(targetIndex)\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"link-handler\",\n style: _normalizeStyle({ top: height.value * _unref(canvasScale) + 10 + 'px' })\n }, [\n (_ctx.link.type === 'web')\n ? (_openBlock(), _createElementBlock(\"a\", {\n key: 0,\n class: \"link\",\n href: _ctx.link.target,\n target: \"_blank\"\n }, _toDisplayString(_ctx.link.target), 9, _hoisted_1))\n : (_openBlock(), _createElementBlock(\"a\", {\n key: 1,\n class: \"link\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (turnTarget(_ctx.link.target)))\n }, \"幻灯片页面 \" + _toDisplayString(_ctx.link.target), 1)),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: \"btn\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.openLinkDialog()))\n }, \"更换\"),\n _createVNode(Divider, { type: \"vertical\" }),\n _createElementVNode(\"div\", {\n class: \"btn\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_unref(removeLink)(_ctx.elementInfo)))\n }, \"移除\")\n ])\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./LinkHandler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinkHandler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LinkHandler.vue?vue&type=style&index=0&id=316c4664&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-316c4664\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, withModifiers as _withModifiers, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5ec1ff35\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 1,\n class: \"animation-index\"\n}\n\nimport { computed } from 'vue'\r\nimport { storeToRefs } from 'pinia'\r\nimport { useMainStore, useSlidesStore } from '@/store'\r\nimport {\r\n ElementTypes,\r\n type PPTElement,\r\n type PPTLineElement,\r\n type PPTVideoElement,\r\n type PPTAudioElement,\r\n type PPTShapeElement,\r\n type PPTChartElement,\r\n} from '@/types/slides'\r\nimport type { OperateLineHandlers, OperateResizeHandlers } from '@/types/edit'\r\n\r\nimport ImageElementOperate from './ImageElementOperate.vue'\r\nimport TextElementOperate from './TextElementOperate.vue'\r\nimport ShapeElementOperate from './ShapeElementOperate.vue'\r\nimport LineElementOperate from './LineElementOperate.vue'\r\nimport TableElementOperate from './TableElementOperate.vue'\r\nimport CommonElementOperate from './CommonElementOperate.vue'\r\nimport LinkHandler from './LinkHandler.vue'\r\n\r\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n elementInfo: {},\n isSelected: { type: Boolean },\n isActive: { type: Boolean },\n isActiveGroupElement: { type: Boolean },\n isMultiSelect: { type: Boolean },\n rotateElement: { type: Function },\n scaleElement: { type: Function },\n dragLineElement: { type: Function },\n moveShapeKeypoint: { type: Function },\n openLinkDialog: { type: Function }\n },\n setup(__props: any) {\n\r\nconst props = __props\r\n\r\nconst { canvasScale, toolbarState } = storeToRefs(useMainStore())\r\nconst { formatedAnimations } = storeToRefs(useSlidesStore())\r\n\r\nconst currentOperateComponent = computed(() => {\r\n const elementTypeMap = {\r\n [ElementTypes.IMAGE]: ImageElementOperate,\r\n [ElementTypes.TEXT]: TextElementOperate,\r\n [ElementTypes.SHAPE]: ShapeElementOperate,\r\n [ElementTypes.LINE]: LineElementOperate,\r\n [ElementTypes.TABLE]: TableElementOperate,\r\n [ElementTypes.CHART]: CommonElementOperate,\r\n [ElementTypes.LATEX]: CommonElementOperate,\r\n [ElementTypes.VIDEO]: CommonElementOperate,\r\n [ElementTypes.AUDIO]: CommonElementOperate,\r\n }\r\n return elementTypeMap[props.elementInfo.type] || null\r\n})\r\n\r\nconst elementIndexListInAnimation = computed(() => {\r\n const indexList = []\r\n for (let i = 0; i < formatedAnimations.value.length; i++) {\r\n const elIds = formatedAnimations.value[i].animations.map(item => item.elId)\r\n if (elIds.includes(props.elementInfo.id)) indexList.push(i)\r\n }\r\n return indexList\r\n})\r\n\r\nconst rotate = computed(() => 'rotate' in props.elementInfo ? props.elementInfo.rotate : 0)\r\nconst height = computed(() => 'height' in props.elementInfo ? props.elementInfo.height : 0)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"operate\", { 'multi-select': _ctx.isMultiSelect && !_ctx.isActive }]),\n style: _normalizeStyle({\r\n top: _ctx.elementInfo.top * _unref(canvasScale) + 'px',\r\n left: _ctx.elementInfo.left * _unref(canvasScale) + 'px',\r\n transform: `rotate(${rotate.value}deg)`,\r\n transformOrigin: `${_ctx.elementInfo.width * _unref(canvasScale) / 2}px ${height.value * _unref(canvasScale) / 2}px`,\r\n })\n }, [\n (_ctx.isSelected)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(currentOperateComponent.value), {\n key: 0,\n elementInfo: _ctx.elementInfo,\n handlerVisible: !_ctx.elementInfo.lock && (_ctx.isActiveGroupElement || !_ctx.isMultiSelect),\n rotateElement: _ctx.rotateElement,\n scaleElement: _ctx.scaleElement,\n dragLineElement: _ctx.dragLineElement,\n moveShapeKeypoint: _ctx.moveShapeKeypoint\n }, null, 8, [\"elementInfo\", \"handlerVisible\", \"rotateElement\", \"scaleElement\", \"dragLineElement\", \"moveShapeKeypoint\"]))\n : _createCommentVNode(\"\", true),\n (_unref(toolbarState) === 'elAnimation' && elementIndexListInAnimation.value.length)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementIndexListInAnimation.value, (index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"index-item\",\n key: index\n }, _toDisplayString(index + 1), 1))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.isActive && _ctx.elementInfo.link)\n ? (_openBlock(), _createBlock(LinkHandler, {\n key: 2,\n elementInfo: _ctx.elementInfo,\n link: _ctx.elementInfo.link,\n openLinkDialog: _ctx.openLinkDialog,\n onMousedown: _cache[0] || (_cache[0] = _withModifiers(() => {}, [\"stop\"]))\n }, null, 8, [\"elementInfo\", \"link\", \"openLinkDialog\"]))\n : _createCommentVNode(\"\", true)\n ], 6))\n}\n}\n\n})","\r\n\r\n\r\n\r\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=5ec1ff35&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5ec1ff35\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-24fef706\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\"]\n\nimport { computed } from 'vue'\nimport type { PPTImageElement } from '@/types/slides'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\nimport useClipImage from './useClipImage'\nimport useFilter from './useFilter'\n\nimport ImageOutline from './ImageOutline/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseImageElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst clip = computed(() => props.elementInfo.clip)\nconst { clipShape, imgPosition } = useClipImage(clip)\n\nconst filters = computed(() => props.elementInfo.filters)\nconst { filter } = useFilter(filters)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-image\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n })\n }, [\n _createVNode(ImageOutline, { elementInfo: _ctx.elementInfo }, null, 8, [\"elementInfo\"]),\n _createElementVNode(\"div\", {\n class: \"image-content\",\n style: _normalizeStyle({ clipPath: _unref(clipShape).style })\n }, [\n _createElementVNode(\"img\", {\n src: _ctx.elementInfo.src,\n draggable: false,\n style: _normalizeStyle({\n top: _unref(imgPosition).top,\n left: _unref(imgPosition).left,\n width: _unref(imgPosition).width,\n height: _unref(imgPosition).height,\n filter: _unref(filter),\n }),\n alt: \"\"\n }, null, 12, _hoisted_1),\n (_ctx.elementInfo.colorMask)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"color-mask\",\n style: _normalizeStyle({\n backgroundColor: _ctx.elementInfo.colorMask,\n })\n }, null, 4))\n : _createCommentVNode(\"\", true)\n ], 4)\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseImageElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseImageElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseImageElement.vue?vue&type=style&index=0&id=24fef706&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-24fef706\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-52a206f2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"innerHTML\"]\n\nimport { computed } from 'vue'\nimport type { PPTTextElement } from '@/types/slides'\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\n\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTextElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-text\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n width: _ctx.elementInfo.vertical ? 'auto' : _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.vertical ? _ctx.elementInfo.height + 'px' : 'auto',\n backgroundColor: _ctx.elementInfo.fill,\n opacity: _ctx.elementInfo.opacity,\n textShadow: _unref(shadowStyle),\n lineHeight: _ctx.elementInfo.lineHeight,\n letterSpacing: (_ctx.elementInfo.wordSpace || 0) + 'px',\n color: _ctx.elementInfo.defaultColor,\n fontFamily: _ctx.elementInfo.defaultFontName,\n writingMode: _ctx.elementInfo.vertical ? 'vertical-rl' : 'horizontal-tb',\n })\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createElementVNode(\"div\", {\n class: \"text ProseMirror-static\",\n style: _normalizeStyle({\n '--paragraphSpace': `${_ctx.elementInfo.paragraphSpace === undefined ? 5 : _ctx.elementInfo.paragraphSpace}px`,\n }),\n innerHTML: _ctx.elementInfo.content\n }, null, 12, _hoisted_1)\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseTextElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseTextElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseTextElement.vue?vue&type=style&index=0&id=52a206f2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-52a206f2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-b13f8fa8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = { key: 0 }\nconst _hoisted_3 = [\"transform\"]\nconst _hoisted_4 = [\"d\", \"fill\", \"stroke\", \"stroke-width\", \"stroke-dasharray\"]\nconst _hoisted_5 = [\"innerHTML\"]\n\nimport { computed } from 'vue'\nimport type { PPTShapeElement, ShapeText } from '@/types/slides'\nimport useElementOutline from '@/views/components/element/hooks/useElementOutline'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\nimport useElementFlip from '@/views/components/element/hooks/useElementFlip'\n\nimport GradientDefs from './GradientDefs.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseShapeElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst outline = computed(() => props.elementInfo.outline)\nconst { outlineWidth, outlineColor, strokeDashArray } = useElementOutline(outline)\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst flipH = computed(() => props.elementInfo.flipH)\nconst flipV = computed(() => props.elementInfo.flipV)\nconst { flipStyle } = useElementFlip(flipH, flipV)\n\nconst text = computed(() => {\n const defaultText: ShapeText = {\n content: '',\n defaultFontName: '微软雅黑',\n defaultColor: '#000',\n align: 'middle',\n }\n if (!props.elementInfo.text) return defaultText\n\n return props.elementInfo.text\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-shape\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\n opacity: _ctx.elementInfo.opacity,\n filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '',\n transform: _unref(flipStyle),\n color: text.value.defaultColor,\n fontFamily: text.value.defaultFontName,\n })\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height\n }, [\n (_ctx.elementInfo.gradient)\n ? (_openBlock(), _createElementBlock(\"defs\", _hoisted_2, [\n _createVNode(GradientDefs, {\n id: `base-gradient-${_ctx.elementInfo.id}`,\n type: _ctx.elementInfo.gradient.type,\n color1: _ctx.elementInfo.gradient.color[0],\n color2: _ctx.elementInfo.gradient.color[1],\n rotate: _ctx.elementInfo.gradient.rotate\n }, null, 8, [\"id\", \"type\", \"color1\", \"color2\", \"rotate\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n d: _ctx.elementInfo.path,\n fill: _ctx.elementInfo.gradient ? `url(#base-gradient-${_ctx.elementInfo.id})` : _ctx.elementInfo.fill,\n stroke: _unref(outlineColor),\n \"stroke-width\": _unref(outlineWidth),\n \"stroke-dasharray\": _unref(strokeDashArray)\n }, null, 8, _hoisted_4)\n ], 8, _hoisted_3)\n ], 8, _hoisted_1)),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"shape-text\", text.value.align])\n }, [\n _createElementVNode(\"div\", {\n class: \"ProseMirror-static\",\n innerHTML: text.value.content\n }, null, 8, _hoisted_5)\n ], 2)\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseShapeElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseShapeElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseShapeElement.vue?vue&type=style&index=0&id=b13f8fa8&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-b13f8fa8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-443e2f82\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"d\", \"stroke\", \"stroke-width\", \"stroke-dasharray\", \"marker-start\", \"marker-end\"]\n\nimport { computed } from 'vue'\nimport type { PPTLineElement } from '@/types/slides'\nimport { getLineElementPath } from '@/utils/element'\nimport useElementShadow from '@/views/components/element/hooks/useElementShadow'\n\nimport LinePointMarker from './LinePointMarker.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseLineElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst shadow = computed(() => props.elementInfo.shadow)\nconst { shadowStyle } = useElementShadow(shadow)\n\nconst svgWidth = computed(() => {\n const width = Math.abs(props.elementInfo.start[0] - props.elementInfo.end[0])\n return width < 24 ? 24 : width\n})\nconst svgHeight = computed(() => {\n const height = Math.abs(props.elementInfo.start[1] - props.elementInfo.end[1])\n return height < 24 ? 24 : height\n})\n\nconst lineDashArray = computed(() => {\n if (props.elementInfo.style !== 'dashed') return '0 0'\n const size = props.elementInfo.width\n return size <= 8 ? `${size * 5} ${size * 2.5}` : `${size * 5} ${size * 1.5}`\n})\n\nconst path = computed(() => {\n return getLineElementPath(props.elementInfo)\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-line\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({ filter: _unref(shadowStyle) ? `drop-shadow(${_unref(shadowStyle)})` : '' })\n }, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: svgWidth.value,\n height: svgHeight.value\n }, [\n _createElementVNode(\"defs\", null, [\n (_ctx.elementInfo.points[0])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 0,\n id: _ctx.elementInfo.id,\n position: \"start\",\n type: _ctx.elementInfo.points[0],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.elementInfo.points[1])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 1,\n id: _ctx.elementInfo.id,\n position: \"end\",\n type: _ctx.elementInfo.points[1],\n color: _ctx.elementInfo.color,\n baseSize: _ctx.elementInfo.width\n }, null, 8, [\"id\", \"type\", \"color\", \"baseSize\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"path\", {\n d: path.value,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.width,\n \"stroke-dasharray\": lineDashArray.value,\n fill: \"none\",\n \"marker-start\": _ctx.elementInfo.points[0] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[0]}-start)` : '',\n \"marker-end\": _ctx.elementInfo.points[1] ? `url(#${_ctx.elementInfo.id}-${_ctx.elementInfo.points[1]}-end)` : ''\n }, null, 8, _hoisted_2)\n ], 8, _hoisted_1))\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseLineElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseLineElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseLineElement.vue?vue&type=style&index=0&id=443e2f82&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-443e2f82\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed, inject, ref } from 'vue'\r\nimport type { PPTChartElement } from '@/types/slides'\r\nimport { injectKeySlideScale } from '@/types/injectKey'\r\n\r\nimport ElementOutline from '@/views/components/element/ElementOutline.vue'\r\nimport Chart from './Chart.vue'\r\n\r\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseChartElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\r\n\r\n\r\nconst slideScale = inject(injectKeySlideScale) || ref(1)\r\n\r\nconst needScaleSize = computed(() => slideScale.value < 1)\r\nconst zoom = computed(() => needScaleSize.value ? 1 / slideScale.value : 1)\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-chart\",\n style: _normalizeStyle({\r\n top: _ctx.elementInfo.top + 'px',\r\n left: _ctx.elementInfo.left + 'px',\r\n width: _ctx.elementInfo.width + 'px',\r\n height: _ctx.elementInfo.height + 'px',\r\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({\r\n backgroundColor: _ctx.elementInfo.fill,\r\n })\n }, [\n _createVNode(ElementOutline, {\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n outline: _ctx.elementInfo.outline\n }, null, 8, [\"width\", \"height\", \"outline\"]),\n _createVNode(Chart, {\n width: _ctx.elementInfo.width * zoom.value,\n height: _ctx.elementInfo.height * zoom.value,\n type: _ctx.elementInfo.chartType,\n data: _ctx.elementInfo.data,\n options: _ctx.elementInfo.options,\n themeColor: _ctx.elementInfo.themeColor,\n gridColor: _ctx.elementInfo.gridColor,\n legends: _ctx.elementInfo.data.legends,\n legend: _ctx.elementInfo.legend || '',\n style: _normalizeStyle({ zoom: 1 / zoom.value })\n }, null, 8, [\"width\", \"height\", \"type\", \"data\", \"options\", \"themeColor\", \"gridColor\", \"legends\", \"legend\", \"style\"])\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","\r\n\r\n\r\n\r\n","import script from \"./BaseChartElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseChartElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseChartElement.vue?vue&type=style&index=0&id=7c03d68d&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7c03d68d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, vShow as _vShow, withDirectives as _withDirectives, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5d949d4d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\"]\nconst _hoisted_2 = [\"rowspan\", \"colspan\"]\nconst _hoisted_3 = [\"innerHTML\"]\n\nimport { computed, ref, watch } from 'vue'\nimport type { PPTElementOutline, TableCell, TableTheme } from '@/types/slides'\nimport { getTextStyle, formatText } from './utils'\nimport useHideCells from './useHideCells'\nimport useSubThemeColor from './useSubThemeColor'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'StaticTable',\n props: {\n data: {},\n width: {},\n cellMinHeight: {},\n colWidths: {},\n outline: {},\n theme: {},\n editable: { type: Boolean, default: true }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst colSizeList = ref([])\nconst totalWidth = computed(() => colSizeList.value.reduce((a, b) => a + b))\n\nwatch([\n () => props.colWidths,\n () => props.width,\n], () => {\n colSizeList.value = props.colWidths.map(item => item * props.width)\n}, { immediate: true })\n\nconst cells = computed(() => props.data)\nconst { hideCells } = useHideCells(cells)\n\nconst theme = computed(() => props.theme)\nconst { subThemeColor } = useSubThemeColor(theme)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"static-table\",\n style: _normalizeStyle({ width: totalWidth.value + 'px' })\n }, [\n _createElementVNode(\"table\", {\n class: _normalizeClass({\n 'theme': theme.value,\n 'row-header': theme.value?.rowHeader,\n 'row-footer': theme.value?.rowFooter,\n 'col-header': theme.value?.colHeader,\n 'col-footer': theme.value?.colFooter,\n }),\n style: _normalizeStyle(`--themeColor: ${theme.value?.color}; --subThemeColor1: ${_unref(subThemeColor)[0]}; --subThemeColor2: ${_unref(subThemeColor)[1]}`)\n }, [\n _createElementVNode(\"colgroup\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(colSizeList.value, (width, index) => {\n return (_openBlock(), _createElementBlock(\"col\", {\n span: \"1\",\n key: index,\n width: width\n }, null, 8, _hoisted_1))\n }), 128))\n ]),\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.data, (rowCells, rowIndex) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: rowIndex,\n style: _normalizeStyle({ height: _ctx.cellMinHeight + 'px' })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rowCells, (cell, colIndex) => {\n return _withDirectives((_openBlock(), _createElementBlock(\"td\", {\n class: \"cell\",\n style: _normalizeStyle({\n borderStyle: _ctx.outline.style,\n borderColor: _ctx.outline.color,\n borderWidth: _ctx.outline.width + 'px',\n ..._unref(getTextStyle)(cell.style),\n }),\n key: cell.id,\n rowspan: cell.rowspan,\n colspan: cell.colspan\n }, [\n _createElementVNode(\"div\", {\n class: \"cell-text\",\n style: _normalizeStyle({ minHeight: (_ctx.cellMinHeight - 4) + 'px' }),\n innerHTML: _unref(formatText)(cell.text)\n }, null, 12, _hoisted_3)\n ], 12, _hoisted_2)), [\n [_vShow, !_unref(hideCells).includes(`${rowIndex}_${colIndex}`)]\n ])\n }), 128))\n ], 4))\n }), 128))\n ])\n ], 6)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./StaticTable.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./StaticTable.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./StaticTable.vue?vue&type=style&index=0&id=5d949d4d&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5d949d4d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3eff7eba\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\n\nimport type { PPTTableElement } from '@/types/slides'\n\nimport StaticTable from './StaticTable.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTableElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-table\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createVNode(StaticTable, {\n data: _ctx.elementInfo.data,\n width: _ctx.elementInfo.width,\n cellMinHeight: _ctx.elementInfo.cellMinHeight,\n colWidths: _ctx.elementInfo.colWidths,\n outline: _ctx.elementInfo.outline,\n theme: _ctx.elementInfo.theme\n }, null, 8, [\"data\", \"width\", \"cellMinHeight\", \"colWidths\", \"outline\", \"theme\"])\n ])\n ], 4)\n ], 4))\n}\n}\n\n})","import script from \"./BaseTableElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseTableElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseTableElement.vue?vue&type=style&index=0&id=3eff7eba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3eff7eba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-1587280d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\nconst _hoisted_2 = [\"width\", \"height\", \"stroke\", \"stroke-width\"]\nconst _hoisted_3 = [\"transform\"]\nconst _hoisted_4 = [\"d\"]\n\nimport type { PPTLatexElement } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseLatexElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-latex\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_openBlock(), _createElementBlock(\"svg\", {\n overflow: \"visible\",\n width: _ctx.elementInfo.width,\n height: _ctx.elementInfo.height,\n stroke: _ctx.elementInfo.color,\n \"stroke-width\": _ctx.elementInfo.strokeWidth,\n fill: \"none\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\"\n }, [\n _createElementVNode(\"g\", {\n transform: `scale(${_ctx.elementInfo.width / _ctx.elementInfo.viewBox[0]}, ${_ctx.elementInfo.height / _ctx.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n d: _ctx.elementInfo.path\n }, null, 8, _hoisted_4)\n ], 8, _hoisted_3)\n ], 8, _hoisted_2))\n ])\n ], 4)\n ], 4))\n}\n}\n\n})","import script from \"./BaseLatexElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseLatexElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseLatexElement.vue?vue&type=style&index=0&id=1587280d&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1587280d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport type { PPTVideoElement } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseVideoElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconPlayOne = _resolveComponent(\"IconPlayOne\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-video\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", {\n class: \"element-content\",\n style: _normalizeStyle({ backgroundImage: _ctx.elementInfo.poster ? `url(${_ctx.elementInfo.poster})` : '' })\n }, [\n _createVNode(_component_IconPlayOne, { class: \"icon\" })\n ], 4)\n ], 4)\n ], 4))\n}\n}\n\n})","import script from \"./BaseVideoElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseVideoElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseVideoElement.vue?vue&type=style&index=0&id=09436dde&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-09436dde\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, normalizeStyle as _normalizeStyle, createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5da834d7\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-content\" }\n\nimport { computed } from 'vue'\nimport type { PPTAudioElement } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseAudioElement',\n props: {\n elementInfo: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst audioIconSize = computed(() => {\n return Math.min(props.elementInfo.width, props.elementInfo.height) + 'px'\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconVolumeNotice = _resolveComponent(\"IconVolumeNotice\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-element-audio\",\n style: _normalizeStyle({\n top: _ctx.elementInfo.top + 'px',\n left: _ctx.elementInfo.left + 'px',\n width: _ctx.elementInfo.width + 'px',\n height: _ctx.elementInfo.height + 'px',\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"rotate-wrapper\",\n style: _normalizeStyle({ transform: `rotate(${_ctx.elementInfo.rotate}deg)` })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createVNode(_component_IconVolumeNotice, {\n class: \"audio-icon\",\n style: _normalizeStyle({\n fontSize: audioIconSize.value,\n color: _ctx.elementInfo.color,\n })\n }, null, 8, [\"style\"])\n ])\n ], 4)\n ], 4))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./BaseAudioElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./BaseAudioElement.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./BaseAudioElement.vue?vue&type=style&index=0&id=5da834d7&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5da834d7\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport { ElementTypes, type PPTElement } from '@/types/slides'\n\nimport BaseImageElement from '@/views/components/element/ImageElement/BaseImageElement.vue'\nimport BaseTextElement from '@/views/components/element/TextElement/BaseTextElement.vue'\nimport BaseShapeElement from '@/views/components/element/ShapeElement/BaseShapeElement.vue'\nimport BaseLineElement from '@/views/components/element/LineElement/BaseLineElement.vue'\nimport BaseChartElement from '@/views/components/element/ChartElement/BaseChartElement.vue'\nimport BaseTableElement from '@/views/components/element/TableElement/BaseTableElement.vue'\nimport BaseLatexElement from '@/views/components/element/LatexElement/BaseLatexElement.vue'\nimport BaseVideoElement from '@/views/components/element/VideoElement/BaseVideoElement.vue'\nimport BaseAudioElement from '@/views/components/element/AudioElement/BaseAudioElement.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ThumbnailElement',\n props: {\n elementInfo: {},\n elementIndex: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst currentElementComponent = computed(() => {\n const elementTypeMap = {\n [ElementTypes.IMAGE]: BaseImageElement,\n [ElementTypes.TEXT]: BaseTextElement,\n [ElementTypes.SHAPE]: BaseShapeElement,\n [ElementTypes.LINE]: BaseLineElement,\n [ElementTypes.CHART]: BaseChartElement,\n [ElementTypes.TABLE]: BaseTableElement,\n [ElementTypes.LATEX]: BaseLatexElement,\n [ElementTypes.VIDEO]: BaseVideoElement,\n [ElementTypes.AUDIO]: BaseAudioElement,\n }\n return elementTypeMap[props.elementInfo.type] || null\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"base-element\", `base-element-${_ctx.elementInfo.id}`]),\n style: _normalizeStyle({\n zIndex: _ctx.elementIndex,\n })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(currentElementComponent.value), {\n elementInfo: _ctx.elementInfo,\n target: \"thumbnail\"\n }, null, 8, [\"elementInfo\"]))\n ], 6))\n}\n}\n\n})","\n\n","import script from \"./ThumbnailElement.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ThumbnailElement.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-43dcaa52\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 1,\n class: \"placeholder\"\n}\n\nimport { computed, provide } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { Slide } from '@/types/slides'\nimport { injectKeySlideScale } from '@/types/injectKey'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useSlideBackgroundStyle from '@/hooks/useSlideBackgroundStyle'\n\nimport ThumbnailElement from './ThumbnailElement.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n slide: {},\n size: {},\n visible: { type: Boolean, default: true }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst { viewportRatio } = storeToRefs(useSlidesStore())\n\nconst background = computed(() => props.slide.background)\nconst { backgroundStyle } = useSlideBackgroundStyle(background)\n\nconst scale = computed(() => props.size / VIEWPORT_SIZE)\nprovide(injectKeySlideScale, scale)\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"thumbnail-slide\",\n style: _normalizeStyle({\n width: _ctx.size + 'px',\n height: _ctx.size * _unref(viewportRatio) + 'px',\n })\n }, [\n (_ctx.visible)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"elements\",\n style: _normalizeStyle({\n width: _unref(VIEWPORT_SIZE) + 'px',\n height: _unref(VIEWPORT_SIZE) * _unref(viewportRatio) + 'px',\n transform: `scale(${scale.value})`,\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"background\",\n style: _normalizeStyle(_unref(backgroundStyle))\n }, null, 4),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.slide.elements, (element, index) => {\n return (_openBlock(), _createBlock(ThumbnailElement, {\n key: element.id,\n elementInfo: element,\n elementIndex: index + 1\n }, null, 8, [\"elementInfo\", \"elementIndex\"]))\n }), 128))\n ], 4))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_1, \"加载中 ...\"))\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=43dcaa52&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-43dcaa52\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5e3d7626\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"onClick\"]\n\nimport { type CSSProperties } from 'vue'\n\ninterface TabItem {\n key: string\n label: string\n color?: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Tabs',\n props: {\n value: {},\n tabs: {},\n card: { type: Boolean, default: false },\n tabsStyle: {},\n tabStyle: {},\n spaceAround: { type: Boolean, default: false },\n spaceBetween: { type: Boolean, default: false }\n },\n emits: [\"update:value\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tabs\", {\n 'card': _ctx.card,\n 'space-around': _ctx.spaceAround,\n 'space-between': _ctx.spaceBetween,\n }]),\n style: _normalizeStyle(_ctx.tabsStyle || {})\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.tabs, (tab) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tab\", { 'active': tab.key === _ctx.value }]),\n key: tab.key,\n style: _normalizeStyle({\n ...(_ctx.tabStyle || {}),\n '--color': tab.color,\n }),\n onClick: ($event: any) => (emit('update:value', tab.key))\n }, _toDisplayString(tab.label), 15, _hoisted_1))\n }), 128))\n ], 6))\n}\n}\n\n})","\n\n\n\n","import script from \"./Tabs.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Tabs.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Tabs.vue?vue&type=style&index=0&id=5e3d7626&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5e3d7626\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Button',\n props: {\n checked: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n type: { default: 'default' },\n size: { default: 'normal' },\n first: { type: Boolean, default: false },\n last: { type: Boolean, default: false }\n },\n emits: [\"click\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst handleClick = () => {\n if (props.disabled) return\n emit('click')\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"button\", {\n class: _normalizeClass([\"button\", {\n 'disabled': _ctx.disabled,\n 'checked': !_ctx.disabled && _ctx.checked,\n 'default': !_ctx.disabled && _ctx.type === 'default',\n 'primary': !_ctx.disabled && _ctx.type === 'primary',\n 'checkbox': !_ctx.disabled && _ctx.type === 'checkbox',\n 'radio': !_ctx.disabled && _ctx.type === 'radio',\n 'small': _ctx.size === 'small',\n 'first': _ctx.first,\n 'last': _ctx.last,\n }]),\n onClick: _cache[0] || (_cache[0] = ($event: any) => (handleClick()))\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./Button.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Button.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Button.vue?vue&type=style&index=0&id=52c90330&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-52c90330\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5bf3b141\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"select-wrap\"\n}\nconst _hoisted_2 = { class: \"selector\" }\nconst _hoisted_3 = { class: \"icon\" }\nconst _hoisted_4 = [\"onClick\"]\nconst _hoisted_5 = { class: \"selector\" }\nconst _hoisted_6 = { class: \"icon\" }\n\nimport { computed, onMounted, onUnmounted, ref } from 'vue'\nimport Popover from './Popover.vue'\n\ninterface SelectOption {\n label: string\n value: string | number\n disabled?: boolean\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Select',\n props: {\n value: {},\n options: {},\n disabled: { type: Boolean, default: false }\n },\n emits: [\"update:value\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst showLabel = computed(() => {\n return props.options.find(item => item.value === props.value)?.label || props.value\n})\n\nconst emit = __emit\n\nconst popoverVisible = ref(false)\nconst selectRef = ref()\nconst width = ref(0)\n\nconst updateWidth = () => {\n if (!selectRef.value) return\n width.value = selectRef.value.clientWidth\n}\nconst resizeObserver = new ResizeObserver(updateWidth)\nonMounted(() => {\n if (!selectRef.value) return\n resizeObserver.observe(selectRef.value)\n})\nonUnmounted(() => {\n if (!selectRef.value) return\n resizeObserver.unobserve(selectRef.value)\n})\n\nconst handleSelect = (option: SelectOption) => {\n if (option.disabled) return\n\n emit('update:value', option.value)\n popoverVisible.value = false\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconDown = _resolveComponent(\"IconDown\")!\n\n return (_ctx.disabled)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: \"select disabled\",\n ref_key: \"selectRef\",\n ref: selectRef\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(_ctx.value), 1),\n _createElementVNode(\"div\", _hoisted_3, [\n _renderSlot(_ctx.$slots, \"icon\", {}, () => [\n _createVNode(_component_IconDown, { size: 14 })\n ])\n ])\n ], 512)\n ]))\n : (_openBlock(), _createBlock(Popover, {\n key: 1,\n class: \"select-wrap\",\n trigger: \"click\",\n value: popoverVisible.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((popoverVisible).value = $event)),\n placement: \"bottom\",\n contentStyle: {\n padding: 0,\n boxShadow: '0 6px 16px 0 rgba(0, 0, 0, 0.08)',\n }\n }, {\n content: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: \"options\",\n style: _normalizeStyle({ width: width.value + 2 + 'px' })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.options, (option) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"option\", {\n 'disabled': option.disabled,\n 'selected': option.value === _ctx.value,\n }]),\n key: option.value,\n onClick: ($event: any) => (handleSelect(option))\n }, _toDisplayString(option.label), 11, _hoisted_4))\n }), 128))\n ], 4)\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: \"select\",\n ref_key: \"selectRef\",\n ref: selectRef\n }, [\n _createElementVNode(\"div\", _hoisted_5, _toDisplayString(showLabel.value), 1),\n _createElementVNode(\"div\", _hoisted_6, [\n _renderSlot(_ctx.$slots, \"icon\", {}, () => [\n _createVNode(_component_IconDown, { size: 14 })\n ])\n ])\n ], 512)\n ]),\n _: 3\n }, 8, [\"value\", \"contentStyle\"]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Select.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Select.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Select.vue?vue&type=style&index=0&id=5bf3b141&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5bf3b141\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, createTextVNode as _createTextVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-cc39ee16\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"link-dialog\" }\nconst _hoisted_2 = {\n key: 2,\n class: \"preview\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, \"预览:\", -1))\nconst _hoisted_4 = { class: \"btns\" }\n\nimport { computed, onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElementLink } from '@/types/slides'\nimport useLink from '@/hooks/useLink'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\nimport Tabs from '@/components/Tabs.vue'\nimport Input from '@/components/Input.vue'\nimport Button from '@/components/Button.vue'\nimport Select from '@/components/Select.vue'\n\ntype TypeKey = 'web' | 'slide'\ninterface TabItem {\n key: TypeKey\n label: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinkDialog',\n emits: [\"close\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\n\nconst { handleElement } = storeToRefs(useMainStore())\nconst { slides, currentSlide } = storeToRefs(useSlidesStore())\n\nconst type = ref('web')\nconst address = ref('')\nconst slideId = ref('')\n\nconst slideOptions = computed(() => {\n return slides.value.map((item, index) => ({\n label: `幻灯片 ${index + 1}`,\n value: item.id,\n disabled: currentSlide.value.id === item.id,\n }))\n})\n\nslideId.value = slides.value.find(item => item.id !== currentSlide.value.id)?.id || ''\n\nconst selectedSlide = computed(() => {\n if (!slideId.value) return null\n\n return slides.value.find(item => item.id === slideId.value) || null\n})\n\nconst tabs: TabItem[] = [\n { key: 'web', label: '网页链接' },\n { key: 'slide', label: '幻灯片页面' },\n]\n\nconst { setLink } = useLink()\n\nonMounted(() => {\n if (handleElement.value?.link) {\n if (handleElement.value.link.type === 'web') address.value = handleElement.value.link.target\n else if (handleElement.value.link.type === 'slide') slideId.value = handleElement.value.link.target\n\n type.value = handleElement.value.link.type\n }\n})\n\nconst save = () => {\n const link: PPTElementLink = {\n type: type.value,\n target: type.value === 'web' ? address.value : slideId.value,\n }\n if (handleElement.value) {\n const success = setLink(handleElement.value, link)\n if (success) emit('close')\n else address.value = ''\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: type.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((type).value = $event)),\n tabsStyle: { marginBottom: '20px' }\n }, null, 8, [\"value\"]),\n (type.value === 'web')\n ? (_openBlock(), _createBlock(Input, {\n key: 0,\n class: \"input\",\n value: address.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((address).value = $event)),\n placeholder: \"请输入网页链接地址\"\n }, null, 8, [\"value\"]))\n : _createCommentVNode(\"\", true),\n (type.value === 'slide')\n ? (_openBlock(), _createBlock(Select, {\n key: 1,\n class: \"input\",\n value: slideId.value,\n \"onUpdate:value\": _cache[2] || (_cache[2] = ($event: any) => ((slideId).value = $event)),\n options: slideOptions.value\n }, null, 8, [\"value\", \"options\"]))\n : _createCommentVNode(\"\", true),\n (type.value === 'slide' && selectedSlide.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n _hoisted_3,\n _createVNode(ThumbnailSlide, {\n class: \"thumbnail\",\n slide: selectedSlide.value,\n size: 500\n }, null, 8, [\"slide\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(Button, {\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('close'))),\n style: {\"margin-right\":\"10px\"}\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n type: \"primary\",\n onClick: _cache[4] || (_cache[4] = ($event: any) => (save()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./LinkDialog.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinkDialog.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LinkDialog.vue?vue&type=style&index=0&id=cc39ee16&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-cc39ee16\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, vShow as _vShow, normalizeStyle as _normalizeStyle, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx, withKeys as _withKeys, Teleport as _Teleport, createBlock as _createBlock } from \"vue\"\n\nimport { computed, nextTick, ref, watch, type CSSProperties } from 'vue'\nimport { icons } from '@/plugins/icon'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Modal',\n props: {\n visible: { type: Boolean },\n width: { default: 480 },\n closeButton: { type: Boolean, default: false },\n closeOnClickMask: { type: Boolean, default: true },\n closeOnEsc: { type: Boolean, default: true },\n contentStyle: {}\n },\n emits: [\"update:visible\", \"closed\"],\n setup(__props: any, { emit: __emit }) {\n\nconst { IconClose } = icons\n\nconst props = __props\n\nconst modalRef = ref()\n\nconst emit = __emit\n\nconst contentVisible = ref(false)\n\nconst contentStyle = computed(() => {\n return {\n width: props.width + 'px',\n ...(props.contentStyle || {})\n }\n})\n\nwatch(() => props.visible, () => {\n if (props.visible) {\n nextTick(() => modalRef.value!.focus())\n }\n})\n\nconst close = () => {\n emit('update:visible', false)\n emit('closed')\n}\n\nconst onEsc = () => {\n if (props.visible && props.closeOnEsc) close()\n}\n\nconst onClickMask = () => {\n if (props.closeOnClickMask) close()\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createVNode(_Transition, { name: \"modal-fade\" }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", {\n class: \"modal\",\n ref_key: \"modalRef\",\n ref: modalRef,\n tabindex: \"-1\",\n onKeyup: _cache[4] || (_cache[4] = _withKeys(($event: any) => (onEsc()), [\"esc\"]))\n }, [\n _createElementVNode(\"div\", {\n class: \"mask\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (onClickMask()))\n }),\n _createVNode(_Transition, {\n name: \"modal-zoom\",\n onAfterLeave: _cache[2] || (_cache[2] = ($event: any) => (contentVisible.value = false)),\n onBeforeEnter: _cache[3] || (_cache[3] = ($event: any) => (contentVisible.value = true))\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", {\n class: \"modal-content\",\n style: _normalizeStyle(contentStyle.value)\n }, [\n (_ctx.closeButton)\n ? (_openBlock(), _createElementBlock(\"span\", {\n key: 0,\n class: \"close-btn\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (close()))\n }, [\n _createVNode(_unref(IconClose))\n ]))\n : _createCommentVNode(\"\", true),\n (contentVisible.value)\n ? _renderSlot(_ctx.$slots, \"default\", { key: 1 })\n : _createCommentVNode(\"\", true)\n ], 4), [\n [_vShow, _ctx.visible]\n ])\n ]),\n _: 3\n })\n ], 544), [\n [_vShow, _ctx.visible]\n ])\n ]),\n _: 3\n })\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Modal.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Modal.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Modal.vue?vue&type=style&index=0&id=fea8edcc&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-fea8edcc\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, vShow as _vShow, withDirectives as _withDirectives, createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, withCtx as _withCtx, resolveDirective as _resolveDirective, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-ce64755c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"operates\" }\nconst _hoisted_2 = {\n key: 2,\n class: \"drag-mask\"\n}\n\nimport { nextTick, onMounted, onUnmounted, provide, ref, watch, watchEffect } from 'vue'\nimport { throttle } from 'lodash'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'\nimport type { ContextmenuItem } from '@/components/Contextmenu/types'\nimport type { PPTElement } from '@/types/slides'\nimport type { AlignmentLineProps, CreateCustomShapeData } from '@/types/edit'\nimport { injectKeySlideScale } from '@/types/injectKey'\nimport { removeAllRanges } from '@/utils/selection'\nimport { KEYS } from '@/configs/hotkey'\n\nimport useViewportSize from './hooks/useViewportSize'\nimport useMouseSelection from './hooks/useMouseSelection'\nimport useDropImageOrText from './hooks/useDropImageOrText'\nimport useRotateElement from './hooks/useRotateElement'\nimport useScaleElement from './hooks/useScaleElement'\nimport useSelectElement from './hooks/useSelectElement'\nimport useDragElement from './hooks/useDragElement'\nimport useDragLineElement from './hooks/useDragLineElement'\nimport useMoveShapeKeypoint from './hooks/useMoveShapeKeypoint'\nimport useInsertFromCreateSelection from './hooks/useInsertFromCreateSelection'\n\nimport useDeleteElement from '@/hooks/useDeleteElement'\nimport useCopyAndPasteElement from '@/hooks/useCopyAndPasteElement'\nimport useSelectAllElement from '@/hooks/useSelectAllElement'\nimport useScaleCanvas from '@/hooks/useScaleCanvas'\nimport useScreening from '@/hooks/useScreening'\nimport useSlideHandler from '@/hooks/useSlideHandler'\nimport useCreateElement from '@/hooks/useCreateElement'\n\nimport EditableElement from './EditableElement.vue'\nimport MouseSelection from './MouseSelection.vue'\nimport ViewportBackground from './ViewportBackground.vue'\nimport AlignmentLine from './AlignmentLine.vue'\nimport Ruler from './Ruler.vue'\nimport ElementCreateSelection from './ElementCreateSelection.vue'\nimport ShapeCreateCanvas from './ShapeCreateCanvas.vue'\nimport MultiSelectOperate from './Operate/MultiSelectOperate.vue'\nimport Operate from './Operate/index.vue'\nimport LinkDialog from './LinkDialog.vue'\nimport Modal from '@/components/Modal.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n setup(__props) {\n\nconst mainStore = useMainStore()\nconst {\n activeElementIdList,\n activeGroupElementId,\n handleElementId,\n hiddenElementIdList,\n editorAreaFocus,\n gridLineSize,\n showRuler,\n creatingElement,\n creatingCustomShape,\n canvasScale,\n textFormatPainter,\n} = storeToRefs(mainStore)\nconst { currentSlide } = storeToRefs(useSlidesStore())\nconst { ctrlKeyState, spaceKeyState } = storeToRefs(useKeyboardStore())\n\nconst viewportRef = ref()\nconst alignmentLines = ref([])\n\nconst linkDialogVisible = ref(false)\nconst openLinkDialog = () => linkDialogVisible.value = true\n\nwatch(handleElementId, () => {\n mainStore.setActiveGroupElementId('')\n})\n\nconst elementList = ref([])\nconst setLocalElementList = () => {\n elementList.value = currentSlide.value ? JSON.parse(JSON.stringify(currentSlide.value.elements)) : []\n}\nwatchEffect(setLocalElementList)\n\nconst canvasRef = ref()\nconst { dragViewport, viewportStyles } = useViewportSize(canvasRef)\n\nuseDropImageOrText(canvasRef)\n\nconst { mouseSelection, mouseSelectionVisible, mouseSelectionQuadrant, updateMouseSelection } = useMouseSelection(elementList, viewportRef)\n\nconst { dragElement } = useDragElement(elementList, alignmentLines, canvasScale)\nconst { dragLineElement } = useDragLineElement(elementList)\nconst { selectElement } = useSelectElement(elementList, dragElement)\nconst { scaleElement, scaleMultiElement } = useScaleElement(elementList, alignmentLines, canvasScale)\nconst { rotateElement } = useRotateElement(elementList, viewportRef, canvasScale)\nconst { moveShapeKeypoint } = useMoveShapeKeypoint(elementList, canvasScale)\n\nconst { selectAllElement } = useSelectAllElement()\nconst { deleteAllElements } = useDeleteElement()\nconst { pasteElement } = useCopyAndPasteElement()\nconst { enterScreeningFromStart } = useScreening()\nconst { updateSlideIndex } = useSlideHandler()\nconst { createTextElement, createShapeElement } = useCreateElement()\n\n// 组件渲染时,如果存在元素焦点,需要清除\n// 这种情况存在于:有焦点元素的情况下进入了放映模式,再退出时,需要清除原先的焦点(因为可能已经切换了页面)\nonMounted(() => {\n if (activeElementIdList.value.length) {\n nextTick(() => mainStore.setActiveElementIdList([]))\n }\n})\n\n// 点击画布的空白区域:清空焦点元素、设置画布焦点、清除文字选区、清空格式刷状态\nconst handleClickBlankArea = (e: MouseEvent) => {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n\n if (!spaceKeyState.value) updateMouseSelection(e)\n else dragViewport(e)\n\n if (!editorAreaFocus.value) mainStore.setEditorareaFocus(true)\n if (textFormatPainter.value) mainStore.setTextFormatPainter(null)\n removeAllRanges()\n}\n\n// 双击空白处插入文本\nconst handleDblClick = (e: MouseEvent) => {\n if (activeElementIdList.value.length || creatingElement.value || creatingCustomShape.value) return\n if (!viewportRef.value) return\n\n const viewportRect = viewportRef.value.getBoundingClientRect()\n const left = (e.pageX - viewportRect.x) / canvasScale.value\n const top = (e.pageY - viewportRect.y) / canvasScale.value\n\n createTextElement({\n left,\n top,\n width: 200 / canvasScale.value, // 除以 canvasScale 是为了与点击选区创建的形式保持相同的宽度\n height: 0,\n })\n}\n\n// 画布注销时清空格式刷状态\nonUnmounted(() => {\n if (textFormatPainter.value) mainStore.setTextFormatPainter(null)\n})\n\n// 移除画布编辑区域焦点\nconst removeEditorAreaFocus = () => {\n if (editorAreaFocus.value) mainStore.setEditorareaFocus(false)\n}\n\n// 滚动鼠标\nconst { scaleCanvas } = useScaleCanvas()\nconst throttleScaleCanvas = throttle(scaleCanvas, 100, { leading: true, trailing: false })\nconst throttleUpdateSlideIndex = throttle(updateSlideIndex, 300, { leading: true, trailing: false })\n\nconst handleMousewheelCanvas = (e: WheelEvent) => {\n e.preventDefault()\n\n // 按住Ctrl键时:缩放画布\n if (ctrlKeyState.value) {\n if (e.deltaY > 0) throttleScaleCanvas('-')\n else if (e.deltaY < 0) throttleScaleCanvas('+')\n }\n // 上下翻页\n else {\n if (e.deltaY > 0) throttleUpdateSlideIndex(KEYS.DOWN)\n else if (e.deltaY < 0) throttleUpdateSlideIndex(KEYS.UP)\n }\n}\n\n// 开关标尺\nconst toggleRuler = () => {\n mainStore.setRulerState(!showRuler.value)\n}\n\n// 在鼠标绘制的范围插入元素\nconst { insertElementFromCreateSelection, formatCreateSelection } = useInsertFromCreateSelection(viewportRef)\n\n// 插入自定义任意多边形\nconst insertCustomShape = (data: CreateCustomShapeData) => {\n const {\n start,\n end,\n path,\n viewBox,\n } = data\n const position = formatCreateSelection({ start, end })\n position && createShapeElement(position, { path, viewBox })\n\n mainStore.setCreatingCustomShapeState(false)\n}\n\nconst contextmenus = (): ContextmenuItem[] => {\n return [\n {\n text: '粘贴',\n subText: 'Ctrl + V',\n handler: pasteElement,\n },\n {\n text: '全选',\n subText: 'Ctrl + A',\n handler: selectAllElement,\n },\n {\n text: '标尺',\n subText: showRuler.value ? '√' : '',\n handler: toggleRuler,\n },\n {\n text: '网格线',\n handler: () => mainStore.setGridLineSize(gridLineSize.value ? 0 : 50),\n children: [\n {\n text: '无',\n subText: gridLineSize.value === 0 ? '√' : '',\n handler: () => mainStore.setGridLineSize(0),\n },\n {\n text: '小',\n subText: gridLineSize.value === 25 ? '√' : '',\n handler: () => mainStore.setGridLineSize(25),\n },\n {\n text: '中',\n subText: gridLineSize.value === 50 ? '√' : '',\n handler: () => mainStore.setGridLineSize(50),\n },\n {\n text: '大',\n subText: gridLineSize.value === 100 ? '√' : '',\n handler: () => mainStore.setGridLineSize(100),\n },\n ],\n },\n {\n text: '重置当前页',\n handler: deleteAllElements,\n },\n { divider: true },\n {\n text: '幻灯片放映',\n subText: 'F5',\n handler: enterScreeningFromStart,\n },\n ]\n}\n\nprovide(injectKeySlideScale, canvasScale)\n\nreturn (_ctx: any,_cache: any) => {\n const _directive_contextmenu = _resolveDirective(\"contextmenu\")!\n const _directive_click_outside = _resolveDirective(\"click-outside\")!\n\n return _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n class: \"canvas\",\n ref_key: \"canvasRef\",\n ref: canvasRef,\n onWheel: _cache[4] || (_cache[4] = $event => handleMousewheelCanvas($event)),\n onMousedown: _cache[5] || (_cache[5] = $event => handleClickBlankArea($event)),\n onDblclick: _cache[6] || (_cache[6] = $event => handleDblClick($event))\n }, [\n (_unref(creatingElement))\n ? (_openBlock(), _createBlock(ElementCreateSelection, {\n key: 0,\n onCreated: _cache[0] || (_cache[0] = data => _unref(insertElementFromCreateSelection)(data))\n }))\n : _createCommentVNode(\"\", true),\n (_unref(creatingCustomShape))\n ? (_openBlock(), _createBlock(ShapeCreateCanvas, {\n key: 1,\n onCreated: _cache[1] || (_cache[1] = data => insertCustomShape(data))\n }))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", {\n class: \"viewport-wrapper\",\n style: _normalizeStyle({\n width: _unref(viewportStyles).width * _unref(canvasScale) + 'px',\n height: _unref(viewportStyles).height * _unref(canvasScale) + 'px',\n left: _unref(viewportStyles).left + 'px',\n top: _unref(viewportStyles).top + 'px',\n })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(alignmentLines.value, (line, index) => {\n return (_openBlock(), _createBlock(AlignmentLine, {\n key: index,\n type: line.type,\n axis: line.axis,\n length: line.length,\n canvasScale: _unref(canvasScale)\n }, null, 8, [\"type\", \"axis\", \"length\", \"canvasScale\"]))\n }), 128)),\n (_unref(activeElementIdList).length > 1)\n ? (_openBlock(), _createBlock(MultiSelectOperate, {\n key: 0,\n elementList: elementList.value,\n scaleMultiElement: _unref(scaleMultiElement)\n }, null, 8, [\"elementList\", \"scaleMultiElement\"]))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element) => {\n return _withDirectives((_openBlock(), _createBlock(Operate, {\n key: element.id,\n elementInfo: element,\n isSelected: _unref(activeElementIdList).includes(element.id),\n isActive: _unref(handleElementId) === element.id,\n isActiveGroupElement: _unref(activeGroupElementId) === element.id,\n isMultiSelect: _unref(activeElementIdList).length > 1,\n rotateElement: _unref(rotateElement),\n scaleElement: _unref(scaleElement),\n openLinkDialog: openLinkDialog,\n dragLineElement: _unref(dragLineElement),\n moveShapeKeypoint: _unref(moveShapeKeypoint)\n }, null, 8, [\"elementInfo\", \"isSelected\", \"isActive\", \"isActiveGroupElement\", \"isMultiSelect\", \"rotateElement\", \"scaleElement\", \"dragLineElement\", \"moveShapeKeypoint\"])), [\n [_vShow, !_unref(hiddenElementIdList).includes(element.id)]\n ])\n }), 128)),\n _createVNode(ViewportBackground)\n ]),\n _createElementVNode(\"div\", {\n class: \"viewport\",\n ref_key: \"viewportRef\",\n ref: viewportRef,\n style: _normalizeStyle({ transform: `scale(${_unref(canvasScale)})` })\n }, [\n (_unref(mouseSelectionVisible))\n ? (_openBlock(), _createBlock(MouseSelection, {\n key: 0,\n top: _unref(mouseSelection).top,\n left: _unref(mouseSelection).left,\n width: _unref(mouseSelection).width,\n height: _unref(mouseSelection).height,\n quadrant: _unref(mouseSelectionQuadrant)\n }, null, 8, [\"top\", \"left\", \"width\", \"height\", \"quadrant\"]))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element, index) => {\n return _withDirectives((_openBlock(), _createBlock(EditableElement, {\n key: element.id,\n elementInfo: element,\n elementIndex: index + 1,\n isMultiSelect: _unref(activeElementIdList).length > 1,\n selectElement: _unref(selectElement),\n openLinkDialog: openLinkDialog\n }, null, 8, [\"elementInfo\", \"elementIndex\", \"isMultiSelect\", \"selectElement\"])), [\n [_vShow, !_unref(hiddenElementIdList).includes(element.id)]\n ])\n }), 128))\n ], 4)\n ], 4),\n (_unref(spaceKeyState))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : _createCommentVNode(\"\", true),\n (_unref(showRuler))\n ? (_openBlock(), _createBlock(Ruler, {\n key: 3,\n viewportStyles: _unref(viewportStyles)\n }, null, 8, [\"viewportStyles\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(Modal, {\n visible: linkDialogVisible.value,\n \"onUpdate:visible\": _cache[3] || (_cache[3] = ($event: any) => ((linkDialogVisible).value = $event)),\n width: 540\n }, {\n default: _withCtx(() => [\n _createVNode(LinkDialog, {\n onClose: _cache[2] || (_cache[2] = ($event: any) => (linkDialogVisible.value = false))\n })\n ]),\n _: 1\n }, 8, [\"visible\"])\n ], 32)), [\n [_directive_contextmenu, contextmenus],\n [_directive_click_outside, removeEditorAreaFocus]\n ])\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=ce64755c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-ce64755c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-8603ad34\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"shape-item-thumbnail\" }\nconst _hoisted_2 = { class: \"shape-content\" }\nconst _hoisted_3 = {\n overflow: \"visible\",\n width: \"18\",\n height: \"18\"\n}\nconst _hoisted_4 = [\"transform\"]\nconst _hoisted_5 = [\"fill\", \"stroke\", \"d\"]\n\nimport type { ShapePoolItem } from '@/configs/shapes'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ShapeItemThumbnail',\n props: {\n shape: {}\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_3, [\n _createElementVNode(\"g\", {\n transform: `scale(${18 / _ctx.shape.viewBox[0]}, ${18 / _ctx.shape.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`\n }, [\n _createElementVNode(\"path\", {\n class: _normalizeClass([\"shape-path\", { 'outlined': _ctx.shape.outlined }]),\n \"vector-effect\": \"non-scaling-stroke\",\n \"stroke-linecap\": \"butt\",\n \"stroke-miterlimit\": \"8\",\n fill: _ctx.shape.outlined ? '#999' : 'transparent',\n stroke: _ctx.shape.outlined ? 'transparent' : '#999',\n \"stroke-width\": \"2\",\n d: _ctx.shape.path\n }, null, 10, _hoisted_5)\n ], 8, _hoisted_4)\n ]))\n ])\n ]))\n}\n}\n\n})","import script from \"./ShapeItemThumbnail.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapeItemThumbnail.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapeItemThumbnail.vue?vue&type=style&index=0&id=8603ad34&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8603ad34\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-8b994b42\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"shape-pool\" }\nconst _hoisted_2 = { class: \"category-name\" }\nconst _hoisted_3 = { class: \"shape-list\" }\n\nimport { SHAPE_LIST, type ShapePoolItem } from '@/configs/shapes'\nimport ShapeItemThumbnail from './ShapeItemThumbnail.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ShapePool',\n emits: [\"select\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\n\nconst selectShape = (shape: ShapePoolItem) => {\n emit('select', shape)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(SHAPE_LIST), (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"category\",\n key: item.type\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(item.type), 1),\n _createElementVNode(\"div\", _hoisted_3, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.children, (shape, index) => {\n return (_openBlock(), _createBlock(ShapeItemThumbnail, {\n class: \"shape-item\",\n key: index,\n shape: shape,\n onClick: ($event: any) => (selectShape(shape))\n }, null, 8, [\"shape\", \"onClick\"]))\n }), 128))\n ])\n ]))\n }), 128))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ShapePool.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ShapePool.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ShapePool.vue?vue&type=style&index=0&id=8b994b42&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8b994b42\"]])\n\nexport default __exports__","import type { LinePoint } from '@/types/slides'\n\n\nexport interface LinePoolItem {\n path: string\n style: 'solid' | 'dashed'\n points: [LinePoint, LinePoint]\n isBroken?: boolean\n isCurve?: boolean\n isCubic?: boolean\n}\n\ninterface PresetLine {\n type: string\n children: LinePoolItem[]\n}\n\nexport const LINE_LIST: PresetLine[] = [\n {\n type: '直线',\n children: [\n { path: 'M 0 0 L 20 20', style: 'solid', points: ['', ''] },\n { path: 'M 0 0 L 20 20', style: 'dashed', points: ['', ''] },\n { path: 'M 0 0 L 20 20', style: 'solid', points: ['', 'arrow'] },\n { path: 'M 0 0 L 20 20', style: 'dashed', points: ['', 'arrow'] },\n { path: 'M 0 0 L 20 20', style: 'solid', points: ['', 'dot'] },\n ],\n },\n {\n type: '折线、曲线',\n children: [\n { path: 'M 0 0 L 0 20 L 20 20', style: 'solid', points: ['', 'arrow'], isBroken: true },\n { path: 'M 0 0 Q 0 20 20 20', style: 'solid', points: ['', 'arrow'], isCurve: true },\n { path: 'M 0 0 C 20 0 0 20 20 20', style: 'solid', points: ['', 'arrow'], isCubic: true },\n ],\n },\n]","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-554824b6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"line-pool\" }\nconst _hoisted_2 = { class: \"category-name\" }\nconst _hoisted_3 = { class: \"line-list\" }\nconst _hoisted_4 = [\"onClick\"]\nconst _hoisted_5 = {\n overflow: \"visible\",\n width: \"20\",\n height: \"20\"\n}\nconst _hoisted_6 = [\"d\", \"stroke-dasharray\", \"marker-start\", \"marker-end\"]\n\nimport { LINE_LIST, type LinePoolItem } from '@/configs/lines'\n\nimport LinePointMarker from '@/views/components/element/LineElement/LinePointMarker.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'LinePool',\n emits: [\"select\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\n\nconst selectLine = (line: LinePoolItem) => {\n emit('select', line)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(LINE_LIST), (item, i) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"category\",\n key: item.type\n }, [\n _createElementVNode(\"div\", _hoisted_2, _toDisplayString(item.type), 1),\n _createElementVNode(\"div\", _hoisted_3, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.children, (line, j) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"line-item\",\n key: j\n }, [\n _createElementVNode(\"div\", {\n class: \"line-content\",\n onClick: ($event: any) => (selectLine(line))\n }, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_5, [\n _createElementVNode(\"defs\", null, [\n (line.points[0])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 0,\n class: \"line-marker\",\n id: `preset-line-${i}-${j}`,\n position: \"start\",\n type: line.points[0],\n color: \"currentColor\",\n baseSize: 2\n }, null, 8, [\"id\", \"type\"]))\n : _createCommentVNode(\"\", true),\n (line.points[1])\n ? (_openBlock(), _createBlock(LinePointMarker, {\n key: 1,\n class: \"line-marker\",\n id: `preset-line-${i}-${j}`,\n position: \"end\",\n type: line.points[1],\n color: \"currentColor\",\n baseSize: 2\n }, null, 8, [\"id\", \"type\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"path\", {\n class: \"line-path\",\n d: line.path,\n stroke: \"currentColor\",\n fill: \"none\",\n \"stroke-width\": \"2\",\n \"stroke-dasharray\": line.style === 'solid' ? '0, 0' : '4, 1',\n \"marker-start\": line.points[0] ? `url(#${`preset-line-${i}-${j}`}-${line.points[0]}-start)` : '',\n \"marker-end\": line.points[1] ? `url(#${`preset-line-${i}-${j}`}-${line.points[1]}-end)` : ''\n }, null, 8, _hoisted_6)\n ]))\n ], 8, _hoisted_4)\n ]))\n }), 128))\n ])\n ]))\n }), 128))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./LinePool.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LinePool.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./LinePool.vue?vue&type=style&index=0&id=554824b6&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-554824b6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-398f5699\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"chart-pool\" }\nconst _hoisted_2 = [\"onClick\"]\n\nimport type { PresetChartType } from '@/types/slides'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ChartPool',\n emits: [\"select\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\n\nconst chartList: PresetChartType[] = ['bar', 'horizontalBar', 'line', 'area', 'scatter', 'pie', 'ring']\n\nconst selectChart = (chart: PresetChartType) => {\n emit('select', chart)\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconChartLine = _resolveComponent(\"IconChartLine\")!\n const _component_IconChartHistogram = _resolveComponent(\"IconChartHistogram\")!\n const _component_IconChartPie = _resolveComponent(\"IconChartPie\")!\n const _component_IconChartHistogramOne = _resolveComponent(\"IconChartHistogramOne\")!\n const _component_IconChartLineArea = _resolveComponent(\"IconChartLineArea\")!\n const _component_IconChartRing = _resolveComponent(\"IconChartRing\")!\n const _component_IconChartScatter = _resolveComponent(\"IconChartScatter\")!\n\n return (_openBlock(), _createElementBlock(\"ul\", _hoisted_1, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(chartList, (chart, index) => {\n return _createElementVNode(\"li\", {\n class: \"chart-item\",\n key: index\n }, [\n _createElementVNode(\"div\", {\n class: \"chart-content\",\n onClick: ($event: any) => (selectChart(chart))\n }, [\n (chart === 'line')\n ? (_openBlock(), _createBlock(_component_IconChartLine, {\n key: 0,\n size: \"24\"\n }))\n : (chart === 'bar')\n ? (_openBlock(), _createBlock(_component_IconChartHistogram, {\n key: 1,\n size: \"24\"\n }))\n : (chart === 'pie')\n ? (_openBlock(), _createBlock(_component_IconChartPie, {\n key: 2,\n size: \"24\"\n }))\n : (chart === 'horizontalBar')\n ? (_openBlock(), _createBlock(_component_IconChartHistogramOne, {\n key: 3,\n size: \"24\"\n }))\n : (chart === 'area')\n ? (_openBlock(), _createBlock(_component_IconChartLineArea, {\n key: 4,\n size: \"24\"\n }))\n : (chart === 'ring')\n ? (_openBlock(), _createBlock(_component_IconChartRing, {\n key: 5,\n size: \"24\"\n }))\n : (chart === 'scatter')\n ? (_openBlock(), _createBlock(_component_IconChartScatter, {\n key: 6,\n size: \"24\"\n }))\n : _createCommentVNode(\"\", true)\n ], 8, _hoisted_2)\n ])\n }), 64))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ChartPool.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ChartPool.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ChartPool.vue?vue&type=style&index=0&id=398f5699&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-398f5699\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, vModelText as _vModelText, withKeys as _withKeys, withDirectives as _withDirectives, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-268948c2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"prefix\" }\nconst _hoisted_2 = { class: \"input-wrap\" }\nconst _hoisted_3 = [\"disabled\", \"placeholder\"]\nconst _hoisted_4 = { class: \"handlers\" }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n fill: \"currentColor\",\n width: \"1em\",\n height: \"1em\",\n viewBox: \"64 64 896 896\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", { d: \"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z\" })\n], -1))\nconst _hoisted_6 = [\n _hoisted_5\n]\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"svg\", {\n fill: \"currentColor\",\n width: \"1em\",\n height: \"1em\",\n viewBox: \"64 64 896 896\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", { d: \"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z\" })\n], -1))\nconst _hoisted_8 = [\n _hoisted_7\n]\nconst _hoisted_9 = { class: \"suffix\" }\n\nimport { ref, watch } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'NumberInput',\n props: {\n value: {},\n disabled: { type: Boolean, default: false },\n placeholder: { default: '' },\n min: { default: 0 },\n max: { default: Infinity },\n step: { default: 1 }\n },\n emits: [\"update:value\", \"input\", \"change\", \"blur\", \"focus\", \"enter\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst number = ref(0)\nconst focused = ref(false)\n\nwatch(() => props.value, () => {\n if (props.value !== number.value) {\n number.value = props.value\n }\n}, {\n immediate: true,\n})\n\nwatch(number, () => {\n let value = +number.value\n if (isNaN(value)) value = props.min\n else if (value > props.max) value = props.max\n else if (value < props.min) value = props.min\n\n number.value = value\n emit('update:value', number.value)\n})\n\nconst handleBlur = (e: Event) => {\n focused.value = false\n emit('blur', e)\n}\nconst handleFocus = (e: Event) => {\n focused.value = true\n emit('focus', e)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"number-input\", {\n 'disabled': _ctx.disabled,\n 'focused': focused.value,\n }])\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prefix\")\n ]),\n _createElementVNode(\"div\", _hoisted_2, [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"text\",\n disabled: _ctx.disabled,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((number).value = $event)),\n placeholder: _ctx.placeholder,\n onInput: _cache[1] || (_cache[1] = $event => emit('input', $event)),\n onFocus: _cache[2] || (_cache[2] = $event => handleFocus($event)),\n onBlur: _cache[3] || (_cache[3] = $event => handleBlur($event)),\n onChange: _cache[4] || (_cache[4] = $event => emit('change', $event)),\n onKeydown: _cache[5] || (_cache[5] = _withKeys($event => emit('enter', $event), [\"enter\"]))\n }, null, 40, _hoisted_3), [\n [_vModelText, number.value]\n ]),\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"span\", {\n class: \"handler\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (number.value += _ctx.step))\n }, _hoisted_6),\n _createElementVNode(\"span\", {\n class: \"handler\",\n onClick: _cache[7] || (_cache[7] = ($event: any) => (number.value -= _ctx.step))\n }, _hoisted_8)\n ])\n ]),\n _createElementVNode(\"span\", _hoisted_9, [\n _renderSlot(_ctx.$slots, \"suffix\")\n ])\n ], 2))\n}\n}\n\n})","\n\n\n\n","import script from \"./NumberInput.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./NumberInput.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./NumberInput.vue?vue&type=style&index=0&id=268948c2&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-268948c2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-372c6730\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"table-generator\" }\nconst _hoisted_2 = { class: \"title\" }\nconst _hoisted_3 = { class: \"lef\" }\nconst _hoisted_4 = [\"onMouseenter\"]\nconst _hoisted_5 = {\n key: 1,\n class: \"custom\"\n}\nconst _hoisted_6 = { class: \"row\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", {\n class: \"label\",\n style: {\"width\":\"25%\"}\n}, \"行数:\", -1))\nconst _hoisted_8 = { class: \"row\" }\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", {\n class: \"label\",\n style: {\"width\":\"25%\"}\n}, \"列数:\", -1))\nconst _hoisted_10 = { class: \"btns\" }\n\nimport { ref } from 'vue'\nimport message from '@/utils/message'\nimport Button from '@/components/Button.vue'\nimport NumberInput from '@/components/NumberInput.vue'\n\ninterface InsertData {\n row: number\n col: number\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'TableGenerator',\n emits: [\"insert\", \"close\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\n\nconst endCell = ref([])\nconst customRow = ref(3)\nconst customCol = ref(3)\nconst isCustom = ref(false)\n\nconst handleClickTable = () => {\n if (!endCell.value.length) return\n const [row, col] = endCell.value\n emit('insert', { row, col })\n}\n\nconst insertCustomTable = () => {\n if (customRow.value < 1 || customRow.value > 20) return message.warning('行数/列数必须在0~20之间!')\n if (customCol.value < 1 || customCol.value > 20) return message.warning('行数/列数必须在0~20之间!')\n emit('insert', { row: customRow.value, col: customCol.value })\n isCustom.value = false\n}\n\nconst close = () => {\n emit('close')\n isCustom.value = false\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, \"表格 \" + _toDisplayString(endCell.value.length ? `${endCell.value[0]} x ${endCell.value[1]}` : ''), 1),\n _createElementVNode(\"div\", {\n class: \"right\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (isCustom.value = !isCustom.value))\n }, _toDisplayString(isCustom.value ? '返回' : '自定义'), 1)\n ]),\n (!isCustom.value)\n ? (_openBlock(), _createElementBlock(\"table\", {\n key: 0,\n onMouseleave: _cache[1] || (_cache[1] = ($event: any) => (endCell.value = [])),\n onClick: _cache[2] || (_cache[2] = ($event: any) => (handleClickTable()))\n }, [\n _createElementVNode(\"tbody\", null, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(10, (row) => {\n return _createElementVNode(\"tr\", { key: row }, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(10, (col) => {\n return _createElementVNode(\"td\", {\n onMouseenter: ($event: any) => (endCell.value = [row, col]),\n key: col\n }, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"cell\", { 'active': endCell.value.length && row <= endCell.value[0] && col <= endCell.value[1] }])\n }, null, 2)\n ], 40, _hoisted_4)\n }), 64))\n ])\n }), 64))\n ])\n ], 32))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", _hoisted_6, [\n _hoisted_7,\n _createVNode(NumberInput, {\n min: 1,\n max: 20,\n value: customRow.value,\n \"onUpdate:value\": _cache[3] || (_cache[3] = ($event: any) => ((customRow).value = $event)),\n style: {\"width\":\"75%\"}\n }, null, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _hoisted_9,\n _createVNode(NumberInput, {\n min: 1,\n max: 20,\n value: customCol.value,\n \"onUpdate:value\": _cache[4] || (_cache[4] = ($event: any) => ((customCol).value = $event)),\n style: {\"width\":\"75%\"}\n }, null, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_10, [\n _createVNode(Button, {\n class: \"btn\",\n onClick: _cache[5] || (_cache[5] = ($event: any) => (close()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n class: \"btn\",\n type: \"primary\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (insertCustomTable()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ]))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./TableGenerator.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TableGenerator.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./TableGenerator.vue?vue&type=style&index=0&id=372c6730&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-372c6730\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createElementVNode as _createElementVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-35a1214c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"media-input\" }\nconst _hoisted_2 = { class: \"btns\" }\nconst _hoisted_3 = { class: \"btns\" }\n\nimport { ref } from 'vue'\nimport message from '@/utils/message'\nimport Tabs from '@/components/Tabs.vue'\nimport Input from '@/components/Input.vue'\nimport Button from '@/components/Button.vue'\n\ntype TypeKey = 'video' | 'audio'\ninterface TabItem {\n key: TypeKey\n label: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MediaInput',\n emits: [\"insertVideo\", \"insertAudio\", \"close\"],\n setup(__props, { emit: __emit }) {\n\nconst emit = __emit\n\nconst type = ref('video')\n\nconst videoSrc = ref('https://mazwai.com/videvo_files/video/free/2019-01/small_watermarked/181004_04_Dolphins-Whale_06_preview.webm')\nconst audioSrc = ref('https://freesound.org/data/previews/614/614107_11861866-lq.mp3')\n\nconst tabs: TabItem[] = [\n { key: 'video', label: '视频' },\n { key: 'audio', label: '音频' },\n]\n\nconst insertVideo = () => {\n if (!videoSrc.value) return message.error('请先输入正确的视频地址')\n emit('insertVideo', videoSrc.value)\n}\n\nconst insertAudio = () => {\n if (!audioSrc.value) return message.error('请先输入正确的音频地址')\n emit('insertAudio', audioSrc.value)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: type.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((type).value = $event)),\n tabsStyle: { marginBottom: '15px' }\n }, null, 8, [\"value\"]),\n (type.value === 'video')\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n _createVNode(Input, {\n value: videoSrc.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((videoSrc).value = $event)),\n placeholder: \"请输入视频地址,e.g. https://xxx.mp4\"\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Button, {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (emit('close'))),\n style: {\"margin-right\":\"10px\"}\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n type: \"primary\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (insertVideo()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ], 64))\n : _createCommentVNode(\"\", true),\n (type.value === 'audio')\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n _createVNode(Input, {\n value: audioSrc.value,\n \"onUpdate:value\": _cache[4] || (_cache[4] = ($event: any) => ((audioSrc).value = $event)),\n placeholder: \"请输入音频地址,e.g. https://xxx.mp3\"\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createVNode(Button, {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (emit('close'))),\n style: {\"margin-right\":\"10px\"}\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n type: \"primary\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (insertAudio()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确认\")\n ]),\n _: 1\n })\n ])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./MediaInput.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MediaInput.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MediaInput.vue?vue&type=style&index=0&id=35a1214c&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-35a1214c\"]])\n\nexport default __exports__","import { hfmath, CONFIG as hfmathConfig } from 'hfmath'\n\nhfmathConfig.SUB_SUP_SCALE = 0.5\n\nexport { hfmath }","export const FORMULA_LIST = [\n {\n label: '高斯公式',\n latex: `\\\\int\\\\int\\\\int _ { \\\\Omega } \\\\left( \\\\frac { \\\\partial {P} } { \\\\partial {x} } + \\\\frac { \\\\partial {Q} } { \\\\partial {y} } + \\\\frac { \\\\partial {R} }{ \\\\partial {z} } \\\\right) \\\\mathrm { d } V = \\\\oint _ { \\\\partial \\\\Omega } ( P \\\\cos \\\\alpha + Q \\\\cos \\\\beta + R \\\\cos \\\\gamma ) \\\\mathrm{ d} S`\n },\n {\n label: '傅里叶级数',\n latex: `f(x) = \\\\frac {a_0} 2 + \\\\sum_{n = 1}^\\\\infty {({a_n}\\\\cos {nx} + {b_n}\\\\sin {nx})}`,\n },\n {\n label: '泰勒展开式',\n latex: `e ^ { x } = 1 + \\\\frac { x } { 1 ! } + \\\\frac { x ^ { 2 } } { 2 ! } + \\\\frac { x ^ { 3 } } { 3 ! } + ... , \\\\quad - \\\\infty < x < \\\\infty`,\n },\n {\n label: '定积分',\n latex: `\\\\lim_ { n \\\\rightarrow + \\\\infty } \\\\sum _ { i = 1 } ^ { n } f \\\\left[ a + \\\\frac { i } { n } ( b - a ) \\\\right] \\\\frac { b - a } { n } = \\\\int _ { a } ^ { b } f ( x ) dx`,\n },\n {\n label: '三角恒等式1',\n latex: `\\\\sin \\\\alpha \\\\pm \\\\sin \\\\beta = 2 \\\\sin \\\\frac { 1 } { 2 } ( \\\\alpha \\\\pm \\\\beta ) \\\\cos \\\\frac { 1 } { 2 } ( \\\\alpha \\\\mp \\\\beta )`,\n },\n {\n label: '三角恒等式2',\n latex: `\\\\cos \\\\alpha + \\\\cos \\\\beta = 2 \\\\cos \\\\frac { 1 } { 2 } ( \\\\alpha + \\\\beta ) \\\\cos \\\\frac { 1 } { 2 } ( \\\\alpha - \\\\beta )`,\n },\n {\n label: '和的展开式',\n latex: `( 1 + x ) ^ { n } = 1 + \\\\frac { n x } { 1 ! } + \\\\frac { n ( n - 1 ) x ^ { 2 } } { 2 ! } + ...`,\n },\n {\n label: '欧拉公式',\n latex: ` e^{ix} = \\\\cos {x} + i\\\\sin {x}`,\n },\n {\n label: '贝努利方程',\n latex: `\\\\frac {dy} {dx} + P(x)y = Q(x) y^n ({n} \\\\not= {0,1})`,\n },\n {\n label: '全微分方程',\n latex: `du(x,y) = P(x,y)dx + Q(x,y)dy = 0`,\n },\n {\n label: '非齐次方程',\n latex: `y = (\\\\int Q(x) e^{\\\\int {P(x)dx}}dx + C)e^{-\\\\int {P(x)dx}}`,\n },\n {\n label: '柯西中值定理',\n latex: `\\\\frac{{f(b) - f(a)}}{{F(b) - F(a)}} = \\\\frac{{f'(\\\\xi )}}{{F'(\\\\xi )}}`,\n },\n {\n label: '拉格朗日中值定理',\n latex: `f(b) - f(a) = f'(\\\\xi )(b - a)`,\n },\n {\n label: '导数公式',\n latex: `(\\\\arcsin x)' = \\\\frac{1}{{\\\\sqrt {1 - x^2} }}`,\n },\n {\n label: '三角函数积分',\n latex: `\\\\int {tgxdx = - \\\\ln \\\\left| {\\\\cos x} \\\\right| + C}`,\n },\n {\n label: '二次曲面',\n latex: `\\\\frac{{{x^2}}}{{{a^2}}} + \\\\frac{{{y^2}}}{{{b^2}}} - \\\\frac{{{z^2}}}{{{c^2}}} = 1`,\n },\n {\n label: '二阶微分',\n latex: `\\\\frac {{d^2}y} {dx^2} + P(x) \\\\frac {dy} {dx} + Q(x)y = f(x)`,\n },\n {\n label: '方向导数',\n latex: `\\\\frac{{\\\\partial f}}{{\\\\partial l}} = \\\\frac{{\\\\partial f}}{{\\\\partial x}}\\\\cos \\\\phi + \\\\frac{{\\\\partial f}}{{\\\\partial y}}\\\\sin \\\\phi`,\n },\n]\n\nexport const SYMBOL_LIST = [\n {\n type: 'operators',\n label: '数学',\n children: [\n { latex: '\\\\cdot' },\n { latex: '\\\\pm' },\n { latex: '\\\\mp' },\n { latex: '+' },\n { latex: '-' },\n { latex: '\\\\times' },\n { latex: '\\\\div' },\n { latex: '<' },\n { latex: '>' },\n { latex: '=' },\n { latex: '\\\\neq\\\\ne' },\n { latex: '\\\\leqq' },\n { latex: '\\\\geqq' },\n { latex: '\\\\leq' },\n { latex: '\\\\geq' },\n { latex: '\\\\propto' },\n { latex: '\\\\sim' },\n { latex: '\\\\equiv' },\n { latex: '\\\\dagger' },\n { latex: '\\\\ddagger' },\n { latex: '\\\\ell' },\n { latex: '\\\\#' },\n { latex: '\\\\$' },\n { latex: '\\\\&' },\n { latex: '\\\\%' },\n { latex: '\\\\langle\\\\rangle' },\n { latex: '()' },\n { latex: '[]' },\n { latex: '\\\\{\\\\}' },\n { latex: '||' },\n { latex: '\\\\|' },\n { latex: '\\\\exists' },\n { latex: '\\\\in' },\n { latex: '\\\\subset' },\n { latex: '\\\\supset' },\n { latex: '\\\\cup' },\n { latex: '\\\\cap' },\n { latex: '\\\\infty' },\n { latex: '\\\\partial' },\n { latex: '\\\\nabla' },\n { latex: '\\\\aleph' },\n { latex: '\\\\wp' },\n { latex: '\\\\therefore' },\n { latex: '\\\\mid' },\n { latex: '\\\\sum' },\n { latex: '\\\\prod' },\n { latex: '\\\\bigoplus' },\n { latex: '\\\\bigodot' },\n { latex: '\\\\int' },\n { latex: '\\\\oint' },\n { latex: '\\\\oplus' },\n { latex: '\\\\odot' },\n { latex: '\\\\perp' },\n { latex: '\\\\angle' },\n { latex: '\\\\triangle' },\n { latex: '\\\\Box' },\n { latex: '\\\\rightarrow' },\n { latex: '\\\\to' },\n { latex: '\\\\leftarrow' },\n { latex: '\\\\gets' },\n { latex: '\\\\circ' },\n { latex: '\\\\bigcirc' },\n { latex: '\\\\bullet' },\n { latex: '\\\\star' },\n { latex: '\\\\diamond' },\n { latex: '\\\\ast' },\n { latex: ',' },\n { latex: '.' },\n { latex: ';' },\n { latex: '!' },\n ],\n },\n {\n type: 'group',\n label: '组合',\n children: [\n { latex: '\\\\frac{a}{b}' },\n { latex: '\\\\frac{dx}{dx}' },\n { latex: '\\\\frac{\\\\partial a}{\\\\partial b}' },\n { latex: '\\\\sqrt{x}' },\n { latex: '\\\\sqrt[n]{x}' },\n { latex: 'x^{n}' },\n { latex: 'x_{n}' },\n { latex: 'x_a^b' },\n { latex: '\\\\int_{a}^{b}' },\n { latex: '\\\\oint_a^b' },\n { latex: '\\\\lim_{a \\\\rightarrow b}' },\n { latex: '\\\\prod_a^b' },\n { latex: '\\\\sum_a^b' },\n { latex: '\\\\left(\\\\begin{array}a \\\\\\\\ b\\\\end{array}\\\\right)' },\n { latex: '\\\\begin{bmatrix}a & b \\\\\\\\ c & d \\\\end{bmatrix}' },\n { latex: '\\\\begin{cases}a & x = 0 \\\\\\\\ b & x > 0\\\\end{cases}' },\n { latex: '\\\\hat{a}' },\n { latex: '\\\\breve{a}' },\n { latex: '\\\\acute{a}' },\n { latex: '\\\\grave{a}' },\n { latex: '\\\\tilde{a}' },\n { latex: '\\\\bar{a}' },\n { latex: '\\\\vec{a}' },\n { latex: '\\\\underline{a}' },\n { latex: '\\\\overline{a}' },\n { latex: '\\\\widehat{ab}' },\n { latex: '\\\\overleftarrow{ab}' },\n { latex: '\\\\overrightarrow{ab}' },\n ],\n },\n {\n type: 'verbatim',\n label: '函数',\n children: [\n { latex: '\\\\log' },\n { latex: '\\\\ln' },\n { latex: '\\\\exp' },\n { latex: '\\\\mod' },\n { latex: '\\\\lim' },\n { latex: '\\\\sin' },\n { latex: '\\\\cos' },\n { latex: '\\\\tan' },\n { latex: '\\\\csc' },\n { latex: '\\\\sec' },\n { latex: '\\\\cot' },\n { latex: '\\\\sinh' },\n { latex: '\\\\cosh' },\n { latex: '\\\\tanh' },\n { latex: '\\\\csch' },\n { latex: '\\\\sech' },\n { latex: '\\\\coth' },\n { latex: '\\\\arcsin' },\n { latex: '\\\\arccos' },\n { latex: '\\\\arctan' },\n { latex: '\\\\arccsc' },\n { latex: '\\\\arcsec' },\n { latex: '\\\\arccot' },\n ],\n },\n {\n type: 'greek',\n label: '希腊字母',\n children: [\n { latex: '\\\\alpha' },\n { latex: '\\\\beta' },\n { latex: '\\\\gamma' },\n { latex: '\\\\delta' },\n { latex: '\\\\varepsilon' },\n { latex: '\\\\zeta' },\n { latex: '\\\\eta' },\n { latex: '\\\\vartheta' },\n { latex: '\\\\iota' },\n { latex: '\\\\kappa' },\n { latex: '\\\\lambda' },\n { latex: '\\\\mu' },\n { latex: '\\\\nu' },\n { latex: '\\\\xi' },\n { latex: '\\\\omicron' },\n { latex: '\\\\pi' },\n { latex: '\\\\rho' },\n { latex: '\\\\sigma' },\n { latex: '\\\\tau' },\n { latex: '\\\\upsilon' },\n { latex: '\\\\varphi' },\n { latex: '\\\\chi' },\n { latex: '\\\\psi' },\n { latex: '\\\\omega' },\n { latex: '\\\\epsilon' },\n { latex: '\\\\theta' },\n { latex: '\\\\phi' },\n { latex: '\\\\varsigma' },\n { latex: '\\\\Alpha' },\n { latex: '\\\\Beta' },\n { latex: '\\\\Gamma' },\n { latex: '\\\\Delta' },\n { latex: '\\\\Epsilon' },\n { latex: '\\\\Zeta' },\n { latex: '\\\\Eta' },\n { latex: '\\\\Theta' },\n { latex: '\\\\Iota' },\n { latex: '\\\\Kappa' },\n { latex: '\\\\Lambda' },\n { latex: '\\\\Mu' },\n { latex: '\\\\Nu' },\n { latex: '\\\\Xi' },\n { latex: '\\\\Omicron' },\n { latex: '\\\\Pi' },\n { latex: '\\\\Rho' },\n { latex: '\\\\Sigma' },\n { latex: '\\\\Tau' },\n { latex: '\\\\Upsilon' },\n { latex: '\\\\Phi' },\n { latex: '\\\\Chi' },\n { latex: '\\\\Psi' },\n { latex: '\\\\Omega' },\n ],\n },\n]","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-567417d3\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"width\", \"height\"]\nconst _hoisted_2 = [\"transform\"]\nconst _hoisted_3 = [\"d\"]\n\nimport { computed, ref, watch } from 'vue'\nimport { hfmath } from './hfmath'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'FormulaContent',\n props: {\n latex: {},\n width: {},\n height: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst box = ref({ x: 0, y: 0, w: 0, h: 0 })\nconst pathd = ref('')\n\nwatch(() => props.latex, () => {\n const eq = new hfmath(props.latex)\n pathd.value = eq.pathd({})\n box.value = eq.box({})\n}, { immediate: true })\n\nconst scale = computed(() => {\n const boxW = box.value.w + 32\n const boxH = box.value.h + 32\n\n if (boxW > props.width || boxH > props.height) {\n if (boxW / boxH > props.width / props.height) return props.width / boxW\n return props.height / boxH\n }\n return 1\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"svg\", {\n class: \"formula-content\",\n overflow: \"visible\",\n width: box.value.w + 32,\n height: box.value.h + 32,\n stroke: \"#000\",\n \"stroke-width\": \"1\",\n fill: \"none\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\"\n }, [\n _createElementVNode(\"g\", {\n transform: `scale(${scale.value}, ${scale.value}) translate(0,0) matrix(1,0,0,1,0,0)`,\n \"transform-origin\": \"0 50%\"\n }, [\n _createElementVNode(\"path\", { d: pathd.value }, null, 8, _hoisted_3)\n ], 8, _hoisted_2)\n ], 8, _hoisted_1))\n}\n}\n\n})","\n\n\n\n","import script from \"./FormulaContent.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./FormulaContent.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./FormulaContent.vue?vue&type=style&index=0&id=567417d3&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-567417d3\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"innerHTML\"]\n\nimport { computed } from 'vue'\nimport { hfmath } from './hfmath'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'SymbolContent',\n props: {\n latex: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst svg = computed(() => {\n const eq = new hfmath(props.latex)\n return eq.svg({\n SCALE_X: 10,\n SCALE_Y: 10,\n })\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"symbol-content\",\n innerHTML: svg.value\n }, null, 8, _hoisted_1))\n}\n}\n\n})","\n\n\n","import script from \"./SymbolContent.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./SymbolContent.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-65d72404\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"disabled\", \"value\", \"rows\", \"placeholder\"]\n\nimport { ref } from 'vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'TextArea',\n props: {\n value: {},\n rows: { default: 4 },\n disabled: { type: Boolean, default: false },\n resizable: { type: Boolean, default: false },\n placeholder: { default: '' }\n },\n emits: [\"update:value\"],\n setup(__props: any, { expose: __expose, emit: __emit }) {\n\n\n\nconst emit = __emit\n\nconst handleInput = (e: Event) => {\n emit('update:value', (e.target as HTMLInputElement).value)\n}\n\nconst textareaRef = ref()\nconst focus = () => {\n if (textareaRef.value) textareaRef.value.focus()\n}\n\n__expose({\n focus,\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"textarea\", {\n class: _normalizeClass([\"textarea\", {\n 'disabled': _ctx.disabled,\n 'resizable': _ctx.resizable,\n }]),\n ref_key: \"textareaRef\",\n ref: textareaRef,\n disabled: _ctx.disabled,\n value: _ctx.value,\n rows: _ctx.rows,\n placeholder: _ctx.placeholder,\n onInput: _cache[0] || (_cache[0] = $event => handleInput($event))\n }, null, 42, _hoisted_1))\n}\n}\n\n})","\n\n\n\n","import script from \"./TextArea.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./TextArea.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./TextArea.vue?vue&type=style&index=0&id=65d72404&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-65d72404\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-49a14edf\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"latex-editor\" }\nconst _hoisted_2 = { class: \"container\" }\nconst _hoisted_3 = { class: \"left\" }\nconst _hoisted_4 = { class: \"input-area\" }\nconst _hoisted_5 = { class: \"preview\" }\nconst _hoisted_6 = {\n key: 0,\n class: \"placeholder\"\n}\nconst _hoisted_7 = {\n key: 1,\n class: \"preview-content\"\n}\nconst _hoisted_8 = { class: \"right\" }\nconst _hoisted_9 = { class: \"content\" }\nconst _hoisted_10 = {\n key: 0,\n class: \"symbol\"\n}\nconst _hoisted_11 = { class: \"symbol-pool\" }\nconst _hoisted_12 = [\"onClick\"]\nconst _hoisted_13 = {\n key: 1,\n class: \"formula\"\n}\nconst _hoisted_14 = { class: \"formula-title\" }\nconst _hoisted_15 = [\"onClick\"]\nconst _hoisted_16 = { class: \"footer\" }\n\nimport { computed, onMounted, ref } from 'vue'\nimport { hfmath } from './hfmath'\nimport { FORMULA_LIST, SYMBOL_LIST } from '@/configs/latex'\nimport message from '@/utils/message'\n\nimport FormulaContent from './FormulaContent.vue'\nimport SymbolContent from './SymbolContent.vue'\nimport Button from '../Button.vue'\nimport TextArea from '../TextArea.vue'\nimport Tabs from '../Tabs.vue'\n\ninterface TabItem {\n key: 'symbol' | 'formula'\n label: string\n}\n\ninterface LatexResult {\n latex: string\n path: string\n w: number\n h: number\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n value: { default: '' }\n },\n emits: [\"update\", \"close\"],\n setup(__props: any, { emit: __emit }) {\n\nconst tabs: TabItem[] = [\n { label: '常用符号', key: 'symbol' },\n { label: '预置公式', key: 'formula' },\n]\n\nconst props = __props\n\nconst emit = __emit\n\nconst formulaList = FORMULA_LIST\n\nconst symbolTabs = SYMBOL_LIST.map(item => ({\n label: item.label,\n key: item.type,\n}))\n\nconst latex = ref('')\nconst toolbarState = ref<'symbol' | 'formula'>('symbol')\nconst textAreaRef = ref>()\n\nconst selectedSymbolKey = ref(SYMBOL_LIST[0].type)\nconst symbolPool = computed(() => {\n const selectedSymbol = SYMBOL_LIST.find(item => item.type === selectedSymbolKey.value)\n return selectedSymbol?.children || []\n})\n\nonMounted(() => {\n if (props.value) latex.value = props.value\n})\n\nconst update = () => {\n if (!latex.value) return message.error('公式不能为空')\n\n const eq = new hfmath(latex.value)\n const pathd = eq.pathd({})\n const box = eq.box({})\n \n emit('update', {\n latex: latex.value,\n path: pathd,\n w: box.w + 32,\n h: box.h + 32,\n })\n}\n\nconst insertSymbol = (latex: string) => {\n if (!textAreaRef.value) return\n textAreaRef.value.focus()\n document.execCommand('insertText', false, latex)\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(TextArea, {\n value: latex.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((latex).value = $event)),\n placeholder: \"输入 LaTeX 公式\",\n ref_key: \"textAreaRef\",\n ref: textAreaRef\n }, null, 8, [\"value\"])\n ]),\n _createElementVNode(\"div\", _hoisted_5, [\n (!latex.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, \"公式预览\"))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n _createVNode(FormulaContent, {\n width: 518,\n height: 138,\n latex: latex.value\n }, null, 8, [\"latex\"])\n ]))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: toolbarState.value,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((toolbarState).value = $event)),\n card: \"\"\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_9, [\n (toolbarState.value === 'symbol')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n _createVNode(Tabs, {\n tabs: _unref(symbolTabs),\n value: selectedSymbolKey.value,\n \"onUpdate:value\": _cache[2] || (_cache[2] = ($event: any) => ((selectedSymbolKey).value = $event)),\n spaceBetween: \"\",\n tabsStyle: { margin: '10px 10px 0' }\n }, null, 8, [\"tabs\", \"value\"]),\n _createElementVNode(\"div\", _hoisted_11, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(symbolPool.value, (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"symbol-item\",\n key: item.latex,\n onClick: ($event: any) => (insertSymbol(item.latex))\n }, [\n _createVNode(SymbolContent, {\n latex: item.latex\n }, null, 8, [\"latex\"])\n ], 8, _hoisted_12))\n }), 128))\n ])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_13, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(formulaList), (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"formula-item\",\n key: item.label\n }, [\n _createElementVNode(\"div\", _hoisted_14, _toDisplayString(item.label), 1),\n _createElementVNode(\"div\", {\n class: \"formula-item-content\",\n onClick: ($event: any) => (latex.value = item.latex)\n }, [\n _createVNode(FormulaContent, {\n width: 236,\n height: 60,\n latex: item.latex\n }, null, 8, [\"latex\"])\n ], 8, _hoisted_15)\n ]))\n }), 128))\n ]))\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_16, [\n _createVNode(Button, {\n class: \"btn\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('close')))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"取消\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n class: \"btn\",\n type: \"primary\",\n onClick: _cache[4] || (_cache[4] = ($event: any) => (update()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"确定\")\n ]),\n _: 1\n })\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./SlideToolbar.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./SlideToolbar.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./SlideToolbar.vue?vue&type=style&index=0&id=24150aba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-24150aba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, unref as _unref, resolveComponent as _resolveComponent, withCtx as _withCtx, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-f3d1ac70\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"element-toolbar\" }\nconst _hoisted_2 = { class: \"content\" }\nconst _hoisted_3 = {\n key: 0,\n class: \"style\"\n}\nconst _hoisted_4 = { class: \"row-block\" }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"label\" }, \"文字颜色:\", -1))\nconst _hoisted_6 = { class: \"colors\" }\nconst _hoisted_7 = [\"onClick\"]\nconst _hoisted_8 = { class: \"row-block\" }\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"label\" }, \"填充色:\", -1))\nconst _hoisted_10 = { class: \"colors\" }\nconst _hoisted_11 = [\"onClick\"]\nconst _hoisted_12 = {\n key: 1,\n class: \"common\"\n}\n\nimport { ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement, TableCell } from '@/types/slides'\nimport { ElementAlignCommands, ElementOrderCommands } from '@/types/edit'\nimport emitter, { EmitterEvents } from '@/utils/emitter'\nimport useOrderElement from '@/hooks/useOrderElement'\nimport useAlignElementToCanvas from '@/hooks/useAlignElementToCanvas'\nimport useDeleteElement from '@/hooks/useDeleteElement'\nimport useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\nimport CheckboxButton from '@/components/CheckboxButton.vue'\nimport Tabs from '@/components/Tabs.vue'\nimport Divider from '@/components/Divider.vue'\nimport Button from '@/components/Button.vue'\nimport ButtonGroup from '@/components/ButtonGroup.vue'\nimport RadioButton from '@/components/RadioButton.vue'\nimport RadioGroup from '@/components/RadioGroup.vue'\n\ninterface TabItem {\n key: 'style' | 'common'\n label: string\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ElementToolbar',\n setup(__props) {\n\nconst colors = ['#000000', '#ffffff', '#eeece1', '#1e497b', '#4e81bb', '#e2534d', '#9aba60', '#8165a0', '#47acc5', '#f9974c', '#c21401', '#ff1e02', '#ffc12a', '#ffff3a', '#90cf5b', '#00af57']\n\nconst mainStore = useMainStore()\nconst slidesStore = useSlidesStore()\nconst { handleElement, handleElementId, richTextAttrs } = storeToRefs(mainStore)\n\nconst { addHistorySnapshot } = useHistorySnapshot()\n\nconst updateElement = (id: string, props: Partial) => {\n slidesStore.updateElement({ id, props })\n addHistorySnapshot()\n}\n\nconst tabs: TabItem[] = [\n { key: 'style', label: '样式' },\n { key: 'common', label: '布局' },\n]\nconst activeTab = ref('common')\n\nconst { orderElement } = useOrderElement()\nconst { alignElementToCanvas } = useAlignElementToCanvas()\nconst { addElementsFromData } = useAddSlidesOrElements()\nconst { deleteElement } = useDeleteElement()\n\nconst copyElement = () => {\n const element: PPTElement = JSON.parse(JSON.stringify(handleElement.value))\n addElementsFromData([element])\n}\n\nconst emitRichTextCommand = (command: string, value?: string) => {\n emitter.emit(EmitterEvents.RICH_TEXT_COMMAND, { action: { command, value } })\n}\n\nconst updateFontColor = (color: string) => {\n if (!handleElement.value) return\n if (handleElement.value.type === 'text' || (handleElement.value.type === 'shape' && handleElement.value.text?.content)) {\n emitter.emit(EmitterEvents.RICH_TEXT_COMMAND, { action: { command: 'color', value: color } })\n }\n if (handleElement.value.type === 'table') {\n const data: TableCell[][] = JSON.parse(JSON.stringify(handleElement.value.data))\n for (let i = 0; i < data.length; i++) {\n for (let j = 0; j < data[i].length; j++) {\n const style = data[i][j].style || {}\n data[i][j].style = { ...style, color }\n }\n }\n updateElement(handleElementId.value, { data })\n }\n if (handleElement.value.type === 'latex') {\n updateElement(handleElementId.value, { color })\n }\n}\n\nconst updateFill = (color: string) => {\n if (!handleElement.value) return\n if (\n handleElement.value.type === 'text' ||\n handleElement.value.type === 'shape' ||\n handleElement.value.type === 'chart'\n ) updateElement(handleElementId.value, { fill: color })\n\n if (handleElement.value.type === 'table') {\n const data: TableCell[][] = JSON.parse(JSON.stringify(handleElement.value.data))\n for (let i = 0; i < data.length; i++) {\n for (let j = 0; j < data[i].length; j++) {\n const style = data[i][j].style || {}\n data[i][j].style = { ...style, backcolor: color }\n }\n }\n updateElement(handleElementId.value, { data })\n }\n\n if (handleElement.value.type === 'audio') updateElement(handleElementId.value, { color })\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconTextBold = _resolveComponent(\"IconTextBold\")!\n const _component_IconTextItalic = _resolveComponent(\"IconTextItalic\")!\n const _component_IconTextUnderline = _resolveComponent(\"IconTextUnderline\")!\n const _component_IconStrikethrough = _resolveComponent(\"IconStrikethrough\")!\n const _component_IconFontSize = _resolveComponent(\"IconFontSize\")!\n const _component_IconAlignTextLeft = _resolveComponent(\"IconAlignTextLeft\")!\n const _component_IconAlignTextCenter = _resolveComponent(\"IconAlignTextCenter\")!\n const _component_IconAlignTextRight = _resolveComponent(\"IconAlignTextRight\")!\n const _component_IconCopy = _resolveComponent(\"IconCopy\")!\n const _component_IconDelete = _resolveComponent(\"IconDelete\")!\n const _component_IconSendToBack = _resolveComponent(\"IconSendToBack\")!\n const _component_IconBringToFrontOne = _resolveComponent(\"IconBringToFrontOne\")!\n const _component_IconBringToFront = _resolveComponent(\"IconBringToFront\")!\n const _component_IconSentToBack = _resolveComponent(\"IconSentToBack\")!\n const _component_IconAlignLeft = _resolveComponent(\"IconAlignLeft\")!\n const _component_IconAlignVertically = _resolveComponent(\"IconAlignVertically\")!\n const _component_IconAlignRight = _resolveComponent(\"IconAlignRight\")!\n const _component_IconAlignTop = _resolveComponent(\"IconAlignTop\")!\n const _component_IconAlignHorizontally = _resolveComponent(\"IconAlignHorizontally\")!\n const _component_IconAlignBottom = _resolveComponent(\"IconAlignBottom\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Tabs, {\n tabs: tabs,\n value: activeTab.value,\n \"onUpdate:value\": _cache[0] || (_cache[0] = ($event: any) => ((activeTab).value = $event)),\n tabsStyle: { marginBottom: '8px' },\n tabStyle: {\n width: '30%',\n margin: '0 10%',\n }\n }, null, 8, [\"value\"]),\n _createElementVNode(\"div\", _hoisted_2, [\n (activeTab.value === 'style')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).bold,\n onClick: _cache[1] || (_cache[1] = ($event: any) => (emitRichTextCommand('bold')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconTextBold)\n ]),\n _: 1\n }, 8, [\"checked\"]),\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).em,\n onClick: _cache[2] || (_cache[2] = ($event: any) => (emitRichTextCommand('em')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconTextItalic)\n ]),\n _: 1\n }, 8, [\"checked\"]),\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).underline,\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emitRichTextCommand('underline')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconTextUnderline)\n ]),\n _: 1\n }, 8, [\"checked\"]),\n _createVNode(CheckboxButton, {\n style: {\"flex\":\"1\"},\n checked: _unref(richTextAttrs).strikethrough,\n onClick: _cache[4] || (_cache[4] = ($event: any) => (emitRichTextCommand('strikethrough')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconStrikethrough)\n ]),\n _: 1\n }, 8, [\"checked\"])\n ]),\n _: 1\n }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[5] || (_cache[5] = ($event: any) => (emitRichTextCommand('fontsize-add')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconFontSize),\n _createTextVNode(\"+\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[6] || (_cache[6] = ($event: any) => (emitRichTextCommand('fontsize-reduce')))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconFontSize),\n _createTextVNode(\"-\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createVNode(RadioGroup, {\n class: \"row\",\n \"button-style\": \"solid\",\n value: _unref(richTextAttrs).align,\n \"onUpdate:value\": _cache[7] || (_cache[7] = value => emitRichTextCommand('align', value))\n }, {\n default: _withCtx(() => [\n _createVNode(RadioButton, {\n value: \"left\",\n style: {\"flex\":\"1\"}\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTextLeft)\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n value: \"center\",\n style: {\"flex\":\"1\"}\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTextCenter)\n ]),\n _: 1\n }),\n _createVNode(RadioButton, {\n value: \"right\",\n style: {\"flex\":\"1\"}\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTextRight)\n ]),\n _: 1\n })\n ]),\n _: 1\n }, 8, [\"value\"]),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createElementVNode(\"div\", _hoisted_4, [\n _hoisted_5,\n _createElementVNode(\"div\", _hoisted_6, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(colors, (color) => {\n return _createElementVNode(\"div\", {\n class: \"color\",\n key: color,\n onClick: ($event: any) => (updateFontColor(color))\n }, [\n _createElementVNode(\"div\", {\n class: \"color-block\",\n style: _normalizeStyle({ backgroundColor: color })\n }, null, 4)\n ], 8, _hoisted_7)\n }), 64))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _hoisted_9,\n _createElementVNode(\"div\", _hoisted_10, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(colors, (color) => {\n return _createElementVNode(\"div\", {\n class: \"color\",\n key: color,\n onClick: ($event: any) => (updateFill(color))\n }, [\n _createElementVNode(\"div\", {\n class: \"color-block\",\n style: _normalizeStyle({ backgroundColor: color })\n }, null, 4)\n ], 8, _hoisted_11)\n }), 64))\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (activeTab.value === 'common')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_12, [\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[8] || (_cache[8] = ($event: any) => (copyElement()))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconCopy, { class: \"icon\" }),\n _createTextVNode(\" 复制\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[9] || (_cache[9] = ($event: any) => (_unref(deleteElement)()))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconDelete, { class: \"icon\" }),\n _createTextVNode(\" 删除\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[10] || (_cache[10] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).TOP)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconSendToBack, { class: \"icon\" }),\n _createTextVNode(\" 置顶\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[11] || (_cache[11] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).BOTTOM)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconBringToFrontOne, { class: \"icon\" }),\n _createTextVNode(\" 置底\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[12] || (_cache[12] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).UP)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconBringToFront, { class: \"icon\" }),\n _createTextVNode(\" 上移\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[13] || (_cache[13] = ($event: any) => (_unref(orderElement)(_unref(handleElement)!, _unref(ElementOrderCommands).DOWN)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconSentToBack, { class: \"icon\" }),\n _createTextVNode(\" 下移\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(Divider, { style: {\"margin\":\"20px 0\"} }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[14] || (_cache[14] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).LEFT)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignLeft, { class: \"icon\" }),\n _createTextVNode(\" 左对齐\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[15] || (_cache[15] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).HORIZONTAL)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignVertically, { class: \"icon\" }),\n _createTextVNode(\" 水平居中\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[16] || (_cache[16] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).RIGHT)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignRight, { class: \"icon\" }),\n _createTextVNode(\" 右对齐\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(ButtonGroup, { class: \"row\" }, {\n default: _withCtx(() => [\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[17] || (_cache[17] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).TOP)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignTop, { class: \"icon\" }),\n _createTextVNode(\" 上对齐\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[18] || (_cache[18] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).VERTICAL)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignHorizontally, { class: \"icon\" }),\n _createTextVNode(\" 垂直居中\")\n ]),\n _: 1\n }),\n _createVNode(Button, {\n style: {\"flex\":\"1\"},\n onClick: _cache[19] || (_cache[19] = ($event: any) => (_unref(alignElementToCanvas)(_unref(ElementAlignCommands).BOTTOM)))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_IconAlignBottom, { class: \"icon\" }),\n _createTextVNode(\" 下对齐\")\n ]),\n _: 1\n })\n ]),\n _: 1\n })\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./ElementToolbar.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ElementToolbar.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ElementToolbar.vue?vue&type=style&index=0&id=f3d1ac70&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-f3d1ac70\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, createVNode as _createVNode, createTextVNode as _createTextVNode, withModifiers as _withModifiers, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5c34ab81\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"mobile-editor-header\" }\nconst _hoisted_2 = { class: \"history\" }\n\nimport { storeToRefs } from 'pinia'\nimport { useSnapshotStore } from '@/store'\nimport type { Mode } from '@/types/mobile'\nimport useHistorySnapshot from '@/hooks/useHistorySnapshot'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'Header',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst { canUndo, canRedo } = storeToRefs(useSnapshotStore())\nconst { redo, undo } = useHistorySnapshot()\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconBack = _resolveComponent(\"IconBack\")!\n const _component_IconNext = _resolveComponent(\"IconNext\")!\n const _component_IconLogout = _resolveComponent(\"IconLogout\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"history-item\", { 'disable': !_unref(canUndo) }]),\n onClick: _cache[0] || (_cache[0] = _withModifiers(($event: any) => (_unref(undo)()), [\"stop\"]))\n }, [\n _createVNode(_component_IconBack),\n _createTextVNode(\" 撤销\")\n ], 2),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"history-item\", { 'disable': !_unref(canRedo) }]),\n onClick: _cache[1] || (_cache[1] = _withModifiers(($event: any) => (_unref(redo)()), [\"stop\"]))\n }, [\n _createVNode(_component_IconNext),\n _createTextVNode(\" 重做\")\n ], 2)\n ]),\n _createElementVNode(\"div\", {\n class: \"back\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_ctx.changeMode('preview')))\n }, [\n _createVNode(_component_IconLogout),\n _createTextVNode(\" 退出编辑\")\n ])\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./Header.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Header.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Header.vue?vue&type=style&index=0&id=5c34ab81&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5c34ab81\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3756d058\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"mobile-editor\" }\n\nimport { computed, onMounted, ref, watchEffect } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useMainStore, useSlidesStore } from '@/store'\nimport type { PPTElement } from '@/types/slides'\nimport type { AlignmentLineProps } from '@/types/edit'\nimport type { Mode } from '@/types/mobile'\nimport { VIEWPORT_SIZE } from '@/configs/canvas'\nimport useSlideBackgroundStyle from '@/hooks/useSlideBackgroundStyle'\nimport useDragElement from '@/views/Editor/Canvas/hooks/useDragElement'\nimport useScaleElement from '@/views/Editor/Canvas/hooks/useScaleElement'\nimport useRotateElement from '@/views/Editor/Canvas/hooks/useRotateElement'\n\nimport AlignmentLine from '@/views/Editor/Canvas/AlignmentLine.vue'\nimport MobileEditableElement from './MobileEditableElement.vue'\nimport MobileOperate from './MobileOperate.vue'\nimport SlideToolbar from './SlideToolbar.vue'\nimport ElementToolbar from './ElementToolbar.vue'\nimport Header from './Header.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst slidesStore = useSlidesStore()\nconst mainStore = useMainStore()\nconst { slideIndex, currentSlide, viewportRatio } = storeToRefs(slidesStore)\nconst { activeElementIdList, handleElement } = storeToRefs(mainStore)\n\nconst contentRef = ref()\nconst viewportRef = ref()\n\nconst alignmentLines = ref([])\n\nconst background = computed(() => currentSlide.value.background)\nconst { backgroundStyle } = useSlideBackgroundStyle(background)\n\nconst canvasScale = computed(() => {\n if (!contentRef.value) return 1\n const contentWidth = contentRef.value.clientWidth\n const contentheight = contentRef.value.clientHeight\n\n const contentRatio = contentheight / contentWidth\n if (contentRatio >= viewportRatio.value) return (contentWidth - 20) / VIEWPORT_SIZE\n return (contentheight - 20) / viewportRatio.value / VIEWPORT_SIZE\n})\n\nonMounted(() => {\n if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])\n if (slideIndex.value !== 0) slidesStore.updateSlideIndex(0)\n})\n\nconst viewportStyles = computed(() => ({\n width: VIEWPORT_SIZE * canvasScale.value + 'px',\n height: VIEWPORT_SIZE * viewportRatio.value * canvasScale.value + 'px',\n}))\n\nconst elementList = ref([])\nconst setLocalElementList = () => {\n elementList.value = currentSlide.value ? JSON.parse(JSON.stringify(currentSlide.value.elements)) : []\n}\nwatchEffect(setLocalElementList)\n\nconst { dragElement } = useDragElement(elementList, alignmentLines, canvasScale)\nconst { scaleElement } = useScaleElement(elementList, alignmentLines, canvasScale)\nconst { rotateElement } = useRotateElement(elementList, viewportRef, canvasScale)\n\nconst selectElement = (e: TouchEvent, element: PPTElement, startMove = true) => {\n if (!activeElementIdList.value.includes(element.id)) {\n mainStore.setActiveElementIdList([element.id])\n mainStore.setHandleElementId(element.id)\n }\n if (startMove) dragElement(e, element)\n}\n\nconst handleClickBlankArea = () => {\n mainStore.setActiveElementIdList([])\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(Header, { changeMode: _ctx.changeMode }, null, 8, [\"changeMode\"]),\n _createElementVNode(\"div\", {\n class: \"content\",\n ref_key: \"contentRef\",\n ref: contentRef,\n onTouchstart: _cache[0] || (_cache[0] = ($event: any) => (handleClickBlankArea()))\n }, [\n _createElementVNode(\"div\", {\n class: \"viewport-wrapper\",\n style: _normalizeStyle(viewportStyles.value)\n }, [\n _createElementVNode(\"div\", {\n class: \"background\",\n style: _normalizeStyle(_unref(backgroundStyle))\n }, null, 4),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(alignmentLines.value, (line, index) => {\n return (_openBlock(), _createBlock(AlignmentLine, {\n key: index,\n type: line.type,\n axis: line.axis,\n length: line.length,\n canvasScale: canvasScale.value\n }, null, 8, [\"type\", \"axis\", \"length\", \"canvasScale\"]))\n }), 128)),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: element.id\n }, [\n (element.type !== 'line')\n ? (_openBlock(), _createBlock(MobileOperate, {\n key: 0,\n elementInfo: element,\n isSelected: _unref(activeElementIdList).includes(element.id),\n canvasScale: canvasScale.value,\n scaleElement: _unref(scaleElement),\n rotateElement: _unref(rotateElement)\n }, null, 8, [\"elementInfo\", \"isSelected\", \"canvasScale\", \"scaleElement\", \"rotateElement\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n }), 128)),\n _createElementVNode(\"div\", {\n class: \"viewport\",\n ref_key: \"viewportRef\",\n ref: viewportRef,\n style: _normalizeStyle({ transform: `scale(${canvasScale.value})` })\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(elementList.value, (element, index) => {\n return (_openBlock(), _createBlock(MobileEditableElement, {\n key: element.id,\n elementInfo: element,\n elementIndex: index + 1,\n selectElement: selectElement\n }, null, 8, [\"elementInfo\", \"elementIndex\"]))\n }), 128))\n ], 4)\n ], 4)\n ], 544),\n _createVNode(SlideToolbar),\n (_unref(handleElement))\n ? (_openBlock(), _createBlock(ElementToolbar, { key: 0 }))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=3756d058&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3756d058\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-62f26eba\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"header\" }\n\nimport { computed, onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport type { Mode } from '@/types/mobile'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\nimport MobileThumbnails from './MobileThumbnails.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MobilePlayer',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst slidesStore = useSlidesStore()\nconst { slides, slideIndex, currentSlide, viewportRatio } = storeToRefs(slidesStore)\n\nconst toolVisible = ref(false)\n\nconst playerSize = ref({ width: 0, height: 0 })\n\nonMounted(() => {\n if (slideIndex.value !== 0) slidesStore.updateSlideIndex(0)\n\n playerSize.value = {\n width: document.body.clientHeight,\n height: document.body.clientWidth,\n }\n})\n\nconst slideSize = computed(() => {\n const playerRatio = playerSize.value.height / playerSize.value.width\n\n let slideWidth = 0\n let slideHeight = 0\n\n if (playerRatio >= viewportRatio.value) {\n slideWidth = playerSize.value.width\n slideHeight = slideWidth * viewportRatio.value\n }\n else {\n slideHeight = playerSize.value.height\n slideWidth = slideHeight / viewportRatio.value\n }\n\n return {\n width: slideWidth,\n height: slideHeight,\n }\n})\n\nconst touchInfo = ref<{ x: number; y: number; } | null>(null)\nconst touchStartListener = (e: TouchEvent) => {\n touchInfo.value = {\n x: e.changedTouches[0].pageX,\n y: e.changedTouches[0].pageY,\n }\n}\nconst touchEndListener = (e: TouchEvent) => {\n if (!touchInfo.value) return\n\n const offsetY = Math.abs(touchInfo.value.y - e.changedTouches[0].pageY)\n const offsetX = e.changedTouches[0].pageX - touchInfo.value.x\n\n if ( Math.abs(offsetX) > offsetY && Math.abs(offsetX) > 50 ) {\n touchInfo.value = null\n\n if (offsetX < 0 && slideIndex.value > 0) slidesStore.updateSlideIndex(slideIndex.value - 1)\n if (offsetX > 0 && slideIndex.value < slides.value.length - 1) slidesStore.updateSlideIndex(slideIndex.value + 1)\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconLogout = _resolveComponent(\"IconLogout\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"mobile-player\",\n style: _normalizeStyle({\n width: playerSize.value.width + 'px',\n height: playerSize.value.height + 'px',\n transform: `rotate(90deg) translateY(-${playerSize.value.height}px)`,\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"screen-slide-list\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (toolVisible.value = !toolVisible.value)),\n onTouchstart: _cache[1] || (_cache[1] = $event => touchStartListener($event)),\n onTouchend: _cache[2] || (_cache[2] = $event => touchEndListener($event))\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(slides), (slide, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\n 'slide-item', \n `turning-mode-${slide.turningMode || 'slideY'}`,\n {\n 'current': index === _unref(slideIndex),\n 'before': index < _unref(slideIndex),\n 'after': index > _unref(slideIndex),\n 'hide': (index === _unref(slideIndex) - 1 || index === _unref(slideIndex) + 1) && slide.turningMode !== _unref(currentSlide).turningMode,\n }\n ]),\n key: slide.id\n }, [\n (Math.abs(_unref(slideIndex) - index) < 2)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"slide-content\",\n style: _normalizeStyle({\n width: slideSize.value.width + 'px',\n height: slideSize.value.height + 'px',\n })\n }, [\n _createVNode(ThumbnailSlide, {\n slide: slide,\n size: slideSize.value.width\n }, null, 8, [\"slide\", \"size\"])\n ], 4))\n : _createCommentVNode(\"\", true)\n ], 2))\n }), 128))\n ], 32),\n (toolVisible.value)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: \"back\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (_ctx.changeMode('preview')))\n }, [\n _createVNode(_component_IconLogout),\n _createTextVNode(\" 退出播放\")\n ])\n ]),\n _createVNode(MobileThumbnails, { class: \"thumbnails\" })\n ], 64))\n : _createCommentVNode(\"\", true)\n ], 4))\n}\n}\n\n})","\n\n\n\n","import script from \"./MobilePlayer.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MobilePlayer.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MobilePlayer.vue?vue&type=style&index=0&id=62f26eba&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-62f26eba\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-53dd42dc\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"thumbnail-list\" }\nconst _hoisted_2 = { class: \"menu\" }\n\nimport { onMounted, ref } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useSlidesStore } from '@/store'\nimport useLoadSlides from '@/hooks/useLoadSlides'\nimport type { Mode } from '@/types/mobile'\n\nimport ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'\nimport Divider from '@/components/Divider.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MobilePreview',\n props: {\n changeMode: { type: Function }\n },\n setup(__props: any) {\n\n\n\nconst { slides } = storeToRefs(useSlidesStore())\nconst { slidesLoadLimit } = useLoadSlides()\n\nconst mobileRef = ref()\nconst screenWidth = ref(0)\n\nonMounted(() => {\n if (!mobileRef.value) return\n screenWidth.value = mobileRef.value.clientWidth\n})\n\nreturn (_ctx: any,_cache: any) => {\n const _component_IconEdit = _resolveComponent(\"IconEdit\")!\n const _component_IconFullScreenPlay = _resolveComponent(\"IconFullScreenPlay\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"mobile-preview\",\n ref_key: \"mobileRef\",\n ref: mobileRef\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(slides), (slide, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"thumbnail-item\",\n key: slide.id\n }, [\n _createVNode(ThumbnailSlide, {\n slide: slide,\n size: screenWidth.value - 20,\n visible: index < _unref(slidesLoadLimit)\n }, null, 8, [\"slide\", \"size\", \"visible\"])\n ]))\n }), 128))\n ]),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: \"menu-item\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.changeMode('editor')))\n }, [\n _createVNode(_component_IconEdit, { class: \"icon\" }),\n _createTextVNode(\" 编辑\")\n ]),\n _createVNode(Divider, {\n type: \"vertical\",\n style: {\"height\":\"30px\"}\n }),\n _createElementVNode(\"div\", {\n class: \"menu-item\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.changeMode('player')))\n }, [\n _createVNode(_component_IconFullScreenPlay, { class: \"icon\" }),\n _createTextVNode(\" 播放\")\n ])\n ])\n ], 512))\n}\n}\n\n})","\n\n\n\n\n","import script from \"./MobilePreview.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MobilePreview.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MobilePreview.vue?vue&type=style&index=0&id=53dd42dc&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-53dd42dc\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-9826ff08\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"mobile\" }\n\nimport { computed, ref } from 'vue'\nimport type { Mode } from '@/types/mobile'\n\nimport MobileEditor from './MobileEditor/index.vue'\nimport MobilePlayer from './MobilePlayer.vue'\nimport MobilePreview from './MobilePreview.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n setup(__props) {\n\nconst mode = ref('preview')\n \nconst changeMode = (_mode: Mode) => mode.value = _mode\n\nconst currentComponent = computed(() => {\n const componentMap = {\n 'editor': MobileEditor,\n 'player': MobilePlayer,\n 'preview': MobilePreview,\n }\n return componentMap[mode.value] || null\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(currentComponent.value), { changeMode: changeMode }))\n ]))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=9826ff08&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-9826ff08\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { onMounted } from 'vue'\nimport { storeToRefs } from 'pinia'\nimport { useScreenStore, useMainStore, useSnapshotStore } from '@/store'\nimport { LOCALSTORAGE_KEY_DISCARDED_DB } from '@/configs/storage'\nimport { deleteDiscardedDB } from '@/utils/database'\nimport { isPC } from './utils/common'\n\nimport Editor from './views/Editor/index.vue'\nimport Screen from './views/Screen/index.vue'\nimport Mobile from './views/Mobile/index.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'App',\n setup(__props) {\n\nconst _isPC = isPC()\n\nconst mainStore = useMainStore()\nconst snapshotStore = useSnapshotStore()\nconst { databaseId } = storeToRefs(mainStore)\nconst { screening } = storeToRefs(useScreenStore())\n\nif (process.env.NODE_ENV === 'production') {\n window.onbeforeunload = () => false\n}\n\nonMounted(async () => {\n await deleteDiscardedDB()\n snapshotStore.initSnapshotDatabase()\n mainStore.setAvailableFonts()\n})\n\n// 应用注销时向 localStorage 中记录下本次 indexedDB 的数据库ID,用于之后清除数据库\nwindow.addEventListener('unload', () => {\n const discardedDB = localStorage.getItem(LOCALSTORAGE_KEY_DISCARDED_DB)\n const discardedDBList: string[] = discardedDB ? JSON.parse(discardedDB) : []\n\n discardedDBList.push(databaseId.value)\n\n const newDiscardedDB = JSON.stringify(discardedDBList)\n localStorage.setItem(LOCALSTORAGE_KEY_DISCARDED_DB, newDiscardedDB)\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(screening))\n ? (_openBlock(), _createBlock(Screen, { key: 0 }))\n : (_unref(_isPC))\n ? (_openBlock(), _createBlock(Editor, { key: 1 }))\n : (_openBlock(), _createBlock(Mobile, { key: 2 }))\n}\n}\n\n})","\n\n\n\n","import script from \"./App.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./App.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./App.vue?vue&type=style&index=0&id=685e8c72&lang=scss\"\n\nconst __exports__ = script;\n\nexport default __exports__","/* eslint-disable no-console */\n\nimport { register } from 'register-service-worker'\n\nif (process.env.NODE_ENV === 'production') {\n register(`${process.env.BASE_URL}service-worker.js`, {\n ready() {\n console.log(\n 'App is being served from cache by a service worker.\\n' +\n 'For more details, visit https://goo.gl/AFskqB'\n )\n },\n registered() {\n console.log('Service worker has been registered.')\n },\n cached() {\n console.log('Content has been cached for offline use.')\n },\n updatefound() {\n console.log('New content is downloading.')\n },\n updated() {\n console.log('New content is available; please refresh.')\n },\n offline() {\n console.log('No internet connection found. App is running in offline mode.')\n },\n error(error) {\n console.error('Error during service worker registration:', error)\n }\n })\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createBlock as _createBlock, normalizeClass as _normalizeClass, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-77e74b43\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"menu-content\" }\nconst _hoisted_2 = [\"onClick\"]\nconst _hoisted_3 = { class: \"text\" }\nconst _hoisted_4 = {\n key: 0,\n class: \"sub-text\"\n}\n\nimport type { ContextmenuItem } from './types'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'MenuContent',\n props: {\n menus: {},\n handleClickMenuItem: { type: Function }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n const _component_menu_content = _resolveComponent(\"menu-content\", true)!\n\n return (_openBlock(), _createElementBlock(\"ul\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.menus, (menu, index) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: menu.text || index\n }, [\n (!menu.hide)\n ? (_openBlock(), _createElementBlock(\"li\", {\n key: 0,\n class: _normalizeClass([\"menu-item\", {'divider': menu.divider, 'disable': menu.disable}]),\n onClick: _withModifiers(($event: any) => (_ctx.handleClickMenuItem(menu)), [\"stop\"])\n }, [\n (!menu.divider)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"menu-item-content\", {\n 'has-children': menu.children,\n 'has-handler': menu.handler,\n }])\n }, [\n _createElementVNode(\"span\", _hoisted_3, _toDisplayString(menu.text), 1),\n (menu.subText && !menu.children)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, _toDisplayString(menu.subText), 1))\n : _createCommentVNode(\"\", true),\n (menu.children && menu.children.length)\n ? (_openBlock(), _createBlock(_component_menu_content, {\n key: 1,\n class: \"sub-menu\",\n menus: menu.children,\n handleClickMenuItem: _ctx.handleClickMenuItem\n }, null, 8, [\"menus\", \"handleClickMenuItem\"]))\n : _createCommentVNode(\"\", true)\n ], 2))\n : _createCommentVNode(\"\", true)\n ], 10, _hoisted_2))\n : _createCommentVNode(\"\", true)\n ], 64))\n }), 128))\n ]))\n}\n}\n\n})","import script from \"./MenuContent.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./MenuContent.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./MenuContent.vue?vue&type=style&index=0&id=77e74b43&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-77e74b43\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { withModifiers as _withModifiers, createElementVNode as _createElementVNode, createVNode as _createVNode, normalizeStyle as _normalizeStyle, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { computed } from 'vue'\nimport type { ContextmenuItem, Axis } from './types'\n\nimport MenuContent from './MenuContent.vue'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n axis: {},\n el: {},\n menus: {},\n removeContextmenu: { type: Function }\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst style = computed(() => {\n const MENU_WIDTH = 170\n const MENU_HEIGHT = 30\n const DIVIDER_HEIGHT = 11\n const PADDING = 5\n\n const { x, y } = props.axis\n const menuCount = props.menus.filter(menu => !(menu.divider || menu.hide)).length\n const dividerCount = props.menus.filter(menu => menu.divider).length\n\n const menuWidth = MENU_WIDTH\n const menuHeight = menuCount * MENU_HEIGHT + dividerCount * DIVIDER_HEIGHT + PADDING * 2\n\n const screenWidth = document.body.clientWidth\n const screenHeight = document.body.clientHeight\n\n return {\n left: screenWidth <= x + menuWidth ? x - menuWidth : x,\n top: screenHeight <= y + menuHeight ? y - menuHeight : y,\n }\n})\n\nconst handleClickMenuItem = (item: ContextmenuItem) => {\n if (item.disable) return\n if (item.children && !item.handler) return\n if (item.handler) item.handler(props.el)\n props.removeContextmenu()\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", {\n class: \"mask\",\n onContextmenu: _cache[0] || (_cache[0] = _withModifiers(($event: any) => (_ctx.removeContextmenu()), [\"prevent\"])),\n onMousedown: _cache[1] || (_cache[1] = ($event: any) => (_ctx.removeContextmenu()))\n }, null, 32),\n _createElementVNode(\"div\", {\n class: \"contextmenu\",\n style: _normalizeStyle({\n left: style.value.left + 'px',\n top: style.value.top + 'px',\n }),\n onContextmenu: _cache[2] || (_cache[2] = _withModifiers(() => {}, [\"prevent\"]))\n }, [\n _createVNode(MenuContent, {\n menus: _ctx.menus,\n handleClickMenuItem: handleClickMenuItem\n }, null, 8, [\"menus\"])\n ], 36)\n ], 64))\n}\n}\n\n})","\n\n\n\n","import script from \"./index.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./index.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./index.vue?vue&type=style&index=0&id=1abfab1d&lang=scss\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { type Directive, type DirectiveBinding, createVNode, render } from 'vue'\nimport ContextmenuComponent from '@/components/Contextmenu/index.vue'\n\nconst CTX_CONTEXTMENU_HANDLER = 'CTX_CONTEXTMENU_HANDLER'\n\ninterface CustomHTMLElement extends HTMLElement {\n [CTX_CONTEXTMENU_HANDLER]?: (event: MouseEvent) => void\n} \n\nconst contextmenuListener = (el: HTMLElement, event: MouseEvent, binding: DirectiveBinding) => {\n event.stopPropagation()\n event.preventDefault()\n\n const menus = binding.value(el)\n if (!menus) return\n\n let container: HTMLDivElement | null = null\n\n // 移除右键菜单并取消相关的事件监听\n const removeContextmenu = () => {\n if (container) {\n document.body.removeChild(container)\n container = null\n }\n el.classList.remove('contextmenu-active')\n document.body.removeEventListener('scroll', removeContextmenu) \n window.removeEventListener('resize', removeContextmenu)\n }\n\n // 创建自定义菜单\n const options = {\n axis: { x: event.x, y: event.y },\n el,\n menus,\n removeContextmenu,\n }\n container = document.createElement('div')\n const vm = createVNode(ContextmenuComponent, options, null)\n render(vm, container)\n document.body.appendChild(container)\n\n // 为目标节点添加菜单激活状态的className\n el.classList.add('contextmenu-active')\n\n // 页面变化时移除菜单\n document.body.addEventListener('scroll', removeContextmenu)\n window.addEventListener('resize', removeContextmenu)\n}\n\nconst ContextmenuDirective: Directive = {\n mounted(el: CustomHTMLElement, binding) {\n el[CTX_CONTEXTMENU_HANDLER] = (event: MouseEvent) => contextmenuListener(el, event, binding)\n el.addEventListener('contextmenu', el[CTX_CONTEXTMENU_HANDLER])\n },\n\n unmounted(el: CustomHTMLElement) {\n if (el && el[CTX_CONTEXTMENU_HANDLER]) {\n el.removeEventListener('contextmenu', el[CTX_CONTEXTMENU_HANDLER])\n delete el[CTX_CONTEXTMENU_HANDLER]\n }\n },\n}\n\nexport default ContextmenuDirective","import type { Directive, DirectiveBinding } from 'vue'\n\nconst CTX_CLICK_OUTSIDE_HANDLER = 'CTX_CLICK_OUTSIDE_HANDLER'\n\ninterface CustomHTMLElement extends HTMLElement {\n [CTX_CLICK_OUTSIDE_HANDLER]?: (event: MouseEvent) => void\n} \n\nconst clickListener = (el: HTMLElement, event: MouseEvent, binding: DirectiveBinding) => {\n const handler = binding.value\n\n const path = event.composedPath()\n const isClickOutside = path ? path.indexOf(el) < 0 : !el.contains(event.target as HTMLElement)\n\n if (!isClickOutside) return\n handler(event)\n}\n\nconst ClickOutsideDirective: Directive = {\n mounted(el: CustomHTMLElement, binding) {\n el[CTX_CLICK_OUTSIDE_HANDLER] = (event: MouseEvent) => clickListener(el, event, binding)\n setTimeout(() => {\n document.addEventListener('click', el[CTX_CLICK_OUTSIDE_HANDLER]!)\n }, 0)\n },\n \n unmounted(el: CustomHTMLElement) {\n if (el[CTX_CLICK_OUTSIDE_HANDLER]) {\n document.removeEventListener('click', el[CTX_CLICK_OUTSIDE_HANDLER])\n delete el[CTX_CLICK_OUTSIDE_HANDLER]\n }\n },\n}\n\nexport default ClickOutsideDirective","import type { Directive, DirectiveBinding } from 'vue'\nimport tippy, { type Instance, type Placement } from 'tippy.js'\n\nimport './tooltip.scss'\n\nconst TOOLTIP_INSTANCE = 'TOOLTIP_INSTANCE'\n\ninterface CustomHTMLElement extends HTMLElement {\n [TOOLTIP_INSTANCE]?: Instance\n}\n\ntype Delay = number | [number | null, number | null]\n\ninterface BindingValue {\n content: string\n placement?: Placement\n delay?: Delay\n}\n\nconst TooltipDirective: Directive = {\n mounted(el: CustomHTMLElement, binding: DirectiveBinding) {\n let content = ''\n let placement: Placement = 'top'\n let delay: Delay = [300, 0]\n\n if (typeof binding.value === 'string') {\n content = binding.value\n }\n else {\n content = binding.value.content\n if (binding.value.placement !== undefined) placement = binding.value.placement\n if (binding.value.delay !== undefined) delay = binding.value.delay\n }\n\n el[TOOLTIP_INSTANCE] = tippy(el, {\n content,\n theme: 'tooltip',\n duration: 100,\n animation: 'scale',\n allowHTML: true,\n placement,\n delay,\n })\n },\n\n updated(el: CustomHTMLElement, binding: DirectiveBinding) {\n let content = ''\n if (typeof binding.value === 'string') {\n content = binding.value\n }\n else {\n content = binding.value.content\n }\n if (el[TOOLTIP_INSTANCE]) el[TOOLTIP_INSTANCE].setContent(content)\n },\n \n unmounted(el: CustomHTMLElement) {\n if (el[TOOLTIP_INSTANCE]) el[TOOLTIP_INSTANCE].destroy()\n },\n}\n\nexport default TooltipDirective","import type { App } from 'vue'\n\nimport Contextmenu from './contextmenu'\nimport ClickOutside from './clickOutside'\nimport Tooltip from './tooltip'\n\nexport default {\n install(app: App) {\n app.directive('contextmenu', Contextmenu)\n app.directive('click-outside', ClickOutside)\n app.directive('tooltip', Tooltip)\n }\n}\n","import { createApp } from 'vue'\nimport { createPinia } from 'pinia'\nimport App from './App.vue'\nimport './registerServiceWorker'\n\nimport '@icon-park/vue-next/styles/index.css'\nimport 'prosemirror-view/style/prosemirror.css'\nimport 'animate.css'\n\nimport '@/assets/styles/prosemirror.scss'\nimport '@/assets/styles/global.scss'\nimport '@/assets/styles/font.scss'\n\nimport Icon from '@/plugins/icon'\nimport Directive from '@/plugins/directive'\n\nconst app = createApp(App)\n\napp.use(Icon)\napp.use(Directive)\n\napp.use(createPinia())\napp.mount('#app')\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkpptist\"] = self[\"webpackChunkpptist\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], function() { return __webpack_require__(4015); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["ToolbarStates","isList","node","schema","type","nodes","bullet_list","ordered_list","autoSelectAll","view","empty","state","selection","selectAll","dispatch","addMark","editorView","mark","tr","from","to","$from","$to","pos","findNodesWithSameMark","doc","markType","ii","finder","firstMark","fromNode","toNode","nodeAt","marks","find","fromPos","toPos","jj","nodeSize","equalNodeType","nodeType","Array","isArray","indexOf","findParentNodeClosestToPos","$pos","predicate","i","depth","before","start","findParentNode","_ref","findParentNodeOfType","isActiveOfParentNodeType","getLastTextNode","name","lastChild","getMarkAttrs","getAttrValue","attr","attrs","isActiveMark","markActive","isInSet","storedMarks","rangeHasMark","getAttrValueInSelection","keepChecking","value","nodesBetween","_defaultAttrs","color","backcolor","fontsize","fontname","align","getTextAttrs","defaultAttrs","isBold","isEm","isUnderline","isStrikethrough","isSuperscript","isSubscript","isCode","link","isBulletList","isOrderedList","isBlockquote","bold","em","underline","strikethrough","superscript","subscript","code","bulletList","orderedList","blockquote","getFontsize","parseInt","defaultRichTextAttrs","SYS_FONTS","label","WEB_FONTS","isSupportFont","fontName","arial","toLowerCase","size","width","height","str","canvas","document","createElement","ctx","getContext","willReadFrequently","textAlign","fillStyle","textBaseline","getDotArray","_fontFamily","clearRect","font","fillText","imageData","getImageData","data","slice","call","filter","item","join","slides","id","elements","left","top","viewBox","path","fill","fixedRatio","opacity","rotate","flipV","lineHeight","content","defaultFontName","defaultColor","end","points","style","background","wordSpace","theme","themeColor","fontColor","backgroundColor","shadow","h","v","blur","outline","layouts","text","useSlidesStore","defineStore","title","slideIndex","viewportRatio","getters","currentSlide","currentSlideAnimations","animations","els","elIds","map","el","animation","includes","elId","formatedAnimations","trigger","length","last","push","autoNext","subColor","tinycolor","isDark","layoutsString","JSON","stringify","replaceAll","parse","actions","setTitle","this","setTheme","themeProps","setViewportRatio","setSlides","addSlide","slide","addIndex","splice","updateSlide","props","deleteSlide","slideId","slidesId","deleteSlidesIndex","index","findIndex","newIndex","Math","min","maxIndex","updateSlideIndex","addElement","element","currentSlideEls","newEls","deleteElement","elementId","elementIdList","updateElement","elIdList","removeElementProps","propName","propsNames","omit","nanoid","customAlphabet","databaseId","useMainStore","activeElementIdList","handleElementId","activeGroupElementId","hiddenElementIdList","canvasPercentage","canvasScale","canvasDragged","thumbnailsFocus","editorAreaFocus","disableHotkeys","gridLineSize","showRuler","creatingElement","creatingCustomShape","availableFonts","toolbarState","SLIDE_DESIGN","clipingImageElementId","richTextAttrs","selectedTableCells","isScaling","selectedSlidesIndex","dialogForExport","textFormatPainter","shapeFormatPainter","showSelectPanel","showSearchPanel","activeElementList","slidesStore","handleElement","setActiveElementIdList","setHandleElementId","setActiveGroupElementId","setHiddenElementIdList","setCanvasPercentage","percentage","setCanvasScale","scale","setCanvasDragged","isDragged","setThumbnailsFocus","isFocus","setEditorareaFocus","setDisableHotkeysState","disable","setGridLineSize","setRulerState","show","setCreatingElement","setCreatingCustomShapeState","setAvailableFonts","setToolbarState","setClipingImageElementId","setRichtextAttrs","setSelectedTableCells","cells","setScalingState","updateSelectedSlidesIndex","setDialogForExport","setTextFormatPainter","setShapeFormatPainter","setSelectPanelState","setSearchPanelState","LOCALSTORAGE_KEY_DISCARDED_DB","databaseNamePrefix","deleteDiscardedDB","async","now","Date","getTime","localStorageDiscardedDB","localStorage","getItem","localStorageDiscardedDBList","databaseNames","Dexie","getDatabaseNames","discardedDBNames","prefix","time","split","delete","removeItem","PPTistDB","constructor","super","_defineProperty","version","stores","snapshots","writingBoardImgs","table","db","useSnapshotStore","snapshotCursor","snapshotLength","canUndo","canRedo","setSnapshotCursor","cursor","setSnapshotLength","initSnapshotDatabase","newFirstSnapshot","add","addSnapshot","allKeys","orderBy","keys","needDeleteKeys","snapshot","snapshotLengthLimit","update","bulkDelete","unDo","mainStore","toArray","reDo","useKeyboardStore","ctrlKeyState","shiftKeyState","spaceKeyState","ctrlOrShiftKeyActive","setCtrlKeyState","active","setShiftKeyState","setSpaceKeyState","useScreenStore","screening","setScreening","fillDigit","digit","len","padStart","isPC","navigator","userAgent","match","ElementOrderCommands","ElementAlignCommands","OperateBorderLines","OperateResizeHandlers","OperateLineHandlers","KEYS","HOTKEY_DOC","children","CRYPTO_KEY","encrypt","msg","CryptoJS","toString","decrypt","ciphertext","bytes","Utf8","copyText","Promise","resolve","reject","fakeElement","clipboard","Clipboard","action","container","body","on","e","destroy","appendChild","click","removeChild","readClipboard","readText","then","pasteCustomClipboardString","clipboardData","pasteExcelClipboardString","lines","pop","colCount","getRectRotatedRange","radius","sqrt","pow","auxiliaryAngle","atan","PI","tlbraRadian","trblaRadian","middleLeft","middleTop","xAxis","cos","yAxis","sin","xRange","max","yRange","getRectRotatedOffset","originXRange","originYRange","rotatedXRange","rotatedYRange","offsetX","offsetY","getElementRange","minX","maxX","minY","maxY","getElementListRange","elementList","leftValues","topValues","rightValues","bottomValues","forEach","uniqAlignLines","uniqLines","line","_line","uniqLine","rangeMin","range","rangeMax","createSlideIdMap","slideIdMap","createElementIdMap","groupIdMap","elIdMap","groupId","getTableSubThemeColor","rgba","setAlpha","toRgbString","getLineElementPath","broken","mid","curve","cubic","c1","c2","p1","p2","isElementInViewport","parent","elementRect","getBoundingClientRect","parentRect","bottom","icons","IconPlayOne","_PlayOne","IconFullScreenPlay","_FullScreenPlay","IconLock","_Lock","IconUnlock","_Unlock","IconPpt","_Ppt","IconFormat","_Format","IconPicture","_Picture","IconFullScreen","_FullScreen","IconList","_List","IconOrderedList","_OrderedList","IconFlipVertically","_FlipVertically","IconFlipHorizontally","_FlipHorizontally","IconFontSize","_FontSize","IconCode","_Code","IconTextBold","_TextBold","IconTextItalic","_TextItalic","IconTextUnderline","_TextUnderline","IconStrikethrough","_Strikethrough","IconEdit","_Edit","IconQuote","_Quote","IconBackgroundColor","_BackgroundColor","IconGroup","_Group","IconUngroup","_Ungroup","IconBack","_Back","IconNext","_Next","IconFullwidth","_Fullwidth","IconAlignTop","_AlignTop","IconAlignLeft","_AlignLeft","IconAlignRight","_AlignRight","IconAlignBottom","_AlignBottom","IconAlignVertically","_AlignVertically","IconAlignHorizontally","_AlignHorizontally","IconBringToFront","_BringToFront","IconSendToBack","_SendToBack","IconAlignTextLeft","_AlignTextLeft","IconAlignTextRight","_AlignTextRight","IconAlignTextCenter","_AlignTextCenter","IconAlignTextBoth","_AlignTextBoth","IconRowHeight","_RowHeight","IconWrite","_Write","IconInsertTable","_InsertTable","IconAddText","_AddText","IconFill","_Fill","IconTailoring","_Tailoring","IconEffects","_Effects","IconColorFilter","_ColorFilter","IconUp","_Up","IconDown","_Down","IconPlus","_Plus","IconMinus","_Minus","IconConnection","_Connection","IconBringToFrontOne","_BringToFrontOne","IconSentToBack","_SentToBack","IconGithub","_Github","IconChartProportion","_ChartProportion","IconChartHistogram","_ChartHistogram","IconChartHistogramOne","_ChartHistogramOne","IconChartLineArea","_ChartLineArea","IconChartRing","_ChartRing","IconChartScatter","_ChartScatter","IconChartLine","_ChartLine","IconChartPie","_ChartPie","IconText","_Text","IconRotate","_Rotate","IconLeftTwo","_LeftTwo","IconRightTwo","_RightTwo","IconPlatte","_Platte","IconClose","_Close","IconCloseSmall","_CloseSmall","IconUndo","_Undo","IconTransform","_Transform","IconClick","_Click","IconTheme","_Theme","IconArrowCircleLeft","_ArrowCircleLeft","IconGraphicDesign","_GraphicDesign","IconLogout","_Logout","IconErase","_Erase","IconClear","_Clear","IconAlignTextTopOne","_AlignTextTopOne","IconAlignTextBottomOne","_AlignTextBottomOne","IconAlignTextMiddleOne","_AlignTextMiddleOne","IconPause","_Pause","IconVolumeMute","_VolumeMute","IconVolumeNotice","_VolumeNotice","IconVolumeSmall","_VolumeSmall","IconVideoTwo","_VideoTwo","IconFormula","_Formula","IconLinkOne","_LinkOne","IconFullScreenOne","_FullScreenOne","IconOffScreenOne","_OffScreenOne","IconPower","_Power","IconListView","_ListView","IconMagic","_Magic","IconHighLight","_HighLight","IconDownload","_Download","IconIndentLeft","_IndentLeft","IconIndentRight","_IndentRight","IconVerticalSpacingBetweenItems","_VerticalSpacingBetweenItems","IconCopy","_Copy","IconDelete","_Delete","IconSquare","_Square","IconRound","_Round","IconNeedle","_Needle","IconTextRotationNone","_TextRotationNone","IconTextRotationDown","_TextRotationDown","IconFormatBrush","_FormatBrush","IconPreviewOpen","_PreviewOpen","IconPreviewClose","_PreviewClose","IconStopwatchStart","_StopwatchStart","IconSearch","_Search","IconLeft","_Left","IconRight","_Right","IconMoveOne","_MoveOne","IconHamburgerButton","_HamburgerButton","IconAttention","_Attention","IconCheckOne","_CheckOne","IconCloseOne","_CloseOne","IconInfo","_Info","install","app","key","Object","component","_hoisted_1","_hoisted_2","class","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_defineComponent","__name","message","default","duration","closable","Boolean","emits","setup","__props","expose","__expose","emit","__emit","visible","ref","timer","startTimer","setTimeout","close","clearTimer","clearTimeout","onBeforeMount","onMounted","_ctx","_cache","_openBlock","_createBlock","_Transition","appear","mode","onBeforeLeave","$event","onAfterLeave","_withCtx","_createElementBlock","_createElementVNode","onMouseenter","onMouseleave","_unref","_createCommentVNode","_toDisplayString","onClick","_createVNode","_","__exports__","instances","wrap","seed","defaultOptions","options","className","cssText","vm","createVNode","MessageComponent","div","appContext","_context","onClose","onDestroy","childNodes","remove","render","firstElementChild","instance","exposed","success","info","warning","error","closeAll","parseText2Paragraphs","htmlText","replace","paragraphs","string","paragraph","getImageSize","src","img","onload","imgWidth","clientWidth","imgHeight","clientHeight","onerror","getImageDataURL","file","reader","FileReader","addEventListener","result","readAsDataURL","VIEWPORT_SIZE","ShapePathFormulasKeys","ElementTypes","SHAPE_PATH_FORMULAS","ROUND_RECT","editable","defaultValue","relative","getBaseSize","formula","CUT_RECT_DIAGONAL","CUT_RECT_SINGLE","CUT_RECT_SAMESIDE","ROUND_RECT_DIAGONAL","ROUND_RECT_SINGLE","ROUND_RECT_SAMESIDE","CUT_ROUND_RECT","MESSAGE","arrowWidth","arrowheight","ROUND_MESSAGE","L","lineWidth","RING_RECT","PLUS","TRIANGLE","vertex","PARALLELOGRAM_LEFT","point","PARALLELOGRAM_RIGHT","TRAPEZOID","BULLET","INDICATOR","SHAPE_LIST","pptxShapeType","pathFormula","special","outlined","CHART_TYPES","bar","horizontalBar","area","scatter","pie","ring","snapshotStore","addHistorySnapshot","debounce","trailing","redo","throttle","leading","undo","storeToRefs","useHistorySnapshot","callback","createImageElement","createChartElement","newElement","chartType","gridColor","labels","legends","series","horizontalBars","stackBars","showLine","lineSmooth","showArea","donut","createTableElement","row","col","rowCells","j","colspan","rowspan","DEFAULT_CELL_WIDTH","DEFAULT_CELL_HEIGHT","colWidths","rowHeader","rowFooter","colHeader","colFooter","cellMinHeight","createTextElement","position","vertical","editorRef","querySelector","focus","createShapeElement","keypoint","createLineElement","isBroken","isCurve","isCubic","createLatexElement","w","latex","strokeWidth","createVideoElement","autoplay","createAudioElement","loop","addElementsFromData","firstElement","lastSameElement","offset","oMinX","oMaxX","oMinY","oMaxY","nMinX","nMaxX","nMinY","nMaxY","values","addSlidesFromData","newSlides","target","isEmptySlide","computed","useCreateElement","useAddSlidesOrElements","createTextElementFromClipboard","pasteTextClipboardData","onlySlide","onlyElements","_selectedSlidesIndex","selectedSlides","selectedSlidesId","usePasteTextClipboardData","resetSlides","emptySlide","command","UP","DOWN","copySlide","pasteSlide","catch","err","createSlide","createSlideByTemplate","newSlide","copyAndPasteSlide","targetSlidesId","cutSlide","selectAllSlide","newSelectedSlidesIndex","sortSlides","oldIndex","_slides","_slide","lockElement","newElementList","lock","unlockElement","groupElementIdList","deleteAllElements","canCombine","firstGroupId","inSameGroup","every","combineElements","combineElementList","combineElementMaxLevel","_element","combineElementIdList","insertLevel","uncombineElements","hasElementInGroup","some","handleElementIdList","useDeleteElement","copyElement","cutElement","pasteElement","quickCopyElement","selectAllElement","unlockedElements","newActiveElementIdList","moveElement","step","move","LEFT","RIGHT","getCombineElementLevelRange","minLevel","maxLevel","moveUpElement","copyOfElementList","nextElement","movedElementList","nextCombineElementList","level","movedElement","moveDownElement","prevElement","prevCombineElementList","moveTopElement","moveBottomElement","unshift","orderElement","TOP","BOTTOM","enterFullscreen","docElm","documentElement","requestFullscreen","mozRequestFullScreen","webkitRequestFullScreen","msRequestFullscreen","exitFullscreen","mozCancelFullScreen","webkitExitFullscreen","msExitFullscreen","isFullscreen","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","msFullscreenElement","webkitCurrentFullScreenElement","screenStore","enterScreening","enterScreeningFromStart","exitScreening","canvasScalePercentage","round","scaleCanvas","setCanvasScalePercentage","resetCanvas","keyboardStore","useSlideHandler","useCombineElement","useLockElement","useCopyAndPasteElement","useSelectAllElement","useMoveElement","useOrderElement","useScreening","useScaleCanvas","copy","cut","quickCopy","combine","uncombine","moveSlide","PAGEUP","PAGEDOWN","order","create","tabActiveElement","currentIndex","nextIndex","nextElementId","keydownListener","ctrlKey","shiftKey","altKey","metaKey","ctrlOrMetaKeyActive","toUpperCase","SPACE","P","preventDefault","F5","F","C","X","D","Z","Y","A","G","B","DELETE","BACKSPACE","ENTER","MINUS","EQUAL","DIGIT_0","TAB","keyupListener","window","onUnmounted","removeEventListener","pasteImageFile","imageFile","dataURL","pasteListener","clipboardDataItems","items","clipboardDataFirstItem","kind","getAsFile","getAsString","exporting","importSpecificFile","files","cover","readAsText","parseLineElement","isFlipV","isFlipH","borderWidth","borderType","borderColor","shapType","importPPTXFile","shapeList","json","slideFactor","fontsizeFactor","image","picBase64","imageSize","gradientType","gradientColor","colors","gradientRotate","rot","parseElements","textEl","fillColor","isVertical","blob","test","lineElement","shape","vAlignMap","vAlign","flipH","cellData","colSpan","rowSpan","xlabels","y","barDir","grouping","_el","readAsArrayBuffer","_Fragment","_renderList","hotkey","accept","inputRef","handleClick","handleChange","_renderSlot","$slots","ref_key","onChange","_withScopeId","n","_pushScopeId","_popScopeId","loading","tip","contentStyle","placement","contentVisible","_component_IconClose","_resolveComponent","_Teleport","onBeforeEnter","_withDirectives","_normalizeClass","_normalizeStyle","_vShow","disabled","placeholder","focused","handleInput","handleBlur","handleFocus","onInput","onFocus","onBlur","onKeydown","_withKeys","appendTo","center","triggerRef","contentRef","watch","hide","tippy","allowHTML","interactive","maxWidth","onShow","onShown","onHidden","_hoisted_7","_hoisted_8","_hoisted_9","href","_hoisted_10","useImport","mainMenuVisible","hotkeyDrawerVisible","editingTitle","titleInputRef","titleValue","startEditTitle","nextTick","handleUpdateTitle","goLink","url","open","_component_IconHamburgerButton","_component_IconPpt","_component_IconDown","_component_IconDownload","_component_IconGithub","_directive_tooltip","_resolveDirective","Popover","FileInput","PopoverMenuItem","_createTextVNode","Input","Drawer","HotkeyDoc","FullscreenSpin","injectKeySlideScale","Symbol","injectKeySlideId","injectKeyRadioGroupValue","removeAllRanges","getSelection","canvasRef","viewportLeft","viewportTop","initViewportPosition","canvasWidth","canvasHeight","viewportActualWidth","viewportActualHeight","setViewportPosition","newValue","oldValue","newViewportActualWidth","oldViewportActualWidth","newViewportActualHeight","oldViewportActualHeight","viewportStyles","resizeObserver","ResizeObserver","observe","unobserve","dragViewport","isMouseDown","startPageX","pageX","startPageY","pageY","originLeft","originTop","onmousemove","currentPageX","currentPageY","onmouseup","viewportRef","mouseSelectionVisible","mouseSelectionQuadrant","mouseSelection","updateMouseSelection","viewportRect","minSelectionRange","x","offsetWidth","offsetHeight","abs","quadrant","inRangeElementList","mouseSelectionLeft","mouseSelectionTop","mouseSelectionWidth","mouseSelectionHeight","isInclude","inRangeElement","inRangeElementIdList","groupElementList","groupElement","elementRef","handleDrop","dataTransfer","dataTransferItem","ondragleave","ondrop","ondragenter","ondragover","getAngleFromCoordinate","radian","atan2","angle","rotateElement","isTouchEvent","MouseEvent","changedTouches","elOriginRotate","elLeft","elTop","elWidth","elHeight","centerX","centerY","handleMousemove","mouseX","mouseY","sorptionRange","handleMouseup","ontouchmove","ontouchend","ELEMENT_TYPE_ZH","chart","video","audio","MIN_SIZE","getRotateElementPoints","taRadian","raRadian","halfWidth","halfHeight","leftTopPoint","topPoint","rightTopPoint","rightPoint","rightBottomPoint","bottomPoint","leftBottomPoint","leftPoint","getOppositePoint","direction","oppositeMap","RIGHT_BOTTOM","LEFT_BOTTOM","LEFT_TOP","RIGHT_TOP","ClipPathTypes","ClipPaths","alignmentLines","scaleElement","elOriginLeft","elOriginTop","elOriginWidth","elOriginHeight","originTableCellMinHeight","elRotate","rotateRadian","aspectRatio","minSize","getSizeWithinRange","getHeightWithinRange","minHeight","baseLeft","baseTop","horizontalLines","verticalLines","oppositePoint","edgeWidth","edgeHeight","isActiveGroupElement","right","topLine","bottomLine","leftLine","rightLine","edgeTopLine","edgeBottomLine","edgeHorizontalCenterLine","edgeLeftLine","edgeRightLine","edgeVerticalCenterLine","alignedAdsorption","currentX","currentY","_alignmentLines","isVerticalAdsorbed","isHorizontalAdsorbed","correctionVal","axis","revisedX","revisedY","currentPoints","currentOppositePoint","currentBaseLeft","currentBaseTop","moveX","moveY","scaleMultiElement","operateWidth","operateHeight","originElementList","currentMinX","currentMaxX","currentMinY","currentMaxY","currentOppositeWidth","currentOppositeHeight","widthScale","heightScale","originElement","originEl","selectElement","startMove","newActiveIdList","groupMembersId","uniq","dragElement","originActiveElementList","isMisoperation","horizontalCenterLine","verticalCenterLine","targetMinX","targetMaxX","targetMinY","targetMaxY","targetLeft","targetTop","targetCenterX","targetCenterY","dragLineElement","adsorptionPoints","startX","startY","endX","endY","midX","midY","c1X","c1Y","c2X","c2Y","START","adsorptionPoint","END","C1","C2","newEl","moveShapeKeypoint","shapePathData","baseSize","originPos","shapeElement","formatCreateSelection","selectionData","formatCreateSelectionForLine","_start","_end","insertElementFromCreateSelection","alignElementToCanvas","viewportWidth","viewportHeight","CENTER","VERTICAL","HORIZONTAL","shadowStyle","flipStyle","CLIPPATHS","rect","RECT","rect2","POLYGON","createPath","rect3","roundRect","ellipse","ELLIPSE","triangle","triangle2","triangle3","rhombus","pentagon","hexagon","heptagon","octagon","chevron","arrow","parallelogram","parallelogram2","trapezoid","trapezoid2","clip","clipShape","imgPosition","filters","outlineWidth","outlineStyle","outlineColor","strokeDashArray","useElementOutline","toRef","overflow","rx","ry","stroke","cx","cy","Function","d","elementInfo","useClipImage","ImageRectOutline","ImageEllipseOutline","ImagePolygonOutline","clipPath","clipData","clipWrapperPositionStyle","isSettingClipRange","currentRange","getClipDataTransformInfo","bottomImgPositionStyle","topImgWrapperPosition","topImgWrapperPositionStyle","topImgPositionStyle","bottomWidth","bottomHeight","initClipPosition","handleClip","clipedEmitData","keyboardListener","updateRange","retPosition","moveClipRange","bottomPosition","originPositopn","scaleClipRange","minWidth","targetWidth","targetHeight","rotateClassName","cornerPoint","edgePoints","_directive_click_outside","draggable","alt","onMousedown","_withModifiers","contextmenus","isCliping","useElementShadow","useElementFlip","useFilter","handleSelectElement","stopPropagation","originClip","centerOffsetX","centerOffsetY","rotatedCenterX","rotatedCenterY","_props","_directive_contextmenu","transform","ImageClipHandler","onClip","onTouchstart","ImageOutline","onDragstart","colorMask","buildKeymap","bind","cmd","joinUp","joinDown","undoInputRule","selectParentNode","toggleMark","strong","chainCommands","splitListItem","list_item","newlineInCode","createParagraphNear","liftEmptyBlock","splitBlockKeepMarks","liftListItem","sinkListItem","blockQuoteRule","wrappingInputRule","orderedListRule","childCount","bulletListRule","codeRule","inputRegex","InputRule","insertText","linkRule","urlRegEx","buildInputRules","rules","smartQuotes","ellipsis","emDash","inputRules","isEmptyParagraph","placeholderPlugin","Plugin","decorations","decoration","Decoration","after","DecorationSet","buildPlugins","plugins","keymap","baseKeymap","dropCursor","gapCursor","history","listStyleType","group","parseDOM","tag","getAttrs","dom","hasAttribute","getAttribute","fontSize","toDOM","listItem","_listItem","indent","textIndent","textIndentLevel","floor","ignore","skip","excludes","forecolor","inline","inclusive","dataset","schemaNodes","schemaMarks","Schema","createDocument","htmlString","parser","DOMParser","parseFromString","fromSchema","initProsemirrorEditor","pluginOptions","EditorView","EditorState","EmitterEvents","emitter","mitt","setTextAlign","alignment","tasks","allowedNodeTypes","Set","has","task","setNodeMarkup","alignmentCommand","setSelection","setNodeIndentMarkup","delta","indentKey","minIndent","maxIndent","nodeAttrs","setIndent","TextSelection","AllSelection","indentCommand","docChanged","textIndentCommand","toggleList","listType","itemType","textStyleAttr","blockRange","parentList","validContent","wrapInList","setListStyle","styles","setNodeAttribute","autoFocus","editorViewRef","innerHTML","handleKeydown","textContent","hasFocus","replaceRangeWith","setProps","execCommand","lift","wrapIn","textStyle","removeMark","keep","newProps","handleDOMEvents","keydown","mouseup","syncAttrsToStore","RICH_TEXT_COMMAND","SYNC_RICH_TEXT_ATTRS_TO_STORE","off","canMove","realHeightCache","realWidthCache","updateTextElementHeight","entries","contentRect","realHeight","realWidth","updateContent","checkEmptyText","pureText","isHandleElement","textShadow","letterSpacing","fontFamily","writingMode","ElementOutline","ProsemirrorEditor","undefined","paragraphSpace","onUpdate","color1","color2","x1","y1","x2","y2","gradientTransform","execFormatPainter","defaultText","updateText","_text","prosemirrorEditorRef","startEdit","onMouseup","onDblclick","gradient","GradientDefs","pathMap","dot","rotateMap","markerUnits","orient","markerWidth","markerHeight","refX","refY","svgWidth","svgHeight","lineDashArray","LinePointMarker","legend","chartRef","slideScale","inject","chartHeight","getPieChartData","getOptions","propsOptopns","renderChart","BarChart","LineChart","PieChart","updateChart","themeColors","analogous","supplement","updateTheme","setProperty","updateGridColor","flexDirection","openDataEditor","OPEN_CHART_DATA_EDITOR","Chart","getTextStyle","textDecoration","fontWeight","fontStyle","formatText","hideCells","cell","subThemeColor","immediate","textareaRef","onpaste","excelData","onBeforeUnmount","contenteditable","isStartSelect","startCell","endCell","tableCells","get","set","newData","useSubThemeColor","colSizeList","totalWidth","reduce","a","b","removeSelectedCells","dragLinePosition","useHideCells","selectedCells","isEqual","activedCell","handleCellMousedown","rowIndex","colIndex","button","handleCellMouseenter","isHideCell","selectCol","maxRow","selectRow","maxCol","deleteRow","_tableCells","targetCells","hideCellsPos","deleteCol","insertRow","insertCol","fillTable","rowCount","defaultCell","newRows","mergeCells","splitCells","handleMousedownColHandler","originWidth","clearSelectedCellText","tabActiveCell","getNextCell","nextRow","nextCol","nextCell","textRef","insertExcelData","fillRowCount","fillColCount","getEffectiveTableCells","effectiveTableCells","_rowCells","checkCanDeleteRowOrCol","canDeleteRow","canDeleteCol","checkCanMergeOrSplit","isMultiSelected","targetCell","canMerge","canSplit","cellIndex","handler","divider","span","borderStyle","CustomTextarea","onUpdateValue","onInsertExcelData","updateTableElementHeight","updateTableCells","updateColWidths","widths","updateSelectedCells","EditableTable","onChangeColWidths","onChangeSelectedCells","openLatexEditor","OPEN_LATEX_EDITOR","videoRef","exec","canPlayType","Hls","isSupported","hls","loadSource","attachMedia","flvjs","flvPlayer","createPlayer","attachMediaElement","load","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","poster","secondToTime","second","isNaN","add0","num","hour","sec","getBoundingClientRectViewLeft","playBarWrap","volumeBarRef","volume","paused","currentTime","loaded","bezelTransition","playbackRate","playBarTimeVisible","playBarTime","playBarTimeLeft","ptime","dtime","playedBarWidth","loadedBarWidth","volumeBarWidth","speedMenuVisible","speedOptions","seek","play","pause","toggle","setVolume","muted","speed","rate","handleDurationchange","handleTimeupdate","handleEnded","handleProgress","buffered","loadError","handleError","thumbMove","clientX","thumbUp","handleMousedownPlayBar","volumeMove","volumeUp","handleMousedownVolumeBar","handleClickVolumeBar","handleMousemovePlayBar","px","tx","toggleVolume","toggleLoop","autoHideControllerTimer","hideController","autoHideController","played","useMSE","_component_IconPause","_component_IconPlayOne","_component_IconVolumeMute","_component_IconVolumeNotice","_component_IconVolumeSmall","onMousemove","playsinline","onDurationchange","onTimeupdate","onEnded","onProgress","onPlay","onPause","onError","onAnimationend","VideoPlayer","audioRef","handlePlayed","audioIconSize","audioPlayerPosition","audioWidth","audioHeight","AudioPlayer","elementIndex","isMultiSelect","openLinkDialog","currentElementComponent","elementTypeMap","IMAGE","ImageElement","TEXT","TextElement","SHAPE","ShapeElement","LINE","LineElement","CHART","ChartElement","TABLE","TableElement","LATEX","LatexElement","VIDEO","VideoElement","AUDIO","AudioElement","useAlignElementToCanvas","subText","zIndex","_resolveDynamicComponent","bgColor","colorList","mostReadable","includeFallbackColors","p","backgroundStyle","backgroundImage","backgroundRepeat","backgroundSize","useSlideBackgroundStyle","GridLines","sizeStyle","markerSize","marker","selectionRef","createSelection","absX","absY","isOpposite","endPageX","endPageY","defaultSize","lineData","_startX","_startY","_endX","_endY","onContextmenu","shapeCanvasRef","mousePosition","closed","getPoint","lastPointX","lastPointY","updateMousePosition","firstPointX","firstPointY","addPoint","xList","yList","formatedPoints","ESC","resizeHandlers","textElementResizeHandlers","verticalTextElementResizeHandlers","borderLines","T","R","isWide","localActiveElementList","useCommonOperate","setRange","watchEffect","disableResize","BorderLine","ResizeHandler","script","__default__","inheritAttrs","handlerVisible","scaleWidth","scaleHeight","RotateHandler","keypointStyle","keypointPos","handlers","ctrlHandler","ctrlHandler1","ctrlHandler2","cannotRotate","setLink","linkRegExp","removeLink","margin","useLink","turnTarget","targetIndex","Divider","isSelected","isActive","currentOperateComponent","ImageElementOperate","TextElementOperate","ShapeElementOperate","LineElementOperate","TableElementOperate","CommonElementOperate","elementIndexListInAnimation","indexList","transformOrigin","LinkHandler","needScaleSize","zoom","StaticTable","BaseImageElement","BaseTextElement","BaseShapeElement","BaseLineElement","BaseChartElement","BaseTableElement","BaseLatexElement","BaseVideoElement","BaseAudioElement","provide","ThumbnailElement","tabs","card","tabsStyle","tabStyle","spaceAround","spaceBetween","tab","checked","first","showLabel","popoverVisible","selectRef","updateWidth","handleSelect","option","padding","boxShadow","address","slideOptions","selectedSlide","save","Tabs","marginBottom","Select","ThumbnailSlide","Button","closeButton","closeOnClickMask","closeOnEsc","modalRef","onEsc","onClickMask","tabindex","onKeyup","linkDialogVisible","setLocalElementList","useViewportSize","useDropImageOrText","useMouseSelection","useDragElement","useDragLineElement","useSelectElement","useScaleElement","useRotateElement","useMoveShapeKeypoint","handleClickBlankArea","handleDblClick","removeEditorAreaFocus","throttleScaleCanvas","throttleUpdateSlideIndex","handleMousewheelCanvas","deltaY","toggleRuler","useInsertFromCreateSelection","insertCustomShape","onWheel","ElementCreateSelection","onCreated","ShapeCreateCanvas","AlignmentLine","MultiSelectOperate","Operate","ViewportBackground","MouseSelection","EditableElement","Ruler","Modal","LinkDialog","selectShape","ShapeItemThumbnail","LINE_LIST","selectLine","chartList","selectChart","_component_IconChartLine","_component_IconChartHistogram","_component_IconChartPie","_component_IconChartHistogramOne","_component_IconChartLineArea","_component_IconChartRing","_component_IconChartScatter","Infinity","number","_vModelText","customRow","customCol","isCustom","handleClickTable","insertCustomTable","NumberInput","videoSrc","audioSrc","insertVideo","insertAudio","hfmathConfig","SUB_SUP_SCALE","FORMULA_LIST","SYMBOL_LIST","box","pathd","eq","hfmath","boxW","boxH","svg","SCALE_X","SCALE_Y","rows","resizable","formulaList","symbolTabs","textAreaRef","selectedSymbolKey","symbolPool","selectedSymbol","insertSymbol","TextArea","FormulaContent","SymbolContent","canvasScalePresetList","canvasScaleVisible","applyCanvasPresetScale","insertImageElement","shapePoolVisible","linePoolVisible","chartPoolVisible","tableGeneratorVisible","mediaInputVisible","latexEditorVisible","textTypeSelectVisible","drawText","drawShape","drawLine","toggleSelectPanel","toggleSraechPanel","_component_IconBack","_component_IconNext","_component_IconMoveOne","_component_IconSearch","_component_IconFontSize","_component_IconTextRotationNone","_component_IconTextRotationDown","_component_IconPicture","_component_IconGraphicDesign","_component_IconConnection","_component_IconChartProportion","_component_IconInsertTable","_component_IconFormula","_component_IconVideoTwo","_component_IconMinus","_component_IconPlus","_component_IconFullScreen","ShapePool","onSelect","LinePool","ChartPool","TableGenerator","onInsert","MediaInput","onInsertVideo","onInsertAudio","LaTeXEditor","slidesLoadLimit","loadSlide","selectSlideTemplate","useLoadSlides","presetLayoutPopoverVisible","thumbnailsRef","activeThumbnailRef","$el","scrollIntoView","behavior","changeSlideIndex","handleClickSlideThumbnail","minIndex","handleDragEnd","eventData","contextmenusThumbnails","contextmenusThumbnailItem","LayoutPool","Draggable","modelValue","scroll","scrollSensitivity","onEnd","itemKey","toggleTextFormatPainter","sliderRef","getNewValue","diff","fround","targetNumber","accuracy","NP","tooltipValue","tooltipRangeStartValue","tooltipRangeEndValue","getPercentage","progress","_percentage","remainder","updateRangeEnd","updatePercentage","oldValueArr","newValueArr","updatePercentageEnd","handleMousedown","deep","updateOpacity","Slider","_component_IconPlatte","white","grey","checkboardCache","renderCheckboard","fillRect","translate","toDataURL","getCheckboard","checkboard","bgStyle","rgbaStr","r","g","alphaRef","containerWidth","xOffset","pageXOffset","unbindEventListeners","handleMouseDown","Checkboard","hue","oldHue","pullDirection","hsla","toHsl","pointerLeft","s","hueRef","percent","l","hsva","toHsv","pointerTop","emitChangeEvent","param","saturationRef","containerHeight","yOffset","pageYOffset","clamp","saturation","bright","val","_hex","toHex8String","toHexString","isValid","toRgb","RECENT_COLORS","presetColorConfig","startColor","endColor","_startColor","_endColor","rStep","gStep","bStep","gradientColorArr","getPresetColors","presetColors","standardColors","recentColors","rgbaString","currentColor","selectPresetColor","colorString","updateRecentColorsCache","_color","maxLength","recentColorsCache","setItem","changeColor","openEyeDropper","isSupportedEyeDropper","browserEyeDropper","customEyeDropper","eyeDropper","EyeDropper","tColor","sRGBHex","targetRef","maskRef","colorBlockRef","tagName","classList","contains","toCanvas","fontEmbedCSS","pixelRatio","toFixed","handleMouseleave","_component_IconNeedle","Saturation","onColorChange","Hue","Alpha","EditableInput","c","fixed","hasOutline","updateOutline","outlineProps","toggleOutline","_outline","Switch","ColorPicker","ColorButton","hasShadow","updateShadow","shadowProps","_shadow","toggleShadow","passive","_value","updateValue","ButtonGroup","_hoisted_23","_hoisted_24","_hoisted_25","presetStyles","useTextFormatPainter","bulletListPanelVisible","orderedListPanelVisible","indentLeftPanelVisible","indentRightPanelVisible","bulletListStyleTypeOption","orderedListStyleTypeOption","fontSizeOptions","lineHeightOptions","wordSpaceOptions","paragraphSpaceOptions","updateLineHeight","updateParagraphSpace","updateWordSpace","updateFill","emitRichTextCommand","emitBatchRichTextCommand","linkPopoverVisible","openLinkPopover","updateLink","_component_IconAddText","_component_IconText","_component_IconHighLight","_component_IconTextBold","_component_IconTextItalic","_component_IconTextUnderline","_component_IconStrikethrough","_component_IconCode","_component_IconQuote","_component_IconFormat","_component_IconFormatBrush","_component_IconLinkOne","_component_IconAlignTextLeft","_component_IconAlignTextCenter","_component_IconAlignTextRight","_component_IconAlignTextBoth","_component_IconList","_component_IconOrderedList","_component_IconIndentLeft","_component_IconIndentRight","_component_IconRowHeight","_component_IconVerticalSpacingBetweenItems","_component_IconFullwidth","SelectGroup","icon","TextColorButton","CheckboxButton","RadioGroup","RadioButton","ElementShadow","ElementOpacity","updateFlip","flipProps","_component_IconFlipVertically","_component_IconFlipHorizontally","defaultFilters","unit","filterOptions","hasFilters","filterItem","updateFilter","_handleElement","originFilters","toggleFilters","defaultColorMask","hasColorMask","toggleColorMask","updateColorMask","shapeClipPathOptions","ratioClipOptions","ratio","handleImageElement","clipPanelVisible","clipImage","getImageElementDataBeforeClip","imgLeft","imgTop","originClipRange","originHeight","presetImageClip","imageRatio","distance","replaceImage","resetImage","setBackgroundImage","_component_IconTailoring","_component_IconTransform","_component_IconUndo","_component_IconTheme","ElementFlip","typeItem","ElementColorMask","ElementFilter","toggleShapeFormatPainter","handleShapeElement","fillType","useShapeFormatPainter","updateFillType","updateGradient","gradientProps","_gradient","changeShape","updateTextAlign","_component_IconAlignTextTopOne","_component_IconAlignTextMiddleOne","_component_IconAlignTextBottomOne","handleLineElement","updateLine","CELL_WIDTH","CELL_HEIGHT","selectedRange","tempRangeSize","focusCell","rangeLines","resizablePointStyle","initData","_data","moveNextRow","getTableData","labelsItem","labelInputRef","legendsItem","seriesItem","valueInputRef","clear","handlePaste","closeEditor","changeSelectRange","autocomplete","onPaste","presetChartThemes","handleChartElement","chartDataEditorVisible","presetThemesVisible","presetThemeColorHoverIndex","_lineSmooth","_showLine","_showArea","_horizontalBars","_donut","_stackBars","updateData","updateOptions","optionProps","newOptions","addThemeColor","applyPresetTheme","deleteThemeColor","updateLegend","_component_IconEdit","_component_IconCloseSmall","Checkbox","itemIndex","ChartDataEditor","onSave","textAttrs","hasTheme","minRowCount","minColCount","updateTextAttrState","selectedCell","updateTextAttrs","textAttrProp","themeProp","_theme","toggleTheme","setTableRow","newTableCells","setTableCol","newColSizeList","_component_IconFill","handleLatexElement","updateLatex","updateLatexData","handleVideoElement","updateVideo","setVideoPoster","handleAudioElement","updateAudio","updateFontStyle","panelMap","TextStylePanel","ImageStylePanel","ShapeStylePanel","LineStylePanel","ChartStylePanel","TableStylePanel","LatexStylePanel","VideoStylePanel","AudioStylePanel","currentPanelComponent","MultiStylePanel","activeGroupElement","isHorizontalText","isVerticalText","updateLeft","updateTop","updateShapePathData","updateHeight","updateRotate","updateFixedRatio","updateRotate45","_rotate","_component_IconSendToBack","_component_IconBringToFrontOne","_component_IconBringToFront","_component_IconSentToBack","_component_IconAlignLeft","_component_IconAlignVertically","_component_IconAlignRight","_component_IconAlignTop","_component_IconAlignHorizontally","_component_IconAlignBottom","_component_IconLock","_component_IconUnlock","_component_IconRotate","ANIMATION_DEFAULT_DURATION","ANIMATION_DEFAULT_TRIGGER","ANIMATION_CLASS_PREFIX","ENTER_ANIMATIONS","EXIT_ANIMATIONS","ATTENTION_ANIMATIONS","SLIDE_ANIMATIONS","animationEffects","effect","animationTypes","activeTab","animateIn","animationPoolVisible","hoverPreviewAnimation","animationSequence","elType","animationEffect","handleElementAnimation","deleteAnimation","runAnimation","elRef","animationName","handleAnimationEnd","removeProperty","once","runAllAnimation","updateElementAnimationDuration","updateElementAnimationTrigger","updateElementAnimation","handleAnimationId","animationItem","addAnimation","popoverMaskHide","handlePopoverVisibleChange","openAnimationPool","in","out","attention","_component_IconEffects","_component_IconClick","handle","PRESET_THEMES","getSlideAllColors","getAlpha","createSlideThemeColorMap","newColors","oldColors","themeColorMap","otherColors","setSlideTheme","colorMap","applyPresetThemeToSingleSlide","applyPresetThemeToAllSlides","applyThemeToAllSlides","applyAll","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","_hoisted_42","_hoisted_43","_hoisted_44","_hoisted_45","_hoisted_46","_hoisted_47","_hoisted_48","_hoisted_49","moreThemeConfigsVisible","useSlideTheme","updateBackgroundType","newBackground","updateBackground","uploadBackgroundImage","applyBackgroundAllSlide","updateViewportRatio","_component_IconRight","currentTurningMode","turningMode","updateTurningMode","applyAllSlide","alignActiveElement","groupElementRangeMap","activeElement","groupElements","horizontalCenter","verticalCenter","displayItemCount","count","groupIdList","uniformHorizontalDisplay","copyOfActiveElementList","singleElemetList","groupList","groupEl","formatedGroupList","groupItem","list","sort","itemA","itemB","sortedElementData","firstItem","lastPos","lastWidth","currentPos","currentWidth","sortedItem","uniformVerticalDisplay","totalHeight","lastHeight","currentHeight","useAlignActiveElement","useUniformDisplayElement","alignElement","_component_IconGroup","_component_IconUngroup","selectSymbol","elementTabs","EL_STYLE","SYMBOL","EL_POSITION","EL_ANIMATION","slideTabs","SLIDE_ANIMATION","multiSelectTabs","MULTI_POSITION","currentTabs","currentTabsValue","ElementStylePanel","ElementPositionPanel","ElementAnimationPanel","SlideDesignPanel","SlideAnimationPanel","MultiPositionPanel","SymbolPanel","menuInstance","menuRef","hideMenuInstance","updateTextContent","anchorNode","focusNode","isCollapsed","getRangeAt","getReferenceClientRect","mousedown","input","hideOnClick","remark","resize","newHeight","Editor","childlessTags","closingTags","closingTagAncestorBreakers","li","dt","dd","tbody","thead","tfoot","td","voidTags","jumpPosition","movePositopn","findTextEnd","isEnd","textEnd","char","charAt","lexText","tokens","lexComment","contentEnd","commentEnd","lexTagName","isTagChar","lexTagAttributes","quote","wordBegin","words","isQuoteEnd","isTagEnd","isWordEnd","isQuoteStart","word","isNotPair","secondWord","startsWith","newWord","thirdWord","endsWith","lexSkipTag","safeTagName","nextTag","tagState","lexTag","textStart","secondChar","tagStartClose","firstChar","tagEndClose","lex","isComment","safeTag","lexer","root","stack","hasTerminalParent","tagParents","parentTagName","rewindStack","newLength","token","tagToken","shouldRewind","isClosingTag","shouldRewindToAutoClose","previousIndex","attributes","tagEndToken","_token","elementNode","hasChildren","innerState","splitHead","sep","idx","unquote","car","formatAttributes","attribute","parts","trim","format","toAST","typeMap","toPoints","pathData","SVGPathData","commands","lastPoint","cubicBezierPoints","arcToBezier","py","rX","rY","xAxisRotation","xRot","largeArcFlag","lArcFlag","sweepFlag","cbPoint","characters","PREFIX","utf8Encode","utftext","charCodeAt","String","fromCharCode","encode","chr1","chr2","chr3","enc1","enc2","enc3","enc4","output","svg2Base64","XMLS","XMLSerializer","serializeToString","INCH_PX_RATIO","PT_PX_RATIO","exportImage","domRef","quality","ignoreWebfont","toImage","toPng","toJpeg","foreignObjectSpans","querySelectorAll","spanRef","removeAttribute","config","dataUrl","saveAs","exportSpecificFile","Blob","exportJSON","formatColor","alpha","formatHTML","html","ast","bulletFlag","slices","obj","baseStyleObj","isBlockTag","lastSlice","breakLine","styleObj","styleAttr","styleArr","styleItem","_key","dataIndentAttr","highlight","strike","italic","fontFace","hyperlink","bullet","paraSpaceBefore","indentLevel","formatPoints","moveTo","getShadowOption","getOutlineOption","transparency","dashType","getLinkOption","exportPPTX","masterOverwrite","ignoreMedia","pptx","pptxgen","layout","defineLayout","bgAlpha","defineSlideMaster","pptxSlide","mix","addNotes","textProps","valign","lineSpacingMultiple","autoFit","charSpacing","vert","addText","linkOption","rounding","originW","originH","sizing","addImage","svgRef","base64SVG","addShape","beginArrowType","endArrowType","chartData","chartColors","plotArea","showLegend","legendPos","legendColor","legendFontSize","ChartType","lineSize","doughnut","holeSize","addChart","hiddenCells","rowData","tableData","subThemeColors","_row","cellOptions","colW","border","pt","addTable","extMatch","extn","ext","videoExts","audioExts","addMedia","writeFile","fileName","imageThumbnailsRef","rangeType","renderSlides","useExport","expImage","createIframe","iframe","writeContent","printNode","docType","styleSheets","styleSheet","cssRules","rule","head","write","print","iframeContentWindow","contentWindow","contentDocument","handleLoadIframe","handleAfterprint","pdfThumbnailsRef","expPDF","pageSize","currentDialogComponent","dialogMap","ExportImage","ExportJSON","ExportPDF","ExportPPTX","ExportSpecificFile","moveable","moveablePanelRef","windowWidth","_elements","lastItem","selectGroupEl","idList","selectEl","hideElement","showAll","currentSlideElIdList","needHiddenElementIdList","hideAll","editingElId","saveElementName","enterEdit","_component_IconUp","_component_IconPreviewClose","_component_IconPreviewOpen","MoveablePanel","searchWord","replaceWord","searchResults","searchIndex","modifiers","search","textList","matchRegex","RegExp","textRegex","rets","highlightCurrentSlide","clearMarks","getTextNodeList","nodeList","textNodes","shift","TEXT_NODE","wholeText","getTextInfoList","startIdx","endIdx","getMatchList","keyword","reg","matchList","matchStart","matchEnd","textIdx","textNode","nodeMatchStartIdx","nodeMatchLength","splitText","innerText","substring","parentNode","replaceChild","highlightTableText","markNodes","createTextNode","lastTarget","setActiveMark","searchNext","searchPrev","targetElement","replaced","targetSlide","lastMarkIndex","markIndex","reset","toggleModifiers","useSearch","searchInpRef","_component_IconLeft","_isRef","onEnter","suffix","closeExportDialog","remarkHeight","useGlobalHotkey","usePasteEvent","EditorHeader","Thumbnails","CanvasTool","Canvas","Remark","Toolbar","SelectPanel","SearchPanel","onClosed","ExportDialog","animationIndex","inAnimation","playedSlidesMinIndex","endAnimationCount","classname","revokeAnimation","execPrev","autoPlayTimer","closeAutoPlay","clearInterval","loopPlay","setLoopPlay","throttleMassage","turnSlideToIndex","execNext","autoPlayInterval","autoPlay","setInterval","setAutoPlayInterval","interval","mousewheelListener","touchInfo","touchStartListener","touchEndListener","turnPrevSlide","turnNextSlide","turnSlideToId","wrapRef","slideWidth","slideHeight","setSlideContentSize","slideWrapRef","winWidth","winHeight","fullscreenState","escExit","handleFullscreenChange","manualExitFullscreen","inCurrentSlide","audioPlayerRef","ScreenVideoElement","ScreenAudioElement","needWaitAnimation","elementIndexInAnimation","firstAnimation","openLink","visibility","ScreenElement","slidesWithTurningMode","turningModeKeys","random","ScreenSlide","turnSlide","_component_IconArrowCircleLeft","model","blackboard","penSize","markSize","rubberSize","writingBoardRef","lastTime","lastLineWidth","mouse","mouseInCanvas","updateCanvasSize","initCanvas","lineCap","lineJoin","updateCtx","globalCompositeOperation","globalAlpha","draw","posX","posY","lastPosX","lastPosY","strokeStyle","beginPath","lineTo","closePath","erase","sinRadius","cosRadius","rectPoint1","rectPoint2","rectPoint3","rectPoint4","arc","restore","getDistance","getLineWidth","t","maxV","minV","handleMove","getMouseOffsetPosition","event","canvasRect","clearCanvas","setImageDataURL","imageDataURL","Image","drawImage","_component_IconWrite","onTouchmove","onTouchend","writingBoardColors","writingBoardColor","writingBoardModel","sizePopoverType","changeModel","closeWritingBoard","where","equals","ret","currentImg","hanldeWritingEnd","_component_IconErase","_component_IconClear","WritingBoard","inTiming","isCountdown","minute","inputEditable","toggleCountdown","changeTime","isNumber","maxlength","changeViewMode","useExecPlay","useSlideSize","useFullscreen","rightToolsVisible","writingBoardToolVisible","timerlVisible","slideThumbnailModelVisible","laserPen","_component_IconLeftTwo","_component_IconRightTwo","_component_IconMagic","_component_IconStopwatchStart","_component_IconListView","_component_IconOffScreenOne","_component_IconFullScreenOne","_component_IconPower","ScreenSlideList","SlideThumbnails","WritingBoardTool","CountdownTimer","slideListWrapRef","remarkFontSize","currentSlideRemark","handleMousewheelThumbnails","scrollBy","setRemarkFontSize","offsetLeft","scrollTo","viewMode","BaseView","PresenterView","_resizeHandlers","delayOnTouchOnly","delay","insertTextElement","insertShapeElement","square","handleInputMark","_component_IconCopy","_component_IconDelete","_component_IconSquare","_component_IconRound","MobileThumbnails","updateFontColor","changeMode","_component_IconLogout","contentWidth","contentheight","contentRatio","Header","MobileOperate","MobileEditableElement","SlideToolbar","ElementToolbar","toolVisible","playerSize","slideSize","playerRatio","mobileRef","screenWidth","_component_IconFullScreenPlay","_mode","currentComponent","componentMap","MobileEditor","MobilePlayer","MobilePreview","_isPC","onbeforeunload","discardedDB","discardedDBList","newDiscardedDB","Screen","Mobile","register","ready","console","log","registered","cached","updatefound","updated","offline","menus","handleClickMenuItem","_component_menu_content","menu","removeContextmenu","MENU_WIDTH","MENU_HEIGHT","DIVIDER_HEIGHT","PADDING","menuCount","dividerCount","menuWidth","menuHeight","screenHeight","MenuContent","CTX_CONTEXTMENU_HANDLER","contextmenuListener","binding","ContextmenuComponent","ContextmenuDirective","mounted","unmounted","CTX_CLICK_OUTSIDE_HANDLER","clickListener","composedPath","isClickOutside","ClickOutsideDirective","TOOLTIP_INSTANCE","TooltipDirective","setContent","directive","Contextmenu","ClickOutside","Tooltip","createApp","App","use","Icon","Directive","createPinia","mount","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","m","deferred","O","chunkIds","fn","priority","notFulfilled","fulfilled","getter","__esModule","definition","o","defineProperty","enumerable","globalThis","prop","prototype","hasOwnProperty","toStringTag","nmd","paths","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/service-worker.js.map b/service-worker.js.map index 2481f68a..a7220bd5 100644 --- a/service-worker.js.map +++ b/service-worker.js.map @@ -1 +1 @@ -{"version":3,"file":"service-worker.js","sources":["../../../../../tmp/c68ea2d63aa71a8647eca6b12c1a14a9/service-worker.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-routing/registerRoute.mjs';\nimport {ExpirationPlugin as workbox_expiration_ExpirationPlugin} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-expiration/ExpirationPlugin.mjs';\nimport {CacheableResponsePlugin as workbox_cacheable_response_CacheableResponsePlugin} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-cacheable-response/CacheableResponsePlugin.mjs';\nimport {NetworkFirst as workbox_strategies_NetworkFirst} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-strategies/NetworkFirst.mjs';\nimport {setCacheNameDetails as workbox_core_setCacheNameDetails} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-core/setCacheNameDetails.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\nworkbox_core_setCacheNameDetails({prefix: \"pptist\"});\n\n\nself.skipWaiting();\n\n\n\n\n\nworkbox_routing_registerRoute(/.*/, new workbox_strategies_NetworkFirst({ \"cacheName\":\"PPTist\", plugins: [new workbox_expiration_ExpirationPlugin({ maxAgeSeconds: 36000 }), new workbox_cacheable_response_CacheableResponsePlugin({ statuses: [ 0, 200 ] })] }), 'GET');\n\n\n\n\n"],"names":["workbox_core_setCacheNameDetails","prefix","self","skipWaiting","workbox_routing_registerRoute","workbox_strategies_NetworkFirst","cacheName","plugins","workbox_expiration_ExpirationPlugin","maxAgeSeconds","workbox_cacheable_response_CacheableResponsePlugin","statuses"],"mappings":"0nBAoBAA,EAAAA,oBAAiC,CAACC,OAAQ,WAG1CC,KAAKC,cAMLC,EAAAA,cAA8B,KAAM,IAAIC,eAAgC,CAAEC,UAAY,SAAUC,QAAS,CAAC,IAAIC,mBAAoC,CAAEC,cAAe,OAAU,IAAIC,EAAAA,wBAAmD,CAAEC,SAAU,CAAE,EAAG,UAAc"} \ No newline at end of file +{"version":3,"file":"service-worker.js","sources":["../../../../../tmp/162c39775575b6b4c4e64b30a4a15cf9/service-worker.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-routing/registerRoute.mjs';\nimport {ExpirationPlugin as workbox_expiration_ExpirationPlugin} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-expiration/ExpirationPlugin.mjs';\nimport {CacheableResponsePlugin as workbox_cacheable_response_CacheableResponsePlugin} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-cacheable-response/CacheableResponsePlugin.mjs';\nimport {NetworkFirst as workbox_strategies_NetworkFirst} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-strategies/NetworkFirst.mjs';\nimport {setCacheNameDetails as workbox_core_setCacheNameDetails} from '/home/runner/work/PPTist/PPTist/node_modules/workbox-core/setCacheNameDetails.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\nworkbox_core_setCacheNameDetails({prefix: \"pptist\"});\n\n\nself.skipWaiting();\n\n\n\n\n\nworkbox_routing_registerRoute(/.*/, new workbox_strategies_NetworkFirst({ \"cacheName\":\"PPTist\", plugins: [new workbox_expiration_ExpirationPlugin({ maxAgeSeconds: 36000 }), new workbox_cacheable_response_CacheableResponsePlugin({ statuses: [ 0, 200 ] })] }), 'GET');\n\n\n\n\n"],"names":["workbox_core_setCacheNameDetails","prefix","self","skipWaiting","workbox_routing_registerRoute","workbox_strategies_NetworkFirst","cacheName","plugins","workbox_expiration_ExpirationPlugin","maxAgeSeconds","workbox_cacheable_response_CacheableResponsePlugin","statuses"],"mappings":"0nBAoBAA,EAAAA,oBAAiC,CAACC,OAAQ,WAG1CC,KAAKC,cAMLC,EAAAA,cAA8B,KAAM,IAAIC,eAAgC,CAAEC,UAAY,SAAUC,QAAS,CAAC,IAAIC,mBAAoC,CAAEC,cAAe,OAAU,IAAIC,EAAAA,wBAAmD,CAAEC,SAAU,CAAE,EAAG,UAAc"} \ No newline at end of file