@agile_jy/word-editor 0.0.1-beta.2 → 0.0.1-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- (function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.id="canvas-editor-style",e.appendChild(document.createTextNode('.ce-select-control-popup{max-width:160px;min-width:69px;max-height:225px;position:absolute;z-index:1;border:1px solid #e4e7ed;border-radius:4px;background-color:#fff;box-shadow:0 2px 12px #0000001a;box-sizing:border-box;margin:5px 0;overflow-y:auto}.ce-select-control-popup ul{list-style:none;padding:3px 0;margin:0;box-sizing:border-box}.ce-select-control-popup ul li{font-size:13px;padding:0 20px;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#666;height:36px;line-height:36px;box-sizing:border-box;cursor:pointer}.ce-select-control-popup ul li:hover{background-color:#eef2fd}.ce-select-control-popup ul li.active{color:var(--COLOR-HOVER, #5175f4);font-weight:700}.ce-calculator{position:absolute;z-index:1;border:1px solid #e4e7ed;border-radius:4px;background-color:#fff;box-shadow:0 2px 12px #0000001a;box-sizing:border-box;margin:5px 0;padding:8px;width:200px}.ce-calculator-display{width:100%;height:40px;line-height:40px;text-align:right;padding:0 10px;margin-bottom:8px;border:1px solid #e4e7ed;border-radius:4px;background-color:#f5f7fa;font-size:16px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis}.ce-calculator-buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.ce-calculator-button{width:100%;height:36px;border:1px solid #e4e7ed;border-radius:4px;background-color:#fff;font-size:14px;cursor:pointer;transition:all .2s;box-sizing:border-box}.ce-calculator-button:hover{background-color:#eef2fd;border-color:#c6d1ff}.ce-calculator-button:active{background-color:#e1e8ff}.ce-calculator-button.operator{background-color:#f5f7fa}.ce-calculator-button.operator:hover{background-color:#eef2fd}.ce-calculator-button.equal{background-color:var(--COLOR-HOVER, #5175f4);color:#fff;border-color:var(--COLOR-HOVER, #5175f4)}.ce-calculator-button.equal:hover{background-color:var(--COLOR-HOVER, #6a84ff);border-color:var(--COLOR-HOVER, #6a84ff)}.ce-calculator-button.utility{background-color:#f0f2f5}.ce-calculator-button.utility:hover{background-color:#e6e8eb}.ce-date-container{display:none;width:300px;overflow:hidden;left:0;right:0;position:absolute;z-index:1;color:#606266;background:#ffffff;border-radius:4px;padding:10px;user-select:none;border:1px solid #e4e7ed;box-shadow:0 2px 12px #0000001a}.ce-date-container.active{display:block}.ce-date-wrap{display:none}.ce-date-wrap.active{display:block}.ce-date-title{display:flex;justify-content:center;align-items:center;text-align:center;color:#606266;font-size:16px}.ce-date-title>span{display:inline-block}.ce-date-title>span:not(.ce-date-title__now){font-family:cursive;cursor:pointer}.ce-date-title>span:not(.ce-date-title__now):hover{color:#5175f4}.ce-date-title .ce-date-title__pre-year,.ce-date-title .ce-date-title__pre-month{width:15%}.ce-date-title .ce-date-title__now{width:40%}.ce-date-title .ce-date-title__next-year,.ce-date-title .ce-date-title__next-month{width:15%}.ce-date-week{width:100%;display:flex;justify-content:center;margin-top:15px;padding-bottom:5px;border-bottom:1px solid #e4e7ed}.ce-date-week>span{list-style:none;width:calc(100%/7);text-align:center;color:#606266;font-size:14px}.ce-date-day{width:100%;display:flex;flex-wrap:wrap;align-items:center;margin-top:5px}.ce-date-day>div{width:calc(100%/7);height:40px;text-align:center;color:#606266;font-size:14px;cursor:pointer;line-height:40px;border-radius:4px}.ce-date-day>div:hover{color:#5175f4;opacity:.8}.ce-date-day>div.active{color:#5175f4;font-weight:700}.ce-date-day>div.disable{color:#c0c4cc}.ce-date-day>div.select{color:#fff;background-color:#5175f4}.ce-time-wrap{display:none;padding:10px;height:286px}.ce-time-wrap ::-webkit-scrollbar{width:0}.ce-time-wrap.active{display:flex}.ce-time-wrap li{list-style:none}.ce-time-wrap>li{width:33.3%;height:100%;text-align:center}.ce-time-wrap>li>span{transform:translateY(-5px);display:inline-block}.ce-time-wrap>li>ol{height:calc(100% - 20px);overflow-y:auto;border:1px solid #e2e2e2;position:relative}.ce-time-wrap>li:first-child>ol{border-right:0}.ce-time-wrap>li:last-child>ol{border-left:0}.ce-time-wrap>li>ol>li{line-height:30px;cursor:pointer;transition:all .3s}.ce-time-wrap>li>ol>li:hover{background-color:#eaeaea}.ce-time-wrap>li>ol>li.active{color:#fff;background:#5175F4}.ce-date-menu{width:100%;height:28px;display:flex;justify-content:flex-end;align-items:center;padding-top:10px;position:relative;border-top:1px solid #e4e7ed}.ce-date-menu button{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;appearance:none;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;user-select:none;padding:7px 15px;font-size:12px;border-radius:3px;margin:0 0 0 10px}.ce-date-menu button:hover{color:#5175f4;border-color:#5175f4}.ce-date-menu button.ce-date-menu__time{border:1px solid transparent;position:absolute;left:0;margin-left:0}.ce-date-menu button.ce-date-menu__time:hover{color:#5175f4}.ce-block-item{position:absolute;z-index:0;background-color:#fff;border:1px solid rgb(235 236 240)}.ce-block-item .ce-resizer-selection{width:100%;height:100%}.ce-block-item .ce-resizer-mask{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;background-color:transparent}.ce-table-tool__row{position:absolute;width:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed}.ce-table-tool__row .ce-table-tool__row__item{width:100%;position:relative;cursor:pointer;transition:all .3s}.ce-table-tool__row .ce-table-tool__row__item:after{content:"";position:absolute;bottom:0;left:2px;width:8px;height:1px;background-color:#c0c6cf}.ce-table-tool__row .ce-table-tool__row__item:hover{background-color:#dadce0}.ce-table-tool__row .ce-table-tool__row__item:last-child:after{display:none}.ce-table-tool__quick__add{width:16px;height:16px;position:absolute;border-radius:50%;background-color:#e2e6ed;cursor:pointer}.ce-table-tool__quick__add:after{content:"+";color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-55%)}.ce-table-tool__select{width:16px;height:18px;position:absolute;border-radius:3px;cursor:pointer}.ce-table-tool__select:hover{background-color:#e2e6ed}.ce-table-tool__select:after{content:":::";color:#aaaaab;position:absolute;top:50%;left:50%;transform:translate(-75%,-50%) rotate(-90deg)}.ce-table-tool__col{position:absolute;height:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed;display:flex}.ce-table-tool__col .ce-table-tool__col__item{height:100%;position:relative;cursor:pointer;transition:all .3s}.ce-table-tool__col .ce-table-tool__col__item:after{content:"";position:absolute;top:2px;left:-1px;width:1px;height:8px;z-index:1;background-color:#c0c6cf}.ce-table-tool__col .ce-table-tool__col__item:hover{background-color:#dadce0}.ce-table-tool__col .ce-table-tool__col__item:first-child:after{display:none}.ce-table-tool__row .ce-table-tool__row__item.active,.ce-table-tool__col .ce-table-tool__col__item.active{background-color:#c4d7fa}.ce-table-tool__col .ce-table-tool__anchor{right:-5px;width:10px;height:12px;z-index:9;position:absolute;cursor:col-resize}.ce-table-tool__row .ce-table-tool__anchor{bottom:-5px;left:0;width:12px;height:10px;z-index:9;position:absolute;cursor:row-resize}.ce-table-anchor__line{z-index:9;position:absolute;border:1px dotted #000000}.ce-table-tool__border{position:absolute;z-index:1;background:transparent;pointer-events:none}.ce-table-tool__border__row{position:absolute;cursor:row-resize;pointer-events:auto}.ce-table-tool__border__col{position:absolute;cursor:col-resize;pointer-events:auto}.ce-resizer-selection{position:absolute;border:1px solid;pointer-events:none}.ce-resizer-selection .resizer-handle{position:absolute;z-index:9;width:10px;height:10px;box-shadow:0 1px 4px #0000004d;border-radius:5px;border:2px solid #ffffff;box-sizing:border-box;pointer-events:initial}.ce-resizer-selection .handle-0{cursor:nw-resize}.ce-resizer-selection .handle-1{cursor:n-resize}.ce-resizer-selection .handle-2{cursor:ne-resize}.ce-resizer-selection .handle-3{cursor:e-resize}.ce-resizer-selection .handle-4{cursor:se-resize}.ce-resizer-selection .handle-5{cursor:s-resize}.ce-resizer-selection .handle-6{cursor:sw-resize}.ce-resizer-selection .handle-7{cursor:w-resize}.ce-resizer-size-view{display:flex;align-items:center;height:20px;white-space:nowrap;position:absolute;z-index:9;top:-30px;left:0;opacity:.9;background-color:#000;padding:0 5px;border-radius:4px}.ce-resizer-size-view span{color:#fff;font-size:12px}.ce-resizer-image{position:absolute;opacity:.5}.ce-image-previewer{position:fixed;left:0;top:0;z-index:1000;width:100%;height:100%;overflow:hidden;background:#f2f4f7;display:flex;align-items:center;justify-content:center;animation:previewerAnimation .3s}@keyframes previewerAnimation{0%{opacity:.1}to{opacity:1}}.ce-image-previewer .image-close{width:24px;height:24px;display:inline-block;position:absolute;right:50px;top:30px;z-index:99;cursor:pointer;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIzLjk3IDdsMS40MTUgMS40MTQtNy43NzkgNy43NzggNy43NzkgNy43NzktMS40MTQgMS40MTQtNy43NzktNy43NzktNy43NzggNy43NzlMNyAyMy45N2w3Ljc3OC03Ljc3OUw3IDguNDE0IDguNDE0IDdsNy43NzggNy43NzhMMjMuOTcxIDd6IiBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=) no-repeat;background-size:100% 100%;transition:all .3s;border-radius:50%}.ce-image-previewer .image-close:hover{background-color:#e2e6ed}.ce-image-previewer .ce-image-container{position:relative}.ce-image-previewer .ce-image-container img{cursor:move;position:relative}.ce-image-previewer .ce-image-menu{height:50px;position:absolute;bottom:50px;z-index:99;display:flex;align-items:center;justify-content:center}.ce-image-previewer .ce-image-menu i{width:32px;height:32px;margin:0 8px;cursor:pointer;display:inline-block;background-repeat:no-repeat;background-size:100% 100%;transition:all .3s;border-radius:50%}.ce-image-previewer .ce-image-menu i:hover{background-color:#e2e6ed}.ce-image-previewer .ce-image-menu i.zoom-in{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE0IDE0di00aDJ2NGg0djJoLTR2NGgtMnYtNGgtNHYtMmg0em04Ljc0OSAxMC4xNjNBMTEuOTUyIDExLjk1MiAwIDAxMTUgMjdDOC4zNzMgMjcgMyAyMS42MjcgMyAxNVM4LjM3MyAzIDE1IDNzMTIgNS4zNzMgMTIgMTJjMCAyLjk1NC0xLjA2NyA1LjY1OC0yLjgzNyA3Ljc0OWw0LjkwOCA0LjkwOC0xLjQxNCAxLjQxNC00LjkwOC00LjkwOHpNMTUgMjVjNS41MjMgMCAxMC00LjQ3NyAxMC0xMFMyMC41MjMgNSAxNSA1IDUgOS40NzcgNSAxNXM0LjQ3NyAxMCAxMCAxMHoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.zoom-out{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIyLjc0OSAyNC4xNjNBMTEuOTUyIDExLjk1MiAwIDAxMTUgMjdDOC4zNzMgMjcgMyAyMS42MjcgMyAxNVM4LjM3MyAzIDE1IDNzMTIgNS4zNzMgMTIgMTJjMCAyLjk1NC0xLjA2NyA1LjY1OC0yLjgzNyA3Ljc0OWw0LjkwOCA0LjkwOC0xLjQxNCAxLjQxNC00LjkwOC00LjkwOHpNMTUgMjVjNS41MjMgMCAxMC00LjQ3NyAxMC0xMFMyMC41MjMgNSAxNSA1IDUgOS40NzcgNSAxNXM0LjQ3NyAxMCAxMCAxMHptLTUtMTFoMTB2MkgxMHYtMnoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.rotate{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTYgNGM2LjYyNyAwIDEyIDUuMzczIDEyIDEyYTExLjk3IDExLjk3IDAgMDEtNCA4Ljk0NFYyM2gtLjg2QTkuOTY4IDkuOTY4IDAgMDAyNiAxNmMwLTUuNTIzLTQuNDc3LTEwLTEwLTEwUzYgMTAuNDc3IDYgMTZjMCA1LjE4NSAzLjk0NyA5LjQ0OSA5IDkuOTV2Mi4wMDlDOC44NCAyNy40NTEgNCAyMi4yOTEgNCAxNiA0IDkuMzczIDkuMzczIDQgMTYgNHoiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik0xOS44NzkgMjcuMzI4bDEuNzY3LTYuNzE3IDQuOTUgNC45NXoiLz48L2c+PC9zdmc+)}.ce-image-previewer .ce-image-menu i.original-size{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQgNGgyNHYyNEg0VjR6bTIgMnYyMGgyMFY2SDZ6bTQgNWgydjEwaC0yVjExem01IDJoMnYyaC0ydi0yem0wIDRoMnYyaC0ydi0yem01LTZoMnYxMGgtMlYxMXoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.image-download{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQuNSAxNXYzLjVoMTVWMTVIMjF2NUgzdi01aDEuNXptOC4yMzItMTEuMjI2djkuMTk2bDQuMDUtNC4wNSAxLjA2IDEuMDYtNS44MzQgNS44MzQtNS44MzMtNS44MzMgMS4wNi0xLjA2IDMuOTk4IDMuOTk2VjMuNzc0aDEuNXoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu .image-navigate{display:flex;align-items:center;justify-content:center}.ce-image-previewer .ce-image-menu i.image-pre{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyLjUgNC4wNjNMNi44NzUgMTBsNS42MjUgNS45MzgiIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==)}.ce-image-previewer .ce-image-menu i.image-next{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuNSA0LjA2M0wxMy4xMjUgMTAgNy41IDE1LjkzOCIgc3Ryb2tlPSIjM0Q0NzU3IiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+)}.ce-image-previewer .ce-image-menu .image-count{color:#000;font-size:20px}.ce-image-previewer .ce-image-menu i.disabled{cursor:not-allowed;opacity:.5}.ce-contextmenu-container{z-index:9;position:fixed;display:none;padding:4px;overflow-x:hidden;overflow-y:auto;background:#fff;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px}.ce-contextmenu-content{display:flex;flex-direction:column}.ce-contextmenu-content .ce-contextmenu-sub-item:after{position:absolute;content:"";width:16px;height:16px;right:12px;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMCAwaDE2djE2SDB6Ii8+PGcgZmlsbD0iIzc2N0M4NSI+PHBhdGggZD0iTTcgMTIuMjQzbC0uNzA3LS43MDcgNC4yNDMtNC4yNDMuNzA3LjcwN3oiLz48cGF0aCBkPSJNNi4yOTMgNC40NjRMNyAzLjc1NyAxMS4yNDMgOGwtLjcwNy43MDd6Ii8+PC9nPjwvZz48L3N2Zz4=)}.ce-contextmenu-content .ce-contextmenu-item{min-width:140px;padding:0 32px 0 16px;height:30px;display:flex;align-items:center;white-space:nowrap;box-sizing:border-box;cursor:pointer}.ce-contextmenu-content .ce-contextmenu-item.hover{background:rgba(25,55,88,.04)}.ce-contextmenu-content .ce-contextmenu-item span{max-width:300px;font-size:12px;color:#3d4757;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ce-contextmenu-content .ce-contextmenu-item span.ce-shortcut{color:#767c85;height:30px;flex:1;text-align:right;line-height:30px;margin-left:20px}.ce-contextmenu-content .ce-contextmenu-item i{width:16px;height:16px;vertical-align:middle;display:inline-block;background-repeat:no-repeat;background-size:100% 100%;flex-shrink:0;margin-right:8px}.ce-contextmenu-divider{background-color:#e2e6ed;margin:4px 16px;height:1px}.ce-contextmenu-print{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0xMiA0aC0xVjJINXYySDRWMmExIDEgMCAwMTEtMWg2YTEgMSAwIDAxMSAxdjJ6bTAgNXY0YTEg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i41LTMuNC0zIDMuMXoiLz48L2c+PC9nPjwvc3ZnPg==)}.ce-contextmenu-image-change{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyIDQpIiBmaWxsPSIjM0Q0NzU3Ij48Y2lyY2xlIGZpbGwtcnVsZT0ibm9uemVybyIgY3g9IjMiIGN5PSIxIiByPSIxIi8+PHBhdGggZD0iTTcuNDczIDguMjIzTDMuNDcgNC4xMDcgMCA3LjY2N3YtMS41QzEuNzE1IDQuNiAyLjcwNyAzLjY2NCAyLjk3NSAzLjM1OGMuNDAyLS40NTcuNjUxLS4zOSAxLjA0MiAwTDcuNDczIDcgOS45NiA0LjM0OWMuNDE0LS40NjIuNjItLjQ2MiAxLjAxMS0uMDcxTDEzIDcuMDZ2MS41bC0yLjUxLTMuNDEtMy4wMTcgMy4wNzJ6Ii8+PC9nPjxwYXRoIGQ9Ik02IDEuNUgxLjV2MTJoMTN2LTRWMTNhLjUuNSAwIDAxLS41LjVIMmEuNS41IDAgMDEtLjUtLjVWMmEuNS41IDAgMDEuNS0uNWg0em04LjUgOFY2bC0uNS41aDFsLS41LS41djMuNXpNNiAxLjVoNEw5LjUgMXYxbC41LS41SDZ6IiBzdHJva2U9IiMzRDQ3NTciLz48cGF0aCBkPSJNMTMuMDg1IDEuMzE2bC0zLjgxNCA0YTEgMSAwIDAwMS40NTggMS4zNjhsMy44MTUtNGExIDEgMCAxMC0xLjQ1OS0xLjM2OHoiIGZpbGw9IiMzRDQ3NTciIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-insert-row-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik04LjUgNS41aDZ2NGgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNCA3djFoMlY3em0tMyAuNUw0IDV2NXpNMSAxaDEydjFIMXptMCAxMmgxMnYxSDF6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-top-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNOCA1SDd2M2gxem0tLjUtM0wxMCA1SDV6Ii8+PHJlY3Qgc3Ryb2tlPSIjM0Q0NzU3IiB4PSIxLjUiIHk9IjEwLjUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIzIiByeD0iMSIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-insert-bottom-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNyAxMWgxVjhIN3ptLjUgM0w1IDExaDV6Ii8+PHJlY3Qgc3Ryb2tlPSIjM0Q0NzU3IiB4PSIxLjUiIHk9IjIuNSIgd2lkdGg9IjEyIiBoZWlnaHQ9IjMiIHJ4PSIxIi8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-left-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhl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dGggZmlsbD0iIzNENDc1NyIgZD0iTTIgOS4zNjNMNi4zNTUgNSA3IDUuNzA3IDIuNjk1IDEweiIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik04LjUgNS41aDZ2NGgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMSAxM2gxMnYxSDF6TTEgMWgxMnYxSDF6bTAgNGgxdjFIMXptMSAxaDF2MUgyem0xIDFoMXYxSDN6bTEtMWgxdjFINHptMS0xaDF2MUg1ek00IDhoMXYxSDR6TTIgOGgxdjFIMnptMyAxaDF2MUg1ek0xIDloMXYxSDF6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-delete-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik01LjUgNy41di02aDR2NnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMTMgMTVWM2gxdjEyek0xIDE1VjNoMXYxMnptNCAwdi0xaDF2MXptMS0xdi0xaDF2MXptMS0xdi0xaDF2MXptLTEtMXYtMWgxdjF6bS0xLTF2LTFoMXYxem0zIDF2LTFoMXYxem0wIDJ2LTFoMXYxem0xLTN2LTFoMXYxem0wIDR2LTFoMXYxeiIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-table{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQgMTNoLTF2LTNIMnYzSDF2LTNhMSAxIDAgMDExLTFoMTFhMSAxIDAgMDExIDF2M3oiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik01LjYyNSAyTDEwIDYuMzc1IDkuMzc1IDcgNSAyLjYyNXoiLz48cGF0aCBkPSJNNSA2LjM3NUw5LjM3NSAybC42MjUuNjI1TDUuNjI1IDd6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-merge-cell{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNiAxdjFIMnYxMWg0djFIMmExIDEgMCAwMS0xLTFWMmExIDEgMCAwMTEtMWg0em0zIDBoNGExIDEgMCAwMTEgMXYxMWExIDEgMCAwMS0xIDFIOXYtMWg0VjJIOVYxeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTYgMWgxdjRINnptMiAwaDF2NEg4eiIvPjxwYXRoIGQ9Ik04IDcuNUwxMCA2djN6bS0xIDBMNSA2djN6Ii8+PHBhdGggZD0iTTkgN2gzdjFIOXpNMyA3aDN2MUgzeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTggMTBoMXY0SDh6bS0yIDBoMXY0SDZ6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-merge-cancel-cell{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNiAxdjFIMnYxMWg0djFIMmExIDEgMCAwMS0xLTFWMmExIDEgMCAwMTEtMWg0em0zIDBoNGExIDEgMCAwMTEgMXYxMWExIDEgMCAwMS0xIDFIOXYtMWg0VjJIOVYxeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTYgMWgxdjRINnptMiAwaDF2NEg4eiIvPjxwYXRoIGQ9Ik0zIDcuNUw1IDZ2M3ptOSAwTDEwIDZ2M3oiLz48cGF0aCBkPSJNNCA3aDN2MUg0em00IDBoM3YxSDh6Ii8+PHBhdGggZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOCAxMGgxdjRIOHptLTIgMGgxdjRINnoiLz48L2c+PC9zdmc+)}.ce-contextmenu-vertical-align{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIHdpZHRoPSIxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMiAxM2gxMnYxSDJ6bTAtM2g4djFIMnptMC0zaDEydjFIMnptMC02aDEydjFIMnptMCAzaDh2MUgyeiIgZmlsbD0iIzNkNDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ce-contextmenu-vertical-align-top{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggOEg3djZoMXptLS41LTNMMTAgOEg1ek0yIDNoMTF2MUgyeiIgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ce-contextmenu-vertical-align-middle{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOCAxMkg3djNoMXptLS41LTNsMi41IDNINXpNNyAzaDFWMEg3em0uNSAzTDUgM2g1ek0yIDdoMTF2MUgyeiIgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ce-contextmenu-vertical-align-bottom{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgOWgxVjNIN3ptLjUgM0w1IDloNXpNMiAxM2gxMXYxSDJ6IiBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ce-contextmenu-border-all{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iIzNENDc1NyIvPjxwYXRoIGZpbGw9IiMzRDQ3NTciIGQ9Ik0zIDhoMTF2MUgzeiIvPjxwYXRoIGZpbGw9IiMzRDQ3NTciIGQ9Ik05IDN2MTFIOFYzeiIvPjwvc3ZnPg==)}.ce-contextmenu-border-empty{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2R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(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iIzNENDc1NyIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOSA1VjNIOHYyaDF6bTAgOXYtMkg4djJoMXpNNSA4SDN2MWgyVjh6bTkgMGgtMnYxaDJWOHpNOSA3djFoMXYxSDl2MUg4VjlIN1Y4aDFWN2gxeiIgZmlsbD0iI0FBQUNCMCIvPjwvc3ZnPg==)}.ce-contextmenu-border-internal{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOSA1VjNIOHYyaDF6bTAgOXYtMkg4djJoMXpNNSA4SDN2MWgyVjh6bTkgMGgtMnYxaDJWOHpNOSA3djFoMXYxSDl2MUg4VjlIN1Y4aDFWN2gxeiIgZmlsbD0iIzNENDc1NyIvPjwvc3ZnPg==)}.ce-contextmenu-border-td{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgZD0iTTguNSAyLjUgdjYgaC02Ii8+PC9zdmc+)}.ce-contextmenu-border-td-top{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMi41IDMgaDEyIi8+PC9zdmc+)}.ce-contextmenu-border-td-left{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMyAzIHYxMSIvPjwvc3ZnPg==)}.ce-contextmenu-border-td-bottom{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMi41IDE0IGgxMiIvPjwvc3ZnPg==)}.ce-contextmenu-border-td-right{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMTQgMyB2MTEiLz48L3N2Zz4=)}.ce-contextmenu-border-td-forward{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIgLz48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik0xNCAzIGwtMTEgMTEiIC8+PC9zdmc+)}.ce-contextmenu-border-td-back{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIgLz48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik0zIDMgbDExIDExIiAvPjwvc3ZnPg==)}.ce-hyperlink-popup{background:#fff;box-shadow:0 2px 12px #626b8433;border-radius:2px;color:#3d4757;padding:12px 16px;position:absolute;z-index:1;text-align:center;display:none}.ce-hyperlink-popup a{min-width:100px;max-width:300px;font-size:12px;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;text-decoration:none;border-bottom-width:1px;border-bottom-style:solid;color:#00f}.ce-zone-indicator>div{padding:3px 6px;color:#000;font-size:12px;background:rgb(218 231 252);position:absolute;transform-origin:0 0}.ce-zone-indicator-border__top,.ce-zone-indicator-border__bottom,.ce-zone-indicator-border__left,.ce-zone-indicator-border__right{display:block;position:absolute;z-index:0}.ce-zone-indicator-border__top{border-top:2px dashed rgb(238,238,238)}.ce-zone-indicator-border__bottom{border-top:2px dashed rgb(238,238,238);width:100%}.ce-zone-indicator-border__left{border-left:2px dashed rgb(238,238,238)}.ce-zone-indicator-border__right{border-right:2px dashed rgb(238,238,238)}.ce-zone-tip{display:none;align-items:center;height:30px;white-space:nowrap;position:fixed;opacity:.9;background-color:#000;padding:0 5px;border-radius:4px;z-index:9;transition:all .3s;outline:none;user-select:none;pointer-events:none;transform:translate(10px,10px)}.ce-zone-tip.show{display:flex}.ce-zone-tip span{color:#fff;font-size:12px}.ce-inputarea{width:100px;height:30px;min-width:0;min-height:0;margin:0;padding:0;left:0;top:0;letter-spacing:0;font-size:12px;position:absolute;z-index:-1;outline:none;resize:none;border:none;overflow:hidden;color:transparent;user-select:none;caret-color:transparent;background-color:transparent}.ce-cursor{width:1px;height:20px;left:0;right:0;position:absolute;outline:none;background-color:#000;pointer-events:none}.ce-cursor.ce-cursor--animation{animation-duration:1s;animation-iteration-count:infinite;animation-name:cursorAnimation}@keyframes cursorAnimation{0%{opacity:1}13%{opacity:0}50%{opacity:0}63%{opacity:1}to{opacity:1}}.ce-float-image{position:absolute;opacity:.5;pointer-events:none}.dialog-mask{position:fixed;left:0;top:0;width:100%;height:100%;opacity:.5;background:#000000;z-index:99}.dialog-container{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;z-index:999;margin:0;display:flex;justify-content:center;align-items:center}.dialog{position:absolute;padding:0 30px 30px;background:#ffffff;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px}.dialog-title{position:relative;border-bottom:1px solid #e2e6ed;margin-bottom:30px;height:60px;display:flex;align-items:center;justify-content:space-between}.dialog-title i{width:16px;height:16px;cursor:pointer;display:inline-block;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOC45IDguMTkybDQuMjQyIDQuMjQzLS43MDcuNzA3TDguMTkyIDguOSAzLjk1IDEzLjE0MmwtLjcwNy0uNzA3IDQuMjQyLTQuMjQzTDMuMjQzIDMuOTVsLjcwNy0uNzA3IDQuMjQyIDQuMjQyIDQuMjQzLTQuMjQyLjcwNy43MDdMOC45IDguMTkyeiIgZmlsbD0iIzZBNkE2QSIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.dialog-option__item{margin-bottom:18px;display:flex;align-items:center;justify-content:space-between}.dialog-option__item span{margin-right:12px;font-size:14px;color:#3d4757;position:relative}.dialog-option__item input,.dialog-option__item textarea,.dialog-option__item select{width:276px;height:30px;border-radius:2px;border:1px solid #d3d3d3;min-height:30px;padding:5px;box-sizing:border-box;outline:none;appearance:none;user-select:none;font-family:inherit}.dialog-option__item input:focus,.dialog-option__item textarea:focus{border-color:#4991f2}.dialog-option__item--require:before{content:"*";color:#f56c6c;margin-right:4px;position:absolute;left:-8px}.dialog-menu{display:flex;align-items:center;justify-content:flex-end}.dialog-menu button{position:relative;display:inline-block;border:1px solid #e2e6ed;border-radius:2px;background:#ffffff;line-height:22px;padding:0 16px;white-space:nowrap;cursor:pointer}.dialog-menu button:hover{background:rgba(25,55,88,.04)}.dialog-menu__cancel{margin-right:16px}.dialog-menu button[type=submit]{color:#fff;background:#4991f2;border-color:#4991f2}.dialog-menu button[type=submit]:hover{background:#5b9cf3;border-color:#5b9cf3}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
1
+ (function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.id="canvas-editor-style",e.appendChild(document.createTextNode('.ce-select-control-popup{max-width:160px;min-width:69px;max-height:225px;position:absolute;z-index:1;border:1px solid #e4e7ed;border-radius:4px;background-color:#fff;box-shadow:0 2px 12px #0000001a;box-sizing:border-box;margin:5px 0;overflow-y:auto}.ce-select-control-popup ul{list-style:none;padding:3px 0;margin:0;box-sizing:border-box}.ce-select-control-popup ul li{font-size:13px;padding:0 20px;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#666;height:36px;line-height:36px;box-sizing:border-box;cursor:pointer}.ce-select-control-popup ul li:hover{background-color:#eef2fd}.ce-select-control-popup ul li.active{color:var(--COLOR-HOVER, #5175f4);font-weight:700}.ce-calculator{position:absolute;z-index:1;border:1px solid #e4e7ed;border-radius:4px;background-color:#fff;box-shadow:0 2px 12px #0000001a;box-sizing:border-box;margin:5px 0;padding:8px;width:200px}.ce-calculator-display{width:100%;height:40px;line-height:40px;text-align:right;padding:0 10px;margin-bottom:8px;border:1px solid #e4e7ed;border-radius:4px;background-color:#f5f7fa;font-size:16px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis}.ce-calculator-buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.ce-calculator-button{width:100%;height:36px;border:1px solid #e4e7ed;border-radius:4px;background-color:#fff;font-size:14px;cursor:pointer;transition:all .2s;box-sizing:border-box}.ce-calculator-button:hover{background-color:#eef2fd;border-color:#c6d1ff}.ce-calculator-button:active{background-color:#e1e8ff}.ce-calculator-button.operator{background-color:#f5f7fa}.ce-calculator-button.operator:hover{background-color:#eef2fd}.ce-calculator-button.equal{background-color:var(--COLOR-HOVER, #5175f4);color:#fff;border-color:var(--COLOR-HOVER, #5175f4)}.ce-calculator-button.equal:hover{background-color:var(--COLOR-HOVER, #6a84ff);border-color:var(--COLOR-HOVER, #6a84ff)}.ce-calculator-button.utility{background-color:#f0f2f5}.ce-calculator-button.utility:hover{background-color:#e6e8eb}.ce-date-container{display:none;width:300px;overflow:hidden;left:0;right:0;position:absolute;z-index:1;color:#606266;background:#ffffff;border-radius:4px;padding:10px;user-select:none;border:1px solid #e4e7ed;box-shadow:0 2px 12px #0000001a}.ce-date-container.active{display:block}.ce-date-wrap{display:none}.ce-date-wrap.active{display:block}.ce-date-title{display:flex;justify-content:center;align-items:center;text-align:center;color:#606266;font-size:16px}.ce-date-title>span{display:inline-block}.ce-date-title>span:not(.ce-date-title__now){font-family:cursive;cursor:pointer}.ce-date-title>span:not(.ce-date-title__now):hover{color:#5175f4}.ce-date-title .ce-date-title__pre-year,.ce-date-title .ce-date-title__pre-month{width:15%}.ce-date-title .ce-date-title__now{width:40%}.ce-date-title .ce-date-title__next-year,.ce-date-title .ce-date-title__next-month{width:15%}.ce-date-week{width:100%;display:flex;justify-content:center;margin-top:15px;padding-bottom:5px;border-bottom:1px solid #e4e7ed}.ce-date-week>span{list-style:none;width:calc(100%/7);text-align:center;color:#606266;font-size:14px}.ce-date-day{width:100%;display:flex;flex-wrap:wrap;align-items:center;margin-top:5px}.ce-date-day>div{width:calc(100%/7);height:40px;text-align:center;color:#606266;font-size:14px;cursor:pointer;line-height:40px;border-radius:4px}.ce-date-day>div:hover{color:#5175f4;opacity:.8}.ce-date-day>div.active{color:#5175f4;font-weight:700}.ce-date-day>div.disable{color:#c0c4cc}.ce-date-day>div.select{color:#fff;background-color:#5175f4}.ce-time-wrap{display:none;padding:10px;height:286px}.ce-time-wrap ::-webkit-scrollbar{width:0}.ce-time-wrap.active{display:flex}.ce-time-wrap li{list-style:none}.ce-time-wrap>li{width:33.3%;height:100%;text-align:center}.ce-time-wrap>li>span{transform:translateY(-5px);display:inline-block}.ce-time-wrap>li>ol{height:calc(100% - 20px);overflow-y:auto;border:1px solid #e2e2e2;position:relative}.ce-time-wrap>li:first-child>ol{border-right:0}.ce-time-wrap>li:last-child>ol{border-left:0}.ce-time-wrap>li>ol>li{line-height:30px;cursor:pointer;transition:all .3s}.ce-time-wrap>li>ol>li:hover{background-color:#eaeaea}.ce-time-wrap>li>ol>li.active{color:#fff;background:#5175F4}.ce-date-menu{width:100%;height:28px;display:flex;justify-content:flex-end;align-items:center;padding-top:10px;position:relative;border-top:1px solid #e4e7ed}.ce-date-menu button{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;appearance:none;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;user-select:none;padding:7px 15px;font-size:12px;border-radius:3px;margin:0 0 0 10px}.ce-date-menu button:hover{color:#5175f4;border-color:#5175f4}.ce-date-menu button.ce-date-menu__time{border:1px solid transparent;position:absolute;left:0;margin-left:0}.ce-date-menu button.ce-date-menu__time:hover{color:#5175f4}.ce-block-item{position:absolute;z-index:0;background-color:#fff;border:1px solid rgb(235 236 240)}.ce-block-item .ce-resizer-selection{width:100%;height:100%}.ce-block-item .ce-resizer-mask{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;background-color:transparent}.ce-table-tool__row{position:absolute;width:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed}.ce-table-tool__row .ce-table-tool__row__item{width:100%;position:relative;cursor:pointer;transition:all .3s}.ce-table-tool__row .ce-table-tool__row__item:after{content:"";position:absolute;bottom:0;left:2px;width:8px;height:1px;background-color:#c0c6cf}.ce-table-tool__row .ce-table-tool__row__item:hover{background-color:#dadce0}.ce-table-tool__row .ce-table-tool__row__item:last-child:after{display:none}.ce-table-tool__quick__add{width:16px;height:16px;position:absolute;border-radius:50%;background-color:#e2e6ed;cursor:pointer}.ce-table-tool__quick__add:after{content:"+";color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-55%)}.ce-table-tool__select{width:16px;height:18px;position:absolute;border-radius:3px;cursor:pointer}.ce-table-tool__select:hover{background-color:#e2e6ed}.ce-table-tool__select:after{content:":::";color:#aaaaab;position:absolute;top:50%;left:50%;transform:translate(-75%,-50%) rotate(-90deg)}.ce-table-tool__col{position:absolute;height:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed;display:flex}.ce-table-tool__col .ce-table-tool__col__item{height:100%;position:relative;cursor:pointer;transition:all .3s}.ce-table-tool__col .ce-table-tool__col__item:after{content:"";position:absolute;top:2px;left:-1px;width:1px;height:8px;z-index:1;background-color:#c0c6cf}.ce-table-tool__col .ce-table-tool__col__item:hover{background-color:#dadce0}.ce-table-tool__col .ce-table-tool__col__item:first-child:after{display:none}.ce-table-tool__row .ce-table-tool__row__item.active,.ce-table-tool__col .ce-table-tool__col__item.active{background-color:#c4d7fa}.ce-table-tool__col .ce-table-tool__anchor{right:-5px;width:10px;height:12px;z-index:9;position:absolute;cursor:col-resize}.ce-table-tool__row .ce-table-tool__anchor{bottom:-5px;left:0;width:12px;height:10px;z-index:9;position:absolute;cursor:row-resize}.ce-table-anchor__line{z-index:9;position:absolute;border:1px dotted #000000}.ce-table-tool__border{position:absolute;z-index:1;background:transparent;pointer-events:none}.ce-table-tool__border__row{position:absolute;cursor:row-resize;pointer-events:auto}.ce-table-tool__border__col{position:absolute;cursor:col-resize;pointer-events:auto}.ce-resizer-selection{position:absolute;border:1px solid;pointer-events:none}.ce-resizer-selection .resizer-handle{position:absolute;z-index:9;width:10px;height:10px;box-shadow:0 1px 4px #0000004d;border-radius:5px;border:2px solid #ffffff;box-sizing:border-box;pointer-events:initial}.ce-resizer-selection .handle-0{cursor:nw-resize}.ce-resizer-selection .handle-1{cursor:n-resize}.ce-resizer-selection .handle-2{cursor:ne-resize}.ce-resizer-selection .handle-3{cursor:e-resize}.ce-resizer-selection .handle-4{cursor:se-resize}.ce-resizer-selection .handle-5{cursor:s-resize}.ce-resizer-selection .handle-6{cursor:sw-resize}.ce-resizer-selection .handle-7{cursor:w-resize}.ce-resizer-size-view{display:flex;align-items:center;height:20px;white-space:nowrap;position:absolute;z-index:9;top:-30px;left:0;opacity:.9;background-color:#000;padding:0 5px;border-radius:4px}.ce-resizer-size-view span{color:#fff;font-size:12px}.ce-resizer-image{position:absolute;opacity:.5}.ce-image-previewer{position:fixed;left:0;top:0;z-index:1000;width:100%;height:100%;overflow:hidden;background:#f2f4f7;display:flex;align-items:center;justify-content:center;animation:previewerAnimation .3s}@keyframes previewerAnimation{0%{opacity:.1}to{opacity:1}}.ce-image-previewer .image-close{width:24px;height:24px;display:inline-block;position:absolute;right:50px;top:30px;z-index:99;cursor:pointer;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIzLjk3IDdsMS40MTUgMS40MTQtNy43NzkgNy43NzggNy43NzkgNy43NzktMS40MTQgMS40MTQtNy43NzktNy43NzktNy43NzggNy43NzlMNyAyMy45N2w3Ljc3OC03Ljc3OUw3IDguNDE0IDguNDE0IDdsNy43NzggNy43NzhMMjMuOTcxIDd6IiBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=) no-repeat;background-size:100% 100%;transition:all .3s;border-radius:50%}.ce-image-previewer .image-close:hover{background-color:#e2e6ed}.ce-image-previewer .ce-image-container{position:relative}.ce-image-previewer .ce-image-container img{cursor:move;position:relative}.ce-image-previewer .ce-image-menu{height:50px;position:absolute;bottom:50px;z-index:99;display:flex;align-items:center;justify-content:center}.ce-image-previewer .ce-image-menu i{width:32px;height:32px;margin:0 8px;cursor:pointer;display:inline-block;background-repeat:no-repeat;background-size:100% 100%;transition:all .3s;border-radius:50%}.ce-image-previewer .ce-image-menu i:hover{background-color:#e2e6ed}.ce-image-previewer .ce-image-menu i.zoom-in{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE0IDE0di00aDJ2NGg0djJoLTR2NGgtMnYtNGgtNHYtMmg0em04Ljc0OSAxMC4xNjNBMTEuOTUyIDExLjk1MiAwIDAxMTUgMjdDOC4zNzMgMjcgMyAyMS42MjcgMyAxNVM4LjM3MyAzIDE1IDNzMTIgNS4zNzMgMTIgMTJjMCAyLjk1NC0xLjA2NyA1LjY1OC0yLjgzNyA3Ljc0OWw0LjkwOCA0LjkwOC0xLjQxNCAxLjQxNC00LjkwOC00LjkwOHpNMTUgMjVjNS41MjMgMCAxMC00LjQ3NyAxMC0xMFMyMC41MjMgNSAxNSA1IDUgOS40NzcgNSAxNXM0LjQ3NyAxMCAxMCAxMHoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.zoom-out{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIyLjc0OSAyNC4xNjNBMTEuOTUyIDExLjk1MiAwIDAxMTUgMjdDOC4zNzMgMjcgMyAyMS42MjcgMyAxNVM4LjM3MyAzIDE1IDNzMTIgNS4zNzMgMTIgMTJjMCAyLjk1NC0xLjA2NyA1LjY1OC0yLjgzNyA3Ljc0OWw0LjkwOCA0LjkwOC0xLjQxNCAxLjQxNC00LjkwOC00LjkwOHpNMTUgMjVjNS41MjMgMCAxMC00LjQ3NyAxMC0xMFMyMC41MjMgNSAxNSA1IDUgOS40NzcgNSAxNXM0LjQ3NyAxMCAxMCAxMHptLTUtMTFoMTB2MkgxMHYtMnoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.rotate{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTYgNGM2LjYyNyAwIDEyIDUuMzczIDEyIDEyYTExLjk3IDExLjk3IDAgMDEtNCA4Ljk0NFYyM2gtLjg2QTkuOTY4IDkuOTY4IDAgMDAyNiAxNmMwLTUuNTIzLTQuNDc3LTEwLTEwLTEwUzYgMTAuNDc3IDYgMTZjMCA1LjE4NSAzLjk0NyA5LjQ0OSA5IDkuOTV2Mi4wMDlDOC44NCAyNy40NTEgNCAyMi4yOTEgNCAxNiA0IDkuMzczIDkuMzczIDQgMTYgNHoiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik0xOS44NzkgMjcuMzI4bDEuNzY3LTYuNzE3IDQuOTUgNC45NXoiLz48L2c+PC9zdmc+)}.ce-image-previewer .ce-image-menu i.original-size{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQgNGgyNHYyNEg0VjR6bTIgMnYyMGgyMFY2SDZ6bTQgNWgydjEwaC0yVjExem01IDJoMnYyaC0ydi0yem0wIDRoMnYyaC0ydi0yem01LTZoMnYxMGgtMlYxMXoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.image-download{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQuNSAxNXYzLjVoMTVWMTVIMjF2NUgzdi01aDEuNXptOC4yMzItMTEuMjI2djkuMTk2bDQuMDUtNC4wNSAxLjA2IDEuMDYtNS44MzQgNS44MzQtNS44MzMtNS44MzMgMS4wNi0xLjA2IDMuOTk4IDMuOTk2VjMuNzc0aDEuNXoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu .image-navigate{display:flex;align-items:center;justify-content:center}.ce-image-previewer .ce-image-menu i.image-pre{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyLjUgNC4wNjNMNi44NzUgMTBsNS42MjUgNS45MzgiIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==)}.ce-image-previewer .ce-image-menu i.image-next{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuNSA0LjA2M0wxMy4xMjUgMTAgNy41IDE1LjkzOCIgc3Ryb2tlPSIjM0Q0NzU3IiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+)}.ce-image-previewer .ce-image-menu .image-count{color:#000;font-size:20px}.ce-image-previewer .ce-image-menu i.disabled{cursor:not-allowed;opacity:.5}.ce-contextmenu-container{z-index:9;position:fixed;display:none;padding:4px;overflow-x:hidden;overflow-y:auto;background:#fff;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px}.ce-contextmenu-content{display:flex;flex-direction:column}.ce-contextmenu-content .ce-contextmenu-sub-item:after{position:absolute;content:"";width:16px;height:16px;right:12px;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMCAwaDE2djE2SDB6Ii8+PGcgZmlsbD0iIzc2N0M4NSI+PHBhdGggZD0iTTcgMTIuMjQzbC0uNzA3LS43MDcgNC4yNDMtNC4yNDMuNzA3LjcwN3oiLz48cGF0aCBkPSJNNi4yOTMgNC40NjRMNyAzLjc1NyAxMS4yNDMgOGwtLjcwNy43MDd6Ii8+PC9nPjwvZz48L3N2Zz4=)}.ce-contextmenu-content .ce-contextmenu-item{min-width:140px;padding:0 32px 0 16px;height:30px;display:flex;align-items:center;white-space:nowrap;box-sizing:border-box;cursor:pointer}.ce-contextmenu-content .ce-contextmenu-item.hover{background:rgba(25,55,88,.04)}.ce-contextmenu-content .ce-contextmenu-item span{max-width:300px;font-size:12px;color:#3d4757;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ce-contextmenu-content .ce-contextmenu-item span.ce-shortcut{color:#767c85;height:30px;flex:1;text-align:right;line-height:30px;margin-left:20px}.ce-contextmenu-content .ce-contextmenu-item i{width:16px;height:16px;vertical-align:middle;display:inline-block;background-repeat:no-repeat;background-size:100% 100%;flex-shrink:0;margin-right:8px}.ce-contextmenu-divider{background-color:#e2e6ed;margin:4px 16px;height:1px}.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xbC41LS41SDZ6IiBzdHJva2U9IiMzRDQ3NTciLz48cGF0aCBkPSJNMTMuMDg1IDEuMzE2bC0zLjgxNCA0YTEgMSAwIDAwMS40NTggMS4zNjhsMy44MTUtNGExIDEgMCAxMC0xLjQ1OS0xLjM2OHoiIGZpbGw9IiMzRDQ3NTciIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-insert-row-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik04LjUgNS41aDZ2NGgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNCA3djFoMlY3em0tMyAuNUw0IDV2NXpNMSAxaDEydjFIMXptMCAxMmgxMnYxSDF6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-top-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNOCA1SDd2M2gxem0tLjUtM0wxMCA1SDV6Ii8+PHJlY3Qgc3Ryb2tlPSIjM0Q0NzU3IiB4PSIxLjUiIHk9IjEwLjUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIzIiByeD0iMSIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-insert-bottom-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNyAxMWgxVjhIN3ptLjUgM0w1IDExaDV6Ii8+PHJlY3Qgc3Ryb2tlPSIjM0Q0NzU3IiB4PSIxLjUiIHk9IjIuNSIgd2lkdGg9IjEyIiBoZWlnaHQ9IjMiIHJ4PSIxIi8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-left-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMTEgN3YxaDNWN3ptLTMgLjVMMTEgNXY1eiIvPjxyZWN0IHN0cm9rZT0iIzNENDc1NyIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgNCA3LjUpIiB4PSItMiIgeT0iNiIgd2lkdGg9IjEyIiBoZWlnaHQ9IjMiIHJ4PSIxIi8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-right-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNSA4VjdIMnYxem0zLS41TDUgMTBWNXoiLz48cmVjdCBzdHJva2U9IiMzRDQ3NTciIHRyYW5zZm9ybT0icm90YXRlKDkwIDEyIDcuNSkiIHg9IjYiIHk9IjYiIHdpZHRoPSIxMiIgaGVpZ2h0PSIzIiByeD0iMSIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-row-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik04LjUgNi41aDZ2MmgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMiAxMmgxMXYxSDJ6TTIgMmgxMXYxSDJ6bS42MyAzTDcgOS4zNWwtLjYzNS42NUwyIDUuNjN6Ii8+PHBhdGggZmlsbD0iIzNENDc1NyIgZD0iTTIgOS4zNjNMNi4zNTUgNSA3IDUuNzA3IDIuNjk1IDEweiIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik04LjUgNS41aDZ2NGgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMSAxM2gxMnYxSDF6TTEgMWgxMnYxSDF6bTAgNGgxdjFIMXptMSAxaDF2MUgyem0xIDFoMXYxSDN6bTEtMWgxdjFINHptMS0xaDF2MUg1ek00IDhoMXYxSDR6TTIgOGgxdjFIMnptMyAxaDF2MUg1ek0xIDloMXYxSDF6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-delete-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik01LjUgNy41di02aDR2NnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMTMgMTVWM2gxdjEyek0xIDE1VjNoMXYxMnptNCAwdi0xaDF2MXptMS0xdi0xaDF2MXptMS0xdi0xaDF2MXptLTEtMXYtMWgxdjF6bS0xLTF2LTFoMXYxem0zIDF2LTFoMXYxem0wIDJ2LTFoMXYxem0xLTN2LTFoMXYxem0wIDR2LTFoMXYxeiIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-table{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQgMTNoLTF2LTNIMnYzSDF2LTNhMSAxIDAgMDExLTFoMTFhMSAxIDAgMDExIDF2M3oiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik01LjYyNSAyTDEwIDYuMzc1IDkuMzc1IDcgNSAyLjYyNXoiLz48cGF0aCBkPSJNNSA2LjM3NUw5LjM3NSAybC42MjUuNjI1TDUuNjI1IDd6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-merge-cell{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNiAxdjFIMnYxMWg0djFIMmExIDEgMCAwMS0xLTFWMmExIDEgMCAwMTEtMWg0em0zIDBoNGExIDEgMCAwMTEgMXYxMWExIDEgMCAwMS0xIDFIOXYtMWg0VjJIOVYxeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTYgMWgxdjRINnptMiAwaDF2NEg4eiIvPjxwYXRoIGQ9Ik04IDcuNUwxMCA2djN6bS0xIDBMNSA2djN6Ii8+PHBhdGggZD0iTTkgN2gzdjFIOXpNMyA3aDN2MUgzeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTggMTBoMXY0SDh6bS0yIDBoMXY0SDZ6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-merge-cancel-cell{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNiAxdjFIMnYxMWg0djFIMmExIDEgMCAwMS0xLTFWMmExIDEgMCAwMTEtMWg0em0zIDBoNGExIDEgMCAwMTEgMXYxMWExIDEgMCAwMS0xIDFIOXYtMWg0VjJIOVYxeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTYgMWgxdjRINnptMiAwaDF2NEg4eiIvPjxwYXRoIGQ9Ik0zIDcuNUw1IDZ2M3ptOSAwTDEwIDZ2M3oiLz48cGF0aCBkPSJNNCA3aDN2MUg0em00IDBoM3YxSDh6Ii8+PHBhdGggZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOCAxMGgxdjRIOHptLTIgMGgxdjRINnoiLz48L2c+PC9zdmc+)}.ce-contextmenu-vertical-align{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIHdpZHRoPSIxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMiAxM2gxMnYxSDJ6bTAtM2g4djFIMnptMC0zaDEydjFIMnptMC02aDEydjFIMnptMCAzaDh2MUgyeiIgZmlsbD0iIzNkNDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ce-contextmenu-vertical-align-top{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggOEg3djZoMXptLS41LTNMMTAgOEg1ek0yIDNoMTF2MUgyeiIgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ce-contextmenu-vertical-align-middle{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOCAxMkg3djNoMXptLS41LTNsMi41IDNINXpNNyAzaDFWMEg3em0uNSAzTDUgM2g1ek0yIDdoMTF2MUgyeiIgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ce-contextmenu-vertical-align-bottom{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgOWgxVjNIN3ptLjUgM0w1IDloNXpNMiAxM2gxMXYxSDJ6IiBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ce-contextmenu-border-all{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iIzNENDc1NyIvPjx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EuNWgydjFIM1YxMEgyVjZ6bTAgNmgxdjFoMXYxSDNhMSAxIDAgMDEtMS0xdi0xem00IDJ2LTFoMS41di0yaDF2MkgxMHYxSDZ6bTYgMHYtMWgxdi0xaDF2MWExIDEgMCAwMS0xIDFoLTF6bTItNGgtMVY4LjVoLTJ2LTFoMlY2aDF2NHpNOC41IDcuNXYtMWgtMXYxaC0xdjFoMXYxaDF2LTFoMXYtMWgtMXoiIGZpbGw9IiMwMDAwMDAiLz48L3N2Zz4=)}.ce-contextmenu-border-external{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iIzNENDc1NyIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOSA1VjNIOHYyaDF6bTAgOXYtMkg4djJoMXpNNSA4SDN2MWgyVjh6bTkgMGgtMnYxaDJWOHpNOSA3djFoMXYxSDl2MUg4VjlIN1Y4aDFWN2gxeiIgZmlsbD0iI0FBQUNCMCIvPjwvc3ZnPg==)}.ce-contextmenu-border-internal{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOSA1VjNIOHYyaDF6bTAgOXYtMkg4djJoMXpNNSA4SDN2MWgyVjh6bTkgMGgtMnYxaDJWOHpNOSA3djFoMXYxSDl2MUg4VjlIN1Y4aDFWN2gxeiIgZmlsbD0iIzNENDc1NyIvPjwvc3ZnPg==)}.ce-contextmenu-border-td{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgZD0iTTguNSAyLjUgdjYgaC02Ii8+PC9zdmc+)}.ce-contextmenu-border-td-top{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMi41IDMgaDEyIi8+PC9zdmc+)}.ce-contextmenu-border-td-left{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMyAzIHYxMSIvPjwvc3ZnPg==)}.ce-contextmenu-border-td-bottom{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMi41IDE0IGgxMiIvPjwvc3ZnPg==)}.ce-contextmenu-border-td-right{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMTQgMyB2MTEiLz48L3N2Zz4=)}.ce-contextmenu-border-td-forward{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIgLz48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik0xNCAzIGwtMTEgMTEiIC8+PC9zdmc+)}.ce-contextmenu-border-td-back{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIgLz48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik0zIDMgbDExIDExIiAvPjwvc3ZnPg==)}.ce-hyperlink-popup{background:#fff;box-shadow:0 2px 12px #626b8433;border-radius:2px;color:#3d4757;padding:12px 16px;position:absolute;z-index:1;text-align:center;display:none}.ce-hyperlink-popup a{min-width:100px;max-width:300px;font-size:12px;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;text-decoration:none;border-bottom-width:1px;border-bottom-style:solid;color:#00f}.ce-zone-indicator>div{padding:3px 6px;color:#000;font-size:12px;background:rgb(218 231 252);position:absolute;transform-origin:0 0}.ce-zone-indicator-border__top,.ce-zone-indicator-border__bottom,.ce-zone-indicator-border__left,.ce-zone-indicator-border__right{display:block;position:absolute;z-index:0}.ce-zone-indicator-border__top{border-top:2px dashed rgb(238,238,238)}.ce-zone-indicator-border__bottom{border-top:2px dashed rgb(238,238,238);width:100%}.ce-zone-indicator-border__left{border-left:2px dashed rgb(238,238,238)}.ce-zone-indicator-border__right{border-right:2px dashed rgb(238,238,238)}.ce-zone-tip{display:none;align-items:center;height:30px;white-space:nowrap;position:fixed;opacity:.9;background-color:#000;padding:0 5px;border-radius:4px;z-index:9;transition:all .3s;outline:none;user-select:none;pointer-events:none;transform:translate(10px,10px)}.ce-zone-tip.show{display:flex}.ce-zone-tip span{color:#fff;font-size:12px}.ce-inputarea{width:100px;height:30px;min-width:0;min-height:0;margin:0;padding:0;left:0;top:0;letter-spacing:0;font-size:12px;position:absolute;z-index:-1;outline:none;resize:none;border:none;overflow:hidden;color:transparent;user-select:none;caret-color:transparent;background-color:transparent}.ce-cursor{width:1px;height:20px;left:0;right:0;position:absolute;outline:none;background-color:#000;pointer-events:none}.ce-cursor.ce-cursor--animation{animation-duration:1s;animation-iteration-count:infinite;animation-name:cursorAnimation}@keyframes cursorAnimation{0%{opacity:1}13%{opacity:0}50%{opacity:0}63%{opacity:1}to{opacity:1}}.ce-float-image{position:absolute;opacity:.5;pointer-events:none}.dialog-mask{position:fixed;left:0;top:0;width:100%;height:100%;opacity:.5;background:#000000;z-index:99}.dialog-container{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;z-index:999;margin:0;display:flex;justify-content:center;align-items:center}.dialog{position:absolute;padding:0 30px 30px;background:#ffffff;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px}.dialog-title{position:relative;border-bottom:1px solid #e2e6ed;margin-bottom:30px;height:60px;display:flex;align-items:center;justify-content:space-between}.dialog-title i{width:16px;height:16px;cursor:pointer;display:inline-block;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOC45IDguMTkybDQuMjQyIDQuMjQzLS43MDcuNzA3TDguMTkyIDguOSAzLjk1IDEzLjE0MmwtLjcwNy0uNzA3IDQuMjQyLTQuMjQzTDMuMjQzIDMuOTVsLjcwNy0uNzA3IDQuMjQyIDQuMjQyIDQuMjQzLTQuMjQyLjcwNy43MDdMOC45IDguMTkyeiIgZmlsbD0iIzZBNkE2QSIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.dialog-option__item{margin-bottom:18px;display:flex;align-items:center;justify-content:space-between}.dialog-option__item span{margin-right:12px;font-size:14px;color:#3d4757;position:relative}.dialog-option__item input,.dialog-option__item select{width:276px;height:28px;border-radius:2px;border:1px solid #d3d3d3;min-height:28px;padding:5px;box-sizing:border-box;outline:none;appearance:none;user-select:none;font-family:inherit}.dialog-option__item textarea{width:276px;height:58px;border-radius:2px;border:1px solid #d3d3d3;min-height:58px;padding:5px;box-sizing:border-box;outline:none;appearance:none;user-select:none;font-family:inherit}.dialog-option__item input:focus,.dialog-option__item textarea:focus{border-color:#4991f2}.dialog-option__item--require:before{content:"*";color:#f56c6c;margin-right:4px;position:absolute;left:-8px}.dialog-menu{display:flex;align-items:center;justify-content:flex-end}.dialog-menu button{position:relative;display:inline-block;border:1px solid #e2e6ed;border-radius:2px;background:#ffffff;line-height:22px;padding:0 16px;white-space:nowrap;cursor:pointer}.dialog-menu button:hover{background:rgba(25,55,88,.04)}.dialog-menu__cancel{margin-right:16px}.dialog-menu button[type=submit]{color:#fff;background:#4991f2;border-color:#4991f2}.dialog-menu button[type=submit]:hover{background:#5b9cf3;border-color:#5b9cf3}.searchable-select{position:relative;width:276px;height:30px;box-sizing:border-box}.searchable-select__input-wrapper{position:relative;display:flex;align-items:center;width:100%;height:100%;border:1px solid #d3d3d3}.searchable-select__input-wrapper .searchable-select__input{border:none}.searchable-select__input-wrapper .searchable-select__arrow{margin-right:0;margin-top:-12px}.searchable-select__input{width:100%;height:30px;border-radius:2px;border:1px solid #d3d3d3;padding:5px 30px 5px 5px;box-sizing:border-box;outline:none;font-family:inherit;font-size:14px;cursor:pointer;background-color:#fff}.searchable-select__input:focus{border-color:#4991f2}.searchable-select__arrow{position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:10px;color:#666;cursor:pointer;user-select:none;line-height:1;z-index:1}.searchable-select__dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;background:#ffffff;border:1px solid #d3d3d3;border-radius:2px;box-shadow:0 2px 8px #00000026;max-height:200px;overflow-y:auto;z-index:1000}.searchable-select__option{padding:8px 12px;cursor:pointer;font-size:14px;color:#3d4757;transition:background-color .2s;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.searchable-select__option:hover{background-color:#f5f7fa}.searchable-select__option--selected{background-color:#ecf5ff;color:#4991f2;font-weight:500}.searchable-select__option--empty{color:#999;cursor:not-allowed;text-align:center;padding:12px}.searchable-select__option--empty:hover{background-color:transparent}.searchable-select__dropdown::-webkit-scrollbar{width:6px}.searchable-select__dropdown::-webkit-scrollbar-thumb{background-color:#c0c4cc;border-radius:3px}.searchable-select__dropdown::-webkit-scrollbar-thumb:hover{background-color:#909399}.searchable-select__dropdown::-webkit-scrollbar-track{background-color:#f5f7fa}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
2
2
  var index = "";
3
- const version = "0.0.1-beta.2";
3
+ const version = "0.0.1-beta.21";
4
4
  var MaxHeightRatio;
5
5
  (function(MaxHeightRatio2) {
6
6
  MaxHeightRatio2["HALF"] = "half";
@@ -507,7 +507,16 @@ const EDITOR_ELEMENT_STYLE_ATTR = [
507
507
  "strikeout",
508
508
  "textDecoration"
509
509
  ];
510
- const EDITOR_ROW_ATTR = ["rowFlex", "rowMargin"];
510
+ const EDITOR_ROW_ATTR = [
511
+ "rowFlex",
512
+ "rowMargin",
513
+ "textIndent",
514
+ "marginLeft",
515
+ "marginRight",
516
+ "marginTop",
517
+ "minHeight",
518
+ "whiteSpace"
519
+ ];
511
520
  const EDITOR_ELEMENT_COPY_ATTR = [
512
521
  "type",
513
522
  "font",
@@ -526,6 +535,12 @@ const EDITOR_ELEMENT_COPY_ATTR = [
526
535
  "dateFormat",
527
536
  "groupIds",
528
537
  "rowMargin",
538
+ "textIndent",
539
+ "marginLeft",
540
+ "marginRight",
541
+ "marginTop",
542
+ "minHeight",
543
+ "whiteSpace",
529
544
  "textDecoration"
530
545
  ];
531
546
  const EDITOR_ELEMENT_ZIP_ATTR = [
@@ -540,6 +555,12 @@ const EDITOR_ELEMENT_ZIP_ATTR = [
540
555
  "strikeout",
541
556
  "rowFlex",
542
557
  "rowMargin",
558
+ "textIndent",
559
+ "marginLeft",
560
+ "marginRight",
561
+ "marginTop",
562
+ "minHeight",
563
+ "whiteSpace",
543
564
  "dashArray",
544
565
  "trList",
545
566
  "tableToolDisabled",
@@ -4174,7 +4195,8 @@ const defaultLineBreak = {
4174
4195
  const defaultPageBreakOption = {
4175
4196
  font: "Microsoft YaHei",
4176
4197
  fontSize: 12,
4177
- lineDash: [3, 1]
4198
+ lineDash: [3, 1],
4199
+ visible: true
4178
4200
  };
4179
4201
  const FORMAT_PLACEHOLDER = {
4180
4202
  PAGE_NO: "{pageNo}",
@@ -4419,7 +4441,7 @@ function mergeOption(options = {}) {
4419
4441
  resizerSize: 5,
4420
4442
  marginIndicatorSize: 35,
4421
4443
  marginIndicatorColor: "#BABABA",
4422
- margins: [100, 120, 100, 120],
4444
+ margins: [0, 0, 0, 0],
4423
4445
  pageMode: PageMode.PAGING,
4424
4446
  renderMode: RenderMode.SPEED,
4425
4447
  defaultHyperlinkColor: "#0000FF",
@@ -4865,6 +4887,7 @@ function formatElementList(elementList, options) {
4865
4887
  }
4866
4888
  if (el.type === ElementType.IMAGE || el.type === ElementType.BLOCK) {
4867
4889
  el.id = el.id || getUUID();
4890
+ el.verticalAlign = "text-top";
4868
4891
  }
4869
4892
  if (el.type === ElementType.LATEX) {
4870
4893
  const { svg, width, height } = LaTexParticle.convertLaTextToSVG(el.value);
@@ -5195,6 +5218,68 @@ function convertRowFlexToJustifyContent(rowFlex) {
5195
5218
  return "flex-start";
5196
5219
  }
5197
5220
  }
5221
+ function isFloatOverlayImage(element) {
5222
+ return !!element && element.type === ElementType.IMAGE && (element.imgDisplay === ImageDisplay.SURROUND || element.imgDisplay === ImageDisplay.FLOAT_TOP || element.imgDisplay === ImageDisplay.FLOAT_BOTTOM);
5223
+ }
5224
+ function isFloatOverlayOnlyParagraph(p) {
5225
+ var _a, _b;
5226
+ let hasFloatImg = false;
5227
+ for (const node of Array.from(p.childNodes)) {
5228
+ if (node.nodeType === Node.TEXT_NODE) {
5229
+ if ((_a = node.textContent) == null ? void 0 : _a.trim())
5230
+ return false;
5231
+ continue;
5232
+ }
5233
+ if (node.nodeType !== Node.ELEMENT_NODE)
5234
+ continue;
5235
+ const el = node;
5236
+ if (el.nodeName === "IMG") {
5237
+ const display = el.getAttribute("data-img-display");
5238
+ if (display === ImageDisplay.FLOAT_TOP || display === ImageDisplay.FLOAT_BOTTOM || display === ImageDisplay.SURROUND) {
5239
+ hasFloatImg = true;
5240
+ continue;
5241
+ }
5242
+ return false;
5243
+ }
5244
+ if ((_b = el.textContent) == null ? void 0 : _b.trim())
5245
+ return false;
5246
+ }
5247
+ return hasFloatImg;
5248
+ }
5249
+ function groupElementListByRowFlex(elementList) {
5250
+ var _a;
5251
+ const elementListGroupList = [];
5252
+ if (!elementList.length)
5253
+ return elementListGroupList;
5254
+ let currentRowFlex = ((_a = elementList[0]) == null ? void 0 : _a.rowFlex) || null;
5255
+ elementListGroupList.push({
5256
+ rowFlex: currentRowFlex,
5257
+ data: [elementList[0]]
5258
+ });
5259
+ for (let e = 1; e < elementList.length; e++) {
5260
+ const element = elementList[e];
5261
+ const prev = elementList[e - 1];
5262
+ const rowFlex = element.rowFlex || null;
5263
+ const curIsFloatOverlay = isFloatOverlayImage(element);
5264
+ const prevIsFloatOverlay = isFloatOverlayImage(prev);
5265
+ const bothImages = element.type === ElementType.IMAGE && (prev == null ? void 0 : prev.type) === ElementType.IMAGE;
5266
+ if (currentRowFlex === rowFlex && !getIsBlockElement(element) && !getIsBlockElement(prev) || bothImages || curIsFloatOverlay || prevIsFloatOverlay) {
5267
+ const lastElementListGroup = elementListGroupList[elementListGroupList.length - 1];
5268
+ lastElementListGroup.data.push(element);
5269
+ } else {
5270
+ elementListGroupList.push({
5271
+ rowFlex,
5272
+ data: [element]
5273
+ });
5274
+ currentRowFlex = rowFlex;
5275
+ }
5276
+ }
5277
+ for (let g = 0; g < elementListGroupList.length; g++) {
5278
+ const elementListGroup = elementListGroupList[g];
5279
+ elementListGroup.data = zipElementList(elementListGroup.data);
5280
+ }
5281
+ return elementListGroupList;
5282
+ }
5198
5283
  function isTextLikeElement(element) {
5199
5284
  return !element.type || TEXTLIKE_ELEMENT_TYPE.includes(element.type);
5200
5285
  }
@@ -5290,9 +5375,72 @@ function convertElementToDom(element, options) {
5290
5375
  if (element.rowMargin) {
5291
5376
  dom.style.lineHeight = ((_b = element.rowMargin) != null ? _b : options.defaultRowMargin).toString();
5292
5377
  }
5378
+ if (element.textIndent) {
5379
+ dom.style.textIndent = `${element.textIndent}px`;
5380
+ }
5381
+ if (element.marginLeft) {
5382
+ dom.style.marginInlineStart = `${element.marginLeft}px`;
5383
+ }
5384
+ if (element.marginRight) {
5385
+ dom.style.marginInlineEnd = `${element.marginRight}px`;
5386
+ }
5387
+ if (element.marginTop) {
5388
+ dom.style.marginTop = `${element.marginTop}px`;
5389
+ }
5390
+ if (element.minHeight) {
5391
+ dom.style.minHeight = `${element.minHeight}px`;
5392
+ }
5393
+ if (element.whiteSpace) {
5394
+ dom.style.whiteSpace = element.whiteSpace;
5395
+ }
5293
5396
  dom.innerText = element.value.replace(new RegExp(`${ZERO}`, "g"), "\n");
5294
5397
  return dom;
5295
5398
  }
5399
+ function applyParagraphStyleToDom(dom, element) {
5400
+ dom.style.margin = "0";
5401
+ if (element.rowFlex) {
5402
+ dom.style.textAlign = convertRowFlexToTextAlign(element.rowFlex);
5403
+ }
5404
+ if (element.rowMargin) {
5405
+ dom.style.lineHeight = String(element.rowMargin);
5406
+ }
5407
+ if (element.textIndent) {
5408
+ dom.style.textIndent = `${element.textIndent}px`;
5409
+ }
5410
+ if (element.marginLeft) {
5411
+ dom.style.marginInlineStart = `${element.marginLeft}px`;
5412
+ }
5413
+ if (element.marginRight) {
5414
+ dom.style.marginInlineEnd = `${element.marginRight}px`;
5415
+ }
5416
+ if (element.marginTop) {
5417
+ dom.style.marginTop = `${element.marginTop}px`;
5418
+ }
5419
+ const minHeight = element.minHeight || element.size;
5420
+ if (minHeight) {
5421
+ dom.style.minHeight = `${minHeight}px`;
5422
+ }
5423
+ if (element.whiteSpace) {
5424
+ dom.style.whiteSpace = element.whiteSpace;
5425
+ } else {
5426
+ dom.style.whiteSpace = "pre-wrap";
5427
+ }
5428
+ }
5429
+ function convertInlineElementToDom(element, options) {
5430
+ const dom = convertElementToDom(element, options);
5431
+ dom.style.textIndent = "";
5432
+ dom.style.marginInlineStart = "";
5433
+ dom.style.marginInlineEnd = "";
5434
+ dom.style.marginTop = "";
5435
+ dom.style.textAlign = "";
5436
+ dom.style.minHeight = "";
5437
+ if (element.whiteSpace) {
5438
+ dom.style.whiteSpace = element.whiteSpace;
5439
+ } else {
5440
+ dom.style.whiteSpace = "pre-wrap";
5441
+ }
5442
+ return dom;
5443
+ }
5296
5444
  function splitListElement(elementList) {
5297
5445
  let curListIndex = 0;
5298
5446
  const listElementListMap = /* @__PURE__ */ new Map();
@@ -5325,44 +5473,319 @@ function splitListElement(elementList) {
5325
5473
  }
5326
5474
  return listElementListMap;
5327
5475
  }
5328
- function groupElementListByRowFlex(elementList) {
5329
- var _a;
5330
- const elementListGroupList = [];
5331
- if (!elementList.length)
5332
- return elementListGroupList;
5333
- let currentRowFlex = ((_a = elementList[0]) == null ? void 0 : _a.rowFlex) || null;
5334
- elementListGroupList.push({
5335
- rowFlex: currentRowFlex,
5336
- data: [elementList[0]]
5337
- });
5338
- for (let e = 1; e < elementList.length; e++) {
5339
- const element = elementList[e];
5340
- const rowFlex = element.rowFlex || null;
5341
- if (currentRowFlex === rowFlex && !getIsBlockElement(element) && !getIsBlockElement(elementList[e - 1])) {
5342
- const lastElementListGroup = elementListGroupList[elementListGroupList.length - 1];
5343
- lastElementListGroup.data.push(element);
5344
- } else {
5345
- elementListGroupList.push({
5346
- rowFlex,
5347
- data: [element]
5348
- });
5349
- currentRowFlex = rowFlex;
5476
+ const IMAGE_DISPLAY_VALUES = Object.values(ImageDisplay);
5477
+ const htmlFloatOffsetMap = /* @__PURE__ */ new Map();
5478
+ function getHtmlFloatOffsetKey(element) {
5479
+ var _a, _b, _c;
5480
+ const p = element.imgFloatPosition;
5481
+ return [
5482
+ element.imgDisplay || "",
5483
+ element.width || 0,
5484
+ element.height || 0,
5485
+ (_a = p == null ? void 0 : p.x) != null ? _a : "",
5486
+ (_b = p == null ? void 0 : p.y) != null ? _b : "",
5487
+ (_c = p == null ? void 0 : p.pageNo) != null ? _c : "",
5488
+ typeof element.value === "string" ? element.value.slice(0, 80) : ""
5489
+ ].join("|");
5490
+ }
5491
+ function isParagraphBreakElement(element) {
5492
+ if (element.type === ElementType.PAGE_BREAK)
5493
+ return true;
5494
+ if (element.type === ElementType.TABLE)
5495
+ return true;
5496
+ if (element.type === ElementType.TITLE)
5497
+ return true;
5498
+ if (element.type === ElementType.LIST)
5499
+ return true;
5500
+ if (element.type === ElementType.SEPARATOR)
5501
+ return true;
5502
+ const value = element.value;
5503
+ return value === WRAP || value === "\n" || value === ZERO;
5504
+ }
5505
+ function getParagraphPageOrigin(elementList, positionList, imageIndex) {
5506
+ var _a, _b;
5507
+ let start = imageIndex;
5508
+ while (start > 0) {
5509
+ if (isParagraphBreakElement(elementList[start - 1]))
5510
+ break;
5511
+ start--;
5512
+ }
5513
+ let originX = Number.POSITIVE_INFINITY;
5514
+ let originY = Number.POSITIVE_INFINITY;
5515
+ for (let i = start; i < elementList.length; i++) {
5516
+ if (i > start && isParagraphBreakElement(elementList[i]))
5517
+ break;
5518
+ if (elementList[i].imgDisplay === ImageDisplay.FLOAT_TOP || elementList[i].imgDisplay === ImageDisplay.FLOAT_BOTTOM || elementList[i].imgDisplay === ImageDisplay.SURROUND) {
5519
+ continue;
5350
5520
  }
5521
+ const pos = positionList[i];
5522
+ if (!((_a = pos == null ? void 0 : pos.coordinate) == null ? void 0 : _a.leftTop))
5523
+ continue;
5524
+ const [x, y] = pos.coordinate.leftTop;
5525
+ originX = Math.min(originX, x);
5526
+ originY = Math.min(originY, y);
5351
5527
  }
5352
- for (let g = 0; g < elementListGroupList.length; g++) {
5353
- const elementListGroup = elementListGroupList[g];
5354
- elementListGroup.data = zipElementList(elementListGroup.data);
5528
+ if (!Number.isFinite(originX) || !Number.isFinite(originY)) {
5529
+ const flowPos = positionList[imageIndex];
5530
+ if ((_b = flowPos == null ? void 0 : flowPos.coordinate) == null ? void 0 : _b.leftTop) {
5531
+ return {
5532
+ x: flowPos.coordinate.leftTop[0],
5533
+ y: flowPos.coordinate.leftTop[1]
5534
+ };
5535
+ }
5536
+ return { x: 0, y: 0 };
5537
+ }
5538
+ return { x: originX, y: originY };
5539
+ }
5540
+ function attachHtmlFloatOffset(elementList, positionList, scale = 1) {
5541
+ const safeScale = scale || 1;
5542
+ for (let i = 0; i < elementList.length; i++) {
5543
+ const element = elementList[i];
5544
+ if (element.type !== ElementType.IMAGE || element.imgDisplay !== ImageDisplay.FLOAT_TOP && element.imgDisplay !== ImageDisplay.FLOAT_BOTTOM && element.imgDisplay !== ImageDisplay.SURROUND || !element.imgFloatPosition) {
5545
+ continue;
5546
+ }
5547
+ const origin = getParagraphPageOrigin(elementList, positionList, i);
5548
+ htmlFloatOffsetMap.set(getHtmlFloatOffsetKey(element), {
5549
+ left: (element.imgFloatPosition.x - origin.x) / safeScale,
5550
+ top: (element.imgFloatPosition.y - origin.y) / safeScale
5551
+ });
5552
+ }
5553
+ }
5554
+ function clearHtmlFloatOffset() {
5555
+ htmlFloatOffsetMap.clear();
5556
+ }
5557
+ const HTML_FLOAT_TOP_ADJUST_PX = -6;
5558
+ function buildImageWrapStyle(element) {
5559
+ const styles = ["vertical-align: text-top"];
5560
+ const { imgDisplay, imgFloatPosition } = element;
5561
+ const offset = htmlFloatOffsetMap.get(getHtmlFloatOffsetKey(element));
5562
+ const leftPx = offset ? offset.left : imgFloatPosition ? imgFloatPosition.x : void 0;
5563
+ const topBase = offset ? offset.top : imgFloatPosition ? imgFloatPosition.y : void 0;
5564
+ const topPx = topBase !== void 0 ? topBase + HTML_FLOAT_TOP_ADJUST_PX : void 0;
5565
+ if (imgDisplay === ImageDisplay.SURROUND) {
5566
+ styles.push("position: absolute", "z-index: 1");
5567
+ if (leftPx !== void 0) {
5568
+ styles.push(`left: ${leftPx}px`);
5569
+ }
5570
+ if (topPx !== void 0) {
5571
+ styles.push(`top: ${topPx}px`);
5572
+ }
5573
+ } else if (imgDisplay === ImageDisplay.FLOAT_TOP) {
5574
+ styles.push("position: absolute", "z-index: 2");
5575
+ if (leftPx !== void 0) {
5576
+ styles.push(`left: ${leftPx}px`);
5577
+ }
5578
+ if (topPx !== void 0) {
5579
+ styles.push(`top: ${topPx}px`);
5580
+ }
5581
+ } else if (imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
5582
+ styles.push("position: absolute", "z-index: -1");
5583
+ if (leftPx !== void 0) {
5584
+ styles.push(`left: ${leftPx}px`);
5585
+ }
5586
+ if (topPx !== void 0) {
5587
+ styles.push(`top: ${topPx}px`);
5588
+ }
5589
+ } else if (imgDisplay === ImageDisplay.BLOCK) {
5590
+ styles.push("display: block");
5591
+ } else if (imgDisplay === ImageDisplay.INLINE) {
5592
+ styles.push("display: block", "clear: both");
5593
+ }
5594
+ return styles.join("; ");
5595
+ }
5596
+ function applyImageWrapToDom(img, element) {
5597
+ img.setAttribute("style", buildImageWrapStyle(element));
5598
+ if (element.imgDisplay) {
5599
+ img.setAttribute("data-img-display", element.imgDisplay);
5600
+ }
5601
+ if (element.imgFloatPosition) {
5602
+ img.setAttribute("data-img-float-position", JSON.stringify(element.imgFloatPosition));
5603
+ }
5604
+ }
5605
+ function relocateFloatOverlayImages(root) {
5606
+ const imgs = Array.from(root.querySelectorAll('img[data-img-display="float-top"], img[data-img-display="float-bottom"], img[data-img-display="surround"]'));
5607
+ for (const img of imgs) {
5608
+ const parent = img.parentElement;
5609
+ if (parent && (parent.nodeName === "P" || /^H[1-6]$/.test(parent.nodeName))) {
5610
+ parent.style.position = "relative";
5611
+ continue;
5612
+ }
5613
+ let target = null;
5614
+ let next = img.nextElementSibling;
5615
+ while (next) {
5616
+ if (next.nodeName === "P" || /^H[1-6]$/.test(next.nodeName)) {
5617
+ target = next;
5618
+ break;
5619
+ }
5620
+ if (next.nodeName === "DIV") {
5621
+ const innerP = next.querySelector("p,h1,h2,h3,h4,h5,h6");
5622
+ if (innerP) {
5623
+ target = innerP;
5624
+ break;
5625
+ }
5626
+ }
5627
+ if (next.getAttribute("data-type") === ElementType.PAGE_BREAK) {
5628
+ break;
5629
+ }
5630
+ next = next.nextElementSibling;
5631
+ }
5632
+ if (!target) {
5633
+ let prev = img.previousElementSibling;
5634
+ while (prev) {
5635
+ if (prev.nodeName === "P" || /^H[1-6]$/.test(prev.nodeName)) {
5636
+ target = prev;
5637
+ break;
5638
+ }
5639
+ if (prev.nodeName === "DIV") {
5640
+ const paras = prev.querySelectorAll("p,h1,h2,h3,h4,h5,h6");
5641
+ if (paras.length) {
5642
+ target = paras[paras.length - 1];
5643
+ break;
5644
+ }
5645
+ }
5646
+ prev = prev.previousElementSibling;
5647
+ }
5648
+ }
5649
+ if (target) {
5650
+ const targetEl = target;
5651
+ targetEl.style.position = "relative";
5652
+ targetEl.append(img);
5653
+ } else if (parent) {
5654
+ const p = document.createElement("p");
5655
+ p.style.position = "relative";
5656
+ p.style.margin = "0";
5657
+ parent.insertBefore(p, img);
5658
+ p.append(img);
5659
+ }
5660
+ }
5661
+ mergeFloatOnlyParagraphs(root);
5662
+ }
5663
+ function mergeFloatOnlyParagraphs(root) {
5664
+ let i = 0;
5665
+ while (i < root.children.length) {
5666
+ const el = root.children[i];
5667
+ if (el.nodeName !== "P" || !isFloatOverlayOnlyParagraph(el)) {
5668
+ i++;
5669
+ continue;
5670
+ }
5671
+ const host = el;
5672
+ host.style.position = "relative";
5673
+ const j = i + 1;
5674
+ while (j < root.children.length) {
5675
+ const next = root.children[j];
5676
+ if (next.nodeName === "P" && isFloatOverlayOnlyParagraph(next)) {
5677
+ Array.from(next.querySelectorAll("img")).forEach((img) => host.append(img));
5678
+ next.remove();
5679
+ continue;
5680
+ }
5681
+ if (next.nodeName === "P") {
5682
+ next.style.position = "relative";
5683
+ Array.from(host.querySelectorAll("img")).forEach((img) => {
5684
+ next.insertBefore(img, next.firstChild);
5685
+ });
5686
+ host.remove();
5687
+ break;
5688
+ }
5689
+ break;
5690
+ }
5691
+ i++;
5692
+ }
5693
+ }
5694
+ function applyImageWrapFromDom(img, element) {
5695
+ const displayAttr = img.getAttribute("data-img-display");
5696
+ if (displayAttr && IMAGE_DISPLAY_VALUES.includes(displayAttr)) {
5697
+ element.imgDisplay = displayAttr;
5698
+ } else {
5699
+ const { float, position, zIndex, display, clear } = img.style;
5700
+ if (float === "left" || float === "right") {
5701
+ element.imgDisplay = ImageDisplay.SURROUND;
5702
+ } else if (position === "absolute") {
5703
+ const z = Number.parseInt(zIndex || "0", 10);
5704
+ element.imgDisplay = z < 0 ? ImageDisplay.FLOAT_BOTTOM : ImageDisplay.FLOAT_TOP;
5705
+ } else if (display === "block" && clear === "both") {
5706
+ element.imgDisplay = ImageDisplay.INLINE;
5707
+ } else if (display === "block") {
5708
+ element.imgDisplay = ImageDisplay.BLOCK;
5709
+ }
5710
+ }
5711
+ const floatPosAttr = img.getAttribute("data-img-float-position");
5712
+ if (floatPosAttr) {
5713
+ try {
5714
+ element.imgFloatPosition = JSON.parse(floatPosAttr);
5715
+ } catch {
5716
+ }
5717
+ } else if (element.imgDisplay === ImageDisplay.SURROUND || element.imgDisplay === ImageDisplay.FLOAT_TOP || element.imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
5718
+ const left2 = Number.parseFloat(img.style.left);
5719
+ const top = Number.parseFloat(img.style.top);
5720
+ if (!Number.isNaN(left2) && !Number.isNaN(top)) {
5721
+ element.imgFloatPosition = { x: left2, y: top };
5722
+ }
5355
5723
  }
5356
- return elementListGroupList;
5357
5724
  }
5358
5725
  function createDomFromElementList(elementList, options) {
5359
5726
  const editorOptions = mergeOption(options);
5360
5727
  function buildDom(payload) {
5361
5728
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
5362
5729
  const clipboardDom2 = document.createElement("div");
5730
+ clipboardDom2.style.position = "relative";
5731
+ let paragraphDom = null;
5732
+ const flushParagraph = () => {
5733
+ if (paragraphDom) {
5734
+ clipboardDom2.append(paragraphDom);
5735
+ paragraphDom = null;
5736
+ }
5737
+ };
5738
+ const ensureParagraph = (styleSource) => {
5739
+ if (!paragraphDom) {
5740
+ paragraphDom = document.createElement("p");
5741
+ applyParagraphStyleToDom(paragraphDom, styleSource);
5742
+ }
5743
+ };
5744
+ const appendInlineNode = (node, styleSource) => {
5745
+ ensureParagraph(styleSource);
5746
+ paragraphDom.append(node);
5747
+ };
5748
+ const appendTextRuns = (element, rawText) => {
5749
+ let text = rawText;
5750
+ if (!text)
5751
+ return;
5752
+ text = text.replace(new RegExp(`${ZERO}`, "g"), "\n");
5753
+ if (/^\n+$/.test(text)) {
5754
+ for (let i = 0; i < text.length; i++) {
5755
+ if (paragraphDom && paragraphDom.childNodes.length > 0) {
5756
+ if (isFloatOverlayOnlyParagraph(paragraphDom)) {
5757
+ continue;
5758
+ }
5759
+ flushParagraph();
5760
+ } else {
5761
+ ensureParagraph(element);
5762
+ flushParagraph();
5763
+ }
5764
+ }
5765
+ return;
5766
+ }
5767
+ const parts = text.split("\n");
5768
+ for (let i = 0; i < parts.length; i++) {
5769
+ if (i > 0) {
5770
+ flushParagraph();
5771
+ }
5772
+ const part = parts[i];
5773
+ if (!part) {
5774
+ if (i < parts.length - 1) {
5775
+ ensureParagraph(element);
5776
+ flushParagraph();
5777
+ }
5778
+ continue;
5779
+ }
5780
+ const dom = convertInlineElementToDom(element, editorOptions);
5781
+ dom.innerText = part;
5782
+ appendInlineNode(dom, element);
5783
+ }
5784
+ };
5363
5785
  for (let e = 0; e < payload.length; e++) {
5364
5786
  const element = payload[e];
5365
5787
  if (element.type === ElementType.TABLE) {
5788
+ flushParagraph();
5366
5789
  const tableDom = document.createElement("table");
5367
5790
  tableDom.setAttribute("cellSpacing", "0");
5368
5791
  tableDom.setAttribute("cellpadding", "0");
@@ -5425,13 +5848,16 @@ function createDomFromElementList(elementList, options) {
5425
5848
  if (element.url) {
5426
5849
  a.href = element.url;
5427
5850
  }
5428
- clipboardDom2.append(a);
5851
+ appendInlineNode(a, element);
5429
5852
  } else if (element.type === ElementType.TITLE) {
5853
+ flushParagraph();
5430
5854
  const h = document.createElement(`h${titleOrderNumberMapping[element.level]}`);
5855
+ applyParagraphStyleToDom(h, element);
5431
5856
  const childDom = buildDom(element.valueList);
5432
5857
  h.innerHTML = childDom.innerHTML;
5433
5858
  clipboardDom2.append(h);
5434
5859
  } else if (element.type === ElementType.LIST) {
5860
+ flushParagraph();
5435
5861
  const list = document.createElement(listTypeElementMapping[element.listType]);
5436
5862
  if (element.listStyle) {
5437
5863
  list.style.listStyleType = listStyleCSSMapping[element.listStyle];
@@ -5447,16 +5873,32 @@ function createDomFromElementList(elementList, options) {
5447
5873
  clipboardDom2.append(list);
5448
5874
  } else if (element.type === ElementType.IMAGE) {
5449
5875
  const img = document.createElement("img");
5450
- console.log(element);
5451
5876
  if (element.value) {
5452
5877
  img.src = element.value;
5453
5878
  img.width = element.width;
5454
5879
  img.height = element.height;
5455
5880
  img.id = getUUID();
5456
- img.setAttribute("data-form-input", JSON.stringify(element.formInput));
5881
+ if (element.formInput) {
5882
+ img.setAttribute("data-form-input", JSON.stringify(element.formInput));
5883
+ }
5884
+ applyImageWrapToDom(img, element);
5885
+ }
5886
+ if (element.imgDisplay === ImageDisplay.SURROUND || element.imgDisplay === ImageDisplay.FLOAT_TOP || element.imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
5887
+ ensureParagraph(element);
5888
+ paragraphDom.style.position = "relative";
5889
+ paragraphDom.append(img);
5890
+ } else if (element.imgDisplay === ImageDisplay.BLOCK || element.imgDisplay === ImageDisplay.INLINE) {
5891
+ const prev = payload[e - 1];
5892
+ const prevIsSameKind = (prev == null ? void 0 : prev.type) === ElementType.IMAGE && (prev.imgDisplay === ImageDisplay.BLOCK || prev.imgDisplay === ImageDisplay.INLINE);
5893
+ if (!prevIsSameKind) {
5894
+ flushParagraph();
5895
+ }
5896
+ clipboardDom2.append(img);
5897
+ } else {
5898
+ appendInlineNode(img, element);
5457
5899
  }
5458
- clipboardDom2.append(img);
5459
5900
  } else if (element.type === ElementType.BLOCK) {
5901
+ flushParagraph();
5460
5902
  if (((_e = element.block) == null ? void 0 : _e.type) === BlockType.VIDEO) {
5461
5903
  const src = (_f = element.block.videoBlock) == null ? void 0 : _f.src;
5462
5904
  if (src) {
@@ -5487,6 +5929,7 @@ function createDomFromElementList(elementList, options) {
5487
5929
  }
5488
5930
  }
5489
5931
  } else if (element.type === ElementType.SEPARATOR) {
5932
+ flushParagraph();
5490
5933
  const hr = document.createElement("hr");
5491
5934
  if ((_h = element.dashArray) == null ? void 0 : _h.length) {
5492
5935
  hr.setAttribute("data-dash-array", element.dashArray.join(","));
@@ -5498,26 +5941,28 @@ function createDomFromElementList(elementList, options) {
5498
5941
  if ((_i = element.checkbox) == null ? void 0 : _i.value) {
5499
5942
  checkbox.setAttribute("checked", "true");
5500
5943
  }
5501
- clipboardDom2.append(checkbox);
5944
+ appendInlineNode(checkbox, element);
5502
5945
  } else if (element.type === ElementType.RADIO) {
5503
5946
  const radio = document.createElement("input");
5504
5947
  radio.type = "radio";
5505
5948
  if ((_j = element.radio) == null ? void 0 : _j.value) {
5506
5949
  radio.setAttribute("checked", "true");
5507
5950
  }
5508
- clipboardDom2.append(radio);
5951
+ appendInlineNode(radio, element);
5509
5952
  } else if (element.type === ElementType.TAB) {
5510
5953
  const tab2 = document.createElement("span");
5511
5954
  tab2.innerHTML = `${NON_BREAKING_SPACE}${NON_BREAKING_SPACE}`;
5512
- clipboardDom2.append(tab2);
5955
+ appendInlineNode(tab2, element);
5513
5956
  } else if (element.type === ElementType.CONTROL) {
5514
5957
  const controlElement = document.createElement("span");
5515
5958
  const childDom = buildDom(((_k = element.control) == null ? void 0 : _k.value) || []);
5516
5959
  controlElement.innerHTML = childDom.innerHTML;
5517
- clipboardDom2.append(controlElement);
5960
+ appendInlineNode(controlElement, element);
5518
5961
  } else if (element.type === ElementType.PAGE_BREAK) {
5962
+ flushParagraph();
5519
5963
  const pageBreakElement = document.createElement("div");
5520
5964
  pageBreakElement.style.breakAfter = "page";
5965
+ pageBreakElement.setAttribute("data-type", ElementType.PAGE_BREAK);
5521
5966
  clipboardDom2.append(pageBreakElement);
5522
5967
  } else if (!element.type || element.type === ElementType.LATEX || TEXTLIKE_ELEMENT_TYPE.includes(element.type)) {
5523
5968
  let text = "";
@@ -5528,14 +5973,13 @@ function createDomFromElementList(elementList, options) {
5528
5973
  }
5529
5974
  if (!text)
5530
5975
  continue;
5531
- const dom = convertElementToDom(element, editorOptions);
5532
5976
  if (((_m = payload[e - 1]) == null ? void 0 : _m.type) === ElementType.TITLE) {
5533
5977
  text = text.replace(/^\n/, "");
5534
5978
  }
5535
- dom.innerText = text.replace(new RegExp(`${ZERO}`, "g"), "\n");
5536
- clipboardDom2.append(dom);
5979
+ appendTextRuns(element, text);
5537
5980
  }
5538
5981
  }
5982
+ flushParagraph();
5539
5983
  return clipboardDom2;
5540
5984
  }
5541
5985
  const clipboardDom = document.createElement("div");
@@ -5565,6 +6009,7 @@ function createDomFromElementList(elementList, options) {
5565
6009
  });
5566
6010
  }
5567
6011
  }
6012
+ relocateFloatOverlayImages(clipboardDom);
5568
6013
  return clipboardDom;
5569
6014
  }
5570
6015
  function convertTextNodeToElement(textNode) {
@@ -5601,12 +6046,29 @@ function convertTextNodeToElement(textNode) {
5601
6046
  if (style.textDecorationLine.includes("line-through")) {
5602
6047
  element.strikeout = true;
5603
6048
  }
6049
+ const letterSpacing = parseFloat(style.letterSpacing);
6050
+ if (letterSpacing && !isNaN(letterSpacing)) {
6051
+ element.letterSpacing = letterSpacing;
6052
+ }
6053
+ const wordSpacing = parseFloat(style.wordSpacing);
6054
+ if (wordSpacing && !isNaN(wordSpacing)) {
6055
+ element.wordSpacing = wordSpacing;
6056
+ }
5604
6057
  return element;
5605
6058
  }
5606
6059
  function getElementListByHTML(htmlText, options) {
5607
6060
  const elementList = [];
6061
+ const visitedNodes = options._visitedNodes || /* @__PURE__ */ new WeakSet();
6062
+ if (!options._visitedNodes) {
6063
+ options._visitedNodes = visitedNodes;
6064
+ }
5608
6065
  function findTextNode(dom) {
5609
6066
  var _a;
6067
+ if (visitedNodes.has(dom)) {
6068
+ console.warn("Circular reference detected in DOM tree. Skipping node to prevent infinite recursion.");
6069
+ return;
6070
+ }
6071
+ visitedNodes.add(dom);
5610
6072
  if (dom.nodeType === 3) {
5611
6073
  const element = convertTextNodeToElement(dom);
5612
6074
  if (element) {
@@ -5620,6 +6082,13 @@ function getElementListByHTML(htmlText, options) {
5620
6082
  elementList.push({
5621
6083
  value: "\n"
5622
6084
  });
6085
+ } else if (node.nodeName === "DIV" && node.getAttribute("data-ce-clear") === "both") {
6086
+ continue;
6087
+ } else if (node.nodeName === "DIV" && node.getAttribute("data-type") === ElementType.PAGE_BREAK) {
6088
+ elementList.push({
6089
+ type: ElementType.PAGE_BREAK,
6090
+ value: "\n"
6091
+ });
5623
6092
  } else if (node.nodeName === "A") {
5624
6093
  const aElement = node;
5625
6094
  const value = aElement.innerText;
@@ -5682,15 +6151,19 @@ function getElementListByHTML(htmlText, options) {
5682
6151
  });
5683
6152
  } else if (node.nodeName === "IMG") {
5684
6153
  const imgElement = node;
5685
- const { src, width, height } = imgElement;
6154
+ const { src } = imgElement;
6155
+ const width = imgElement.width || Number.parseFloat(imgElement.getAttribute("width") || "") || Number.parseFloat(imgElement.style.width) || 0;
6156
+ const height = imgElement.height || Number.parseFloat(imgElement.getAttribute("height") || "") || Number.parseFloat(imgElement.style.height) || 0;
5686
6157
  if (src && width && height) {
5687
6158
  const element = {
5688
6159
  width,
5689
6160
  height,
5690
6161
  value: src,
5691
6162
  type: ElementType.IMAGE,
5692
- rowFlex: convertTextAlignToRowFlex(node.parentElement)
6163
+ rowFlex: convertTextAlignToRowFlex(node.parentElement),
6164
+ verticalAlign: "text-top"
5693
6165
  };
6166
+ applyImageWrapFromDom(imgElement, element);
5694
6167
  const formInputAttr = imgElement.getAttribute("data-form-input");
5695
6168
  if (formInputAttr) {
5696
6169
  try {
@@ -5809,6 +6282,10 @@ function getElementListByHTML(htmlText, options) {
5809
6282
  }
5810
6283
  }
5811
6284
  }
6285
+ if (options.container) {
6286
+ findTextNode(options.container);
6287
+ return elementList;
6288
+ }
5812
6289
  const clipboardHost = document.createElement("div");
5813
6290
  document.body.appendChild(clipboardHost);
5814
6291
  const shadowRoot = clipboardHost.attachShadow({ mode: "open" });
@@ -5950,6 +6427,20 @@ function getNonHideElementIndex(elementList, index2, position = LocationPosition
5950
6427
  }
5951
6428
  return i;
5952
6429
  }
6430
+ function convertToXHTML(dom, options) {
6431
+ var _a;
6432
+ if (!dom)
6433
+ return "";
6434
+ const serializer = new XMLSerializer();
6435
+ let xhtml = serializer.serializeToString(dom);
6436
+ xhtml = xhtml.replace(/\sxmlns="http:\/\/www\.w3\.org\/1999\/xhtml"/g, "");
6437
+ const keepRoot = (options == null ? void 0 : options.keepRoot) || ((_a = dom.classList) == null ? void 0 : _a.contains("ce-export-page"));
6438
+ if (keepRoot) {
6439
+ return xhtml;
6440
+ }
6441
+ const match = xhtml.match(/<[^>]+>([\s\S]*)<\/[^>]+>$/i);
6442
+ return match ? match[1] : xhtml;
6443
+ }
5953
6444
  function setClipboardData(data2) {
5954
6445
  localStorage.setItem(EDITOR_CLIPBOARD, JSON.stringify({
5955
6446
  text: data2.text,
@@ -8451,6 +8942,22 @@ function dblclick(host, evt) {
8451
8942
  editor.showFormRadioConfig(curElement);
8452
8943
  return;
8453
8944
  }
8945
+ if (curElement.formInput && curElement.formInput.type === "image") {
8946
+ editor.showFormImageConfig(curElement);
8947
+ return;
8948
+ }
8949
+ if (curElement.formInput && curElement.formInput.type === "signature") {
8950
+ editor.showFormSignatureConfig(curElement);
8951
+ return;
8952
+ }
8953
+ if (curElement.formInput && curElement.formInput.type === "seal") {
8954
+ editor.showFormSealConfig(curElement);
8955
+ return;
8956
+ }
8957
+ if (curElement.formInput && curElement.formInput.type === "riskCopy") {
8958
+ editor.showFormRiskCopyConfig(curElement);
8959
+ return;
8960
+ }
8454
8961
  editor.showFormInputConfig(curElement);
8455
8962
  return;
8456
8963
  }
@@ -9001,7 +9508,6 @@ class Position {
9001
9508
  for (let j = 0; j < curRow.elementList.length; j++) {
9002
9509
  const element = curRow.elementList[j];
9003
9510
  const metrics = element.metrics;
9004
- const offsetY = !element.hide && (element.imgDisplay !== ImageDisplay.INLINE && element.type === ElementType.IMAGE || element.type === ElementType.LATEX) ? curRow.ascent - metrics.height : curRow.ascent;
9005
9511
  if (element.left) {
9006
9512
  x += element.left;
9007
9513
  }
@@ -9016,7 +9522,7 @@ class Position {
9016
9522
  rowNo: i,
9017
9523
  metrics,
9018
9524
  left: element.left || 0,
9019
- ascent: offsetY,
9525
+ ascent: element.type === ElementType.IMAGE ? 4 : 17,
9020
9526
  lineHeight: curRow.height,
9021
9527
  isFirstLetter: j === 0,
9022
9528
  isLastLetter: j === curRow.elementList.length - 1,
@@ -15492,7 +15998,7 @@ function WorkerWrapper$1() {
15492
15998
  objURL && (window.URL || window.webkitURL).revokeObjectURL(objURL);
15493
15999
  }
15494
16000
  }
15495
- const encodedJs = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBSPShlPT4oZS5IQUxGPSJoYWxmIixlLk9ORV9USElSRD0ib25lLXRoaXJkIixlLlFVQVJURVI9InF1YXJ0ZXIiLGUpKShSfHx7fSksZz0oZT0+KGUuQ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bnM6ZCxkYXRhOmZ9PW8se2V4dHJhUGlja0F0dHJzOlQ9W119PWR8fHt9LGw9e2hlYWRlcjpJKGYuaGVhZGVyLHtleHRyYVBpY2tBdHRyczpULGlzQ2xvbmU6ITF9KSxtYWluOkkoZi5tYWluLHtleHRyYVBpY2tBdHRyczpULGlzQ2xhc3NpZnlBcmVhOiEwLGlzQ2xvbmU6ITF9KSxmb290ZXI6SShmLmZvb3Rlcix7ZXh0cmFQaWNrQXR0cnM6VCxpc0Nsb25lOiExfSl9O3Bvc3RNZXNzYWdlKGwpfX0pKCk7Cg==";
15496
16002
  const blob = typeof window !== "undefined" && window.Blob && new Blob([atob(encodedJs)], { type: "text/javascript;charset=utf-8" });
15497
16003
  function WorkerWrapper() {
15498
16004
  const objURL = blob && (window.URL || window.webkitURL).createObjectURL(blob);
@@ -15576,6 +16082,7 @@ class Dialog {
15576
16082
  this.mask = null;
15577
16083
  this.container = null;
15578
16084
  this.inputList = [];
16085
+ this.searchDropdowns = /* @__PURE__ */ new Map();
15579
16086
  this._render();
15580
16087
  }
15581
16088
  _render() {
@@ -15619,45 +16126,65 @@ class Dialog {
15619
16126
  optionName.classList.add("dialog-option__item--require");
15620
16127
  }
15621
16128
  }
15622
- let optionInput;
15623
16129
  if (option.type === "select") {
15624
- optionInput = document.createElement("select");
15625
- (_a = option.options) == null ? void 0 : _a.forEach((item) => {
15626
- const optionItem = document.createElement("option");
15627
- optionItem.value = item.value;
15628
- optionItem.label = item.label;
15629
- optionInput.append(optionItem);
15630
- });
15631
- } else if (option.type === "textarea") {
15632
- optionInput = document.createElement("textarea");
15633
- } else if (option.type === "color") {
15634
- optionInput = document.createElement("input");
15635
- optionInput.type = "text";
15636
- optionInput.onclick = function() {
15637
- colorControlDom.click();
15638
- };
15639
- const colorControlDom = document.querySelector("#color");
15640
- colorControlDom.oninput = function() {
15641
- optionInput.value = colorControlDom.value;
15642
- };
16130
+ if (option.searchable === false) {
16131
+ const optionInput = document.createElement("select");
16132
+ if (option.width) {
16133
+ optionInput.style.width = `${option.width}px`;
16134
+ }
16135
+ if (option.height) {
16136
+ optionInput.style.height = `${option.height}px`;
16137
+ }
16138
+ optionInput.name = option.name;
16139
+ optionInput.value = option.value || "";
16140
+ (_a = option.options) == null ? void 0 : _a.forEach((item) => {
16141
+ const optionItem = document.createElement("option");
16142
+ optionItem.value = item.value;
16143
+ optionItem.label = item.label;
16144
+ optionInput.append(optionItem);
16145
+ });
16146
+ optionItemContainer.append(optionInput);
16147
+ optionContainer.append(optionItemContainer);
16148
+ this.inputList.push(optionInput);
16149
+ } else {
16150
+ const searchableSelect = this._createSearchableSelect(option);
16151
+ optionItemContainer.append(searchableSelect);
16152
+ optionContainer.append(optionItemContainer);
16153
+ this.inputList.push(searchableSelect);
16154
+ }
15643
16155
  } else {
15644
- optionInput = document.createElement("input");
15645
- optionInput.type = option.type;
15646
- }
15647
- if (option.width) {
15648
- optionInput.style.width = `${option.width}px`;
15649
- }
15650
- if (option.height) {
15651
- optionInput.style.height = `${option.height}px`;
15652
- }
15653
- optionInput.name = option.name;
15654
- optionInput.value = option.value || "";
15655
- if (!(optionInput instanceof HTMLSelectElement)) {
15656
- optionInput.placeholder = option.placeholder || "";
16156
+ let optionInput;
16157
+ if (option.type === "textarea") {
16158
+ optionInput = document.createElement("textarea");
16159
+ } else if (option.type === "color") {
16160
+ optionInput = document.createElement("input");
16161
+ optionInput.type = "text";
16162
+ optionInput.onclick = function() {
16163
+ colorControlDom.click();
16164
+ };
16165
+ const colorControlDom = document.querySelector("#color");
16166
+ colorControlDom.oninput = function() {
16167
+ optionInput.value = colorControlDom.value;
16168
+ };
16169
+ } else {
16170
+ optionInput = document.createElement("input");
16171
+ optionInput.type = option.type;
16172
+ }
16173
+ if (option.width) {
16174
+ optionInput.style.width = `${option.width}px`;
16175
+ }
16176
+ if (option.height) {
16177
+ optionInput.style.height = `${option.height}px`;
16178
+ }
16179
+ optionInput.name = option.name;
16180
+ optionInput.value = option.value || "";
16181
+ if (!(optionInput instanceof HTMLSelectElement)) {
16182
+ optionInput.placeholder = option.placeholder || "";
16183
+ }
16184
+ optionItemContainer.append(optionInput);
16185
+ optionContainer.append(optionItemContainer);
16186
+ this.inputList.push(optionInput);
15657
16187
  }
15658
- optionItemContainer.append(optionInput);
15659
- optionContainer.append(optionItemContainer);
15660
- this.inputList.push(optionInput);
15661
16188
  }
15662
16189
  dialogContainer.append(optionContainer);
15663
16190
  const menuContainer = document.createElement("div");
@@ -15678,10 +16205,21 @@ class Dialog {
15678
16205
  confirmBtn.type = "submit";
15679
16206
  confirmBtn.onclick = () => {
15680
16207
  if (onConfirm) {
15681
- const payload = this.inputList.map((input2) => ({
15682
- name: input2.name,
15683
- value: input2.value
15684
- }));
16208
+ const payload = this.inputList.map((input2) => {
16209
+ if (input2 instanceof HTMLDivElement && input2.classList.contains("searchable-select")) {
16210
+ const name = input2.getAttribute("data-name") || "";
16211
+ const dropdownInfo = this.searchDropdowns.get(name);
16212
+ return {
16213
+ name,
16214
+ value: (dropdownInfo == null ? void 0 : dropdownInfo.selectedValue) || ""
16215
+ };
16216
+ }
16217
+ const element = input2;
16218
+ return {
16219
+ name: element.name,
16220
+ value: element.value
16221
+ };
16222
+ });
15685
16223
  onConfirm(payload);
15686
16224
  }
15687
16225
  this._dispose();
@@ -15692,6 +16230,127 @@ class Dialog {
15692
16230
  this.container = container;
15693
16231
  this.mask = mask;
15694
16232
  }
16233
+ _createSearchableSelect(option) {
16234
+ var _a;
16235
+ const container = document.createElement("div");
16236
+ container.classList.add("searchable-select");
16237
+ container.setAttribute("data-name", option.name);
16238
+ if (option.width) {
16239
+ container.style.width = `${option.width}px`;
16240
+ }
16241
+ const input2 = document.createElement("input");
16242
+ input2.type = "text";
16243
+ input2.classList.add("searchable-select__input");
16244
+ input2.placeholder = option.placeholder || "\u8BF7\u9009\u62E9\u6216\u641C\u7D22";
16245
+ const dropdownInfo = this.searchDropdowns.get(option.name);
16246
+ const currentValue = (dropdownInfo == null ? void 0 : dropdownInfo.selectedValue) || option.value || "";
16247
+ if (currentValue && option.options) {
16248
+ const selectedOption = option.options.find((opt) => opt.value === currentValue);
16249
+ if (selectedOption) {
16250
+ input2.value = selectedOption.label;
16251
+ }
16252
+ }
16253
+ const arrow = document.createElement("span");
16254
+ arrow.classList.add("searchable-select__arrow");
16255
+ arrow.innerHTML = "\u25BC";
16256
+ const inputWrapper = document.createElement("div");
16257
+ inputWrapper.classList.add("searchable-select__input-wrapper");
16258
+ inputWrapper.append(input2);
16259
+ inputWrapper.append(arrow);
16260
+ const dropdown = document.createElement("div");
16261
+ dropdown.classList.add("searchable-select__dropdown");
16262
+ dropdown.style.display = "none";
16263
+ const renderOptions = (filterText = "") => {
16264
+ var _a2;
16265
+ dropdown.innerHTML = "";
16266
+ const filteredOptions = ((_a2 = option.options) == null ? void 0 : _a2.filter((opt) => !filterText || opt.label.toLowerCase().includes(filterText.toLowerCase()))) || [];
16267
+ const dropdownInfo2 = this.searchDropdowns.get(option.name);
16268
+ const currentValue2 = (dropdownInfo2 == null ? void 0 : dropdownInfo2.selectedValue) || option.value || "";
16269
+ if (filteredOptions.length === 0) {
16270
+ const emptyItem = document.createElement("div");
16271
+ emptyItem.classList.add("searchable-select__option", "searchable-select__option--empty");
16272
+ emptyItem.textContent = "\u65E0\u5339\u914D\u9009\u9879";
16273
+ dropdown.append(emptyItem);
16274
+ } else {
16275
+ filteredOptions.forEach((item) => {
16276
+ const optionItem = document.createElement("div");
16277
+ optionItem.classList.add("searchable-select__option");
16278
+ optionItem.textContent = item.label;
16279
+ optionItem.setAttribute("data-value", item.value);
16280
+ if (item.value === currentValue2) {
16281
+ optionItem.classList.add("searchable-select__option--selected");
16282
+ }
16283
+ optionItem.onclick = (e) => {
16284
+ e.stopPropagation();
16285
+ const selectedValue = optionItem.getAttribute("data-value") || "";
16286
+ input2.value = item.label;
16287
+ const allOptions = dropdown.querySelectorAll(".searchable-select__option");
16288
+ allOptions.forEach((opt) => {
16289
+ opt.classList.remove("searchable-select__option--selected");
16290
+ });
16291
+ optionItem.classList.add("searchable-select__option--selected");
16292
+ const dropdownInfo3 = this.searchDropdowns.get(option.name);
16293
+ if (dropdownInfo3) {
16294
+ dropdownInfo3.selectedValue = selectedValue;
16295
+ }
16296
+ dropdown.style.display = "none";
16297
+ };
16298
+ dropdown.append(optionItem);
16299
+ });
16300
+ }
16301
+ };
16302
+ renderOptions();
16303
+ input2.oninput = () => {
16304
+ renderOptions(input2.value);
16305
+ dropdown.style.display = "block";
16306
+ };
16307
+ input2.onclick = (e) => {
16308
+ e.stopPropagation();
16309
+ const allDropdowns = document.querySelectorAll(".searchable-select__dropdown");
16310
+ allDropdowns.forEach((d) => {
16311
+ if (d !== dropdown) {
16312
+ d.style.display = "none";
16313
+ }
16314
+ });
16315
+ dropdown.style.display = dropdown.style.display === "block" ? "none" : "block";
16316
+ };
16317
+ arrow.onclick = (e) => {
16318
+ e.stopPropagation();
16319
+ const allDropdowns = document.querySelectorAll(".searchable-select__dropdown");
16320
+ allDropdowns.forEach((d) => {
16321
+ if (d !== dropdown) {
16322
+ d.style.display = "none";
16323
+ }
16324
+ });
16325
+ dropdown.style.display = dropdown.style.display === "block" ? "none" : "block";
16326
+ input2.focus();
16327
+ };
16328
+ const closeDropdown = (e) => {
16329
+ const target = e.target;
16330
+ if (!container.contains(target)) {
16331
+ dropdown.style.display = "none";
16332
+ }
16333
+ };
16334
+ document.addEventListener("click", closeDropdown);
16335
+ const hiddenSelect = document.createElement("select");
16336
+ hiddenSelect.style.display = "none";
16337
+ hiddenSelect.name = option.name;
16338
+ hiddenSelect.value = option.value || "";
16339
+ (_a = option.options) == null ? void 0 : _a.forEach((item) => {
16340
+ const optionItem = document.createElement("option");
16341
+ optionItem.value = item.value;
16342
+ optionItem.label = item.label;
16343
+ hiddenSelect.append(optionItem);
16344
+ });
16345
+ this.searchDropdowns.set(option.name, {
16346
+ selectedValue: option.value || "",
16347
+ selectElement: hiddenSelect
16348
+ });
16349
+ container.append(inputWrapper);
16350
+ container.append(dropdown);
16351
+ container.append(hiddenSelect);
16352
+ return container;
16353
+ }
15695
16354
  _dispose() {
15696
16355
  var _a, _b;
15697
16356
  (_a = this.mask) == null ? void 0 : _a.remove();
@@ -15986,7 +16645,8 @@ function formCheckboxPropertiesConfigDialog(el, editor) {
15986
16645
  const fontFamily = (_h2 = payload.find((p) => p.name === "fontFamily")) == null ? void 0 : _h2.value;
15987
16646
  const type = "checkbox";
15988
16647
  const formInputKeys = editor.getExtensionParam("formInputKeys");
15989
- formInputKeys.find((kel2) => kel2.value === key) ? JSON.parse(kel) : "";
16648
+ const item = formInputKeys.find((item2) => item2.value === key);
16649
+ const elemProp = item ? JSON.stringify(item) : "";
15990
16650
  const formInput = {
15991
16651
  key,
15992
16652
  width,
@@ -15996,7 +16656,8 @@ function formCheckboxPropertiesConfigDialog(el, editor) {
15996
16656
  fontSize,
15997
16657
  fontFamily,
15998
16658
  color,
15999
- type
16659
+ type,
16660
+ elemProp
16000
16661
  };
16001
16662
  const imageDataUrl = generateCheckboxImage({
16002
16663
  checked,
@@ -16126,7 +16787,8 @@ function formRadioPropertiesConfigDialog(el, editor) {
16126
16787
  const fontFamily = (_h2 = payload.find((p) => p.name === "fontFamily")) == null ? void 0 : _h2.value;
16127
16788
  const type = "radio";
16128
16789
  const formInputKeys = editor.getExtensionParam("formInputKeys");
16129
- formInputKeys.find((kel2) => kel2.value === key) ? JSON.parse(kel) : "";
16790
+ const item = formInputKeys.find((item2) => item2.value === key);
16791
+ const elemProp = item ? JSON.stringify(item) : "";
16130
16792
  const formInput = {
16131
16793
  key,
16132
16794
  width,
@@ -16136,7 +16798,8 @@ function formRadioPropertiesConfigDialog(el, editor) {
16136
16798
  fontSize,
16137
16799
  fontFamily,
16138
16800
  color,
16139
- type
16801
+ type,
16802
+ elemProp
16140
16803
  };
16141
16804
  const imageDataUrl = generateRadioImage({
16142
16805
  checked,
@@ -16167,7 +16830,7 @@ function formRadioPropertiesConfigDialog(el, editor) {
16167
16830
  });
16168
16831
  }
16169
16832
  function formInputPropertiesConfigDialog(el, editor) {
16170
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
16833
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
16171
16834
  console.log("el", el);
16172
16835
  new Dialog({
16173
16836
  title: "\u8868\u5355\u6587\u672C\u6846",
@@ -16197,20 +16860,28 @@ function formInputPropertiesConfigDialog(el, editor) {
16197
16860
  placeholder: "\u8BF7\u8F93\u5165\u9AD8\u5EA6",
16198
16861
  value: (_f = (_e = el == null ? void 0 : el.formInput) == null ? void 0 : _e.height) != null ? _f : "50"
16199
16862
  },
16863
+ {
16864
+ type: "text",
16865
+ label: "\u884C\u9AD8",
16866
+ name: "lineHeight",
16867
+ required: false,
16868
+ placeholder: "\u683C\u5F0F\u5316\u6587\u672C\u4F7F\u7528",
16869
+ value: (_h = (_g = el == null ? void 0 : el.formInput) == null ? void 0 : _g.lineHeight) != null ? _h : ""
16870
+ },
16200
16871
  {
16201
16872
  type: "number",
16202
16873
  label: "\u5B57\u53F7",
16203
16874
  name: "fontSize",
16204
16875
  required: true,
16205
16876
  placeholder: "\u8BF7\u8F93\u5165\u5B57\u53F7",
16206
- value: (_h = (_g = el == null ? void 0 : el.formInput) == null ? void 0 : _g.fontSize) != null ? _h : "10"
16877
+ value: (_j = (_i = el == null ? void 0 : el.formInput) == null ? void 0 : _i.fontSize) != null ? _j : "10"
16207
16878
  },
16208
16879
  {
16209
16880
  type: "select",
16210
16881
  label: "\u662F\u5426\u52A0\u7C97",
16211
16882
  name: "bold",
16212
16883
  required: true,
16213
- value: ((_i = el == null ? void 0 : el.formInput) == null ? void 0 : _i.bold) ? String((_j = el == null ? void 0 : el.formInput) == null ? void 0 : _j.bold) : "false",
16884
+ value: ((_k = el == null ? void 0 : el.formInput) == null ? void 0 : _k.bold) ? String((_l = el == null ? void 0 : el.formInput) == null ? void 0 : _l.bold) : "false",
16214
16885
  options: [
16215
16886
  {
16216
16887
  label: "\u662F",
@@ -16227,7 +16898,7 @@ function formInputPropertiesConfigDialog(el, editor) {
16227
16898
  label: "\u662F\u5426\u659C\u4F53",
16228
16899
  name: "italic",
16229
16900
  required: true,
16230
- value: ((_k = el == null ? void 0 : el.formInput) == null ? void 0 : _k.italic) ? String((_l = el == null ? void 0 : el.formInput) == null ? void 0 : _l.italic) : "false",
16901
+ value: ((_m = el == null ? void 0 : el.formInput) == null ? void 0 : _m.italic) ? String((_n = el == null ? void 0 : el.formInput) == null ? void 0 : _n.italic) : "false",
16231
16902
  options: [
16232
16903
  {
16233
16904
  label: "\u662F",
@@ -16244,7 +16915,7 @@ function formInputPropertiesConfigDialog(el, editor) {
16244
16915
  label: "\u586B\u5145\u7C7B\u578B",
16245
16916
  name: "txtFillType",
16246
16917
  required: true,
16247
- value: ((_m = el == null ? void 0 : el.formInput) == null ? void 0 : _m.txtFillType) ? String((_n = el == null ? void 0 : el.formInput) == null ? void 0 : _n.txtFillType) : "0",
16918
+ value: ((_o = el == null ? void 0 : el.formInput) == null ? void 0 : _o.txtFillType) ? String((_p = el == null ? void 0 : el.formInput) == null ? void 0 : _p.txtFillType) : "0",
16248
16919
  options: [
16249
16920
  {
16250
16921
  label: "\u6587\u672C",
@@ -16261,7 +16932,7 @@ function formInputPropertiesConfigDialog(el, editor) {
16261
16932
  label: "\u662F\u5426\u81EA\u52A8\u6362\u884C",
16262
16933
  name: "txtRowAutoFlag",
16263
16934
  required: false,
16264
- value: ((_o = el == null ? void 0 : el.formInput) == null ? void 0 : _o.txtRowAutoFlag) ? String((_p = el == null ? void 0 : el.formInput) == null ? void 0 : _p.txtRowAutoFlag) : "1",
16935
+ value: ((_q = el == null ? void 0 : el.formInput) == null ? void 0 : _q.txtRowAutoFlag) ? String((_r = el == null ? void 0 : el.formInput) == null ? void 0 : _r.txtRowAutoFlag) : "1",
16265
16936
  options: [
16266
16937
  {
16267
16938
  label: "\u662F",
@@ -16278,7 +16949,7 @@ function formInputPropertiesConfigDialog(el, editor) {
16278
16949
  label: "\u662F\u5426\u53EF\u7F16\u8F91",
16279
16950
  name: "txtEditFlag",
16280
16951
  required: false,
16281
- value: ((_q = el == null ? void 0 : el.formInput) == null ? void 0 : _q.txtEditFlag) ? String((_r = el == null ? void 0 : el.formInput) == null ? void 0 : _r.txtEditFlag) : "1",
16952
+ value: ((_s = el == null ? void 0 : el.formInput) == null ? void 0 : _s.txtEditFlag) ? String((_t = el == null ? void 0 : el.formInput) == null ? void 0 : _t.txtEditFlag) : "1",
16282
16953
  options: [
16283
16954
  {
16284
16955
  label: "\u662F",
@@ -16295,19 +16966,19 @@ function formInputPropertiesConfigDialog(el, editor) {
16295
16966
  label: "\u5B57\u4F53\u989C\u8272",
16296
16967
  name: "color",
16297
16968
  required: true,
16298
- value: (_t = (_s = el == null ? void 0 : el.formInput) == null ? void 0 : _s.color) != null ? _t : "#000000"
16969
+ value: (_v = (_u = el == null ? void 0 : el.formInput) == null ? void 0 : _u.color) != null ? _v : "#000000"
16299
16970
  },
16300
16971
  {
16301
16972
  type: "select",
16302
16973
  label: "\u5B57\u4F53\u6837\u5F0F",
16303
16974
  name: "fontFamily",
16304
16975
  required: true,
16305
- value: (_v = (_u = el == null ? void 0 : el.formInput) == null ? void 0 : _u.fontFamily) != null ? _v : "SimSun",
16976
+ value: (_x = (_w = el == null ? void 0 : el.formInput) == null ? void 0 : _w.fontFamily) != null ? _x : "SimSun",
16306
16977
  options: editor.getExtensionParam("fontOptions") == void 0 || editor.getExtensionParam("fontOptions") == null ? [{ label: "SimSun", value: "SimSun" }] : editor.getExtensionParam("fontOptions")
16307
16978
  }
16308
16979
  ],
16309
16980
  onConfirm: (payload) => {
16310
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2;
16981
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2;
16311
16982
  console.log("payload: ", payload);
16312
16983
  const key = (_a2 = payload.find((p) => p.name === "key")) == null ? void 0 : _a2.value;
16313
16984
  if (!key)
@@ -16319,16 +16990,18 @@ function formInputPropertiesConfigDialog(el, editor) {
16319
16990
  if (!height)
16320
16991
  return;
16321
16992
  const fontSize = (_d2 = payload.find((p) => p.name === "fontSize")) == null ? void 0 : _d2.value;
16322
- const bold = ((_e2 = payload.find((p) => p.name === "bold")) == null ? void 0 : _e2.value) === "true";
16323
- const italic = ((_f2 = payload.find((p) => p.name === "italic")) == null ? void 0 : _f2.value) === "true";
16324
- const color = (_g2 = payload.find((p) => p.name === "color")) == null ? void 0 : _g2.value;
16325
- const fontFamily = (_h2 = payload.find((p) => p.name === "fontFamily")) == null ? void 0 : _h2.value;
16993
+ const lineHeight = (_e2 = payload.find((p) => p.name === "lineHeight")) == null ? void 0 : _e2.value;
16994
+ const bold = ((_f2 = payload.find((p) => p.name === "bold")) == null ? void 0 : _f2.value) === "true";
16995
+ const italic = ((_g2 = payload.find((p) => p.name === "italic")) == null ? void 0 : _g2.value) === "true";
16996
+ const color = (_h2 = payload.find((p) => p.name === "color")) == null ? void 0 : _h2.value;
16997
+ const fontFamily = (_i2 = payload.find((p) => p.name === "fontFamily")) == null ? void 0 : _i2.value;
16326
16998
  const type = "input";
16327
16999
  const formInputKeys = editor.getExtensionParam("formInputKeys");
16328
- const elemProp = formInputKeys.find((kel2) => kel2.value === key) ? JSON.parse(kel) : "";
16329
- const txtFillType = (_i2 = payload.find((p) => p.name === "txtFillType")) == null ? void 0 : _i2.value;
16330
- const txtRowAutoFlag = (_j2 = payload.find((p) => p.name === "txtRowAutoFlag")) == null ? void 0 : _j2.value;
16331
- const txtEditFlag = (_k2 = payload.find((p) => p.name === "txtEditFlag")) == null ? void 0 : _k2.value;
17000
+ const item = formInputKeys.find((item2) => item2.value === key);
17001
+ const elemProp = item ? JSON.stringify(item) : "";
17002
+ const txtFillType = (_j2 = payload.find((p) => p.name === "txtFillType")) == null ? void 0 : _j2.value;
17003
+ const txtRowAutoFlag = (_k2 = payload.find((p) => p.name === "txtRowAutoFlag")) == null ? void 0 : _k2.value;
17004
+ const txtEditFlag = (_l2 = payload.find((p) => p.name === "txtEditFlag")) == null ? void 0 : _l2.value;
16332
17005
  const formInput = {
16333
17006
  key,
16334
17007
  width,
@@ -16342,32 +17015,769 @@ function formInputPropertiesConfigDialog(el, editor) {
16342
17015
  txtFillType,
16343
17016
  txtRowAutoFlag,
16344
17017
  txtEditFlag,
17018
+ elemProp,
17019
+ lineHeight
17020
+ };
17021
+ const imageDataUrl = generateTextImage({
17022
+ text: key,
17023
+ width,
17024
+ height
17025
+ });
17026
+ const param = {
17027
+ "value": imageDataUrl,
17028
+ "type": ElementType.IMAGE,
17029
+ "formInput": formInput,
17030
+ "width": Number(width),
17031
+ "height": Number(height),
17032
+ "verticalAlign": "text-top"
17033
+ };
17034
+ if (el == null ? void 0 : el.id) {
17035
+ const deleteOpt = {
17036
+ id: el.id,
17037
+ properties: param
17038
+ };
17039
+ console.log("deleteOpt12", deleteOpt);
17040
+ editor.command.executeUpdateElementById(deleteOpt);
17041
+ return;
17042
+ }
17043
+ editor.command.executeInsertElementList([
17044
+ param
17045
+ ]);
17046
+ }
17047
+ });
17048
+ }
17049
+ function generateImagePropertiesImage(options) {
17050
+ const config = {
17051
+ key: "",
17052
+ width: 200,
17053
+ height: 150,
17054
+ picAutoFlag: false,
17055
+ picFillType: "default",
17056
+ borderColor: "#000000",
17057
+ borderWidth: 1,
17058
+ ...options
17059
+ };
17060
+ const canvas = document.createElement("canvas");
17061
+ const ctx = canvas.getContext("2d");
17062
+ canvas.width = config.width;
17063
+ canvas.height = config.height;
17064
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
17065
+ ctx.fillStyle = "#ffffff";
17066
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
17067
+ ctx.strokeStyle = config.borderColor;
17068
+ ctx.lineWidth = config.borderWidth;
17069
+ ctx.strokeRect(
17070
+ config.borderWidth / 2,
17071
+ config.borderWidth / 2,
17072
+ config.width - config.borderWidth,
17073
+ config.height - config.borderWidth
17074
+ );
17075
+ const iconSize = 60;
17076
+ const iconX = (config.width - iconSize) / 2;
17077
+ const iconY = config.height / 2 - iconSize / 2 - 10;
17078
+ ctx.strokeStyle = "#999999";
17079
+ ctx.lineWidth = 2;
17080
+ ctx.strokeRect(iconX, iconY, iconSize, iconSize);
17081
+ ctx.fillStyle = "#cccccc";
17082
+ ctx.beginPath();
17083
+ ctx.moveTo(iconX + 10, iconY + iconSize - 10);
17084
+ ctx.lineTo(iconX + iconSize / 2, iconY + 15);
17085
+ ctx.lineTo(iconX + iconSize - 10, iconY + iconSize - 10);
17086
+ ctx.closePath();
17087
+ ctx.fill();
17088
+ ctx.fillStyle = "#ffcc00";
17089
+ ctx.beginPath();
17090
+ ctx.arc(iconX + iconSize - 20, iconY + 15, 8, 0, Math.PI * 2);
17091
+ ctx.fill();
17092
+ if (config.key) {
17093
+ ctx.font = "14px SimSun";
17094
+ ctx.fillStyle = "#000000";
17095
+ ctx.textAlign = "center";
17096
+ ctx.textBaseline = "middle";
17097
+ ctx.fillText(config.key, config.width / 2, iconY + iconSize + 20);
17098
+ }
17099
+ if (config.picAutoFlag === "0") {
17100
+ ctx.font = "12px SimSun";
17101
+ ctx.fillStyle = "#5175f4";
17102
+ ctx.textAlign = "left";
17103
+ ctx.fillText("\u2713 \u81EA\u9002\u5E94", 10, config.height - 15);
17104
+ }
17105
+ const picFillTypeText = config.picFillType === "0" ? "\u9ED8\u8BA4\u5927\u5C0F" : config.picFillType === "1" ? "\u5206\u5272" : "\u987A\u5E8F";
17106
+ ctx.font = "12px SimSun";
17107
+ ctx.fillStyle = "#666666";
17108
+ ctx.textAlign = "right";
17109
+ ctx.fillText(`\u586B\u5145: ${picFillTypeText}`, config.width - 10, config.height - 15);
17110
+ return canvas.toDataURL("image/png");
17111
+ }
17112
+ function generateSignatureImage(options) {
17113
+ const config = {
17114
+ key: "",
17115
+ width: 200,
17116
+ height: 100,
17117
+ picAutoFlag: false,
17118
+ borderColor: "#000000",
17119
+ borderWidth: 1,
17120
+ ...options
17121
+ };
17122
+ const canvas = document.createElement("canvas");
17123
+ const ctx = canvas.getContext("2d");
17124
+ canvas.width = config.width;
17125
+ canvas.height = config.height;
17126
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
17127
+ ctx.fillStyle = "#ffffff";
17128
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
17129
+ ctx.strokeStyle = config.borderColor;
17130
+ ctx.lineWidth = config.borderWidth;
17131
+ ctx.strokeRect(
17132
+ config.borderWidth / 2,
17133
+ config.borderWidth / 2,
17134
+ config.width - config.borderWidth,
17135
+ config.height - config.borderWidth
17136
+ );
17137
+ const iconSize = 50;
17138
+ const iconX = (config.width - iconSize) / 2;
17139
+ const iconY = config.height / 2 - iconSize / 2 - 5;
17140
+ ctx.fillStyle = "#4a90e2";
17141
+ ctx.beginPath();
17142
+ ctx.moveTo(iconX + 10, iconY + iconSize);
17143
+ ctx.lineTo(iconX + iconSize - 10, iconY + 10);
17144
+ ctx.lineTo(iconX + iconSize, iconY + 15);
17145
+ ctx.lineTo(iconX + 15, iconY + iconSize + 5);
17146
+ ctx.closePath();
17147
+ ctx.fill();
17148
+ ctx.fillStyle = "#333333";
17149
+ ctx.beginPath();
17150
+ ctx.moveTo(iconX + 10, iconY + iconSize);
17151
+ ctx.lineTo(iconX + 15, iconY + iconSize + 5);
17152
+ ctx.lineTo(iconX + 5, iconY + iconSize + 8);
17153
+ ctx.closePath();
17154
+ ctx.fill();
17155
+ if (config.key) {
17156
+ ctx.font = "14px SimSun";
17157
+ ctx.fillStyle = "#000000";
17158
+ ctx.textAlign = "center";
17159
+ ctx.textBaseline = "middle";
17160
+ ctx.fillText(config.key, config.width / 2, iconY + iconSize + 20);
17161
+ }
17162
+ if (config.picAutoFlag === "0") {
17163
+ ctx.font = "12px SimSun";
17164
+ ctx.fillStyle = "#5175f4";
17165
+ ctx.textAlign = "left";
17166
+ ctx.fillText("\u2713 \u81EA\u9002\u5E94", 10, config.height - 15);
17167
+ }
17168
+ ctx.font = "12px SimSun";
17169
+ ctx.fillStyle = "#666666";
17170
+ ctx.textAlign = "right";
17171
+ ctx.fillText("\u7B7E\u5B57\u6846", config.width - 10, config.height - 15);
17172
+ return canvas.toDataURL("image/png");
17173
+ }
17174
+ function generateSealImage(options) {
17175
+ const config = {
17176
+ key: "",
17177
+ width: 200,
17178
+ height: 100,
17179
+ picAutoFlag: false,
17180
+ borderColor: "#000000",
17181
+ borderWidth: 1,
17182
+ ...options
17183
+ };
17184
+ const canvas = document.createElement("canvas");
17185
+ const ctx = canvas.getContext("2d");
17186
+ canvas.width = config.width;
17187
+ canvas.height = config.height;
17188
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
17189
+ ctx.fillStyle = "#ffffff";
17190
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
17191
+ ctx.strokeStyle = config.borderColor;
17192
+ ctx.lineWidth = config.borderWidth;
17193
+ ctx.strokeRect(
17194
+ config.borderWidth / 2,
17195
+ config.borderWidth / 2,
17196
+ config.width - config.borderWidth,
17197
+ config.height - config.borderWidth
17198
+ );
17199
+ const iconSize = 50;
17200
+ const iconX = (config.width - iconSize) / 2;
17201
+ const iconY = config.height / 2 - iconSize / 2 - 5;
17202
+ const centerX = iconX + iconSize / 2;
17203
+ const centerY = iconY + iconSize / 2;
17204
+ ctx.strokeStyle = "#e74c3c";
17205
+ ctx.lineWidth = 2.5;
17206
+ ctx.beginPath();
17207
+ ctx.arc(centerX, centerY, iconSize / 2 - 5, 0, Math.PI * 2);
17208
+ ctx.stroke();
17209
+ ctx.strokeStyle = "#e74c3c";
17210
+ ctx.lineWidth = 1.5;
17211
+ ctx.beginPath();
17212
+ ctx.arc(centerX, centerY, iconSize / 2 - 10, 0, Math.PI * 2);
17213
+ ctx.stroke();
17214
+ ctx.fillStyle = "#e74c3c";
17215
+ ctx.font = "bold 16px SimSun";
17216
+ ctx.textAlign = "center";
17217
+ ctx.textBaseline = "middle";
17218
+ ctx.fillText("\u7AE0", centerX, centerY);
17219
+ if (config.key) {
17220
+ ctx.font = "14px SimSun";
17221
+ ctx.fillStyle = "#000000";
17222
+ ctx.textAlign = "center";
17223
+ ctx.textBaseline = "middle";
17224
+ ctx.fillText(config.key, config.width / 2, iconY + iconSize + 20);
17225
+ }
17226
+ if (config.picAutoFlag === "0") {
17227
+ ctx.font = "12px SimSun";
17228
+ ctx.fillStyle = "#5175f4";
17229
+ ctx.textAlign = "left";
17230
+ ctx.fillText("\u2713 \u81EA\u9002\u5E94", 10, config.height - 15);
17231
+ }
17232
+ ctx.font = "12px SimSun";
17233
+ ctx.fillStyle = "#666666";
17234
+ ctx.textAlign = "right";
17235
+ ctx.fillText("\u7B7E\u7AE0\u6846", config.width - 10, config.height - 15);
17236
+ return canvas.toDataURL("image/png");
17237
+ }
17238
+ function generateRiskCopyImage(options) {
17239
+ const config = {
17240
+ key: "",
17241
+ width: 200,
17242
+ height: 100,
17243
+ riskCopyContent: "",
17244
+ borderColor: "#000000",
17245
+ borderWidth: 1,
17246
+ ...options
17247
+ };
17248
+ const canvas = document.createElement("canvas");
17249
+ const ctx = canvas.getContext("2d");
17250
+ canvas.width = config.width;
17251
+ canvas.height = config.height;
17252
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
17253
+ ctx.fillStyle = "#ffffff";
17254
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
17255
+ ctx.strokeStyle = config.borderColor;
17256
+ ctx.lineWidth = config.borderWidth;
17257
+ ctx.strokeRect(
17258
+ config.borderWidth / 2,
17259
+ config.borderWidth / 2,
17260
+ config.width - config.borderWidth,
17261
+ config.height - config.borderWidth
17262
+ );
17263
+ const iconSize = 50;
17264
+ const iconX = (config.width - iconSize) / 2;
17265
+ const iconY = config.height / 2 - iconSize / 2 - 5;
17266
+ ctx.strokeStyle = "#f39c12";
17267
+ ctx.lineWidth = 2;
17268
+ ctx.strokeRect(iconX + 5, iconY + 5, iconSize - 10, iconSize - 10);
17269
+ ctx.beginPath();
17270
+ ctx.moveTo(iconX + 10, iconY + 15);
17271
+ ctx.lineTo(iconX + iconSize - 10, iconY + 15);
17272
+ ctx.moveTo(iconX + 10, iconY + 25);
17273
+ ctx.lineTo(iconX + iconSize - 10, iconY + 25);
17274
+ ctx.moveTo(iconX + 10, iconY + 35);
17275
+ ctx.lineTo(iconX + iconSize - 20, iconY + 35);
17276
+ ctx.stroke();
17277
+ ctx.fillStyle = "#e74c3c";
17278
+ ctx.beginPath();
17279
+ ctx.moveTo(iconX + iconSize - 15, iconY + 5);
17280
+ ctx.lineTo(iconX + iconSize - 5, iconY + 20);
17281
+ ctx.lineTo(iconX + iconSize - 25, iconY + 20);
17282
+ ctx.closePath();
17283
+ ctx.fill();
17284
+ ctx.fillStyle = "#ffffff";
17285
+ ctx.font = "bold 12px Arial";
17286
+ ctx.textAlign = "center";
17287
+ ctx.textBaseline = "middle";
17288
+ ctx.fillText("!", iconX + iconSize - 15, iconY + 14);
17289
+ if (config.key) {
17290
+ ctx.font = "14px SimSun";
17291
+ ctx.fillStyle = "#000000";
17292
+ ctx.textAlign = "center";
17293
+ ctx.textBaseline = "middle";
17294
+ ctx.fillText(config.key, config.width / 2, iconY + iconSize + 20);
17295
+ }
17296
+ if (config.riskCopyContent) {
17297
+ ctx.font = "11px SimSun";
17298
+ ctx.fillStyle = "#666666";
17299
+ ctx.textAlign = "left";
17300
+ const previewText = config.riskCopyContent.length > 20 ? config.riskCopyContent.substring(0, 20) + "..." : config.riskCopyContent;
17301
+ ctx.fillText(previewText, 10, config.height - 30);
17302
+ }
17303
+ ctx.font = "12px SimSun";
17304
+ ctx.fillStyle = "#666666";
17305
+ ctx.textAlign = "right";
17306
+ ctx.fillText("\u98CE\u9669\u6284\u5F55", config.width - 10, config.height - 15);
17307
+ return canvas.toDataURL("image/png");
17308
+ }
17309
+ function formImagePropertiesConfigDialog(el, editor) {
17310
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
17311
+ console.log("el", el);
17312
+ new Dialog({
17313
+ title: "\u56FE\u7247\u6846\u914D\u7F6E",
17314
+ data: [
17315
+ {
17316
+ type: "select",
17317
+ label: "\u5143\u7D20\u540D\u79F0",
17318
+ name: "key",
17319
+ required: true,
17320
+ value: (_b = (_a = el == null ? void 0 : el.formInput) == null ? void 0 : _a.key) != null ? _b : "",
17321
+ placeholder: "\u8BF7\u9009\u62E9\u5143\u7D20\u540D\u79F0",
17322
+ options: editor.getExtensionParam("picKeys") == void 0 || editor.getExtensionParam("picKeys") == null ? [] : editor.getExtensionParam("picKeys")
17323
+ },
17324
+ {
17325
+ type: "number",
17326
+ label: "\u5BBD\u5EA6 (px)",
17327
+ name: "width",
17328
+ required: true,
17329
+ placeholder: "\u8BF7\u8F93\u5165\u5BBD\u5EA6",
17330
+ value: (_d = (_c = el == null ? void 0 : el.formInput) == null ? void 0 : _c.width) != null ? _d : "200"
17331
+ },
17332
+ {
17333
+ type: "number",
17334
+ label: "\u9AD8\u5EA6 (px)",
17335
+ name: "height",
17336
+ required: true,
17337
+ placeholder: "\u8BF7\u8F93\u5165\u9AD8\u5EA6",
17338
+ value: (_f = (_e = el == null ? void 0 : el.formInput) == null ? void 0 : _e.height) != null ? _f : "150"
17339
+ },
17340
+ {
17341
+ type: "select",
17342
+ label: "\u662F\u5426\u81EA\u9002\u5E94",
17343
+ name: "picAutoFlag",
17344
+ required: false,
17345
+ value: (_h = (_g = el == null ? void 0 : el.formInput) == null ? void 0 : _g.picAutoFlag) != null ? _h : "1",
17346
+ options: [
17347
+ {
17348
+ label: "\u5426",
17349
+ value: "1"
17350
+ },
17351
+ {
17352
+ label: "\u662F",
17353
+ value: "0"
17354
+ }
17355
+ ]
17356
+ },
17357
+ {
17358
+ type: "select",
17359
+ label: "\u662F\u5426\u7F29\u653E\u56FE\u7247",
17360
+ name: "reduceSizeFlag",
17361
+ required: false,
17362
+ value: (_j = (_i = el == null ? void 0 : el.formInput) == null ? void 0 : _i.reduceSizeFlag) != null ? _j : "1",
17363
+ options: [
17364
+ {
17365
+ label: "\u5426",
17366
+ value: "1"
17367
+ },
17368
+ {
17369
+ label: "\u662F",
17370
+ value: "0"
17371
+ }
17372
+ ]
17373
+ },
17374
+ {
17375
+ type: "select",
17376
+ label: "\u56FE\u7247\u586B\u5145\u914D\u7F6E",
17377
+ name: "picFillType",
17378
+ required: true,
17379
+ value: (_l = (_k = el == null ? void 0 : el.formInput) == null ? void 0 : _k.picFillType) != null ? _l : "0",
17380
+ options: [
17381
+ {
17382
+ label: "\u9ED8\u8BA4\u5927\u5C0F",
17383
+ value: "0"
17384
+ },
17385
+ {
17386
+ label: "\u5206\u5272",
17387
+ value: "1"
17388
+ },
17389
+ {
17390
+ label: "\u987A\u5E8F",
17391
+ value: "2"
17392
+ }
17393
+ ]
17394
+ },
17395
+ {
17396
+ type: "number",
17397
+ label: "\u884C\u6570",
17398
+ name: "rowNum",
17399
+ required: false,
17400
+ placeholder: "\u8BF7\u8F93\u5165\u884C\u6570",
17401
+ value: (_n = (_m = el == null ? void 0 : el.formInput) == null ? void 0 : _m.rowNum) != null ? _n : "1"
17402
+ },
17403
+ {
17404
+ type: "number",
17405
+ label: "\u5217\u6570",
17406
+ name: "colNum",
17407
+ required: false,
17408
+ placeholder: "\u8BF7\u8F93\u5165\u5217\u6570",
17409
+ value: (_p = (_o = el == null ? void 0 : el.formInput) == null ? void 0 : _o.colNum) != null ? _p : "1"
17410
+ }
17411
+ ],
17412
+ onConfirm: (payload) => {
17413
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
17414
+ console.log("payload: ", payload);
17415
+ const key = (_a2 = payload.find((p) => p.name === "key")) == null ? void 0 : _a2.value;
17416
+ if (!key)
17417
+ return;
17418
+ const width = (_b2 = payload.find((p) => p.name === "width")) == null ? void 0 : _b2.value;
17419
+ if (!width)
17420
+ return;
17421
+ const height = (_c2 = payload.find((p) => p.name === "height")) == null ? void 0 : _c2.value;
17422
+ if (!height)
17423
+ return;
17424
+ const picAutoFlag = ((_d2 = payload.find((p) => p.name === "picAutoFlag")) == null ? void 0 : _d2.value) || "1";
17425
+ const picFillType = ((_e2 = payload.find((p) => p.name === "picFillType")) == null ? void 0 : _e2.value) || "0";
17426
+ const type = "image";
17427
+ const picKeys = editor.getExtensionParam("picKeys");
17428
+ if (!picKeys)
17429
+ return;
17430
+ const item = picKeys.find((item2) => item2.value === key);
17431
+ const elemProp = item ? JSON.stringify(item) : "";
17432
+ const reduceSizeFlag = ((_f2 = payload.find((p) => p.name === "reduceSizeFlag")) == null ? void 0 : _f2.value) || "1";
17433
+ const rowNum = ((_g2 = payload.find((p) => p.name === "rowNum")) == null ? void 0 : _g2.value) || "1";
17434
+ const colNum = ((_h2 = payload.find((p) => p.name === "colNum")) == null ? void 0 : _h2.value) || "1";
17435
+ const formInput = {
17436
+ key,
17437
+ width,
17438
+ height,
17439
+ type,
17440
+ picAutoFlag,
17441
+ picFillType,
17442
+ elemProp,
17443
+ reduceSizeFlag,
17444
+ rowNum,
17445
+ colNum
17446
+ };
17447
+ const imageDataUrl = generateImagePropertiesImage({
17448
+ key,
17449
+ width: Number(width),
17450
+ height: Number(height),
17451
+ picAutoFlag,
17452
+ picFillType
17453
+ });
17454
+ const param = {
17455
+ value: imageDataUrl,
17456
+ type: ElementType.IMAGE,
17457
+ formInput,
17458
+ width: Number(width),
17459
+ height: Number(height)
17460
+ };
17461
+ if (el == null ? void 0 : el.id) {
17462
+ const updateOpt = {
17463
+ id: el.id,
17464
+ properties: param
17465
+ };
17466
+ console.log("updateOpt", updateOpt);
17467
+ editor.command.executeUpdateElementById(updateOpt);
17468
+ return;
17469
+ }
17470
+ editor.command.executeInsertElementList([param]);
17471
+ }
17472
+ });
17473
+ }
17474
+ function formSignatureConfigDialog(el, editor) {
17475
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
17476
+ console.log("el", el);
17477
+ new Dialog({
17478
+ title: "\u7B7E\u5B57\u6846\u914D\u7F6E",
17479
+ data: [
17480
+ {
17481
+ type: "select",
17482
+ label: "\u5143\u7D20\u540D\u79F0",
17483
+ name: "key",
17484
+ required: true,
17485
+ value: (_b = (_a = el == null ? void 0 : el.formInput) == null ? void 0 : _a.key) != null ? _b : "",
17486
+ placeholder: "\u8BF7\u9009\u62E9\u5143\u7D20\u540D\u79F0",
17487
+ options: editor.getExtensionParam("signPicKeys") == void 0 || editor.getExtensionParam("signPicKeys") == null ? [] : editor.getExtensionParam("signPicKeys")
17488
+ },
17489
+ {
17490
+ type: "number",
17491
+ label: "\u5BBD\u5EA6 (px)",
17492
+ name: "width",
17493
+ required: true,
17494
+ placeholder: "\u8BF7\u8F93\u5165\u5BBD\u5EA6",
17495
+ value: (_d = (_c = el == null ? void 0 : el.formInput) == null ? void 0 : _c.width) != null ? _d : "200"
17496
+ },
17497
+ {
17498
+ type: "number",
17499
+ label: "\u9AD8\u5EA6 (px)",
17500
+ name: "height",
17501
+ required: true,
17502
+ placeholder: "\u8BF7\u8F93\u5165\u9AD8\u5EA6",
17503
+ value: (_f = (_e = el == null ? void 0 : el.formInput) == null ? void 0 : _e.height) != null ? _f : "100"
17504
+ },
17505
+ {
17506
+ type: "select",
17507
+ label: "\u662F\u5426\u81EA\u9002\u5E94",
17508
+ name: "picAutoFlag",
17509
+ required: false,
17510
+ value: (_h = (_g = el == null ? void 0 : el.formInput) == null ? void 0 : _g.picAutoFlag) != null ? _h : "1",
17511
+ options: [
17512
+ {
17513
+ label: "\u5426",
17514
+ value: "1"
17515
+ },
17516
+ {
17517
+ label: "\u662F",
17518
+ value: "0"
17519
+ }
17520
+ ]
17521
+ },
17522
+ {
17523
+ type: "select",
17524
+ label: "\u662F\u5426\u7F29\u653E",
17525
+ name: "reduceSizeFlag",
17526
+ required: false,
17527
+ value: (_j = (_i = el == null ? void 0 : el.formInput) == null ? void 0 : _i.reduceSizeFlag) != null ? _j : "1",
17528
+ options: [
17529
+ {
17530
+ label: "\u5426",
17531
+ value: "1"
17532
+ },
17533
+ {
17534
+ label: "\u662F",
17535
+ value: "0"
17536
+ }
17537
+ ]
17538
+ }
17539
+ ],
17540
+ onConfirm: (payload) => {
17541
+ var _a2, _b2, _c2, _d2, _e2;
17542
+ console.log("payload: ", payload);
17543
+ const key = (_a2 = payload.find((p) => p.name === "key")) == null ? void 0 : _a2.value;
17544
+ if (!key)
17545
+ return;
17546
+ const width = (_b2 = payload.find((p) => p.name === "width")) == null ? void 0 : _b2.value;
17547
+ if (!width)
17548
+ return;
17549
+ const height = (_c2 = payload.find((p) => p.name === "height")) == null ? void 0 : _c2.value;
17550
+ if (!height)
17551
+ return;
17552
+ const picAutoFlag = ((_d2 = payload.find((p) => p.name === "picAutoFlag")) == null ? void 0 : _d2.value) || "1";
17553
+ const type = "signature";
17554
+ const signPicKeys = editor.getExtensionParam("signPicKeys");
17555
+ const item = signPicKeys.find((item2) => item2.value === key);
17556
+ const elemProp = item ? JSON.stringify(item) : "";
17557
+ const reduceSizeFlag = ((_e2 = payload.find((p) => p.name === "reduceSizeFlag")) == null ? void 0 : _e2.value) || "1";
17558
+ const formInput = {
17559
+ key,
17560
+ width,
17561
+ height,
17562
+ type,
17563
+ picAutoFlag,
17564
+ elemProp,
17565
+ reduceSizeFlag
17566
+ };
17567
+ const imageDataUrl = generateSignatureImage({
17568
+ key,
17569
+ width: Number(width),
17570
+ height: Number(height),
17571
+ picAutoFlag
17572
+ });
17573
+ const param = {
17574
+ value: imageDataUrl,
17575
+ type: ElementType.IMAGE,
17576
+ formInput,
17577
+ width: Number(width),
17578
+ height: Number(height)
17579
+ };
17580
+ if (el == null ? void 0 : el.id) {
17581
+ const updateOpt = {
17582
+ id: el.id,
17583
+ properties: param
17584
+ };
17585
+ console.log("updateOpt", updateOpt);
17586
+ editor.command.executeUpdateElementById(updateOpt);
17587
+ return;
17588
+ }
17589
+ editor.command.executeInsertElementList([param]);
17590
+ }
17591
+ });
17592
+ }
17593
+ function formSealConfigDialog(el, editor) {
17594
+ var _a, _b, _c, _d, _e, _f, _g, _h;
17595
+ console.log("el", el);
17596
+ new Dialog({
17597
+ title: "\u7B7E\u7AE0\u6846\u914D\u7F6E",
17598
+ data: [
17599
+ {
17600
+ type: "select",
17601
+ label: "\u5143\u7D20\u540D\u79F0",
17602
+ name: "key",
17603
+ required: true,
17604
+ value: (_b = (_a = el == null ? void 0 : el.formInput) == null ? void 0 : _a.key) != null ? _b : "",
17605
+ placeholder: "\u8BF7\u9009\u62E9\u5143\u7D20\u540D\u79F0",
17606
+ options: editor.getExtensionParam("sealPicKeys") == void 0 || editor.getExtensionParam("sealPicKeys") == null ? [] : editor.getExtensionParam("sealPicKeys")
17607
+ },
17608
+ {
17609
+ type: "number",
17610
+ label: "\u5BBD\u5EA6 (px)",
17611
+ name: "width",
17612
+ required: true,
17613
+ placeholder: "\u8BF7\u8F93\u5165\u5BBD\u5EA6",
17614
+ value: (_d = (_c = el == null ? void 0 : el.formInput) == null ? void 0 : _c.width) != null ? _d : "200"
17615
+ },
17616
+ {
17617
+ type: "number",
17618
+ label: "\u9AD8\u5EA6 (px)",
17619
+ name: "height",
17620
+ required: true,
17621
+ placeholder: "\u8BF7\u8F93\u5165\u9AD8\u5EA6",
17622
+ value: (_f = (_e = el == null ? void 0 : el.formInput) == null ? void 0 : _e.height) != null ? _f : "100"
17623
+ },
17624
+ {
17625
+ type: "select",
17626
+ label: "\u662F\u5426\u81EA\u9002\u5E94",
17627
+ name: "picAutoFlag",
17628
+ required: false,
17629
+ value: (_h = (_g = el == null ? void 0 : el.formInput) == null ? void 0 : _g.picAutoFlag) != null ? _h : "1",
17630
+ options: [
17631
+ {
17632
+ label: "\u5426",
17633
+ value: "1"
17634
+ },
17635
+ {
17636
+ label: "\u662F",
17637
+ value: "0"
17638
+ }
17639
+ ]
17640
+ }
17641
+ ],
17642
+ onConfirm: (payload) => {
17643
+ var _a2, _b2, _c2, _d2;
17644
+ console.log("payload: ", payload);
17645
+ const key = (_a2 = payload.find((p) => p.name === "key")) == null ? void 0 : _a2.value;
17646
+ if (!key)
17647
+ return;
17648
+ const width = (_b2 = payload.find((p) => p.name === "width")) == null ? void 0 : _b2.value;
17649
+ if (!width)
17650
+ return;
17651
+ const height = (_c2 = payload.find((p) => p.name === "height")) == null ? void 0 : _c2.value;
17652
+ if (!height)
17653
+ return;
17654
+ const picAutoFlag = ((_d2 = payload.find((p) => p.name === "picAutoFlag")) == null ? void 0 : _d2.value) || "1";
17655
+ const type = "seal";
17656
+ const sealPicKeys = editor.getExtensionParam("sealPicKeys");
17657
+ const item = sealPicKeys.find((item2) => item2.value === key);
17658
+ const elemProp = item ? JSON.stringify(item) : "";
17659
+ const formInput = {
17660
+ key,
17661
+ width,
17662
+ height,
17663
+ type,
17664
+ picAutoFlag,
16345
17665
  elemProp
16346
17666
  };
16347
- const imageDataUrl = generateTextImage({
16348
- text: key,
17667
+ const imageDataUrl = generateSealImage({
17668
+ key,
17669
+ width: Number(width),
17670
+ height: Number(height),
17671
+ picAutoFlag
17672
+ });
17673
+ const param = {
17674
+ value: imageDataUrl,
17675
+ type: ElementType.IMAGE,
17676
+ formInput,
17677
+ width: Number(width),
17678
+ height: Number(height)
17679
+ };
17680
+ if (el == null ? void 0 : el.id) {
17681
+ const updateOpt = {
17682
+ id: el.id,
17683
+ properties: param
17684
+ };
17685
+ console.log("updateOpt", updateOpt);
17686
+ editor.command.executeUpdateElementById(updateOpt);
17687
+ return;
17688
+ }
17689
+ editor.command.executeInsertElementList([param]);
17690
+ }
17691
+ });
17692
+ }
17693
+ function formRiskCopyConfigDialog(el, editor) {
17694
+ var _a, _b, _c, _d, _e, _f, _g, _h;
17695
+ console.log("el", el);
17696
+ new Dialog({
17697
+ title: "\u98CE\u9669\u6284\u5F55\u6846\u914D\u7F6E",
17698
+ data: [
17699
+ {
17700
+ type: "select",
17701
+ label: "\u5143\u7D20\u540D\u79F0",
17702
+ name: "key",
17703
+ required: true,
17704
+ value: (_b = (_a = el == null ? void 0 : el.formInput) == null ? void 0 : _a.key) != null ? _b : "",
17705
+ placeholder: "\u8BF7\u9009\u62E9\u5143\u7D20\u540D\u79F0",
17706
+ options: editor.getExtensionParam("riskCopyKeys") == void 0 || editor.getExtensionParam("riskCopyKeys") == null ? [] : editor.getExtensionParam("riskCopyKeys")
17707
+ },
17708
+ {
17709
+ type: "number",
17710
+ label: "\u5BBD\u5EA6 (px)",
17711
+ name: "width",
17712
+ required: true,
17713
+ placeholder: "\u8BF7\u8F93\u5165\u5BBD\u5EA6",
17714
+ value: (_d = (_c = el == null ? void 0 : el.formInput) == null ? void 0 : _c.width) != null ? _d : "200"
17715
+ },
17716
+ {
17717
+ type: "number",
17718
+ label: "\u9AD8\u5EA6 (px)",
17719
+ name: "height",
17720
+ required: true,
17721
+ placeholder: "\u8BF7\u8F93\u5165\u9AD8\u5EA6",
17722
+ value: (_f = (_e = el == null ? void 0 : el.formInput) == null ? void 0 : _e.height) != null ? _f : "100"
17723
+ },
17724
+ {
17725
+ type: "textarea",
17726
+ label: "\u98CE\u9669\u6284\u5F55\u5185\u5BB9",
17727
+ name: "riskCopyContent",
17728
+ required: false,
17729
+ placeholder: "\u8BF7\u8F93\u5165\u98CE\u9669\u6284\u5F55\u5185\u5BB9",
17730
+ value: (_h = (_g = el == null ? void 0 : el.formInput) == null ? void 0 : _g.riskCopyContent) != null ? _h : ""
17731
+ }
17732
+ ],
17733
+ onConfirm: (payload) => {
17734
+ var _a2, _b2, _c2, _d2;
17735
+ console.log("payload: ", payload);
17736
+ const key = (_a2 = payload.find((p) => p.name === "key")) == null ? void 0 : _a2.value;
17737
+ if (!key)
17738
+ return;
17739
+ const width = (_b2 = payload.find((p) => p.name === "width")) == null ? void 0 : _b2.value;
17740
+ if (!width)
17741
+ return;
17742
+ const height = (_c2 = payload.find((p) => p.name === "height")) == null ? void 0 : _c2.value;
17743
+ if (!height)
17744
+ return;
17745
+ const riskCopyContent = ((_d2 = payload.find((p) => p.name === "riskCopyContent")) == null ? void 0 : _d2.value) || "";
17746
+ const type = "riskCopy";
17747
+ const riskCopyKeys = editor.getExtensionParam("riskCopyKeys");
17748
+ const item = riskCopyKeys.find((item2) => item2.value === key);
17749
+ const elemProp = item ? JSON.stringify(item) : "";
17750
+ const formInput = {
17751
+ key,
16349
17752
  width,
16350
- height
17753
+ height,
17754
+ type,
17755
+ riskCopyContent,
17756
+ elemProp
17757
+ };
17758
+ const imageDataUrl = generateRiskCopyImage({
17759
+ key,
17760
+ width: Number(width),
17761
+ height: Number(height),
17762
+ riskCopyContent
16351
17763
  });
16352
17764
  const param = {
16353
- "value": imageDataUrl,
16354
- "type": ElementType.IMAGE,
16355
- "formInput": formInput,
16356
- "width": Number(width),
16357
- "height": Number(height)
17765
+ value: imageDataUrl,
17766
+ type: ElementType.IMAGE,
17767
+ formInput,
17768
+ width: Number(width),
17769
+ height: Number(height)
16358
17770
  };
16359
17771
  if (el == null ? void 0 : el.id) {
16360
- const deleteOpt = {
17772
+ const updateOpt = {
16361
17773
  id: el.id,
16362
17774
  properties: param
16363
17775
  };
16364
- console.log("deleteOpt12", deleteOpt);
16365
- editor.command.executeUpdateElementById(deleteOpt);
17776
+ console.log("updateOpt", updateOpt);
17777
+ editor.command.executeUpdateElementById(updateOpt);
16366
17778
  return;
16367
17779
  }
16368
- editor.command.executeInsertElementList([
16369
- param
16370
- ]);
17780
+ editor.command.executeInsertElementList([param]);
16371
17781
  }
16372
17782
  });
16373
17783
  }
@@ -16476,23 +17886,6 @@ class Previewer {
16476
17886
  const cursor = window.getComputedStyle(target).cursor;
16477
17887
  document.body.style.cursor = cursor;
16478
17888
  this.canvas.style.cursor = cursor;
16479
- if (this.curElement.formInput) {
16480
- console.log("this.curElement.formInput", this.curElement.formInput);
16481
- console.log("this.curElement.formInput.type", this.curElement.formInput.type);
16482
- this.curElement.formInput.width = `${this.curElement.width * scale}`;
16483
- this.curElement.formInput.height = `${this.curElement.height * scale}`;
16484
- if (this.curElement.formInput.type == "checkbox") {
16485
- this.curElementSrc = generateCheckboxImage(this.curElement.formInput);
16486
- } else if (this.curElement.formInput.type == "radio") {
16487
- this.curElementSrc = generateRadioImage(this.curElement.formInput);
16488
- } else {
16489
- this.curElementSrc = generateTextImage({
16490
- text: this.curElement.formInput.key,
16491
- width: this.curElement.formInput.width,
16492
- height: this.curElement.formInput.height
16493
- });
16494
- }
16495
- }
16496
17889
  console.log(this.curElement);
16497
17890
  this.resizerImage.src = this.curElementSrc;
16498
17891
  this.resizerImageContainer.style.display = "block";
@@ -16515,6 +17908,14 @@ class Previewer {
16515
17908
  this.curElementSrc = generateCheckboxImage(this.curElement.formInput);
16516
17909
  } else if (this.curElement.formInput.type == "radio") {
16517
17910
  this.curElementSrc = generateRadioImage(this.curElement.formInput);
17911
+ } else if (this.curElement.formInput.type == "image") {
17912
+ this.curElementSrc = generateImagePropertiesImage(this.curElement.formInput);
17913
+ } else if (this.curElement.formInput.type == "signature") {
17914
+ this.curElementSrc = generateSignatureImage(this.curElement.formInput);
17915
+ } else if (this.curElement.formInput.type == "seal") {
17916
+ this.curElementSrc = generateSealImage(this.curElement.formInput);
17917
+ } else if (this.curElement.formInput.type == "riskCopy") {
17918
+ this.curElementSrc = generateRiskCopyImage(this.curElement.formInput);
16518
17919
  } else {
16519
17920
  this.curElementSrc = generateTextImage({
16520
17921
  text: this.curElement.formInput.key,
@@ -20604,6 +22005,11 @@ class Draw {
20604
22005
  let listId;
20605
22006
  let listIndex = 0;
20606
22007
  let controlRealWidth = 0;
22008
+ const getParagraphOffsetX = (el, isFirstLine) => {
22009
+ const marginLeft = el.marginLeft || 0;
22010
+ const textIndent = isFirstLine ? el.textIndent || 0 : 0;
22011
+ return (marginLeft + textIndent) * scale;
22012
+ };
20607
22013
  for (let i = 0; i < elementList.length; i++) {
20608
22014
  const curRow = rowList[rowList.length - 1];
20609
22015
  const element = elementList[i];
@@ -20614,8 +22020,17 @@ class Draw {
20614
22020
  boundingBoxAscent: 0,
20615
22021
  boundingBoxDescent: 0
20616
22022
  };
22023
+ if (curRow.offsetX === void 0 && !element.listId && (element.marginLeft || element.textIndent || element.marginRight || element.marginTop)) {
22024
+ const preElement2 = elementList[i - 1];
22025
+ const isFirstLine = i === 0 || (preElement2 == null ? void 0 : preElement2.value) === ZERO || (preElement2 == null ? void 0 : preElement2.type) === ElementType.PAGE_BREAK;
22026
+ curRow.offsetX = getParagraphOffsetX(element, isFirstLine);
22027
+ if (isFirstLine && element.marginTop) {
22028
+ curRow.offsetY = (curRow.offsetY || 0) + element.marginTop * scale;
22029
+ }
22030
+ }
20617
22031
  const offsetX = curRow.offsetX || element.listId && listStyleMap.get(element.listId) || 0;
20618
- const availableWidth = innerWidth - offsetX;
22032
+ const marginRight = (element.marginRight || 0) * scale;
22033
+ const availableWidth = innerWidth - offsetX - marginRight;
20619
22034
  const isStartElement = curRow.elementList.length === 1;
20620
22035
  x += isStartElement ? offsetX : 0;
20621
22036
  y += isStartElement ? curRow.offsetY || 0 : 0;
@@ -20858,7 +22273,7 @@ class Draw {
20858
22273
  } else if (element.type === ElementType.PAGE_BREAK) {
20859
22274
  element.width = availableWidth / scale;
20860
22275
  metrics.width = availableWidth;
20861
- metrics.height = defaultSize;
22276
+ metrics.height = this.options.pageBreak.visible ? defaultSize : 0;
20862
22277
  } else if (element.type === ElementType.RADIO || element.controlComponent === ControlComponent.RADIO) {
20863
22278
  const { width, height: height2, gap } = this.options.radio;
20864
22279
  const elementWidth = width + gap * 2;
@@ -20906,6 +22321,9 @@ class Draw {
20906
22321
  if (element.letterSpacing) {
20907
22322
  metrics.width += element.letterSpacing * scale;
20908
22323
  }
22324
+ if (element.wordSpacing) {
22325
+ metrics.width += element.wordSpacing * scale;
22326
+ }
20909
22327
  const basisMetrics = this.textParticle.measureBasisWord(ctx, element.font);
20910
22328
  metrics.boundingBoxAscent = basisMetrics.actualBoundingBoxAscent * scale;
20911
22329
  metrics.boundingBoxDescent = basisMetrics.actualBoundingBoxDescent * scale;
@@ -21009,8 +22427,13 @@ class Draw {
21009
22427
  row.isList = true;
21010
22428
  row.offsetX = listStyleMap.get(element.listId);
21011
22429
  row.listIndex = listIndex;
22430
+ } else if (element.marginLeft || element.textIndent || element.marginRight) {
22431
+ row.offsetX = getParagraphOffsetX(element, isForceBreak);
21012
22432
  }
21013
22433
  row.offsetY = !isFromTable && ((_s = element.area) == null ? void 0 : _s.top) && element.areaId !== ((_t = elementList[i - 1]) == null ? void 0 : _t.areaId) ? element.area.top * scale : 0;
22434
+ if (isForceBreak && element.marginTop) {
22435
+ row.offsetY = (row.offsetY || 0) + element.marginTop * scale;
22436
+ }
21014
22437
  rowList.push(row);
21015
22438
  } else {
21016
22439
  curRow.width += metrics.width;
@@ -21025,6 +22448,16 @@ class Draw {
21025
22448
  }
21026
22449
  if (isWrap || i === elementList.length - 1) {
21027
22450
  curRow.isWidthNotEnough = isWidthNotEnough && !isForceBreak;
22451
+ let rowMinHeight = 0;
22452
+ for (let e = 0; e < curRow.elementList.length; e++) {
22453
+ const el = curRow.elementList[e];
22454
+ const mh = (el.minHeight || 0) * scale;
22455
+ if (mh > rowMinHeight)
22456
+ rowMinHeight = mh;
22457
+ }
22458
+ if (rowMinHeight > curRow.height) {
22459
+ curRow.height = rowMinHeight;
22460
+ }
21028
22461
  if (!curRow.isSurround && ((preElement == null ? void 0 : preElement.rowFlex) === RowFlex.JUSTIFY || (preElement == null ? void 0 : preElement.rowFlex) === RowFlex.ALIGNMENT && curRow.isWidthNotEnough)) {
21029
22462
  const rowElementList = ((_v = curRow.elementList[0]) == null ? void 0 : _v.value) === ZERO ? curRow.elementList.slice(1) : curRow.elementList;
21030
22463
  const gap = (availableWidth - curRow.width) / (rowElementList.length - 1);
@@ -21160,14 +22593,15 @@ class Draw {
21160
22593
  for (let j = 0; j < curRow.elementList.length; j++) {
21161
22594
  const element = curRow.elementList[j];
21162
22595
  const metrics = element.metrics;
21163
- const { ascent: offsetY, coordinate: { leftTop: [x, y] } } = positionList[curRow.startIndex + j];
22596
+ const { coordinate: { leftTop: [x, y] } } = positionList[curRow.startIndex + j];
22597
+ const offsetY = 17;
21164
22598
  const preElement = curRow.elementList[j - 1];
21165
22599
  if ((element.hide || ((_a = element.control) == null ? void 0 : _a.hide) || ((_b = element.area) == null ? void 0 : _b.hide)) && !this.isDesignMode()) {
21166
22600
  this.textParticle.complete();
21167
22601
  } else if (element.type === ElementType.IMAGE) {
21168
22602
  this.textParticle.complete();
21169
22603
  if (element.imgDisplay !== ImageDisplay.SURROUND && element.imgDisplay !== ImageDisplay.FLOAT_TOP && element.imgDisplay !== ImageDisplay.FLOAT_BOTTOM) {
21170
- this.imageParticle.render(ctx, element, x, y + offsetY);
22604
+ this.imageParticle.render(ctx, element, x, y + 4);
21171
22605
  }
21172
22606
  } else if (element.type === ElementType.LATEX) {
21173
22607
  this.textParticle.complete();
@@ -21204,7 +22638,7 @@ class Draw {
21204
22638
  } else if (element.type === ElementType.SEPARATOR) {
21205
22639
  this.separatorParticle.render(ctx, element, x, y);
21206
22640
  } else if (element.type === ElementType.PAGE_BREAK) {
21207
- if (this.mode !== EditorMode.CLEAN && !isPrintMode) {
22641
+ if (this.mode !== EditorMode.CLEAN && !isPrintMode && this.options.pageBreak.visible) {
21208
22642
  this.pageBreakParticle.render(ctx, element, x, y);
21209
22643
  }
21210
22644
  } else if (element.type === ElementType.CHECKBOX || element.controlComponent === ControlComponent.CHECKBOX) {
@@ -21238,7 +22672,7 @@ class Draw {
21238
22672
  this.textParticle.complete();
21239
22673
  }
21240
22674
  this.textParticle.record(ctx, element, x, y + offsetY);
21241
- if (element.width || element.letterSpacing || PUNCTUATION_REG.test(element.value)) {
22675
+ if (element.width || element.letterSpacing || element.wordSpacing || PUNCTUATION_REG.test(element.value)) {
21242
22676
  this.textParticle.complete();
21243
22677
  }
21244
22678
  }
@@ -21758,6 +23192,8 @@ class Command {
21758
23192
  this.executeLocationCatalog = adapt.locationCatalog.bind(adapt);
21759
23193
  this.executeWordTool = adapt.wordTool.bind(adapt);
21760
23194
  this.executeSetHTML = adapt.setHTML.bind(adapt);
23195
+ this.executeSetHtmlDocx = adapt.setHtmlDocx.bind(adapt);
23196
+ this.executeImportDocx = adapt.importDocx.bind(adapt);
21761
23197
  this.executeSetGroup = adapt.setGroup.bind(adapt);
21762
23198
  this.executeDeleteGroup = adapt.deleteGroup.bind(adapt);
21763
23199
  this.executeLocationGroup = adapt.locationGroup.bind(adapt);
@@ -21816,6 +23252,351 @@ function getParagraphNo(elementList, index2) {
21816
23252
  }
21817
23253
  return paragraphNo;
21818
23254
  }
23255
+ function parsePx(value) {
23256
+ const n = Number.parseFloat(value);
23257
+ return Number.isFinite(n) ? n : 0;
23258
+ }
23259
+ function parseDocxPaperMeta(section) {
23260
+ const style = window.getComputedStyle(section);
23261
+ const width = Math.round(parsePx(style.width)) || Math.round(section.clientWidth);
23262
+ const height = Math.round(parsePx(style.minHeight || style.height)) || Math.round(section.clientHeight);
23263
+ const margins = [
23264
+ Math.round(parsePx(style.paddingTop)),
23265
+ Math.round(parsePx(style.paddingRight)),
23266
+ Math.round(parsePx(style.paddingBottom)),
23267
+ Math.round(parsePx(style.paddingLeft))
23268
+ ];
23269
+ return {
23270
+ width: width || 794,
23271
+ height: height || 1123,
23272
+ margins
23273
+ };
23274
+ }
23275
+ function parseLineHeightAsRowMargin(lineHeight, fontSizePx) {
23276
+ const trimmed = lineHeight.trim();
23277
+ if (!trimmed || trimmed === "normal")
23278
+ return void 0;
23279
+ if (/^\d+(\.\d+)?$/.test(trimmed)) {
23280
+ const ratio = Number.parseFloat(trimmed);
23281
+ return Number.isFinite(ratio) && ratio > 0 ? ratio : void 0;
23282
+ }
23283
+ const px = parsePx(trimmed);
23284
+ if (px > 0 && fontSizePx > 0) {
23285
+ return px / fontSizePx;
23286
+ }
23287
+ return void 0;
23288
+ }
23289
+ function getParagraphStyle(p) {
23290
+ const style = window.getComputedStyle(p);
23291
+ const fontSize = parsePx(style.fontSize) || 14;
23292
+ const rowFlex = convertTextAlignToRowFlex(p);
23293
+ const rowMargin = parseLineHeightAsRowMargin(style.lineHeight, fontSize);
23294
+ const textIndent = parsePx(style.textIndent);
23295
+ const marginLeft = parsePx(style.marginInlineStart || style.marginLeft);
23296
+ const marginRight = parsePx(style.marginInlineEnd || style.marginRight);
23297
+ const marginTop = parsePx(style.marginTop);
23298
+ let minHeight = parsePx(style.minHeight);
23299
+ if (!minHeight && fontSize) {
23300
+ minHeight = fontSize;
23301
+ }
23302
+ let whiteSpace = style.whiteSpace;
23303
+ if (!whiteSpace || whiteSpace === "normal") {
23304
+ const span = p.querySelector("span");
23305
+ if (span) {
23306
+ const spanWhiteSpace = window.getComputedStyle(span).whiteSpace;
23307
+ if (spanWhiteSpace && spanWhiteSpace !== "normal") {
23308
+ whiteSpace = spanWhiteSpace;
23309
+ }
23310
+ }
23311
+ }
23312
+ if ((!whiteSpace || whiteSpace === "normal") && p.closest(".docx, .docx-wrapper")) {
23313
+ whiteSpace = "pre-wrap";
23314
+ }
23315
+ const result = {};
23316
+ if (rowFlex !== RowFlex.LEFT)
23317
+ result.rowFlex = rowFlex;
23318
+ if (rowMargin !== void 0)
23319
+ result.rowMargin = rowMargin;
23320
+ if (textIndent)
23321
+ result.textIndent = textIndent;
23322
+ if (marginLeft)
23323
+ result.marginLeft = marginLeft;
23324
+ if (marginRight)
23325
+ result.marginRight = marginRight;
23326
+ if (marginTop)
23327
+ result.marginTop = marginTop;
23328
+ if (minHeight)
23329
+ result.minHeight = minHeight;
23330
+ if (whiteSpace && whiteSpace !== "normal") {
23331
+ result.whiteSpace = whiteSpace;
23332
+ }
23333
+ return result;
23334
+ }
23335
+ function applyParagraphStyle(elements, paragraphStyle) {
23336
+ if (!elements.length)
23337
+ return;
23338
+ const keys = Object.keys(paragraphStyle);
23339
+ if (!keys.length)
23340
+ return;
23341
+ for (const el of elements) {
23342
+ Object.assign(el, paragraphStyle);
23343
+ }
23344
+ }
23345
+ function styleFromComputed(el) {
23346
+ var _a, _b;
23347
+ const style = window.getComputedStyle(el);
23348
+ const element = {
23349
+ color: style.color,
23350
+ bold: Number(style.fontWeight) > 500,
23351
+ italic: style.fontStyle.includes("italic"),
23352
+ size: Math.floor(parsePx(style.fontSize)) || void 0,
23353
+ font: (_b = (_a = style.fontFamily) == null ? void 0 : _a.split(",")[0]) == null ? void 0 : _b.replace(/['"]/g, "").trim()
23354
+ };
23355
+ if (style.backgroundColor && style.backgroundColor !== "rgba(0, 0, 0, 0)") {
23356
+ element.highlight = style.backgroundColor;
23357
+ }
23358
+ if (style.textDecorationLine.includes("underline")) {
23359
+ element.underline = true;
23360
+ }
23361
+ if (style.textDecorationLine.includes("line-through")) {
23362
+ element.strikeout = true;
23363
+ }
23364
+ const letterSpacing = parsePx(style.letterSpacing);
23365
+ if (letterSpacing)
23366
+ element.letterSpacing = letterSpacing;
23367
+ if (style.whiteSpace && style.whiteSpace !== "normal") {
23368
+ element.whiteSpace = style.whiteSpace;
23369
+ }
23370
+ const spanMinHeight = parsePx(style.minHeight);
23371
+ if (spanMinHeight)
23372
+ element.minHeight = spanMinHeight;
23373
+ return element;
23374
+ }
23375
+ function parseTextFromNode(node) {
23376
+ if (node.nodeType === 3) {
23377
+ const text = node.textContent || "";
23378
+ if (!text)
23379
+ return [];
23380
+ const parent = node.parentElement;
23381
+ const base = parent ? styleFromComputed(parent) : {};
23382
+ return splitText(text).map((ch) => ({
23383
+ value: ch,
23384
+ ...base
23385
+ }));
23386
+ }
23387
+ if (node.nodeType !== 1)
23388
+ return [];
23389
+ const el = node;
23390
+ const name = el.nodeName;
23391
+ if (name === "BR") {
23392
+ return [{ value: WRAP }];
23393
+ }
23394
+ if (name === "IMG") {
23395
+ return parseImage(el);
23396
+ }
23397
+ if (name === "A") {
23398
+ const value = el.innerText;
23399
+ if (!value)
23400
+ return [];
23401
+ return [
23402
+ {
23403
+ type: ElementType.HYPERLINK,
23404
+ value: "",
23405
+ valueList: splitText(value).map((ch) => ({ value: ch })),
23406
+ url: el.href
23407
+ }
23408
+ ];
23409
+ }
23410
+ const result = [];
23411
+ el.childNodes.forEach((child) => {
23412
+ result.push(...parseTextFromNode(child));
23413
+ });
23414
+ return result;
23415
+ }
23416
+ function parseImage(img) {
23417
+ const { src, width, height } = img;
23418
+ const w = width || parsePx(window.getComputedStyle(img).width);
23419
+ const h = height || parsePx(window.getComputedStyle(img).height);
23420
+ if (!src || !w || !h)
23421
+ return [];
23422
+ const element = {
23423
+ width: w,
23424
+ height: h,
23425
+ value: src,
23426
+ type: ElementType.IMAGE,
23427
+ rowFlex: convertTextAlignToRowFlex(img.parentElement || img),
23428
+ verticalAlign: "text-top"
23429
+ };
23430
+ applyImageWrapFromDom(img, element);
23431
+ const formInputAttr = img.getAttribute("data-form-input");
23432
+ if (formInputAttr) {
23433
+ try {
23434
+ element.formInput = JSON.parse(formInputAttr);
23435
+ } catch {
23436
+ }
23437
+ }
23438
+ return [element];
23439
+ }
23440
+ function parseParagraph(p) {
23441
+ const paragraphStyle = getParagraphStyle(p);
23442
+ const children = [];
23443
+ p.childNodes.forEach((child) => {
23444
+ children.push(...parseTextFromNode(child));
23445
+ });
23446
+ if (!children.length) {
23447
+ return [{ value: WRAP, ...paragraphStyle }];
23448
+ }
23449
+ applyParagraphStyle(children, paragraphStyle);
23450
+ children.push({ value: WRAP, ...paragraphStyle });
23451
+ return children;
23452
+ }
23453
+ function parseTable(table, innerWidth) {
23454
+ var _a;
23455
+ const element = {
23456
+ type: ElementType.TABLE,
23457
+ value: WRAP,
23458
+ colgroup: [],
23459
+ trList: []
23460
+ };
23461
+ const colElements = table.querySelectorAll("colgroup col");
23462
+ table.querySelectorAll("tr").forEach((trElement) => {
23463
+ const trHeight = parsePx(window.getComputedStyle(trElement).height) || 0;
23464
+ const tr = {
23465
+ height: trHeight,
23466
+ minHeight: trHeight,
23467
+ tdList: []
23468
+ };
23469
+ trElement.querySelectorAll("th,td").forEach((tdElement) => {
23470
+ const tableCell = tdElement;
23471
+ const valueList = parseBlockChildren(tableCell, innerWidth);
23472
+ const td = {
23473
+ colspan: tableCell.colSpan,
23474
+ rowspan: tableCell.rowSpan,
23475
+ value: valueList,
23476
+ verticalAlign: window.getComputedStyle(tdElement).verticalAlign,
23477
+ width: parsePx(window.getComputedStyle(tdElement).width)
23478
+ };
23479
+ if (tableCell.style.backgroundColor) {
23480
+ td.backgroundColor = tableCell.style.backgroundColor;
23481
+ }
23482
+ tr.tdList.push(td);
23483
+ });
23484
+ element.trList.push(tr);
23485
+ });
23486
+ if (!element.trList.length)
23487
+ return [];
23488
+ const tdCount = element.trList[0].tdList.reduce((pre, cur) => pre + cur.colspan, 0);
23489
+ const defaultColWidth = Math.ceil(innerWidth / Math.max(tdCount, 1));
23490
+ for (let i = 0; i < tdCount; i++) {
23491
+ const colWidth = (_a = colElements[i]) == null ? void 0 : _a.getAttribute("width");
23492
+ element.colgroup.push({
23493
+ width: colWidth ? parseFloat(colWidth) : defaultColWidth
23494
+ });
23495
+ }
23496
+ return [element];
23497
+ }
23498
+ function parseBlockChildren(root, innerWidth) {
23499
+ const result = [];
23500
+ root.childNodes.forEach((node) => {
23501
+ var _a;
23502
+ if (node.nodeType !== 1) {
23503
+ if (node.nodeType === 3 && ((_a = node.textContent) == null ? void 0 : _a.trim())) {
23504
+ result.push(...parseTextFromNode(node));
23505
+ result.push({ value: WRAP });
23506
+ }
23507
+ return;
23508
+ }
23509
+ const el = node;
23510
+ const name = el.nodeName;
23511
+ if (name === "P" || /^H[1-6]$/.test(name)) {
23512
+ result.push(...parseParagraph(el));
23513
+ } else if (name === "TABLE") {
23514
+ result.push(...parseTable(el, innerWidth));
23515
+ } else if (name === "IMG") {
23516
+ result.push(...parseImage(el));
23517
+ result.push({ value: WRAP });
23518
+ } else if (name === "BR") {
23519
+ result.push({ value: WRAP });
23520
+ } else if (name === "DIV" && el.getAttribute("data-type") === ElementType.PAGE_BREAK) {
23521
+ result.push({
23522
+ type: ElementType.PAGE_BREAK,
23523
+ value: WRAP
23524
+ });
23525
+ } else if (name === "DIV" && el.getAttribute("data-ce-clear") === "both") {
23526
+ return;
23527
+ } else if (name === "ARTICLE" || name === "DIV" || name === "SECTION") {
23528
+ result.push(...parseBlockChildren(el, innerWidth));
23529
+ } else {
23530
+ const nested = parseBlockChildren(el, innerWidth);
23531
+ if (nested.length) {
23532
+ result.push(...nested);
23533
+ } else {
23534
+ const inline = parseTextFromNode(el);
23535
+ if (inline.length) {
23536
+ result.push(...inline);
23537
+ result.push({ value: WRAP });
23538
+ }
23539
+ }
23540
+ }
23541
+ });
23542
+ return result;
23543
+ }
23544
+ function parseSectionContent(section, innerWidth) {
23545
+ const article = section.querySelector("article") || section;
23546
+ return parseBlockChildren(article, innerWidth);
23547
+ }
23548
+ function parseDocxDom(container) {
23549
+ const sections = Array.from(container.querySelectorAll("section.docx"));
23550
+ const exportPages = Array.from(container.querySelectorAll(".ce-export-page"));
23551
+ const targets = sections.length ? sections : exportPages.length ? exportPages : [container];
23552
+ const paper = parseDocxPaperMeta(targets[0]);
23553
+ const contentWidth = Math.max(paper.width - paper.margins[1] - paper.margins[3], 1);
23554
+ const main = [];
23555
+ targets.forEach((section, index2) => {
23556
+ const sectionElements = parseSectionContent(section, contentWidth);
23557
+ if (sectionElements.length) {
23558
+ main.push(...sectionElements);
23559
+ }
23560
+ if (index2 < targets.length - 1) {
23561
+ main.push({
23562
+ type: ElementType.PAGE_BREAK,
23563
+ value: WRAP
23564
+ });
23565
+ }
23566
+ });
23567
+ return { paper, main };
23568
+ }
23569
+ const A4_WIDTH_PX = Math.round(595.3 * 96 / 72);
23570
+ const A4_HEIGHT_PX = Math.round(841.95 * 96 / 72);
23571
+ const DEFAULT_MARGINS = [96, 120, 96, 120];
23572
+ function toPadding(margins) {
23573
+ const [top, right2, bottom, left2] = margins;
23574
+ return `${top}px ${right2}px ${bottom}px ${left2}px`;
23575
+ }
23576
+ function mountHtmlForDocx(html, margins) {
23577
+ const tempContainer = document.querySelector("#tempDiv") || document.createElement("div");
23578
+ if (!tempContainer.isConnected) {
23579
+ tempContainer.style.cssText = "opacity:0;position:absolute;left:-9999px;top:0;pointer-events:none;";
23580
+ document.body.append(tempContainer);
23581
+ }
23582
+ const trimmed = html.trim();
23583
+ const hasDocxSection = /<section[^>]*class=["'][^"']*\bdocx\b/i.test(trimmed);
23584
+ const hasExportPage = /class=["'][^"']*\bce-export-page\b/i.test(trimmed);
23585
+ if (hasDocxSection || hasExportPage) {
23586
+ tempContainer.innerHTML = trimmed;
23587
+ if (margins) {
23588
+ const paperEl = tempContainer.querySelector("section.docx") || tempContainer.querySelector(".ce-export-page");
23589
+ if (paperEl) {
23590
+ paperEl.style.padding = toPadding(margins);
23591
+ paperEl.style.boxSizing = "border-box";
23592
+ }
23593
+ }
23594
+ } else {
23595
+ const padding = toPadding(margins != null ? margins : DEFAULT_MARGINS);
23596
+ tempContainer.innerHTML = `<section class="docx" style="width:${A4_WIDTH_PX}px;min-height:${A4_HEIGHT_PX}px;padding:${padding};box-sizing:border-box;background:#fff;"><article>${trimmed}</article></section>`;
23597
+ }
23598
+ return tempContainer;
23599
+ }
21819
23600
  function convertPxToPaperSize(width, height) {
21820
23601
  if (width === 1125 && height === 1593) {
21821
23602
  return {
@@ -23084,11 +24865,37 @@ class CommandAdapt {
23084
24865
  const headerElementList = this.draw.getHeaderElementList();
23085
24866
  const mainElementList = this.draw.getOriginalMainElementList();
23086
24867
  const footerElementList = this.draw.getFooterElementList();
23087
- return {
23088
- header: createDomFromElementList(headerElementList, options).innerHTML,
23089
- main: createDomFromElementList(mainElementList, options).innerHTML,
23090
- footer: createDomFromElementList(footerElementList, options).innerHTML
24868
+ const headerPositionList = this.draw.getHeader().getPositionList();
24869
+ const mainPositionList = this.position.getOriginalMainPositionList();
24870
+ const footerPositionList = this.draw.getFooter().getPositionList();
24871
+ const { scale } = options;
24872
+ attachHtmlFloatOffset(headerElementList, headerPositionList, scale);
24873
+ attachHtmlFloatOffset(mainElementList, mainPositionList, scale);
24874
+ attachHtmlFloatOffset(footerElementList, footerPositionList, scale);
24875
+ const wrapPaper = (dom) => {
24876
+ const { width, height, margins } = options;
24877
+ const wrapper = document.createElement("div");
24878
+ wrapper.className = "ce-export-page";
24879
+ wrapper.style.width = `${width}px`;
24880
+ wrapper.style.minHeight = `${height}px`;
24881
+ wrapper.style.padding = `${margins[0]}px ${margins[1]}px ${margins[2]}px ${margins[3]}px`;
24882
+ wrapper.style.boxSizing = "border-box";
24883
+ wrapper.style.position = "relative";
24884
+ wrapper.style.background = "#fff";
24885
+ while (dom.firstChild) {
24886
+ wrapper.append(dom.firstChild);
24887
+ }
24888
+ return convertToXHTML(wrapper, { keepRoot: true });
23091
24889
  };
24890
+ try {
24891
+ return {
24892
+ header: wrapPaper(createDomFromElementList(headerElementList, options)),
24893
+ main: wrapPaper(createDomFromElementList(mainElementList, options)),
24894
+ footer: wrapPaper(createDomFromElementList(footerElementList, options))
24895
+ };
24896
+ } finally {
24897
+ clearHtmlFloatOffset();
24898
+ }
23092
24899
  }
23093
24900
  getText() {
23094
24901
  const headerElementList = this.draw.getHeaderElementList();
@@ -23691,10 +25498,11 @@ class CommandAdapt {
23691
25498
  }
23692
25499
  }
23693
25500
  setHTML(payload) {
23694
- const { header, main, footer } = payload;
25501
+ const { header, main, footer, container } = payload;
23695
25502
  const innerWidth = this.draw.getOriginalInnerWidth();
23696
25503
  const getElementList = (htmlText) => htmlText !== void 0 ? getElementListByHTML(htmlText, {
23697
- innerWidth
25504
+ innerWidth,
25505
+ container
23698
25506
  }) : void 0;
23699
25507
  this.setValue({
23700
25508
  header: getElementList(header),
@@ -23702,6 +25510,22 @@ class CommandAdapt {
23702
25510
  footer: getElementList(footer)
23703
25511
  });
23704
25512
  }
25513
+ setHtmlDocx(payload) {
25514
+ const { container, margins } = payload;
25515
+ if (!container)
25516
+ return;
25517
+ const { paper, main } = parseDocxDom(container);
25518
+ this.options.margins = margins != null ? margins : paper.margins;
25519
+ this.draw.setPaperSize(paper.width, paper.height);
25520
+ this.setValue({ main });
25521
+ }
25522
+ importDocx(payload) {
25523
+ const { html, margins } = payload;
25524
+ if (!html)
25525
+ return;
25526
+ const container = mountHtmlForDocx(html, margins);
25527
+ this.setHtmlDocx({ container, margins });
25528
+ }
23705
25529
  setGroup() {
23706
25530
  const isReadonly = this.draw.isReadonly();
23707
25531
  if (isReadonly)
@@ -25184,6 +27008,8 @@ class EventBus {
25184
27008
  }
25185
27009
  class Override {
25186
27010
  }
27011
+ function docxPlugin(_editor) {
27012
+ }
25187
27013
  class Editor {
25188
27014
  showFormInputConfig(el) {
25189
27015
  formInputPropertiesConfigDialog(el, this);
@@ -25194,6 +27020,18 @@ class Editor {
25194
27020
  showFormRadioConfig(el) {
25195
27021
  formRadioPropertiesConfigDialog(el, this);
25196
27022
  }
27023
+ showFormImageConfig(el) {
27024
+ formImagePropertiesConfigDialog(el, this);
27025
+ }
27026
+ showFormSignatureConfig(el) {
27027
+ formSignatureConfigDialog(el, this);
27028
+ }
27029
+ showFormSealConfig(el) {
27030
+ formSealConfigDialog(el, this);
27031
+ }
27032
+ showFormRiskCopyConfig(el) {
27033
+ formRiskCopyConfigDialog(el, this);
27034
+ }
25197
27035
  setExtensionParam(key, value) {
25198
27036
  this.extensionParams.set(key, value);
25199
27037
  }
@@ -25277,5 +27115,5 @@ class Editor {
25277
27115
  Reflect.set(window, "editor", this);
25278
27116
  }
25279
27117
  }
25280
- export { AreaMode, BackgroundRepeat, BackgroundSize, BlockType, Command, ControlComponent, ControlIndentation, ControlState, ControlType, EDITOR_CLIPBOARD, EDITOR_COMPONENT, Editor, EditorComponent, EditorMode, EditorZone, ElementType, FlexDirection, INTERNAL_CONTEXT_MENU_KEY, INTERNAL_SHORTCUT_KEY, ImageDisplay, KeyMap, LETTER_CLASS, LineNumberType, ListStyle, ListType, LocationPosition, MaxHeightRatio, NumberType, PageMode, PaperDirection, RenderMode, RowFlex, TableBorder, TdBorder, TdSlash, TextDecorationStyle, TitleLevel, VerticalAlign, WatermarkType, WordBreak, createDomFromElementList, Editor as default, formCheckboxPropertiesConfigDialog, formInputPropertiesConfigDialog, formRadioPropertiesConfigDialog, getElementListByHTML, getTextFromElementList, splitText };
27118
+ export { AreaMode, BackgroundRepeat, BackgroundSize, BlockType, Command, ControlComponent, ControlIndentation, ControlState, ControlType, Dialog, EDITOR_CLIPBOARD, EDITOR_COMPONENT, Editor, EditorComponent, EditorMode, EditorZone, ElementType, FlexDirection, INTERNAL_CONTEXT_MENU_KEY, INTERNAL_SHORTCUT_KEY, ImageDisplay, KeyMap, LETTER_CLASS, LineNumberType, ListStyle, ListType, LocationPosition, MaxHeightRatio, NumberType, PageMode, PaperDirection, RenderMode, RowFlex, TableBorder, TdBorder, TdSlash, TextDecorationStyle, TitleLevel, VerticalAlign, WatermarkType, WordBreak, createDomFromElementList, Editor as default, docxPlugin, formCheckboxPropertiesConfigDialog, formImagePropertiesConfigDialog, formInputPropertiesConfigDialog, formRadioPropertiesConfigDialog, formRiskCopyConfigDialog, formSealConfigDialog, formSignatureConfigDialog, getElementListByHTML, getTextFromElementList, splitText };
25281
27119
  //# sourceMappingURL=canvas-editor.es.js.map