ht-emr 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas-editor.js +2717 -2641
- package/dist/canvas-editor.js.map +1 -1
- package/dist/canvas-editor.umd.cjs +33 -33
- package/dist/canvas-editor.umd.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
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:#fff;border-radius:4px;padding:10px;-webkit-user-select:none;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;-webkit-user-select:none;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;inset: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,%3csvg%20width='32'%20height='32'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M23.97%207l1.415%201.414-7.779%207.778%207.779%207.779-1.414%201.414-7.779-7.779-7.778%207.779L7%2023.97l7.778-7.779L7%208.414%208.414%207l7.778%207.778L23.971%207z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e") 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,%3csvg%20width='32'%20height='32'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14%2014v-4h2v4h4v2h-4v4h-2v-4h-4v-2h4zm8.749%2010.163A11.952%2011.952%200%200115%2027C8.373%2027%203%2021.627%203%2015S8.373%203%2015%203s12%205.373%2012%2012c0%202.954-1.067%205.658-2.837%207.749l4.908%204.908-1.414%201.414-4.908-4.908zM15%2025c5.523%200%2010-4.477%2010-10S20.523%205%2015%205%205%209.477%205%2015s4.477%2010%2010%2010z'%20fill='%233D4757'/%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu i.zoom-out{background-image:url("data:image/svg+xml,%3csvg%20width='32'%20height='32'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22.749%2024.163A11.952%2011.952%200%200115%2027C8.373%2027%203%2021.627%203%2015S8.373%203%2015%203s12%205.373%2012%2012c0%202.954-1.067%205.658-2.837%207.749l4.908%204.908-1.414%201.414-4.908-4.908zM15%2025c5.523%200%2010-4.477%2010-10S20.523%205%2015%205%205%209.477%205%2015s4.477%2010%2010%2010zm-5-11h10v2H10v-2z'%20fill='%233D4757'/%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu i.rotate{background-image:url("data:image/svg+xml,%3csvg%20width='32'%20height='32'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M16%204c6.627%200%2012%205.373%2012%2012a11.97%2011.97%200%2001-4%208.944V23h-.86A9.968%209.968%200%200026%2016c0-5.523-4.477-10-10-10S6%2010.477%206%2016c0%205.185%203.947%209.449%209%209.95v2.009C8.84%2027.451%204%2022.291%204%2016%204%209.373%209.373%204%2016%204z'%20fill-rule='nonzero'/%3e%3cpath%20d='M19.879%2027.328l1.767-6.717%204.95%204.95z'/%3e%3c/g%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu i.original-size{background-image:url("data:image/svg+xml,%3csvg%20width='32'%20height='32'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%204h24v24H4V4zm2%202v20h20V6H6zm4%205h2v10h-2V11zm5%202h2v2h-2v-2zm0%204h2v2h-2v-2zm5-6h2v10h-2V11z'%20fill='%233D4757'/%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu i.image-download{background-image:url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.5%2015v3.5h15V15H21v5H3v-5h1.5zm8.232-11.226v9.196l4.05-4.05%201.06%201.06-5.834%205.834-5.833-5.833%201.06-1.06%203.998%203.996V3.774h1.5z'%20fill='%233D4757'/%3e%3c/svg%3e")}.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,%3csvg%20width='20'%20height='20'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.5%204.063L6.875%2010l5.625%205.938'%20stroke='%233D4757'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu i.image-next{background-image:url("data:image/svg+xml,%3csvg%20width='20'%20height='20'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.5%204.063L13.125%2010%207.5%2015.938'%20stroke='%233D4757'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e")}.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,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M0%200h16v16H0z'/%3e%3cg%20fill='%23767C85'%3e%3cpath%20d='M7%2012.243l-.707-.707%204.243-4.243.707.707z'/%3e%3cpath%20d='M6.293%204.464L7%203.757%2011.243%208l-.707.707z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.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:#1937580a}.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,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M12%204h-1V2H5v2H4V2a1%201%200%20011-1h6a1%201%200%20011%201v2zm0%205v4a1%201%200%2001-1%201H5a1%201%200%2001-1-1V9h1v4h6V9h1z'/%3e%3cpath%20d='M12%2012v-1h2V5H2v6h2v1H2a1%201%200%2001-1-1V5a1%201%200%20011-1h12a1%201%200%20011%201v6a1%201%200%2001-1%201h-2z'/%3e%3cpath%20d='M3%208h10v1H3zm8-2h2v1h-2z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-image{background-image:url("data:image/svg+xml,%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20x='0'%20y='0'%20viewBox='0%200%2016%2016'%20xml:space='preserve'%3e%3cstyle%3e.st0{fill:%233d4757}%3c/style%3e%3cg%20id='_x30_0-公共_x2F_02工具栏_x2F_插入图片-16px-'%3e%3cg%20id='Group-19'%20transform='translate(1%201)'%3e%3cpath%20id='Combined-Shape'%20class='st0'%20d='M1%200h12c.6%200%201%20.4%201%201v11c0%20.6-.4%201-1%201H1c-.6%200-1-.4-1-1V1c0-.6.4-1%201-1zm0%201v11h12V1H1z'/%3e%3ccircle%20id='椭圆形'%20class='st0'%20cx='10'%20cy='4'%20r='1'/%3e%3cpath%20id='Path'%20class='st0'%20d='M8.5%2011.2l-4-4.1L1%2010.7V9.2c1.7-1.6%202.7-2.5%203-2.8.4-.5.7-.4%201%200L8.5%2010%2011%207.3c.4-.5.6-.5%201-.1l2%202.8v1.5l-2.5-3.4-3%203.1z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-image-change{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(2%204)'%20fill='%233D4757'%3e%3ccircle%20fill-rule='nonzero'%20cx='3'%20cy='1'%20r='1'/%3e%3cpath%20d='M7.473%208.223L3.47%204.107%200%207.667v-1.5C1.715%204.6%202.707%203.664%202.975%203.358c.402-.457.651-.39%201.042%200L7.473%207%209.96%204.349c.414-.462.62-.462%201.011-.071L13%207.06v1.5l-2.51-3.41-3.017%203.072z'/%3e%3c/g%3e%3cpath%20d='M6%201.5H1.5v12h13v-4V13a.5.5%200%2001-.5.5H2a.5.5%200%2001-.5-.5V2a.5.5%200%2001.5-.5h4zm8.5%208V6l-.5.5h1l-.5-.5v3.5zM6%201.5h4L9.5%201v1l.5-.5H6z'%20stroke='%233D4757'/%3e%3cpath%20d='M13.085%201.316l-3.814%204a1%201%200%20001.458%201.368l3.815-4a1%201%200%2010-1.459-1.368z'%20fill='%233D4757'%20fill-rule='nonzero'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-insert-row-col{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20stroke='%233D4757'%20d='M8.5%205.5h6v4h-6z'/%3e%3cpath%20fill='%233D4757'%20d='M4%207v1h2V7zm-3%20.5L4%205v5zM1%201h12v1H1zm0%2012h12v1H1z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-insert-top-row{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20fill='%233D4757'%20d='M8%205H7v3h1zm-.5-3L10%205H5z'/%3e%3crect%20stroke='%233D4757'%20x='1.5'%20y='10.5'%20width='12'%20height='3'%20rx='1'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-insert-bottom-row{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20fill='%233D4757'%20d='M7%2011h1V8H7zm.5%203L5%2011h5z'/%3e%3crect%20stroke='%233D4757'%20x='1.5'%20y='2.5'%20width='12'%20height='3'%20rx='1'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-insert-left-col{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20fill='%233D4757'%20d='M11%207v1h3V7zm-3%20.5L11%205v5z'/%3e%3crect%20stroke='%233D4757'%20transform='rotate(90%204%207.5)'%20x='-2'%20y='6'%20width='12'%20height='3'%20rx='1'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-insert-right-col{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20fill='%233D4757'%20d='M5%208V7H2v1zm3-.5L5%2010V5z'/%3e%3crect%20stroke='%233D4757'%20transform='rotate(90%2012%207.5)'%20x='6'%20y='6'%20width='12'%20height='3'%20rx='1'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-delete-row-col{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20stroke='%23929AA8'%20d='M8.5%206.5h6v2h-6z'/%3e%3cpath%20fill='%233D4757'%20d='M2%2012h11v1H2zM2%202h11v1H2zm.63%203L7%209.35l-.635.65L2%205.63z'/%3e%3cpath%20fill='%233D4757'%20d='M2%209.363L6.355%205%207%205.707%202.695%2010z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-delete-row{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20stroke='%23929AA8'%20d='M8.5%205.5h6v4h-6z'/%3e%3cpath%20fill='%233D4757'%20d='M1%2013h12v1H1zM1%201h12v1H1zm0%204h1v1H1zm1%201h1v1H2zm1%201h1v1H3zm1-1h1v1H4zm1-1h1v1H5zM4%208h1v1H4zM2%208h1v1H2zm3%201h1v1H5zM1%209h1v1H1z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-delete-col{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20stroke='%23929AA8'%20d='M5.5%207.5v-6h4v6z'/%3e%3cpath%20fill='%233D4757'%20d='M13%2015V3h1v12zM1%2015V3h1v12zm4%200v-1h1v1zm1-1v-1h1v1zm1-1v-1h1v1zm-1-1v-1h1v1zm-1-1v-1h1v1zm3%201v-1h1v1zm0%202v-1h1v1zm1-3v-1h1v1zm0%204v-1h1v1z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-delete-table{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M14%2013h-1v-3H2v3H1v-3a1%201%200%20011-1h11a1%201%200%20011%201v3z'%20fill-rule='nonzero'/%3e%3cpath%20d='M5.625%202L10%206.375%209.375%207%205%202.625z'/%3e%3cpath%20d='M5%206.375L9.375%202l.625.625L5.625%207z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-merge-cell{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M6%201v1H2v11h4v1H2a1%201%200%2001-1-1V2a1%201%200%20011-1h4zm3%200h4a1%201%200%20011%201v11a1%201%200%2001-1%201H9v-1h4V2H9V1z'/%3e%3cpath%20fill-rule='nonzero'%20d='M6%201h1v4H6zm2%200h1v4H8z'/%3e%3cpath%20d='M8%207.5L10%206v3zm-1%200L5%206v3z'/%3e%3cpath%20d='M9%207h3v1H9zM3%207h3v1H3z'/%3e%3cpath%20fill-rule='nonzero'%20d='M8%2010h1v4H8zm-2%200h1v4H6z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-merge-cancel-cell{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M6%201v1H2v11h4v1H2a1%201%200%2001-1-1V2a1%201%200%20011-1h4zm3%200h4a1%201%200%20011%201v11a1%201%200%2001-1%201H9v-1h4V2H9V1z'/%3e%3cpath%20fill-rule='nonzero'%20d='M6%201h1v4H6zm2%200h1v4H8z'/%3e%3cpath%20d='M3%207.5L5%206v3zm9%200L10%206v3z'/%3e%3cpath%20d='M4%207h3v1H4zm4%200h3v1H8z'/%3e%3cpath%20fill-rule='nonzero'%20d='M8%2010h1v4H8zm-2%200h1v4H6z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-vertical-align{background-image:url("data:image/svg+xml,%3csvg%20height='16'%20viewBox='0%200%2016%2016'%20width='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%2013h12v1H2zm0-3h8v1H2zm0-3h12v1H2zm0-6h12v1H2zm0%203h8v1H2z'%20fill='%233d4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.ce-contextmenu-vertical-align-top{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%208H7v6h1zm-.5-3L10%208H5zM2%203h11v1H2z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.ce-contextmenu-vertical-align-middle{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%2012H7v3h1zm-.5-3l2.5%203H5zM7%203h1V0H7zm.5%203L5%203h5zM2%207h11v1H2z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.ce-contextmenu-vertical-align-bottom{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7%209h1V3H7zm.5%203L5%209h5zM2%2013h11v1H2z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.ce-contextmenu-border-all{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%233D4757'/%3e%3cpath%20fill='%233D4757'%20d='M3%208h11v1H3z'/%3e%3cpath%20fill='%233D4757'%20d='M9%203v11H8V3z'/%3e%3c/svg%3e")}.ce-contextmenu-border-empty{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13%203h-1V2h1a1%201%200%20011%201v1h-1V3zm-3-1v1H8.5v2h-1V3H6V2h4zM4%202v1H3v1H2V3a1%201%200%20011-1h1zM2%206h1v1.5h2v1H3V10H2V6zm0%206h1v1h1v1H3a1%201%200%2001-1-1v-1zm4%202v-1h1.5v-2h1v2H10v1H6zm6%200v-1h1v-1h1v1a1%201%200%2001-1%201h-1zm2-4h-1V8.5h-2v-1h2V6h1v4zM8.5%207.5v-1h-1v1h-1v1h1v1h1v-1h1v-1h-1z'%20fill='%23AAACB0'/%3e%3c/svg%3e")}.ce-contextmenu-border-dash{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13%203h-1V2h1a1%201%200%20011%201v1h-1V3zm-3-1v1H8.5v2h-1V3H6V2h4zM4%202v1H3v1H2V3a1%201%200%20011-1h1zM2%206h1v1.5h2v1H3V10H2V6zm0%206h1v1h1v1H3a1%201%200%2001-1-1v-1zm4%202v-1h1.5v-2h1v2H10v1H6zm6%200v-1h1v-1h1v1a1%201%200%2001-1%201h-1zm2-4h-1V8.5h-2v-1h2V6h1v4zM8.5%207.5v-1h-1v1h-1v1h1v1h1v-1h1v-1h-1z'%20fill='%23000000'/%3e%3c/svg%3e")}.ce-contextmenu-border-external{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%233D4757'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9%205V3H8v2h1zm0%209v-2H8v2h1zM5%208H3v1h2V8zm9%200h-2v1h2V8zM9%207v1h1v1H9v1H8V9H7V8h1V7h1z'%20fill='%23AAACB0'/%3e%3c/svg%3e")}.ce-contextmenu-border-internal{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9%205V3H8v2h1zm0%209v-2H8v2h1zM5%208H3v1h2V8zm9%200h-2v1h2V8zM9%207v1h1v1H9v1H8V9H7V8h1V7h1z'%20fill='%233D4757'/%3e%3c/svg%3e")}.ce-contextmenu-border-td{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20stroke='%233D4757'%20d='M8.5%202.5%20v6%20h-6'/%3e%3c/svg%3e")}.ce-contextmenu-border-td-top{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20stroke='%233D4757'%20stroke-width='2'%20d='M2.5%203%20h12'/%3e%3c/svg%3e")}.ce-contextmenu-border-td-left{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20stroke='%233D4757'%20stroke-width='2'%20d='M3%203%20v11'/%3e%3c/svg%3e")}.ce-contextmenu-border-td-bottom{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20stroke='%233D4757'%20stroke-width='2'%20d='M2.5%2014%20h12'/%3e%3c/svg%3e")}.ce-contextmenu-border-td-right{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20stroke='%233D4757'%20stroke-width='2'%20d='M14%203%20v11'/%3e%3c/svg%3e")}.ce-contextmenu-border-td-forward{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'%20/%3e%3cpath%20stroke='%233D4757'%20d='M14%203%20l-11%2011'%20/%3e%3c/svg%3e")}.ce-contextmenu-border-td-back{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'%20/%3e%3cpath%20stroke='%233D4757'%20d='M3%203%20l11%2011'%20/%3e%3c/svg%3e")}.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:#dae7fc;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;-webkit-user-select: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{min-width:60px!important;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;-webkit-user-select:none;user-select:none;caret-color:transparent;background-color:transparent;white-space:pre}.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}.ce-button-input-modal{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;z-index:1000}.ce-button-input-modal__content{background:#fff;border-radius:8px;padding:20px;min-width:320px;max-width:480px;box-shadow:0 4px 20px #00000026}.ce-button-input-modal__title{font-size:14px;font-weight:500;color:#333;margin-bottom:12px}.ce-button-input-modal__textarea{width:100%;min-height:100px;padding:10px 12px;border:1px solid #dcdfe6;border-radius:4px;font-size:13px;line-height:1.5;resize:vertical;outline:none;box-sizing:border-box;font-family:inherit}.ce-button-input-modal__textarea:focus{border-color:#5175f4}.ce-button-input-modal__textarea::placeholder{color:#c0c4cc}.ce-button-input-modal__buttons{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.ce-button-input-modal__cancel,.ce-button-input-modal__confirm{padding:8px 16px;font-size:13px;border-radius:4px;cursor:pointer;border:1px solid #dcdfe6;background:#fff;color:#606266;transition:all .2s}.ce-button-input-modal__cancel:hover{color:#5175f4;border-color:#5175f4}.ce-button-input-modal__confirm{background:#5175f4;border-color:#5175f4;color:#fff}.ce-button-input-modal__confirm:hover{background:#409eff;border-color:#409eff}.ce-button-edit-modal{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;z-index:1000}.ce-button-edit-modal__content{background:#fff;border-radius:8px;padding:20px;min-width:320px;max-width:480px;box-shadow:0 4px 20px #00000026}.ce-button-edit-modal__title{font-size:14px;font-weight:500;color:#333;margin-bottom:16px}.ce-button-edit-modal__form{display:flex;flex-direction:column;gap:12px}.ce-button-edit-modal__field{display:flex;align-items:center;gap:8px}.ce-button-edit-modal__field label{min-width:80px;font-size:13px;color:#606266}.ce-button-edit-modal__field input{flex:1;padding:8px 12px;border:1px solid #dcdfe6;border-radius:4px;font-size:13px;outline:none;box-sizing:border-box}.ce-button-edit-modal__field input:focus{border-color:#5175f4}.ce-button-edit-modal__field input::placeholder{color:#c0c4cc}.ce-button-edit-modal__buttons{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.ce-button-edit-modal__cancel,.ce-button-edit-modal__confirm{padding:8px 16px;font-size:13px;border-radius:4px;cursor:pointer;border:1px solid #dcdfe6;background:#fff;color:#606266;transition:all .2s}.ce-button-edit-modal__cancel:hover{color:#5175f4;border-color:#5175f4}.ce-button-edit-modal__confirm{background:#5175f4;border-color:#5175f4;color:#fff}.ce-button-edit-modal__confirm:hover{background:#409eff;border-color:#409eff}.ce-number-input-modal{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;z-index:1000}.ce-number-input-modal__content{background:#fff;border-radius:8px;padding:20px;min-width:300px;max-width:400px;box-shadow:0 4px 20px #00000026}.ce-number-input-modal__title{font-size:14px;font-weight:500;color:#333;margin-bottom:12px}.ce-number-input-modal__hint{font-size:12px;color:#909399;margin-bottom:12px}.ce-number-input-modal__input{width:100%;padding:10px 12px;border:1px solid #dcdfe6;border-radius:4px;font-size:13px;outline:none;box-sizing:border-box}.ce-number-input-modal__input:focus{border-color:#5175f4}.ce-number-input-modal__input::placeholder{color:#c0c4cc}.ce-number-input-modal__error{font-size:12px;color:#f56c6c;margin-top:8px}.ce-number-input-modal__buttons{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.ce-number-input-modal__cancel,.ce-number-input-modal__confirm{padding:8px 16px;font-size:13px;border-radius:4px;cursor:pointer;border:1px solid #dcdfe6;background:#fff;color:#606266;transition:all .2s}.ce-number-input-modal__cancel:hover{color:#5175f4;border-color:#5175f4}.ce-number-input-modal__confirm{background:#5175f4;border-color:#5175f4;color:#fff}.ce-number-input-modal__confirm:hover{background:#409eff;border-color:#409eff}.tooth-position-edit-modal,.tooth-position-create-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1000}.tooth-position-modal__mask{position:absolute;top:0;left:0;width:100%;height:100%;background:#00000080}.tooth-position-modal__container{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:#fff;border-radius:8px;box-shadow:0 4px 12px #00000026;min-width:400px;max-width:90vw}.tooth-position-modal__header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #e8e8e8}.tooth-position-modal__header span{font-size:16px;font-weight:500;color:#333}.tooth-position-modal__close{font-size:20px;cursor:pointer;color:#999;line-height:1}.tooth-position-modal__close:hover{color:#333}.tooth-position-modal__content{padding:20px;max-height:60vh;overflow-y:auto}.tooth-section{margin-bottom:20px}.tooth-section:last-child{margin-bottom:0}.tooth-section-title{font-size:14px;font-weight:500;color:#333;margin-bottom:12px;padding-left:8px;border-left:3px solid #1890ff}.tooth-row{display:flex;align-items:center;margin-bottom:8px}.tooth-row:last-child{margin-bottom:0}.tooth-row-label{width:30px;font-size:13px;color:#666}.tooth-buttons{display:flex;gap:8px;flex-wrap:wrap}.letter-buttons{margin-left:30px}.tooth-checkbox{display:flex;align-items:center;cursor:pointer}.tooth-checkbox input{display:none}.tooth-checkbox span{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid #d9d9d9;border-radius:4px;background:#f5f5f5;font-size:14px;color:#333;transition:all .2s}.tooth-checkbox input:checked+span{background:#1890ff;border-color:#1890ff;color:#fff}.tooth-checkbox:hover span{border-color:#1890ff}.tooth-position-modal__footer{display:flex;justify-content:flex-end;gap:10px;padding:16px 20px;border-top:1px solid #e8e8e8}.tooth-position-modal__footer .btn-cancel,.tooth-position-modal__footer .btn-confirm{padding:8px 20px;font-size:14px;border-radius:4px;cursor:pointer;border:1px solid #dcdfe6;background:#fff;color:#606266;transition:all .2s}.tooth-position-modal__footer .btn-cancel:hover{color:#1890ff;border-color:#1890ff}.tooth-position-modal__footer .btn-confirm{background:#1890ff;border-color:#1890ff;color:#fff}.tooth-position-modal__footer .btn-confirm:hover{background:#40a9ff;border-color:#40a9ff}.tooth-grid-container{display:flex;flex-direction:column;align-items:center;padding:15px 20px;background:#fafafa;border-radius:8px;margin-bottom:15px;position:relative}.tooth-quick-buttons{display:flex;gap:6px;margin-bottom:16px}.tooth-quick-buttons-left{display:flex;flex-direction:column;gap:6px;flex:1}.tooth-quick-buttons-row{display:flex;gap:6px}.tooth-quick-btn{padding:6px 12px;font-size:12px;border:1px solid #d9d9d9;border-radius:4px;cursor:pointer;background:#fff;color:#333;transition:all .2s;white-space:nowrap}.tooth-quick-btn:hover{border-color:#1890ff;color:#1890ff}.tooth-quick-btn.selected{background:#0ff;border-color:#0ff;color:#fff}.tooth-quick-btn--clear{background:#ff6b6b;border-color:#ff6b6b;color:#fff}.tooth-quick-btn--clear:hover{background:#ff5252;border-color:#ff5252;color:#fff}.tooth-grid-container:before{content:"";position:absolute;left:50%;top:20px;bottom:20px;width:2px;background:#000;transform:translate(-50%);z-index:1}.tooth-grid-container:after{content:"";position:absolute;left:20px;right:20px;top:50%;height:2px;background:#000;transform:translateY(-50%);z-index:1}.tooth-grid-letter-row,.tooth-grid-number-row{display:flex;align-items:center;justify-content:center;position:relative;z-index:2}.tooth-grid-half{display:flex;align-items:center;justify-content:center;gap:4px}.tooth-grid-half.left{justify-content:flex-end;padding-right:15px}.tooth-grid-half.right{justify-content:flex-start;padding-left:15px}.tooth-grid-divider-v,.tooth-grid-divider-h{display:none}.tooth-grid-number-item{width:34px;height:32px;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:500;color:#333;cursor:pointer;background:#fff;transition:all .2s;box-sizing:border-box;border:1px solid #d9d9d9;border-radius:12px}.upper-number-row .tooth-grid-number-item{border-top:none;border-radius:0 0 12px 12px}.lower-number-row .tooth-grid-number-item{border-bottom:none;border-radius:12px 12px 0 0}.tooth-grid-number-item[data-value="1"],.tooth-grid-number-item[data-value="2"],.tooth-grid-number-item[data-value="3"]{border-radius:50px}.upper-number-row .tooth-grid-number-item[data-value="1"],.upper-number-row .tooth-grid-number-item[data-value="2"],.upper-number-row .tooth-grid-number-item[data-value="3"]{border-top:none!important;border-radius:0 0 50px 50px!important}.lower-number-row .tooth-grid-number-item[data-value="1"],.lower-number-row .tooth-grid-number-item[data-value="2"],.lower-number-row .tooth-grid-number-item[data-value="3"]{border-bottom:none!important;border-radius:50px 50px 0 0!important}.tooth-grid-number-item:hover{border-color:#1890ff;color:#1890ff}.tooth-grid-number-item.selected{background:#1890ff;border-color:#1890ff;color:#fff}.tooth-grid-letter-item{width:34px;height:32px;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:500;color:#333;cursor:pointer;background:#fff;border:1px solid #d9d9d9;transition:all .2s;box-sizing:border-box;border-radius:12px}.upper-letter-row .tooth-grid-letter-item{border-top:none;border-radius:0 0 12px 12px}.lower-letter-row .tooth-grid-letter-item{border-bottom:none;border-radius:12px 12px 0 0}.tooth-grid-letter-item[data-value=A],.tooth-grid-letter-item[data-value=B],.tooth-grid-letter-item[data-value=C]{border-radius:50px}.upper-letter-row .tooth-grid-letter-item[data-value=A],.upper-letter-row .tooth-grid-letter-item[data-value=B],.upper-letter-row .tooth-grid-letter-item[data-value=C]{border-top:none!important;border-radius:0 0 50px 50px!important}.lower-letter-row .tooth-grid-letter-item[data-value=A],.lower-letter-row .tooth-grid-letter-item[data-value=B],.lower-letter-row .tooth-grid-letter-item[data-value=C]{border-bottom:none!important;border-radius:50px 50px 0 0!important}.tooth-grid-letter-item:hover{border-color:#1890ff;color:#1890ff}.tooth-grid-letter-item.selected{background:#1890ff;border-color:#1890ff;color:#fff}.tooth-grid-letter-row.hidden,.tooth-grid-number-row.hidden{display:none}.tooth-grid-letter-row{margin-bottom:8px}.tooth-grid-number-row.upper-number-row{margin-bottom:15px}.tooth-grid-number-row.lower-number-row{margin-top:15px}.tooth-grid-letter-row.lower-letter-row{margin-top:8px}.tooth-preview-section{padding-top:10px;border-top:1px solid #e8e8e8}.tooth-preview-title{font-size:14px;font-weight:500;color:#333;margin-bottom:12px}.tooth-preview-wrapper{display:flex;gap:15px}.tooth-preview-container{display:flex;justify-content:center;align-items:center;padding:10px;background:#fafafa;border-radius:8px;flex:1;min-height:60px}.tooth-preview-grid{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:0;width:100%;min-height:70px;position:relative}.tooth-preview-grid:before{content:"";position:absolute;left:50%;top:0;bottom:0;width:1px;background:#000;transform:translate(-50%)}.tooth-preview-grid:after{content:"";position:absolute;top:50%;left:0;right:0;height:1px;background:#000;transform:translateY(-50%)}.tooth-preview-quadrant{display:flex;align-items:center;padding:5px 10px;font-size:12px;flex-wrap:wrap;gap:4px;justify-content:center}.tooth-preview-upper-left{justify-content:flex-end}.tooth-preview-upper-right{justify-content:flex-start}.tooth-preview-lower-left{justify-content:flex-end}.tooth-preview-lower-right{justify-content:flex-start}.tooth-preview-tooth{position:relative;display:inline;margin:0 4px}.tooth-preview-tooth-value{font-size:12px}.tooth-preview-tooth-value--deciduous{font-size:10px}.tooth-preview-tooth-bracket{font-size:12px}.tooth-preview-supernumerary{font-size:9px;vertical-align:super;margin:0 1px}.tooth-preview-surface{font-size:9px;vertical-align:super;margin-left:1px}.tooth-extra-panel{width:100px;display:flex;flex-direction:column;gap:10px}.tooth-surface-panel{background:#fafafa;border-radius:8px;padding:10px 20px}.tooth-surface-title{font-size:12px;font-weight:500;color:#333;margin-bottom:8px;text-align:center}.tooth-surface-grid{display:flex;flex-direction:column;gap:4px;align-items:center}.tooth-surface-row{display:flex;gap:4px;justify-content:center}.tooth-surface-item{width:30px;height:30px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:500;color:#333;cursor:pointer;background:#fff;border:1px dashed #d9d9d9;border-radius:5px;transition:all .2s;box-sizing:border-box}.tooth-surface-item--indent{margin-left:17px}.tooth-surface-item:hover{border-color:#1890ff;color:#1890ff}.tooth-surface-item.selected{background:#1890ff;border-color:#1890ff;border-style:solid;color:#fff}.tooth-supernumerary-panel{background:#fafafa;border-radius:8px;padding:10px 20px}.tooth-supernumerary-title{font-size:12px;font-weight:500;color:#333;margin-bottom:4px;text-align:center}.tooth-supernumerary-hint{font-size:10px;color:#999;font-weight:400}.tooth-supernumerary-grid{display:flex;gap:8px;justify-content:center;margin-top:8px}.tooth-supernumerary-item{width:30px;height:35px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:500;color:#333;cursor:pointer;background:#fff;border:1px solid #d9d9d9;border-bottom:none;border-radius:50px;transition:all .2s;box-sizing:border-box}.tooth-supernumerary-item:hover{border-color:#1890ff;color:#1890ff}.tooth-supernumerary-item.selected{background:#1890ff;border-color:#1890ff;color:#fff}.dialog-mask{position:fixed;left:0;top:0;width:100%;height:100%;opacity:.5;background:#000;z-index:99}.dialog-container{position:fixed;inset:0;overflow:auto;z-index:999;margin:0;display:flex;justify-content:center;align-items:center}.dialog{position:absolute;padding:0 30px 30px;background:#fff;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,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.9%208.192l4.242%204.243-.707.707L8.192%208.9%203.95%2013.142l-.707-.707%204.242-4.243L3.243%203.95l.707-.707%204.242%204.242%204.243-4.242.707.707L8.9%208.192z'%20fill='%236A6A6A'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.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;-webkit-user-select: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:#fff;line-height:22px;padding:0 16px;white-space:nowrap;cursor:pointer}.dialog-menu button:hover{background:#1937580a}.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}.dialog-radio-group{display:flex;flex-direction:column;gap:8px}.dialog-radio-group--horizontal{flex-direction:row;gap:16px}.dialog-radio-item{display:flex;align-items:center;cursor:pointer;font-size:14px;color:#3d4757}.dialog-radio-item input[type=radio]{width:16px;height:16px;margin:0 6px 0 0;cursor:pointer;appearance:auto}.dialog-radio-item span{margin:0}`)),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
(function(l,ve){typeof exports=="object"&&typeof module<"u"?ve(exports):typeof define=="function"&&define.amd?define(["exports"],ve):(l=typeof globalThis<"u"?globalThis:l||self,ve(l["canvas-editor"]={}))})(this,(function(l){"use strict";const ve="0.7.
|
|
3
|
-
`,To=" ",yi=" ",Ur=["·","、",":",":",",",",",".","。",";",";","?","?","!","!"],bi={[l.MaxHeightRatio.HALF]:1/2,[l.MaxHeightRatio.ONE_THIRD]:1/3,[l.MaxHeightRatio.QUARTER]:1/4},mo={ENGLISH:"A-Za-z",NUMBER:"0-9.$¥",SPANISH:"A-Za-zÁÉÍÓÚáéíóúÑñÜü",FRENCH:"A-Za-zÀÂÇàâçÉéÈèÊêËëÎîÏïÔôÙùÛûŸÿ",GERMAN:"A-Za-zÄäÖöÜüß",RUSSIAN:"А-Яа-яЁё",PORTUGUESE:"A-Za-zÁÉÍÓÚáéíóúÃÕãõÇç",ITALIAN:"A-Za-zÀàÈèÉéÌìÍíÎîÓóÒòÙù",DUTCH:"A-Za-zÀàÁáÂâÄäÈèÉéÊêËëÌìÍíÎîÏïÓóÒòÔôÖöÙùÛûÜü",SWEDISH:"A-Za-zÅåÄäÖö",GREEK:"ΑαΒβΓγΔδΕεΖζΗηΘθΙιΚκΛλΜμΝνΞξΟοΠπΡρΣσςΤτΥυΦφΧχΨψΩω"},wr="中";l.RowFlex=void 0,(function(o){o.LEFT="left",o.CENTER="center",o.RIGHT="right",o.ALIGNMENT="alignment",o.JUSTIFY="justify"})(l.RowFlex||(l.RowFlex={}));const po=/[0-9.]/,Zr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/,Qr=/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?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D83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,vr=new RegExp(`${Qr.source}|${Zr.source}`,"g"),Kr=/[、,。?!;:……「」“”‘’*()【】〔〕〖〗〘〙〚〛《》———﹝﹞–—\\/·.,!?;:`~<>()[\]{}'"|]/,Lo=new RegExp(`^[${_}
|
|
4
|
-
]`),
|
|
5
|
-
`)}function Zi(o,t,e=0){const n=Math.max(0,Math.floor(e));if(n>=o.length)return typeof t=="string"&&t===""?{index:o.length,length:0}:{index:-1,length:0};if(typeof t=="string"){if(t==="")return{index:n,length:0};const c=o.indexOf(t,n);return c===-1?{index:-1,length:0}:{index:c,length:t.length}}const i=t.flags,r=i.includes("g")?i:i+"g",s=new RegExp(t.source,r);s.lastIndex=n;const a=s.exec(o);return a?{index:a.index,length:a[0].length}:{index:-1,length:0}}function Qi(o,t){if(!t){o.scrollTop=0;return}const e=[];let n=t.offsetParent;for(;n&&o!==n&&o.contains(n);)e.push(n),n=n.offsetParent;const i=t.offsetTop+e.reduce((c,d)=>c+d.offsetTop,0),r=i+t.offsetHeight,s=o.scrollTop,a=s+o.clientHeight;i<s?o.scrollTop=i:r>a&&(o.scrollTop=r-o.clientHeight)}function Vt(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}function
|
|
2
|
+
(function(l,ve){typeof exports=="object"&&typeof module<"u"?ve(exports):typeof define=="function"&&define.amd?define(["exports"],ve):(l=typeof globalThis<"u"?globalThis:l||self,ve(l["canvas-editor"]={}))})(this,(function(l){"use strict";const ve="0.7.2";l.MaxHeightRatio=void 0,(function(o){o.HALF="half",o.ONE_THIRD="one-third",o.QUARTER="quarter"})(l.MaxHeightRatio||(l.MaxHeightRatio={})),l.NumberType=void 0,(function(o){o.ARABIC="arabic",o.CHINESE="chinese"})(l.NumberType||(l.NumberType={})),l.ImageDisplay=void 0,(function(o){o.INLINE="inline",o.BLOCK="block",o.SURROUND="surround",o.FLOAT_TOP="float-top",o.FLOAT_BOTTOM="float-bottom"})(l.ImageDisplay||(l.ImageDisplay={})),l.LocationPosition=void 0,(function(o){o.BEFORE="before",o.AFTER="after",o.OUTER_BEFORE="outer-before",o.OUTER_AFTER="outer-after"})(l.LocationPosition||(l.LocationPosition={})),l.FlexDirection=void 0,(function(o){o.ROW="row",o.COLUMN="column"})(l.FlexDirection||(l.FlexDirection={}));const _="",Fi=`
|
|
3
|
+
`,To=" ",yi=" ",Zr=["·","、",":",":",",",",",".","。",";",";","?","?","!","!"],bi={[l.MaxHeightRatio.HALF]:1/2,[l.MaxHeightRatio.ONE_THIRD]:1/3,[l.MaxHeightRatio.QUARTER]:1/4},mo={ENGLISH:"A-Za-z",NUMBER:"0-9.$¥",SPANISH:"A-Za-zÁÉÍÓÚáéíóúÑñÜü",FRENCH:"A-Za-zÀÂÇàâçÉéÈèÊêËëÎîÏïÔôÙùÛûŸÿ",GERMAN:"A-Za-zÄäÖöÜüß",RUSSIAN:"А-Яа-яЁё",PORTUGUESE:"A-Za-zÁÉÍÓÚáéíóúÃÕãõÇç",ITALIAN:"A-Za-zÀàÈèÉéÌìÍíÎîÓóÒòÙù",DUTCH:"A-Za-zÀàÁáÂâÄäÈèÉéÊêËëÌìÍíÎîÏïÓóÒòÔôÖöÙùÛûÜü",SWEDISH:"A-Za-zÅåÄäÖö",GREEK:"ΑαΒβΓγΔδΕεΖζΗηΘθΙιΚκΛλΜμΝνΞξΟοΠπΡρΣσςΤτΥυΦφΧχΨψΩω"},Qr="中";l.RowFlex=void 0,(function(o){o.LEFT="left",o.CENTER="center",o.RIGHT="right",o.ALIGNMENT="alignment",o.JUSTIFY="justify"})(l.RowFlex||(l.RowFlex={}));const po=/[0-9.]/,vr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/,Kr=/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B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83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,Hr=new RegExp(`${Kr.source}|${vr.source}`,"g"),_r=/[、,。?!;:……「」“”‘’*()【】〔〕〖〗〘〙〚〛《》———﹝﹞–—\\/·.,!?;:`~<>()[\]{}'"|]/,Lo=new RegExp(`^[${_}
|
|
4
|
+
]`),xr=/[^0-9\+\-\.eE,]/,Gr=/\s/;function Ar(o,t){let e;return function(...n){e&&window.clearTimeout(e),e=window.setTimeout(()=>{o.apply(this,n)},t)}}function kr(o,t){let e=0,n;return function(...i){const r=Date.now();r-e>=t?(window.clearTimeout(n),o.apply(this,i),e=r):(window.clearTimeout(n),n=window.setTimeout(()=>{o.apply(this,i),e=r},t))}}function Io(o,t){if(!o||typeof o!="object")return o;let e={};return Array.isArray(o)?e=o.map(n=>Io(n,t)):Object.keys(o).forEach(n=>{t.includes(n)||(e[n]=Io(o[n],t))}),e}function at(o){if(typeof structuredClone=="function")return structuredClone(o);if(!o||typeof o!="object")return o;let t={};return Array.isArray(o)?t=o.map(e=>at(e)):Object.keys(o).forEach(e=>{t[e]=at(o[e])}),t}function Po(o){return o&&o.nodeType===1&&o.tagName.toLowerCase()==="body"}function Wi(o,t,e){if(o&&!Po(o))for(o=o;o;){if(!t||t(o)||Po(o))return t&&!t(o)&&Po(o)?null:o;o=o.parentNode}return null}function lt(){function o(){return((1+Math.random())*65536|0).toString(16).substring(1)}return o()+o()+"-"+o()+"-"+o()+"-"+o()+"-"+o()+o()+o()}function ct(o){const t=[];if(Intl.Segmenter){const n=new Intl.Segmenter().segment(o);for(const{segment:i}of n)t.push(i)}else{const e=new Map;for(const i of o.matchAll(Hr))e.set(i.index,i[0]);let n=0;for(;n<o.length;){const i=e.get(n);i?(t.push(i),n+=i.length):(t.push(o[n]),n++)}}return t}function Vi(o,t){const e=document.createElement("a");e.href=o,e.download=t,e.click()}function Jr(o,t){Br(3,o,t)}function Br(o,t,e){let n=0,i=0;const r=function(s){n=new Date().getTime()-i<300?n+1:0,i=new Date().getTime(),n>=o-1&&(e(s),n=0)};t.addEventListener("click",r)}function wn(o){return Object.prototype.toString.call(o)==="[object Object]"}function Mo(o){return Array.isArray(o)}function Oo(o){return Object.prototype.toString.call(o)==="[object Number]"}function $r(o){return Object.prototype.toString.call(o)==="[object String]"}function Yi(o,t){if(wn(o)&&wn(t)){const e=t;for(const[n,i]of Object.entries(o))e[n]?e[n]=Yi(i,e[n]):e[n]=i}else Mo(o)&&Mo(t)&&t.push(...o);return t}function Co(o){if(typeof queueMicrotask=="function"){queueMicrotask(()=>{o()});return}if(typeof Promise<"u"){Promise.resolve().then(()=>{o()});return}setTimeout(()=>{o()},0)}function zr(o){const t=["零","一","二","三","四","五","六","七","八","九"],e=["","十","百","千","万","十","百","千","亿","十","百","千","万","十","百","千","亿"];if(!o||isNaN(o))return"零";const n=o.toString().split("");let i="";for(let r=0;r<n.length;r++){const s=n.length-1-r;i=`${e[r]}${i}`,i=`${t[Number(n[s])]}${i}`}return i=i.replace(/零(千|百|十)/g,"零").replace(/十零/g,"十"),i=i.replace(/零+/g,"零"),i=i.replace(/零亿/g,"亿").replace(/零万/g,"万"),i=i.replace(/亿万/g,"亿"),i=i.replace(/零+$/,""),i=i.replace(/^一十/g,"十"),i}function De(o,t,e){for(let n=0;n<o.length;n++){const i=o[n],r=t[i];r!==void 0?e[i]=r:delete e[i]}}function Di(o,t){if(!(!t.length||!o.length))for(let e=o.length-1;e>=0;e--)t.includes(o[e])&&o.splice(e,1)}function Dt(o,t){const e={};for(const n in o)t.includes(n)&&(e[n]=o[n]);return e}function se(o,t){const e={};for(const n in o)t.includes(n)||(e[n]=o[n]);return e}function jr(o){const e=new TextEncoder().encode(o),n=Array.from(e,r=>String.fromCharCode(r));return window.btoa(n.join(""))}function qr(o){let t=o.parentElement;for(;t;){const n=window.getComputedStyle(t).getPropertyValue("overflow-y");if(t.scrollHeight>t.clientHeight&&(n==="auto"||n==="scroll"))return t;t=t.parentElement}return document.documentElement}function Ui(o,t){return o.length!==t.length?!1:!o.some(e=>!t.includes(e))}function tl(o,t){if(!wn(o)||!wn(t))return!1;const e=Object.keys(o),n=Object.keys(t);return e.length!==n.length?!1:!e.some(i=>t[i]!==o[i])}function el(o,t){const e=o.x,n=o.x+o.width,i=o.y,r=o.y+o.height,s=t.x,a=t.x+t.width,c=t.y,d=t.y+t.height;return!(e>a||n<s||i>d||r<c)}function wi(o){return o==null}function Zn(o){return o.replace(/\r\n|\r/g,`
|
|
5
|
+
`)}function Zi(o,t,e=0){const n=Math.max(0,Math.floor(e));if(n>=o.length)return typeof t=="string"&&t===""?{index:o.length,length:0}:{index:-1,length:0};if(typeof t=="string"){if(t==="")return{index:n,length:0};const c=o.indexOf(t,n);return c===-1?{index:-1,length:0}:{index:c,length:t.length}}const i=t.flags,r=i.includes("g")?i:i+"g",s=new RegExp(t.source,r);s.lastIndex=n;const a=s.exec(o);return a?{index:a.index,length:a[0].length}:{index:-1,length:0}}function Qi(o,t){if(!t){o.scrollTop=0;return}const e=[];let n=t.offsetParent;for(;n&&o!==n&&o.contains(n);)e.push(n),n=n.offsetParent;const i=t.offsetTop+e.reduce((c,d)=>c+d.offsetTop,0),r=i+t.offsetHeight,s=o.scrollTop,a=s+o.clientHeight;i<s?o.scrollTop=i:r>a&&(o.scrollTop=r-o.clientHeight)}function Vt(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}function nl(o,t){return o.performance.enabled&&t>=o.performance.threshold}function So(o,t,e,n=[],i){if(!nl(o,e))return;const r={duration:Number(e.toFixed(2)),breakdown:n.map(s=>({label:s.label,duration:Number(s.duration.toFixed(2))})),...i};console.log(`[canvas-editor perf] ${t}`,r)}const ol=12,il={width:1,color:"#000000",dragWidth:2,dragColor:"#0000FF",dragFloatImageDisabled:!1},ue="editor-component",z="ce",Ln=`${z}-clipboard`,Eo={print:{imagePreviewerDisabled:!1,backgroundDisabled:!1},readonly:{imagePreviewerDisabled:!1},form:{controlDeletableDisabled:!1,inputTraceEnabled:!0,deleteTraceEnabled:!0}};var Ut;(function(o){o.UP="top",o.DOWN="down",o.LEFT="left",o.RIGHT="right"})(Ut||(Ut={}));const Ke=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),sl=typeof navigator<"u"&&/iPad|iPhone/.test(navigator.userAgent),rl=/Mobile|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),ll=typeof navigator<"u"&&/Firefox/.test(navigator.userAgent);l.ElementType=void 0,(function(o){o.TEXT="text",o.TEXTFIELD="TextField",o.BUTTON="button",o.IMAGE="image",o.TABLE="table",o.HYPERLINK="hyperlink",o.SUPERSCRIPT="superscript",o.SUBSCRIPT="subscript",o.SEPARATOR="separator",o.PAGE_BREAK="pageBreak",o.CONTROL="control",o.AREA="area",o.CHECKBOX="checkbox",o.RADIO="radio",o.LATEX="latex",o.TAB="tab",o.DATE="date",o.BLOCK="block",o.TITLE="title",o.LIST="list",o.SPLIT_TAG="splitTag",o.LABEL="label",o.MENSTRUAL_HISTORY="menstrualHistory",o.FETAL_HEART_POSITION="fetalHeartPosition",o.TOOTH_POSITION="toothPosition",o.SPECIAL_SYMBOLS="specialSymbols",o.MACRO="macro",o.CUSTOM_MACRO="customMacro",o.REUSABLE_ITEM="reusableItem",o.SUB_TEMPLATE="subTemplate"})(l.ElementType||(l.ElementType={}));const Re=["bold","color","highlight","font","size","italic","underline","strikeout","textDecoration","deletePerson","newElEditPerson","deleteTime","newElEditTime"],$t=["rowFlex","rowMargin"],al=["type","font","size","bold","color","italic","highlight","underline","strikeout","rowFlex","url","areaId","hyperlinkId","dateId","dateFormat","groupIds","templateId","subTemplateContent","subTemplateRelation","subTemplateConditions","rowMargin","textDecoration","deletePerson","newElEditPerson","deleteTime","newElEditTime"],cl=["type","font","size","bold","color","italic","highlight","underline","strikeout","rowFlex","rowMargin","dashArray","trList","tdPadding","tableToolDisabled","borderType","borderColor","borderWidth","borderExternalWidth","translateX","width","height","url","colgroup","valueList","control","checkbox","radio","dateFormat","block","level","title","listType","listStyle","listWrap","groupIds","conceptId","imgDisplay","imgFloatPosition","imgToolDisabled","imgPreviewDisabled","imgCrop","imgCaption","textDecoration","extension","externalId","areaId","area","hide","label","labelId","lineWidth","deletePerson","newElEditPerson","deleteTime","newElEditTime","dictCode","macroConfig","menstrualData","menstrualHistoryId","fetalHeartData","fetalHeartPositionId","toothPositionData","toothPositionId","reusableItemConfig","templateId","subTemplateContent","subTemplateRelation","subTemplateConditions","subTemplateExpanded"],dl=["conceptId","extension","externalId","verticalAlign","backgroundColor","borderTypes","slashTypes","disabled","deletable"],je=["tdId","trId","tableId"],Xo=["level","titleId","title"],In=["listId","listType","listStyle"],No=["control","controlId","controlComponent"],At=["font","size","bold","highlight","italic","strikeout","deletePerson","newElEditPerson","deleteTime","color","newElEditTime"],He=["areaId","area"],Fo=[...je,...Xo,...In,...He],zt=[l.ElementType.TEXT,l.ElementType.HYPERLINK,l.ElementType.SUBSCRIPT,l.ElementType.SUPERSCRIPT,l.ElementType.CONTROL,l.ElementType.DATE],ul=[l.ElementType.IMAGE,l.ElementType.LATEX],Rl=[l.ElementType.BLOCK,l.ElementType.PAGE_BREAK,l.ElementType.SEPARATOR,l.ElementType.TABLE],hl=["HR","TABLE","UL","OL"],gl=[l.ElementType.TITLE,l.ElementType.LIST];class qe{static sandbox=["allow-scripts","allow-same-origin"];static allow=["fullscreen"];element;constructor(t){this.element=t}_defineIframeProperties(t){Object.defineProperties(t,{parent:{get:()=>null},__POWERED_BY_CANVAS_EDITOR__:{get:()=>!0}})}render(t){const{iframeBlock:e}=this.element.block||{},n=document.createElement("iframe");n.setAttribute("data-id",this.element.id),n.sandbox.add(...e?.sandbox||qe.sandbox),n.setAttribute("allow",[e?.allow||qe.allow].join(" ")),n.style.border="none",n.style.width="100%",n.style.height="100%",e?.src?n.src=e.src:e?.srcdoc&&(n.srcdoc=e.srcdoc),t.append(n),this._defineIframeProperties(n.contentWindow)}}class vi{draw;options;imageCache;container;floatImageContainer;floatImage;constructor(t){this.draw=t,this.options=t.getOptions(),this.container=t.getContainer(),this.imageCache=new Map,this.floatImageContainer=null,this.floatImage=null}getOriginalMainImageList(){const t=[],e=n=>{for(const i of n)if(i.type===l.ElementType.TABLE){const r=i.trList;for(let s=0;s<r.length;s++){const a=r[s];for(let c=0;c<a.tdList.length;c++){const d=a.tdList[c];e(d.value)}}}else i.type===l.ElementType.IMAGE&&t.push(i)};return e(this.draw.getOriginalMainElementList()),t}_countImagesBeforeTarget(t,e){let n=0;for(const i of t){if(i===e)break;if(i.type===l.ElementType.TABLE){const r=i.trList;for(const s of r)for(const a of s.tdList)n+=this._countImagesBeforeTarget(a.value,e)}else i.type===l.ElementType.IMAGE&&n++}return n}createFloatImage(t){const{scale:e}=this.options;let n=this.floatImageContainer,i=this.floatImage;n||(n=document.createElement("div"),n.classList.add(`${z}-float-image`),this.container.append(n),this.floatImageContainer=n),i||(i=document.createElement("img"),n.append(i),this.floatImage=i),n.style.display="none",i.style.width=`${t.width*e}px`,i.style.height=`${t.height*e}px`;const r=this.draw.getHeight(),s=this.draw.getPageGap(),a=this.draw.getPageNo()*(r+s),c=t.imgFloatPosition;n.style.left=`${c.x*e}px`,n.style.top=`${a+c.y*e}px`,i.src=t.value}dragFloatImage(t,e){if(!this.floatImageContainer)return;this.floatImageContainer.style.display="block";const n=parseFloat(this.floatImageContainer.style.left)+t,i=parseFloat(this.floatImageContainer.style.top)+e;this.floatImageContainer.style.left=`${n}px`,this.floatImageContainer.style.top=`${i}px`}destroyFloatImage(){this.floatImageContainer&&(this.floatImageContainer.style.display="none")}addImageObserver(t){this.draw.getImageObserver().add(t)}getFallbackImage(t,e){const i=(t-Math.ceil(t/8)*8)/2,r=(e-Math.ceil(e/8)*8)/2,s=`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${e}" viewBox="0 0 ${t} ${e}">
|
|
6
6
|
<rect width="${t}" height="${e}" fill="url(#mosaic)" />
|
|
7
7
|
<defs>
|
|
8
8
|
<pattern id="mosaic" x="${i}" y="${r}" width="16" height="16" patternUnits="userSpaceOnUse">
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<rect width="8" height="8" fill="#cccccc" transform="translate(8, 8)" />
|
|
11
11
|
</pattern>
|
|
12
12
|
</defs>
|
|
13
|
-
</svg>`,a=new Image;return a.src=`data:image/svg+xml;base64,${$r(s)}`,a}_drawImageWithCrop(t,e,n,i,r,s,a){if(n.imgCrop){const{x:c,y:d,width:u,height:R}=n.imgCrop;t.drawImage(e,c,d,u,R,i,r,s,a)}else t.drawImage(e,i,r,s,a)}_renderCaption(t,e,n,i,r,s){if(!e.imgCaption?.value)return;const{scale:a,imgCaption:c}=this.options;let d=e.imgCaption.value;if(d.includes("{imageNo}")){const I=this.draw.getOriginalMainElementList(),L=this._countImagesBeforeTarget(I,e)+1;d=d.replace(/\{imageNo\}/g,String(L))}const u=(e.imgCaption.size||c.size)*a,R=e.imgCaption.font||c.font,h=e.imgCaption.color||c.color;t.save(),t.font=`${u}px ${R}`,t.fillStyle=h,t.textAlign="center";let g=d;const f=t.measureText(d);if(f.width>r){let I=0,L=d.length;for(;I<L;){const P=Math.ceil((I+L)/2),C=d.substring(0,P);t.measureText(C+"...").width<=r?I=P:L=P-1}g=d.substring(0,I)+"..."}const T=(e.imgCaption.top??c.top)*a,m=i+s+T+f.actualBoundingBoxAscent,p=n+r/2;t.fillText(g,p,m),t.restore()}render(t,e,n,i){const{scale:r}=this.options,s=e.width*r,a=e.height*r;if(this.imageCache.has(e.value)){const c=this.imageCache.get(e.value);this._drawImageWithCrop(t,c,e,n,i,s,a),this._renderCaption(t,e,n,i,s,a)}else{const c=this.draw.getRenderCount(),d=new Promise((u,R)=>{const h=new Image;h.setAttribute("crossOrigin","Anonymous"),h.src=e.value,h.onload=()=>{this.imageCache.set(e.value,h),u(e),c===this.draw.getRenderCount()&&(e.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM?this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1}):(this._drawImageWithCrop(t,h,e,n,i,s,a),this._renderCaption(t,e,n,i,s,a)))},h.onerror=g=>{const f=this.getFallbackImage(s,a);f.onload=()=>{this._drawImageWithCrop(t,f,e,n,i,s,a),this.imageCache.set(e.value,f),this._renderCaption(t,e,n,i,s,a)},R(g)}});this.addImageObserver(d)}}}const Qn=82;function qe(o){return yo[o]==null&&hl(o),yo[o]}function hl(o){const t=gl[o];if(t==null)return;const e=t.substring(3,5),n=1*e.charCodeAt(0)-Qn,i=1*e.charCodeAt(1)-Qn,r=t.substring(5),s=[[]];let a=1/0,c=-1/0,d=1/0,u=-1/0,R=0;for(;R<r.length;){const h=r.substring(R,R+2);if(h==" R")s.push([]);else{const g=h.charCodeAt(0)-Qn-n,f=h.charCodeAt(1)-Qn;a=Math.min(f,a),c=Math.max(f,c),d=Math.min(g,d),u=Math.max(g,u),s[s.length-1].push([g,f])}R+=2}yo[o]={w:i-n,xmin:d,xmax:u,ymin:a,ymax:c,polylines:s}}const yo={},gl={1:" 9MWRMNV RRMVV RPSTS",2:" 16MWOMOV ROMSMUNUPSQ ROQSQURUUSVOV",3:" 11MXVNTMRMPNOPOSPURVTVVU",4:" 12MWOMOV ROMRMTNUPUSTURVOV",5:" 12MWOMOV ROMUM ROQSQ ROVUV",6:" 9MVOMOV ROMUM ROQSQ",7:" 15MXVNTMRMPNOPOSPURVTVVUVR RSRVR",8:" 9MWOMOV RUMUV ROQUQ",9:" 3PTRMRV",10:" 7NUSMSTRVPVOTOS",11:" 9MWOMOV RUMOS RQQUV",12:" 6MVOMOV ROVUV",13:" 12LXNMNV RNMRV RVMRV RVMVV",14:" 9MWOMOV ROMUV RUMUV",15:" 14MXRMPNOPOSPURVSVUUVSVPUNSMRM",16:" 10MWOMOV ROMSMUNUQSROR",17:" 17MXRMPNOPOSPURVSVUUVSVPUNSMRM RSTVW",18:" 13MWOMOV ROMSMUNUQSROR RRRUV",19:" 13MWUNSMQMONOOPPTRUSUUSVQVOU",20:" 6MWRMRV RNMVM",21:" 9MXOMOSPURVSVUUVSVM",22:" 6MWNMRV RVMRV",23:" 12LXNMPV RRMPV RRMTV RVMTV",24:" 6MWOMUV RUMOV",25:" 7MWNMRQRV RVMRQ",26:" 9MWUMOV ROMUM ROVUV",27:" 9MWRMNV RRMVV RPSTS",28:" 16MWOMOV ROMSMUNUPSQ ROQSQURUUSVOV",29:" 6MVOMOV ROMUM",30:" 9MWRMNV RRMVV RNVVV",31:" 12MWOMOV ROMUM ROQSQ ROVUV",32:" 9MWUMOV ROMUM ROVUV",33:" 9MWOMOV RUMUV ROQUQ",34:" 20MXRMPNOPOSPURVSVUUVSVPUNSMRM RQQTR RTQQR",35:" 3PTRMRV",36:" 9MWOMOV RUMOS RQQUV",37:" 6MWRMNV RRMVV",38:" 12LXNMNV RNMRV RVMRV RVMVV",39:" 9MWOMOV ROMUV RUMUV",40:" 12MWOMUM RPQTR RTQPR ROVUV",41:" 14MXRMPNOPOSPURVSVUUVSVPUNSMRM",42:" 9MWOMOV RUMUV ROMUM",43:" 10MWOMOV ROMSMUNUQSROR",44:" 10MWOMRQOV ROMUM ROVUV",45:" 6MWRMRV RNMVM",46:" 15MWNONNOMPMQNRPRV RVOVNUMTMSNRP",47:" 13LXRMRV RPONPNSPTTTVSVPTOPO",48:" 6MWOMUV RUMOV",49:" 12LXRMRV RNOOPOSQTSTUSUPVO",50:" 13MXOVQVOROPPNRMSMUNVPVRTVVV",200:" 12MWRMPNOPOSPURVTUUSUPTNRM",201:" 4MWPORMRV",202:" 9MWONQMSMUNUPTROVUV",203:" 15MWONQMSMUNUPSQ RRQSQURUUSVQVOU",204:" 7MWSMSV RSMNSVS",205:" 14MWPMOQQPRPTQUSTURVQVOU RPMTM",206:" 14MWTMRMPNOPOSPURVTUUSTQRPPQOS",207:" 6MWUMQV ROMUM",208:" 19MWQMONOPQQSQUPUNSMQM RQQOROUQVSVUUURSQ",209:" 14MWUPTRRSPROPPNRMTNUPUSTURVPV",210:" 6PURURVSVSURU",211:" 7PUSVRVRUSUSWRY",212:" 12PURPRQSQSPRP RRURVSVSURU",213:" 13PURPRQSQSPRP RSVRVRUSUSWRY",214:" 12PURMRR RSMSR RRURVSVSURU",215:" 17NWPNRMSMUNUPRQRRSRSQUP RRURVSVSURU",216:" 3PTRMRQ",217:" 6NVPMPQ RTMTQ",218:" 10NVQMPNPPQQSQTPTNSMQM",219:" 16MWUNSMQMONOPQQTRUSUUSVQVOU RRLRW",220:" 3MWVLNW",221:" 7OVTLRNQPQSRUTW",222:" 7NUPLRNSPSSRUPW",223:" 3PTRLRW",224:" 3LXNRVR",225:" 6LXRNRV RNRVR",226:" 6LXNPVP RNTVT",227:" 6MWOOUU RUOOU",228:" 9MWRORU ROPUT RUPOT",229:" 6PURQRRSRSQRQ",230:" 7PUSMRORQSQSPRP",231:" 7PUSNRNRMSMSORQ",232:" 7LXSOVRSU RNRVR",233:" 12MXRLPW RULSW ROPVP ROSVS",234:" 21LXVRURTSSURVOVNUNSORRQSPSNRMPMONOPQSSUUVVV",235:" 20LXNNOQOSNV RVNUQUSVV RNNQOSOVN RNVQUSUVV",501:" 9I[RFJ[ RRFZ[ RMTWT",502:" 24G\\KFK[ RKFTFWGXHYJYLXNWOTP RKPTPWQXRYTYWXYWZT[K[",503:" 19H]ZKYIWGUFQFOGMILKKNKSLVMXOZQ[U[WZYXZV",504:" 16G\\KFK[ RKFRFUGWIXKYNYSXVWXUZR[K[",505:" 12H[LFL[ RLFYF RLPTP RL[Y[",506:" 9HZLFL[ RLFYF RLPTP",507:" 23H]ZKYIWGUFQFOGMILKKNKSLVMXOZQ[U[WZYXZVZS RUSZS",508:" 9G]KFK[ RYFY[ RKPYP",509:" 3NVRFR[",510:" 11JZVFVVUYTZR[P[NZMYLVLT",511:" 9G\\KFK[ RYFKT RPOY[",512:" 6HYLFL[ RL[X[",513:" 12F^JFJ[ RJFR[ RZFR[ RZFZ[",514:" 9G]KFK[ RKFY[ RYFY[",515:" 22G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF",516:" 14G\\KFK[ RKFTFWGXHYJYMXOWPTQKQ",517:" 25G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF RSWY]",518:" 17G\\KFK[ RKFTFWGXHYJYLXNWOTPKP RRPY[",519:" 21H\\YIWGTFPFMGKIKKLMMNOOUQWRXSYUYXWZT[P[MZKX",520:" 6JZRFR[ RKFYF",521:" 11G]KFKULXNZQ[S[VZXXYUYF",522:" 6I[JFR[ RZFR[",523:" 12F^HFM[ RRFM[ RRFW[ R\\FW[",524:" 6H\\KFY[ RYFK[",525:" 7I[JFRPR[ RZFRP",526:" 9H\\YFK[ RKFYF RK[Y[",527:" 9I[RFJ[ RRFZ[ RMTWT",528:" 24G\\KFK[ RKFTFWGXHYJYLXNWOTP RKPTPWQXRYTYWXYWZT[K[",529:" 6HYLFL[ RLFXF",530:" 9I[RFJ[ RRFZ[ RJ[Z[",531:" 12H[LFL[ RLFYF RLPTP RL[Y[",532:" 9H\\YFK[ RKFYF RK[Y[",533:" 9G]KFK[ RYFY[ RKP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573:" 25C_HMFLEJEIFGHFIFKGLILLK[ RUFK[ RUFS[ RaF_G\\JYNVTS[",574:" 36F^NLLLKKKILGNFPFRGSISLQUQXRZT[V[XZYXYVXUVU R]I]G\\FZFXGVITLPUNXLZJ[H[GZGX",575:" 38F]KMILHJHIIGKFLFNGOIOKNOMRLVLXMZN[P[RZTXVUWSYM R[FYMVWT]RbPfNgMfMdNaP^S[VY[V",576:" 40H]ULTNSOQPOPNNNLOIQGTFWFYGZIZMYPWTTWPZN[K[JZJXKWNWPXQYR[R^QaPcNfLgKfKdLaN^Q[TYZV",583:" 9I[JFR[ RZFR[ RJFZF",601:" 18I\\XMX[ RXPVNTMQMONMPLSLUMXOZQ[T[VZXX",602:" 18H[LFL[ RLPNNPMSMUNWPXSXUWXUZS[P[NZLX",603:" 15I[XPVNTMQMONMPLSLUMXOZQ[T[VZXX",604:" 18I\\XFX[ RXPVNTMQMONMPLSLUMXOZQ[T[VZXX",605:" 18I[LSXSXQWOVNTMQMONMPLSLUMXOZQ[T[VZXX",606:" 9MYWFUFSGRJR[ ROMVM",607:" 23I\\XMX]W`VaTbQbOa RXPVNTMQMONMPLSLUMXOZQ[T[VZXX",608:" 11I\\MFM[ RMQPNRMUMWNXQX[",609:" 9NVQFRGSFREQF RRMR[",610:" 12MWRFSGTFSERF RSMS^RaPbNb",611:" 9IZMFM[ RWMMW RQSX[",612:" 3NVRFR[",613:" 19CaGMG[ RGQJNLMOMQNRQR[ RRQUNWMZM\\N]Q][",614:" 11I\\MMM[ RMQPNRMUMWNXQX[",615:" 18I\\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM",616:" 18H[LMLb RLPNNPMSMUNWPXSXUWXUZS[P[NZLX",617:" 18I\\XMXb RXPVNTMQMONMPLSLUMXOZQ[T[VZXX",618:" 9KXOMO[ ROSPPRNTMWM",619:" 18J[XPWNTMQMNNMPNRPSUTWUXWXXWZT[Q[NZMX",620:" 9MYRFRWSZU[W[ ROMVM",621:" 11I\\MMMWNZP[S[UZXW RXMX[",622:" 6JZLMR[ RXMR[",623:" 12G]JMN[ RRMN[ RRMV[ RZMV[",624:" 6J[MMX[ RXMM[",625:" 10JZLMR[ RXMR[P_NaLbKb",626:" 9J[XMM[ RMMXM RM[X[",627:" 24H]QMONMPLRKUKXLZN[P[RZUWWTYPZM RQMSMTNUPWXXZY[Z[",628:" 31I\\UFSGQIOMNPMTLZKb RUFWFYHYKXMWNUORO RROTPVRWTWWVYUZS[Q[OZNYMV",629:" 17I\\JPLNNMOMQNROSRSVR[ RZMYPXRR[P_Ob",630:" 24I[TMQMONMPLSLVMYNZP[R[TZVXWUWRVOTMRKQIQGRFTFVGXI",631:" 19JZWOVNTMQMONOPPRSS RSSOTMVMXNZP[S[UZWX",632:" 23JYTFRGQHQIRJUKXK RXKTMQONRMUMWNYP[S]T_TaSbQbP`",633:" 19H\\IQJOLMNMONOPNTL[ RNTPPRNTMVMXOXRWWTb",634:" 27G\\HQIOKMMMNNNPMUMXNZO[Q[SZUWVUWRXMXJWGUFSFRHRJSMUPWRZT",635:" 9LWRMPTOXOZP[R[TYUW",636:" 19I[OMK[ RYNXMWMUNQROSNS RNSPTQUSZT[U[VZ",637:" 9JZKFMFOGPHX[ RRML[",638:" 21H]OMIb RNQMVMYO[Q[SZUXWT RYMWTVXVZW[Y[[Y\\W",639:" 14I[LMOMNSMXL[ RYMXPWRUURXOZL[",640:" 29JZTFRGQHQIRJUKXK RUKRLPMOOOQQSTTVT RTTPUNVMXMZO\\S^T_TaRbPb",641:" 18J[RMPNNPMSMVNYOZQ[S[UZWXXUXRWOVNTMRM",642:" 13G]PML[ RUMVSWXX[ RIPKNNM[M",643:" 19I[MSMVNYOZQ[S[UZWXXUXRWOVNTMRMPNNPMSIb",644:" 18I][MQMONMPLSLVMYNZP[R[TZVXWUWRVOUNSM",645:" 8H\\SMP[ RJPLNOMZM",646:" 16H\\IQJOLMNMONOPMVMYO[Q[TZVXXTYPYM",647:" 21G]ONMOKQJTJWKYLZN[Q[T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ZT[P[MZLYKWKTLRNPQOUNWMXKXIWGTFPF",709:" 24H\\XMWPURRSQSNRLPKMKLLINGQFRFUGWIXMXRWWUZR[P[MZLX",710:" 6MWRYQZR[SZRY",711:" 9MWSZR[QZRYSZS\\R^Q_",712:" 12MWRMQNROSNRM RRYQZR[SZRY",713:" 15MWRMQNROSNRM RSZR[QZRYSZS\\R^Q_",714:" 9MWRFRT RRYQZR[SZRY",715:" 21I[LKLJMHNGPFTFVGWHXJXLWNVORQRT RRYQZR[SZRY",716:" 3NVRFRM",717:" 6JZNFNM RVFVM",718:" 14KYQFOGNINKOMQNSNUMVKVIUGSFQF",719:" 27H\\PBP_ RTBT_ RYIWGTFPFMGKIKKLMMNOOUQWRXSYUYXWZT[P[MZKX",720:" 3G][BIb",721:" 11KYVBTDRGPKOPOTPYR]T`Vb",722:" 11KYNBPDRGTKUPUTTYR]P`Nb",723:" 3NVRBRb",724:" 3E_IR[R",725:" 6E_RIR[ RIR[R",726:" 6E_IO[O RIU[U",727:" 6G]KKYY RYKKY",728:" 9JZRLRX RMOWU RWOMU",729:" 6MWRQQRRSSRRQ",730:" 8MWSFRGQIQKRLSKRJ",731:" 8MWRHQGRFSGSIRKQL",732:" 9E_UMXP[RXTUW RIR[R",733:" 12H]SBLb RYBRb RLOZO RKUYU",734:" 35E_\\O\\N[MZMYNXPVUTXRZP[L[JZIYHWHUISJRQNRMSKSIRGPFNGMIMKNNPQUXWZY[[[\\Z\\Y",735:" 28G]IIJKKOKUJYI[ R[IZKYOYUZY[[ RIIKJOKUKYJ[I RI[KZOYUYYZ[[",737:" 6KYOBO[ RUBU[",738:" 6F^RBR[ RI[[[",739:" 4F^[BI[[[",740:" 18E_RIQJRKSJRI RIYHZI[JZIY R[YZZ[[\\Z[Y",741:" 33F^RHNLKPJSJUKWMXOXQWRU RRHVLYPZSZUYWWXUXSWRU RRUQYP\\ RRUSYT\\ RP\\T\\",742:" 26F^RNQKPINHMHKIJKJOKRLTNWR\\ RRNSKTIVHWHYIZKZOYRXTVWR\\",743:" 20F^RGPJLOIR RRGTJXO[R RIRLUPZR] R[RXUTZR]",744:" 48F^RTTWVXXXZW[U[SZQXPVPSQ RSQUOVMVKUISHQHOINKNMOOQQ RQQNPLPJQISIUJWLXNXPWRT RRTQYP\\ RRTSYT\\ RP\\T\\",745:" 55F^RRR[Q\\ RRVQ\\ RRIQHOHNINKONRR RRISHUHVIVKUNRR RRRNOLNJNIOIQJR RRRVOXNZN[O[QZR RRRNULVJVIUISJR RRRVUXVZV[U[SZR",746:" 55F^ISJSLTMVMXLZ RISIRJQLQMRNTNWMYLZ RRGPIOLOOQUQXPZR\\ RRGTIULUOSUSXTZR\\ R[S[RZQXQWRVTVWWYXZ R[SZSXTWVWXXZ RKVYV",750:" 18PSSRRSQSPRPQQPRPSQSSRUQV RQQQRRRRQQQ",751:" 16PTQPPQPSQTSTTSTQSPQP RRQQRRSSRRQ",752:" 9NVPOTU RTOPU RNRVR",753:" 28MWRKQMOPMR RRKSMUPWR RRMOQ RRMUQ RROPQ RROTQ RQQSQ RMRWR",754:" 26MWMRMQNOONQMSMUNVOWQWR RPNTN ROOUO RNPVP RNQVQ RMRWR",755:" 14LRLFLRRRLF RLIPQ RLLOR RLOMQ",756:" 10MWRKQMOPMR RRKSMUPWR",757:" 11MWWRWQVOUNSMQMONNOMQMR",758:" 13G]]R]P\\MZJWHTGPGMHJJHMGPGR",759:" 11MWMRMSNUOVQWSWUVVUWSWR",760:" 7LXLPNRQSSSVRXP",761:" 6RURUTTURTPRO",762:" 7RVRRUPVNVLUKTK",763:" 7NRRROPNNNLOKPK",764:" 21MWWHVGTFQFOGNHMJMLNNOOUSVTWVWXVZU[S\\P\\N[MZ",765:" 21G]IWHVGTGQHOINKMMMONPOTUUVWWYW[V\\U]S]P\\N[M",766:" 31G]RRTUUVWWYW[V\\U]S]Q\\O[NYMWMUNTOPUOVMWKWIVHUGSGQHOINKMMMONPORR",767:" 22H\\KFK[ RHF[FQP[Z RZV[Y\\[ RZVZY RWYZY RWYZZ\\[",768:" 30KYUARBPCNELHKLKRLUNWQXSXVWXUYR RKPLMNKQJSJVKXMYPYVXZV]T_R`Oa",796:" 3>f>RfR",797:" 3D`D``D",798:" 3RRR>Rf",799:" 3D`DD``",800:" 3D`DR`R",801:" 3F^FY^K",802:" 3KYK^YF",803:" 3RRRDR`",804:" 3KYKFY^",805:" 3F^FK^Y",806:" 3KYKRYR",807:" 3MWMWWM",808:" 3RRRKRY",809:" 3MWMMWW",810:" 8GRRGPGMHJJHMGPGR",811:" 8GRGRGTHWJZM\\P]R]",812:" 8R]R]T]W\\ZZ\\W]T]R",813:" 8R]]R]P\\MZJWHTGRG",814:" 9D`DOGQKSPTTTYS]Q`O",815:" 9PUUDSGQKPPPTQYS]U`",816:" 9OTODQGSKTPTTSYQ]O`",817:" 9D`DUGSKQPPTPYQ]S`U",818:" 5KYRJYNKVRZ",819:" 5JZJRNKVYZR",820:" 5KYKVKNYVYN",821:" 5JZLXJPZTXL",822:" 23JZJ]L]O\\Q[TXUVVSVOULTJSIQIPJOLNONSOVPXS[U\\X]Z]",823:" 23I]]Z]X\\U[SXPVOSNONLOJPIQISJTLUOVSVVUXT[Q\\O]L]J",824:" 23JZZGXGUHSIPLONNQNUOXPZQ[S[TZUXVUVQUNTLQIOHLGJG",825:" 23G[GJGLHOIQLTNUQVUVXUZT[S[QZPXOUNQNNOLPISHUGXGZ",826:" 21E[EPFRHTJUMVQVUUXSZP[NZLWLSMQNNPLSKVKYL\\M^",827:" 19EYETHVKWPWSVVTXQYNYLXKVKSLPNNQMTMYN\\P_",828:" 26OUQOOQOSQUSUUSUQSOQO RQPPQPSQTSTTSTQSPQP RRQQRRSSRRQ",829:" 11RWRMSMUNVOWQWSVUUVSWRW",830:" 9D`DRJR RORUR RZR`R",831:" 5D`DUDO`O`U",832:" 6JZRDJR RRDZR",833:" 9D`DR`R RJYZY RP`T`",834:" 9D`DR`R RDRRb R`RRb",840:" 18KYQKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK",841:" 6LXLLLXXXXLLL",842:" 5KYRJKVYVRJ",843:" 6LXRHLRR\\XRRH",844:" 12JZRIPOJOOSMYRUWYUSZOTORI",845:" 6KYRKRY RKRYR",846:" 6MWMMWW RWMMW",847:" 9MWRLRX RMOWU RWOMU",850:" 35NVQNOONQNSOUQVSVUUVSVQUOSNQN ROQOS RPPPT RQOQU RRORU RSOSU RTPTT RUQUS",851:" 27NVNNNVVVVNNN ROOOU RPOPU RQOQU RRORU RSOSU RTOTU RUOUU",852:" 17MWRLMUWURL RROOT RROUT RRRQT RRRST",853:" 17LULRUWUMLR RORTU RORTO RRRTS RRRTQ",854:" 17MWRXWOMORX RRUUP RRUOP RRRSP RRRQP",855:" 17OXXROMOWXR RURPO RURPU RRRPQ RRRPS",856:" 22LXRLNWXPLPVWRL RRRRL RRRLP RRRNW RRRVW RRRXP",857:" 11RYRKRY RRKYNRQ RSMVNSO",860:" 13MWRLRX ROOUO RMUOWQXSXUWWU",861:" 11LXRLRX RLQMOWOXQ RPWTW",862:" 14KYMNWX RWNMX ROLLOKQ RULXOYQ",863:" 18I[NII[ RVI[[ RMM[[ RWMI[ RNIVI RMMWM",864:" 21I[RGRV RMJWP RWJMP RIVL\\ R[VX\\ RIV[V RL\\X\\",865:" 11G[MJSV RKPSL RG\\[\\[RG\\",866:" 14LXPLPPLPLTPTPXTXTTXTXPTPTLPL",867:" 32KYYPXNVLSKQKNLLNKQKSLVNXQYSYVXXVYT RYPWNUMSMQNPOOQOSPUQVSWUWWVYT",868:" 10KYRJKVYVRJ RRZYNKNRZ",869:" 34G]PIPGQFSFTGTI RGZHXJVKTLPLKMJOIUIWJXKXPYTZV\\X]Z RGZ]Z RQZP[Q\\S\\T[SZ",870:" 64JZRMRS RRSQ\\ RRSS\\ RQ\\S\\ RRMQJPHNG RQJNG RRMSJTHVG RSJVG RRMNKLKJM RPLLLJM RRMVKXKZM RTLXLZM RRMPNOOOR RRMPOOR RRMTNUOUR RRMTOUR",871:" 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J]Z]",1001:" 18KYRKMX RRNVX RRKWX ROTTT RKXPX RTXYX",1002:" 35JZNKNX ROKOX RLKSKVLWNVPSQ RSKULVNUPSQ ROQSQVRWTWUVWSXLX RSQURVTVUUWSX",1003:" 24KYVLWKWOVLTKQKOLNMMPMSNVOWQXTXVWWU RQKOMNPNSOVQX",1004:" 26JZNKNX ROKOX RLKSKVLWMXPXSWVVWSXLX RSKULVMWPWSVVUWSX",1005:" 22JYNKNX ROKOX RSOSS RLKVKVOUK ROQSQ RLXVXVTUX",1006:" 20JXNKNX ROKOX RSOSS RLKVKVOUK ROQSQ RLXQX",1007:" 36K[VLWKWOVLTKQKOLNMMPMSNVOWQXTXVW RQKOMNPNSOVQX RTXUWVU RVSVX RWSWX RTSYS",1008:" 27J[NKNX ROKOX RVKVX RWKWX RLKQK RTKYK ROQVQ RLXQX RTXYX",1009:" 12NWRKRX RSKSX RPKUK RPXUX",1010:" 19LXSKSURWQX RTKTUSWQXPXNWMUNTOUNV RQKVK",1011:" 27JZNKNX ROKOX RWKOS RQQVX RRQWX RLKQK RTKYK RLXQX RTXYX",1012:" 14KXOKOX RPKPX RMKRK RMXWXWTVX",1013:" 30I\\MKMX RNNRX RNKRU RWKRX RWKWX RXKXX RKKNK RWKZK RKXOX RUXZX",1014:" 21JZNKNX ROMVX ROKVV RVKVX RLKOK RTKXK RLXPX",1015:" 32KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK",1016:" 25JYNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXQX",1017:" 47KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK RPWPUQTSTTUUZV[W[XZ RTUUXVZW[",1018:" 37JZNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXQX RSRTSUWVXWXXW RSRUSVWWX",1019:" 32KZVMWKWOVMULSKQKOLNMNOOPQQTRVSWT RNNOOQPTQVRWSWVVWTXRXPWOVNTNXOV",1020:" 16KZRKRX RSKSX RNKMOMKXKXOWK RPXUX",1021:" 20J[NKNUOWQXTXVWWUWK ROKOUPWQX RLKQK RUKYK",1022:" 15KYMKRX RNKRU RWKRX RKKPK RTKYK",1023:" 24I[LKOX RMKOT RRKOX RRKUX RSKUT RXKUX RJKOK RVKZK",1024:" 21KZNKVX ROKWX RWKNX RLKQK RTKYK RLXQX RTXYX",1025:" 20LYNKRRRX ROKSR RWKSRSX RLKQK RTKYK RPXUX",1026:" 16LYVKNX RWKOX ROKNONKWK RNXWXWTVX",1027:" 18KYRKMX RRNVX RRKWX ROTTT RKXPX RTXYX",1028:" 35JZNKNX ROKOX RLKSKVLWNVPSQ RSKULVNUPSQ ROQSQVRWTWUVWSXLX RSQURVTVUUWSX",1029:" 14KXOKOX RPKPX RMKWKWOVK RMXRX",1030:" 15KYRKLX RRMWX RRKXX RMWVW RLXXX",1031:" 22JYNKNX ROKOX RSOSS RLKVKVOUK ROQSQ RLXVXVTUX",1032:" 16LYVKNX RWKOX ROKNONKWK RNXWXWTVX",1033:" 27J[NKNX ROKOX RVKVX RWKWX RLKQK RTKYK ROQVQ RLXQX RTXYX",1034:" 44KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK RQOQT RTOTT RQQTQ RQRTR",1035:" 12NWRKRX RSKSX RPKUK RPXUX",1036:" 27JZNKNX ROKOX RWKOS RQQVX RRQWX RLKQK RTKYK RLXQX RTXYX",1037:" 15KYRKMX RRNVX RRKWX RKXPX RTXYX",1038:" 30I\\MKMX RNNRX RNKRU RWKRX RWKWX RXKXX RKKNK RWKZK RKXOX RUXZX",1039:" 21JZNKNX ROMVX ROKVV RVKVX RLKOK RTKXK RLXPX",1040:" 36JZMJLM RXJWM RPPOS RUPTS RMVLY RXVWY RMKWK RMLWL RPQTQ RPRTR RMWWW RMXWX",1041:" 32KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK",1042:" 21J[NKNX ROKOX RVKVX RWKWX RLKYK RLXQX RTXYX",1043:" 25JYNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXQX",1044:" 20K[MKRQ RNKSQMX RMKWKXOVK RNWWW RMXWXXTVX",1045:" 16KZRKRX RSKSX RNKMOMKXKXOWK RPXUX",1046:" 33KZMONLOKPKQLRORX RXOWLVKUKTLSOSX RMONMOLPLQMRO RXOWMVLULTMSO RPXUX",1047:" 40KZRKRX RSKSX RQNNOMQMRNTQUTUWTXRXQWOTNQN RQNOONQNROTQU RTUVTWRWQVOTN RPKUK RPXUX",1048:" 21KZNKVX ROKWX RWKNX RLKQK RTKYK RLXQX RTXYX",1049:" 33J[RKRX RSKSX RLPMONOOSQU RTUVSWOXOYP RMONROTQUTUVTWRXO RPKUK RPXUX",1050:" 35KZMVNXQXMRMONMOLQKTKVLWMXOXRTXWXXV ROUNRNOOMQK RTKVMWOWRVU RNWPW RUWWW",1051:" 18KYTKKX RSMTX RTKUX RNTTT RIXNX RRXWX",1052:" 34JYPKLX RQKMX RNKUKWLWNVPSQ RUKVLVNUPSQ ROQRQTRUSUUTWQXJX RRQTSTUSWQX",1053:" 25KXVLWLXKWNVLTKRKPLOMNOMRMUNWPXRXTWUU RRKPMOONRNVPX",1054:" 26JYPKLX RQKMX RNKTKVLWNWQVTUVTWQXJX RTKULVNVQUTTVSWQX",1055:" 22JYPKLX RQKMX RSORS RNKXKWNWK ROQRQ RJXTXUUSX",1056:" 20JXPKLX RQKMX RSORS RNKXKWNWK ROQRQ RJXOX",1057:" 33KYVLWLXKWNVLTKRKPLOMNOMRMUNWPXRXTWUVVS RRKPMOONRNVPX RRXTVUS RSSXS",1058:" 27J[PKLX RQKMX RXKTX RYKUX RNKSK RVK[K ROQVQ RJXOX RRXWX",1059:" 12NWTKPX RUKQX RRKWK RNXSX",1060:" 19LXUKRUQWPX RVKSURWPXOXMWLUMTNUMV RSKXK",1061:" 27JZPKLX RQKMX RYKOR RRPTX RSPUX RNKSK RVK[K RJXOX RRXWX",1062:" 14KXQKMX RRKNX ROKTK RKXUXVUTX",1063:" 30I\\OKKX ROMPX RPKQV RYKPX RYKUX RZKVX RMKPK RYK\\K RIXMX RSXXX",1064:" 21JZPKLX RPKTX RQKTU RXKTX RNKQK RVKZK RJXNX",1065:" 32KYRKPLOMNOMRMUNWPXRXTWUVVTWQWNVLTKRK RRKPMOONRNVPX RRXTVUTVQVMTK",1066:" 24JYPKLX RQKMX RNKUKWLXMXOWQTROR RUKWMWOVQTR RJXOX",1067:" 46KYRKPLOMNOMRMUNWPXRXTWUVVTWQWNVLTKRK RRKPMOONRNVPX RRXTVUTVQVMTK ROWOVPUQURVRZS[T[UZ RRVSZT[",1068:" 35JZPKLX RQKMX RNKUKWLXMXOWQTROR RUKWMWOVQTR RSRTWUXVXWW RSRTSUWVX RJXOX",1069:" 28KZWLXLYKXNWLUKRKPLOMOOPPUSVT RONPOURVSVVUWSXPXNWMULXMWNW",1070:" 16KZTKPX RUKQX RPKNNOKZKYNYK RNXSX",1071:" 20J[PKMUMWOXSXUWVUYK RQKNUNWOX RNKSK RWK[K",1072:" 15KYOKPX RPKQV RYKPX RMKRK RVK[K",1073:" 24I[NKMX ROKNV RTKMX RTKSX RUKTV RZKSX RLKQK RXK\\K",1074:" 21KZPKTX RQKUX RYKLX RNKSK RVK[K RJXOX RRXWX",1075:" 20LYPKRQPX RQKSQ RYKSQQX RNKSK RVK[K RNXSX",1076:" 16LYXKLX RYKMX RQKONPKYK RLXUXVUTX",1101:" 32LZQOPPPQOQOPQOTOVQVWWXXX RTOUQUWWX RURRSPTOUOWPXSXTWUU RRSPUPWQX",1102:" 29JYNKNX ROKOX RORPPROTOVPWRWUVWTXRXPWOU RTOUPVRVUUWTX RLKOK",1103:" 24LXVQUQURVRVQUPSOQOOPNRNUOWQXSXUWVV RQOPPOROUPWQX",1104:" 32L[VKVX RWKWX RVRUPSOQOOPNRNUOWQXSXUWVU RQOPPOROUPWQX RTKWK RVXYX",1105:" 26LXOSVSVRUPSOQOOPNRNUOWQXSXUWVV RUSUQSO RQOPPOROUPWQX",1106:" 20LWTKULUMVMVLTKRKPMPX RRKQMQX RNOSO RNXSX",1107:" 42LYQOOQOSQUSUUSUQSOQO RQOPQPSQU RSUTSTQSO RTPUOVO RPTOUOXPYTYVZ ROWPXTXVYV[T\\P\\N[NYPX",1108:" 28J[NKNX ROKOX RORPPROTOVPWRWX RTOUPVRVX RLKOK RLXQX RTXYX",1109:" 18NWRKRLSLSKRK RRORX RSOSX RPOSO RPXUX",1110:" 23NWSKSLTLTKSK RSOSZR\\ RTOTZR\\P\\O[OZPZP[O[ RQOTO",1111:" 27JZNKNX ROKOX RWOOU RRSVX RSSWX RLKOK RTOYO RLXQX RTXYX",1112:" 12NWRKRX RSKSX RPKSK RPXUX",1113:" 44F_JOJX RKOKX RKRLPNOPORPSRSX RPOQPRRRX RSRTPVOXOZP[R[X RXOYPZRZX RHOKO RHXMX RPXUX RXX]X",1114:" 28J[NONX ROOOX RORPPROTOVPWRWX RTOUPVRVX RLOOO RLXQX RTXYX",1115:" 28LYQOOPNRNUOWQXTXVWWUWRVPTOQO RQOPPOROUPWQX RTXUWVUVRUPTO",1116:" 32JYNON\\ ROOO\\ RORPPROTOVPWRWUVWTXRXPWOU RTOUPVRVUUWTX RLOOO RL\\Q\\",1117:" 29KYUOU\\ RVOV\\ RURTPROPONPMRMUNWPXRXTWUU RPOOPNRNUOWPX RS\\X\\",1118:" 22KXOOOX RPOPX RPRQPSOUOVPVQUQUPVP RMOPO RMXRX",1119:" 26LYTOUPUQVQVPTOQOOPORQSTTVU ROQQRTSVTVWTXQXOWOVPVPWQX",1120:" 14LWPKPVRXTXUWUV RQKQVRX RNOTO",1121:" 28J[NONUOWQXSXUWVU ROOOUPWQX RVOVX RWOWX RLOOO RTOWO RVXYX",1122:" 15KYNORX ROORV RVORX RLOQO RTOXO",1123:" 24I[LOOX RMOOU RROOX RROUX RSOUU RXOUX RJOOO RVOZO",1124:" 21KYNOUX ROOVX RVONX RLOQO RTOXO RLXPX RSXXX",1125:" 23KYNORX ROORV RVORXP[N\\M\\L[LZMZM[L[ RLOQO RTOXO",1126:" 16LXUONX RVOOX ROONQNOVO RNXVXVVUX",1127:" 32K[QOOPNQMSMUNWPXQXSWUUWRXO RQOOQNSNUOWPX RQOSOUPWWXX RSOTPVWXXYX",1128:" 40KXRKPMOOMUK\\ RQLPNNTL\\ RRKTKVLVNUPRQ RTKULUNTPRQ RRQTRUTUVTWRXQXOWNT RRQSRTTTVRX",1129:" 19KYLQNOPORPSSSXR\\ RLQNPPPRQSS RWOVRSXQ\\",1130:" 39KYSOQOOPNQMSMUNWPXRXTWUVVTVRUPRNQLQKRJTJUKVM RQOOQNSNVPX RRXTVUTUQSO RQLRKTKVM",1131:" 27LXVPTOQOOPOQPRRS RQOPPPQRS RRSOTNUNWPXSXUW RRSPTOUOWPX",1132:" 28LWRKQLQMSNVNVMSNPOOPNRNTOVPWRXSYS[R\\P\\O[ RSNQOPPOROTPVRX",1133:" 26IYJRKPLONOOPOQMX RMONPNQLX ROQPPROTOVPVRS\\ RTOUPURR\\",1134:" 35IYJSKQLPNPOQOVPX RMPNQNUOWPXQXSWTVUTVQVNULTKRKQLQNRPURWS RQXSVTTUQUNTK",1135:" 13NWROPVPWQXSXUWVU RSOQVQWRX",1136:" 26KYOOLX RPOMX RUOVPWPVOTORQOR RORPSRWTXVWWU RORQSSWTX",1137:" 15LXLKNKPLWX RNKOLVX RRPMX RRPNX",1138:" 26KZOOK\\ RPOL\\ RNUNWOXQXSWTV RVOTVTWUXWXXWYU RWOUVUWVX",1139:" 19JYNOMX ROONUMX RVRVOWOVRTUQWNXMX RLOOO",1140:" 36MXRKQLQMSNVN RTNQOPPPRRSUS RTNROQPQRRS RSSPTOUOWQXSYTZT[S\\Q\\ RSSQTPUPWQX",1141:" 28KXQOOPNQMSMUNWPXRXTWUVVTVRUPSOQO RQOOQNSNVPX RRXTVUTUQSO",1142:" 20IZPPMX RPPNX RTPSX RTPTX RKQMOXO RKQMPXP",1143:" 29JXSOQOOPNQMSJ\\ RQOOQNSK\\ RSOUPVRVTUVTWRXPXNWMU RSOUQUTTVRX",1144:" 28K[YOQOOPNQMSMUNWPXRXTWUVVTVRUPYP RQOOQNSNVPX RRXTVUTUQSO",1145:" 14KZSPQX RSPRX RMQOOXO RMQOPXP",1146:" 24JXKRLPMOOOPPPROUOWPX RNOOPORNUNWPXQXSWUUVRVOUOVP",1147:" 35KZOPNQMSMUNWPXRXUWWUXRXPWOUOTPSRRUO\\ RMUNVPWRWUVWTXR RXQWPUPSR RRUQXP\\",1148:" 17KXMONOPPS[T\\ RNOOPR[T\\U\\ RVOTRNYL\\",1149:" 28I[TKQ\\ RUKP\\ RJRKPLONOOPOVPWSWUVWT RMONPNTOWPXSXUWWTXRYO",1150:" 36JZNPPPPONPMQLSLUMWNXPXQWRUSR RLUNWPWRU RRRRWSXUXWVXTXRWPVOVPWP RRUSWUWWV",1151:" 32KZVOTVTWUXWXXWYU RWOUVUWVX RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX",1152:" 32JXOKMR RPKNRNVPX RNROPQOSOUPVRVTUVTWRXPXNWMUMR RSOUQUTTVRX RMKPK",1153:" 22KXUPUQVQUPSOQOOPNQMSMUNWPXRXTWUV RQOOQNSNVPX",1154:" 35KZWKTVTWUXWXXWYU RXKUVUWVX RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX RUKXK",1155:" 23KWNURTTSURUPSOQOOPNQMSMUNWPXRXTWUV RQOOQNSNVPX",1156:" 23MXWKXLXKVKTLSNPYO[N\\ RVKULTNQYP[N\\L\\L[M\\ RPOVO",1157:" 34KYVOTVSYR[ RWOUVTYR[P\\M\\L[M[N\\ RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX",1158:" 29KZPKLX RQKMX ROQPPROTOVPVRUUUWVX RTOUPURTUTWUXWXXWYU RNKQK",1159:" 26MWSKSLTLTKSK RNROPPOROSPSRRURWSX RQORPRRQUQWRXTXUWVU",1160:" 26MWTKTLULUKTK RORPPQOSOTPTRRYQ[O\\M\\M[N\\ RROSPSRQYP[O\\",1161:" 32KXPKLX RQKMX RVPUQVQVPUOTORQPROR RORPSQWRXTXUWVU RORQSRWSX RNKQK",1162:" 16NVSKPVPWQXSXTWUU RTKQVQWRX RQKTK",1163:" 46F^GRHPIOKOLPLQJX RJOKPKQIX RLQMPOOQOSPSQQX RQORPRQPX RSQTPVOXOZPZRYUYWZX RXOYPYRXUXWYX[X\\W]U",1164:" 33J[KRLPMOOOPPPQNX RNOOPOQMX RPQQPSOUOWPWRVUVWWX RUOVPVRUUUWVXXXYWZU",1165:" 28KXQOOPNQMSMUNWPXRXTWUVVTVRUPSOQO RQOOQNSNVPX RRXTVUTUQSO",1166:" 35JYKRLPMOOOPPPQM\\ RNOOPOQL\\ RPQROTOVPWRWTVVUWSXQXOVOT RTOVQVTUVSX RJ\\O\\",1167:" 28KYVOR\\ RWOS\\ RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX RP\\U\\",1168:" 22LXMRNPOOQORPRQPX RPOQPQQOX RRQSPUOVOWPWQVQWP",1169:" 24LYVPVQWQVPTOQOOPORQSTTVU ROQQRTSVTVWTXQXOWNVOVOW",1170:" 16NWSKPVPWQXSXTWUU RTKQVQWRX RPOUO",1171:" 33IZJRKPLONOOPORNUNWOX RMONPNRMUMWOXQXSWTV RVOTVTWUXWXXWYU RWOUVUWVX",1172:" 24JXKRLPMOOOPPPROUOWPX RNOOPORNUNWPXQXSWUUVRVOUOVP",1173:" 37H\\IRJPKOMONPNRMUMWNX RLOMPMRLULWNXOXQWRV RTORVRWTX RUOSVSWTXUXWWYUZRZOYOZP",1174:" 38JZMRNPPOROSPSR RQORPRRQUPWNXMXLWLVMVLW RXPWQXQXPWOVOTPSRRURWSX RQUQWRXTXVWWU",1175:" 35IYJRKPLONOOPORNUNWOX RMONPNRMUMWOXQXSWTV RVOTVSYR[ RWOUVTYR[P\\M\\L[M[N\\",1176:" 27KYWOWPVQNVMWMX RNQOOROUQ ROPRPUQVQ RNVOVRWUW ROVRXUXVV",1177:" 39H[RKSLSMTMTLRKOKMLLNLX ROKNLMNMX RXKYLYMZMZLXKVKTMTX RVKUMUX RJOWO RJXOX RRXWX",1178:" 29J[UKVLWLWKQKOLNNNX RQKPLONOX RVOVX RWOWX RLOWO RLXQX RTXYX",1179:" 27J[WKQKOLNNNX RQKPLONOX RUKVLVX RWKWX RLOVO RLXQX RTXYX",1180:" 48F_PKQLQMRMRLPKMKKLJNJX RMKLLKNKX RYKZL[L[KUKSLRNRX RUKTLSNSX RZOZX R[O[X RHO[O RHXMX RPXUX RXX]X",1181:" 46F_PKQLQMRMRLPKMKKLJNJX RMKLLKNKX R[KUKSLRNRX RUKTLSNSX RYKZLZX R[K[X RHOZO RHXMX RPXUX RXX]X",1182:" 12NWRORX RSOSX RPOSO RPXUX",1184:" 21LXVPTOROPPOQNSNUOWQXSXUW RROPQOSOVQX ROSSS",1185:" 35LYSKQLPMOONRNUOWPXRXTWUVVTWQWNVLUKSK RSKQMPOOSOVPX RRXTVUTVPVMUK ROQVQ",1186:" 34KZTKQ\\ RUKP\\ RQONPMRMUNWQXTXWWXUXRWPTOQO RQOOPNRNUOWQX RTXVWWUWRVPTO",1187:" 22LXUPVRVQUPSOQOOPNRNTOVRX RQOOQOTPVRXSYS[R\\P\\",1191:" 45I[VKWLXLVKSKQLPMOOLYK[J\\ RSKQMPOMYL[J\\H\\H[I\\ RZK[L[KYKWLVNSYR[Q\\ RYKXLWNTYS[Q\\O\\O[P\\ RLOYO",1192:" 38IZVKWLXLXKSKQLPMOOLYK[J\\ RSKQMPOMYL[J\\H\\H[I\\ RVOTVTWUXWXXWYU RWOUVUWVX RLOWO",1193:" 38IZVKWL RXKSKQLPMOOLYK[J\\ RSKQMPOMYL[J\\H\\H[I\\ RWKTVTWUXWXXWYU RXKUVUWVX RLOVO",1194:" 63F^SKTLTM RULSKPKNLMMLOIYH[G\\ RPKNMMOJYI[G\\E\\E[F\\ RZK[L\\L\\KWKUL RTMSOPYO[N\\ RWKUMTOQYP[N\\L\\L[M\\ RZOXVXWYX[X\\W]U R[OYVYWZX RIO[O",1195:" 63F^SKTLTM RULSKPKNLMMLOIYH[G\\ RPKNMMOJYI[G\\E\\E[F\\ RZK[L R\\KWKUL RTMSOPYO[N\\ RWKUMTOQYP[N\\L\\L[M\\ R[KXVXWYX[X\\W]U R\\KYVYWZX RIOZO",1196:" 20MWNROPPOROSPSRRURWSX RQORPRRQUQWRXTXUWVU",1200:" 28LYQKOLNONTOWQXTXVWWTWOVLTKQK RQKPLOOOTPWQX RTXUWVTVOULTK",1201:" 10LYPNSKSX RRLRX ROXVX",1202:" 35LYOMONNNNMOLQKTKVLWNVPTQQROSNUNX RTKULVNUPTQ RNWOVPVSWVWWV RPVSXVXWVWU",1203:" 39LYOMONNNNMOLQKTKVLWNVPTQ RTKULVNUPTQ RRQTQVRWTWUVWTXQXOWNVNUOUOV RTQURVTVUUWTX",1204:" 13LYSMSX RTKTX RTKMTXT RQXVX",1205:" 33LYOKNQ ROKVK ROLSLVK RNQOPQOTOVPWRWUVWTXQXOWNVNUOUOV RTOUPVRVUUWTX",1206:" 36LYVMVNWNWMVLTKRKPLOMNPNUOWQXTXVWWUWSVQTPQPNR RRKPMOPOUPWQX RTXUWVUVSUQTP",1207:" 22LYNKNO RVMRTPX RWKTQQX RNMPKRKUM RNMPLRLUMVM",1208:" 51LYQKOLNNOPQQTQVPWNVLTKQK RQKPLONPPQQ RTQUPVNULTK RQQORNTNUOWQXTXVWWUWTVRTQ RQQPROTOUPWQX RTXUWVUVTURTQ",1209:" 36LYOVOUNUNVOWQXSXUWVVWSWNVLTKQKOLNNNPORQSTSWQ RSXUVVSVNULTK RQKPLONOPPRQS",1210:" 6NVRVQWRXSWRV",1211:" 8NVSWRXQWRVSWSYQ[",1212:" 12NVROQPRQSPRO RRVQWRXSWRV",1213:" 14NVROQPRQSPRO RSWRXQWRVSWSYQ[",1214:" 15NVRKQLRSSLRK RRLRO RRVQWRXSWRV",1215:" 29LYNNONOONONNOLQKTKVLWNWOVQSRRSRTST RTKVMVPUQSR RRWRXSXSWRW",1216:" 6OVRKRP RSKRP",1217:" 12LXOKOP RPKOP RUKUP RVKUP",1218:" 10MWQKPLPNQOSOTNTLSKQK",1219:" 9MWRJRP ROKUO RUKOO",1220:" 3KZXHM\\",1221:" 16MWUHSJQMPPPTQWSZU\\ RSJRLQPQTRXSZ",1222:" 16MWOHQJSMTPTTSWQZO\\ RQJRLSPSTRXQZ",1223:" 12MWPHP\\ RQHQ\\ RPHUH RP\\U\\",1224:" 12MWSHS\\ RTHT\\ ROHTH RO\\T\\",1225:" 38LWSHQIPJPLRNSP RQIPL RSNRQ RPJQLSNSPRQPRRSSTSVQXPZ RRSSV RPXQ[ RSTRVPXPZQ[S\\",1226:" 38MXQHSITJTLRNQP RSITL RQNRQ RTJSLQNQPRQTRRSQTQVSXTZ RRSQV RTXS[ RQTRVTXTZS[Q\\",1227:" 4MWTHPRT\\",1228:" 4MWPHTRP\\",1229:" 3OURHR\\",1230:" 6MWPHP\\ RTHT\\",1231:" 3I[LRXR",1232:" 6I[RLRX RLRXR",1233:" 9JZRMRX RMRWR RMXWX",1234:" 9JZRMRX RMMWM RMRWR",1235:" 6JZMMWW RWMMW",1236:" 6NVRQQRRSSRRQ",1237:" 15I[RLQMRNSMRL RLRXR RRVQWRXSWRV",1238:" 6I[LPXP RLTXT",1239:" 9I[WLMX RLPXP RLTXT",1240:" 9I[LNXN RLRXR RLVXV",1241:" 4JZWLMRWX",1242:" 4JZMLWRMX",1243:" 10JZWKMOWS RMTWT RMXWX",1244:" 10JZMKWOMS RMTWT RMXWX",1245:" 21H[YUWUUTTSRPQOONNNLOKQKRLTNUOUQTRSTPUOWNYN",1246:" 16JZLTLRMPOPUSWSXR RLRMQOQUTWTXRXP",1247:" 8JZMSRPWS RMSRQWS",1248:" 7NVSKPO RSKTLPO",1249:" 7NVQKTO RQKPLTO",1250:" 14LXNKOMQNSNUMVK RNKONQOSOUNVK",1251:" 8NVSLRMQLRKSLSNQP",1252:" 8NVSKQMQORPSORNQO",1253:" 8NVQLRMSLRKQLQNSP",1254:" 8NVQKSMSORPQORNSO",1256:" 11JZWMQMONNOMQMSNUOVQWWW",1257:" 11JZMMMSNUOVQWSWUVVUWSWM",1258:" 11JZMMSMUNVOWQWSVUUVSWMW",1259:" 11JZMWMQNOONQMSMUNVOWQWW",1260:" 14JZWMQMONNOMQMSNUOVQWWW RMRUR",1261:" 13I[TOUPXRUTTU RUPWRUT RLRWR",1262:" 13MWRMRX ROPPORLTOUP RPORMTO",1263:" 13I[POOPLROTPU ROPMROT RMRXR",1264:" 13MWRLRW ROTPURXTUUT RPURWTU",1265:" 37KYVSUPSOQOOPNQMSMUNWPXRXTWUVVTWQWNVLTKQKPLQLRK RQOOQNSNVPX RRXTVUTVQVNULTK",1266:" 15JZLKRX RMKRV RXKRX RLKXK RNLWL",1267:" 10G[IOLORW RKORX R[FRX",1268:" 26I[XIXJYJYIXHVHTJSLROQUPYO[ RUITKSORUQXPZN\\L\\K[KZLZL[",1269:" 40I[XIXJYJYIXHVHTJSLROQUPYO[ RUITKSORUQXPZN\\L\\K[KZLZL[ RQNOONQNSOUQVSVUUVSVQUOSNQN",1270:" 26H\\ZRYTWUVUTTSSQPPONNMNKOJQJRKTMUNUPTQSSPTOVNWNYOZQZR",1271:" 26JZXKLX ROKPLPNOOMOLNLLMKOKSLVLXK RUTTUTWUXWXXWXUWTUT",1272:" 41J[YPXPXQYQYPXOWOVPUTTVSWQXOXMWLVLTMSORRPSNSLRKPKOLONPQUWWXXXYW ROXMVMTOR RONPPVWWX",1273:" 29J[UPSOQOPQPRQTSTUS RUOUSVTXTYRYQXNVLSKRKOLMNLQLRMUOWRXSXVW",1274:" 34KZQHQ\\ RTHT\\ RWLVLVMWMWLUKPKNLNNOPVSWT RNNOOVRWTWVVWTXQXOWNVNUOUOVNV",1275:" 12KYRKN\\ RVKR\\ RNQWQ RMVVV",1276:" 40LXTLSLSMTMTLSKQKPLPNQPTRUS RPNQOTQUSUUSW RQPOROTPVSXTY ROTPUSWTYT[S\\Q\\P[PZQZQ[P[",1277:" 29LXRKQLRMSLRK RRMRQ RRQQSRVSSRQ RRVR\\ RPOONNOOPPOTOUNVOUPTO",1278:" 42LXRMSLRKQLRMRQQRSURV RRQSRQURVRZQ[R\\S[RZ RPOONNOOPPOTOUNVOUPTO RPXOWNXOYPXTXUWVXUYTX",1279:" 12LYVKVX RNKVK RQQVQ RNXVX",1281:" 24H\\QKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK RRQQRRSSRRQ",1282:" 33LYQKPLPMQN RTKULUMTN RRNPOOQORPTRUSUUTVRVQUOSNRN RRURY RSUSY ROWVW",1283:" 23LYRKPLONOOPQRRSRUQVOVNULSKRK RRRRX RSRSX ROUVU",1284:" 24H\\QKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK RRKRY RKRYR",1285:" 25JYRRPQOQMRLTLUMWOXPXRWSUSTRR RWMRR RRMWMWR RRMVNWR",1286:" 25JZLLMKOKQLRNRPQRPSNT ROKPLQNQQPS RVKUX RWKTX RNTXT",1287:" 27JYNKNU ROKNR RNROPQOSOUPVQVTTVTXUYVYWX RSOUQUTTV RLKOK",1288:" 27LYONRKRQ RVNSKSQ RRQPROTOUPWRXSXUWVUVTURSQ RRTRUSUSTRT",1289:" 27JZRKRY RMKMPNRPSTSVRWPWK RLMMKNM RQMRKSM RVMWKXM ROVUV",1290:" 27JYNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXVXVUUX",1291:" 20LYWKTKQLONNQNSOVQXTYWY RWKTLRNQQQSRVTXWY",1292:" 23JZRRPQOQMRLTLUMWOXPXRWSUSTRR RSLQQ RWMRR RXQSS",1293:" 12KYPMTW RTMPW RMPWT RW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TYXWZT[Q[NZLXKUK[LX",2020:" 16I\\RFR[ RSFS[ RLFKLKFZFZLYF RO[V[",2021:" 23F^KFKULXNZQ[S[VZXXYUYF RLFLUMXOZQ[ RHFOF RVF\\F",2022:" 15H\\KFR[ RLFRX RYFR[ RIFOF RUF[F",2023:" 24F^JFN[ RKFNV RRFN[ RRFV[ RSFVV RZFV[ RGFNF RWF]F",2024:" 21H\\KFX[ RLFY[ RYFK[ RIFOF RUF[F RI[O[ RU[[[",2025:" 20H]KFRQR[ RLFSQS[ RZFSQ RIFOF RVF\\F RO[V[",2026:" 16H\\XFK[ RYFL[ RLFKLKFYF RK[Y[YUX[",2027:" 18H\\RFK[ RRFY[ RRIX[ RMUVU RI[O[ RU[[[",2028:" 45G]LFL[ RMFM[ RIFUFXGYHZJZLYNXOUP RUFWGXHYJYLXNWOUP RMPUPXQYRZTZWYYXZU[I[ RUPWQXRYTYWXYWZU[",2029:" 14I[NFN[ ROFO[ RKFZFZLYF RK[R[",2030:" 15H\\RFJ[ RRFZ[ RRIY[ RKZYZ RJ[Z[",2031:" 22G\\LFL[ RMFM[ RSLST RIFYFYLXF RMPSP RI[Y[YUX[",2032:" 16H\\XFK[ RYFL[ RLFKLKFYF RK[Y[YUX[",2033:" 27F^KFK[ RLFL[ RXFX[ RYFY[ RHFOF RUF\\F RLPXP RH[O[ RU[\\[",2034:" 56G]QFNGLIKKJOJRKVLXNZQ[S[VZXXYVZRZOYKXIVGSFQF RQFOGMILKKOKRLVMXOZQ[ RS[UZWXXVYRYOXKWIUGSF ROMOT RUMUT ROPUP ROQUQ",2035:" 12MXRFR[ RSFS[ ROFVF RO[V[",2036:" 27F\\KFK[ RLFL[ RYFLS RQOY[ RPOX[ RHFOF RUF[F RH[O[ RU[[[",2037:" 15H\\RFK[ RRFY[ RRIX[ RI[O[ RU[[[",2038:" 30F_KFK[ RLFRX RKFR[ RYFR[ RYFY[ RZFZ[ RHFLF RYF]F RH[N[ RV[][",2039:" 21G^LFL[ RMFYY R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RFQGRHSGRF RRMR[ RSMS[ ROMSM RO[V[",2110:" 25MXSFRGSHTGSF RTMT_SaQbObNaN`O_P`Oa RSMS_RaQb RPMTM",2111:" 27G\\LFL[ RMFM[ RWMMW RRSX[ RQSW[ RIFMF RTMZM RI[P[ RT[Z[",2112:" 12MXRFR[ RSFS[ ROFSF RO[V[",2113:" 44BcGMG[ RHMH[ RHPJNMMOMRNSPS[ ROMQNRPR[ RSPUNXMZM]N^P^[ RZM\\N]P][ RDMHM RD[K[ RO[V[ RZ[a[",2114:" 28G]LML[ RMMM[ RMPONRMTMWNXPX[ RTMVNWPW[ RIMMM RI[P[ RT[[[",2115:" 36H\\QMNNLPKSKULXNZQ[S[VZXXYUYSXPVNSMQM RQMONMPLSLUMXOZQ[ RS[UZWXXUXSWPUNSM",2116:" 36G\\LMLb RMMMb RMPONQMSMVNXPYSYUXXVZS[Q[OZMX RSMUNWPXSXUWXUZS[ RIMMM RIbPb",2117:" 33H\\WMWb RXMXb RWPUNSMQMNNLPKSKULXNZQ[S[UZWX RQMONMPLSLUMXOZQ[ RTb[b",2118:" 23IZNMN[ ROMO[ ROSPPRNTMWMXNXOWPVOWN RKMOM RK[R[",2119:" 32J[WOXMXQWOVNTMPMNNMOMQNRPSUUWVXW RMPNQPRUTWUXVXYWZU[Q[OZNYMWM[NY",2120:" 16KZPFPWQZS[U[WZXX RQFQWRZS[ RMMUM",2121:" 28G]LMLXMZP[R[UZWX RMMMXNZP[ RWMW[ RXMX[ RIMMM RTMXM RW[[[",2122:" 15I[LMR[ RMMRY RXMR[ RJMPM RTMZM",2123:" 24F^JMN[ RKMNX RRMN[ RRMV[ RSMVX RZMV[ RGMNM RWM]M",2124:" 21H\\LMW[ RMMX[ RXML[ RJMPM RTMZM RJ[P[ RT[Z[",2125:" 22H[LMR[ RMMRY RXMR[P_NaLbKbJaK`La RJMPM RTMZM",2126:" 16I[WML[ RXMM[ RMMLQLMXM RL[X[XWW[",2127:" 40G^QMNNLPKRJUJXKZN[P[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SNRM RRYQZR[SZRY",2213:" 14MWRMQNROSNRM RR[QZRYSZS\\R^Q_",2214:" 15MWRFQHRTSHRF RRHRN RRYQZR[SZRY",2215:" 32I[MJNKMLLKLJMHNGPFSFVGWHXJXLWNVORQRT RSFUGVHWJWLVNTP RRYQZR[SZRY",2216:" 6NVRFQM RSFQM",2217:" 12JZNFMM ROFMM RVFUM RWFUM",2218:" 14KYQFOGNINKOMQNSNUMVKVIUGSFQF",2219:" 9JZRFRR RMIWO RWIMO",2220:" 3G][BIb",2221:" 20KYVBTDRGPKOPOTPYR]T`Vb RTDRHQKPPPTQYR\\T`",2222:" 20KYNBPDRGTKUPUTTYR]P`Nb RPDRHSKTPTTSYR\\P`",2223:" 12KYOBOb RPBPb ROBVB RObVb",2224:" 12KYTBTb RUBUb RNBUB RNbUb",2225:" 40KYTBRCQDPFPHQJRKSMSOQQ RRCQEQGRISJTLTNSPORSTTVTXSZR[Q]Q_Ra RQSSUSWRYQZP\\P^Q`RaTb",2226:" 40KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQUQWRYSZT\\T^S`RaPb",2227:" 4KYUBNRUb",2228:" 4KYOBVROb",2229:" 3NVRBRb",2230:" 6KYOBOb RUBUb",2231:" 3E_IR[R",2232:" 6E_RIR[ RIR[R",2233:" 9F^RJR[ RJRZR RJ[Z[",2234:" 9F^RJR[ RJJZJ RJRZR",2235:" 6G]KKYY RYKKY",2236:" 6MWRQQRRSSRRQ",2237:" 15E_RIQJRKSJRI RIR[R RRYQZR[SZRY",2238:" 6E_IO[O RIU[U",2239:" 9E_YIK[ RIO[O RIU[U",2240:" 9E_IM[M RIR[R RIW[W",2241:" 4F^ZIJRZ[",2242:" 4F^JIZRJ[",2243:" 10F^ZFJMZT RJVZV RJ[Z[",2244:" 10F^JFZMJT RJVZV RJ[Z[",2245:" 21F_[WYWWVUTRPQOONMNKOJQJSKUMVOVQURTUPWNYM[M",2246:" 24F^IUISJPLONOPPTSVTXTZS[Q RISJQLPNPPQTTVUXUZT[Q[O",2247:" 8G]JTROZT RJTRPZT",2248:" 7LXTFOL RTFUGOL",2249:" 7LXPFUL RPFOGUL",2250:" 18H\\KFLHNJQKSKVJXHYF RKFLINKQLSLVKXIYF",2251:" 8MWRHQGRFSGSIRKQL",2252:" 8MWSFRGQIQKRLSKRJ",2253:" 8MWRHSGRFQGQIRKSL",2254:" 8MWQFRGSISKRLQKRJ",2255:" 10E[HMLMRY RKMR[ R[BR[",2256:" 13F^ZJSJOKMLKNJQJSKVMXOYSZZZ",2257:" 13F^JJJQKULWNYQZSZVYXWYUZQZJ",2258:" 13F^JJQJUKWLYNZQZSYVWXUYQZJZ",2259:" 13F^JZJSKOLMNKQJSJVKXMYOZSZZ",2260:" 16F^ZJSJOKMLKNJQJSKVMXOYSZZZ RJRVR",2261:" 11E_XP[RXT RUMZRUW RIRZR",2262:" 11JZPLRITL RMORJWO RRJR[",2263:" 11E_LPIRLT ROMJROW RJR[R",2264:" 11JZPXR[TX RMURZWU RRIRZ",2265:" 44I\\XRWOVNTMRMONMQLTLWMYNZP[R[UZWXXUYPYKXHWGUFRFPGOHOIPIPH RRMPNNQMTMXNZ RR[TZVXWUXPXKWHUF",2266:" 15H\\JFR[ RKFRY RZFR[ RJFZF RKGYG",2267:" 10AbDMIMRY RHNR[ Rb:R[",2268:" 32F^[CZD[E\\D\\C[BYBWCUETGSJRNPZO^N` RVDUFTJRVQZP]O_MaKbIbHaH`I_J`Ia",2269:" 50F^[CZD[E\\D\\C[BYBWCUETGSJRNPZO^N` RVDUFTJRVQZP]O_MaKbIbHaH`I_J`Ia RQKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK",2270:" 26F_\\S[UYVWVUUTTQPPONNLNJOIQISJULVNVPUQTTPUOWNYN[O\\Q\\S",2271:" 32F^[FI[ RNFPHPJOLMMKMIKIIJGLFNFPGSHVHYG[F RWTUUTWTYV[X[ZZ[X[VYTWT",2272:" 49F_[NZO[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I RIXXXZW[U[SZQXPVPTQSSSUTWIW R[TZRYQWP RSTTVUWWX",2305:" 48F]OUMTLTJUIWIXJZL[M[OZPXPWOUJPINIKJILHOGSGWHYJZLZOYRVUUWUYV[X[YZZX RMSKPJNJKKILH RSGVHXJYLYOXRVU",2306:" 48G_HKKHMKMV RJILLLV RMKPHRKRU ROIQLQU RRKUHWKW[ RTIVLV[ RWKZH[J\\M\\P[SZUXWUYP[ RYIZJ[M[PZSYUWWTYP[",2307:" 41F^ISMSLRKOKMLJNHQGSGVHXJYMYOXRWS[S RITOTMRLOLMMJOHQG RSGUHWJXMXOWRUT[T RKXYX RKYYY",2308:" 30F_GLJIMLMX RIJLMLX RMLPISLSX ROJRMRX RSLVIYLYW[Y RUJXMXXZZ]W",2309:" 33G]ZIJY RZIWJQJ RXKUKQJ RZIYLYR RXKXNYR RQRJR RPSMSJR RQRQY RPSPVQY",2310:" 33F^HOJKOU RJMOWRPWPZO[M[KZIXHWHUITKTMUPVRWUWXUZ RWHVIUKUMWQXTXWWYUZ",2311:" 36F^IOLLPN RKMOORLUN RQMTOWLYN RVMXO[L RIULRPT RKSOURRUT RQSTUWRYT RVSXU[R",2312:" 48F^JHNJPLQOQRPUNWJY RJHMIOJQLRO RRRQUOWMXJY RZHWIUJSLRO RRRSUUWWXZY RZHVJTLSOSRTUVWZY RIP[P RIQ[Q",2317:" 12NVQQQSSSSQQQ RQQSS RSQQS",2318:" 18JZMPQRTTVVWYW[V]U^ RMQST RMRPSTUVWWY",2319:" 18JZWKVMTOPQMR RSPMS RUFVGWIWKVNTPQRMT",2320:" 36H\\SMONLPKRKTLVNWQWUVXTYRYPXNVMSM RXNSM RVMQNLP RONKR RLVQW RNWSVXT RUVYR",2321:" 36H\\SMONLPKRKTLVNWQWUVXTYRYPXNVMSM RXNSM RVMQNLP RONKR RLVQW RNWSVXT RUVYR",2322:" 34J[SMPNNPMRMTNVPWRWUVWTXRXPWNUMSM ROPUM RNRVN RMTWO RNUXP ROVWR RPWVT",2323:" 18JZOGO^ RUFU] RMNWL RMOWM RMWWU RMXWV",2324:" 18JZNFNX RVLV^ RNNVL RNOVM RNWVU RNXVV",2325:" 25JZNBNW RNNQLTLVMWOWQVSSUQVNW RNNQMTMVN RUMVOVQUSSU",2326:" 18E_HIHL R\\I\\L RHI\\I RHJ\\J RHK\\K RHL\\L",2327:" 18JZMNMQ RWNWQ RMNWN RMOWO RMPWP RMQWQ",2328:" 49JZMLWX RMLONQOTOVNWMWKUKUMTO RONTO RQOWM RVKVN RULWL RWXUVSUPUNVMWMYOYOWPU RUVPU RSUMW RNVNY RMXOX",2329:" 26JZPOOMOKMKMMNNPOSOUNWL RNKNN RMLOL RMMSO RPOUN RWLWY",2330:" 86A^GfHfIeIdHcGcFdFfGhIiKiNhPfQdR`RUQ;Q4R/S-U,V,X-Y/Y3X6W8U;P?JCHEFHEJDNDREVGYJ[N\\R\\V[XZZW[T[PZMYKWITHPHMIKKJNJRKUMW RGdGeHeHdGd RU;Q?LCIFGIFKENERFVGXJ[ RR\\U[WZYWZTZPYMXKVITH",2331:"103EfNSOUQVSVUUVSVQUOSNQNOONPMSMVNYP[S\\V\\Y[[Y\\W]T]P\\MZJXIUHRHOIMJKLIOHSHXI]KaMcPeTfYf]e`cba RKLJNIRIXJ\\L`NbQdUeYe]d_cba RPOTO ROPUP RNQVQ RNRVR RNSVS ROTUT RPUTU RaLaNcNcLaL RbLbN RaMcM RaVaXcXcVaV RbVbX RaWcW",2332:" 30D`H@Hd RM@Md RW@Wd R\\@\\d RMMWK RMNWL RMOWM RMWWU RMXWV RMYWW",2367:" 12NVQQQSSSSQQQ RQQSS RSQQS",2368:" 18JZMPQRTTVVWYW[V]U^ RMQST RMRPSTUVWWY",2369:" 18JZWKVMTOPQMR RSPMS RUFVGWIWKVNTPQRMT",2370:" 32H\\PMMNLOKQKSLUMVPWTWWVXUYSYQXOWNTMPM RMNLPLSMUNVPW RWVXTXQWOVNTM",2371:" 36H\\SMONLPKRKTLVNWQWUVXTYRYPXNVMSM RXNSM RVMQNLP RONKR RLVQW RNWSVXT RUVYR",2372:" 34J[SMPNNPMRMTNVPWRWUVWTXRXPWNUMSM ROPUM RNRVN RMTWO RNUXP ROVWR RPWVT",2373:" 18JZOGO^ RUFU] RMNWL RMOWM RMWWU RMXWV",2374:" 18JZNFNX RVLV^ RNNVL RNOVM RNWVU RNXVV",2375:" 25JZNBNW RNNQLTLVMWOWQVSSUQVNW RNNQMTMVN RUMVOVQUSSU",2376:" 18E_HIHL R\\I\\L RHI\\I RHJ\\J RHK\\K RHL\\L",2377:" 18JZMNMQ RWNWQ RMNWN RMOWO RMPWP RMQWQ",2378:" 36JZQCVMRTRU RULQS RTITKPRRUUY RW\\UYSXQXOYN[N]O_Ra RW\\UZSYOYO]P_Ra RSXPZN]",2379:" 26JZPOOMOKMKMMNNPOSOUNWL RNKNN RMLOL RMMSO RPOUN RWLSY",2380:" 86A^GfHfIeIdHcGcFdFfGhIiKiNhPfQdR`RUQ;Q4R/S-U,V,X-Y/Y3X6W8U;P?JCHEFHEJDNDREVGYJ[N\\R\\V[XZZW[T[PZMYKWITHPHMIKKJNJRKUMW RGdGeHeHdGd RU;Q?LCIFGIFKENERFVGXJ[ RR\\U[WZYWZTZPYMXKVITH",2381:" 89IjNQOOQNSNUOVQVSUUSVQVOUNTMQMNNKPISHWH[I^K`NaRaW`[_]]`ZcVfQiMk RWHZI]K_N`R`W_[^]\\`YcTgQi RPOTO ROPUP RNQVQ RNRVR RNSVS ROTUT RPUTU ReLeNgNgLeL RfLfN ReMgM ReVeXgXgVeV RfVfX ReWgW",2382:" 85D`H>Hf RI>If RM>Mf RQBSBSDQDQAR?T>W>Y?[A\\D\\I[LYNWOUOSNRLQNOQNROSQVRXSVUUWUYV[X\\[\\`[cYeWfTfReQcQ`S`SbQb RRBRD RQCSC RY?ZA[D[IZLYN RRLRNPQNRPSRVRX RYVZX[[[`ZcYe RR`Rb RQaSa",2401:" 21AcHBHb RIBIb R[B[b R\\B\\b RDB`B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OVNTMQMONMPLSLUMXOZQ[T[VZXX RMSWSWQVOTNQNOONPMSMUNXOYQZTZVYWWXX",2606:" 24LZWFUFSGRJR[S[ RWFWGUGSH RTGSJS[ ROMVMVN ROMONVN",2607:" 48H\\XMWMW\\V_U`SaQaO`N_L_ RXMX\\W_UaSbPbNaL_ RWPUNSMPMNNLPKSKULXNZP[S[UZWX RWPSNPNNOMPLSLUMXNYPZSZWX",2608:" 25H\\LFL[M[ RLFMFM[ RMQPNRMUMWNXQX[ RMQPORNTNVOWQW[X[",2609:" 24NWRFQGQHRISITHTGSFRF RRGRHSHSGRG RRMR[S[ RRMSMS[",2610:" 24NWRFQGQHRISITHTGSFRF RRGRHSHSGRG RRMRbSb RRMSMSb",2611:" 22H[LFL[M[ RLFMFM[ RXMWMMW RXMMX RPTV[X[ RQSX[",2612:" 8NWRFR[S[ RRFSFS[",2613:" 42CbGMG[H[ RGMHMH[ RHQKNMMPMRNSQS[ RHQKOMNONQORQR[S[ RSQVNXM[M]N^Q^[ RSQVOXNZN\\O]Q][^[",2614:" 25H\\LML[M[ RLMMMM[ RMQPNRMUMWNXQX[ RMQPORNTNVOWQW[X[",2615:" 36I\\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM RQNOONPMSMUNXOYQZTZVYWXXUXSWPVOTNQN",2616:" 36H\\LMLbMb RLMMMMb RMPONQMTMVNXPYSYUXXVZT[Q[OZMX RMPQNTNVOWPXSXUWXVYTZQZMX",2617:" 36H\\WMWbXb RWMXMXb RWPUNSMPMNNLPKSKULXNZP[S[UZWX RWPSNPNNOMPLSLUMXNYPZSZWX",2618:" 21KYOMO[P[ ROMPMP[ RPSQPSNUMXM RPSQQSOUNXNXM",2619:" 50J[XPWNTMQMNNMPNRPSUUWV RVUWWWXVZ RWYTZQZNY ROZNXMX RXPWPVN RWOTNQNNO RONNPOR RNQPRUTWUXWXXWZT[Q[NZMX",2620:" 16MXRFR[S[ RRFSFS[ ROMVMVN ROMONVN",2621:" 25H\\LMLWMZO[R[TZWW RLMMMMWNYPZRZTYWW RWMW[X[ RWMXMX[",2622:" 14JZLMR[ RLMMMRY RXMWMRY RXMR[",2623:" 26F^IMN[ RIMJMNX RRMNX RRPN[ RRPV[ RRMVX R[MZMVX R[MV[",2624:" 16I[LMW[X[ RLMMMX[ RXMWML[ RXMM[L[",2625:" 17JZLMR[ RLMMMRY RXMWMRYNb RXMR[ObNb",2626:" 20I[VNL[ RXMNZ RLMXM RLMLNVN RNZXZX[ RL[X[",2651:" 33K[UUTSRRPRNSMTLVLXMZO[Q[SZTX RPRNTMVMYO[ RVRTXTZV[XZYY[V RWRUXUZV[",2652:" 23LZLVNSPO RSFMXMZO[P[RZTXUUURVVWWXWZV RTFNXNZO[",2653:" 22LXTSSTTTTSSRQROSNTMVMXNZP[S[VYXV RQROTNVNYP[",2654:" 33K[UUTSRRPRNSMTLVLXMZO[Q[SZTX RPRNTMVMYO[ RZFTXTZV[XZYY[V R[FUXUZV[",2655:" 23LXOYQXRWSUSSRRQROSNTMVMXNZP[S[VYXV RQROTNVNYP[",2656:" 27OXRRUOWLXIXGWFUGTIKdKfLgNfOcPZQ[S[UZVYXV RTISNRRO[M`Kd",2657:" 38K[UUTSRRPRNSMTLVLXMZO[Q[SZTX RPRNTMVMYO[ RVRPd RWRT[R`PdOfMgLfLdMaO_R]V[YY[V",2658:" 30L[LVNSPO RSFL[ RTFM[ ROUQSSRTRVSVUUXUZV[ RTRUSUUTXTZV[XZYY[V",2659:" 19NVSLRMSNTMSL RQROXOZQ[SZTYVV RRRPXPZQ[",2660:" 24NVSLRMSNTMSL RQRKd RRRO[M`KdJfHgGfGdHaJ_M]Q[TYVV",2661:" 31LZLVNSPO RSFL[ RTFM[ RURUSVSURTRRTOU ROURVSZT[ ROUQVRZT[U[XYZV",2662:" 17NVNVPSRO RUFOXOZQ[SZTYVV RVFPXPZQ[",2663:" 45E^EVGSIRKSKUI[ RIRJSJUH[ RKUMSORPRRSRUP[ RPRQSQUO[ RRUTSVRWR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RY",2715:" 58I\\LKLJMHNGQFTFWGXHYJYLXNWOUPRQ RLKMKMJNHQGTGWHXJXLWNUORP RMIPG RUGXI RXMTP RRPRTSTSP RRXQYQZR[S[TZTYSXRX RRYRZSZSYRY",2716:" 24MXTFRGQIQLRMSMTLTKSJRJQK RRKRLSLSKRK RRGQK RQIRJ",2717:" 24MXTHSIRIQHQGRFSFTGTJSLQM RRGRHSHSGRG RSITJ RTHSL",2718:" 71F_\\MZMXNWPUVTXSYQZMZKYJWJUKSLRQOSMTKTISGQFPFNGMIMKNNPQUWXZZ[\\[ R\\M\\NZNXO RYNXPVVUXSZQ[M[KZJYIWIUJSLQQNRMSKSIRG RSHQGPGNH ROGNINKONQQVWXYZZ\\Z\\[",2719:" 51I\\RBR_S_ RRBSBS_ RWIYIWGTFQFNGLILKMMNNVRWSXUXWWYTZQZOYNX RWIVHTGQGNHMIMKNMVQXSYUYWXYWZT[Q[NZLXNX RXXUZ",2720:" 8G^[BIbJb R[B\\BJb",2721:" 24KYUBSDQGOKNPNTOYQ]S`UbVb RUBVBTDRGPKOPOTPYR]T`Vb",2722:" 24KYNBPDRGTKUPUTTYR]P`NbOb RNBOBQDSGUKVPVTUYS]Q`Ob",2723:" 39JZRFQGSQRR RRFRR RRFSGQQRR RMINIVOWO RMIWO RMIMJWNWO RWIVINOMO RWIMO RWIWJMNMO",2724:" 8F_JQ[Q[R RJQJR[R",2725:" 16F_RIRZSZ RRISISZ RJQ[Q[R RJQJR[R",2726:" 16F_JM[M[N RJMJN[N RJU[U[V RJUJV[V",2727:" 11NWSFRGRM RSGRM RSFTGRM",2728:" 22I[NFMGMM RNGMM RNFOGMM RWFVGVM RWGVM RWFXGVM",2729:" 30KYQFOGNINKOMQNSNUMVKVIUGSFQF RQFNIOMSNVKUGQF RSFOGNKQNUMVISF",2750:" 42H]TFQGOIMLLOKSKVLYMZO[Q[TZVXXUYRZNZKYHXGVFTF RTFRGPINLMOLSLVMYO[ RQ[SZUXWUXRYNYKXHVF",2751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PH RSFPG RJZG[ RJYH[ RKYL[ RJZM[",3053:" 41H]ZH[H\\F[L[JZHYGWFTFQGOIMLLOKSKVLYMZP[S[UZWXXV RQHOJNLMOLSLWMY RTFRGPJOLNOMSMXNZP[",3054:" 63F]OFI[ RPFJ[ RQFK[ RLFUFXGYHZKZOYSWWUYSZO[F[ RWGXHYKYOXSVWTY RUFWHXKXOWSUWRZO[ RMFPG RNFOH RRFPH RSFPG RJZG[ RJYH[ RKYL[ RJZM[",3055:" 80F]OFI[ RPFJ[ RQFK[ RULST RLF[FZL RNPTP RF[U[WV RMFPG RNFOH RRFPH RSFPG RWFZG RXFZH RYFZI RZFZL RULSPST RTNRPSR RTOQPSQ RJZG[ RJYH[ RKYL[ RJZM[ RP[UZ RR[UY RUYWV",3056:" 70F\\OFI[ RPFJ[ RQFK[ RULST RLF[FZL RNPTP RF[N[ RMFPG RNFOH RRFPH RSFPG RWFZG RXFZH RYFZI RZFZL RULSPST RTNRPSR RTOQPSQ RJZG[ RJYH[ RKYL[ RJZM[",3057:" 65H^ZH[H\\F[L[JZHYGWFTFQGOIMLLOKSKVLYMZP[R[UZWXYT RQHOJNLMOLSLWMY RVXWWXT RTFRGPJOLNOMSMXNZP[ RR[TZVWWT RTT\\T RUTWU RVTWW RZTXV R[TXU",3058:" 81E_NFH[ ROFI[ RPFJ[ RZFT[ R[FU[ R\\FV[ RKFSF RWF_F RLPXP RE[M[ RQ[Y[ RLFOG RMFNH RQFOH RRFOG RXF[G RYFZH R]F[H R^F[G RIZF[ RIYG[ RJYK[ RIZL[ RUZR[ RUYS[ RVYW[ RUZX[",3059:" 39KYTFN[ RUFO[ RVFP[ RQFYF RK[S[ RRFUG RSFTH RWFUH RXFUG ROZL[ ROYM[ RPYQ[ ROZR[",3060:" 47I\\WFRWQYO[ RXFTSSVRX RYFUSSXQZO[M[KZJXJVKULUMVMWLXKX RKVKWLWLVKV RTF\\F RUFXG RVFWH RZFXH R[FXG",3061:" 72F]OFI[ RPFJ[ RQFK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JZHYGVFRFOGMIMLNNPPVSWUWXVZ RNLONVRWT ROGNINKOMUPWRXTXWWYVZS[O[LZKYJWJUI[JYKY",3070:" 54G]TFN[ RUFO[ RVFP[ RMFKL R]F\\L RMF]F RK[S[ RNFKL RPFLI RRFMG RYF\\G RZF\\H R[F\\I R\\F\\L ROZL[ ROYM[ RPYQ[ ROZR[",3071:" 48F_NFKQJUJXKZN[R[UZWXXU\\G ROFLQKUKYLZ RPFMQLULYN[ RKFSF RYF_F RLFOG RMFNH RQFOH RRFOG RZF\\G R^F\\G",3072:" 35H\\NFNHOYO[ ROGPX RPFQW R[GO[ RLFSF RXF^F RMFNH RQFPH RRFOG RYF[G R]F[G",3073:" 57E_MFMHKYK[ RNGLX ROFMW RUFMWK[ RUFUHSYS[ RVGTX RWFUW R]GUWS[ RJFRF RUFWF RZF`F RKFNG RLFMH RPFNI RQFNG R[F]G R_F]G",3074:" 54G]NFT[ ROFU[ RPFV[ R[GIZ RLFSF RXF^F RF[L[ RQ[X[ RMFOH RQFPH RRFPG RYF[G R]F[G RIZG[ RIZK[ RTZR[ RTYS[ RUYW[",3075:" 51G]MFQPN[ RNFRPO[ ROFSPP[ R\\GSP RKFRF RYF_F RK[S[ RLFNG RPFOH RQFNG RZF\\G R^F\\G ROZL[ ROYM[ RPYQ[ ROZR[",3076:" 35G]ZFH[ R[FI[ R\\FJ[ R\\FNFLL RH[V[XU ROFLL RPFMI RRFNG RR[VZ RT[WX RU[XU",3101:" 54I]NPNOOOOQMQMONNPMTMVNWOXQXXYZZ[ RVOWQWXXZ RTMUNVPVXWZZ[[[ RVRUSPTMULWLXMZP[S[UZVX RNUMWMXNZ RUSQTOUNWNXOZP[",3102:" 47G\\LFL[MZOZ RMGMY RIFNFNZ RNPONQMSMVNXPYSYUXXVZS[Q[OZNX RWPXRXVWX RSMUNVOWRWVVYUZS[ RJFLG RKFLH",3103:" 34H[WQWPVPVRXRXPVNTMQMNNLPKSKULXNZQ[S[VZXX RMPLRLVMX RQMONN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YX[X RUOUX RURYR RUUYU",3503:" 69E]NGLHJJILHOHSIVJXMZP[S[VZXYZW[U RJKINISKWNYQZTZWY RNGLIKKJNJRKUNXQYTYWXYW[U RPJPV RQJQT RRIRSQUPV RPJRIUFWGYGZF RTGVHXH RSHUIWIYHZF RWIWX",3504:" 72G^IFWFYGZIZX RKGWGYIYW RIFJGLHWHXIXX ROKNLMNMOKOJPJRKQMQMV RNMNT RKPNP ROKOSNUMV RI[LYOXSXVY RKZNYSYUZ RI[MZRZT[VYXXZX RRHRX RRMTNVNXM RRSTRVRXS",3505:" 94G]IHKFMFOGQF RLGNG RIHKGMHOHQF RNKMLLNLOJOIPIRJQLQLW RMMMU RJPMP RNKNTMVLW RQMRJSHTGVFXF[G RTHVGXGZH RRJSIUHWHYI[G RQURRSPTOVOXP RTPVPWQ RRRSQUQVRXP RK[NYRXWX[Y RMZPYWYZZ RK[OZVZY[[Y RQMQX",3506:" 91F]JHLFOFQGSF RMGPG RJHLGNHQHSF RPKOLNNNOLOKPKRLQNQNV ROMOT RLPOP RPKPSOUNV RSJSYRZQZMXKXIYG[ RTJTX RTPXP RPZOZMYJY RUIUOXO RXQUQUWTYP[N[LZJZG[ RSJUIXFZG\\G]F RWGYH[H RVHXIZI\\H]F RXIXW",3507:" 87E^NGLHJJILHOHRIUJWLYNZQ[U[XZZX[V[SZQYPWOUO RJKINISJV RNGLIKKJNJSKVLXNZ RYXZWZSYQ RU[WZXYYWYSXQWPUO RPJPW RQJQU RRIRTQVPW RPJRIUFWGYGZF RTGVHXH RSHUIWIYHZF RYHUOU[ RUSYS RUVYV",3508:"112F^HHJFMFOGQF RKGNG RHHJGLHOHQF RMKLLKNKOIOHPHRIQKQKW RLMLU RIPLP RMKMTLVKW RJ[MYPXSXUY RLZOYRYTZ RJ[NZQZS[UY RRIQJPLPU RQKQS RRIRRQTPU RRITGVFXFZG RWGXGYH RTGVGXIZG RUOWNYLZM[P[TZXX[ RXMYNZPZUYX RWNXNYPYUX[ RUOUY RUR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YM RUNVOWO RTOVPXOYM RQUN[MZKZJ[ RNZMYLY ROYMXKYJ[ RMTPT RSTVT",3625:" 60I[KOLOMPMXKY RLNNONYPZ RKOMMOOOXQYRY RKYLYNZO[PZRYUX RUMVNXOYOWPW\\V_TaRbQaO`M` RTNVOV\\ RSaQ`P` RUMSOUPUZV]V_ RTaS`Q_O_M`",3626:" 38I[XML[ RLONPQPTOXM RMNOOSO RLONMPNTNXM RL[PYSXVXXY RQYUYWZ RL[PZTZV[XY RNTVT",3700:" 42H\\LHLXJY RMIMXPZ RNHNXPYQZ RLHNHSGUF RSGTHVIVY RTGWIWX RUFVGXHZHXIXY RJYLYNZO[QZVYXY",3701:" 27H\\OHPIQKQXOY RQIPHQGRIRYTZ ROHRFSHSXUYVY ROYPYRZS[TZVY",3702:" 48H\\LHNHPGQFSGVHXH RPHRG RLHNIPIRHSG RVHVP RWIWO RXHXPQPNQLSKVK[ RK[OYSXVXZY RNZQYVYYZ RK[PZUZX[ZY",3703:" 57H\\LHMHOGPFRGVHXH ROHQG RLHNIPIRG RVHVO RWIWN RXHXOVOSPQQ RQPSQVRXRXY RWSWX RVRVY RKYMXOXQYRZ ROYQZ RKYMYOZP[RZVYXY",3704:" 41H\\UFKPKUTU RVUZU[V[TZU RLPLT RMNMU RTGTXRY RUJVHUGUYWZ RUFWHVJVXXYYY RRYSYUZV[WZYY",3705:" 53H\\LFLO RLFXF RMGVG RLHUHWGXF RVLUMSNOOLO RSNTNVOVY RUMWNWX RVLWMYNZNXOXY RKYMXOXQYRZ ROYQZ RKYMYOZP[RZVYXY",3706:" 59H\\LHLXJY RMIMXPZ RNHNXPYQZ RLHNHRGTFUGWHXH RSGUH RRGTIVIXH RNPOPSOUNVM RSOTOVPVY RUNWPWX RVMWNYOZOXPXY RJYLYNZO[QZVYXY",3707:" 38H\\KHMFPGUGZF RLGOHTHWG RKHOIRIVHZF RZFYHWKSOQRPUPXQ[ RRQQTQWRZ RUMSPRSRVSYQ[",3708:" 71H\\LILO RMJMN RNINO RLINISHUGVF RSHTHVIVO RUGWHWN RVFWGYHZHXIXO RLONOVRXR RXOVONRLR RLRLXJY RMSMXPZ RNRNXPYQZ RVRVY RWSWX RXRXY RJYLYNZO[QZVYXY",3709:" 60H\\LHLQJR RMIMROS RNHNQPRQR RLHNHSGUF RSGTHVIVY RTGWIWX RUFVGXHZHXIXY RJRKRMSNTOSQRUQVQ RKYMXOXQYRZ ROYQZ RKYMYOZP[RZVYXY",3710:" 11LXRXPZR[TZRX RRYQZSZRY",3711:" 14LXR^R\\PZRXSZS\\R^P_ RRYQZR[RY",3712:" 22LXRMPORPTORM RRNQOSORN RRXPZR[TZRX RRYQZSZRY",3713:" 25LXRMPORPTORM RRNQOSORN RR^R\\PZRXSZS\\R^P_ RRYQZR[RY",3714:" 30LXRFQGOHQIRT RRISHRGQHRIRT RRFSGUHSIRT RRXPZR[TZRX RRYQZSZRY",3715:" 51I[LJMHNGQFSFVGWHXJXLWNUPSQ RMJNH RVHWIWMVN RLJNKNIOGQF RSFUGVIVMUOSQ RRQRTSQQQRT RRXPZR[TZRX RRYQZSZRY",3716:" 14LXTFRGQIQKRMTKRIRG RRJRLSKRJ",3717:" 14LXRLRJPHRFSHSJRLPM RRGQHRIRG",3718:" 62E_YNZO[O\\N RXOYP[P RXPYQZQ[P\\N RYNST RRUL[HVNP ROOSKOFJLPRTXVZX[Z[[Z\\X RLZIV RRKOG RKLPQTWVYXZ[Z RMZIU RRLNG RKKQQUWVXXY[Y\\X",3719:" 60H\\PBP_ RTBT_ RTFVGWIWKYJXHWGTFPFMGKIKLLNOPURWSXUXXWZ RXJWH RLLMNOOUQWRXT RMYLW RMGLILKMMONUPXRYTYWXYWZT[P[MZLYKWMVMXNZP[",3720:" 8G^[BIbJb R[B\\BJb",3721:" 27KYUBSDQGOKNPNTOYQ]S`Ub RQHPKOOOUPYQ\\ RSDRFQIPOPUQ[R^S`",3722:" 27KYOBQDSGUKVPVTUYS]Q`Ob RSHTKUOUUTYS\\ RQD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LMMOMXQ[SYWW RMNNONXQZ RLMNNOOOWRYSY RVMXOWPWW RVPWOVNUOVPVW RVMTOUPUX",3923:" 59E_HMIOIXM[OYQX RINJOJXMZ RHMJNKOKWNYOY RRMPOQPQXU[WY[W RRPSORNQORPRXUZ RRMTOSPSWVYWY RZM\\O[P[W RZP[OZNYOZPZW RZMXOYPYX",3924:" 39I[LONPUZV[XY RMNOOUYWZ RLONMONVXXY RXMVMVOXOXMVOSS RQUNYL[N[NYLYL[ RNTQT RSTVT",3925:" 49I[KOLOMPMYP[UY RMNNONYPZ RKOMMOOOXRZ RVMXOWPW]V_U`SaQaO`MaObQa RVPWOVNUOVPV^U_ RPaNa RVMTOUPU^T`Sa",3926:" 43L[RNOPOORNTMWOWSRU RTNVOVS RRNUPUSTT RRUWWW]V_U`SaQaO`MaObQa RVWV^U_ RPaNa RTVUWU^T`Sa"},gt={"\\frac":{glyph:0,arity:2,flags:{}},"\\binom":{glyph:0,arity:2,flags:{}},"\\sqrt":{glyph:2267,arity:1,flags:{opt:!0,xfl:!0,yfl:!0}},"^":{glyph:0,arity:1,flags:{}},_:{glyph:0,arity:1,flags:{}},"(":{glyph:2221,arity:0,flags:{yfl:!0}},")":{glyph:2222,arity:0,flags:{yfl:!0}},"[":{glyph:2223,arity:0,flags:{yfl:!0}},"]":{glyph:2224,arity:0,flags:{yfl:!0}},"\\langle":{glyph:2227,arity:0,flags:{yfl:!0}},"\\rangle":{glyph:2228,arity:0,flags:{yfl:!0}},"|":{glyph:2229,arity:0,flags:{yfl:!0}},"\\|":{glyph:2230,arity:0,flags:{yfl:!0}},"\\{":{glyph:2225,arity:0,flags:{yfl:!0}},"\\}":{glyph:2226,arity:0,flags:{yfl:!0}},"\\#":{glyph:2275,arity:0,flags:{}},"\\$":{glyph:2274,arity:0,flags:{}},"\\&":{glyph:2273,arity:0,flags:{}},"\\%":{glyph:2271,arity:0,flags:{}},"\\begin":{glyph:0,arity:1,flags:{}},"\\end":{glyph:0,arity:1,flags:{}},"\\left":{glyph:0,arity:1,flags:{}},"\\right":{glyph:0,arity:1,flags:{}},"\\middle":{glyph:0,arity:1,flags:{}},"\\cdot":{glyph:2236,arity:0,flags:{}},"\\pm":{glyph:2233,arity:0,flags:{}},"\\mp":{glyph:2234,arity:0,flags:{}},"\\times":{glyph:2235,arity:0,flags:{}},"\\div":{glyph:2237,arity:0,flags:{}},"\\leqq":{glyph:2243,arity:0,flags:{}},"\\geqq":{glyph:2244,arity:0,flags:{}},"\\leq":{glyph:2243,arity:0,flags:{}},"\\geq":{glyph:2244,arity:0,flags:{}},"\\propto":{glyph:2245,arity:0,flags:{}},"\\sim":{glyph:2246,arity:0,flags:{}},"\\equiv":{glyph:2240,arity:0,flags:{}},"\\dagger":{glyph:2277,arity:0,flags:{}},"\\ddagger":{glyph:2278,arity:0,flags:{}},"\\ell":{glyph:662,arity:0,flags:{}},"\\vec":{glyph:2261,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\overrightarrow":{glyph:2261,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\overleftarrow":{glyph:2263,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\bar":{glyph:2231,arity:1,flags:{hat:!0,xfl:!0}},"\\overline":{glyph:2231,arity:1,flags:{hat:!0,xfl:!0}},"\\widehat":{glyph:2247,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\hat":{glyph:2247,arity:1,flags:{hat:!0}},"\\acute":{glyph:2248,arity:1,flags:{hat:!0}},"\\grave":{glyph:2249,arity:1,flags:{hat:!0}},"\\breve":{glyph:2250,arity:1,flags:{hat:!0}},"\\tilde":{glyph:2246,arity:1,flags:{hat:!0}},"\\underline":{glyph:2231,arity:1,flags:{mat:!0,xfl:!0}},"\\not":{glyph:2220,arity:1,flags:{}},"\\neq":{glyph:2239,arity:1,flags:{}},"\\ne":{glyph:2239,arity:1,flags:{}},"\\exists":{glyph:2279,arity:0,flags:{}},"\\in":{glyph:2260,arity:0,flags:{}},"\\subset":{glyph:2256,arity:0,flags:{}},"\\supset":{glyph:2258,arity:0,flags:{}},"\\cup":{glyph:2257,arity:0,flags:{}},"\\cap":{glyph:2259,arity:0,flags:{}},"\\infty":{glyph:2270,arity:0,flags:{}},"\\partial":{glyph:2265,arity:0,flags:{}},"\\nabla":{glyph:2266,arity:0,flags:{}},"\\aleph":{glyph:2077,arity:0,flags:{}},"\\wp":{glyph:2190,arity:0,flags:{}},"\\therefore":{glyph:740,arity:0,flags:{}},"\\mid":{glyph:2229,arity:0,flags:{}},"\\sum":{glyph:2402,arity:0,flags:{big:!0}},"\\prod":{glyph:2401,arity:0,flags:{big:!0}},"\\bigoplus":{glyph:2284,arity:0,flags:{big:!0}},"\\bigodot":{glyph:2281,arity:0,flags:{big:!0}},"\\int":{glyph:2412,arity:0,flags:{yfl:!0}},"\\oint":{glyph:2269,arity:0,flags:{yfl:!0}},"\\oplus":{glyph:1284,arity:0,flags:{}},"\\odot":{glyph:1281,arity:0,flags:{}},"\\perp":{glyph:738,arity:0,flags:{}},"\\angle":{glyph:739,arity:0,flags:{}},"\\triangle":{glyph:842,arity:0,flags:{}},"\\Box":{glyph:841,arity:0,flags:{}},"\\rightarrow":{glyph:2261,arity:0,flags:{}},"\\to":{glyph:2261,arity:0,flags:{}},"\\leftarrow":{glyph:2263,arity:0,flags:{}},"\\gets":{glyph:2263,arity:0,flags:{}},"\\circ":{glyph:902,arity:0,flags:{}},"\\bigcirc":{glyph:904,arity:0,flags:{}},"\\bullet":{glyph:828,arity:0,flags:{}},"\\star":{glyph:856,arity:0,flags:{}},"\\diamond":{glyph:743,arity:0,flags:{}},"\\ast":{glyph:728,arity:0,flags:{}},"\\log":{glyph:0,arity:0,flags:{txt:!0}},"\\ln":{glyph:0,arity:0,flags:{txt:!0}},"\\exp":{glyph:0,arity:0,flags:{txt:!0}},"\\mod":{glyph:0,arity:0,flags:{txt:!0}},"\\lim":{glyph:0,arity:0,flags:{txt:!0,big:!0}},"\\sin":{glyph:0,arity:0,flags:{txt:!0}},"\\cos":{glyph:0,arity:0,flags:{txt:!0}},"\\tan":{glyph:0,arity:0,flags:{txt:!0}},"\\csc":{glyph:0,arity:0,flags:{txt:!0}},"\\sec":{glyph:0,arity:0,flags:{txt:!0}},"\\cot":{glyph:0,arity:0,flags:{txt:!0}},"\\sinh":{glyph:0,arity:0,flags:{txt:!0}},"\\cosh":{glyph:0,arity:0,flags:{txt:!0}},"\\tanh":{glyph:0,arity:0,flags:{txt:!0}},"\\csch":{glyph:0,arity:0,flags:{txt:!0}},"\\sech":{glyph:0,arity:0,flags:{txt:!0}},"\\coth":{glyph:0,arity:0,flags:{txt:!0}},"\\arcsin":{glyph:0,arity:0,flags:{txt:!0}},"\\arccos":{glyph:0,arity:0,flags:{txt:!0}},"\\arctan":{glyph:0,arity:0,flags:{txt:!0}},"\\arccsc":{glyph:0,arity:0,flags:{txt:!0}},"\\arcsec":{glyph:0,arity:0,flags:{txt:!0}},"\\arccot":{glyph:0,arity:0,flags:{txt:!0}},"\\text":{glyph:0,arity:1,flags:{}},"\\mathnormal":{glyph:0,arity:1,flags:{}},"\\mathrm":{glyph:0,arity:1,flags:{}},"\\mathit":{glyph:0,arity:1,flags:{}},"\\mathbf":{glyph:0,arity:1,flags:{}},"\\mathsf":{glyph:0,arity:1,flags:{}},"\\mathtt":{glyph:0,arity:1,flags:{}},"\\mathfrak":{glyph:0,arity:1,flags:{}},"\\mathcal":{glyph:0,arity:1,flags:{}},"\\mathbb":{glyph:0,arity:1,flags:{}},"\\mathscr":{glyph:0,arity:1,flags:{}},"\\rm":{glyph:0,arity:1,flags:{}},"\\it":{glyph:0,arity:1,flags:{}},"\\bf":{glyph:0,arity:1,flags:{}},"\\sf":{glyph:0,arity:1,flags:{}},"\\tt":{glyph:0,arity:1,flags:{}},"\\frak":{glyph:0,arity:1,flags:{}},"\\cal":{glyph:0,arity:1,flags:{}},"\\bb":{glyph:0,arity:1,flags:{}},"\\scr":{glyph:0,arity:1,flags:{}},"\\quad":{glyph:0,arity:0,flags:{}},"\\,":{glyph:0,arity:0,flags:{}},"\\.":{glyph:0,arity:0,flags:{}},"\\;":{glyph:0,arity:0,flags:{}},"\\!":{glyph:0,arity:0,flags:{}},"\\alpha":{glyph:2127,flags:{}},"\\beta":{glyph:2128,flags:{}},"\\gamma":{glyph:2129,flags:{}},"\\delta":{glyph:2130,flags:{}},"\\varepsilon":{glyph:2131,flags:{}},"\\zeta":{glyph:2132,flags:{}},"\\eta":{glyph:2133,flags:{}},"\\vartheta":{glyph:2134,flags:{}},"\\iota":{glyph:2135,flags:{}},"\\kappa":{glyph:2136,flags:{}},"\\lambda":{glyph:2137,flags:{}},"\\mu":{glyph:2138,flags:{}},"\\nu":{glyph:2139,flags:{}},"\\xi":{glyph:2140,flags:{}},"\\omicron":{glyph:2141,flags:{}},"\\pi":{glyph:2142,flags:{}},"\\rho":{glyph:2143,flags:{}},"\\sigma":{glyph:2144,flags:{}},"\\tau":{glyph:2145,flags:{}},"\\upsilon":{glyph:2146,flags:{}},"\\varphi":{glyph:2147,flags:{}},"\\chi":{glyph:2148,flags:{}},"\\psi":{glyph:2149,flags:{}},"\\omega":{glyph:2150,flags:{}},"\\epsilon":{glyph:2184,flags:{}},"\\theta":{glyph:2185,flags:{}},"\\phi":{glyph:2186,flags:{}},"\\varsigma":{glyph:2187,flags:{}},"\\Alpha":{glyph:2027,flags:{}},"\\Beta":{glyph:2028,flags:{}},"\\Gamma":{glyph:2029,flags:{}},"\\Delta":{glyph:2030,flags:{}},"\\Epsilon":{glyph:2031,flags:{}},"\\Zeta":{glyph:2032,flags:{}},"\\Eta":{glyph:2033,flags:{}},"\\Theta":{glyph:2034,flags:{}},"\\Iota":{glyph:2035,flags:{}},"\\Kappa":{glyph:2036,flags:{}},"\\Lambda":{glyph:2037,flags:{}},"\\Mu":{glyph:2038,flags:{}},"\\Nu":{glyph:2039,flags:{}},"\\Xi":{glyph:2040,flags:{}},"\\Omicron":{glyph:2041,flags:{}},"\\Pi":{glyph:2042,flags:{}},"\\Rho":{glyph:2043,flags:{}},"\\Sigma":{glyph:2044,flags:{}},"\\Tau":{glyph:2045,flags:{}},"\\Upsilon":{glyph:2046,flags:{}},"\\Phi":{glyph:2047,flags:{}},"\\Chi":{glyph:2048,flags:{}},"\\Psi":{glyph:2049,flags:{}},"\\Omega":{glyph:2050,flags:{}}};function vn(o,t="math"){const e=o.charCodeAt(0);if(65<=e&&e<=90){const n=e-65;return t=="text"||t=="rm"?n+2001:t=="tt"?n+501:t=="bf"||t=="bb"?n+3001:t=="sf"?n+2501:t=="frak"?n+3301:t=="scr"||t=="cal"?n+2551:n+2051}if(97<=e&&e<=122){const n=e-97;return t=="text"||t=="rm"?n+2101:t=="tt"?n+601:t=="bf"||t=="bb"?n+3101:t=="sf"?n+2601:t=="frak"?n+3401:t=="scr"||t=="cal"?n+2651:n+2151}if(48<=e&&e<=57){const n=e-48;return t=="it"?n+2750:t=="bf"?n+3200:t=="tt"?n+700:n+2200}return{".":2210,",":2211,":":2212,";":2213,"!":2214,"?":2215,"'":2216,'"':2217,"*":2219,"/":2220,"-":2231,"+":2232,"=":2238,"<":2241,">":2242,"~":2246,"@":2273,"\\":804}[o]}const te={SUB_SUP_SCALE:.5,SQRT_MAG_SCALE:.5,FRAC_SCALE:.85,LINE_SPACING:.5,FRAC_SPACING:.4};function fl(o){o=o.replace(/\n/g," ");let t=0;const e=[];let n="";for(;t<o.length;)o[t]==" "?n.length&&(e.push(n),n=""):o[t]=="\\"?n.length==1&&n[0]=="\\"?(n+=o[t],e.push(n),n=""):(n.length&&e.push(n),n=o[t]):/[A-Za-z0-9\.]/.test(o[t])?n+=o[t]:(n.length&&n!="\\"&&(e.push(n),n=""),n+=o[t],e.push(n),n=""),t++;return n.length&&e.push(n),e}function Tl(o){return{type:gt[o]?"symb":"char",mode:"math",text:o,chld:[],bbox:null}}function bo(o){let t=0,e={type:"node",text:"",mode:"math",chld:[],bbox:null};function n(){if(o[t]!="[")return null;let r=0,s=t;for(;s<o.length;){if(o[s]=="[")r++;else if(o[s]=="]"&&(r--,!r))break;s++}const a=bo(o.slice(t+1,s));return t=s,a}function i(r){let s=t,a=s,c=0,d=0;const u=[];for(;s<o.length;){if(o[s]=="{")c||(a=s),c++;else if(o[s]=="}"){if(c--,!c&&(u.push(bo(o.slice(a+1,s))),d++,d==r))break}else if(c==0&&(u.push(Tl(o[s])),d++,d==r))break;s++}return t=s,u}for(t=0;t<o.length;t++){const r=gt[o[t]],s={type:"",text:o[t],mode:"math",chld:[],bbox:null};if(r)if(r.arity){t++,s.type="func";let a=null;r.flags.opt&&(a=n(),a&&t++);const c=i(r.arity);s.chld=c,a&&s.chld.push(a)}else s.type="symb";else o[t]=="{"?(s.type="node",s.text="",s.chld=i(1)):s.type="char";e.chld.push(s)}return e.chld.length==1&&(e=e.chld[0]),e}function Ki(o){let t=0;for(;t<o.length;){if(o[t].text=="\\begin"){let e;for(e=t;e<o.length&&o[e].text!="\\end";e++);const n=o.splice(t+1,e-(t+1));Ki(n),o[t].text=o[t].chld[0].text,o[t].chld=n,o.splice(t+1,1)}t++}}function kt(o,t,e,n,i,r){if(e==null&&(e=t),!!o.bbox){r&&(o.bbox.x*=t,o.bbox.y*=e),o.bbox.w*=t,o.bbox.h*=e;for(let s=0;s<o.chld.length;s++)kt(o.chld[s],t,e,0,0,!0);o.bbox.x+=n,o.bbox.y+=i}}function Hi(o){let t=1/0,e=-1/0,n=1/0,i=-1/0;for(let r=0;r<o.length;r++)o[r].bbox&&(t=Math.min(t,o[r].bbox.x),n=Math.min(n,o[r].bbox.y),e=Math.max(e,o[r].bbox.x+o[r].bbox.w),i=Math.max(i,o[r].bbox.y+o[r].bbox.h));return{x:t,y:n,w:e-t,h:i-n}}function ml(o){if(!o.length)return null;const t=Hi(o);for(let n=0;n<o.length;n++)o[n].bbox&&(o[n].bbox.x-=t.x,o[n].bbox.y-=t.y);return{type:"node",text:"",mode:"math",chld:o,bbox:t}}function pl(o,t="center"){for(let d=0;d<o.length;d++)if(o[d].text=="^"||o[d].text=="'"){let u=0,R=d;for(;R>0&&(o[R].text=="^"||o[R].text=="_"||o[R].text=="'");)R--;u=o[R].bbox.y,o[d].text=="'"?o[d].bbox.y=u:(kt(o[d],te.SUB_SUP_SCALE,null,0,0),gt[o[R].text]&>[o[R].text].flags.big?o[d].bbox.y=u-o[d].bbox.h:o[R].text=="\\int"?o[d].bbox.y=u:o[d].bbox.y=u-o[d].bbox.h/2)}else if(o[d].text=="_"){let u=1,R=d;for(;R>0&&(o[R].text=="^"||o[R].text=="_"||o[R].text=="'");)R--;u=o[R].bbox.y+o[R].bbox.h,kt(o[d],te.SUB_SUP_SCALE,null,0,0),gt[o[R].text]&>[o[R].text].flags.big?o[d].bbox.y=u:o[R].text=="\\int"?o[d].bbox.y=u-o[d].bbox.h:o[d].bbox.y=u-o[d].bbox.h/2}function e(d,u,R,h,g){let f=d,T=g,m=1/0,p=-1/0;for(;h>0?f<o.length:f>=0;){if(o[f].text==u)T++;else if(o[f].text==R){if(T--,T==0)break}else o[f].text=="^"||o[f].text=="_"||o[f].bbox&&(m=Math.min(m,o[f].bbox.y),p=Math.max(p,o[f].bbox.y+o[f].bbox.h));f+=h}return[m,p]}for(let d=0;d<o.length;d++)if(o[d].text=="\\left"){const[u,R]=e(d,"\\left","\\right",1,0);u!=1/0&&R!=-1/0&&(o[d].bbox.y=u,kt(o[d],1,(R-u)/o[d].bbox.h,0,0))}else if(o[d].text=="\\right"){const[u,R]=e(d,"\\right","\\left",-1,0);u!=1/0&&R!=-1/0&&(o[d].bbox.y=u,kt(o[d],1,(R-u)/o[d].bbox.h,0,0))}else if(o[d].text=="\\middle"){const[u,R]=e(d,"\\right","\\left",-1,1),[h,g]=e(d,"\\left","\\right",1,1),f=Math.min(u,h),T=Math.max(R,g);f!=1/0&&T!=-1/0&&(o[d].bbox.y=f,kt(o[d],1,(T-f)/o[d].bbox.h,0,0))}if(!o.some(d=>d.text=="&"||d.text=="\\\\"))return;const n=[];let i=[],r=[];for(let d=0;d<o.length;d++)o[d].text=="&"?(i.push(r),r=[]):o[d].text=="\\\\"?(r.length&&(i.push(r),r=[]),n.push(i),i=[]):r.push(o[d]);r.length&&i.push(r),i.length&&n.push(i);const s=[],a=[];for(let d=0;d<n.length;d++){const u=[];for(let R=0;R<n[d].length;R++){const h=ml(n[d][R]);h&&(s[R]=s[R]||0,s[R]=Math.max(h.bbox.w+1,s[R])),u[R]=h}a.push(u)}const c=[];for(let d=0;d<a.length;d++){let u=1/0,R=-1/0;for(let h=0;h<a[d].length;h++)a[d][h]&&(u=Math.min(u,a[d][h].bbox.y),R=Math.max(R,a[d][h].bbox.y+a[d][h].bbox.h));c.push([u,R])}for(let d=0;d<c.length;d++)(c[d][0]==1/0||c[d][1]==1/0)&&(c[d][0]=d==0?0:c[d-1][1],c[d][1]=c[d][0]+2);for(let d=1;d<a.length;d++){const u=c[d-1][1]-c[d][0]+te.LINE_SPACING;for(let R=0;R<a[d].length;R++)a[d][R]&&(a[d][R].bbox.y+=u);c[d][0]+=u,c[d][1]+=u}o.splice(0,o.length);for(let d=0;d<a.length;d++){let u=0;for(let R=0;R<a[d].length;R++){const h=a[d][R];if(!h){u+=s[R];continue}h.bbox.x+=u,u+=s[R]-h.bbox.w,t=="center"?h.bbox.x+=(s[R]-h.bbox.w)/2:t=="left"||(t=="right"||t=="equation"&&R!=a[d].length-1)&&(h.bbox.x+=s[R]-h.bbox.w),o.push(h)}}}function he(o,t="math"){const e={"\\text":"text","\\mathnormal":"math","\\mathrm":"rm","\\mathit":"it","\\mathbf":"bf","\\mathsf":"sf","\\mathtt":"tt","\\mathfrak":"frak","\\mathcal":"cal","\\mathbb":"bb","\\mathscr":"scr","\\rm":"rm","\\it":"it","\\bf":"bf","\\sf":"tt","\\tt":"tt","\\frak":"frak","\\cal":"cal","\\bb":"bb","\\scr":"scr"}[o.text]??t;if(!o.chld.length){if(gt[o.text])if(gt[o.text].flags.big)o.text=="\\lim"?o.bbox={x:0,y:0,w:3.5,h:2}:o.bbox={x:0,y:-.5,w:3,h:3};else if(gt[o.text].flags.txt){let n=0;for(let i=1;i<o.text.length;i++)n+=qe(vn(o.text[i],"text")).w;n/=16,o.bbox={x:0,y:0,w:n,h:2}}else if(gt[o.text].glyph){let n=qe(gt[o.text].glyph).w;n/=16,o.text=="\\int"||o.text=="\\oint"?o.bbox={x:0,y:-1.5,w:n,h:5}:o.bbox={x:0,y:0,w:n,h:2}}else o.bbox={x:0,y:0,w:1,h:2};else{let n=0;for(let i=0;i<o.text.length;i++)qe(vn(o.text[i],e))&&(e=="tt"?n+=16:n+=qe(vn(o.text[i],e)).w);n/=16,o.bbox={x:0,y:0,w:n,h:2}}o.mode=e;return}if(o.text=="\\frac"){const n=o.chld[0],i=o.chld[1],r=te.FRAC_SCALE;he(n),he(i),n.bbox.x=0,n.bbox.y=0,i.bbox.x=0,i.bbox.y=0;const s=Math.max(n.bbox.w,i.bbox.w)*r;kt(n,r,null,(s-n.bbox.w*r)/2,0),kt(i,r,null,(s-i.bbox.w*r)/2,n.bbox.h+te.FRAC_SPACING),o.bbox={x:0,y:-n.bbox.h+1-te.FRAC_SPACING/2,w:s,h:n.bbox.h+i.bbox.h+te.FRAC_SPACING}}else if(o.text=="\\binom"){const n=o.chld[0],i=o.chld[1];he(n),he(i),n.bbox.x=0,n.bbox.y=0,i.bbox.x=0,i.bbox.y=0;const r=Math.max(n.bbox.w,i.bbox.w);kt(n,1,null,(r-n.bbox.w)/2+1,0),kt(i,1,null,(r-i.bbox.w)/2+1,n.bbox.h),o.bbox={x:0,y:-n.bbox.h+1,w:r+2,h:n.bbox.h+i.bbox.h}}else if(o.text=="\\sqrt"){const n=o.chld[0];he(n);const i=o.chld[1];let r=0;i&&(he(i),r=Math.max(i.bbox.w*te.SQRT_MAG_SCALE-.5,0),kt(i,te.SQRT_MAG_SCALE,null,0,.5)),kt(n,1,null,1+r,.5),o.bbox={x:0,y:2-n.bbox.h-.5,w:n.bbox.w+1+r,h:n.bbox.h+.5}}else if(gt[o.text]&>[o.text].flags.hat){const n=o.chld[0];he(n);const i=n.bbox.y-.5;n.bbox.y=.5,o.bbox={x:0,y:i,w:n.bbox.w,h:n.bbox.h+.5}}else if(gt[o.text]&>[o.text].flags.mat){const n=o.chld[0];he(n),o.bbox={x:0,y:0,w:n.bbox.w,h:n.bbox.h+.5}}else{let n=0,i=0,r=1;for(let R=0;R<o.chld.length;R++){const h=o.chld[R],g={"\\quad":2,"\\,":6/18,"\\:":8/18,"\\;":10/18,"\\!":-6/18}[h.text]??null;if(h.text=="\\\\"){i+=r,n=0,r=1;continue}else{if(h.text=="&")continue;if(g!=null){n+=g;continue}else{if(he(h,e),kt(h,1,null,n,i),h.text=="^"||h.text=="_"||h.text=="'"){let f=R;for(;f>0&&(o.chld[f].text=="^"||o.chld[f].text=="_"||o.chld[f].text=="'");)f--;const T=gt[o.chld[f].text]&>[o.chld[f].text].flags.big;if(h.text=="'"){let m=f+1,p=0;for(;m<R;)o.chld[m].text=="'"&&p++,m++;h.bbox.x=o.chld[f].bbox.x+o.chld[f].bbox.w+h.bbox.w*p,n=Math.max(n,h.bbox.x+h.bbox.w)}else if(T){const m=o.chld[f].bbox.x+(o.chld[f].bbox.w-h.bbox.w*te.SUB_SUP_SCALE)/2;h.bbox.x=m,n=Math.max(n,o.chld[f].bbox.x+o.chld[f].bbox.w+(h.bbox.w*te.SUB_SUP_SCALE-o.chld[f].bbox.w)/2)}else h.bbox.x=o.chld[f].bbox.x+o.chld[f].bbox.w,n=Math.max(n,h.bbox.x+h.bbox.w*te.SUB_SUP_SCALE)}else n+=h.bbox.w;t=="text"&&(n+=1),r=Math.max(h.bbox.y+h.bbox.h-i,r)}}}i+=r;const s={bmatrix:["[","]"],pmatrix:["(",")"],Bmatrix:["\\{","\\}"],cases:["\\{"]},a={bmatrix:"center",pmatrix:"center",Bmatrix:"center",cases:"left",matrix:"center",aligned:"equation"}[o.text]??"left",c=!!s[o.text],d=!!s[o.text]&&s[o.text].length>1;pl(o.chld,a);const u=Hi(o.chld);o.text=="\\text"&&(u.x-=1,u.w+=2);for(let R=0;R<o.chld.length;R++)kt(o.chld[R],1,null,-u.x+(c?1.5:0),-u.y);o.bbox={x:0,y:0,w:u.w+1.5*Number(c)+1.5*Number(d),h:u.h},c&&o.chld.unshift({type:"symb",text:s[o.text][0],mode:o.mode,chld:[],bbox:{x:0,y:0,w:1,h:u.h}}),d&&o.chld.push({type:"symb",text:s[o.text][1],mode:o.mode,chld:[],bbox:{x:u.w+2,y:0,w:1,h:u.h}}),(c||d||o.text=="matrix")&&(o.type="node",o.text="",o.bbox.y-=(o.bbox.h-2)/2)}}function Ll(o){function t(n,i,r){const s=[];if(n.bbox){if(i+=n.bbox.x,r+=n.bbox.y,n.text=="\\frac"){const a=n.chld[1].bbox.y-(n.chld[0].bbox.y+n.chld[0].bbox.h),c={type:"symb",mode:n.mode,text:"\\bar",bbox:{x:i,y:r+(n.chld[1].bbox.y-a/2)-a/2,w:n.bbox.w,h:a},chld:[]};s.push(c)}else if(n.text=="\\sqrt"){const a=n.chld[0].bbox.y,c=Math.max(0,n.chld[0].bbox.x-n.chld[0].bbox.h/2),d={type:"symb",mode:n.mode,text:"\\sqrt",bbox:{x:i+c,y:r+a/2,w:n.chld[0].bbox.x-c,h:n.bbox.h-a/2},chld:[]};s.push(d),s.push({type:"symb",text:"\\bar",mode:n.mode,bbox:{x:i+n.chld[0].bbox.x,y:r,w:n.bbox.w-n.chld[0].bbox.x,h:a},chld:[]})}else if(n.text=="\\binom"){const a=Math.min(n.chld[0].bbox.x,n.chld[1].bbox.x),c={type:"symb",mode:n.mode,text:"(",bbox:{x:i,y:r,w:a,h:n.bbox.h},chld:[]};s.push(c),s.push({type:"symb",text:")",mode:n.mode,bbox:{x:i+n.bbox.w-a,y:r,w:a,h:n.bbox.h},chld:[]})}else if(gt[n.text]&>[n.text].flags.hat){const a=n.chld[0].bbox.y,c={type:"symb",mode:n.mode,text:n.text,bbox:{x:i,y:r,w:n.bbox.w,h:a},chld:[]};s.push(c)}else if(gt[n.text]&>[n.text].flags.mat){const a=n.chld[0].bbox.h,c={type:"symb",text:n.text,mode:n.mode,bbox:{x:i,y:r+a,w:n.bbox.w,h:n.bbox.h-a},chld:[]};s.push(c)}else if(n.type!="node"&&n.text!="^"&&n.text!="_"){const a={type:n.type=="func"?"symb":n.type,text:n.text,mode:n.mode,bbox:{x:i,y:r,w:n.bbox.w,h:n.bbox.h},chld:[]};s.push(a)}}for(let a=0;a<n.chld.length;a++){const c=t(n.chld[a],i,r);s.push(...c)}return s}const e=t(o,-o.bbox.x,-o.bbox.y);o.type="node",o.text="",o.chld=e}function Il(o){const t=[];for(let e=0;e<o.chld.length;e++){const n=o.chld[e];let i=n.bbox.h/2,r=!1;if(gt[n.text]&>[n.text].flags.hat&&!gt[n.text].flags.xfl&&!gt[n.text].flags.yfl&&(i*=4,r=!0),gt[n.text]&>[n.text].glyph){const s=qe(gt[n.text].glyph);for(let a=0;a<s.polylines.length;a++){const c=[];for(let d=0;d<s.polylines[a].length;d++){let u=s.polylines[a][d][0],R=s.polylines[a][d][1];if(gt[n.text].flags.xfl)u=(u-s.xmin)/Math.max(s.xmax-s.xmin,1)*n.bbox.w,u+=n.bbox.x;else if(s.w/16*i>n.bbox.w)u=u/Math.max(s.w,1)*n.bbox.w,u+=n.bbox.x;else{u=u/16*i;const h=(n.bbox.w-s.w/16*i)/2;u+=n.bbox.x+h}if(gt[n.text].flags.yfl)R=(R-s.ymin)/Math.max(s.ymax-s.ymin,1)*n.bbox.h,R+=n.bbox.y;else{if(R=R/16*i,r){const h=(s.ymax+s.ymin)/2;R-=h/16*i}R+=n.bbox.y+n.bbox.h/2}c.push([u,R])}t.push(c)}}else if(gt[n.text]&>[n.text].flags.txt||n.type=="char"){let s=n.bbox.x;const a=!!(gt[n.text]&>[n.text].flags.txt);for(let c=Number(a);c<n.text.length;c++){const d=qe(vn(n.text[c],a?"text":n.mode));if(!d){console.warn("unmapped character: "+n.text[c]);continue}for(let u=0;u<d.polylines.length;u++){const R=[];for(let h=0;h<d.polylines[u].length;h++){let g=d.polylines[u][h][0],f=d.polylines[u][h][1];g/=16,f/=16,g*=i,f*=i,n.mode=="tt"&&(d.w>16?g*=16/d.w:g+=(16-d.w)/2/16),g+=s,f+=n.bbox.y+n.bbox.h/2,R.push([g,f])}t.push(R)}n.mode=="tt"?s+=i:s+=d.w/16*i}}}return t}function ge(o){return Math.round(o*100)/100}class Pl{_latex;_tree;_tokens;_polylines;constructor(t){this._latex=t,this._tokens=fl(t),this._tree=bo(this._tokens),Ki(this._tree.chld),he(this._tree),Ll(this._tree),this._polylines=Il(this._tree)}resolveScale(t){if(t==null)return[16,16,16,16];let e=t.SCALE_X??16,n=t.SCALE_Y??16;if(t.MIN_CHAR_H!=null){let s=0;for(let c=0;c<this._tree.chld.length;c++){const d=this._tree.chld[c];(d.type=="char"||gt[d.text]&&(gt[d.text].flags.txt||!Object.keys(gt[d.text].flags).length))&&(s=Math.min(d.bbox.h,s))}const a=Math.max(1,t.MIN_CHAR_H/s);e*=a,n*=a}if(t.MAX_W!=null){const s=e;e=Math.min(e,t.MAX_W/this._tree.bbox.w),n*=e/s}if(t.MAX_H!=null){const s=n;n=Math.min(n,t.MAX_H/this._tree.bbox.h),e*=n/s}const i=t.MARGIN_X??e,r=t.MARGIN_Y??n;return[i,r,e,n]}polylines(t){t||(t={});const e=[],[n,i,r,s]=this.resolveScale(t);for(let a=0;a<this._polylines.length;a++){e.push([]);for(let c=0;c<this._polylines[a].length;c++){const[d,u]=this._polylines[a][c];e[e.length-1].push([n+d*r,i+u*s])}}return e}pathd(t){t||(t={});let e="";const[n,i,r,s]=this.resolveScale(t);for(let a=0;a<this._polylines.length;a++)for(let c=0;c<this._polylines[a].length;c++){const[d,u]=this._polylines[a][c];e+=c?"L":"M",e+=`${ge(n+d*r)} ${ge(i+u*s)}`}return e}svg(t){t||(t={});const[e,n,i,r]=this.resolveScale(t),s=ge(this._tree.bbox.w*i+e*2),a=ge(this._tree.bbox.h*r+n*2);let c=`<svg
|
|
13
|
+
</svg>`,a=new Image;return a.src=`data:image/svg+xml;base64,${jr(s)}`,a}_drawImageWithCrop(t,e,n,i,r,s,a){if(n.imgCrop){const{x:c,y:d,width:u,height:R}=n.imgCrop;t.drawImage(e,c,d,u,R,i,r,s,a)}else t.drawImage(e,i,r,s,a)}_renderCaption(t,e,n,i,r,s){if(!e.imgCaption?.value)return;const{scale:a,imgCaption:c}=this.options;let d=e.imgCaption.value;if(d.includes("{imageNo}")){const I=this.draw.getOriginalMainElementList(),L=this._countImagesBeforeTarget(I,e)+1;d=d.replace(/\{imageNo\}/g,String(L))}const u=(e.imgCaption.size||c.size)*a,R=e.imgCaption.font||c.font,h=e.imgCaption.color||c.color;t.save(),t.font=`${u}px ${R}`,t.fillStyle=h,t.textAlign="center";let g=d;const f=t.measureText(d);if(f.width>r){let I=0,L=d.length;for(;I<L;){const P=Math.ceil((I+L)/2),C=d.substring(0,P);t.measureText(C+"...").width<=r?I=P:L=P-1}g=d.substring(0,I)+"..."}const T=(e.imgCaption.top??c.top)*a,m=i+s+T+f.actualBoundingBoxAscent,p=n+r/2;t.fillText(g,p,m),t.restore()}render(t,e,n,i){const{scale:r}=this.options,s=e.width*r,a=e.height*r;if(this.imageCache.has(e.value)){const c=this.imageCache.get(e.value);this._drawImageWithCrop(t,c,e,n,i,s,a),this._renderCaption(t,e,n,i,s,a)}else{const c=this.draw.getRenderCount(),d=new Promise((u,R)=>{const h=new Image;h.setAttribute("crossOrigin","Anonymous"),h.src=e.value,h.onload=()=>{this.imageCache.set(e.value,h),u(e),c===this.draw.getRenderCount()&&(e.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM?this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1}):(this._drawImageWithCrop(t,h,e,n,i,s,a),this._renderCaption(t,e,n,i,s,a)))},h.onerror=g=>{const f=this.getFallbackImage(s,a);f.onload=()=>{this._drawImageWithCrop(t,f,e,n,i,s,a),this.imageCache.set(e.value,f),this._renderCaption(t,e,n,i,s,a)},R(g)}});this.addImageObserver(d)}}}const Qn=82;function tn(o){return yo[o]==null&&fl(o),yo[o]}function fl(o){const t=Tl[o];if(t==null)return;const e=t.substring(3,5),n=1*e.charCodeAt(0)-Qn,i=1*e.charCodeAt(1)-Qn,r=t.substring(5),s=[[]];let a=1/0,c=-1/0,d=1/0,u=-1/0,R=0;for(;R<r.length;){const h=r.substring(R,R+2);if(h==" R")s.push([]);else{const g=h.charCodeAt(0)-Qn-n,f=h.charCodeAt(1)-Qn;a=Math.min(f,a),c=Math.max(f,c),d=Math.min(g,d),u=Math.max(g,u),s[s.length-1].push([g,f])}R+=2}yo[o]={w:i-n,xmin:d,xmax:u,ymin:a,ymax:c,polylines:s}}const yo={},Tl={1:" 9MWRMNV RRMVV RPSTS",2:" 16MWOMOV ROMSMUNUPSQ ROQSQURUUSVOV",3:" 11MXVNTMRMPNOPOSPURVTVVU",4:" 12MWOMOV ROMRMTNUPUSTURVOV",5:" 12MWOMOV ROMUM ROQSQ ROVUV",6:" 9MVOMOV ROMUM ROQSQ",7:" 15MXVNTMRMPNOPOSPURVTVVUVR RSRVR",8:" 9MWOMOV RUMUV ROQUQ",9:" 3PTRMRV",10:" 7NUSMSTRVPVOTOS",11:" 9MWOMOV RUMOS RQQUV",12:" 6MVOMOV ROVUV",13:" 12LXNMNV RNMRV RVMRV RVMVV",14:" 9MWOMOV ROMUV RUMUV",15:" 14MXRMPNOPOSPURVSVUUVSVPUNSMRM",16:" 10MWOMOV ROMSMUNUQSROR",17:" 17MXRMPNOPOSPURVSVUUVSVPUNSMRM RSTVW",18:" 13MWOMOV ROMSMUNUQSROR RRRUV",19:" 13MWUNSMQMONOOPPTRUSUUSVQVOU",20:" 6MWRMRV RNMVM",21:" 9MXOMOSPURVSVUUVSVM",22:" 6MWNMRV RVMRV",23:" 12LXNMPV RRMPV RRMTV RVMTV",24:" 6MWOMUV RUMOV",25:" 7MWNMRQRV RVMRQ",26:" 9MWUMOV ROMUM ROVUV",27:" 9MWRMNV RRMVV RPSTS",28:" 16MWOMOV ROMSMUNUPSQ ROQSQURUUSVOV",29:" 6MVOMOV ROMUM",30:" 9MWRMNV RRMVV RNVVV",31:" 12MWOMOV ROMUM ROQSQ ROVUV",32:" 9MWUMOV ROMUM ROVUV",33:" 9MWOMOV RUMUV ROQUQ",34:" 20MXRMPNOPOSPURVSVUUVSVPUNSMRM RQQTR RTQQR",35:" 3PTRMRV",36:" 9MWOMOV RUMOS RQQUV",37:" 6MWRMNV RRMVV",38:" 12LXNMNV RNMRV RVMRV RVMVV",39:" 9MWOMOV ROMUV RUMUV",40:" 12MWOMUM RPQTR RTQPR ROVUV",41:" 14MXRMPNOPOSPURVSVUUVSVPUNSMRM",42:" 9MWOMOV RUMUV ROMUM",43:" 10MWOMOV ROMSMUNUQSROR",44:" 10MWOMRQOV ROMUM ROVUV",45:" 6MWRMRV RNMVM",46:" 15MWNONNOMPMQNRPRV RVOVNUMTMSNRP",47:" 13LXRMRV RPONPNSPTTTVSVPTOPO",48:" 6MWOMUV RUMOV",49:" 12LXRMRV RNOOPOSQTSTUSUPVO",50:" 13MXOVQVOROPPNRMSMUNVPVRTVVV",200:" 12MWRMPNOPOSPURVTUUSUPTNRM",201:" 4MWPORMRV",202:" 9MWONQMSMUNUPTROVUV",203:" 15MWONQMSMUNUPSQ RRQSQURUUSVQVOU",204:" 7MWSMSV RSMNSVS",205:" 14MWPMOQQPRPTQUSTURVQVOU RPMTM",206:" 14MWTMRMPNOPOSPURVTUUSTQRPPQOS",207:" 6MWUMQV ROMUM",208:" 19MWQMONOPQQSQUPUNSMQM RQQOROUQVSVUUURSQ",209:" 14MWUPTRRSPROPPNRMTNUPUSTURVPV",210:" 6PURURVSVSURU",211:" 7PUSVRVRUSUSWRY",212:" 12PURPRQSQSPRP RRURVSVSURU",213:" 13PURPRQSQSPRP RSVRVRUSUSWRY",214:" 12PURMRR RSMSR RRURVSVSURU",215:" 17NWPNRMSMUNUPRQRRSRSQUP RRURVSVSURU",216:" 3PTRMRQ",217:" 6NVPMPQ RTMTQ",218:" 10NVQMPNPPQQSQTPTNSMQM",219:" 16MWUNSMQMONOPQQTRUSUUSVQVOU RRLRW",220:" 3MWVLNW",221:" 7OVTLRNQPQSRUTW",222:" 7NUPLRNSPSSRUPW",223:" 3PTRLRW",224:" 3LXNRVR",225:" 6LXRNRV RNRVR",226:" 6LXNPVP RNTVT",227:" 6MWOOUU RUOOU",228:" 9MWRORU ROPUT RUPOT",229:" 6PURQRRSRSQRQ",230:" 7PUSMRORQSQSPRP",231:" 7PUSNRNRMSMSORQ",232:" 7LXSOVRSU RNRVR",233:" 12MXRLPW RULSW ROPVP ROSVS",234:" 21LXVRURTSSURVOVNUNSORRQSPSNRMPMONOPQSSUUVVV",235:" 20LXNNOQOSNV RVNUQUSVV RNNQOSOVN RNVQUSUVV",501:" 9I[RFJ[ RRFZ[ RMTWT",502:" 24G\\KFK[ RKFTFWGXHYJYLXNWOTP RKPTPWQXRYTYWXYWZT[K[",503:" 19H]ZKYIWGUFQFOGMILKKNKSLVMXOZQ[U[WZYXZV",504:" 16G\\KFK[ RKFRFUGWIXKYNYSXVWXUZR[K[",505:" 12H[LFL[ RLFYF RLPTP RL[Y[",506:" 9HZLFL[ RLFYF RLPTP",507:" 23H]ZKYIWGUFQFOGMILKKNKSLVMXOZQ[U[WZYXZVZS RUSZS",508:" 9G]KFK[ RYFY[ RKPYP",509:" 3NVRFR[",510:" 11JZVFVVUYTZR[P[NZMYLVLT",511:" 9G\\KFK[ RYFKT RPOY[",512:" 6HYLFL[ RL[X[",513:" 12F^JFJ[ RJFR[ RZFR[ RZFZ[",514:" 9G]KFK[ RKFY[ RYFY[",515:" 22G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF",516:" 14G\\KFK[ RKFTFWGXHYJYMXOWPTQKQ",517:" 25G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF RSWY]",518:" 17G\\KFK[ RKFTFWGXHYJYLXNWOTPKP RRPY[",519:" 21H\\YIWGTFPFMGKIKKLMMNOOUQWRXSYUYXWZT[P[MZKX",520:" 6JZRFR[ RKFYF",521:" 11G]KFKULXNZQ[S[VZXXYUYF",522:" 6I[JFR[ RZFR[",523:" 12F^HFM[ RRFM[ RRFW[ R\\FW[",524:" 6H\\KFY[ RYFK[",525:" 7I[JFRPR[ RZFRP",526:" 9H\\YFK[ RKFYF RK[Y[",527:" 9I[RFJ[ RRFZ[ RMTWT",528:" 24G\\KFK[ RKFTFWGXHYJYLXNWOTP RKPTPWQXRYTYWXYWZT[K[",529:" 6HYLFL[ RLFXF",530:" 9I[RFJ[ RRFZ[ RJ[Z[",531:" 12H[LFL[ RLFYF RLPTP RL[Y[",532:" 9H\\YFK[ RKFYF RK[Y[",533:" 9G]KFK[ RYFY[ RKPYP",534:" 25G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF ROPUP",535:" 3NVRFR[",536:" 9G\\KFK[ RYFKT RPOY[",537:" 6I[RFJ[ RRFZ[",538:" 12F^JFJ[ RJFR[ RZFR[ RZFZ[",539:" 9G]KFK[ RKFY[ RYFY[",540:" 9I[KFYF ROPUP RK[Y[",541:" 22G]PFNGLIKKJNJSKVLXNZP[T[VZXXYVZSZNYKXIVGTFPF",542:" 9G]KFK[ RYFY[ RKFYF",543:" 14G\\KFK[ RKFTFWGXHYJYMXOWPTQKQ",544:" 10I[KFRPK[ RKFYF RK[Y[",545:" 6JZRFR[ RKFYF",546:" 19I[KKKILGMFOFPGQIRMR[ RYKYIXGWFUFTGSIRM",547:" 21H\\RFR[ RPKMLLMKOKRLTMUPVTVWUXTYRYOXMWLTKPK",548:" 6H\\KFY[ RK[YF",549:" 18G]RFR[ RILJLKMLQMSNTQUSUVTWSXQYMZL[L",550:" 17H\\K[O[LTKPKLLINGQFSFVGXIYLYPXTU[Y[",551:" 20G[G[IZLWOSSLVFV[UXSUQSNQLQKRKTLVNXQZT[Y[",552:" 41F]SHTITLSP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ZXX",608:" 11I\\MFM[ RMQPNRMUMWNXQX[",609:" 9NVQFRGSFREQF RRMR[",610:" 12MWRFSGTFSERF RSMS^RaPbNb",611:" 9IZMFM[ RWMMW RQSX[",612:" 3NVRFR[",613:" 19CaGMG[ RGQJNLMOMQNRQR[ RRQUNWMZM\\N]Q][",614:" 11I\\MMM[ RMQPNRMUMWNXQX[",615:" 18I\\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM",616:" 18H[LMLb RLPNNPMSMUNWPXSXUWXUZS[P[NZLX",617:" 18I\\XMXb RXPVNTMQMONMPLSLUMXOZQ[T[VZXX",618:" 9KXOMO[ ROSPPRNTMWM",619:" 18J[XPWNTMQMNNMPNRPSUTWUXWXXWZT[Q[NZMX",620:" 9MYRFRWSZU[W[ ROMVM",621:" 11I\\MMMWNZP[S[UZXW RXMX[",622:" 6JZLMR[ RXMR[",623:" 12G]JMN[ RRMN[ RRMV[ RZMV[",624:" 6J[MMX[ RXMM[",625:" 10JZLMR[ RXMR[P_NaLbKb",626:" 9J[XMM[ RMMXM RM[X[",627:" 24H]QMONMPLRKUKXLZN[P[RZUWWTYPZM RQMSMTNUPWXXZY[Z[",628:" 31I\\UFSGQIOMNPMTLZKb RUFWFYHYKXMWNUORO RROTPVRWTWWVYUZS[Q[OZNYMV",629:" 17I\\JPLNNMOMQNROSRSVR[ RZMYPXRR[P_Ob",630:" 24I[TMQMONMPLSLVMYNZP[R[TZVXWUWRVOTMRKQIQGRFTFVGXI",631:" 19JZWOVNTMQMONOPPRSS RSSOTMVMXNZP[S[UZWX",632:" 23JYTFRGQHQIRJUKXK RXKTMQONRMUMWNYP[S]T_TaSbQbP`",633:" 19H\\IQJOLMNMONOPNTL[ RNTPPRNTMVMXOXRWWTb",634:" 27G\\HQIOKMMMNNNPMUMXNZO[Q[SZUWVUWRXMXJWGUFSFRHRJSMUPWRZT",635:" 9LWRMPTOXOZP[R[TYUW",636:" 19I[OMK[ RYNXMWMUNQROSNS RNSPTQUSZT[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O[Q[SZUWVUWRXMXIWGVFTF RNPWP",686:" 21H\\VFNb RQMNNLPKSKVLXNZQ[S[VZXXYUYRXPVNSMQM",687:" 16I[XOWNTMQMNNMOLQLSMUOWSZT\\T^S_Q_",700:" 18H\\QFNGLJKOKRLWNZQ[S[VZXWYRYOXJVGSFQF",701:" 5H\\NJPISFS[",702:" 15H\\LKLJMHNGPFTFVGWHXJXLWNUQK[Y[",703:" 16H\\MFXFRNUNWOXPYSYUXXVZS[P[MZLYKW",704:" 7H\\UFKTZT RUFU[",705:" 18H\\WFMFLOMNPMSMVNXPYSYUXXVZS[P[MZLYKW",706:" 24H\\XIWGTFRFOGMJLOLTMXOZR[S[VZXXYUYTXQVOSNRNOOMQLT",707:" 6H\\YFO[ RKFYF",708:" 30H\\PFMGLILKMMONSOVPXRYTYWXYWZT[P[MZLYKWKTLRNPQOUNWMXKXIWGTFPF",709:" 24H\\XMWPURRSQSNRLPKMKLLINGQFRFUGWIXMXRWWUZR[P[MZLX",710:" 6MWRYQZR[SZRY",711:" 9MWSZR[QZRYSZS\\R^Q_",712:" 12MWRMQNROSNRM RRYQZR[SZRY",713:" 15MWRMQNROSNRM RSZR[QZRYSZS\\R^Q_",714:" 9MWRFRT RRYQZR[SZRY",715:" 21I[LKLJMHNGPFTFVGWHXJXLWNVORQRT RRYQZR[SZRY",716:" 3NVRFRM",717:" 6JZNFNM RVFVM",718:" 14KYQFOGNINKOMQNSNUMVKVIUGSFQF",719:" 27H\\PBP_ RTBT_ RYIWGTFPFMGKIKKLMMNOOUQWRXSYUYXWZT[P[MZKX",720:" 3G][BIb",721:" 11KYVBTDRGPKOPOTPYR]T`Vb",722:" 11KYNBPDRGTKUPUTTYR]P`Nb",723:" 3NVRBRb",724:" 3E_IR[R",725:" 6E_RIR[ RIR[R",726:" 6E_IO[O RIU[U",727:" 6G]KKYY RYKKY",728:" 9JZRLRX RMOWU RWOMU",729:" 6MWRQQRRSSRRQ",730:" 8MWSFRGQIQKRLSKRJ",731:" 8MWRHQGRFSGSIRKQL",732:" 9E_UMXP[RXTUW RIR[R",733:" 12H]SBLb RYBRb RLOZO RKUYU",734:" 35E_\\O\\N[MZMYNXPVUTXRZP[L[JZIYHWHUISJRQNRMSKSIRGPFNGMIMKNNPQUXWZY[[[\\Z\\Y",735:" 28G]IIJKKOKUJYI[ R[IZKYOYUZY[[ RIIKJOKUKYJ[I RI[KZOYUYYZ[[",737:" 6KYOBO[ RUBU[",738:" 6F^RBR[ RI[[[",739:" 4F^[BI[[[",740:" 18E_RIQJRKSJRI RIYHZI[JZIY R[YZZ[[\\Z[Y",741:" 33F^RHNLKPJSJUKWMXOXQWRU RRHVLYPZSZUYWWXUXSWRU RRUQYP\\ RRUSYT\\ RP\\T\\",742:" 26F^RNQKPINHMHKIJKJOKRLTNWR\\ RRNSKTIVHWHYIZKZOYRXTVWR\\",743:" 20F^RGPJLOIR RRGTJXO[R RIRLUPZR] R[RXUTZR]",744:" 48F^RTTWVXXXZW[U[SZQXPVPSQ RSQUOVMVKUISHQHOINKNMOOQQ RQQNPLPJQISIUJWLXNXPWRT RRTQYP\\ RRTSYT\\ RP\\T\\",745:" 55F^RRR[Q\\ RRVQ\\ RRIQHOHNINKONRR RRISHUHVIVKUNRR RRRNOLNJNIOIQJR RRRVOXNZN[O[QZR RRRNULVJVIUISJR RRRVUXVZV[U[SZR",746:" 55F^ISJSLTMVMXLZ RISIRJQLQMRNTNWMYLZ RRGPIOLOOQUQXPZR\\ RRGTIULUOSUSXTZR\\ R[S[RZQXQWRVTVWWYXZ R[SZSXTWVWXXZ RKVYV",750:" 18PSSRRSQSPRPQQPRPSQSSRUQV RQQQRRRRQQQ",751:" 16PTQPPQPSQTSTTSTQSPQP RRQQRRSSRRQ",752:" 9NVPOTU RTOPU RNRVR",753:" 28MWRKQMOPMR RRKSMUPWR RRMOQ RRMUQ RROPQ RROTQ RQQSQ RMRWR",754:" 26MWMRMQNOONQMSMUNVOWQWR RPNTN ROOUO RNPVP RNQVQ RMRWR",755:" 14LRLFLRRRLF RLIPQ RLLOR RLOMQ",756:" 10MWRKQMOPMR RRKSMUPWR",757:" 11MWWRWQVOUNSMQMONNOMQMR",758:" 13G]]R]P\\MZJWHTGPGMHJJHMGPGR",759:" 11MWMRMSNUOVQWSWUVVUWSWR",760:" 7LXLPNRQSSSVRXP",761:" 6RURUTTURTPRO",762:" 7RVRRUPVNVLUKTK",763:" 7NRRROPNNNLOKPK",764:" 21MWWHVGTFQFOGNHMJMLNNOOUSVTWVWXVZU[S\\P\\N[MZ",765:" 21G]IWHVGTGQHOINKMMMONPOTUUVWWYW[V\\U]S]P\\N[M",766:" 31G]RRTUUVWWYW[V\\U]S]Q\\O[NYMWMUNTOPUOVMWKWIVHUGSGQHOINKMMMONPORR",767:" 22H\\KFK[ RHF[FQP[Z RZV[Y\\[ RZVZY RWYZY RWYZZ\\[",768:" 30KYUARBPCNELHKLKRLUNWQXSXVWXUYR RKPLMNKQJSJVKXMYPYVXZV]T_R`Oa",796:" 3>f>RfR",797:" 3D`D``D",798:" 3RRR>Rf",799:" 3D`DD``",800:" 3D`DR`R",801:" 3F^FY^K",802:" 3KYK^YF",803:" 3RRRDR`",804:" 3KYKFY^",805:" 3F^FK^Y",806:" 3KYKRYR",807:" 3MWMWWM",808:" 3RRRKRY",809:" 3MWMMWW",810:" 8GRRGPGMHJJHMGPGR",811:" 8GRGRGTHWJZM\\P]R]",812:" 8R]R]T]W\\ZZ\\W]T]R",813:" 8R]]R]P\\MZJWHTGRG",814:" 9D`DOGQKSPTTTYS]Q`O",815:" 9PUUDSGQKPPPTQYS]U`",816:" 9OTODQGSKTPTTSYQ]O`",817:" 9D`DUGSKQPPTPYQ]S`U",818:" 5KYRJYNKVRZ",819:" 5JZJRNKVYZR",820:" 5KYKVKNYVYN",821:" 5JZLXJPZTXL",822:" 23JZJ]L]O\\Q[TXUVVSVOULTJSIQIPJOLNONSOVPXS[U\\X]Z]",823:" 23I]]Z]X\\U[SXPVOSNONLOJPIQISJTLUOVSVVUXT[Q\\O]L]J",824:" 23JZZGXGUHSIPLONNQNUOXPZQ[S[TZUXVUVQUNTLQIOHLGJG",825:" 23G[GJGLHOIQLTNUQVUVXUZT[S[QZPXOUNQNNOLPISHUGXGZ",826:" 21E[EPFRHTJUMVQVUUXSZP[NZLWLSMQNNPLSKVKYL\\M^",827:" 19EYETHVKWPWSVVTXQYNYLXKVKSLPNNQMTMYN\\P_",828:" 26OUQOOQOSQUSUUSUQSOQO RQPPQPSQTSTTSTQSPQP RRQQRRSSRRQ",829:" 11RWRMSMUNVOWQWSVUUVSWRW",830:" 9D`DRJR RORUR RZR`R",831:" 5D`DUDO`O`U",832:" 6JZRDJR RRDZR",833:" 9D`DR`R RJYZY RP`T`",834:" 9D`DR`R RDRRb R`RRb",840:" 18KYQKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK",841:" 6LXLLLXXXXLLL",842:" 5KYRJKVYVRJ",843:" 6LXRHLRR\\XRRH",844:" 12JZRIPOJOOSMYRUWYUSZOTORI",845:" 6KYRKRY RKRYR",846:" 6MWMMWW RWMMW",847:" 9MWRLRX RMOWU RWOMU",850:" 35NVQNOONQNSOUQVSVUUVSVQUOSNQN ROQOS RPPPT RQOQU RRORU RSOSU RTPTT RUQUS",851:" 27NVNNNVVVVNNN ROOOU RPOPU RQOQU RRORU RSOSU RTOTU RUOUU",852:" 17MWRLMUWURL RROOT RROUT RRRQT RRRST",853:" 17LULRUWUMLR RORTU RORTO RRRTS RRRTQ",854:" 17MWRXWOMORX RRUUP RRUOP RRRSP RRRQP",855:" 17OXXROMOWXR RURPO RURPU RRRPQ RRRPS",856:" 22LXRLNWXPLPVWRL RRRRL RRRLP RRRNW RRRVW RRRXP",857:" 11RYRKRY RRKYNRQ RSMVNSO",860:" 13MWRLRX ROOUO RMUOWQXSXUWWU",861:" 11LXRLRX RLQMOWOXQ RPWTW",862:" 14KYMNWX RWNMX ROLLOKQ RULXOYQ",863:" 18I[NII[ RVI[[ RMM[[ RWMI[ RNIVI R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",905:" 34AcPALBJCGEEGCJBLAPATBXCZE]G_JaLbPcTcXbZa]__]aZbXcTcPbLaJ_G]EZCXBTAPA",906:" 34<hP<K=G?DAAD?G=K<P<T=Y?]A`DcGeKgPhThYg]e`cc`e]gYhThPgKeGcD`A]?Y=T<P<",907:" 50){O)I*E+@-;073370;-@+E*I)O)U*[+_-d0i3m7q;t@wEyIzO{U{[z_ydwitmqqmtiwdy_z[{U{OzIyEw@t;q7m3i0d-_+[*U)O)",908:" 34>fRAPCMDJDGCEA>H@JAMAZB]D_G`M`PaRc RRATCWDZD]C_AfHdJcMcZb]`_]`W`TaRc",909:" 33AcRAPCMDJDGCEABGAKAPBTDXG\\L`Rc RRATCWDZD]C_AbGcKcPbT`X]\\X`Rc RBHbH",997:" 3MWMXWX",998:" 3JZJZZZ",999:" 3JZJ]Z]",1001:" 18KYRKMX RRNVX RRKWX ROTTT RKXPX RTXYX",1002:" 35JZNKNX ROKOX RLKSKVLWNVPSQ RSKULVNUPSQ ROQSQVRWTWUVWSXLX RSQURVTVUUWSX",1003:" 24KYVLWKWOVLTKQKOLNMMPMSNVOWQXTXVWWU RQKOMNPNSOVQX",1004:" 26JZNKNX ROKOX RLKSKVLWMXPXSWVVWSXLX RSKULVMWPWSVVUWSX",1005:" 22JYNKNX ROKOX RSOSS RLKVKVOUK ROQSQ RLXVXVTUX",1006:" 20JXNKNX ROKOX RSOSS RLKVKVOUK ROQSQ RLXQX",1007:" 36K[VLWKWOVLTKQKOLNMMPMSNVOWQXTXVW RQKOMNPNSOVQX RTXUWVU RVSVX RWSWX RTSYS",1008:" 27J[NKNX ROKOX RVKVX RWKWX RLKQK RTKYK ROQVQ RLXQX RTXYX",1009:" 12NWRKRX RSKSX RPKUK RPXUX",1010:" 19LXSKSURWQX RTKTUSWQXPXNWMUNTOUNV RQKVK",1011:" 27JZNKNX ROKOX RWKOS RQQVX RRQWX RLKQK RTKYK RLXQX RTXYX",1012:" 14KXOKOX RPKPX RMKRK RMXWXWTVX",1013:" 30I\\MKMX RNNRX RNKRU RWKRX RWKWX RXKXX RKKNK RWKZK RKXOX RUXZX",1014:" 21JZNKNX ROMVX ROKVV RVKVX RLKOK RTKXK RLXPX",1015:" 32KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK",1016:" 25JYNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXQX",1017:" 47KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK RPWPUQTSTTUUZV[W[XZ RTUUXVZW[",1018:" 37JZNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXQX RSRTSUWVXWXXW RSRUSVWWX",1019:" 32KZVMWKWOVMULSKQKOLNMNOOPQQTRVSWT RNNOOQPTQVRWSWVVWTXRXPWOVNTNXOV",1020:" 16KZRKRX RSKSX RNKMOMKXKXOWK RPXUX",1021:" 20J[NKNUOWQXTXVWWUWK ROKOUPWQX RLKQK RUKYK",1022:" 15KYMKRX RNKRU RWKRX RKKPK RTKYK",1023:" 24I[LKOX RMKOT RRKOX RRKUX RSKUT RXKUX RJKOK RVKZK",1024:" 21KZNKVX ROKWX RWKNX RLKQK RTKYK RLXQX RTXYX",1025:" 20LYNKRRRX ROKSR RWKSRSX RLKQK RTKYK RPXUX",1026:" 16LYVKNX RWKOX ROKNONKWK RNXWXWTVX",1027:" 18KYRKMX RRNVX RRKWX ROTTT RKXPX RTXYX",1028:" 35JZNKNX ROKOX RLKSKVLWNVPSQ RSKULVNUPSQ ROQSQVRWTWUVWSXLX RSQURVTVUUWSX",1029:" 14KXOKOX RPKPX RMKWKWOVK RMXRX",1030:" 15KYRKLX RRMWX RRKXX RMWVW RLXXX",1031:" 22JYNKNX ROKOX RSOSS RLKVKVOUK ROQSQ RLXVXVTUX",1032:" 16LYVKNX RWKOX ROKNONKWK RNXWXWTVX",1033:" 27J[NKNX ROKOX RVKVX RWKWX RLKQK RTKYK ROQVQ RLXQX RTXYX",1034:" 44KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK RQOQT RTOTT RQQTQ RQRTR",1035:" 12NWRKRX RSKSX RPKUK RPXUX",1036:" 27JZNKNX ROKOX RWKOS RQQVX RRQWX RLKQK RTKYK RLXQX RTXYX",1037:" 15KYRKMX RRNVX RRKWX RKXPX RTXYX",1038:" 30I\\MKMX RNNRX RNKRU RWKRX RWKWX RXKXX RKKNK RWKZK RKXOX RUXZX",1039:" 21JZNKNX ROMVX ROKVV RVKVX RLKOK RTKXK RLXPX",1040:" 36JZMJLM RXJWM RPPOS RUPTS RMVLY RXVWY RMKWK RMLWL RPQTQ RPRTR RMWWW RMXWX",1041:" 32KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK",1042:" 21J[NKNX ROKOX RVKVX RWKWX RLKYK RLXQX RTXYX",1043:" 25JYNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXQX",1044:" 20K[MKRQ RNKSQMX RMKWKXOVK RNWWW RMXWXXTVX",1045:" 16KZRKRX RSKSX RNKMOMKXKXOWK RPXUX",1046:" 33KZMONLOKPKQLRORX RXOWLVKUKTLSOSX RMONMOLPLQMRO RXOWMVLULTMSO RPXUX",1047:" 40KZRKRX RSKSX RQNNOMQMRNTQUTUWTXRXQWOTNQN RQNOONQNROTQU RTUVTWRWQVOTN RPKUK RPXUX",1048:" 21KZNKVX ROKWX RWKNX RLKQK RTKYK RLXQX RTXYX",1049:" 33J[RKRX RSKSX RLPMONOOSQU RTUVSWOXOYP RMONROTQUTUVTWRXO RPKUK RPXUX",1050:" 35KZMVNXQXMRMONMOLQKTKVLWMXOXRTXWXXV ROUNRNOOMQK RTKVMWOWRVU RNWPW RUWWW",1051:" 18KYTKKX RSMTX RTKUX RNTTT RIXNX RRXWX",1052:" 34JYPKLX RQKMX RNKUKWLWNVPSQ RUKVLVNUPSQ ROQRQTRUSUUTWQXJX RRQTSTUSWQX",1053:" 25KXVLWLXKWNVLTKRKPLOMNOMRMUNWPXRXTWUU RRKPMOONRNVPX",1054:" 26JYPKLX RQKMX RNKTKVLWNWQVTUVTWQXJX RTKULVNVQUTTVSWQX",1055:" 22JYPKLX RQKMX RSORS RNKXKWNWK ROQRQ RJXTXUUSX",1056:" 20JXPKLX RQKMX RSORS RNKXKWNWK ROQRQ RJXOX",1057:" 33KYVLWLXKWNVLTKRKPLOMNOMRMUNWPXRXTWUVVS RRKPMOONRNVPX RRXTVUS RSSXS",1058:" 27J[PKLX RQKMX RXKTX RYKUX RNKSK RVK[K ROQVQ RJXOX RRXWX",1059:" 12NWTKPX RUKQX RRKWK RNXSX",1060:" 19LXUKRUQWPX RVKSURWPXOXMWLUMTNUMV RSKXK",1061:" 27JZPKLX RQKMX RYKOR RRPTX RSPUX RNKSK RVK[K RJXOX RRXWX",1062:" 14KXQKMX RRKNX ROKTK RKXUXVUTX",1063:" 30I\\OKKX ROMPX RPKQV RYKPX RYKUX RZKVX RMKPK RYK\\K RIXMX RSXXX",1064:" 21JZPKLX RPKTX RQKTU RXKTX RNKQK RVKZK RJXNX",1065:" 32KYRKPLOMNOMRMUNWPXRXTWUVVTWQWNVLTKRK RRKPMOONRNVPX RRXTVUTVQVMTK",1066:" 24JYPKLX RQKMX RNKUKWLXMXOWQTROR RUKWMWOVQTR RJXOX",1067:" 46KYRKPLOMNOMRMUNWPXRXTWUVVTWQWNVLTKRK RRKPMOONRNVPX RRXTVUTVQVMTK ROWOVPUQURVRZS[T[UZ RRVSZT[",1068:" 35JZPKLX RQKMX RNKUKWLXMXOWQTROR RUKWMWOVQTR RSRTWUXVXWW RSRTSUWVX RJXOX",1069:" 28KZWLXLYKXNWLUKRKPLOMOOPPUSVT RONPOURVSVVUWSXPXNWMULXMWNW",1070:" 16KZTKPX RUKQX RPKNNOKZKYNYK RNXSX",1071:" 20J[PKMUMWOXSXUWVUYK RQKNUNWOX RNKSK RWK[K",1072:" 15KYOKPX RPKQV RYKPX RMKRK RVK[K",1073:" 24I[NKMX ROKNV RTKMX RTKSX RUKTV RZKSX RLKQK RXK\\K",1074:" 21KZPKTX RQKUX RYKLX RNKSK RVK[K RJXOX RRXWX",1075:" 20LYPKRQPX RQKSQ RYKSQQX RNKSK RVK[K RNXSX",1076:" 16LYXKLX RYKMX RQKONPKYK RLXUXVUTX",1101:" 32LZQOPPPQOQOPQOTOVQVWWXXX RTOUQUWWX RURRSPTOUOWPXSXTWUU RRSPUPWQX",1102:" 29JYNKNX ROKOX RORPPROTOVPWRWUVWTXRXPWOU RTOUPVRVUUWTX RLKOK",1103:" 24LXVQUQURVRVQUPSOQOOPNRNUOWQXSXUWVV RQOPPOROUPWQX",1104:" 32L[VKVX RWKWX RVRUPSOQOOPNRNUOWQXSXUWVU RQOPPOROUPWQX RTKWK RVXYX",1105:" 26LXOSVSVRUPSOQOOPNRNUOWQXSXUWVV RUSUQSO RQOPPOROUPWQX",1106:" 20LWTKULUMVMVLTKRKPMPX RRKQMQX RNOSO RNXSX",1107:" 42LYQOOQOSQUSUUSUQSOQO RQOPQPSQU RSUTSTQSO RTPUOVO RPTOUOXPYTYVZ ROWPXTXVYV[T\\P\\N[NYPX",1108:" 28J[NKNX ROKOX RORPPROTOVPWRWX RTOUPVRVX RLKOK RLXQX RTXYX",1109:" 18NWRKRLSLSKRK RRORX RSOSX RPOSO RPXUX",1110:" 23NWSKSLTLTKSK RSOSZR\\ RTOTZR\\P\\O[OZPZP[O[ RQOTO",1111:" 27JZNKNX ROKOX RWOOU RRSVX RSSWX RLKOK RTOYO RLXQX RTXYX",1112:" 12NWRKRX RSKSX RPKSK RPXUX",1113:" 44F_JOJX RKOKX RKRLPNOPORPSRSX RPOQPRRRX RSRTPVOXOZP[R[X RXOYPZRZX RHOKO RHXMX RPXUX RXX]X",1114:" 28J[NONX ROOOX RORPPROTOVPWRWX RTOUPVRVX RLOOO RLXQX RTXYX",1115:" 28LYQOOPNRNUOWQXTXVWWUWRVPTOQO RQOPPOROUPWQX RTXUWVUVRUPTO",1116:" 32JYNON\\ ROOO\\ RORPPROTOVPWRWUVWTXRXPWOU RTOUPVRVUUWTX RLOOO RL\\Q\\",1117:" 29KYUOU\\ RVOV\\ RURTPROPONPMRMUNWPXRXTWUU RPOOPNRNUOWPX RS\\X\\",1118:" 22KXOOOX RPOPX RPRQPSOUOVPVQUQUPVP RMOPO RMXRX",1119:" 26LYTOUPUQVQVPTOQOOPORQSTTVU ROQQRTSVTVWTXQXOWOVPVPWQX",1120:" 14LWPKPVRXTXUWUV RQKQVRX RNOTO",1121:" 28J[NONUOWQXSXUWVU ROOOUPWQX RVOVX RWOWX RLOOO RTOWO RVXYX",1122:" 15KYNORX ROORV RVORX RLOQO RTOXO",1123:" 24I[LOOX RMOOU RROOX RROUX RSOUU RXOUX RJOOO RVOZO",1124:" 21KYNOUX ROOVX RVONX RLOQO RTOXO RLXPX RSXXX",1125:" 23KYNORX ROORV RVORXP[N\\M\\L[LZMZM[L[ RLOQO RTOXO",1126:" 16LXUONX RVOOX ROONQNOVO RNXVXVVUX",1127:" 32K[QOOPNQMSMUNWPXQXSWUUWRXO RQOOQNSNUOWPX RQOSOUPWWXX RSOTPVWXXYX",1128:" 40KXRKPMOOMUK\\ RQLPNNTL\\ RRKTKVLVNUPRQ RTKULUNTPRQ RRQTRUTUVTWRXQXOWNT RRQSRTTTVRX",1129:" 19KYLQNOPORPSSSXR\\ RLQNPPPRQSS RWOVRSXQ\\",1130:" 39KYSOQOOPNQMSMUNWPXRXTWUVVTVRUPRNQLQKRJTJUKVM RQOOQNSNVPX RRXTVUTUQSO RQLRKTKVM",1131:" 27LXVPTOQOOPOQPRRS RQOPPPQRS RRSOTNUNWPXSXUW RRSPTOUOWPX",1132:" 28LWRKQLQMSNVNVMSNPOOPNRNTOVPWRXSYS[R\\P\\O[ RSNQOPPOROTPVRX",1133:" 26IYJRKPLONOOPOQMX RMONPNQLX ROQPPROTOVPVRS\\ RTOUPURR\\",1134:" 35IYJSKQLPNPOQOVPX RMPNQNUOWPXQXSWTVUTVQVNULTKRKQLQNRPURWS RQXSVTTUQUNTK",1135:" 13NWROPVPWQXSXUWVU RSOQVQWRX",1136:" 26KYOOLX RPOMX RUOVPWPVOTORQOR RORPSRWTXVWWU RORQSSWTX",1137:" 15LXLKNKPLWX RNKOLVX RRPMX RRPNX",1138:" 26KZOOK\\ RPOL\\ RNUNWOXQXSWTV RVOTVTWUXWXXWYU RWOUVUWVX",1139:" 19JYNOMX ROONUMX RVRVOWOVRTUQWNXMX RLOOO",1140:" 36MXRKQLQMSNVN RTNQOPPPRRSUS RTNROQPQRRS RSSPTOUOWQXSYTZT[S\\Q\\ RSSQTPUPWQX",1141:" 28KXQOOPNQMSMUNWPXRXTWUVVTVRUPSOQO RQOOQNSNVPX RRXTVUTUQSO",1142:" 20IZPPMX RPPNX RTPSX RTPTX RKQMOXO RKQMPXP",1143:" 29JXSOQOOPNQMSJ\\ RQOOQNSK\\ RSOUPVRVTUVTWRXPXNWMU RSOUQUTTVRX",1144:" 28K[YOQOOPNQMSMUNWPXRXTWUVVTVRUPYP RQOOQNSNVPX RRXTVUTUQSO",1145:" 14KZSPQX RSPRX RMQOOXO RMQOPXP",1146:" 24JXKRLPMOOOPPPROUOWPX RNOOPORNUNWPXQXSWUUVRVOUOVP",1147:" 35KZOPNQMSMUNWPXRXUWWUXRXPWOUOTPSRRUO\\ RMUNVPWRWUVWTXR RXQWPUPSR RRUQXP\\",1148:" 17KXMONOPPS[T\\ RNOOPR[T\\U\\ RVOTRNYL\\",1149:" 28I[TKQ\\ RUKP\\ RJRKPLONOOPOVPWSWUVWT RMONPNTOWPXSXUWWTXRYO",1150:" 36JZNPPPPONPMQLSLUMWNXPXQWRUSR RLUNWPWRU RRRRWSXUXWVXTXRWPVOVPWP RRUSWUWWV",1151:" 32KZVOTVTWUXWXXWYU RWOUVUWVX RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX",1152:" 32JXOKMR RPKNRNVPX RNROPQOSOUPVRVTUVTWRXPXNWMUMR RSOUQUTTVRX RMKPK",1153:" 22KXUPUQVQUPSOQOOPNQMSMUNWPXRXTWUV RQOOQNSNVPX",1154:" 35KZWKTVTWUXWXXWYU RXKUVUWVX RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX RUKXK",1155:" 23KWNURTTSURUPSOQOOPNQMSMUNWPXRXTWUV RQOOQNSNVPX",1156:" 23MXWKXLXKVKTLSNPYO[N\\ RVKULTNQYP[N\\L\\L[M\\ RPOVO",1157:" 34KYVOTVSYR[ RWOUVTYR[P\\M\\L[M[N\\ RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX",1158:" 29KZPKLX RQKMX ROQPPROTOVPVRUUUWVX RTOUPURTUTWUXWXXWYU RNKQK",1159:" 26MWSKSLTLTKSK RNROPPOROSPSRRURWSX RQORPRRQUQWRXTXUWVU",1160:" 26MWTKTLULUKTK RORPPQOSOTPTRRYQ[O\\M\\M[N\\ RROSPSRQYP[O\\",1161:" 32KXPKLX RQKMX RVPUQVQVPUOTORQPROR RORPSQWRXTXUWVU RORQSRWSX RNKQK",1162:" 16NVSKPVPWQXSXTWUU RTKQVQWRX RQKTK",1163:" 46F^GRHPIOKOLPLQJX RJOKPKQIX RLQMPOOQOSPSQQX RQORPRQPX RSQTPVOXOZPZRYUYWZX RXOYPYRXUXWYX[X\\W]U",1164:" 33J[KRLPMOOOPPPQNX RNOOPOQMX RPQQPSOUOWPWRVUVWWX RUOVPVRUUUWVXXXYWZU",1165:" 28KXQOOPNQMSMUNWPXRXTWUVVTVRUPSOQO RQOOQNSNVPX RRXTVUTUQSO",1166:" 35JYKRLPMOOOPPPQM\\ RNOOPOQL\\ RPQROTOVPWRWTVVUWSXQXOVOT RTOVQVTUVSX RJ\\O\\",1167:" 28KYVOR\\ RWOS\\ RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX RP\\U\\",1168:" 22LXMRNPOOQORPRQPX RPOQPQQOX RRQSPUOVOWPWQVQWP",1169:" 24LYVPVQWQVPTOQOOPORQSTTVU ROQQRTSVTVWTXQXOWNVOVOW",1170:" 16NWSKPVPWQXSXTWUU RTKQVQWRX RPOUO",1171:" 33IZJRKPLONOOPORNUNWOX RMONPNRMUMWOXQXSWTV RVOTVTWUXWXXWYU RWOUVUWVX",1172:" 24JXKRLPMOOOPPPROUOWPX RNOOPORNUNWPXQXSWUUVRVOUOVP",1173:" 37H\\IRJPKOMONPNRMUMWNX RLOMPMRLULWNXOXQWRV RTORVRWTX RUOSVSWTXUXWWYUZRZOYOZP",1174:" 38JZMRNPPOROSPSR RQORPRRQUPWNXMXLWLVMVLW RXPWQXQXPWOVOTPSRRURWSX RQUQWRXTXVWWU",1175:" 35IYJRKPLONOOPORNUNWOX RMONPNRMUMWOXQXSWTV RVOTVSYR[ RWOUVTYR[P\\M\\L[M[N\\",1176:" 27KYWOWPVQNVMWMX RNQOOROUQ ROPRPUQVQ RNVOVRWUW ROVRXUXVV",1177:" 39H[RKSLSMTMTLRKOKMLLNLX ROKNLMNMX RXKYLYMZMZLXKVKTMTX RVKUMUX RJOWO RJXOX RRXWX",1178:" 29J[UKVLWLWKQKOLNNNX RQKPLONOX RVOVX RWOWX RLOWO RLXQX RTXYX",1179:" 27J[WKQKOLNNNX RQKPLONOX RUKVLVX RWKWX RLOVO RLXQX RTXYX",1180:" 48F_PKQLQMRMRLPKMKKLJNJX RMKLLKNKX RYKZL[L[KUKSLRNRX RUKTLSNSX RZOZX R[O[X RHO[O RHXMX RPXUX RXX]X",1181:" 46F_PKQLQMRMRLPKMKKLJNJX RMKLLKNKX R[KUKSLRNRX RUKTLSNSX RYKZLZX R[K[X RHOZO RHXMX RPXUX RXX]X",1182:" 12NWRORX RSOSX RPOSO RPXUX",1184:" 21LXVPTOROPPOQNSNUOWQXSXUW RROPQOSOVQX ROSSS",1185:" 35LYSKQLPMOONRNUOWPXRXTW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TKMTXT RQXVX",1205:" 33LYOKNQ ROKVK ROLSLVK RNQOPQOTOVPWRWUVWTXQXOWNVNUOUOV RTOUPVRVUUWTX",1206:" 36LYVMVNWNWMVLTKRKPLOMNPNUOWQXTXVWWUWSVQTPQPNR RRKPMOPOUPWQX RTXUWVUVSUQTP",1207:" 22LYNKNO RVMRTPX RWKTQQX RNMPKRKUM RNMPLRLUMVM",1208:" 51LYQKOLNNOPQQTQVPWNVLTKQK RQKPLONPPQQ RTQUPVNULTK RQQORNTNUOWQXTXVWWUWTVRTQ RQQPROTOUPWQX RTXUWVUVTURTQ",1209:" 36LYOVOUNUNVOWQXSXUWVVWSWNVLTKQKOLNNNPORQSTSWQ RSXUVVSVNULTK RQKPLONOPPRQS",1210:" 6NVRVQWRXSWRV",1211:" 8NVSWRXQWRVSWSYQ[",1212:" 12NVROQPRQSPRO RRVQWRXSWRV",1213:" 14NVROQPRQSPRO RSWRXQWRVSWSYQ[",1214:" 15NVRKQLRSSLRK RRLRO RRVQWRXSWRV",1215:" 29LYNNONOONONNOLQKTKVLWNWOVQSRRSRTST RTKVMVPUQSR RRWRXSXSWRW",1216:" 6OVRKRP RSKRP",1217:" 12LXOKOP RPKOP RUKUP RVKUP",1218:" 10MWQKPLPNQOSOTNTLSKQK",1219:" 9MWRJRP ROKUO RUKOO",1220:" 3KZXHM\\",1221:" 16MWUHSJQMPPPTQWSZU\\ RSJRLQPQTRXSZ",1222:" 16MWOHQJSMTPTTSWQZO\\ RQJRLSPSTRXQZ",1223:" 12MWPHP\\ RQHQ\\ RPHUH RP\\U\\",1224:" 12MWSHS\\ RTHT\\ ROHTH RO\\T\\",1225:" 38LWSHQIPJPLRNSP RQIPL RSNRQ RPJQLSNSPRQPRRSSTSVQXPZ RRSSV RPXQ[ RSTRVPXPZQ[S\\",1226:" 38MXQHSITJTLRNQP RSITL RQNRQ RTJSLQNQPRQTRRSQTQVSXTZ RRSQV RTXS[ RQTRVTXTZS[Q\\",1227:" 4MWTHPRT\\",1228:" 4MWPHTRP\\",1229:" 3OURHR\\",1230:" 6MWPHP\\ RTHT\\",1231:" 3I[LRXR",1232:" 6I[RLRX RLRXR",1233:" 9JZRMRX RMRWR RMXWX",1234:" 9JZRMRX RMMWM RMRWR",1235:" 6JZMMWW RWMMW",1236:" 6NVRQQRRSSRRQ",1237:" 15I[RLQMRNSMRL RLRXR RRVQWRXSWRV",1238:" 6I[LPXP RLTXT",1239:" 9I[WLMX RLPXP RLTXT",1240:" 9I[LNXN RLRXR RLVXV",1241:" 4JZWLMRWX",1242:" 4JZMLWRMX",1243:" 10JZWKMOWS RMTWT RMXWX",1244:" 10JZMKWOMS RMTWT RMXWX",1245:" 21H[YUWUUTTSRPQOONNNLOKQKRLTNUOUQTRSTPUOWNYN",1246:" 16JZLTLRMPOPUSWSXR RLRMQOQUTWTXRXP",1247:" 8JZMSRPWS RMSRQWS",1248:" 7NVSKPO RSKTLPO",1249:" 7NVQKTO RQKPLTO",1250:" 14LXNKOMQNSNUMVK RNKONQOSOUNVK",1251:" 8NVSLRMQLRKSLSNQP",1252:" 8NVSKQMQORPSORNQO",1253:" 8NVQLRMSLRKQLQNSP",1254:" 8NVQKSMSORPQORNSO",1256:" 11JZWMQMONNOMQMSNUOVQWWW",1257:" 11JZMMMSNUOVQWSWUVVUWSWM",1258:" 11JZMMSMUNVOWQWSVUUVSWMW",1259:" 11JZMWMQNOONQMSMUNVOWQWW",1260:" 14JZWMQMONNOMQMSNUOVQWWW RMRUR",1261:" 13I[TOUPXRUTTU RUPWRUT RLRWR",1262:" 13MWRMRX ROPPORLTOUP RPORMTO",1263:" 13I[POOPLROTPU ROPMROT RMRXR",1264:" 13MWRLRW ROTPURXTUUT RPURWTU",1265:" 37KYVSUPSOQOOPNQMSMUNWPXRXTWUVVTWQWNVLTKQKPLQLRK RQOOQNSNVPX RRXTVUTVQVNULTK",1266:" 15JZLKRX RMKRV RXKRX RLKXK RNLWL",1267:" 10G[IOLORW RKORX R[FRX",1268:" 26I[XIXJYJYIXHVHTJSLROQUPYO[ RUITKSORUQXPZN\\L\\K[KZLZL[",1269:" 40I[XIXJYJYIXHVHTJSLROQUPYO[ RUITKSORUQXPZN\\L\\K[KZLZL[ RQNOONQNSOUQVSVUUVSVQUOSNQN",1270:" 26H\\ZRYTWUVUTTSSQPPONNMNKOJQJRKTMUNUPTQSSPTOVNWNYOZQZR",1271:" 26JZXKLX ROKPLPNOOMOLNLLMKOKSLVLXK RUTTUTWUXWXXWXUWTUT",1272:" 41J[YPXPXQYQYPXOWOVPUTTVSWQXOXMWLVLTMSORRPSNSLRKPKOLONPQUWWXXXYW ROXMVMTOR RONPPVWWX",1273:" 29J[UPSOQOPQPRQTSTUS RUOUSVTXTYRYQXNVLSKRKOLMNLQLRMUOWRXSXVW",1274:" 34KZQHQ\\ RTHT\\ RWLVLVMWMWLUKPKNLNNOPVSWT RNNOOVRWTWVVWTXQXOWNVNUOUOVNV",1275:" 12KYRKN\\ RVKR\\ RNQWQ RMVVV",1276:" 40LXTLSLSMTMTLSKQKPLPNQPTRUS RPNQOTQUSUUSW RQPOROTPVSXTY ROTPUSWTYT[S\\Q\\P[PZQZQ[P[",1277:" 29LXRKQLRMSLRK RRMRQ RRQQSRVSSRQ RRVR\\ RPOONNOOPPOTOUNVOUPTO",1278:" 42LXRMSLRKQLRMRQQRSURV RRQSRQURVRZQ[R\\S[RZ RPOONNOOPPOTOUNVOUPTO RPXOWNXOYPXTXUWVXUYTX",1279:" 12LYVKVX RNKVK RQQVQ RNXVX",1281:" 24H\\QKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK RRQQRRSSRRQ",1282:" 33LYQKPLPMQN RTKULUMTN RRNPOOQORPTRUSUUTVRVQUOSNRN RRURY RSUSY ROWVW",1283:" 23LYRKPLONOOPQRRSRUQVOVNULSKRK RRRRX RSRSX ROUVU",1284:" 24H\\QKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK RRKRY RKRYR",1285:" 25JYRRPQOQMRLTLUMWOXPXRWSUSTRR RWMRR RRMWMWR RRMVNWR",1286:" 25JZLLMKOKQLRNRPQRPSNT ROKPLQNQQPS RVKUX RWKTX RNTXT",1287:" 27JYNKNU ROKNR RNROPQOSOUPVQVTTVTXUYVYWX RSOUQUTTV RLKOK",1288:" 27LYONRKRQ RVNSKSQ RRQPROTOUPWRXSXUWVUVTURSQ RRTRUSUSTRT",1289:" 27JZRKRY RMKMPNRPSTSVRWPWK RLMMKNM RQMRKSM RVMWKXM ROVUV",1290:" 27JYNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXVXVUUX",1291:" 20LYWKTKQLONNQNSOVQXTYWY RWKTLRNQQQSRVTXWY",1292:" 23JZRRPQOQMRLTLUMWOXPXRWSUSTRR RSLQQ RWMRR RXQSS",1293:" 12KYPMTW RTMPW RMPWT RWPMT",1294:" 34J[OUMULVLXMYOYPXPVNTMRMONMOLQKTKVLWMXOXRWTUVUXVYXYYXYVXUVU RNMPLULWM",1295:" 34J[OOMOLNLLMKOKPLPNNPMRMUNWOXQYTYVXWWXUXRWPUNULVKXKYLYNXOVO RNWPXUXWW",1401:" 21F^KHK\\ RLHL\\ RXHX\\ RYHY\\ RHH\\H RH\\O\\ RU\\\\\\",1402:" 20H]KHRQJ\\ RJHQQ RJHYHZMXH RK[X[ RJ\\Y\\ZWX\\",1403:" 20KYVBTDRGPKOPOTPYR]T`Vb RTDRHQKPPPTQYR\\T`",1404:" 20KYNBPDRGTKUPUTTYR]P`Nb RPDRHSKTPTTSYR\\P`",1405:" 12KYOBOb RPBPb ROBVB RObVb",1406:" 12KYTBTb RUBUb RNBUB RNbUb",1407:" 40KYTBRCQDPFPHQJRKSMSOQQ RRCQEQGRISJTLTNSPORSTTVTXSZR[Q]Q_Ra RQSSUSWRYQZP\\P^Q`RaTb",1408:" 40KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQUQWRYSZT\\T^S`RaPb",1409:" 24KYU@RCPFO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OM RK[R[",2119:" 32J[WOXMXQWOVNTMPMNNMOMQNRPSUUWVXW RMPNQPRUTWUXVXYWZU[Q[OZNYMWM[NY",2120:" 16KZPFPWQZS[U[WZXX RQFQWRZS[ RMMUM",2121:" 28G]LMLXMZP[R[UZWX RMMMXNZP[ RWMW[ RXMX[ RIMMM RTMXM RW[[[",2122:" 15I[LMR[ RMMRY RXMR[ RJMPM RTMZM",2123:" 24F^JMN[ RKMNX RRMN[ RRMV[ RSMVX RZMV[ RGMNM RWM]M",2124:" 21H\\LMW[ RMMX[ RXML[ RJMPM RTMZM RJ[P[ RT[Z[",2125:" 22H[LMR[ RMMRY RXMR[P_NaLbKbJaK`La RJMPM RTMZM",2126:" 16I[WML[ RXMM[ RMMLQLMXM RL[X[XWW[",2127:" 40G^QMNNLPKRJUJXKZN[P[RZUWWTYPZM RQMONMPLRKUKXLZN[ RQMSMUNVPXXYZZ[ RSMTNUPWXXZZ[[[",2128:" 57G\\TFQGOIMMLPKTJZIb RTFRGPINMMPLTKZJb RTFVFXGYHYKXMWNTOPO RVFXHXKWMVNTO RPOTPVRWTWWVYUZR[P[NZMYLV RPOSPURVTVWUYTZR[",2129:" 28H\\IPKNMMOMQNROSRSVRZOb RJOLNPNRO RZMYPXRSYP^Nb RYMXPWRSY",2130:" 44I\\VNTMRMONMQLTLWMYNZP[R[UZWWXTXQWOSJRHRFSEUEWFYH RRMPNNQMTMXNZ RR[TZVWWTWPVNTKSISGTFVFYH",2131:" 32I[XPVNTMPMNNNPPRSS RPMONOPQRSS RSSNTLVLXMZP[S[UZWX RSSOTMVMXNZP[",2132:" 31I[TFRGQHQIRJUKZKZJWKSMPOMRLULWMYP[S]T_TaSbQbPa RULQONRMUMWNYP[",2133:" 32G]HQIOKMNMONOPNTL[ RMMNNNPMTK[ RNTPPRNTMVMXNYOYRXWUb RVMXOXRWWTb",2134:" 44F]GQHOJMMMNNNPMUMXNZO[ RLMMNMPLULXMZO[Q[SZUXWUXRYMYIXGVFTFRHRJSM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KULXNZQ[S[VZXXYUYTXQVOSNRNOOMQLT RRFPGNIMKLOLUMXOZQ[ RS[UZWXXUXTWQUOSN",2207:" 31H\\KFKL RKJLHNFPFUIWIXHYF RLHNGPGUI RYFYIXLTQSSRVR[ RXLSQRSQVQ[",2208:" 63H\\PFMGLILLMNPOTOWNXLXIWGTFPF RPFNGMIMLNNPO RTOVNWLWIVGTF RPOMPLQKSKWLYMZP[T[WZXYYWYSXQWPTO RPONPMQLSLWMYNZP[ RT[VZWYXWXSWQVPTO",2209:" 48H\\XMWPURRSQSNRLPKMKLLINGQFSFVGXIYLYRXVWXUZR[O[MZLXLWMVNWMX RQSORMPLMLLMIOGQF RSFUGWIXLXRWVVXTZR[",2210:" 6MWRYQZR[SZRY",2211:" 8MWR[QZRYSZS\\R^Q_",2212:" 12MWRMQNROSNRM RRYQZR[SZRY",2213:" 14MWRMQNROSNRM RR[QZRYSZS\\R^Q_",2214:" 15MWRFQHRTSHRF RRHRN RRYQZR[SZRY",2215:" 32I[MJNKMLLKLJMHNGPFSFVGWHXJXLWNVORQRT RSFUGVHWJWLVNTP RRYQZR[SZRY",2216:" 6NVRFQM RSFQM",2217:" 12JZNFMM ROFMM RVFUM RWFUM",2218:" 14KYQFOGNINKOMQNSNUMVKVIUGSFQF",2219:" 9JZRFRR RMIWO RWIMO",2220:" 3G][BIb",2221:" 20KYVBTDRGPKOPOTPYR]T`Vb RTDRHQKPPPTQYR\\T`",2222:" 20KYNBPDRGTKUPUTTYR]P`Nb RPDRHSKTPTTSYR\\P`",2223:" 12KYOBOb RPBPb ROBVB RObVb",2224:" 12KYTBTb RUBUb RNBUB RNbUb",2225:" 40KYTBRCQDPFPHQJRKSMSOQQ RRCQEQGRISJTLTNSPORSTTVTXSZR[Q]Q_Ra RQSSUSWRYQZP\\P^Q`RaTb",2226:" 40KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQUQWRYSZT\\T^S`RaPb",2227:" 4KYUBNRUb",2228:" 4KYOBVROb",2229:" 3NVRBRb",2230:" 6KYOBOb RUBUb",2231:" 3E_IR[R",2232:" 6E_RIR[ RIR[R",2233:" 9F^RJR[ RJRZR RJ[Z[",2234:" 9F^RJR[ RJJZJ RJRZR",2235:" 6G]KKYY RYKKY",2236:" 6MWRQQRRSSRRQ",2237:" 15E_RIQJRKSJRI RIR[R RRYQZR[SZRY",2238:" 6E_IO[O RIU[U",2239:" 9E_YIK[ RIO[O RIU[U",2240:" 9E_IM[M RIR[R RIW[W",2241:" 4F^ZIJRZ[",2242:" 4F^JIZRJ[",2243:" 10F^ZFJMZT RJVZV RJ[Z[",2244:" 10F^JFZMJT RJVZV RJ[Z[",2245:" 21F_[WYWWVUTRPQOONMNKOJQJSKUMVOVQURTUPWNYM[M",2246:" 24F^IUISJPLONOPPTSVTXTZS[Q RISJQLPNPPQTTVUXUZT[Q[O",2247:" 8G]JTROZT RJTRPZT",2248:" 7LXTFOL RTFUGOL",2249:" 7LXPFUL RPFOGUL",2250:" 18H\\KFLHNJQKSKVJXHYF RKFLINKQLSLVKXIYF",2251:" 8MWRHQGRFSGSIRKQL",2252:" 8MWSFRGQIQKRLSKRJ",2253:" 8MWRHSGRFQGQIRKSL",2254:" 8MWQFRGSISKRLQKRJ",2255:" 10E[HMLMRY RKMR[ R[BR[",2256:" 13F^ZJSJOKMLKNJQJSKVMXOYSZZZ",2257:" 13F^JJJQKULWNYQZSZVYXWYUZQZJ",2258:" 13F^JJQJUKWLYNZQZSYVWXUYQZJZ",2259:" 13F^JZJSKOLMNKQJSJVKXMYOZSZZ",2260:" 16F^ZJSJOKMLKNJQJSKVMXOYSZZZ RJRVR",2261:" 11E_XP[RXT RUMZRUW RIRZR",2262:" 11JZPLRITL RMORJWO RRJR[",2263:" 11E_LPIRLT ROMJROW RJR[R",2264:" 11JZPXR[TX RMURZWU RRIRZ",2265:" 44I\\XRWOVNTMRMONMQLTLWMYNZP[R[UZWXXUYPYKXHWGUFRFPGOHOI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",2312:" 48F^JHNJPLQOQRPUNWJY RJHMIOJQLRO RRRQUOWMXJY RZHWIUJSLRO RRRSUUWWXZY RZHVJTLSOSRTUVWZY RIP[P RIQ[Q",2317:" 12NVQQQSSSSQQQ RQQSS RSQQS",2318:" 18JZMPQRTTVVWYW[V]U^ RMQST RMRPSTUVWWY",2319:" 18JZWKVMTOPQMR RSPMS RUFVGWIWKVNTPQRMT",2320:" 36H\\SMONLPKRKTLVNWQWUVXTYRYPXNVMSM RXNSM RVMQNLP RONKR RLVQW RNWSVXT RUVYR",2321:" 36H\\SMONLPKRKTLVNWQWUVXTYRYPXNVMSM RXNSM RVMQNLP RONKR RLVQW RNWSVXT RUVYR",2322:" 34J[SMPNNPMRMTNVPWRWUVWTXRXPWNUMSM ROPUM RNRVN RMTWO RNUXP ROVWR RPWVT",2323:" 18JZOGO^ RUFU] RMNWL RMOWM RMWWU RMXWV",2324:" 18JZNFNX RVLV^ RNNVL RNOVM RNWVU RNXVV",2325:" 25JZNBNW RNNQLTLVMWOWQVSSUQVNW RNNQMTMVN RUMVOVQUSSU",2326:" 18E_HIHL R\\I\\L RHI\\I RHJ\\J RHK\\K RHL\\L",2327:" 18JZMNMQ RWNWQ RMNWN RMOWO RMPWP RMQWQ",2328:" 49JZMLWX RMLONQOTOVNWMWKUKUMTO RONTO RQOWM RVKVN RULWL RWXUVSUPUNVMWMYOYOWPU RUVPU RSUMW RNVNY RMXOX",2329:" 26JZPOOMOKMKMMNNPOSOUNWL RNKNN RMLOL RMMSO RPOUN RWLWY",2330:" 86A^GfHfIeIdHcGcFdFfGhIiKiNhPfQdR`RUQ;Q4R/S-U,V,X-Y/Y3X6W8U;P?JCHEFHEJDNDREVGYJ[N\\R\\V[XZZW[T[PZMYKWITHPHMIKKJNJRKUMW RGdGeHeHdGd RU;Q?LCIFGIFKENERFVGXJ[ RR\\U[WZYWZTZPYMXKVITH",2331:"103EfNSOUQVSVUUVSVQUOSNQNOONPMSMVNYP[S\\V\\Y[[Y\\W]T]P\\MZJXIUHRHOIMJKLIOHSHXI]KaMcPeTfYf]e`cba RKLJNIRIXJ\\L`NbQdUeYe]d_cba RPOTO ROPUP RNQVQ RNRVR RNSVS ROTUT RPUTU RaLaNcNcLaL RbLbN RaMcM RaVaXcXcVaV RbVbX RaWcW",2332:" 30D`H@Hd RM@Md RW@Wd R\\@\\d RMMWK RMNWL RMOWM RMWWU RMXWV RMYWW",2367:" 12NVQQQSSSSQQQ RQQSS RSQQS",2368:" 18JZMPQRTTVVWYW[V]U^ RMQST RMRPSTUVWWY",2369:" 18JZWKVMTOPQMR RSPMS RUFVGWIWKVNTPQRMT",2370:" 32H\\PMMNLOKQKSLUMVPWTWWVXUYSYQXOWNTMPM RMNLPLSMUNVPW RWVXTXQWOVNTM",2371:" 36H\\SMONLPKRKTLVNWQWUVXTYRYPXNVMSM RXNSM RVMQNLP RONKR RLVQW RNWSVXT RUVYR",2372:" 34J[SMPNNPMRMTNVPWRWUVWTXRXPWNUMSM ROPUM RNRVN RMTWO RNUXP ROVWR RPWVT",2373:" 18JZOGO^ RUFU] RMNWL RMOWM RMWWU RMXWV",2374:" 18JZNFNX RVLV^ RNNVL RNOVM RNWVU RNXVV",2375:" 25JZNBNW RNNQLTLVMWOWQVSSUQVNW RNNQMTMVN RUMVOVQUSSU",2376:" 18E_HIHL R\\I\\L RHI\\I RHJ\\J RHK\\K RHL\\L",2377:" 18JZMNMQ RWNWQ RMNWN RMOWO RMPWP RMQWQ",2378:" 36JZQCVMRTRU RULQS RTITKPRRUUY RW\\UYSXQXOYN[N]O_Ra RW\\UZSYOYO]P_Ra RSXPZN]",2379:" 26JZPOOMOKMKMMNNPOSOUNWL RNKNN RMLOL RMMSO RPOUN RWLSY",2380:" 86A^GfHfIeIdHcGcFdFfGhIiKiNhPfQdR`RUQ;Q4R/S-U,V,X-Y/Y3X6W8U;P?JCHEFHEJDNDREVGYJ[N\\R\\V[XZZW[T[PZMYKWITHPHMIKKJNJRKUMW RGdGeHeHdGd RU;Q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I\\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM RQNOONPMSMUNXOYQZTZVYWXXUXSWPVOTNQN",2616:" 36H\\LMLbMb RLMMMMb RMPONQMTMVNXPYSYUXXVZT[Q[OZMX RMPQNTNVOWPXSXUWXVYTZQZMX",2617:" 36H\\WMWbXb RWMXMXb RWPUNSMPMNNLPKSKULXNZP[S[UZWX RWPSNPNNOMPLSLUMXNYPZSZWX",2618:" 21KYOMO[P[ ROMPMP[ RPSQPSNUMXM RPSQQSOUNXNXM",2619:" 50J[XPWNTMQMNNMPNRPSUUWV RVUWWWXVZ RWYTZQZNY ROZNXMX RXPWPVN RWOTNQNNO RONNPOR RNQPRUTWUXWXXWZT[Q[NZMX",2620:" 16MXRFR[S[ RRFSFS[ ROMVMVN ROMONVN",2621:" 25H\\LMLWMZO[R[TZWW RLMMMMWNYPZRZTYWW RWMW[X[ RWMXMX[",2622:" 14JZLMR[ RLMMMRY RXMWMRY RXMR[",2623:" 26F^IMN[ RIMJMNX RRMNX RRPN[ RRPV[ RRMVX R[MZMVX R[MV[",2624:" 16I[LMW[X[ RLMMMX[ RXMWML[ RXMM[L[",2625:" 17JZLMR[ RLMMMRY RXMWMRYNb RXMR[ObNb",2626:" 20I[VNL[ RXMNZ RLMXM RLMLNVN RNZXZX[ RL[X[",2651:" 33K[UUTSRRPRNSMTLVLXMZO[Q[SZTX RPRNTMVMYO[ RVRTXTZV[XZYY[V RWRUXUZV[",2652:" 23LZLVNSPO RSFMXMZO[P[RZTXUUURVVWWXWZV RTFNXNZO[",2653:" 22LXTSSTTTTSSRQROSNTMVMXNZP[S[VYXV RQROTNVNYP[",2654:" 33K[UUTSRRPRNSMTLVLXMZO[Q[SZTX RPRNTMVMYO[ RZFTXTZV[XZYY[V R[FUXUZV[",2655:" 23LXOYQXRWSUSSRRQROSNTMVMXNZP[S[VYXV RQROTNVNYP[",2656:" 27OXRRUOWLXIXGWFUGTIKdKfLgNfOcPZQ[S[UZVYXV RTISNRRO[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QDSGUKVPVTUYS]Q`Ob",2723:" 39JZRFQGSQRR RRFRR RRFSGQQRR RMINIVOWO RMIWO RMIMJWNWO RWIVINOMO RWIMO RWIWJMNMO",2724:" 8F_JQ[Q[R RJQJR[R",2725:" 16F_RIRZSZ RRISISZ RJQ[Q[R RJQJR[R",2726:" 16F_JM[M[N RJMJN[N RJU[U[V RJUJV[V",2727:" 11NWSFRGRM RSGRM RSFTGRM",2728:" 22I[NFMGMM RNGMM RNFOGMM RWFVGVM RWGVM RWFXGVM",2729:" 30KYQFOGNINKOMQNSNUMVKVIUGSFQF RQFNIOMSNVKUGQF RSFOGNKQNUMVISF",2750:" 42H]TFQGOIMLLOKSKVLYMZO[Q[TZVXXUYRZNZKYHXGVFTF RTFRGPINLMOLSLVMYO[ RQ[SZUXWUXRYNYKXHVF",2751:" 15H]TJO[ RVFP[ RVFSIPKNL RUIQKNL",2752:" 42H]OJPKOLNKNJOHPGSFVFYGZIZKYMWOTQPSMUKWI[ RVFXGYIYKXMVOPS RJYKXMXRZUZWYXW RMXR[U[WZXW",2753:" 50H]OJPKOLNKNJOHPGSFVFYGZIZKYMVOSP RVFXGYIYKXMVO RQPSPVQWRXTXWWYVZS[O[LZKYJWJVKULVKW RSPUQVRWTWWVYUZS[",2754:" 10H]XGR[ RYFS[ RYFJUZU",2755:" 39H]QFLP RQF[F RQGVG[F RLPMOPNSNVOWPXRXUWXUZR[O[LZKYJWJVKULVKW RSNUOVPWRWUVXTZR[",2756:" 46H]YIXJYKZJZIYGWFTFQGOIMLLOKSKWLYMZO[R[UZWXXVXSWQVPTOQOOPMRLT RTFRGPINLMOLSLXMZ RR[TZVXWVWRVP",2757:" 30H]NFLL R[FZIXLSRQUPWO[ RXLRRPUOWN[ RMIPFRFWI RNHPGRGWIYIZH[F",2758:" 63H]SFPGOHNJNMOOQPTPXOYNZLZIYGVFSF RSFQGPHOJOMPOQP RTPWOXNYLYIXGVF RQPMQKSJUJXKZN[R[VZWYXWXTWRVQTP RQPNQLSKUKXLZN[ RR[UZVYWWWSVQ",2759:" 46H]YMXOVQTRQROQNPMNMKNIPGSFVFXGYHZJZNYRXUVXTZQ[N[LZKXKWLVMWLX ROQNONKOIQGSF RXGYIYNXRWUUXSZQ[",2760:" 6MXPYOZP[QZPY",2761:" 8MXP[OZPYQZQ[P]N_",2762:" 11MXSMRNSOTNSM RPYOZP[QZ",2763:" 14MXSMRNSOTNSM RP[OZPYQZQ[P]N_",2764:" 17MXUFTGRS RUGRS RUFVGRS RPYOZP[QZPY",2765:" 34H]OJPKOLNKNJOHPGSFWFZG[I[KZMYNSPQQQSRTTT RWFYGZIZKYMXNVO RPYOZP[QZPY",2766:" 8MXVFTHSJSKTLUKTJ",2767:" 8MXUHTGUFVGVHUJSL",2768:" 55E_\\N[O\\P]O]N\\M[MYNWPRXPZN[K[HZGXGVHTISKRPPROTMUKUITGRFPGOIOLPRQUSXUZW[Y[ZYZX RK[IZHXHVITJSPP ROLPQQTSWUYWZYZZY",2769:" 41H]TBL_ RYBQ_ RZJYKZL[K[JZHYGVFRFOGMIMKNMONVRXT RMKOMVQWRXTXWWYVZS[O[LZKYJWJVKULVKW",2770:" 3G]_BEb",2771:" 20KZZBVESHQKOONTNXO]P`Qb RVESIQMPPOUOZP_Qb",2772:" 20JYSBTDUGVLVPUUSYQ\\N_Jb RSBTEUJUOTTSWQ[N_",2773:" 9J[TFTR ROIYO RYIOO",2774:" 3E_IR[R",2775:" 6E_RIR[ RIR[R",2776:" 6E_IO[O RIU[U",2777:" 6NWUFSM RVFSM",2778:" 12I[PFNM RQFNM RYFWM RZFWM",2779:" 14KZSFQGPIPKQMSNUNWMXKXIWGUFSF",2801:" 18H\\RFK[ RRFY[ RRIX[ RMUVU RI[O[ RU[[[",2802:" 31G]LFL[ RMFM[ RIFYFYLXF RMPUPXQYRZTZWYYXZU[I[ RUPWQXRYTYWXYWZU[",2803:" 45G]LFL[ RMFM[ RIFUFXGYHZJZLYNXOUP RUFWGXHYJYLXNWOUP RMPUPXQ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[ RLMR[ RMMRY RXMR[ RXMX[ RYMY[ RIMMM RXM\\M RI[O[ RU[\\[",2914:" 27G]LML[ RMMM[ RWMW[ RXMX[ RIMPM RTM[M RMTWT RI[P[ RT[[[",2915:" 36H\\QMNNLPKSKULXNZQ[S[VZXXYUYSXPVNSMQM RQMONMPLSLUMXOZQ[ RS[UZWXXUXSWPUNSM",2916:" 21G]LML[ RMMM[ RWMW[ RXMX[ RIM[M RI[P[ RT[[[",2917:" 36G\\LMLb RMMMb RMPONQMSMVNXPYSYUXXVZS[Q[OZMX RSMUNWPXSXUWXUZS[ RIMMM RIbPb",2918:" 28H[WPVQWRXQXPVNTMQMNNLPKSKULXNZQ[S[VZXX RQMONMPLSLUMXOZQ[",2919:" 16I\\RMR[ RSMS[ RMMLRLMYMYRXM RO[V[",2920:" 22I[LMR[ RMMRY RXMR[P_NaLbKbJaK`La RJMPM RTMZM",2921:" 52H]RFRb RSFSb ROFSF RRPQNPMNMLNKQKWLZN[P[QZRX RNMMNLQLWMZN[ RWMXNYQYWXZW[ RSPTNUMWMYNZQZWYZW[U[TZSX RObVb",2922:" 21H\\LMW[ RMMX[ RXML[ RJMPM RTMZM RJ[P[ RT[Z[",2923:" 23G]LML[ RMMM[ RWMW[ RXMX[ RIMPM RTM[M RI[[[[`Z[",2924:" 28G]LMLTMVPWRWUVWT RMMMTNVPW RWMW[ RXMX[ RIMPM RTM[M RT[[[",2925:" 30CbHMH[ RIMI[ RRMR[ RSMS[ R\\M\\[ R]M][ REMLM ROMVM RYM`M RE[`[",2926:" 32CbHMH[ RIMI[ RRMR[ RSMS[ R\\M\\[ R]M][ REMLM ROMVM RYM`M RE[`[``_[",2927:" 27H]QMQ[ RRMR[ RLMKRKMUM RRTVTYUZWZXYZV[N[ RVTXUYWYXXZV[",2928:" 37E_JMJ[ RKMK[ RGMNM RKTOTRUSWSXRZO[G[ ROTQURWRXQZO[ RYMY[ RZMZ[ RVM]M RV[][",2929:" 25J[OMO[ RPMP[ RLMSM RPT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TKTLULUKTK",3267:" 22MXVIUITHTGUFVFWGWIVKULSM RUGUHVHVGUG RVIVJUL",3268:" 72E_\\O\\N[N[P]P]N\\M[MYNWPRXPZN[K[HZGXGVHTISKRPPROTMUKUITGRFPGOIOLPRQURWTZV[X[YYYX RL[HZ RIZHXHVITJSLR RPPQSTYVZ RK[JZIXIVJTKSMRRO ROLPOQRSVUYWZXZYY",3269:" 52H]TBL_ RYBQ_ RZKZJYJYL[L[JZHYGVFRFOGMIMLNNPPVSWUWXVZ RNLONVRWT ROGNINKOMUPWRXTXWWYVZS[O[LZKYJWJULULWKWKV",3270:" 8G^_BEbFb R_B`BFb",3271:" 32JZZBXCUERHPKNOMSMXN\\O_Qb RSHQKOONTN\\ RZBWDTGRJQLPOOSN\\ RNTO]P`Qb",3272:" 32JZSBUEVHWLWQVUTYR\\O_LaJb RVHVPUUSYQ\\ RSBTDUGVP RVHUQTUSXRZP]M`Jb",3273:" 39J[TFSGUQTR RTFTR RTFUGSQTR ROIPIXOYO ROIYO ROIOJYNYO RYIXIPOOO RYIOO RYIYJONOO",3274:" 8F_JQ[Q[R RJQJR[R",3275:" 16F_RIRZSZ RRISISZ RJQ[Q[R RJQJR[R",3276:" 16F_JM[M[N RJMJN[N RJU[U[V RJUJV[V",3277:" 11MWUFTGRM RUGRM RUFVGRM",3278:" 22H\\PFOGMM RPGMM RPFQGMM RZFYGWM RZGWM RZF[GWM",3279:" 30KZSFQGPIPKQMSNUNWMXKXIWGUFSF RSFPIQMUNXKWGSF RUFQGPKSNWMXIUF",3301:" 62F^IHJIIJHIIGKFMFOGPHQKQOPRNTLUIV ROHPKPPOR RMFNGOJOPNSLU RLVOY RKVOZ RIVN[UV R\\G[H\\H\\G[FYFWGVHUJUYW[[W RWHVJVXXZ RYFXGWJWWYY",3302:"101E_GQGRHSJSLRLOKMIJIHKF RKOIK RJSKRKPIMHKHIIGKFNFPGQHRJRRQUOW RPHQJQT RNFOGPJPUOW RRISGUFWFYGZH[J\\K RYHZJ R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[PIOLNNMOKP RPIPXQYO[ ROONOONOXNYOZPYOX RKPNPNXMYO[ RPPUMWNXPXRWTSV RUNWO RTNVOWQWRVTUU RUUWVXXX[W]U_R` RUVWW RSVTVVWWYW\\V^",3501:" 60G]LINGPFRFSGZW[X]X RQGRHYXZZ[YYX RNGPGQHXXYZZ[[[]X RLMMLOKPKQL RPLPM RMLOLPN RG[IYKXNXPY RJYNYOZ RG[JZMZN[PY RRJLX RNSVS",3502:"110F^HHJFMFOGQF RKGNG RHHJGLHOHQF RMKLLKNKOIOHPHRIQKQKW RLMLU RIPLP RMKMTLVKW RRIQJPLPU RQKQS RRIRRQTPU RRIXFZG[I[KYMUO RXGZIZK RVGXHYIYLWN RWNZP[R[X RYPZRZW RWNXOYQYX RJ[MYPXTXWY RLZOYTYVZ RJ[NZSZU[WYYX[X RUOUX RURYR RUUYU",3503:" 69E]NGLHJJILHOHSIVJXMZP[S[VZXYZW[U RJKINISKWNYQZTZWY RNGLIKKJNJRKUNXQYTYWXYW[U RPJPV RQJQT RRIRSQUPV RPJRIUFWGYGZF RTGVHXH RSHUIWIYHZF RWIWX",3504:" 72G^IFWFYGZIZX RKGWGYIYW RIFJGLHWHXIXX ROKNLMNMOKOJPJRKQMQMV RNMNT RKPNP ROKOSNUMV RI[LYOXSXVY RKZNYSYUZ RI[MZRZT[VYXXZX RRHRX RRMTNVNXM RRSTRVRXS",3505:" 94G]IHKFMFOGQF RLGNG RIHKGMHOHQF RNKMLLNLOJOIPIRJQLQLW RMMMU RJPMP RNKNTMVLW RQMRJSHTGVFXF[G RTHVGXGZH RRJSIUHWHYI[G RQURRSPTOVOXP RTPVPWQ RRRSQUQVRXP RK[NYRXWX[Y RMZPYWYZZ RK[OZVZY[[Y RQMQX",3506:" 91F]JHLFOFQGSF RMGPG RJHLGNHQHSF RPKOLNNNOLOKPKRLQNQNV ROMOT RLPOP RPKPSOUNV RSJSYRZQZMXKXIYG[ RTJTX RTPXP RPZOZMYJY RUIUOXO RXQUQUWTYP[N[LZJZG[ RSJUIXFZG\\G]F RWGYH[H RVHXIZI\\H]F RXIXW",3507:" 87E^NGLHJJILHOHRIUJWLYNZQ[U[XZZX[V[SZQYPWOUO RJKINISJV RNGLIKKJNJSKVLXNZ RYXZWZSYQ RU[WZXYYWYSXQWPUO RPJPW RQJQU RRIRTQVPW RPJRIUFWGYGZF RTGVHXH RSHUIWIYHZF RYHUOU[ RUSYS RUVYV",3508:"112F^HHJFMFOGQF RKGNG RHHJGLHOHQF RMKLLKNKOIOHPHRIQKQKW RLMLU RIPLP RMKMTLVKW RJ[MYPXSXUY RLZOYRYTZ RJ[NZQZS[UY RRIQJPLPU RQKQS RRIRRQTPU RRITGVFXFZG RWGXGYH RTGVGXIZG RUOWNYLZM[P[TZXX[ RXMYNZPZUYX RWNXNYPYUX[ RUOUY RURYR RUUYU",3509:" 67I\\LHNFQFTGVF ROGSG RLHNGQHTHVF RSKRLQNQOOONPNROQQQQV RRMRT ROPRP RSKSSRUQV RYHWJVMVXUZSZOXMXKYI[ RWKWW RRZQZOYLY RYHXJXVWXUZS[P[NZKZI[",3510:" 65H\\LHNFQFTGVF ROGSG RLHNGQHTHVF RSKRLQNQOOONPNROQQQQV RRMRT ROPRP RSKSSRUQV RYHWJVMVXUZ RWKWW RYHXJXVWXUZR[O[LZJXJVKULUMVLWKW RJVMV",3511:"115F^HHJFMFOGQF RKGNG RHHJGLHOHQF RMKLLKNKOIOHPHRIQKQKW RLMLU RIPLP RMKMTLVKW RJ[MYPXSXUY RLZNYRYTZ RJ[NZQZS[UY RRIQJPLPU RQKQS RRIRRQTPU RRITGVFXFZG RWGXGYH RTGVGXIZG RUOXLYM[N RWMYN[N R[NYQWSUU RWSYTZX[Z\\Z RYVZZ RWSXTYZZ[[[\\Z RUOUY",3512:" 85G]IHKFNFPGRF RLGOG RIHKGMHPHRF RNKMLLNLOJOIPIRJQLQLW RMMMU RJPMP RNKNTMVLW RK[NYRXWX[Y RMZPYWYZZ RK[OZVZY[[Y RSIRJ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ZRYOYL[ RWMVOTROWL[",3620:" 28MWPHQJQXOYPYRZS[ RRJQHRGRYTZ RPHSFSXUYVYTZS[ RNMQM RSMVM",3621:" 47I[KOLOMPMXKY RLNNONYPZ RKOMMOOOXQYRY RKYLYNZO[PZRYUX RUMVNXOYOWPWXXYYY RTNVOVYWZ RUMSOUPUYW[YY",3622:" 36I[LMMOMXP[RYUXWX RMNNONXQZ RLMNNOOOWPXRY RUMVNXOYOWPWX RTNVOVW RUMSOUPUX",3623:" 57E_HMIOIXL[NYQX RINJOJXMZ RHMJNKOKWLXNY RQMOOQPQXT[VYYX[X RPNRORXUZ RQMRNTOSPSWTXVY RYMZN\\O]O[P[X RXNZOZW RYMWOYPYX",3624:" 59H[KOLONPOQSYTZV[XY RMNOOTYVZ RKOMMONPOTWUXWYXY RRSUMVNXNYM RUNVOWO RTOVPXOYM RQUN[MZKZJ[ RNZMYLY ROYMXKYJ[ RMTPT RSTVT",3625:" 60I[KOLOMPMXKY RLNNONYPZ RKOMMOOOXQYRY RKYLYNZO[PZRYUX RUMVNXOYOWPW\\V_TaRbQaO`M` RTNVOV\\ RSaQ`P` RUMSOUPUZV]V_ RTaS`Q_O_M`",3626:" 38I[XML[ RLONPQPTOXM RMNOOSO RLONMPNTNXM RL[PYSXVXXY RQYUYWZ RL[PZTZV[XY RNTVT",3700:" 42H\\LHLXJY RMIMXPZ RNHNXPYQZ RLHNHSGUF RSGTHVIVY RTGWIWX RUFVGXHZHXIXY RJYLYNZO[QZVYXY",3701:" 27H\\OHPIQKQXOY RQIPHQGRIRYTZ ROHRFSHSXUYVY ROYPYRZS[TZVY",3702:" 48H\\LHNHPGQFSGVHXH RPHRG RLHNIPIRHSG RVHVP RWIWO RXHXPQPNQLSKVK[ RK[OYSXVXZY RNZQYVYYZ RK[PZUZX[ZY",3703:" 57H\\LHMHOGPFRGVHXH ROHQG RLHNIPIRG RVHVO RWIWN RXHXOVOSPQQ RQPSQVRXRXY RWSWX RVRVY RKYMXOXQYRZ ROYQZ RKYMYOZP[RZVYXY",3704:" 41H\\UFKPKUTU RVUZU[V[TZU RLPLT RMNMU RTGTXRY RUJVHUGUYWZ RUFWHVJVXXYYY RRYSYUZV[WZYY",3705:" 53H\\LFLO RLFXF RMGVG RLHUHWGXF RVLUMSNOOLO RSNTNVOVY RUMWNWX RVLWMYNZNXOXY RKYMXOXQYRZ ROYQZ RKYMYOZP[RZVYXY",3706:" 59H\\LHLXJY RMIMXPZ RNHNXPYQZ RLHNHRGTFUGWHXH RSGUH RRGTIVIXH RNPOPSOUNVM RSOTOVPVY RUNWPWX RVMWNYOZOXPXY RJYLYNZO[QZVYXY",3707:" 38H\\KHMFPGUGZF RLGOHTHWG RKHOIRIVHZF RZFYHWKSOQRPUPXQ[ RRQQTQWRZ RUMSPRSRVSYQ[",3708:" 71H\\LILO RMJMN RNINO RLINISHUGVF RSHTHVIVO RUGWHWN RVFWGYHZHXIXO RLONOVRXR RXOVONRLR RLRLXJY RMSMXPZ RNRNXPYQZ RVRVY RWSWX RXRXY RJYLYNZO[QZVYXY",3709:" 60H\\LHLQJR RMIMROS RNHNQPRQR RLHNHSGUF RSGTHVIVY RTGWIWX RUFVGXHZHXIXY RJRKRMSNTOSQRUQVQ RKYMXOXQYRZ ROYQZ RKYMYOZP[RZVYXY",3710:" 11LXRXPZR[TZRX RRYQZSZRY",3711:" 14LXR^R\\PZRXSZS\\R^P_ RRYQZR[RY",3712:" 22LXRMPORPTORM RRNQOSORN RRXPZR[TZRX RRYQZSZRY",3713:" 25LXRMPORPTORM RRNQOSORN RR^R\\PZRXSZS\\R^P_ RRYQZR[RY",3714:" 30LXRFQGOHQIRT RRISHRGQHRIRT RRFSGUHSIRT RRXPZR[TZRX RRYQZSZRY",3715:" 51I[LJMHNGQFSFVGWHXJXLWNUPSQ RMJNH RVHWIWMVN RLJNKNIOGQF RSFUGVIVMUOSQ RRQRTSQQQRT RRXPZR[TZRX RRYQZSZRY",3716:" 14LXTFRGQIQKRMTKRIRG RRJRLSKRJ",3717:" 14LXRLRJPHRFSHSJRLPM RRGQHRIRG",3718:" 62E_YNZO[O\\N RXOYP[P RXPYQZQ[P\\N RYNST RRUL[HVNP ROOSKOFJLPRTXVZX[Z[[Z\\X RLZIV RRKOG RKLPQTWVYXZ[Z RMZIU RRLNG RKKQQUWVXXY[Y\\X",3719:" 60H\\PBP_ RTBT_ RTFVGWIWKYJXHWGTFPFMGKIKLLNOPURWSXUXXWZ RXJWH RLLMNOOUQWRXT RMYLW RMGLILKMMONUPXRYTYWXYWZT[P[MZLYKWMVMXNZP[",3720:" 8G^[BIbJb R[B\\BJb",3721:" 27KYUBSDQGOKNPNTOYQ]S`Ub RQHPKOOOUPYQ\\ RSDRFQIPOPUQ[R^S`",3722:" 27KYOBQDSGUKVPVTUYS]Q`Ob RSHTKUOUUTYS\\ RQDRFSITOTUS[R^Q`",3723:" 39JZRFQGSQRR RRFRR RRFSGQQRR RMINIVOWO RMIWO RMIMJWNWO RWIVINOMO RWIMO RWIWJMNMO",3724:" 8F_JQ[Q[R RJQJR[R",3725:" 16F_RIRZSZ RRISISZ RJQ[Q[R RJQJR[R",3726:" 16F_JM[M[N RJMJN[N RJU[U[V RJUJV[V",3727:" 11NWSFRGRM RSGRM RSFTGRM",3728:" 22I[NFMGMM RNGMM RNFOGMM RWFVGVM RWGVM RWFXGVM",3729:" 30KYQFOGNINKOMQNSNUMVKVIUGSFQF RQFNIOMSNVKUGQF RSFOGNKQNUMVISF",3801:" 52E_NHLIJKIMHPHSIUKV RJLIOISJU RNHLJKLJOJRKVKXJZH[ RVHXHXYVY RYHYY RZGZZ RHFKGQHVHZG\\F RJPXP RH[KZQYVYZZ\\[",3802:" 65E_LGLZ RMGMZ RPFNGNZP[ RHJJHLGPFUFXGZIZKYM RXHYIYKXM RUFWGXIXKWL RQUOTNRNPONPMSLVLYM[O\\Q\\T[WYYWZT[P[LZJYHW RZO[Q[UZW RVLYNZQZUYXWZ",3803:" 60E_\\F[HZJXHVGSFQFNGLHJJILHOHR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OXQYRZ RNYOYQZ ROZP[UYWX ROZO_PbN` ROORNTMWPWX RTNVPVX RRNUQUY",3917:" 31J[MPMXP[UY RNPNXPZ ROOOWRZ RMPOOTMWPW_XbV` RTNVPV` RRNUQU_TbV`",3918:" 31KXMONOOPOXNYP[ RONPOPXOYPZQYPX RMOOMQOQXRYP[ RQOUMWOUPSN RTNVO",3919:" 41JZMPMSOUURWTWX RNPNSOT ROOOSPT RUSVTVX RTSUTUY RMPSMVNTOQN RRNUN RWXQ[MYOXSZ ROYQZ",3920:" 27MWRHPFQJQXPYR[ RRHRXQYRZSYRX RRHTFSJSXTYR[ RNMQM RSMVM",3921:" 40I[KOLOMPMYP[UY RMNNONYPZ RKOMMOOOXRZ RVMXOWPWXXYYY RVPWOVNUOVPVYWZ RVMTOUPUYW[YY",3922:" 36I[LMMOMXQ[SYWW RMNNONXQZ RLMNNOOOWRYSY RVMXOWPWW RVPWOVNUOVPVW RVMTOUPUX",3923:" 59E_HMIOIXM[OYQX RINJOJXMZ RHMJNKOKWNYOY RRMPOQPQXU[WY[W RRPSORNQORPRXUZ RRMTOSPSWVYWY RZM\\O[P[W RZP[OZNYOZPZW RZMXOYPYX",3924:" 39I[LONPUZV[XY RMNOOUYWZ RLONMONVXXY RXMVMVOXOXMVOSS RQUNYL[N[NYLYL[ RNTQT RSTVT",3925:" 49I[KOLOMPMYP[UY RMNNONYPZ RKOMMOOOXRZ RVMXOWPW]V_U`SaQaO`MaObQa RVPWOVNUOVPV^U_ RPaNa RVMTOUPU^T`Sa",3926:" 43L[RNOPOORNTMWOWSRU RTNVOVS RRNUPUSTT RRUWWW]V_U`SaQaO`MaObQa RVWV^U_ RPaNa RTVUWU^T`Sa"},gt={"\\frac":{glyph:0,arity:2,flags:{}},"\\binom":{glyph:0,arity:2,flags:{}},"\\sqrt":{glyph:2267,arity:1,flags:{opt:!0,xfl:!0,yfl:!0}},"^":{glyph:0,arity:1,flags:{}},_:{glyph:0,arity:1,flags:{}},"(":{glyph:2221,arity:0,flags:{yfl:!0}},")":{glyph:2222,arity:0,flags:{yfl:!0}},"[":{glyph:2223,arity:0,flags:{yfl:!0}},"]":{glyph:2224,arity:0,flags:{yfl:!0}},"\\langle":{glyph:2227,arity:0,flags:{yfl:!0}},"\\rangle":{glyph:2228,arity:0,flags:{yfl:!0}},"|":{glyph:2229,arity:0,flags:{yfl:!0}},"\\|":{glyph:2230,arity:0,flags:{yfl:!0}},"\\{":{glyph:2225,arity:0,flags:{yfl:!0}},"\\}":{glyph:2226,arity:0,flags:{yfl:!0}},"\\#":{glyph:2275,arity:0,flags:{}},"\\$":{glyph:2274,arity:0,flags:{}},"\\&":{glyph:2273,arity:0,flags:{}},"\\%":{glyph:2271,arity:0,flags:{}},"\\begin":{glyph:0,arity:1,flags:{}},"\\end":{glyph:0,arity:1,flags:{}},"\\left":{glyph:0,arity:1,flags:{}},"\\right":{glyph:0,arity:1,flags:{}},"\\middle":{glyph:0,arity:1,flags:{}},"\\cdot":{glyph:2236,arity:0,flags:{}},"\\pm":{glyph:2233,arity:0,flags:{}},"\\mp":{glyph:2234,arity:0,flags:{}},"\\times":{glyph:2235,arity:0,flags:{}},"\\div":{glyph:2237,arity:0,flags:{}},"\\leqq":{glyph:2243,arity:0,flags:{}},"\\geqq":{glyph:2244,arity:0,flags:{}},"\\leq":{glyph:2243,arity:0,flags:{}},"\\geq":{glyph:2244,arity:0,flags:{}},"\\propto":{glyph:2245,arity:0,flags:{}},"\\sim":{glyph:2246,arity:0,flags:{}},"\\equiv":{glyph:2240,arity:0,flags:{}},"\\dagger":{glyph:2277,arity:0,flags:{}},"\\ddagger":{glyph:2278,arity:0,flags:{}},"\\ell":{glyph:662,arity:0,flags:{}},"\\vec":{glyph:2261,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\overrightarrow":{glyph:2261,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\overleftarrow":{glyph:2263,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\bar":{glyph:2231,arity:1,flags:{hat:!0,xfl:!0}},"\\overline":{glyph:2231,arity:1,flags:{hat:!0,xfl:!0}},"\\widehat":{glyph:2247,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\hat":{glyph:2247,arity:1,flags:{hat:!0}},"\\acute":{glyph:2248,arity:1,flags:{hat:!0}},"\\grave":{glyph:2249,arity:1,flags:{hat:!0}},"\\breve":{glyph:2250,arity:1,flags:{hat:!0}},"\\tilde":{glyph:2246,arity:1,flags:{hat:!0}},"\\underline":{glyph:2231,arity:1,flags:{mat:!0,xfl:!0}},"\\not":{glyph:2220,arity:1,flags:{}},"\\neq":{glyph:2239,arity:1,flags:{}},"\\ne":{glyph:2239,arity:1,flags:{}},"\\exists":{glyph:2279,arity:0,flags:{}},"\\in":{glyph:2260,arity:0,flags:{}},"\\subset":{glyph:2256,arity:0,flags:{}},"\\supset":{glyph:2258,arity:0,flags:{}},"\\cup":{glyph:2257,arity:0,flags:{}},"\\cap":{glyph:2259,arity:0,flags:{}},"\\infty":{glyph:2270,arity:0,flags:{}},"\\partial":{glyph:2265,arity:0,flags:{}},"\\nabla":{glyph:2266,arity:0,flags:{}},"\\aleph":{glyph:2077,arity:0,flags:{}},"\\wp":{glyph:2190,arity:0,flags:{}},"\\therefore":{glyph:740,arity:0,flags:{}},"\\mid":{glyph:2229,arity:0,flags:{}},"\\sum":{glyph:2402,arity:0,flags:{big:!0}},"\\prod":{glyph:2401,arity:0,flags:{big:!0}},"\\bigoplus":{glyph:2284,arity:0,flags:{big:!0}},"\\bigodot":{glyph:2281,arity:0,flags:{big:!0}},"\\int":{glyph:2412,arity:0,flags:{yfl:!0}},"\\oint":{glyph:2269,arity:0,flags:{yfl:!0}},"\\oplus":{glyph:1284,arity:0,flags:{}},"\\odot":{glyph:1281,arity:0,flags:{}},"\\perp":{glyph:738,arity:0,flags:{}},"\\angle":{glyph:739,arity:0,flags:{}},"\\triangle":{glyph:842,arity:0,flags:{}},"\\Box":{glyph:841,arity:0,flags:{}},"\\rightarrow":{glyph:2261,arity:0,flags:{}},"\\to":{glyph:2261,arity:0,flags:{}},"\\leftarrow":{glyph:2263,arity:0,flags:{}},"\\gets":{glyph:2263,arity:0,flags:{}},"\\circ":{glyph:902,arity:0,flags:{}},"\\bigcirc":{glyph:904,arity:0,flags:{}},"\\bullet":{glyph:828,arity:0,flags:{}},"\\star":{glyph:856,arity:0,flags:{}},"\\diamond":{glyph:743,arity:0,flags:{}},"\\ast":{glyph:728,arity:0,flags:{}},"\\log":{glyph:0,arity:0,flags:{txt:!0}},"\\ln":{glyph:0,arity:0,flags:{txt:!0}},"\\exp":{glyph:0,arity:0,flags:{txt:!0}},"\\mod":{glyph:0,arity:0,flags:{txt:!0}},"\\lim":{glyph:0,arity:0,flags:{txt:!0,big:!0}},"\\sin":{glyph:0,arity:0,flags:{txt:!0}},"\\cos":{glyph:0,arity:0,flags:{txt:!0}},"\\tan":{glyph:0,arity:0,flags:{txt:!0}},"\\csc":{glyph:0,arity:0,flags:{txt:!0}},"\\sec":{glyph:0,arity:0,flags:{txt:!0}},"\\cot":{glyph:0,arity:0,flags:{txt:!0}},"\\sinh":{glyph:0,arity:0,flags:{txt:!0}},"\\cosh":{glyph:0,arity:0,flags:{txt:!0}},"\\tanh":{glyph:0,arity:0,flags:{txt:!0}},"\\csch":{glyph:0,arity:0,flags:{txt:!0}},"\\sech":{glyph:0,arity:0,flags:{txt:!0}},"\\coth":{glyph:0,arity:0,flags:{txt:!0}},"\\arcsin":{glyph:0,arity:0,flags:{txt:!0}},"\\arccos":{glyph:0,arity:0,flags:{txt:!0}},"\\arctan":{glyph:0,arity:0,flags:{txt:!0}},"\\arccsc":{glyph:0,arity:0,flags:{txt:!0}},"\\arcsec":{glyph:0,arity:0,flags:{txt:!0}},"\\arccot":{glyph:0,arity:0,flags:{txt:!0}},"\\text":{glyph:0,arity:1,flags:{}},"\\mathnormal":{glyph:0,arity:1,flags:{}},"\\mathrm":{glyph:0,arity:1,flags:{}},"\\mathit":{glyph:0,arity:1,flags:{}},"\\mathbf":{glyph:0,arity:1,flags:{}},"\\mathsf":{glyph:0,arity:1,flags:{}},"\\mathtt":{glyph:0,arity:1,flags:{}},"\\mathfrak":{glyph:0,arity:1,flags:{}},"\\mathcal":{glyph:0,arity:1,flags:{}},"\\mathbb":{glyph:0,arity:1,flags:{}},"\\mathscr":{glyph:0,arity:1,flags:{}},"\\rm":{glyph:0,arity:1,flags:{}},"\\it":{glyph:0,arity:1,flags:{}},"\\bf":{glyph:0,arity:1,flags:{}},"\\sf":{glyph:0,arity:1,flags:{}},"\\tt":{glyph:0,arity:1,flags:{}},"\\frak":{glyph:0,arity:1,flags:{}},"\\cal":{glyph:0,arity:1,flags:{}},"\\bb":{glyph:0,arity:1,flags:{}},"\\scr":{glyph:0,arity:1,flags:{}},"\\quad":{glyph:0,arity:0,flags:{}},"\\,":{glyph:0,arity:0,flags:{}},"\\.":{glyph:0,arity:0,flags:{}},"\\;":{glyph:0,arity:0,flags:{}},"\\!":{glyph:0,arity:0,flags:{}},"\\alpha":{glyph:2127,flags:{}},"\\beta":{glyph:2128,flags:{}},"\\gamma":{glyph:2129,flags:{}},"\\delta":{glyph:2130,flags:{}},"\\varepsilon":{glyph:2131,flags:{}},"\\zeta":{glyph:2132,flags:{}},"\\eta":{glyph:2133,flags:{}},"\\vartheta":{glyph:2134,flags:{}},"\\iota":{glyph:2135,flags:{}},"\\kappa":{glyph:2136,flags:{}},"\\lambda":{glyph:2137,flags:{}},"\\mu":{glyph:2138,flags:{}},"\\nu":{glyph:2139,flags:{}},"\\xi":{glyph:2140,flags:{}},"\\omicron":{glyph:2141,flags:{}},"\\pi":{glyph:2142,flags:{}},"\\rho":{glyph:2143,flags:{}},"\\sigma":{glyph:2144,flags:{}},"\\tau":{glyph:2145,flags:{}},"\\upsilon":{glyph:2146,flags:{}},"\\varphi":{glyph:2147,flags:{}},"\\chi":{glyph:2148,flags:{}},"\\psi":{glyph:2149,flags:{}},"\\omega":{glyph:2150,flags:{}},"\\epsilon":{glyph:2184,flags:{}},"\\theta":{glyph:2185,flags:{}},"\\phi":{glyph:2186,flags:{}},"\\varsigma":{glyph:2187,flags:{}},"\\Alpha":{glyph:2027,flags:{}},"\\Beta":{glyph:2028,flags:{}},"\\Gamma":{glyph:2029,flags:{}},"\\Delta":{glyph:2030,flags:{}},"\\Epsilon":{glyph:2031,flags:{}},"\\Zeta":{glyph:2032,flags:{}},"\\Eta":{glyph:2033,flags:{}},"\\Theta":{glyph:2034,flags:{}},"\\Iota":{glyph:2035,flags:{}},"\\Kappa":{glyph:2036,flags:{}},"\\Lambda":{glyph:2037,flags:{}},"\\Mu":{glyph:2038,flags:{}},"\\Nu":{glyph:2039,flags:{}},"\\Xi":{glyph:2040,flags:{}},"\\Omicron":{glyph:2041,flags:{}},"\\Pi":{glyph:2042,flags:{}},"\\Rho":{glyph:2043,flags:{}},"\\Sigma":{glyph:2044,flags:{}},"\\Tau":{glyph:2045,flags:{}},"\\Upsilon":{glyph:2046,flags:{}},"\\Phi":{glyph:2047,flags:{}},"\\Chi":{glyph:2048,flags:{}},"\\Psi":{glyph:2049,flags:{}},"\\Omega":{glyph:2050,flags:{}}};function vn(o,t="math"){const e=o.charCodeAt(0);if(65<=e&&e<=90){const n=e-65;return t=="text"||t=="rm"?n+2001:t=="tt"?n+501:t=="bf"||t=="bb"?n+3001:t=="sf"?n+2501:t=="frak"?n+3301:t=="scr"||t=="cal"?n+2551:n+2051}if(97<=e&&e<=122){const n=e-97;return t=="text"||t=="rm"?n+2101:t=="tt"?n+601:t=="bf"||t=="bb"?n+3101:t=="sf"?n+2601:t=="frak"?n+3401:t=="scr"||t=="cal"?n+2651:n+2151}if(48<=e&&e<=57){const n=e-48;return t=="it"?n+2750:t=="bf"?n+3200:t=="tt"?n+700:n+2200}return{".":2210,",":2211,":":2212,";":2213,"!":2214,"?":2215,"'":2216,'"':2217,"*":2219,"/":2220,"-":2231,"+":2232,"=":2238,"<":2241,">":2242,"~":2246,"@":2273,"\\":804}[o]}const te={SUB_SUP_SCALE:.5,SQRT_MAG_SCALE:.5,FRAC_SCALE:.85,LINE_SPACING:.5,FRAC_SPACING:.4};function ml(o){o=o.replace(/\n/g," ");let t=0;const e=[];let n="";for(;t<o.length;)o[t]==" "?n.length&&(e.push(n),n=""):o[t]=="\\"?n.length==1&&n[0]=="\\"?(n+=o[t],e.push(n),n=""):(n.length&&e.push(n),n=o[t]):/[A-Za-z0-9\.]/.test(o[t])?n+=o[t]:(n.length&&n!="\\"&&(e.push(n),n=""),n+=o[t],e.push(n),n=""),t++;return n.length&&e.push(n),e}function pl(o){return{type:gt[o]?"symb":"char",mode:"math",text:o,chld:[],bbox:null}}function bo(o){let t=0,e={type:"node",text:"",mode:"math",chld:[],bbox:null};function n(){if(o[t]!="[")return null;let r=0,s=t;for(;s<o.length;){if(o[s]=="[")r++;else if(o[s]=="]"&&(r--,!r))break;s++}const a=bo(o.slice(t+1,s));return t=s,a}function i(r){let s=t,a=s,c=0,d=0;const u=[];for(;s<o.length;){if(o[s]=="{")c||(a=s),c++;else if(o[s]=="}"){if(c--,!c&&(u.push(bo(o.slice(a+1,s))),d++,d==r))break}else if(c==0&&(u.push(pl(o[s])),d++,d==r))break;s++}return t=s,u}for(t=0;t<o.length;t++){const r=gt[o[t]],s={type:"",text:o[t],mode:"math",chld:[],bbox:null};if(r)if(r.arity){t++,s.type="func";let a=null;r.flags.opt&&(a=n(),a&&t++);const c=i(r.arity);s.chld=c,a&&s.chld.push(a)}else s.type="symb";else o[t]=="{"?(s.type="node",s.text="",s.chld=i(1)):s.type="char";e.chld.push(s)}return e.chld.length==1&&(e=e.chld[0]),e}function Ki(o){let t=0;for(;t<o.length;){if(o[t].text=="\\begin"){let e;for(e=t;e<o.length&&o[e].text!="\\end";e++);const n=o.splice(t+1,e-(t+1));Ki(n),o[t].text=o[t].chld[0].text,o[t].chld=n,o.splice(t+1,1)}t++}}function kt(o,t,e,n,i,r){if(e==null&&(e=t),!!o.bbox){r&&(o.bbox.x*=t,o.bbox.y*=e),o.bbox.w*=t,o.bbox.h*=e;for(let s=0;s<o.chld.length;s++)kt(o.chld[s],t,e,0,0,!0);o.bbox.x+=n,o.bbox.y+=i}}function Hi(o){let t=1/0,e=-1/0,n=1/0,i=-1/0;for(let r=0;r<o.length;r++)o[r].bbox&&(t=Math.min(t,o[r].bbox.x),n=Math.min(n,o[r].bbox.y),e=Math.max(e,o[r].bbox.x+o[r].bbox.w),i=Math.max(i,o[r].bbox.y+o[r].bbox.h));return{x:t,y:n,w:e-t,h:i-n}}function Ll(o){if(!o.length)return null;const t=Hi(o);for(let n=0;n<o.length;n++)o[n].bbox&&(o[n].bbox.x-=t.x,o[n].bbox.y-=t.y);return{type:"node",text:"",mode:"math",chld:o,bbox:t}}function Il(o,t="center"){for(let d=0;d<o.length;d++)if(o[d].text=="^"||o[d].text=="'"){let u=0,R=d;for(;R>0&&(o[R].text=="^"||o[R].text=="_"||o[R].text=="'");)R--;u=o[R].bbox.y,o[d].text=="'"?o[d].bbox.y=u:(kt(o[d],te.SUB_SUP_SCALE,null,0,0),gt[o[R].text]&>[o[R].text].flags.big?o[d].bbox.y=u-o[d].bbox.h:o[R].text=="\\int"?o[d].bbox.y=u:o[d].bbox.y=u-o[d].bbox.h/2)}else if(o[d].text=="_"){let u=1,R=d;for(;R>0&&(o[R].text=="^"||o[R].text=="_"||o[R].text=="'");)R--;u=o[R].bbox.y+o[R].bbox.h,kt(o[d],te.SUB_SUP_SCALE,null,0,0),gt[o[R].text]&>[o[R].text].flags.big?o[d].bbox.y=u:o[R].text=="\\int"?o[d].bbox.y=u-o[d].bbox.h:o[d].bbox.y=u-o[d].bbox.h/2}function e(d,u,R,h,g){let f=d,T=g,m=1/0,p=-1/0;for(;h>0?f<o.length:f>=0;){if(o[f].text==u)T++;else if(o[f].text==R){if(T--,T==0)break}else o[f].text=="^"||o[f].text=="_"||o[f].bbox&&(m=Math.min(m,o[f].bbox.y),p=Math.max(p,o[f].bbox.y+o[f].bbox.h));f+=h}return[m,p]}for(let d=0;d<o.length;d++)if(o[d].text=="\\left"){const[u,R]=e(d,"\\left","\\right",1,0);u!=1/0&&R!=-1/0&&(o[d].bbox.y=u,kt(o[d],1,(R-u)/o[d].bbox.h,0,0))}else if(o[d].text=="\\right"){const[u,R]=e(d,"\\right","\\left",-1,0);u!=1/0&&R!=-1/0&&(o[d].bbox.y=u,kt(o[d],1,(R-u)/o[d].bbox.h,0,0))}else if(o[d].text=="\\middle"){const[u,R]=e(d,"\\right","\\left",-1,1),[h,g]=e(d,"\\left","\\right",1,1),f=Math.min(u,h),T=Math.max(R,g);f!=1/0&&T!=-1/0&&(o[d].bbox.y=f,kt(o[d],1,(T-f)/o[d].bbox.h,0,0))}if(!o.some(d=>d.text=="&"||d.text=="\\\\"))return;const n=[];let i=[],r=[];for(let d=0;d<o.length;d++)o[d].text=="&"?(i.push(r),r=[]):o[d].text=="\\\\"?(r.length&&(i.push(r),r=[]),n.push(i),i=[]):r.push(o[d]);r.length&&i.push(r),i.length&&n.push(i);const s=[],a=[];for(let d=0;d<n.length;d++){const u=[];for(let R=0;R<n[d].length;R++){const h=Ll(n[d][R]);h&&(s[R]=s[R]||0,s[R]=Math.max(h.bbox.w+1,s[R])),u[R]=h}a.push(u)}const c=[];for(let d=0;d<a.length;d++){let u=1/0,R=-1/0;for(let h=0;h<a[d].length;h++)a[d][h]&&(u=Math.min(u,a[d][h].bbox.y),R=Math.max(R,a[d][h].bbox.y+a[d][h].bbox.h));c.push([u,R])}for(let d=0;d<c.length;d++)(c[d][0]==1/0||c[d][1]==1/0)&&(c[d][0]=d==0?0:c[d-1][1],c[d][1]=c[d][0]+2);for(let d=1;d<a.length;d++){const u=c[d-1][1]-c[d][0]+te.LINE_SPACING;for(let R=0;R<a[d].length;R++)a[d][R]&&(a[d][R].bbox.y+=u);c[d][0]+=u,c[d][1]+=u}o.splice(0,o.length);for(let d=0;d<a.length;d++){let u=0;for(let R=0;R<a[d].length;R++){const h=a[d][R];if(!h){u+=s[R];continue}h.bbox.x+=u,u+=s[R]-h.bbox.w,t=="center"?h.bbox.x+=(s[R]-h.bbox.w)/2:t=="left"||(t=="right"||t=="equation"&&R!=a[d].length-1)&&(h.bbox.x+=s[R]-h.bbox.w),o.push(h)}}}function he(o,t="math"){const e={"\\text":"text","\\mathnormal":"math","\\mathrm":"rm","\\mathit":"it","\\mathbf":"bf","\\mathsf":"sf","\\mathtt":"tt","\\mathfrak":"frak","\\mathcal":"cal","\\mathbb":"bb","\\mathscr":"scr","\\rm":"rm","\\it":"it","\\bf":"bf","\\sf":"tt","\\tt":"tt","\\frak":"frak","\\cal":"cal","\\bb":"bb","\\scr":"scr"}[o.text]??t;if(!o.chld.length){if(gt[o.text])if(gt[o.text].flags.big)o.text=="\\lim"?o.bbox={x:0,y:0,w:3.5,h:2}:o.bbox={x:0,y:-.5,w:3,h:3};else if(gt[o.text].flags.txt){let n=0;for(let i=1;i<o.text.length;i++)n+=tn(vn(o.text[i],"text")).w;n/=16,o.bbox={x:0,y:0,w:n,h:2}}else if(gt[o.text].glyph){let n=tn(gt[o.text].glyph).w;n/=16,o.text=="\\int"||o.text=="\\oint"?o.bbox={x:0,y:-1.5,w:n,h:5}:o.bbox={x:0,y:0,w:n,h:2}}else o.bbox={x:0,y:0,w:1,h:2};else{let n=0;for(let i=0;i<o.text.length;i++)tn(vn(o.text[i],e))&&(e=="tt"?n+=16:n+=tn(vn(o.text[i],e)).w);n/=16,o.bbox={x:0,y:0,w:n,h:2}}o.mode=e;return}if(o.text=="\\frac"){const n=o.chld[0],i=o.chld[1],r=te.FRAC_SCALE;he(n),he(i),n.bbox.x=0,n.bbox.y=0,i.bbox.x=0,i.bbox.y=0;const s=Math.max(n.bbox.w,i.bbox.w)*r;kt(n,r,null,(s-n.bbox.w*r)/2,0),kt(i,r,null,(s-i.bbox.w*r)/2,n.bbox.h+te.FRAC_SPACING),o.bbox={x:0,y:-n.bbox.h+1-te.FRAC_SPACING/2,w:s,h:n.bbox.h+i.bbox.h+te.FRAC_SPACING}}else if(o.text=="\\binom"){const n=o.chld[0],i=o.chld[1];he(n),he(i),n.bbox.x=0,n.bbox.y=0,i.bbox.x=0,i.bbox.y=0;const r=Math.max(n.bbox.w,i.bbox.w);kt(n,1,null,(r-n.bbox.w)/2+1,0),kt(i,1,null,(r-i.bbox.w)/2+1,n.bbox.h),o.bbox={x:0,y:-n.bbox.h+1,w:r+2,h:n.bbox.h+i.bbox.h}}else if(o.text=="\\sqrt"){const n=o.chld[0];he(n);const i=o.chld[1];let r=0;i&&(he(i),r=Math.max(i.bbox.w*te.SQRT_MAG_SCALE-.5,0),kt(i,te.SQRT_MAG_SCALE,null,0,.5)),kt(n,1,null,1+r,.5),o.bbox={x:0,y:2-n.bbox.h-.5,w:n.bbox.w+1+r,h:n.bbox.h+.5}}else if(gt[o.text]&>[o.text].flags.hat){const n=o.chld[0];he(n);const i=n.bbox.y-.5;n.bbox.y=.5,o.bbox={x:0,y:i,w:n.bbox.w,h:n.bbox.h+.5}}else if(gt[o.text]&>[o.text].flags.mat){const n=o.chld[0];he(n),o.bbox={x:0,y:0,w:n.bbox.w,h:n.bbox.h+.5}}else{let n=0,i=0,r=1;for(let R=0;R<o.chld.length;R++){const h=o.chld[R],g={"\\quad":2,"\\,":6/18,"\\:":8/18,"\\;":10/18,"\\!":-6/18}[h.text]??null;if(h.text=="\\\\"){i+=r,n=0,r=1;continue}else{if(h.text=="&")continue;if(g!=null){n+=g;continue}else{if(he(h,e),kt(h,1,null,n,i),h.text=="^"||h.text=="_"||h.text=="'"){let f=R;for(;f>0&&(o.chld[f].text=="^"||o.chld[f].text=="_"||o.chld[f].text=="'");)f--;const T=gt[o.chld[f].text]&>[o.chld[f].text].flags.big;if(h.text=="'"){let m=f+1,p=0;for(;m<R;)o.chld[m].text=="'"&&p++,m++;h.bbox.x=o.chld[f].bbox.x+o.chld[f].bbox.w+h.bbox.w*p,n=Math.max(n,h.bbox.x+h.bbox.w)}else if(T){const m=o.chld[f].bbox.x+(o.chld[f].bbox.w-h.bbox.w*te.SUB_SUP_SCALE)/2;h.bbox.x=m,n=Math.max(n,o.chld[f].bbox.x+o.chld[f].bbox.w+(h.bbox.w*te.SUB_SUP_SCALE-o.chld[f].bbox.w)/2)}else h.bbox.x=o.chld[f].bbox.x+o.chld[f].bbox.w,n=Math.max(n,h.bbox.x+h.bbox.w*te.SUB_SUP_SCALE)}else n+=h.bbox.w;t=="text"&&(n+=1),r=Math.max(h.bbox.y+h.bbox.h-i,r)}}}i+=r;const s={bmatrix:["[","]"],pmatrix:["(",")"],Bmatrix:["\\{","\\}"],cases:["\\{"]},a={bmatrix:"center",pmatrix:"center",Bmatrix:"center",cases:"left",matrix:"center",aligned:"equation"}[o.text]??"left",c=!!s[o.text],d=!!s[o.text]&&s[o.text].length>1;Il(o.chld,a);const u=Hi(o.chld);o.text=="\\text"&&(u.x-=1,u.w+=2);for(let R=0;R<o.chld.length;R++)kt(o.chld[R],1,null,-u.x+(c?1.5:0),-u.y);o.bbox={x:0,y:0,w:u.w+1.5*Number(c)+1.5*Number(d),h:u.h},c&&o.chld.unshift({type:"symb",text:s[o.text][0],mode:o.mode,chld:[],bbox:{x:0,y:0,w:1,h:u.h}}),d&&o.chld.push({type:"symb",text:s[o.text][1],mode:o.mode,chld:[],bbox:{x:u.w+2,y:0,w:1,h:u.h}}),(c||d||o.text=="matrix")&&(o.type="node",o.text="",o.bbox.y-=(o.bbox.h-2)/2)}}function Pl(o){function t(n,i,r){const s=[];if(n.bbox){if(i+=n.bbox.x,r+=n.bbox.y,n.text=="\\frac"){const a=n.chld[1].bbox.y-(n.chld[0].bbox.y+n.chld[0].bbox.h),c={type:"symb",mode:n.mode,text:"\\bar",bbox:{x:i,y:r+(n.chld[1].bbox.y-a/2)-a/2,w:n.bbox.w,h:a},chld:[]};s.push(c)}else if(n.text=="\\sqrt"){const a=n.chld[0].bbox.y,c=Math.max(0,n.chld[0].bbox.x-n.chld[0].bbox.h/2),d={type:"symb",mode:n.mode,text:"\\sqrt",bbox:{x:i+c,y:r+a/2,w:n.chld[0].bbox.x-c,h:n.bbox.h-a/2},chld:[]};s.push(d),s.push({type:"symb",text:"\\bar",mode:n.mode,bbox:{x:i+n.chld[0].bbox.x,y:r,w:n.bbox.w-n.chld[0].bbox.x,h:a},chld:[]})}else if(n.text=="\\binom"){const a=Math.min(n.chld[0].bbox.x,n.chld[1].bbox.x),c={type:"symb",mode:n.mode,text:"(",bbox:{x:i,y:r,w:a,h:n.bbox.h},chld:[]};s.push(c),s.push({type:"symb",text:")",mode:n.mode,bbox:{x:i+n.bbox.w-a,y:r,w:a,h:n.bbox.h},chld:[]})}else if(gt[n.text]&>[n.text].flags.hat){const a=n.chld[0].bbox.y,c={type:"symb",mode:n.mode,text:n.text,bbox:{x:i,y:r,w:n.bbox.w,h:a},chld:[]};s.push(c)}else if(gt[n.text]&>[n.text].flags.mat){const a=n.chld[0].bbox.h,c={type:"symb",text:n.text,mode:n.mode,bbox:{x:i,y:r+a,w:n.bbox.w,h:n.bbox.h-a},chld:[]};s.push(c)}else if(n.type!="node"&&n.text!="^"&&n.text!="_"){const a={type:n.type=="func"?"symb":n.type,text:n.text,mode:n.mode,bbox:{x:i,y:r,w:n.bbox.w,h:n.bbox.h},chld:[]};s.push(a)}}for(let a=0;a<n.chld.length;a++){const c=t(n.chld[a],i,r);s.push(...c)}return s}const e=t(o,-o.bbox.x,-o.bbox.y);o.type="node",o.text="",o.chld=e}function Ml(o){const t=[];for(let e=0;e<o.chld.length;e++){const n=o.chld[e];let i=n.bbox.h/2,r=!1;if(gt[n.text]&>[n.text].flags.hat&&!gt[n.text].flags.xfl&&!gt[n.text].flags.yfl&&(i*=4,r=!0),gt[n.text]&>[n.text].glyph){const s=tn(gt[n.text].glyph);for(let a=0;a<s.polylines.length;a++){const c=[];for(let d=0;d<s.polylines[a].length;d++){let u=s.polylines[a][d][0],R=s.polylines[a][d][1];if(gt[n.text].flags.xfl)u=(u-s.xmin)/Math.max(s.xmax-s.xmin,1)*n.bbox.w,u+=n.bbox.x;else if(s.w/16*i>n.bbox.w)u=u/Math.max(s.w,1)*n.bbox.w,u+=n.bbox.x;else{u=u/16*i;const h=(n.bbox.w-s.w/16*i)/2;u+=n.bbox.x+h}if(gt[n.text].flags.yfl)R=(R-s.ymin)/Math.max(s.ymax-s.ymin,1)*n.bbox.h,R+=n.bbox.y;else{if(R=R/16*i,r){const h=(s.ymax+s.ymin)/2;R-=h/16*i}R+=n.bbox.y+n.bbox.h/2}c.push([u,R])}t.push(c)}}else if(gt[n.text]&>[n.text].flags.txt||n.type=="char"){let s=n.bbox.x;const a=!!(gt[n.text]&>[n.text].flags.txt);for(let c=Number(a);c<n.text.length;c++){const d=tn(vn(n.text[c],a?"text":n.mode));if(!d){console.warn("unmapped character: "+n.text[c]);continue}for(let u=0;u<d.polylines.length;u++){const R=[];for(let h=0;h<d.polylines[u].length;h++){let g=d.polylines[u][h][0],f=d.polylines[u][h][1];g/=16,f/=16,g*=i,f*=i,n.mode=="tt"&&(d.w>16?g*=16/d.w:g+=(16-d.w)/2/16),g+=s,f+=n.bbox.y+n.bbox.h/2,R.push([g,f])}t.push(R)}n.mode=="tt"?s+=i:s+=d.w/16*i}}}return t}function ge(o){return Math.round(o*100)/100}class Ol{_latex;_tree;_tokens;_polylines;constructor(t){this._latex=t,this._tokens=ml(t),this._tree=bo(this._tokens),Ki(this._tree.chld),he(this._tree),Pl(this._tree),this._polylines=Ml(this._tree)}resolveScale(t){if(t==null)return[16,16,16,16];let e=t.SCALE_X??16,n=t.SCALE_Y??16;if(t.MIN_CHAR_H!=null){let s=0;for(let c=0;c<this._tree.chld.length;c++){const d=this._tree.chld[c];(d.type=="char"||gt[d.text]&&(gt[d.text].flags.txt||!Object.keys(gt[d.text].flags).length))&&(s=Math.min(d.bbox.h,s))}const a=Math.max(1,t.MIN_CHAR_H/s);e*=a,n*=a}if(t.MAX_W!=null){const s=e;e=Math.min(e,t.MAX_W/this._tree.bbox.w),n*=e/s}if(t.MAX_H!=null){const s=n;n=Math.min(n,t.MAX_H/this._tree.bbox.h),e*=n/s}const i=t.MARGIN_X??e,r=t.MARGIN_Y??n;return[i,r,e,n]}polylines(t){t||(t={});const e=[],[n,i,r,s]=this.resolveScale(t);for(let a=0;a<this._polylines.length;a++){e.push([]);for(let c=0;c<this._polylines[a].length;c++){const[d,u]=this._polylines[a][c];e[e.length-1].push([n+d*r,i+u*s])}}return e}pathd(t){t||(t={});let e="";const[n,i,r,s]=this.resolveScale(t);for(let a=0;a<this._polylines.length;a++)for(let c=0;c<this._polylines[a].length;c++){const[d,u]=this._polylines[a][c];e+=c?"L":"M",e+=`${ge(n+d*r)} ${ge(i+u*s)}`}return e}svg(t){t||(t={});const[e,n,i,r]=this.resolveScale(t),s=ge(this._tree.bbox.w*i+e*2),a=ge(this._tree.bbox.h*r+n*2);let c=`<svg
|
|
14
14
|
xmlns="http://www.w3.org/2000/svg"
|
|
15
15
|
width="${s}" height="${a}"
|
|
16
16
|
fill="none" stroke="${t.FG_COLOR??"black"}" stroke-width="${t.STROKE_W??1}"
|
|
@@ -58,12 +58,12 @@ trailer
|
|
|
58
58
|
>>startxref
|
|
59
59
|
|
|
60
60
|
%%EOF
|
|
61
|
-
`,c+d}boxes(t){t||(t={});const[e,n,i,r]=this.resolveScale(t),s=[];for(let a=0;a<this._tree.chld.length;a++){const{x:c,y:d,w:u,h:R}=this._tree.chld[a].bbox;s.push({x:e+c*i,y:n+d*r,w:u*i,h:R*r})}return s}box(t){t||(t={});const[e,n,i,r]=this.resolveScale(t);return{x:e+this._tree.bbox.x*i,y:n+this._tree.bbox.y*r,w:this._tree.bbox.w*i,h:this._tree.bbox.h*r}}}class _i extends vi{static convertLaTextToSVG(t){return new Pl(t).svg({SCALE_X:10,SCALE_Y:10,MARGIN_X:0,MARGIN_Y:0})}render(t,e,n,i){const{scale:r}=this.options,s=e.width*r,a=e.height*r;if(this.imageCache.has(e.value)){const c=this.imageCache.get(e.value);t.drawImage(c,n,i,s,a)}else{const c=new Promise((d,u)=>{const R=new Image;R.src=e.laTexSVG,R.onload=()=>{t.drawImage(R,n,i,s,a),this.imageCache.set(e.value,R),d(e)},R.onerror=h=>{u(h)}});this.addImageObserver(c)}}}l.ListType=void 0,(function(o){o.UL="ul",o.OL="ol"})(l.ListType||(l.ListType={}));var _e;(function(o){o.DISC="disc",o.CIRCLE="circle",o.SQUARE="square",o.CHECKBOX="checkbox"})(_e||(_e={}));var xi;(function(o){o.DECIMAL="decimal"})(xi||(xi={})),l.ListStyle=void 0,(function(o){o.DISC="disc",o.CIRCLE="circle",o.SQUARE="square",o.DECIMAL="decimal",o.CHECKBOX="checkbox"})(l.ListStyle||(l.ListStyle={}));const Ml={inheritStyle:!1},Wo={[_e.DISC]:"•",[_e.CIRCLE]:"◦",[_e.SQUARE]:"▫︎",[_e.CHECKBOX]:"☑️"},Ol={[l.ListType.OL]:"ol",[l.ListType.UL]:"ul"},Cl={[l.ListStyle.DISC]:"disc",[l.ListStyle.CIRCLE]:"circle",[l.ListStyle.SQUARE]:"square",[l.ListStyle.DECIMAL]:"decimal",[l.ListStyle.CHECKBOX]:"checkbox"};l.TitleLevel=void 0,(function(o){o.FIRST="first",o.SECOND="second",o.THIRD="third",o.FOURTH="fourth",o.FIFTH="fifth",o.SIXTH="sixth"})(l.TitleLevel||(l.TitleLevel={}));const Sl={defaultFirstSize:26,defaultSecondSize:24,defaultThirdSize:22,defaultFourthSize:20,defaultFifthSize:18,defaultSixthSize:16},Gi={[l.TitleLevel.FIRST]:"defaultFirstSize",[l.TitleLevel.SECOND]:"defaultSecondSize",[l.TitleLevel.THIRD]:"defaultThirdSize",[l.TitleLevel.FOURTH]:"defaultFourthSize",[l.TitleLevel.FIFTH]:"defaultFifthSize",[l.TitleLevel.SIXTH]:"defaultSixthSize"},Vo={[l.TitleLevel.FIRST]:1,[l.TitleLevel.SECOND]:2,[l.TitleLevel.THIRD]:3,[l.TitleLevel.FOURTH]:4,[l.TitleLevel.FIFTH]:5,[l.TitleLevel.SIXTH]:6},El={H1:l.TitleLevel.FIRST,H2:l.TitleLevel.SECOND,H3:l.TitleLevel.THIRD,H4:l.TitleLevel.FOURTH,H5:l.TitleLevel.FIFTH,H6:l.TitleLevel.SIXTH};l.BlockType=void 0,(function(o){o.IFRAME="iframe",o.VIDEO="video"})(l.BlockType||(l.BlockType={})),l.ControlType=void 0,(function(o){o.TEXT="text",o.SELECT="select",o.CHECKBOX="checkbox",o.RADIO="radio",o.DATE="date",o.NUMBER="number",o.TEXTFIELD="TextField",o.BUTTON="button",o.MENSTRUAL_HISTORY="menstrualHistory"})(l.ControlType||(l.ControlType={})),l.ControlComponent=void 0,(function(o){o.PREFIX="prefix",o.POSTFIX="postfix",o.PRE_TEXT="preText",o.PRETEXTFIX="preTextFix",o.PRETEXTFIX_TEXT="preTextFixText",o.POSTTEXTFIX="postTextFix",o.POSTTEXTFIX_TEXT="postTextFixText",o.POST_TEXT="postText",o.PLACEHOLDER="placeholder",o.TEXTFIXLABEL="textFixLabel",o.VALUE="value",o.DELETEPERSON="deletePerson",o.CHECKBOX="checkbox",o.RADIO="radio",o.UNDERLINE="underline"})(l.ControlComponent||(l.ControlComponent={})),l.ControlIndentation=void 0,(function(o){o.ROW_START="rowStart",o.VALUE_START="valueStart"})(l.ControlIndentation||(l.ControlIndentation={})),l.ControlState=void 0,(function(o){o.ACTIVE="active",o.INACTIVE="inactive"})(l.ControlState||(l.ControlState={}));var Ai;(function(o){o.NUMBER="number",o.OPERATOR="operator",o.UTILITY="utility",o.EQUAL="equal"})(Ai||(Ai={})),l.EditorComponent=void 0,(function(o){o.COMPONENT="component",o.MENU="menu",o.MAIN="main",o.FOOTER="footer",o.CONTEXTMENU="contextmenu",o.POPUP="popup",o.CATALOG="catalog",o.COMMENT="comment"})(l.EditorComponent||(l.EditorComponent={}));var fe;(function(o){o.PAGE="page",o.TABLE="table"})(fe||(fe={})),l.EditorMode=void 0,(function(o){o.EDIT="edit",o.CLEAN="clean",o.READONLY="readonly",o.FORM="form",o.PRINT="print",o.DESIGN="design",o.GRAFFITI="graffiti"})(l.EditorMode||(l.EditorMode={})),l.EditorZone=void 0,(function(o){o.HEADER="header",o.MAIN="main",o.FOOTER="footer"})(l.EditorZone||(l.EditorZone={})),l.PageMode=void 0,(function(o){o.PAGING="paging",o.CONTINUITY="continuity"})(l.PageMode||(l.PageMode={})),l.PaperDirection=void 0,(function(o){o.VERTICAL="vertical",o.HORIZONTAL="horizontal"})(l.PaperDirection||(l.PaperDirection={})),l.WordBreak=void 0,(function(o){o.BREAK_ALL="break-all",o.BREAK_WORD="break-word"})(l.WordBreak||(l.WordBreak={})),l.RenderMode=void 0,(function(o){o.SPEED="speed",o.COMPATIBILITY="compatibility"})(l.RenderMode||(l.RenderMode={})),l.TableBorder=void 0,(function(o){o.ALL="all",o.EMPTY="empty",o.EXTERNAL="external",o.INTERNAL="internal",o.DASH="dash"})(l.TableBorder||(l.TableBorder={})),l.TdBorder=void 0,(function(o){o.TOP="top",o.RIGHT="right",o.BOTTOM="bottom",o.LEFT="left"})(l.TdBorder||(l.TdBorder={})),l.TdSlash=void 0,(function(o){o.FORWARD="forward",o.BACK="back"})(l.TdSlash||(l.TdSlash={})),l.BackgroundSize=void 0,(function(o){o.CONTAIN="contain",o.COVER="cover"})(l.BackgroundSize||(l.BackgroundSize={})),l.BackgroundRepeat=void 0,(function(o){o.REPEAT="repeat",o.NO_REPEAT="no-repeat",o.REPEAT_X="repeat-x",o.REPEAT_Y="repeat-y"})(l.BackgroundRepeat||(l.BackgroundRepeat={}));const Xl={color:"#FFFFFF",image:"",size:l.BackgroundSize.COVER,repeat:l.BackgroundRepeat.NO_REPEAT,applyPageNumbers:[]};l.VerticalAlign=void 0,(function(o){o.TOP="top",o.MIDDLE="middle",o.BOTTOM="bottom"})(l.VerticalAlign||(l.VerticalAlign={}));const Nl={width:14,height:14,gap:5,lineWidth:1,fillStyle:"#5175f4",strokeStyle:"#ffffff",verticalAlign:l.VerticalAlign.BOTTOM},Fl={placeholderColor:"#9c9b9b",bracketColor:"#2284FE",textFixColor:"blue",prefix:"[",postfix:"]",preTextFix:"{",postTextFix:"}",textFixLabel:"",preTextFixText:"",postTextFixText:"",borderWidth:1,borderColor:"#000000",activeBackgroundColor:"",disabledBackgroundColor:"",existValueBackgroundColor:"",noValueBackgroundColor:""},yl={bottom:30,inactiveAlpha:1,maxHeightRadio:l.MaxHeightRatio.HALF,disabled:!1,editable:!0},bl={opacity:.1,backgroundColor:"#E99D00",activeOpacity:.5,activeBackgroundColor:"#E99D00",disabled:!1,deletable:!0},Wl={top:30,inactiveAlpha:1,maxHeightRadio:l.MaxHeightRatio.HALF,disabled:!1,editable:!0},Vl={defaultColor:"#1976d2",defaultBackgroundColor:"#e3f2fd",defaultBorderRadius:4,defaultPadding:[4,4,4,4]},Yl={color:"#666666",font:"Microsoft YaHei",size:12,top:5},Dl={disabled:!0,color:"#CCCCCC",lineWidth:1.5},Ul={font:"Microsoft YaHei",fontSize:12,lineDash:[3,1]},Pn={PAGE_NO:"{pageNo}",PAGE_COUNT:"{pageCount}"},wl={bottom:60,size:12,font:"Microsoft YaHei",color:"#000000",rowFlex:l.RowFlex.CENTER,format:Pn.PAGE_NO,numberType:l.NumberType.ARABIC,disabled:!1,startPageNo:1,fromPageNo:0,maxPageNo:null},ki={data:"",color:"#DCDFE6",opacity:1,size:16,font:"Microsoft YaHei"},Zl={width:14,height:14,gap:5,lineWidth:1,fillStyle:"#5175f4",strokeStyle:"#000000",verticalAlign:l.VerticalAlign.BOTTOM},Ql={lineWidth:1,strokeStyle:"#000000"},vl={tdPadding:[5,5,5,5],defaultTrMinHeight:24,defaultColMinWidth:40,defaultBorderColor:"#000000",overflow:!0};l.WatermarkType=void 0,(function(o){o.TEXT="text",o.IMAGE="image"})(l.WatermarkType||(l.WatermarkType={}));const Yo={data:"",type:l.WatermarkType.TEXT,width:0,height:0,color:"#AEB5C0",opacity:.3,size:200,font:"Microsoft YaHei",repeat:!1,gap:[10,10],numberType:l.NumberType.ARABIC},Kl={tipDisabled:!0};l.LineNumberType=void 0,(function(o){o.PAGE="page",o.CONTINUITY="continuity"})(l.LineNumberType||(l.LineNumberType={}));const Hl={size:12,font:"Microsoft YaHei",color:"#000000",disabled:!0,right:20,type:l.LineNumberType.CONTINUITY},_l={color:"#000000",lineWidth:1,padding:[0,5,0,5],disabled:!0},xl={top:0,left:5},Gl={defaultLineColor:"#000000",defaultLineWidth:2},Al={disabled:!0,color:"#CCCCCC",radius:1};function Do(o={}){const t={...vl,...o.table},e={...Wl,...o.header},n={...yl,...o.footer},i={...wl,...o.pageNumber},r={...Yo,...o.watermark},s={...Fl,...o.control},a={...Nl,...o.checkbox},c={...Zl,...o.radio},d={...nl,...o.cursor},u={...Sl,...o.title},R={...ki,...o.placeholder},h={...bl,...o.group},g={...Ul,...o.pageBreak},f={...Kl,...o.zone},T={...Xl,...o.background},m={...Dl,...o.lineBreak},p={...Al,...o.whiteSpace},I={...Ql,...o.separator},L={...Hl,...o.lineNumber},P={..._l,...o.pageBorder},C={...xl,...o.badge},S={...Gl,...o.graffiti},F={...Vl,...o.label},N={...Yl,...o.imgCaption},V={...Ml,...o.list},Y={print:{...Eo.print,...o.modeRule?.print},readonly:{...Eo.readonly,...o.modeRule?.readonly},form:{...Eo.form,...o.modeRule?.form}};return{mode:l.EditorMode.EDIT,locale:"zhCN",defaultType:"TEXT",defaultColor:"#000000",defaultFont:"SimSun",defaultSize:16,minSize:5,maxSize:72,defaultRowMargin:1,defaultBasicRowMarginHeight:8,defaultTabWidth:32,width:794,height:1123,scale:1,pageGap:20,underlineColor:"#000000",strikeoutColor:"#FF0000",rangeAlpha:.6,rangeColor:"#AECBFA",rangeMinWidth:5,searchMatchAlpha:.6,searchMatchColor:"#FFFF00",searchNavigateMatchColor:"#AAD280",highlightAlpha:.6,highlightMarginHeight:8,resizerColor:"#4182D9",resizerSize:5,marginIndicatorSize:35,marginIndicatorColor:"#BABABA",margins:[75.591,56.693,56.693,56.693],pageMode:l.PageMode.PAGING,renderMode:l.RenderMode.SPEED,defaultHyperlinkColor:"#0000FF",paperDirection:l.PaperDirection.VERTICAL,inactiveAlpha:.6,historyMaxRecordCount:100,wordBreak:l.WordBreak.BREAK_WORD,printPixelRatio:3,maskMargin:[0,0,0,0],letterClass:[mo.ENGLISH,mo.NUMBER],contextMenuDisableKeys:[],shortcutDisableKeys:[],scrollContainerSelector:"",pageOuterSelectionDisable:!1,...o,table:t,header:e,footer:n,pageNumber:i,watermark:r,control:s,checkbox:a,radio:c,cursor:d,title:u,placeholder:R,group:h,pageBreak:g,zone:f,background:T,lineBreak:m,whiteSpace:p,separator:I,lineNumber:L,pageBorder:P,badge:C,modeRule:Y,graffiti:S,label:F,imgCaption:N,list:V,performance:{enabled:!1,threshold:16,...o.performance}}}const Ji=new Map;function kl(o){return Ji.get(o)}function Kn(o,t){Ji.set(o,t)}function Uo(o){const t=[];for(let e=0;e<o.length;e++){const n=o[e],i=ct(n.value);for(let r=0;r<i.length;r++)t.push({...n,value:i[r]})}return t}function bt(o,t){const{isHandleFirstElement:e=!0,isForceCompensation:n=!1,editorOptions:i}=t,r=o[0];(n||e&&r?.type!==l.ElementType.LIST&&(r?.type&&r.type!==l.ElementType.TEXT||!Lo.test(r?.value)))&&o.unshift({value:_});let s=0;for(;s<o.length;){let a=o[s];if(a.type===l.ElementType.TITLE){o.splice(s,1);const c=a.valueList||[];if(bt(c,{...t,isHandleFirstElement:!1,isForceCompensation:!1}),c.length){const d=a.titleId||lt(),u=i.title;for(let R=0;R<c.length;R++){const h=c[R];h.title=a.title,a.level&&(h.titleId=d,h.level=a.level),Hn(h)&&(h.size||(h.size=u[Gi[h.level]]),h.bold===void 0&&(h.bold=!0)),o.splice(s,0,h),s++}}s--}else if(a.type===l.ElementType.LIST){o.splice(s,1);const c=a.valueList||[];if(bt(c,{...t,isHandleFirstElement:!0,isForceCompensation:!1}),c.length){const d=lt();for(let u=0;u<c.length;u++){const R=c[u];R.listId=d,R.listType=a.listType,R.listStyle=a.listStyle,o.splice(s,0,R),s++}}s--}else if(a.type===l.ElementType.AREA){o.splice(s,1);const c=a?.valueList||[];if(bt(c,{...t,isHandleFirstElement:!0,isForceCompensation:!0}),c.length){const d=lt();for(let u=0;u<c.length;u++){const R=c[u];if(R.areaId=a.areaId||d,R.area=a.area,R.areaIndex=u,R.type===l.ElementType.TABLE){const h=R.trList;for(let g=0;g<h.length;g++){const f=h[g];for(let T=0;T<f.tdList.length;T++){const p=f.tdList[T].value;for(let I=0;I<p.length;I++){const L=p[I];L.areaId=a.areaId||d,L.area=a.area}}}}o.splice(s,0,R),s++}}s--}else if(a.type===l.ElementType.TABLE){const c=a.id||lt();if(a.id=c,a.trList){const{defaultTrMinHeight:d}=i.table;for(let u=0;u<a.trList.length;u++){const R=a.trList[u],h=R.id||lt();R.id=h,(!R.minHeight||R.minHeight<d)&&(R.minHeight=d),R.height<R.minHeight&&(R.height=R.minHeight);for(let g=0;g<R.tdList.length;g++){const f=R.tdList[g],T=f.id||lt();f.id=T,bt(f.value,{...t,isHandleFirstElement:!0,isForceCompensation:!0}),!f.value[0].size&&f.value[1]?.size&&Hn(f.value[1])&&(f.value[0].size=f.value[1].size);for(let m=0;m<f.value.length;m++){const p=f.value[m];p.tdId=T,p.trId=h,p.tableId=c}}}}}else if(a.type===l.ElementType.HYPERLINK){o.splice(s,1);const c=Uo(a.valueList||[]);if(c.length){const d=lt();for(let u=0;u<c.length;u++){const R=c[u];R.type=a.type,R.url=a.url,R.hyperlinkId=d,o.splice(s,0,R),s++}}s--}else if(a.type===l.ElementType.DATE){o.splice(s,1);const c=Uo(a.valueList||[]);if(c.length){const d=lt();for(let u=0;u<c.length;u++){const R=c[u];R.type=a.type,R.dateFormat=a.dateFormat,R.dateId=d,o.splice(s,0,R),s++}}s--}else if(a.type===l.ElementType.CONTROL){if(!a.control){s++;continue}if(a.control.type=="TextField"){const{preTextFix:c,postTextFix:d,preTextFixText:u,postTextFixText:R,value:h,placeholder:g,code:f,type:T,valueSets:m}=a.control,p=T,{editorOptions:{control:I,checkbox:L,radio:P}}=t,C=a.controlId||lt();o.splice(s,1);const S=Dt(a,[...Fo,...$t]),F=Dt(a.control,At),N={...F,color:i.control.textFixColor,fontWeight:"blod"},V={...F,color:void 0},Y=ct(c||I.preTextFix);for(let W=0;W<Y.length;W++){const X=Y[W];o.splice(s,0,{...S,...N,controlId:C,value:X,type:a.type,control:a.control,controlComponent:l.ControlComponent.PRETEXTFIX}),s++}if(u){const W=ct(u);for(let X=0;X<W.length;X++){const O=W[X];o.splice(s,0,{...S,...F,controlId:C,value:O,type:a.type,control:a.control,controlComponent:l.ControlComponent.PRETEXTFIX_TEXT}),s++}}if(h&&h.length||p===l.ControlType.CHECKBOX||p===l.ControlType.RADIO||p===l.ControlType.SELECT&&f&&(!h||!h.length)){let W=h?at(h):[];if(p===l.ControlType.CHECKBOX){const X=f?f.split(","):[];if(Array.isArray(m)&&m.length){const O=W.reduce((b,y)=>b.concat(y.value.split("").map(D=>({...y,value:D}))),[]);let M=0;for(let b=0;b<m.length;b++){const y=m[b];o.splice(s,0,{...S,...F,controlId:C,value:"",type:a.type,control:a.control,controlComponent:l.ControlComponent.CHECKBOX,checkbox:{code:y.code,value:X.includes(y.code)}}),s++;const D=ct(y.value);for(let U=0;U<D.length;U++){const Q=D[U],G=U===D.length-1;o.splice(s,0,{...S,...V,...O[M],controlId:C,value:Q===`
|
|
61
|
+
`,c+d}boxes(t){t||(t={});const[e,n,i,r]=this.resolveScale(t),s=[];for(let a=0;a<this._tree.chld.length;a++){const{x:c,y:d,w:u,h:R}=this._tree.chld[a].bbox;s.push({x:e+c*i,y:n+d*r,w:u*i,h:R*r})}return s}box(t){t||(t={});const[e,n,i,r]=this.resolveScale(t);return{x:e+this._tree.bbox.x*i,y:n+this._tree.bbox.y*r,w:this._tree.bbox.w*i,h:this._tree.bbox.h*r}}}class _i extends vi{static convertLaTextToSVG(t){return new Ol(t).svg({SCALE_X:10,SCALE_Y:10,MARGIN_X:0,MARGIN_Y:0})}render(t,e,n,i){const{scale:r}=this.options,s=e.width*r,a=e.height*r;if(this.imageCache.has(e.value)){const c=this.imageCache.get(e.value);t.drawImage(c,n,i,s,a)}else{const c=new Promise((d,u)=>{const R=new Image;R.src=e.laTexSVG,R.onload=()=>{t.drawImage(R,n,i,s,a),this.imageCache.set(e.value,R),d(e)},R.onerror=h=>{u(h)}});this.addImageObserver(c)}}}l.ListType=void 0,(function(o){o.UL="ul",o.OL="ol"})(l.ListType||(l.ListType={}));var _e;(function(o){o.DISC="disc",o.CIRCLE="circle",o.SQUARE="square",o.CHECKBOX="checkbox"})(_e||(_e={}));var xi;(function(o){o.DECIMAL="decimal"})(xi||(xi={})),l.ListStyle=void 0,(function(o){o.DISC="disc",o.CIRCLE="circle",o.SQUARE="square",o.DECIMAL="decimal",o.CHECKBOX="checkbox"})(l.ListStyle||(l.ListStyle={}));const Cl={inheritStyle:!1},Wo={[_e.DISC]:"•",[_e.CIRCLE]:"◦",[_e.SQUARE]:"▫︎",[_e.CHECKBOX]:"☑️"},Sl={[l.ListType.OL]:"ol",[l.ListType.UL]:"ul"},El={[l.ListStyle.DISC]:"disc",[l.ListStyle.CIRCLE]:"circle",[l.ListStyle.SQUARE]:"square",[l.ListStyle.DECIMAL]:"decimal",[l.ListStyle.CHECKBOX]:"checkbox"};l.TitleLevel=void 0,(function(o){o.FIRST="first",o.SECOND="second",o.THIRD="third",o.FOURTH="fourth",o.FIFTH="fifth",o.SIXTH="sixth"})(l.TitleLevel||(l.TitleLevel={}));const Xl={defaultFirstSize:26,defaultSecondSize:24,defaultThirdSize:22,defaultFourthSize:20,defaultFifthSize:18,defaultSixthSize:16},Gi={[l.TitleLevel.FIRST]:"defaultFirstSize",[l.TitleLevel.SECOND]:"defaultSecondSize",[l.TitleLevel.THIRD]:"defaultThirdSize",[l.TitleLevel.FOURTH]:"defaultFourthSize",[l.TitleLevel.FIFTH]:"defaultFifthSize",[l.TitleLevel.SIXTH]:"defaultSixthSize"},Vo={[l.TitleLevel.FIRST]:1,[l.TitleLevel.SECOND]:2,[l.TitleLevel.THIRD]:3,[l.TitleLevel.FOURTH]:4,[l.TitleLevel.FIFTH]:5,[l.TitleLevel.SIXTH]:6},Nl={H1:l.TitleLevel.FIRST,H2:l.TitleLevel.SECOND,H3:l.TitleLevel.THIRD,H4:l.TitleLevel.FOURTH,H5:l.TitleLevel.FIFTH,H6:l.TitleLevel.SIXTH};l.BlockType=void 0,(function(o){o.IFRAME="iframe",o.VIDEO="video"})(l.BlockType||(l.BlockType={})),l.ControlType=void 0,(function(o){o.TEXT="text",o.SELECT="select",o.CHECKBOX="checkbox",o.RADIO="radio",o.DATE="date",o.NUMBER="number",o.TEXTFIELD="TextField",o.BUTTON="button",o.MENSTRUAL_HISTORY="menstrualHistory"})(l.ControlType||(l.ControlType={})),l.ControlComponent=void 0,(function(o){o.PREFIX="prefix",o.POSTFIX="postfix",o.PRE_TEXT="preText",o.PRETEXTFIX="preTextFix",o.PRETEXTFIX_TEXT="preTextFixText",o.POSTTEXTFIX="postTextFix",o.POSTTEXTFIX_TEXT="postTextFixText",o.POST_TEXT="postText",o.PLACEHOLDER="placeholder",o.TEXTFIXLABEL="textFixLabel",o.VALUE="value",o.DELETEPERSON="deletePerson",o.CHECKBOX="checkbox",o.RADIO="radio",o.UNDERLINE="underline"})(l.ControlComponent||(l.ControlComponent={})),l.ControlIndentation=void 0,(function(o){o.ROW_START="rowStart",o.VALUE_START="valueStart"})(l.ControlIndentation||(l.ControlIndentation={})),l.ControlState=void 0,(function(o){o.ACTIVE="active",o.INACTIVE="inactive"})(l.ControlState||(l.ControlState={}));var Ai;(function(o){o.NUMBER="number",o.OPERATOR="operator",o.UTILITY="utility",o.EQUAL="equal"})(Ai||(Ai={})),l.EditorComponent=void 0,(function(o){o.COMPONENT="component",o.MENU="menu",o.MAIN="main",o.FOOTER="footer",o.CONTEXTMENU="contextmenu",o.POPUP="popup",o.CATALOG="catalog",o.COMMENT="comment"})(l.EditorComponent||(l.EditorComponent={}));var fe;(function(o){o.PAGE="page",o.TABLE="table"})(fe||(fe={})),l.EditorMode=void 0,(function(o){o.EDIT="edit",o.CLEAN="clean",o.READONLY="readonly",o.FORM="form",o.PRINT="print",o.DESIGN="design",o.GRAFFITI="graffiti"})(l.EditorMode||(l.EditorMode={})),l.EditorZone=void 0,(function(o){o.HEADER="header",o.MAIN="main",o.FOOTER="footer"})(l.EditorZone||(l.EditorZone={})),l.PageMode=void 0,(function(o){o.PAGING="paging",o.CONTINUITY="continuity"})(l.PageMode||(l.PageMode={})),l.PaperDirection=void 0,(function(o){o.VERTICAL="vertical",o.HORIZONTAL="horizontal"})(l.PaperDirection||(l.PaperDirection={})),l.WordBreak=void 0,(function(o){o.BREAK_ALL="break-all",o.BREAK_WORD="break-word"})(l.WordBreak||(l.WordBreak={})),l.RenderMode=void 0,(function(o){o.SPEED="speed",o.COMPATIBILITY="compatibility"})(l.RenderMode||(l.RenderMode={})),l.TableBorder=void 0,(function(o){o.ALL="all",o.EMPTY="empty",o.EXTERNAL="external",o.INTERNAL="internal",o.DASH="dash"})(l.TableBorder||(l.TableBorder={})),l.TdBorder=void 0,(function(o){o.TOP="top",o.RIGHT="right",o.BOTTOM="bottom",o.LEFT="left"})(l.TdBorder||(l.TdBorder={})),l.TdSlash=void 0,(function(o){o.FORWARD="forward",o.BACK="back"})(l.TdSlash||(l.TdSlash={})),l.BackgroundSize=void 0,(function(o){o.CONTAIN="contain",o.COVER="cover"})(l.BackgroundSize||(l.BackgroundSize={})),l.BackgroundRepeat=void 0,(function(o){o.REPEAT="repeat",o.NO_REPEAT="no-repeat",o.REPEAT_X="repeat-x",o.REPEAT_Y="repeat-y"})(l.BackgroundRepeat||(l.BackgroundRepeat={}));const Fl={color:"#FFFFFF",image:"",size:l.BackgroundSize.COVER,repeat:l.BackgroundRepeat.NO_REPEAT,applyPageNumbers:[]};l.VerticalAlign=void 0,(function(o){o.TOP="top",o.MIDDLE="middle",o.BOTTOM="bottom"})(l.VerticalAlign||(l.VerticalAlign={}));const yl={width:14,height:14,gap:5,lineWidth:1,fillStyle:"#5175f4",strokeStyle:"#ffffff",verticalAlign:l.VerticalAlign.BOTTOM},bl={placeholderColor:"#9c9b9b",bracketColor:"#2284FE",textFixColor:"blue",prefix:"[",postfix:"]",preTextFix:"{",postTextFix:"}",textFixLabel:"",preTextFixText:"",postTextFixText:"",borderWidth:1,borderColor:"#000000",activeBackgroundColor:"",disabledBackgroundColor:"",existValueBackgroundColor:"",noValueBackgroundColor:""},Wl={bottom:30,inactiveAlpha:1,maxHeightRadio:l.MaxHeightRatio.HALF,disabled:!1,editable:!0},Vl={opacity:.1,backgroundColor:"#E99D00",activeOpacity:.5,activeBackgroundColor:"#E99D00",disabled:!1,deletable:!0},Yl={top:30,inactiveAlpha:1,maxHeightRadio:l.MaxHeightRatio.HALF,disabled:!1,editable:!0},Dl={defaultColor:"#1976d2",defaultBackgroundColor:"#e3f2fd",defaultBorderRadius:4,defaultPadding:[4,4,4,4]},Ul={color:"#666666",font:"Microsoft YaHei",size:12,top:5},wl={disabled:!0,color:"#CCCCCC",lineWidth:1.5},Zl={font:"Microsoft YaHei",fontSize:12,lineDash:[3,1]},Pn={PAGE_NO:"{pageNo}",PAGE_COUNT:"{pageCount}"},Ql={bottom:60,size:12,font:"Microsoft YaHei",color:"#000000",rowFlex:l.RowFlex.CENTER,format:Pn.PAGE_NO,numberType:l.NumberType.ARABIC,disabled:!1,startPageNo:1,fromPageNo:0,maxPageNo:null},ki={data:"",color:"#DCDFE6",opacity:1,size:16,font:"Microsoft YaHei"},vl={width:14,height:14,gap:5,lineWidth:1,fillStyle:"#5175f4",strokeStyle:"#000000",verticalAlign:l.VerticalAlign.BOTTOM},Kl={lineWidth:1,strokeStyle:"#000000"},Hl={tdPadding:[5,5,5,5],defaultTrMinHeight:24,defaultColMinWidth:40,defaultBorderColor:"#000000",overflow:!0};l.WatermarkType=void 0,(function(o){o.TEXT="text",o.IMAGE="image"})(l.WatermarkType||(l.WatermarkType={}));const Yo={data:"",type:l.WatermarkType.TEXT,width:0,height:0,color:"#AEB5C0",opacity:.3,size:200,font:"Microsoft YaHei",repeat:!1,gap:[10,10],numberType:l.NumberType.ARABIC},_l={tipDisabled:!0};l.LineNumberType=void 0,(function(o){o.PAGE="page",o.CONTINUITY="continuity"})(l.LineNumberType||(l.LineNumberType={}));const xl={size:12,font:"Microsoft YaHei",color:"#000000",disabled:!0,right:20,type:l.LineNumberType.CONTINUITY},Gl={color:"#000000",lineWidth:1,padding:[0,5,0,5],disabled:!0},Al={top:0,left:5},kl={defaultLineColor:"#000000",defaultLineWidth:2},Jl={disabled:!0,color:"#CCCCCC",radius:1};function Do(o={}){const t={...Hl,...o.table},e={...Yl,...o.header},n={...Wl,...o.footer},i={...Ql,...o.pageNumber},r={...Yo,...o.watermark},s={...bl,...o.control},a={...yl,...o.checkbox},c={...vl,...o.radio},d={...il,...o.cursor},u={...Xl,...o.title},R={...ki,...o.placeholder},h={...Vl,...o.group},g={...Zl,...o.pageBreak},f={..._l,...o.zone},T={...Fl,...o.background},m={...wl,...o.lineBreak},p={...Jl,...o.whiteSpace},I={...Kl,...o.separator},L={...xl,...o.lineNumber},P={...Gl,...o.pageBorder},C={...Al,...o.badge},S={...kl,...o.graffiti},F={...Dl,...o.label},N={...Ul,...o.imgCaption},V={...Cl,...o.list},Y={print:{...Eo.print,...o.modeRule?.print},readonly:{...Eo.readonly,...o.modeRule?.readonly},form:{...Eo.form,...o.modeRule?.form}};return{mode:l.EditorMode.EDIT,locale:"zhCN",defaultType:"TEXT",defaultColor:"#000000",defaultFont:"SimSun",defaultSize:16,minSize:5,maxSize:72,defaultRowMargin:1,defaultBasicRowMarginHeight:8,defaultTabWidth:32,width:794,height:1123,scale:1,pageGap:20,underlineColor:"#000000",strikeoutColor:"#FF0000",rangeAlpha:.6,rangeColor:"#AECBFA",rangeMinWidth:5,searchMatchAlpha:.6,searchMatchColor:"#FFFF00",searchNavigateMatchColor:"#AAD280",highlightAlpha:.6,highlightMarginHeight:8,resizerColor:"#4182D9",resizerSize:5,marginIndicatorSize:35,marginIndicatorColor:"#BABABA",margins:[75.591,56.693,56.693,56.693],pageMode:l.PageMode.PAGING,renderMode:l.RenderMode.SPEED,defaultHyperlinkColor:"#0000FF",paperDirection:l.PaperDirection.VERTICAL,inactiveAlpha:.6,historyMaxRecordCount:100,wordBreak:l.WordBreak.BREAK_WORD,printPixelRatio:3,maskMargin:[0,0,0,0],letterClass:[mo.ENGLISH,mo.NUMBER],contextMenuDisableKeys:[],shortcutDisableKeys:[],scrollContainerSelector:"",pageOuterSelectionDisable:!1,...o,table:t,header:e,footer:n,pageNumber:i,watermark:r,control:s,checkbox:a,radio:c,cursor:d,title:u,placeholder:R,group:h,pageBreak:g,zone:f,background:T,lineBreak:m,whiteSpace:p,separator:I,lineNumber:L,pageBorder:P,badge:C,modeRule:Y,graffiti:S,label:F,imgCaption:N,list:V,performance:{enabled:!1,threshold:16,...o.performance}}}const Ji=new Map;function Bl(o){return Ji.get(o)}function Kn(o,t){Ji.set(o,t)}function Uo(o){const t=[];for(let e=0;e<o.length;e++){const n=o[e],i=ct(n.value);for(let r=0;r<i.length;r++)t.push({...n,value:i[r]})}return t}function bt(o,t){const{isHandleFirstElement:e=!0,isForceCompensation:n=!1,editorOptions:i}=t,r=o[0];(n||e&&r?.type!==l.ElementType.LIST&&(r?.type&&r.type!==l.ElementType.TEXT||!Lo.test(r?.value)))&&o.unshift({value:_});let s=0;for(;s<o.length;){let a=o[s];if(a.type===l.ElementType.TITLE){o.splice(s,1);const c=a.valueList||[];if(bt(c,{...t,isHandleFirstElement:!1,isForceCompensation:!1}),c.length){const d=a.titleId||lt(),u=i.title;for(let R=0;R<c.length;R++){const h=c[R];h.title=a.title,a.level&&(h.titleId=d,h.level=a.level),Hn(h)&&(h.size||(h.size=u[Gi[h.level]]),h.bold===void 0&&(h.bold=!0)),o.splice(s,0,h),s++}}s--}else if(a.type===l.ElementType.LIST){o.splice(s,1);const c=a.valueList||[];if(bt(c,{...t,isHandleFirstElement:!0,isForceCompensation:!1}),c.length){const d=lt();for(let u=0;u<c.length;u++){const R=c[u];R.listId=d,R.listType=a.listType,R.listStyle=a.listStyle,o.splice(s,0,R),s++}}s--}else if(a.type===l.ElementType.AREA){o.splice(s,1);const c=a?.valueList||[];if(bt(c,{...t,isHandleFirstElement:!0,isForceCompensation:!0}),c.length){const d=lt();for(let u=0;u<c.length;u++){const R=c[u];if(R.areaId=a.areaId||d,R.area=a.area,R.areaIndex=u,R.type===l.ElementType.TABLE){const h=R.trList;for(let g=0;g<h.length;g++){const f=h[g];for(let T=0;T<f.tdList.length;T++){const p=f.tdList[T].value;for(let I=0;I<p.length;I++){const L=p[I];L.areaId=a.areaId||d,L.area=a.area}}}}o.splice(s,0,R),s++}}s--}else if(a.type===l.ElementType.TABLE){const c=a.id||lt();if(a.id=c,a.trList){const{defaultTrMinHeight:d}=i.table;for(let u=0;u<a.trList.length;u++){const R=a.trList[u],h=R.id||lt();R.id=h,(!R.minHeight||R.minHeight<d)&&(R.minHeight=d),R.height<R.minHeight&&(R.height=R.minHeight);for(let g=0;g<R.tdList.length;g++){const f=R.tdList[g],T=f.id||lt();f.id=T,bt(f.value,{...t,isHandleFirstElement:!0,isForceCompensation:!0}),!f.value[0].size&&f.value[1]?.size&&Hn(f.value[1])&&(f.value[0].size=f.value[1].size);for(let m=0;m<f.value.length;m++){const p=f.value[m];p.tdId=T,p.trId=h,p.tableId=c}}}}}else if(a.type===l.ElementType.HYPERLINK){o.splice(s,1);const c=Uo(a.valueList||[]);if(c.length){const d=lt();for(let u=0;u<c.length;u++){const R=c[u];R.type=a.type,R.url=a.url,R.hyperlinkId=d,o.splice(s,0,R),s++}}s--}else if(a.type===l.ElementType.DATE){o.splice(s,1);const c=Uo(a.valueList||[]);if(c.length){const d=lt();for(let u=0;u<c.length;u++){const R=c[u];R.type=a.type,R.dateFormat=a.dateFormat,R.dateId=d,o.splice(s,0,R),s++}}s--}else if(a.type===l.ElementType.CONTROL){if(!a.control){s++;continue}if(a.control.type=="TextField"){const{preTextFix:c,postTextFix:d,preTextFixText:u,postTextFixText:R,value:h,placeholder:g,code:f,type:T,valueSets:m}=a.control,p=T,{editorOptions:{control:I,checkbox:L,radio:P}}=t,C=a.controlId||lt();o.splice(s,1);const S=Dt(a,[...Fo,...$t]),F=Dt(a.control,At),N={...F,color:i.control.textFixColor,fontWeight:"blod"},V={...F,color:void 0},Y=ct(c||I.preTextFix);for(let W=0;W<Y.length;W++){const X=Y[W];o.splice(s,0,{...S,...N,controlId:C,value:X,type:a.type,control:a.control,controlComponent:l.ControlComponent.PRETEXTFIX}),s++}if(u){const W=ct(u);for(let X=0;X<W.length;X++){const O=W[X];o.splice(s,0,{...S,...F,controlId:C,value:O,type:a.type,control:a.control,controlComponent:l.ControlComponent.PRETEXTFIX_TEXT}),s++}}if(h&&h.length||p===l.ControlType.CHECKBOX||p===l.ControlType.RADIO||p===l.ControlType.SELECT&&f&&(!h||!h.length)){let W=h?at(h):[];if(p===l.ControlType.CHECKBOX){const X=f?f.split(","):[];if(Array.isArray(m)&&m.length){const O=W.reduce((b,y)=>b.concat(y.value.split("").map(D=>({...y,value:D}))),[]);let M=0;for(let b=0;b<m.length;b++){const y=m[b];o.splice(s,0,{...S,...F,controlId:C,value:"",type:a.type,control:a.control,controlComponent:l.ControlComponent.CHECKBOX,checkbox:{code:y.code,value:X.includes(y.code)}}),s++;const D=ct(y.value);for(let U=0;U<D.length;U++){const Q=D[U],G=U===D.length-1;o.splice(s,0,{...S,...V,...O[M],controlId:C,value:Q===`
|
|
62
62
|
`?_:Q,letterSpacing:G?L.gap:0,control:a.control,controlComponent:l.ControlComponent.VALUE}),M++,s++}}}}else if(p===l.ControlType.RADIO){if(Array.isArray(m)&&m.length){const X=W.reduce((M,b)=>M.concat(b.value.split("").map(y=>({...b,value:y}))),[]);let O=0;for(let M=0;M<m.length;M++){const b=m[M];o.splice(s,0,{...S,...F,controlId:C,value:"",type:a.type,control:a.control,controlComponent:l.ControlComponent.RADIO,radio:{code:b.code,value:f===b.code}}),s++;const y=ct(b.value);for(let D=0;D<y.length;D++){const U=y[D],Q=D===y.length-1;o.splice(s,0,{...S,...V,...X[O],controlId:C,value:U===`
|
|
63
63
|
`?_:U,letterSpacing:Q?P.gap:0,control:a.control,controlComponent:l.ControlComponent.VALUE}),O++,s++}}}}else{if((!h||!h.length)&&Array.isArray(m)&&m.length){const X=f?f.split(",").map(O=>O.trim()).filter(O=>O):[];if(X.length>1){const O=[];for(const M of X){const b=m.find(y=>y.code===M);b&&O.push({value:b.value})}O.length>0&&(W=O)}else if(X.length===1){const O=m.find(M=>M.code===X[0]);O&&(W=[{value:O.value}])}}for(let X=0;X<W.length;X++){const O=W[X];if(O.type===l.ElementType.CONTROL&&O.control){const M=O,b=M.controlId||lt(),y=M.control?.value||[],D=M.control?.placeholder||"",U=M.control?.type,Q=U===l.ControlType.TEXTFIELD,G=U===l.ControlType.TEXT,H=U===l.ControlType.CHECKBOX,tt=U===l.ControlType.RADIO,st=U===l.ControlType.BUTTON,et=Q?l.ControlComponent.PRETEXTFIX:l.ControlComponent.PREFIX,nt=Q?l.ControlComponent.POSTTEXTFIX:l.ControlComponent.POSTFIX,q={...S,controlId:b,type:l.ElementType.CONTROL,control:M.control},dt=Q?i.control.textFixColor:G?"#87d068":st?"transparent":i.control.bracketColor,ot=st?"#1677FF":void 0,ut=Q?M.control?.preTextFix||I.preTextFix:M.control?.prefix||I.prefix,ht=ct(ut);for(let w=0;w<ht.length;w++)o.splice(s,0,{...q,color:dt,highlight:ot,originControlId:C,value:ht[w],controlComponent:et}),s++;if(st){const w=M.control.buttonLabel||M.control.label||"按钮",Z=ct(w);for(let J=0;J<Z.length;J++){const x=Z[J];o.splice(s,0,{...q,originControlId:C,value:x,controlComponent:l.ControlComponent.VALUE,color:"#fff",highlight:"#1677FF"}),s++}}else if(H){const w=M.control?.valueSets||[],Z=M.control?.code||"",J=Z?Z.split(","):[];for(let x=0;x<w.length;x++){const A=w[x];o.splice(s,0,{...q,originControlId:C,value:"",controlComponent:l.ControlComponent.CHECKBOX,checkbox:{code:A.code,value:J.includes(A.code)}}),s++;const $=ct(A.value||"");for(let B=0;B<$.length;B++){const pt=$[B],Xt=B===$.length-1;o.splice(s,0,{...q,...V,originControlId:C,value:pt===`
|
|
64
64
|
`?_:pt,letterSpacing:Xt?L.gap:0,controlComponent:l.ControlComponent.VALUE}),s++}}}else if(tt){const w=M.control?.valueSets||[],Z=M.control?.code||"";for(let J=0;J<w.length;J++){const x=w[J];o.splice(s,0,{...q,originControlId:C,value:"",controlComponent:l.ControlComponent.RADIO,radio:{code:x.code,value:Z===x.code}}),s++;const A=ct(x.value||"");for(let $=0;$<A.length;$++){const B=A[$],pt=$===A.length-1;o.splice(s,0,{...q,...V,originControlId:C,value:B===`
|
|
65
65
|
`?_:B,letterSpacing:pt?P.gap:0,controlComponent:l.ControlComponent.VALUE}),s++}}}else if(y.length>0)for(let w=0;w<y.length;w++){const Z=y[w];if(Z.type===l.ElementType.CONTROL&&Z.control){const J=Z,x=J.controlId||lt(),A=J.control?.value||[],$=J.control?.type===l.ControlType.TEXTFIELD,B=J.control?.type===l.ControlType.TEXT,pt={...q,controlId:x,control:J.control},Xt=$?i.control.textFixColor:B?"#87d068":i.control.bracketColor,Lt=$?J.control?.preTextFix||I.preTextFix:J.control?.prefix||I.prefix,yt=ct(Lt);for(let Tt=0;Tt<yt.length;Tt++)o.splice(s,0,{...pt,color:Xt,originControlId:b,value:yt[Tt],controlComponent:$?l.ControlComponent.PRETEXTFIX:l.ControlComponent.PREFIX}),s++;for(let Tt=0;Tt<A.length;Tt++){const Pt=A[Tt];if(Pt.type===l.ElementType.MENSTRUAL_HISTORY||Pt.type===l.ElementType.FETAL_HEART_POSITION||Pt.type===l.ElementType.TOOTH_POSITION||Pt.type===l.ElementType.MACRO||Pt.type===l.ElementType.CUSTOM_MACRO||Pt.type===l.ElementType.REUSABLE_ITEM||Pt.type===l.ElementType.LIST||Pt.type===l.ElementType.SPECIAL_SYMBOLS){const Qt=Pt.id||lt();Pt.id||(Pt.id=Qt);const Ve=J.control?.value?.find(qt=>qt.id===Qt||qt.type===Pt.type&&qt.value===Pt.value);Ve&&Kn(Qt,Ve),o.splice(s,0,{...pt,...Pt,id:Qt,originControlId:b,controlComponent:l.ControlComponent.VALUE,type:Pt.type})}else o.splice(s,0,{...pt,...V,...Pt,originControlId:b,value:Pt.value===`
|
|
66
|
-
`?_:Pt.value,controlComponent:l.ControlComponent.VALUE});s++}if(A.length===0){const Tt=J.control?.placeholder||"";if(Tt){const Pt=ct(Tt);for(let
|
|
66
|
+
`?_:Pt.value,controlComponent:l.ControlComponent.VALUE});s++}if(A.length===0){const Tt=J.control?.placeholder||"";if(Tt){const Pt=ct(Tt);for(let Ht=0;Ht<Pt.length;Ht++)o.splice(s,0,{...pt,color:i.control.placeholderColor,originControlId:b,value:Pt[Ht],controlComponent:l.ControlComponent.PLACEHOLDER}),s++}}const Yt=$?J.control?.postTextFix||I.postTextFix:J.control?.postfix||I.postfix,St=ct(Yt);for(let Tt=0;Tt<St.length;Tt++)o.splice(s,0,{...pt,color:Xt,originControlId:b,value:St[Tt],controlComponent:$?l.ControlComponent.POSTTEXTFIX:l.ControlComponent.POSTFIX}),s++}else{if(Z.type===l.ElementType.MENSTRUAL_HISTORY||Z.type===l.ElementType.FETAL_HEART_POSITION||Z.type===l.ElementType.TOOTH_POSITION||Z.type===l.ElementType.MACRO||Z.type===l.ElementType.CUSTOM_MACRO||Z.type===l.ElementType.REUSABLE_ITEM||Z.type===l.ElementType.LIST||Z.type===l.ElementType.SPECIAL_SYMBOLS){const x=Z.id||lt();Z.id||(Z.id=x);const A=M.control?.value?.find($=>$.id===x||$.type===Z.type&&$.value===Z.value);A&&Kn(x,A),o.splice(s,0,{...q,...Z,id:x,originControlId:C,controlComponent:l.ControlComponent.VALUE,type:Z.type})}else o.splice(s,0,{...q,...V,...Z,originControlId:C,value:Z.value===`
|
|
67
67
|
`?_:Z.value,controlComponent:l.ControlComponent.VALUE});s++}}else if(D){const w=ct(D);for(let Z=0;Z<w.length;Z++)o.splice(s,0,{...q,color:i.control.placeholderColor,originControlId:C,value:w[Z],controlComponent:l.ControlComponent.PLACEHOLDER}),s++}else if((U===l.ControlType.SELECT||U===l.ControlType.DATE||U===l.ControlType.NUMBER)&&!M.control?.code&&D){const Z=ct(D);for(let J=0;J<Z.length;J++)o.splice(s,0,{...q,color:i.control.placeholderColor,originControlId:C,value:Z[J],controlComponent:l.ControlComponent.PLACEHOLDER}),s++}const K=Q?M.control?.postTextFix||I.postTextFix:M.control?.postfix||I.postfix,v=ct(K);for(let w=0;w<v.length;w++)o.splice(s,0,{...q,color:dt,highlight:ot,originControlId:C,value:v[w],controlComponent:nt}),s++}else if(O.type===l.ElementType.MENSTRUAL_HISTORY||O.type===l.ElementType.FETAL_HEART_POSITION||O.type===l.ElementType.TOOTH_POSITION||O.type===l.ElementType.MACRO||O.type===l.ElementType.CUSTOM_MACRO||O.type===l.ElementType.REUSABLE_ITEM||O.type===l.ElementType.LIST||O.type===l.ElementType.SPECIAL_SYMBOLS){const M=O.id||lt();O.id||(O.id=M);const b=h?.find(y=>y.id===M||y.type===O.type&&y.value===O.value);b&&Kn(M,b),o.splice(s,0,{...S,...O,id:M,controlId:C,control:a.control,controlComponent:l.ControlComponent.VALUE,type:O.type}),s++}else{const M=ct(O.value||"");for(let b=0;b<M.length;b++){const y=M[b];o.splice(s,0,{...S,...V,...O,controlId:C,value:y===`
|
|
68
68
|
`?_:y,type:O.type||l.ElementType.TEXT,control:a.control,controlComponent:l.ControlComponent.VALUE}),s++}}}}}else if(g){const W={...F,color:i.control.placeholderColor},X=ct(g);for(let O=0;O<X.length;O++){const M=X[O];o.splice(s,0,{...S,...W,controlId:C,value:M===`
|
|
69
69
|
`?_:M,type:a.type,control:a.control,controlComponent:l.ControlComponent.PLACEHOLDER}),s++}}if(R){const W=ct(R);for(let X=0;X<W.length;X++){const O=W[X];o.splice(s,0,{...S,...F,controlId:C,value:O,type:a.type,control:a.control,controlComponent:l.ControlComponent.POSTTEXTFIX_TEXT}),s++}}const E=ct(d||I.postTextFix);for(let W=0;W<E.length;W++){const X=E[W];o.splice(s,0,{...S,...N,controlId:C,value:X,type:a.type,control:a.control,controlComponent:l.ControlComponent.POSTTEXTFIX}),s++}s--}else{const{prefix:c,postfix:d,preText:u,postText:R,value:h,placeholder:g,code:f,type:T,valueSets:m}=a.control,{editorOptions:{control:p,checkbox:I,radio:L}}=t,P=a.controlId||lt();o.splice(s,1);const C=Dt(a,[...Fo,...$t]),S=Dt(a.control,At),F={...S,color:T===l.ControlType.TEXT?"#87d068":T===l.ControlType.BUTTON?"transparent":i.control.bracketColor,highlight:T===l.ControlType.BUTTON?"#1677FF":void 0},N={...S,color:void 0},V=ct(c||p.prefix);for(let E=0;E<V.length;E++){const W=V[E];o.splice(s,0,{...C,...F,controlId:P,value:W===`
|
|
@@ -78,31 +78,31 @@ trailer
|
|
|
78
78
|
`?_:O,type:a.type,control:a.control,controlComponent:l.ControlComponent.PLACEHOLDER}),s++}}if(R){const E=ct(R);for(let W=0;W<E.length;W++){const X=E[W];o.splice(s,0,{...C,...S,controlId:P,value:X,type:a.type,control:a.control,controlComponent:l.ControlComponent.POST_TEXT}),s++}}const Y=ct(d||p.postfix);for(let E=0;E<Y.length;E++){const W=Y[E];o.splice(s,0,{...C,...F,controlId:P,value:W===`
|
|
79
79
|
`?_:W,type:a.type,control:a.control,controlComponent:l.ControlComponent.POSTFIX}),s++}s--}}else if((!a.type||zt.includes(a.type))&&a.type!==l.ElementType.SPECIAL_SYMBOLS&&a.value?.length>1){o.splice(s,1);const c=ct(a.value);for(let d=0;d<c.length;d++)o.splice(s+d,0,{...a,value:c[d]});a=o[s]}if((a.value===`
|
|
80
80
|
`||a.value==`\r
|
|
81
|
-
`)&&(a.value=_),(a.type===l.ElementType.IMAGE||a.type===l.ElementType.BLOCK)&&(a.id=a.id||lt()),a.type===l.ElementType.LATEX){const{svg:c,width:d,height:u}=_i.convertLaTextToSVG(a.value);a.width=a.width||d,a.height=a.height||u,a.laTexSVG=c,a.id=a.id||lt()}(a.type===l.ElementType.MACRO||a.type===l.ElementType.CUSTOM_MACRO||a.type===l.ElementType.REUSABLE_ITEM)&&(a.id=a.id||lt()),(a.type===l.ElementType.MENSTRUAL_HISTORY||a.type===l.ElementType.TOOTH_POSITION||a.type===l.ElementType.FETAL_HEART_POSITION||a.type===l.ElementType.SPECIAL_SYMBOLS)&&(a.id=a.id||lt()),s++}}function
|
|
82
|
-
`:o?.value};return o&&n.forEach(r=>{const s=o[r];s!==void 0&&(i[r]=s)}),i}function Mt(o,t={}){const{extraPickAttrs:e,isClassifyArea:n=!1,isClone:i=!0,editorOptions:r}=t,s=(i?at(o):o).filter(d=>d.type!==l.ElementType.SPLIT_TAG),a=[];let c=0;for(;c<s.length;){let d=s[c];if(c===0&&d.value===_&&!d.listId&&(!d.type||d.type===l.ElementType.TEXT)){c++;continue}if(d.areaId){const R=d.areaId,h=d.area,g=[];for(;c<s.length;){const T=s[c];if(R!==T.areaId){c--;break}delete T.area,delete T.areaId,g.push(T),c++}const f=Mt(g,t);if(n){const T={type:l.ElementType.AREA,value:"",areaId:R,area:h};T.valueList=f,d=T}else{a.splice(c,0,...f);continue}}else if(d.titleId&&d.level){const R=d.titleId;if(R){const h=d.level,g={type:l.ElementType.TITLE,title:d.title,titleId:R,value:"",level:h},f=[];for(;c<s.length;){const T=s[c];if(R!==T.titleId){c--;break}delete T.level,delete T.title,f.push(T),c++}g.valueList=Mt(f,t),d=g}}else if(d.listId&&d.listType){const R=d.listId;if(R){const h=d.listType,g=d.listStyle,f=d?.label,T={type:l.ElementType.LIST,value:"",label:f||"",listId:R,listType:h,listStyle:g},m=[];for(;c<s.length;){const p=s[c];if(R!==p.listId){c--;break}delete p.listType,delete p.listStyle,m.push(p),c++}T.valueList=Mt(m,t),d=T}}else if(d.type===l.ElementType.TABLE){if(d.pagingId){let R=c+1,h=0;for(;R<s.length;){const g=s[R];if(g.pagingId===d.pagingId){d.height+=g.height;const f=g.trList.filter(T=>!T.pagingRepeat).filter(T=>(T.tdList=T.tdList.filter(m=>{if(m.originalId){for(let p=0;p<d.trList.length;p++){const L=d.trList[p].tdList.find(({id:P})=>P===m.originalId);if(L){m.value[0]?.type===l.ElementType.SPLIT_TAG&&m.value.splice(0,1),L.value.push(...m.value),L.rowspan=L.originalRowspan??L.rowspan;break}}return!1}return!0}),!T.originalId));d.trList.push(...f),d.trList?.forEach(T=>T.minHeight=T.originalMinHeight??T.minHeight),R++,h++}else break}c+=h}if(d.trList)for(let R=0;R<d.trList.length;R++){const h=d.trList[R];delete h.id;for(let g=0;g<h.tdList.length;g++){const f=h.tdList[g],T={colspan:f.colspan,rowspan:f.rowspan,value:Mt(f.value,{...t,isClassifyArea:!1})};
|
|
83
|
-
`:R.value;u.value+=h}else break}else c++;a.push(u)}return a}function Bi(o){switch(window.getComputedStyle(o).textAlign){case"left":case"start":return l.RowFlex.LEFT;case"center":return l.RowFlex.CENTER;case"right":case"end":return l.RowFlex.RIGHT;case"justify":return l.RowFlex.ALIGNMENT;case"justify-all":return l.RowFlex.JUSTIFY;default:return l.RowFlex.LEFT}}function $i(o){return o===l.RowFlex.ALIGNMENT?"justify":o}function
|
|
81
|
+
`)&&(a.value=_),(a.type===l.ElementType.IMAGE||a.type===l.ElementType.BLOCK)&&(a.id=a.id||lt()),a.type===l.ElementType.LATEX){const{svg:c,width:d,height:u}=_i.convertLaTextToSVG(a.value);a.width=a.width||d,a.height=a.height||u,a.laTexSVG=c,a.id=a.id||lt()}(a.type===l.ElementType.MACRO||a.type===l.ElementType.CUSTOM_MACRO||a.type===l.ElementType.REUSABLE_ITEM)&&(a.id=a.id||lt()),(a.type===l.ElementType.MENSTRUAL_HISTORY||a.type===l.ElementType.TOOTH_POSITION||a.type===l.ElementType.FETAL_HEART_POSITION||a.type===l.ElementType.SPECIAL_SYMBOLS)&&(a.id=a.id||lt()),s++}}function $l(o,t){const e=Object.keys(o),n=Object.keys(t);if(e.length!==n.length)return!1;for(let i=0;i<e.length;i++){const r=e[i];if(r!=="value"&&!(r==="groupIds"&&Array.isArray(o[r])&&Array.isArray(t[r])&&Ui(o[r],t[r]))&&o[r]!==t[r])return!1}return!0}function Ue(o,t={}){const{extraPickAttrs:e}=t,n=[...cl];e&&n.push(...e);const i={value:o?.value===_?`
|
|
82
|
+
`:o?.value};return o&&n.forEach(r=>{const s=o[r];s!==void 0&&(i[r]=s)}),i}function Mt(o,t={}){const{extraPickAttrs:e,isClassifyArea:n=!1,isClone:i=!0,editorOptions:r}=t,s=(i?at(o):o).filter(d=>d.type!==l.ElementType.SPLIT_TAG),a=[];let c=0;for(;c<s.length;){let d=s[c];if(c===0&&d.value===_&&!d.listId&&(!d.type||d.type===l.ElementType.TEXT)){c++;continue}if(d.areaId){const R=d.areaId,h=d.area,g=[];for(;c<s.length;){const T=s[c];if(R!==T.areaId){c--;break}delete T.area,delete T.areaId,g.push(T),c++}const f=Mt(g,t);if(n){const T={type:l.ElementType.AREA,value:"",areaId:R,area:h};T.valueList=f,d=T}else{a.splice(c,0,...f);continue}}else if(d.titleId&&d.level){const R=d.titleId;if(R){const h=d.level,g={type:l.ElementType.TITLE,title:d.title,titleId:R,value:"",level:h},f=[];for(;c<s.length;){const T=s[c];if(R!==T.titleId){c--;break}delete T.level,delete T.title,f.push(T),c++}g.valueList=Mt(f,t),d=g}}else if(d.listId&&d.listType){const R=d.listId;if(R){const h=d.listType,g=d.listStyle,f=d?.label,T={type:l.ElementType.LIST,value:"",label:f||"",listId:R,listType:h,listStyle:g},m=[];for(;c<s.length;){const p=s[c];if(R!==p.listId){c--;break}delete p.listType,delete p.listStyle,m.push(p),c++}T.valueList=Mt(m,t),d=T}}else if(d.type===l.ElementType.TABLE){if(d.pagingId){let R=c+1,h=0;for(;R<s.length;){const g=s[R];if(g.pagingId===d.pagingId){d.height+=g.height;const f=g.trList.filter(T=>!T.pagingRepeat).filter(T=>(T.tdList=T.tdList.filter(m=>{if(m.originalId){for(let p=0;p<d.trList.length;p++){const L=d.trList[p].tdList.find(({id:P})=>P===m.originalId);if(L){m.value[0]?.type===l.ElementType.SPLIT_TAG&&m.value.splice(0,1),L.value.push(...m.value),L.rowspan=L.originalRowspan??L.rowspan;break}}return!1}return!0}),!T.originalId));d.trList.push(...f),d.trList?.forEach(T=>T.minHeight=T.originalMinHeight??T.minHeight),R++,h++}else break}c+=h}if(d.trList)for(let R=0;R<d.trList.length;R++){const h=d.trList[R];delete h.id;for(let g=0;g<h.tdList.length;g++){const f=h.tdList[g],T={colspan:f.colspan,rowspan:f.rowspan,value:Mt(f.value,{...t,isClassifyArea:!1})};dl.forEach(m=>{const p=f[m];p!==void 0&&(T[m]=p)}),h.tdList[g]=T}}}else if(d.type===l.ElementType.HYPERLINK){const R=d.hyperlinkId;if(R){const h={type:l.ElementType.HYPERLINK,value:"",url:d.url},g=[];for(;c<s.length;){const f=s[c];if(R!==f.hyperlinkId){c--;break}delete f.type,delete f.url,g.push(f),c++}h.valueList=Mt(g,t),d=h}}else if(d.type===l.ElementType.DATE){const R=d.dateId;if(R){const h={type:l.ElementType.DATE,value:"",dateFormat:d.dateFormat},g=[];for(;c<s.length;){const f=s[c];if(R!==f.dateId){c--;break}delete f.type,delete f.dateFormat,g.push(f),c++}h.valueList=Mt(g,t),d=h}}else if(d.type!==l.ElementType.BUTTON){if(d.controlId){const R=d.controlId;if(!(d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.PRETEXTFIX||d.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)&&d.controlComponent===l.ControlComponent.VALUE){if(d.type===l.ElementType.MENSTRUAL_HISTORY||d.type===l.ElementType.FETAL_HEART_POSITION||d.type===l.ElementType.TOOTH_POSITION||d.type===l.ElementType.MACRO||d.type===l.ElementType.CUSTOM_MACRO||d.type===l.ElementType.REUSABLE_ITEM||d.type===l.ElementType.LIST||d.type===l.ElementType.SPECIAL_SYMBOLS){let m=!1;for(let p=c-1;p>=0;p--){const I=s[p],L=I.controlComponent===l.ControlComponent.PREFIX||I.controlComponent===l.ControlComponent.PRETEXTFIX||I.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT;if(I.controlId===R&&L){m=!0;break}if(I.controlId!==R)break}if(!m){const p=at(d);delete p.controlId,delete p.control,delete p.controlComponent,delete p.originControlId,a.push(p),c++;continue}}c++;continue}if(d.controlComponent===l.ControlComponent.PLACEHOLDER||d.controlComponent===l.ControlComponent.POSTFIX||d.controlComponent===l.ControlComponent.POSTTEXTFIX||d.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||d.controlComponent===l.ControlComponent.POST_TEXT||d.controlComponent===l.ControlComponent.PRE_TEXT||d.controlComponent===l.ControlComponent.CHECKBOX||d.controlComponent===l.ControlComponent.RADIO){c++;continue}const g=(T,m,p,I)=>{if(I===l.ControlType.CHECKBOX||I===l.ControlType.RADIO){let P=-1;for(let C=T;C<s.length&&s[C].controlId===m;C++)P=C;return P}const L=p?[l.ControlComponent.POSTTEXTFIX,l.ControlComponent.POSTTEXTFIX_TEXT]:[l.ControlComponent.POSTFIX];for(let P=T;P<s.length;P++){const C=s[P];if(C.controlId===m&&L.includes(C.controlComponent))return P}return-1},f=(T,m,p)=>{const I=[];let L=T;for(;L<=m;){const P=s[L];if(P.controlId&&P.controlId!==p&&P.control){const V=P.control?.type,Y=V===l.ControlType.TEXTFIELD,E=Y?l.ControlComponent.PRETEXTFIX:l.ControlComponent.PREFIX,W=P.controlComponent===E,X=V===l.ControlType.CHECKBOX||V===l.ControlType.RADIO;if(W||X&&(P.controlComponent===l.ControlComponent.CHECKBOX||P.controlComponent===l.ControlComponent.RADIO)){const O=g(L+1,P.controlId,Y,V);if(O!==-1){const M=s.slice(L,O+1).map(y=>{const D=at(y);return delete D.originControlId,D}),b=Mt(M,t);b.length>0&&I.push(b[0]),L=O+1;continue}}}if(!(P.controlId===p&&(P.controlComponent===l.ControlComponent.VALUE||!P.controlComponent)&&(!P.originControlId||P.originControlId===p)||P.originControlId===p&&P.controlComponent===l.ControlComponent.VALUE||P.controlId===p&&(P.controlComponent===l.ControlComponent.CHECKBOX||P.controlComponent===l.ControlComponent.RADIO)&&!P.originControlId)){L++;continue}if(P.type===l.ElementType.MENSTRUAL_HISTORY||P.type===l.ElementType.FETAL_HEART_POSITION||P.type===l.ElementType.TOOTH_POSITION||P.type===l.ElementType.MACRO||P.type===l.ElementType.CUSTOM_MACRO||P.type===l.ElementType.REUSABLE_ITEM||P.type===l.ElementType.LIST||P.type===l.ElementType.SPECIAL_SYMBOLS){const V=at(P);delete V.controlId,delete V.control,delete V.controlComponent,delete V.originControlId,I.push(V),L++;continue}if(P.controlComponent===l.ControlComponent.CHECKBOX||P.controlComponent===l.ControlComponent.RADIO){I.push(at(P)),L++;continue}const F=d.control?.type;if(F===l.ControlType.CHECKBOX||F===l.ControlType.RADIO){let V=L-1,Y=!1;for(;V>=T-1;){const E=s[V];if(E.controlId===p&&!E.originControlId)if(E.controlComponent===l.ControlComponent.CHECKBOX){Y=E.checkbox?.value===!0;break}else if(E.controlComponent===l.ControlComponent.RADIO){Y=E.radio?.value===!0;break}else if(E.controlComponent===l.ControlComponent.VALUE){V--;continue}else break;V--}if(Y){const E={value:P.value||""},W=[...$t,"color","bold","italic","underline","strikeout","size","font","highlight","textDecoration"];for(const X of W){const O=P[X];if(O!==void 0){if(X==="color"&&r){const M=r.control?.bracketColor,b=r.control?.placeholderColor;if(O===M||O===b)continue}E[X]=O}}I.push(E)}}else{const V={value:P.value||""},Y=[...$t,"color","bold","italic","underline","strikeout","size","font","highlight","textDecoration"];for(const E of Y){const W=P[E];if(W!==void 0){if(E==="color"&&r){const X=r.control?.bracketColor,O=r.control?.placeholderColor;if(W===X||W===O)continue}V[E]=W}}I.push(V)}L++}return I};if(d.controlComponent===l.ControlComponent.PREFIX){const T=d.control?.type===l.ControlType.TEXTFIELD,m=g(c+1,R,T);if(m!==-1){const p=f(c+1,m-1,R),I=Dt(d,At),L={...d.control,...I,value:p},P={...Dt(d,$t),type:l.ElementType.CONTROL,value:"",control:L,controlId:R};d=Ue(P,{extraPickAttrs:e}),c=m}}if(d.controlComponent===l.ControlComponent.PRETEXTFIX){const T=g(c+1,R,!0);if(T!==-1){const m=f(c+1,T-1,R),p=Dt(d,At),I={...d.control,...p,value:m},L={...Dt(d,$t),type:l.ElementType.CONTROL,value:"",control:I,controlId:R};d=Ue(L,{extraPickAttrs:e}),c=T}}if(d.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){const T=g(c+1,R,!0);if(T!==-1){const m=f(c+1,T-1,R),p=Dt(d,At),I={...d.control,...p,value:m},L={...Dt(d,$t),type:l.ElementType.CONTROL,value:"",control:I,controlId:R};d=Ue(L,{extraPickAttrs:e}),c=T}}}}const u=Ue(d,{extraPickAttrs:e});if(!d.type||d.type===l.ElementType.TEXT||d.type===l.ElementType.SUBSCRIPT||d.type===l.ElementType.SUPERSCRIPT)for(;c<s.length;){const R=s[c+1];if(c++,R&&$l(u,Ue(R,{extraPickAttrs:e}))){const h=R.value===_?`
|
|
83
|
+
`:R.value;u.value+=h}else break}else c++;a.push(u)}return a}function Bi(o){switch(window.getComputedStyle(o).textAlign){case"left":case"start":return l.RowFlex.LEFT;case"center":return l.RowFlex.CENTER;case"right":case"end":return l.RowFlex.RIGHT;case"justify":return l.RowFlex.ALIGNMENT;case"justify-all":return l.RowFlex.JUSTIFY;default:return l.RowFlex.LEFT}}function $i(o){return o===l.RowFlex.ALIGNMENT?"justify":o}function zl(o){switch(o){case l.RowFlex.LEFT:return"flex-start";case l.RowFlex.CENTER:return"center";case l.RowFlex.RIGHT:return"flex-end";case l.RowFlex.ALIGNMENT:case l.RowFlex.JUSTIFY:return"space-between";default:return"flex-start"}}function Hn(o){return!o.type||zt.includes(o.type)}function jl(o){return!o.type||o.type===l.ElementType.TEXT}function zi(o){return o.filter(t=>Hn(t)).map(t=>t.value).join("").replace(new RegExp(_,"g"),"")}function en(o,t){const e=o[t];if(!e)return null;const n=o[t+1];return!e.listId&&e.value===_&&n&&n.value!==_&&e.areaId===n.areaId?n:e}function wt(o,t,e,n){let i=en(o,e);if(!i)return;const{isBreakWhenWrap:r=!1,editorOptions:s,ignoreContextKeys:a=[]}=n||{},{mode:c}=s||{};c!==l.EditorMode.DESIGN&&i.title?.disabled&&(i=se(i,Xo));let d=!1;for(let u=0;u<t.length;u++){const R=t[u];if(r&&!i.listId&&Lo.test(R.value)&&(d=!0),d||!i.listId&&R.type===l.ElementType.LIST){const g=[...je,...$t,...He];Di(g,a),De(g,i,R),R.valueList?.forEach(f=>{De(g,i,f)});continue}R.valueList?.length&&wt(o,R.valueList,e,n);const h=[...Fo];sn(R)||h.push(...$t),Di(h,a),De(h,i,R)}}function ql(o,t){let e="span";o.type===l.ElementType.SUPERSCRIPT?e="sup":o.type===l.ElementType.SUBSCRIPT&&(e="sub");const n=document.createElement(e);return n.style.fontFamily=o.font||t.defaultFont,o.rowFlex&&(n.style.textAlign=$i(o.rowFlex)),o.color&&(n.style.color=o.color),o.bold&&(n.style.fontWeight="600"),o.italic&&(n.style.fontStyle="italic"),n.style.fontSize=`${o.size||t.defaultSize}px`,o.highlight&&(n.style.backgroundColor=o.highlight),o.underline&&(n.style.textDecoration="underline",n.style.textDecorationStyle=o.textDecoration?.style||"solid"),o.strikeout&&(n.style.textDecoration+=" line-through"),o.type&&n.setAttribute("data-type",o.type),o.rowMargin&&(n.style.lineHeight=(o.rowMargin??t.defaultRowMargin).toString()),n.innerText=o.value.replace(new RegExp(`${_}`,"g"),`
|
|
84
84
|
`),n}function ji(o){let t=0;const e=new Map;for(let n=0;n<o.length;n++){const i=o[n];if(n===0){if(i.checkbox)continue;i.value=i.value.replace(Lo,"")}if(i.listWrap){const r=e.get(t)||[];r.push(i),e.set(t,r)}else{const r=i.value.split(`
|
|
85
|
-
`);for(let s=0;s<r.length;s++){s>0&&(t+=1);const a=r[s],c=e.get(t)||[];c.push({...i,value:a}),e.set(t,c)}}}return e}function
|
|
86
|
-
`),a.append(R)}}return a}const i=document.createElement("div"),r=
|
|
87
|
-
`});else if(R.nodeName==="A"){const h=R,g=h.innerText;g&&e.push({type:l.ElementType.HYPERLINK,value:"",valueList:[{value:g}],url:h.href})}else if(/H[1-6]/.test(R.nodeName)){const g=
|
|
88
|
-
`})}else if(R.nodeName==="UL"||R.nodeName==="OL"){const h=R,g={value:"",type:l.ElementType.LIST,valueList:[]};R.nodeName==="OL"?g.listType=l.ListType.OL:(g.listType=l.ListType.UL,g.listStyle=h.style.listStyleType),h.querySelectorAll("li").forEach(f=>{const T=
|
|
85
|
+
`);for(let s=0;s<r.length;s++){s>0&&(t+=1);const a=r[s],c=e.get(t)||[];c.push({...i,value:a}),e.set(t,c)}}}return e}function ta(o){const t=[];if(!o.length)return t;let e=o[0]?.rowFlex||null;t.push({rowFlex:e,data:[o[0]]});for(let n=1;n<o.length;n++){const i=o[n],r=i.rowFlex||null;e===r&&!sn(i)&&!sn(o[n-1])?t[t.length-1].data.push(i):(t.push({rowFlex:r,data:[i]}),e=r)}for(let n=0;n<t.length;n++){const i=t[n];i.data=Mt(i.data)}return t}function nn(o,t){const e=Do(t);function n(s){const a=document.createElement("div");for(let c=0;c<s.length;c++){const d=s[c];if(d.type===l.ElementType.TABLE){const u=document.createElement("table");u.setAttribute("cellSpacing","0"),u.setAttribute("cellpadding","0"),u.setAttribute("border","0");const R="1px solid #000000";!d.borderType||d.borderType===l.TableBorder.ALL?(u.style.borderTop=R,u.style.borderLeft=R):d.borderType===l.TableBorder.EXTERNAL&&(u.style.border=R),u.style.width=`${d.width}px`;const h=document.createElement("colgroup");for(let f=0;f<d.colgroup.length;f++){const T=d.colgroup[f],m=document.createElement("col");m.setAttribute("width",`${T.width}`),h.append(m)}u.append(h);const g=d.trList;for(let f=0;f<g.length;f++){const T=document.createElement("tr"),m=g[f];T.style.height=`${m.height}px`;for(let p=0;p<m.tdList.length;p++){const I=document.createElement("td");(!d.borderType||d.borderType===l.TableBorder.ALL)&&(I.style.borderBottom=I.style.borderRight="1px solid");const L=m.tdList[p];I.colSpan=L.colspan,I.rowSpan=L.rowspan,I.style.verticalAlign=L.verticalAlign||"top",L.borderTypes?.includes(l.TdBorder.TOP)&&(I.style.borderTop=R),L.borderTypes?.includes(l.TdBorder.RIGHT)&&(I.style.borderRight=R),L.borderTypes?.includes(l.TdBorder.BOTTOM)&&(I.style.borderBottom=R),L.borderTypes?.includes(l.TdBorder.LEFT)&&(I.style.borderLeft=R);const P=nn(L.value,t);I.innerHTML=P.innerHTML,L.backgroundColor&&(I.style.backgroundColor=L.backgroundColor),T.append(I)}u.append(T)}a.append(u)}else if(d.type===l.ElementType.HYPERLINK){const u=document.createElement("a");u.innerText=d.valueList.map(R=>R.value).join(""),d.url&&(u.href=d.url),a.append(u)}else if(d.type===l.ElementType.TITLE){const u=document.createElement(`h${Vo[d.level]}`),R=n(d.valueList);u.innerHTML=R.innerHTML,a.append(u)}else if(d.type===l.ElementType.LIST){const u=document.createElement(Sl[d.listType]);d.listStyle&&(u.style.listStyleType=El[d.listStyle]);const R=Mt(d.valueList);ji(R).forEach(g=>{const f=document.createElement("li"),T=n(g);f.innerHTML=T.innerHTML,u.append(f)}),a.append(u)}else if(d.type===l.ElementType.IMAGE){const u=document.createElement("img");d.value&&(u.src=d.value,u.width=d.width,u.height=d.height),a.append(u)}else if(d.type===l.ElementType.BLOCK){if(d.block?.type===l.BlockType.VIDEO){const u=d.block.videoBlock?.src;if(u){const R=document.createElement("video");R.style.display="block",R.controls=!0,R.src=u,R.width=d.width||t?.width||window.innerWidth,R.height=d.height,a.append(R)}}else if(d.block?.type===l.BlockType.IFRAME){const{src:u,srcdoc:R,sandbox:h,allow:g}=d.block.iframeBlock||{};if(u||R){const f=document.createElement("iframe");f.sandbox.add(...h||qe.sandbox),f.setAttribute("allow",[g||qe.allow].join(" ")),f.style.display="block",f.style.border="none",u?f.src=u:R&&(f.srcdoc=R),f.width=`${d.width||t?.width||window.innerWidth}`,f.height=`${d.height}`,a.append(f)}}}else if(d.type===l.ElementType.SEPARATOR){const u=document.createElement("hr");d.dashArray?.length&&u.setAttribute("data-dash-array",d.dashArray.join(",")),a.append(u)}else if(d.type===l.ElementType.CHECKBOX){const u=document.createElement("input");u.type="checkbox",d.checkbox?.value&&u.setAttribute("checked","true"),a.append(u)}else if(d.type===l.ElementType.RADIO){const u=document.createElement("input");u.type="radio",d.radio?.value&&u.setAttribute("checked","true"),a.append(u)}else if(d.type===l.ElementType.TAB){const u=document.createElement("span");u.innerHTML=`${yi}${yi}`,a.append(u)}else if(d.type===l.ElementType.CONTROL){const u=document.createElement("span"),R=n(d.control?.value||[]);u.innerHTML=R.innerHTML,a.append(u)}else if(d.type===l.ElementType.PAGE_BREAK){const u=document.createElement("div");u.style.breakAfter="page",a.append(u)}else if(!d.type||d.type===l.ElementType.LATEX||zt.includes(d.type)){let u="";if(d.type===l.ElementType.DATE?u=d.valueList?.map(h=>h.value).join("")||"":u=d.value,!u)continue;const R=ql(d,e);s[c-1]?.type===l.ElementType.TITLE&&(u=u.replace(/^\n/,"")),R.innerText=u.replace(new RegExp(`${_}`,"g"),`
|
|
86
|
+
`),a.append(R)}}return a}const i=document.createElement("div"),r=ta(o);for(let s=0;s<r.length;s++){const a=r[s],c=!a.rowFlex||a.rowFlex===l.RowFlex.LEFT,d=document.createElement("div");if(!c){const u=a.data[0];sn(u)?(d.style.display="flex",d.style.justifyContent=zl(u.rowFlex)):(d.style.textAlign=$i(a.rowFlex),a.rowFlex==="justify"&&(d.style.textAlignLast="justify"))}d.innerHTML=n(a.data).innerHTML,c?d.childNodes.forEach(u=>{i.append(u.cloneNode(!0))}):i.append(d)}return i}function ea(o){if(!o||o.nodeType!==3)return null;const t=o.parentNode,e=t.nodeName==="FONT"?t.parentNode:t,n=Bi(e),i=o.textContent,r=window.getComputedStyle(e);if(!i||e.nodeName==="STYLE")return null;const s={value:i,color:r.color,bold:Number(r.fontWeight)>500,italic:r.fontStyle.includes("italic"),size:Math.floor(parseFloat(r.fontSize))};return e.nodeName==="SUB"||r.verticalAlign==="sub"?s.type=l.ElementType.SUBSCRIPT:(e.nodeName==="SUP"||r.verticalAlign==="super")&&(s.type=l.ElementType.SUPERSCRIPT),n!==l.RowFlex.LEFT&&(s.rowFlex=n),r.backgroundColor!=="rgba(0, 0, 0, 0)"&&(s.highlight=r.backgroundColor),r.textDecorationLine.includes("underline")&&(s.underline=!0),r.textDecorationLine.includes("line-through")&&(s.strikeout=!0),s}function on(o,t){const e=[];function n(c){if(c.nodeType===3){const d=ea(c);d&&e.push(d)}else if(c.nodeType===1){const d=c.childNodes;for(let u=0;u<d.length;u++){const R=d[u];if(R.nodeName==="BR")e.push({value:`
|
|
87
|
+
`});else if(R.nodeName==="A"){const h=R,g=h.innerText;g&&e.push({type:l.ElementType.HYPERLINK,value:"",valueList:[{value:g}],url:h.href})}else if(/H[1-6]/.test(R.nodeName)){const g=on(na(R,"div").outerHTML,t);e.push({value:"",type:l.ElementType.TITLE,level:Nl[R.nodeName],valueList:g}),R.nextSibling&&!hl.includes(R.nextSibling.nodeName)&&e.push({value:`
|
|
88
|
+
`})}else if(R.nodeName==="UL"||R.nodeName==="OL"){const h=R,g={value:"",type:l.ElementType.LIST,valueList:[]};R.nodeName==="OL"?g.listType=l.ListType.OL:(g.listType=l.ListType.UL,g.listStyle=h.style.listStyleType),h.querySelectorAll("li").forEach(f=>{const T=on(f.innerHTML,t);T.forEach(m=>{m.value===`
|
|
89
89
|
`&&(m.listWrap=!0)}),T.unshift({value:`
|
|
90
90
|
`}),g.valueList.push(...T)}),e.push(g)}else if(R.nodeName==="HR")e.push({value:`
|
|
91
91
|
`,type:l.ElementType.SEPARATOR});else if(R.nodeName==="IMG"){const{src:h,width:g,height:f}=R;h&&g&&f&&e.push({width:g,height:f,value:h,type:l.ElementType.IMAGE,rowFlex:Bi(R.parentElement)})}else if(R.nodeName==="VIDEO"){const{src:h,width:g,height:f}=R;h&&g&&f&&e.push({value:"",type:l.ElementType.BLOCK,block:{type:l.BlockType.VIDEO,videoBlock:{src:h}},width:g,height:f})}else if(R.nodeName==="IFRAME"){const{src:h,srcdoc:g,width:f,height:T}=R;(h||g)&&f&&T&&e.push({value:"",type:l.ElementType.BLOCK,block:{type:l.BlockType.IFRAME,iframeBlock:{src:h,srcdoc:g}},width:parseInt(f),height:parseInt(T)})}else if(R.nodeName==="TABLE"){const h=R,g={type:l.ElementType.TABLE,value:`
|
|
92
|
-
`,colgroup:[],trList:[]},f=h.querySelectorAll("colgroup col");if(h.querySelectorAll("tr").forEach(T=>{const m=Number(window.getComputedStyle(T).height.replace("px","")),p={height:m,minHeight:m,tdList:[]};T.querySelectorAll("th,td").forEach(I=>{const L=I,P=
|
|
92
|
+
`,colgroup:[],trList:[]},f=h.querySelectorAll("colgroup col");if(h.querySelectorAll("tr").forEach(T=>{const m=Number(window.getComputedStyle(T).height.replace("px","")),p={height:m,minHeight:m,tdList:[]};T.querySelectorAll("th,td").forEach(I=>{const L=I,P=on(L.innerHTML,t),C={colspan:L.colSpan,rowspan:L.rowSpan,value:P,verticalAlign:window.getComputedStyle(I).verticalAlign,width:parseFloat(window.getComputedStyle(I).width)};L.style.backgroundColor&&(C.backgroundColor=L.style.backgroundColor),p.tdList.push(C)}),g.trList.push(p)}),g.trList.length){const T=g.trList[0].tdList.reduce((p,I)=>p+I.colspan,0),m=Math.ceil(t.innerWidth/T);for(let p=0;p<T;p++){const I=f[p]?.getAttribute("width");g.colgroup.push({width:I?parseFloat(I):m})}e.push(g)}}else if(R.nodeName==="INPUT"&&R.type===l.ControlComponent.CHECKBOX)e.push({type:l.ElementType.CHECKBOX,value:"",checkbox:{value:R.checked}});else if(R.nodeName==="INPUT"&&R.type===l.ControlComponent.RADIO)e.push({type:l.ElementType.RADIO,value:"",radio:{value:R.checked}});else if(n(R),R.nodeType===1&&u!==d.length-1){const h=R;window.getComputedStyle(h).display==="block"&&!/(\n|\r\n)$/.test(h.textContent)&&e.push({value:`
|
|
93
93
|
`})}}}}const i=document.createElement("div");document.body.appendChild(i);const r=i.attachShadow({mode:"open"}),s=document.createElement("div");s.innerHTML=o,r.appendChild(s);const a=[];return s.childNodes.forEach(c=>{c.nodeType!==1&&!c.textContent?.trim()&&a.push(c)}),a.forEach(c=>c.remove()),n(s),i.remove(),e}function xe(o){function t(e){let n="";for(let i=0;i<e.length;i++){const r=e[i];if(r.type===l.ElementType.TABLE){n+=`
|
|
94
94
|
`;const s=r.trList;for(let a=0;a<s.length;a++){const c=s[a];for(let d=0;d<c.tdList.length;d++){const u=c.tdList[d],R=t(Mt(u.value)),h=d===0,g=c.tdList.length-1===d;n+=`${h?"":" "}${R}${g?`
|
|
95
95
|
`:""}`}}}else if(r.type===l.ElementType.TAB)n+=" ";else if(r.type===l.ElementType.HYPERLINK)n+=r.valueList.map(s=>s.value).join("");else if(r.type===l.ElementType.TITLE)n+=`${t(Mt(r.valueList))}`;else if(r.type===l.ElementType.LIST){const s=Mt(r.valueList),a=ji(s);let c="";r.listType===l.ListType.UL&&(c=Wo[r.listStyle]),a.forEach((d,u)=>{const R=a.size-1===u;n+=`
|
|
96
96
|
${c||`${u+1}.`}${t(d)}${R?`
|
|
97
97
|
`:""}`})}else if(r.type===l.ElementType.CHECKBOX)n+=r.checkbox?.value?"☑":"□";else if(r.type===l.ElementType.RADIO)n+=r.radio?.value?"☉":"○";else if(!r.type||r.type===l.ElementType.LATEX||zt.includes(r.type)){let s="";if(r.type===l.ElementType.CONTROL){const a=r.control.value?.[0]?.value||"";s=a?`${r.control?.preText||""}${a}${r.control?.postText||""}`:""}else r.type===l.ElementType.DATE?s=r.valueList?.map(a=>a.value).join("")||"":s=r.value;n+=s.replace(new RegExp(`${_}`,"g"),`
|
|
98
|
-
`)}}return n}return t(Mt(o))}function wo(o){return Io(o,["metrics","style"])}function
|
|
99
|
-
`,r.append(c),a.selectNodeContents(r),s?.removeAllRanges(),s?.addRange(a),document.execCommand("copy"),r.remove()}
|
|
100
|
-
`||(t.splice(a,0,u),a++)}a--}a++}}wt(r,t,i,{isBreakWhenWrap:!0,editorOptions:e.getOptions()})}e.insertElementList(t)}function is(o,t){const e=o.getDraw();if(e.isReadonly()||e.isDisabled())return;const n=nn(t,{innerWidth:e.getOriginalInnerWidth()});Qo(o,n)}function vo(o,t){const e=o.getDraw();if(e.isReadonly()||e.isDisabled())return;const n=e.getRange(),{startIndex:i}=n.getRange(),r=e.getElementList(),s=new FileReader;s.readAsDataURL(t),s.onload=()=>{const a=new Image,c=s.result;a.src=c,a.onload=()=>{const d={value:c,type:l.ElementType.IMAGE,width:a.width,height:a.height};~i&&wt(r,[d],i,{editorOptions:e.getOptions()}),e.insertElementList([d])}}}function la(o,t){const e=o.getDraw();if(e.isReadonly()||e.isDisabled())return;const n=t.clipboardData;if(!n)return;const{paste:i}=e.getOverride();if(i&&i(t)?.preventDefault!==!1)return;if(!ra(n)){const s=n.getData("text"),a=ts();if(a&&Zn(s)===Zn(a.text)){Qo(o,a.elementList);return}}es();let r=!1;for(let s=0;s<n.items.length;s++)if(n.items[s].type==="text/html"){r=!0;break}for(let s=0;s<n.items.length;s++){const a=n.items[s];if(a.kind==="string"){if(a.type==="text/plain"&&!r){a.getAsString(c=>{o.input(c)});break}if(a.type==="text/html"&&r){a.getAsString(c=>{is(o,c)});break}}else if(a.kind==="file"&&a.type.includes("image")){const c=a.getAsFile();c&&vo(o,c)}}}async function aa(o,t){const e=o.getDraw();if(e.isReadonly()||e.isDisabled())return;const{paste:n}=e.getOverride();if(n&&n()?.preventDefault!==!1)return;const i=await navigator.clipboard.readText(),r=ts();if(r&&Zn(i)===Zn(r.text)){Qo(o,r.elementList);return}if(es(),t?.isPlainText)i&&o.input(i);else{const s=await navigator.clipboard.read();let a=!1;for(const c of s)if(c.types.includes("text/html")){a=!0;break}for(const c of s)if(c.types.includes("text/plain")&&!a){const u=await(await c.getType("text/plain")).text();u&&o.input(u)}else if(c.types.includes("text/html")&&a){const u=await(await c.getType("text/html")).text();u&&is(o,u)}else if(c.types.some(d=>d.startsWith("image/"))){const d=c.types.find(R=>R.startsWith("image/")),u=await c.getType(d);vo(o,u)}}}class ca{draw;container;agentCursorDom;canvasEvent;eventBus;constructor(t,e){this.draw=t,this.container=t.getContainer(),this.canvasEvent=e,this.eventBus=t.getEventBus();const n=document.createElement("textarea");n.autocomplete="off",n.classList.add(`${z}-inputarea`),n.innerText="",this.container.append(n),this.agentCursorDom=n,n.onkeydown=i=>this._keyDown(i),n.oninput=this._input.bind(this),n.onpaste=i=>this._paste(i),n.addEventListener("compositionstart",this._compositionstart.bind(this)),n.addEventListener("compositionupdate",this._compositionupdate.bind(this)),n.addEventListener("compositionend",this._compositionend.bind(this)),n.addEventListener("keydown",this._keydown.bind(this)),this.eventBus.on("rangeStyleChange",i=>{this.agentCursorDom.style.fontSize=Math.max(i.size,18)+"px"})}getAgentCursorDom(){return this.agentCursorDom}_keyDown(t){this.draw.isInteractionSuspended()||this.canvasEvent.keydown(t)}_input(t){if(this.draw.isInteractionSuspended())return;const e=t.data;e&&this.canvasEvent.input(e),this.eventBus.isSubscribe("input")&&this.eventBus.emit("input",t)}_paste(t){this.draw.isInteractionSuspended()||this.draw.isReadonly()||!t.clipboardData||(la(this.canvasEvent,t),t.preventDefault())}_compositionstart(){this.draw.isInteractionSuspended()||(this.agentCursorDom.style.zIndex="1000",this.agentCursorDom.style.width="0px",this.agentCursorDom.style.color="#000",this.agentCursorDom.style.background="#fff",this.canvasEvent.compositionstart())}_compositionupdate(){if(this.draw.isInteractionSuspended())return;this.agentCursorDom.style.width="9999px";let t=this.agentCursorDom.scrollWidth;const e=this.container.clientWidth,n=Math.max(e-this.agentCursorDom.offsetLeft,100);t>n&&(t=n),this.agentCursorDom.style.width=t+"px"}_compositionend(t){this.draw.isInteractionSuspended()||(this.agentCursorDom.style.zIndex="-1",this.agentCursorDom.style.width="0px",this.agentCursorDom.style.color="",this.agentCursorDom.style.background="",this.canvasEvent.compositionend(t))}_keydown(t){this.draw.isInteractionSuspended()||this.canvasEvent.isComposing&&t.code==="Escape"&&this.canvasEvent.compositionCancel()}}class da{ANIMATION_CLASS=`${z}-cursor--animation`;draw;container;options;position;cursorDom;cursorAgent;blinkTimeout;hitLineStartIndex;constructor(t,e){this.draw=t,this.container=t.getContainer(),this.position=t.getPosition(),this.options=t.getOptions(),this.cursorDom=document.createElement("div"),this.cursorDom.classList.add(`${z}-cursor`),this.container.append(this.cursorDom),this.cursorAgent=new ca(t,e),this.blinkTimeout=null}getCursorDom(){return this.cursorDom}getAgentDom(){return this.cursorAgent.getAgentCursorDom()}getAgentIsActive(){return this.getAgentDom()===document.activeElement}getAgentDomValue(){return this.getAgentDom().value}clearAgentDomValue(){this.getAgentDom().value=""}getHitLineStartIndex(){return this.hitLineStartIndex}_blinkStart(){this.cursorDom.classList.add(this.ANIMATION_CLASS)}_blinkStop(){this.cursorDom.classList.remove(this.ANIMATION_CLASS)}_setBlinkTimeout(){this._clearBlinkTimeout(),this.blinkTimeout=window.setTimeout(()=>{this._blinkStart()},500)}_clearBlinkTimeout(){this.blinkTimeout&&(this._blinkStop(),window.clearTimeout(this.blinkTimeout),this.blinkTimeout=null)}focus(){if(il&&this.draw.isReadonly())return;const t=this.cursorAgent.getAgentCursorDom();document.activeElement!==t&&(t.focus(),t.setSelectionRange(0,0))}drawCursor(t){let e=this.position.getCursorPosition();if(!e)return;const{scale:n,cursor:i}=this.options,{color:r,width:s,isShow:a=!0,isBlink:c=!0,isFocus:d=!0,hitLineStartIndex:u}={...i,...t},R=this.draw.getHeight(),h=this.draw.getPageGap();this.hitLineStartIndex=u,u&&(e=this.position.getPositionList()[u]);const{metrics:g,coordinate:{leftTop:f,rightTop:T},ascent:m,pageNo:p}=e,P=(this.draw.getZone().isMainActive()?p:this.draw.getPageNo())*(R+h),C=el*n,S=Math.min(g.height/4,C),F=g.height+S*2,N=this.cursorAgent.getAgentCursorDom();d&&setTimeout(()=>{this.focus()});const V=g.boundingBoxDescent<0?0:g.boundingBoxDescent,Y=f[1]+m+V-(F-S)+P,E=u?f[0]:T[0];if(N.style.left=`${E}px`,N.style.top=`${Y+F-C}px`,!a){this.recoveryCursor();return}const W=this.cursorDom.style.top,X=this.draw.isReadonly();this.cursorDom.style.width=`${s*n}px`,this.cursorDom.style.backgroundColor=r,this.cursorDom.style.left=`${E}px`,this.cursorDom.style.top=`${Y}px`,this.cursorDom.style.display=X?"none":"block",this.cursorDom.style.height=`${F}px`,c?this._setBlinkTimeout():this._clearBlinkTimeout(),Co(()=>{this.moveCursorToVisible({cursorPosition:e,direction:parseInt(W)>Y?Ut.UP:Ut.DOWN})})}recoveryCursor(){this.cursorDom.style.display="none",this._clearBlinkTimeout()}moveCursorToVisible(t){const{cursorPosition:e,direction:n}=t;if(!e||!n)return;const{pageNo:i,coordinate:{leftTop:r,leftBottom:s}}=e,a=zr(this.container),c={left:0,right:0,top:0,bottom:0},d=a===document.documentElement;if(d)c.right=window.innerWidth,c.bottom=window.innerHeight;else{const{left:T,right:m,top:p,bottom:I}=a.getBoundingClientRect();c.left=T,c.right=m,c.top=p,c.bottom=I}const u=i*(this.draw.getHeight()+this.draw.getPageGap())+this.container.getBoundingClientRect().top,R=n===Ut.UP,h=s[0]+(d?0:c.left),g=R?r[1]+u:s[1]+u,{maskMargin:f}=this.options;if(c.top+=f[0],c.bottom-=f[2],!(h>=c.left&&h<=c.right&&g>=c.top&&g<=c.bottom)){const{scrollLeft:T,scrollTop:m}=a;R?a.scroll(T,m-(c.top-g)):a.scroll(T,m+g-c.bottom)}}}var rn;(function(o){o[o.LEFT=0]="LEFT",o[o.CENTER=1]="CENTER",o[o.RIGHT=2]="RIGHT"})(rn||(rn={}));function Te(o){return Ke?o.metaKey:o.ctrlKey}l.KeyMap=void 0,(function(o){o.Delete="Delete",o.Backspace="Backspace",o.Enter="Enter",o.Left="ArrowLeft",o.Right="ArrowRight",o.Up="ArrowUp",o.Down="ArrowDown",o.ESC="Escape",o.TAB="Tab",o.META="Meta",o.LEFT_BRACKET="[",o.RIGHT_BRACKET="]",o.COMMA=",",o.PERIOD=".",o.LEFT_ANGLE_BRACKET="<",o.RIGHT_ANGLE_BRACKET=">",o.EQUAL="=",o.MINUS="-",o.PLUS="+",o.A="a",o.B="b",o.C="c",o.D="d",o.E="e",o.F="f",o.G="g",o.H="h",o.I="i",o.J="j",o.K="k",o.L="l",o.M="m",o.N="n",o.O="o",o.P="p",o.Q="q",o.R="r",o.S="s",o.T="t",o.U="u",o.V="v",o.W="w",o.X="x",o.Y="y",o.Z="z",o.A_UPPERCASE="A",o.B_UPPERCASE="B",o.C_UPPERCASE="C",o.D_UPPERCASE="D",o.E_UPPERCASE="E",o.F_UPPERCASE="F",o.G_UPPERCASE="G",o.H_UPPERCASE="H",o.I_UPPERCASE="I",o.J_UPPERCASE="J",o.K_UPPERCASE="K",o.L_UPPERCASE="L",o.M_UPPERCASE="M",o.N_UPPERCASE="N",o.O_UPPERCASE="O",o.P_UPPERCASE="P",o.Q_UPPERCASE="Q",o.R_UPPERCASE="R",o.S_UPPERCASE="S",o.T_UPPERCASE="T",o.U_UPPERCASE="U",o.V_UPPERCASE="V",o.W_UPPERCASE="W",o.X_UPPERCASE="X",o.Y_UPPERCASE="Y",o.Z_UPPERCASE="Z",o.ZERO="0",o.ONE="1",o.TWO="2",o.THREE="3",o.FOUR="4",o.FIVE="5",o.SIX="6",o.SEVEN="7",o.EIGHT="8",o.NINE="9"})(l.KeyMap||(l.KeyMap={}));class _n{element;control;constructor(t,e){this.element=t,this.control=e}setElement(t){this.element=t}getElement(){return this.element}getCode(){return this.element.control?.code||null}getValue(){const t=this.control.getElementList(),{startIndex:e}=this.control.getRange(),n=t[e],i=[];let r=e;for(;r>0;){const a=t[r];if(a.controlId!==n.controlId||a.controlComponent===l.ControlComponent.PREFIX||a.controlComponent===l.ControlComponent.PRE_TEXT)break;a.controlComponent===l.ControlComponent.VALUE&&i.unshift(a),r--}let s=e+1;for(;s<t.length;){const a=t[s];if(a.controlId!==n.controlId||a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POST_TEXT)break;a.controlComponent===l.ControlComponent.VALUE&&i.push(a),s++}return i}setValue(){return-1}setSelect(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return;const{control:i}=this.element,r=e.elementList||this.control.getElementList(),{startIndex:s}=e.range||this.control.getRange(),a=r[s];let c=s;for(;c>0;){const u=r[c];if(u.controlId!==a.controlId||u.controlComponent===l.ControlComponent.PREFIX||u.controlComponent===l.ControlComponent.PRE_TEXT)break;if(u.controlComponent===l.ControlComponent.CHECKBOX){const R=u.checkbox;R.value=t.includes(R.code)}c--}let d=s+1;for(;d<r.length;){const u=r[d];if(u.controlId!==a.controlId||u.controlComponent===l.ControlComponent.POSTFIX||u.controlComponent===l.ControlComponent.POST_TEXT)break;if(u.controlComponent===l.ControlComponent.CHECKBOX){const R=u.checkbox;R.value=t.includes(R.code)}d++}i.code=t.join(","),this.control.repaintControl({curIndex:s,isSetCursor:!1}),this.control.emitControlContentChange({context:e})}keydown(t){if(this.control.getIsDisabledControl())return null;const e=this.control.getRange();this.control.shrinkBoundary();const{startIndex:n,endIndex:i}=e;return t.key===l.KeyMap.Backspace||t.key===l.KeyMap.Delete?this.control.removeControl(n):i}cut(){return-1}}class Ko extends _n{setSelect(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return;const{control:i}=this.element,r=e.elementList||this.control.getElementList(),{startIndex:s}=e.range||this.control.getRange(),a=r[s];let c=s;for(;c>0;){const u=r[c];if(u.controlId!==a.controlId||u.controlComponent===l.ControlComponent.PREFIX||u.controlComponent===l.ControlComponent.PRE_TEXT)break;if(u.controlComponent===l.ControlComponent.RADIO){const R=u.radio;R.value=t.includes(R.code)}c--}let d=s+1;for(;d<r.length;){const u=r[d];if(u.controlId!==a.controlId||u.controlComponent===l.ControlComponent.POSTFIX||u.controlComponent===l.ControlComponent.POST_TEXT)break;if(u.controlComponent===l.ControlComponent.RADIO){const R=u.radio;R.value=t.includes(R.code)}d++}i.code=t.join(","),this.control.repaintControl({curIndex:s,isSetCursor:!1}),this.control.emitControlContentChange({context:e})}}function ss(o){const t=o.getDraw(),e=t.getPosition(),n=t.getRange();o.isAllowDrag=!0,o.cacheRange=at(n.getRange()),o.cacheElementList=t.getElementList(),o.cachePositionList=e.getPositionList(),o.cachePositionContext=e.getPositionContext()}function rs(o,t){const{checkbox:e,control:n}=o;if(!n)t.getCheckboxParticle().setSelect(o);else{const i=n?.code?n.code.split(","):[];if(e?.value){const s=i.findIndex(a=>a===e.code);i.splice(s,1)}else e?.code&&i.push(e.code);const r=t.getControl().getActiveControl();r instanceof _n&&r.setSelect(i)}}function ls(o,t){const{radio:e,control:n}=o;if(!n)t.getRadioParticle().setSelect(o);else{const i=e?.code?[e.code]:[],r=t.getControl().getActiveControl();r instanceof Ko&&r.setSelect(i)}}function ua(o,t){const e=t.getDraw();let n=e.isReadonly();const i=e.getRange(),r=e.getPosition(),s=i.getRange();if(o.button===rn.RIGHT&&(s.isCrossRowCol||!i.getIsCollapsed()))return;const c=o.target.dataset.index;if(c&&e.setPageNo(Number(c)),!t.isAllowDrag&&!n&&s.startIndex!==s.endIndex&&i.getIsPointInRange(o.offsetX,o.offsetY,e.getPageNo())){ss(t);return}t.isAllowSelection=!0;const d=at(r.getPositionContext()),u=r.adjustPositionContext({x:o.offsetX,y:o.offsetY});if(!u)return;const{index:R,isDirectHit:h,isCheckbox:g,isRadio:f,isImage:T,isLabel:m,isMacro:p,isTable:I,tdValueIndex:L,hitLineStartIndex:P}=u;h&&p&&console.log("mousedown - positionResult:",{index:R,isDirectHit:h,isMacro:p}),t.mouseDownStartPosition={...u,index:I?L:R,originalIndex:R,x:o.offsetX,y:o.offsetY};const C=e.getElementList(),S=r.getPositionList(),F=I?L:R;let N;I?N=e.getTd().value[L]:N=C[F];const V=!!(h&&T),Y=!!(h&&g),E=!!(h&&f),W=!!(h&&m),X=!!(h&&p),O=ot=>ot&&(ot.type===l.ElementType.MACRO||ot.type===l.ElementType.CUSTOM_MACRO||ot.type===l.ElementType.REUSABLE_ITEM||ot.type===l.ElementType.SUB_TEMPLATE||ot.type===l.ElementType.MENSTRUAL_HISTORY||ot.type===l.ElementType.FETAL_HEART_POSITION||ot.type===l.ElementType.TOOTH_POSITION||ot.type===l.ElementType.LIST||ot.type===l.ElementType.SPECIAL_SYMBOLS),M=ot=>ot&&!!ot.originControlId&&!!ot.controlId,b=ot=>ot&&!!ot.originControlId&&!!ot.controlId&&(ot.controlComponent===l.ControlComponent.POSTFIX||ot.controlComponent===l.ControlComponent.POSTTEXTFIX||ot.controlComponent===l.ControlComponent.POST_TEXT||ot.controlComponent===l.ControlComponent.PLACEHOLDER),y=e.getMode()===l.EditorMode.FORM,D=y?e.getControl().getActiveTextControlLimit():null;let U=F;const Q=!!(D&&(!N?.controlId||N.controlId===D.controlId&&(N.originControlId||null)===D.originControlId||D.parentControlId&&N.controlId===D.parentControlId&&!N.originControlId));if(y&&(N?.controlId||N?.originControlId)){let ot;const ut=N.originControlId||N.controlId;for(let ht=F;ht>=0;ht--){const K=C[ht];if(K.controlId===ut&&!K.originControlId&&K.control?.type){ot=K.control.type;break}if(K.controlId!==N.controlId&&K.controlId!==ut)break}if(ot===l.ControlType.TEXT&&M(N))N.controlComponent===l.ControlComponent.PREFIX||N.controlComponent===l.ControlComponent.PRE_TEXT||N.controlComponent===l.ControlComponent.PRETEXTFIX||N.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT?U=Math.max(F-1,0):(N.controlComponent===l.ControlComponent.POSTFIX||N.controlComponent===l.ControlComponent.POST_TEXT||N.controlComponent===l.ControlComponent.POSTTEXTFIX||N.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)&&(U=F);else if(ot===l.ControlType.TEXTFIELD){const ht=N.controlComponent;if(!M(N)){if(!(F>0&&b(C[F-1]))){if(!(N.controlComponent===l.ControlComponent.VALUE&&O(N))){if(ht===l.ControlComponent.PRETEXTFIX||ht===l.ControlComponent.PRETEXTFIX_TEXT||ht===l.ControlComponent.POSTTEXTFIX||ht===l.ControlComponent.POSTTEXTFIX_TEXT||ht===l.ControlComponent.TEXTFIXLABEL||ht===l.ControlComponent.PREFIX||ht===l.ControlComponent.POSTFIX||ht===l.ControlComponent.PRE_TEXT||ht===l.ControlComponent.POST_TEXT||ht===l.ControlComponent.PLACEHOLDER)for(let K=F+1;K<C.length;K++){const v=C[K];if(v.controlId!==ut&&v.originControlId!==ut)break;if(v.controlComponent===l.ControlComponent.VALUE&&!O(v)){U=K;break}if(v.controlComponent===l.ControlComponent.POSTTEXTFIX||v.controlComponent===l.ControlComponent.POSTFIX){for(let w=F-1;w>=0;w--){const Z=C[w];if(Z.controlId!==ut&&Z.originControlId!==ut)break;if(Z.controlComponent===l.ControlComponent.VALUE&&!O(Z)){U=w;break}}break}}else if(ht===l.ControlComponent.VALUE&&F>0){const K=C[F-1];if(K&&(K.controlId===ut||K.originControlId===ut)&&K.controlComponent===l.ControlComponent.VALUE&&O(K)){let v=!1;for(let w=F-2;w>=0;w--){const Z=C[w];if(Z.controlId!==ut&&Z.originControlId!==ut||Z.controlComponent!==l.ControlComponent.VALUE&&!Z.originControlId&&Z.controlId===ut)break;if(!O(Z)){U=w+1,v=!0;break}}if(!v)for(let w=F;w<C.length;w++){const Z=C[w];if(Z.controlId!==ut&&Z.originControlId!==ut||(Z.controlComponent===l.ControlComponent.POSTTEXTFIX||Z.controlComponent===l.ControlComponent.POSTFIX)&&!Z.originControlId&&Z.controlId===ut)break;if(!O(Z)){U=w,v=!0;break}}}}}}}}}if(~R){Q&&(U=Math.min(Math.max(U,D.startIndex),D.endIndex));let ot=U,ut=U;if(o.shiftKey){const{startIndex:ht}=i.getRange();~ht&&r.getPositionContext().tdId===d.tdId&&(F>ht?ot=ht:ut=ht)}if(Q&&(ot=Math.min(Math.max(ot,D.startIndex),D.endIndex),ut=Math.min(Math.max(ut,D.startIndex),D.endIndex),U=Math.min(Math.max(U,D.startIndex),D.endIndex)),i.setRange(ot,ut),r.setCursorPosition(S[U]),n=e.isReadonly(),Y&&!n)rs(N,e);else if(E&&!n)ls(N,e);else if(N.controlComponent===l.ControlComponent.VALUE&&(N.control?.type===l.ControlType.CHECKBOX||N.control?.type===l.ControlType.RADIO)){let ht=F;for(;ht>0;){const K=C[ht];if(K.controlComponent===l.ControlComponent.CHECKBOX){rs(K,e);break}else if(K.controlComponent===l.ControlComponent.RADIO){ls(K,e);break}ht--}}else{const ht=N?.control?.type===l.ControlType.BUTTON&&!N.control?.buttonText,K=h&&ht;let v=!1;if(y&&N?.controlId&&N?.controlComponent===l.ControlComponent.VALUE&&!N.originControlId)for(let x=F;x>=0;x--){const A=C[x];if(A.controlId!==N.controlId)break;if(A.control?.type===l.ControlType.TEXTFIELD){v=!0;break}}const w=v&&O(N),Z=X&&!w?U+1:void 0;e.render({curIndex:X&&!w?Z:U,isCompute:!1,isSubmitHistory:!1,isSetCursor:!V&&!Y&&!E&&!(K&&y)&&!w});const J=C[U];if(!n&&h&&J?.controlId&&o.button===rn.LEFT){const A=e.getControl().getActiveControl(),$=A?.getElement()?.control?.type;A&&($===l.ControlType.NUMBER||$===l.ControlType.SELECT)&&A.getElement()?.controlId===J.controlId&&J.controlComponent!==l.ControlComponent.POSTFIX&&J.controlComponent!==l.ControlComponent.POSTTEXTFIX&&J.controlComponent!==l.ControlComponent.POSTTEXTFIX_TEXT&&J.controlComponent!==l.ControlComponent.POST_TEXT&&typeof A.awake=="function"&&A.awake()}}P&&t.getDraw().getCursor().drawCursor({hitLineStartIndex:P})}const G=e.getEventBus();if(W&&G.isSubscribe("labelMousedown")&&G.emit("labelMousedown",{evt:o,element:N}),X&&(N.type===l.ElementType.MACRO||N.type===l.ElementType.CUSTOM_MACRO||N.type===l.ElementType.REUSABLE_ITEM)){const ot=e.getMode();if(ot===l.EditorMode.EDIT&&N.type===l.ElementType.CUSTOM_MACRO)G.isSubscribe("macroClick")&&G.emit("macroClick",{evt:o,element:N});else if(ot===l.EditorMode.FORM){let ut=!1;N.type===l.ElementType.CUSTOM_MACRO&&o.button===rn.LEFT&&!n&&(ut=e.getMacroParticle().activateInlineEditor(N,F)),!ut&&G.isSubscribe("macroValueChange")&&G.emit("macroValueChange",{evt:o,element:N})}}o.button===rn.LEFT&&X&&N.type===l.ElementType.SUB_TEMPLATE&&e.getMode()===l.EditorMode.FORM&&G.isSubscribe("subTemplateClick")&&G.emit("subTemplateClick",{evt:o,element:N});const H=e.getPreviewer();if(H.clearResizer(),V){const ot={dragDisable:n||!N.controlId&&e.getMode()===l.EditorMode.FORM};N.type===l.ElementType.LATEX&&(ot.mime="svg",ot.srcKey="laTexSVG"),H.drawResizer(N,S[F],ot),e.getCursor().drawCursor({isShow:!1}),ss(t),(N.imgDisplay===l.ImageDisplay.SURROUND||N.imgDisplay===l.ImageDisplay.FLOAT_TOP||N.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM)&&e.getImageParticle().createFloatImage(N),G.isSubscribe("imageMousedown")&&G.emit("imageMousedown",{evt:o,element:N})}const tt=e.getTableTool();tt.dispose(),I&&!n&&e.getMode()!==l.EditorMode.FORM&&tt.render();const st=e.getHyperlinkParticle();st.clearHyperlinkPopup(),N.type===l.ElementType.HYPERLINK&&(Te(o)?st.openHyperlink(N):st.drawHyperlinkPopup(N,S[F]));const et=e.getDateParticle();et.clearDatePicker(),N.type===l.ElementType.DATE&&!n&&et.renderDatePicker(N,S[F]);const nt=e.getMenstrualHistoryParticle();nt.clearMenstrualHistoryEditor(),N.type===l.ElementType.MENSTRUAL_HISTORY&&h&&(e.getMode()===l.EditorMode.FORM||e.getMode()===l.EditorMode.EDIT)&&nt.renderMenstrualHistoryEditor(N,S[F]);const q=e.getFetalHeartPositionParticle();q.clearFetalHeartPositionEditor(),N.type===l.ElementType.FETAL_HEART_POSITION&&h&&(e.getMode()===l.EditorMode.FORM||e.getMode()===l.EditorMode.EDIT)&&q.renderFetalHeartPositionEditor(N,S[F]);const dt=e.getToothPositionParticle();dt.clearToothPositionEditor(),N.type===l.ElementType.TOOTH_POSITION&&h&&(e.getMode()===l.EditorMode.FORM||e.getMode()===l.EditorMode.EDIT)&&dt.renderToothPositionEditor(N,S[F])}function xn(o){const t=lt();return Reflect.set(o,"dragId",t),t}function Gn(o,t){return t.findIndex(e=>e.dragId===o)}function as(o,t,e){const n=e.getDraw();if(o.imgDisplay===l.ImageDisplay.SURROUND||o.imgDisplay===l.ImageDisplay.FLOAT_TOP||o.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM){const i=t.offsetX-e.mouseDownStartPosition.x,r=t.offsetY-e.mouseDownStartPosition.y,s=o.imgFloatPosition;o.imgFloatPosition={x:s.x+i,y:s.y+r,pageNo:n.getPageNo()}}n.getImageParticle().destroyFloatImage()}function Ra(o,t){if(t.isAllowDrop){const e=t.getDraw();if(e.isReadonly()||e.isDisabled()){t.mousedown(o);return}const n=e.getPosition(),i=n.getPositionList(),r=n.getPositionContext(),s=e.getRange(),a=t.cacheRange,c=t.cacheElementList,d=t.cachePositionList,u=t.cachePositionContext,R=s.getRange(),h=a.startIndex===a.endIndex,g=h?a.startIndex-1:a.startIndex,f=a.endIndex;if(R.startIndex>=g&&R.endIndex<=f&&t.cachePositionContext?.tdId===r.tdId){e.clearSideEffect();let et=!1,nt=!1;if(h){const q=c[f];if(q.type===l.ElementType.IMAGE||q.type===l.ElementType.LATEX){if(as(q,o,t),q.imgDisplay===l.ImageDisplay.SURROUND||q.imgDisplay===l.ImageDisplay.FLOAT_TOP||q.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM)e.getPreviewer().drawResizer(q),et=!0;else{const dt=d[f];e.getPreviewer().drawResizer(q,dt)}nt=q.imgDisplay===l.ImageDisplay.SURROUND}}s.replaceRange({...a}),e.render({isCompute:nt,isSubmitHistory:et,isSetCursor:!1});return}const T=c.slice(g+1,f+1),m=T.find(et=>et.controlId);if(m){const et=c[g+1],nt=c[f];if(!((!et.controlId||et.controlComponent===l.ControlComponent.PREFIX)&&(!nt.controlId||nt.controlComponent===l.ControlComponent.POSTFIX)||et.controlId===nt.controlId&&et.controlComponent===l.ControlComponent.PREFIX&&nt.controlComponent===l.ControlComponent.POSTFIX||et.control?.type===l.ControlType.TEXT&&et.controlComponent===l.ControlComponent.VALUE&&nt.control?.type===l.ControlType.TEXT&&nt.controlComponent===l.ControlComponent.VALUE)){e.render({curIndex:R.startIndex,isCompute:!1,isSubmitHistory:!1});return}}const p=e.getControl(),I=e.getElementList(),L=!m||!!I[R.startIndex].controlId||!p.getIsElementListContainFullControl(T),P=e.getOptions(),C=T.map(et=>{if(!et.type||et.type===l.ElementType.TEXT){const nt={value:et.value},q=Re;return L||q.push(...No),q.forEach(dt=>{const ot=et[dt];ot!==void 0&&(nt[dt]=ot)}),nt}else{let nt=at(et);return L&&(nt=se(nt,No)),bt([nt],{isHandleFirstElement:!1,editorOptions:P}),nt}});wt(I,C,R.startIndex,{editorOptions:e.getOptions()});const S=c[g],F=d[g],N=xn(c[g]),V=xn(c[f]),Y=C.length;let E=R.startIndex,W=E+Y;const X=p.getActiveControl();if(X&&c[E].controlComponent!==l.ControlComponent.POSTFIX?(W=X.setValue(C),E=W-Y):e.spliceElementList(I,E+1,0,C),!~W){e.render({isSetCursor:!1});return}const O=xn(I[E]),M=xn(I[W]),b=Gn(N,c),y=Gn(V,c),D=c[y];if(D.controlId&&D.controlComponent!==l.ControlComponent.POSTFIX)s.replaceRange({...a,startIndex:b,endIndex:y}),p.getActiveControl()?.cut();else{let et=!0;if(u?.isTable){const{tableId:nt,trIndex:q,tdIndex:dt}=u;et=!e.getOriginalElementList().some(ut=>ut.id===nt&&ut?.trList?.[q]?.tdList?.[dt]?.deletable===!1)}et&&e.spliceElementList(c,b+1,y-b)}const U=I[R.startIndex],Q=i[R.startIndex];let G=r.index;G&&(U.tableId&&!S.tableId?F.index<G&&(G-=Y):!U.tableId&&S.tableId&&Q.index<G&&(G+=Y),n.setPositionContext({...r,index:G}));const H=Gn(O,I),tt=Gn(M,I);s.setRange(h?tt:H,tt,R.tableId,R.startTdIndex,R.endTdIndex,R.startTrIndex,R.endTrIndex),e.clearSideEffect();let st=null;if(h){const nt=e.getElementList()[tt];(nt.type===l.ElementType.IMAGE||nt.type===l.ElementType.LATEX)&&(as(nt,o,t),st=nt)}if(e.render({isSetCursor:!1}),X?p.emitControlContentChange():S.controlId&&p.emitControlContentChange({context:{range:a,elementList:c},controlElement:S}),st)if(st.imgDisplay===l.ImageDisplay.SURROUND||st.imgDisplay===l.ImageDisplay.FLOAT_TOP||st.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM)e.getPreviewer().drawResizer(st);else{const nt=n.getPositionList()[tt];e.getPreviewer().drawResizer(st,nt)}}else t.isAllowDrag&&t.cacheRange?.startIndex!==t.cacheRange?.endIndex&&t.mousedown(o)}function ha(o,t){const e=t.getDraw();if(!e.getOptions().pageOuterSelectionDisable)return;const n=e.getPageContainer(),{x:i,y:r,width:s,height:a}=n.getBoundingClientRect();o.x>=i&&o.x<=i+s&&o.y>=r&&o.y<=r+a||t.setIsAllowSelection(!1)}function ga(o,t){const e=t.getDraw(),n=e.getControl(),i=e.getPageList(),r=e.getPageNo(),s=i[r],c=e.getPosition().getPositionByXY({x:o.offsetX,y:o.offsetY});if(~c.index){const O=e.getElementList(),M=c.isTable?c.tdValueIndex:c.index,b=O[M];b?.control?.type===l.ControlType.BUTTON&&!b.control?.buttonText?s&&(s.style.cursor="pointer"):s&&(s.style.cursor="text")}else s&&(s.style.cursor="text");if(t.isAllowDrag){const O=o.offsetX,M=o.offsetY,{startIndex:b,endIndex:y}=t.cacheRange,D=t.cachePositionList;for(let Q=b+1;Q<=y;Q++){const{coordinate:{leftTop:G,rightBottom:H}}=D[Q];if(O>=G[0]&&O<=H[0]&&M>=G[1]&&M<=H[1])return}const U=t.cacheRange?.startIndex;if(U){const Q=t.cacheElementList[U];Q?.type===l.ElementType.IMAGE&&(Q.imgDisplay===l.ImageDisplay.SURROUND||Q.imgDisplay===l.ImageDisplay.FLOAT_TOP||Q.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM)&&(e.getPreviewer().clearResizer(),e.getImageParticle().dragFloatImage(o.movementX,o.movementY))}t.dragover(o),t.isAllowDrop=!0;return}if(!t.isAllowSelection||!t.mouseDownStartPosition)return;const u=o.target.dataset.index;u&&e.setPageNo(Number(u));const R=e.getPosition(),h=R.getPositionByXY({x:o.offsetX,y:o.offsetY});if(!~h.index)return;const{index:g,isTable:f,tdValueIndex:T,tdIndex:m,trIndex:p,tableId:I,trId:L,tdId:P}=h,{index:C,isTable:S,tdIndex:F,tdId:N,trIndex:V,tableId:Y}=t.mouseDownStartPosition,E=f?T:g,W=e.getRange();let X;if(P!==N&&P&&N){const O=e.getTdByPosition({...t.mouseDownStartPosition,isTable:!!t.mouseDownStartPosition.tableId,index:t.mouseDownStartPosition.originalIndex??t.mouseDownStartPosition.index}),M=e.getTdByPosition({...h,isTable:!!h.tableId,index:h.index});if(e.isSplitTd(O,M)){const b=(O.valueStartIndex??0)+C,y=(M.valueStartIndex??0)+T;X=[{index:b,element:O.value[C],originalId:O.originalId,isCurrent:!1,length:O.value.length,startIndex:O.valueStartIndex??0},{index:y,element:M.value[T],originalId:M.originalId,isCurrent:!0,length:M.value.length,startIndex:M.valueStartIndex??0}]}}if(f&&S&&P!==N&&!X)W.setRange(E,E,I,F,m,V,p),R.setPositionContext({isTable:!!f,index:g,trIndex:p,tdIndex:m,tdId:P,trId:L,tableId:I});else{let O=~E?E:0;if((S||f)&&Y!==I&&!X)return;R.setPositionContext({isTable:!!f,index:g,trIndex:p,tdIndex:m,tdId:P,trId:L,tableId:I});let M=C,b,y;if(X)[{element:b},{element:y}]=X;else{const Q=e.getElementList();b=Q[M+1],y=Q[O]}if(M===O||b?.controlComponent===l.ControlComponent.PLACEHOLDER&&y?.controlComponent===l.ControlComponent.PLACEHOLDER&&b.controlId===y.controlId)return;if(M>O&&([M,O]=[O,M]),e.getMode()===l.EditorMode.FORM){const Q=n.getActiveTextControlLimit();Q&&(M=Math.min(Math.max(M,Q.startIndex),Q.endIndex),O=Math.min(Math.max(O,Q.startIndex),Q.endIndex));const G=e.getElementList(),H=G[M],tt=G[O];if(H?.control?.type===l.ControlType.TEXTFIELD||tt?.control?.type===l.ControlType.TEXTFIELD){const st=H?.controlId||tt?.controlId;if(st){let et=-1,nt=-1;for(let q=M;q>=0;q--){const dt=G[q];if(dt.controlId!==st)break;if(dt.controlComponent===l.ControlComponent.PRETEXTFIX||dt.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||dt.controlComponent===l.ControlComponent.TEXTFIXLABEL||dt.controlComponent===l.ControlComponent.PREFIX||dt.controlComponent===l.ControlComponent.PRE_TEXT){et=q+1;break}}for(let q=O;q<G.length;q++){const dt=G[q];if(dt.controlId!==st)break;if(dt.controlComponent===l.ControlComponent.POSTTEXTFIX||dt.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||dt.controlComponent===l.ControlComponent.POSTFIX||dt.controlComponent===l.ControlComponent.POST_TEXT){nt=q-1;break}}et!==-1&&M<et&&(M=et),nt!==-1&&O>nt&&(O=nt)}}}let U;if(X){const[Q,G]=X.sort((H,tt)=>H.index-tt.index);U={originalId:X[0].originalId??X[1].originalId,startIndex:Q.index,endIndex:G.index},Q.isCurrent?(M=Q.index,O=Q.length-1):(M=0,O=U.endIndex-G.startIndex)}W.setRange(M,O,void 0,void 0,void 0,void 0,void 0,U)}e.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1})}function fa(o){const t=o.getDraw(),e=t.getRange(),n=e.getRange(),i=t.getElementList(),r=i[n.startIndex];if(!_t(r))return;let s=n.startIndex;for(;s>0;){const a=i[s];let c=null;a.controlId?(c=t.getControl().removeControl(s),c!==null&&(s=c)):(t.spliceElementList(i,s,1),c=s-1,s--);const d=i[c];if(!d||!_t(d)){if(c){n.startIndex=c,n.endIndex=c,e.replaceRange(n);const u=t.getPosition(),R=u.getPositionList();u.setCursorPosition(R[c])}break}}}function Ta(o,t,e){if(e.originControlId){const n=e.originControlId;for(let i=t;i<o.length;i++){const r=o[i];if(r.controlId===n)return r.controlComponent===l.ControlComponent.POSTFIX||r.controlComponent===l.ControlComponent.POSTTEXTFIX||r.controlComponent===l.ControlComponent.POST_TEXT?{isInParent:!1}:{isInParent:!0,parentControlId:n};if(r.controlId&&r.controlId!==n&&r.originControlId!==n)break}}if(!e.originControlId&&e.controlId){const n=o[t];if(n?.controlId&&n.controlId!==e.controlId&&(n.controlComponent===l.ControlComponent.PREFIX||n.controlComponent===l.ControlComponent.PRETEXTFIX))for(let i=t-1;i>=0;i--){const r=o[i];if(r.controlId===e.controlId&&(r.controlComponent===l.ControlComponent.PREFIX||r.controlComponent===l.ControlComponent.PRETEXTFIX)){for(let s=i-1;s>=0;s--){const a=o[s];if(a.controlId&&a.controlId!==e.controlId&&(a.controlComponent===l.ControlComponent.PRETEXTFIX||a.controlComponent===l.ControlComponent.PREFIX))return{isInParent:!0,parentControlId:a.controlId};if(a.controlId&&a.controlId!==e.controlId&&(a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POSTTEXTFIX))return{isInParent:!1}}break}}if(n?.controlId&&n.controlId!==e.controlId&&!n.originControlId&&(n.controlComponent===l.ControlComponent.POSTFIX||n.controlComponent===l.ControlComponent.POSTTEXTFIX))return e.originControlId===n.controlId?{isInParent:!0,parentControlId:n.controlId}:{isInParent:!1}}return{isInParent:!1}}function ma(o,t){const e=t.getDraw();if(e.isReadonly())return;const n=e.getRange();if(!n.getIsCanInput())return;n.getIsCollapsed()&&fa(t);const i=e.getControl(),{startIndex:r,endIndex:s,isCrossRowCol:a}=n.getRange();let c;const d=e.getElementList();if(n.getIsCollapsed()&&r>0){const R=d[r-1],h=d[r],f=e.getPosition().getPositionList(),T=f[r],m=f[r-1],p=T&&m&&T.rowIndex===m.rowIndex,I=R?.controlComponent===l.ControlComponent.PREFIX||R?.controlComponent===l.ControlComponent.PRETEXTFIX||R?.controlComponent===l.ControlComponent.PRE_TEXT||R?.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT,L=R?.controlComponent===l.ControlComponent.POSTFIX||R?.controlComponent===l.ControlComponent.POSTTEXTFIX||R?.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||R?.controlComponent===l.ControlComponent.POST_TEXT,P=!!R?.controlId,C=h?.controlComponent===l.ControlComponent.PLACEHOLDER,S=h?.controlComponent===l.ControlComponent.POSTFIX||h?.controlComponent===l.ControlComponent.POSTTEXTFIX||h?.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||h?.controlComponent===l.ControlComponent.POST_TEXT,F=!!h&&!h.controlId&&!h.control;if(C&&I&&P&&p)return;const{isInParent:N,parentControlId:V}=Ta(d,r,R);if(L&&P&&p&&N){if(R.originControlId&&V)for(let Y=r;Y<d.length;Y++){const E=d[Y];if(E.controlId===V&&!E.originControlId){if(E.controlComponent===l.ControlComponent.VALUE){n.setRange(Y,Y),e.render({curIndex:Y,isSubmitHistory:!1});return}if(E.controlComponent===l.ControlComponent.POSTFIX||E.controlComponent===l.ControlComponent.POSTTEXTFIX||E.controlComponent===l.ControlComponent.POST_TEXT)return}E.controlId!==V&&E.originControlId}return}if(L&&P&&p&&!N&&!(F&&!C&&!S)){const Y=r-1;c=i.removeControl(Y),e.getGlobalEvent().setCanvasEventAbility(),c===null?(n.setRange(Y,Y),e.render({curIndex:Y,isSubmitHistory:!1})):(n.setRange(c,c),e.render({curIndex:c}));return}if(S&&h?.controlId&&p){const Y=r;c=i.removeControl(Y),e.getGlobalEvent().setCanvasEventAbility(),c===null?(n.setRange(Y,Y),e.render({curIndex:Y,isSubmitHistory:!1})):(n.setRange(c,c),e.render({curIndex:c}));return}}if(a){const R=e.getTableParticle().getRangeRowCol();if(!R)return;let h=!1;for(let g=0;g<R.length;g++){const f=R[g];for(let T=0;T<f.length;T++){const m=f[T];m.value.length>1&&(e.spliceElementList(m.value,1,m.value.length-1),h=!0)}}c=h?0:null}else if(i.getActiveControl()&&i.getIsRangeCanCaptureEvent())c=i.keydown(o),c&&i.emitControlContentChange();else{const R=e.getPosition().getCursorPosition();if(!R)return;const{index:h}=R,g=n.getIsCollapsed(),f=e.getElementList();if(g&&h===0){const I=f[h];if(I.value===_){I.listId&&e.getListParticle().unsetList(),o.preventDefault();return}}const T=f[r];if(g&&T.rowFlex&&T.value===_){const I=n.getRangeRowElementList();if(I){const L=f[r-1];I.forEach(P=>{P.rowFlex=L?.rowFlex})}}const m=T.value===_?f[r-1]:T,p=f[s+1];if(m?.titleId&&p?.titleId&&m.level===p.level&&m.titleId!==p.titleId){const I=m.titleId,L=p.titleId;let P=s+1;for(;P<f.length&&f[P]?.titleId===L;)f[P].titleId=I,P++}g?e.spliceElementList(f,h,1):e.spliceElementList(f,r+1,s-r),c=g?h-1:r}e.getGlobalEvent().setCanvasEventAbility(),c===null?(n.setRange(r,r),e.render({curIndex:r,isSubmitHistory:!1})):(n.setRange(c,c),e.render({curIndex:c}))}function pa(o){const t=o.getDraw(),n=t.getRange().getRange(),i=t.getElementList(),r=i[n.startIndex+1];if(!_t(r))return;const s=n.startIndex+1;for(;s<i.length;){const a=i[s];let c=null;a.controlId?c=t.getControl().removeControl(s):(t.spliceElementList(i,s,1),c=s);const d=i[c];if(!d||!_t(d))break}}function La(o,t){const e=t.getDraw();if(e.isReadonly())return;const n=e.getRange();if(!n.getIsCanInput())return;const{startIndex:i,endIndex:r,isCrossRowCol:s,splitTdRange:a}=n.getRange(),c=e.getElementList(),d=e.getControl();n.getIsCollapsed()&&pa(t);let u;if(s){const R=e.getTableParticle().getRangeRowCol();if(!R)return;let h=!1;for(let g=0;g<R.length;g++){const f=R[g];for(let T=0;T<f.length;T++){const m=f[T];m.value.length>1&&(e.spliceElementList(m.value,1,m.value.length-1),h=!0)}}u=h?0:null}else if(d.getActiveControl()&&d.getIsRangeWithinControl())u=d.keydown(o),u&&d.emitControlContentChange();else if(c[r+1]?.controlId)u=d.removeControl(r+1);else{e.removeSplitTdOtherRangeElements();const R=e.getPosition(),h=R.getCursorPosition();if(!h)return;const{index:g}=h,f=R.getPositionContext();if(f.isDirectHit&&f.isImage)e.spliceElementList(c,g,1),u=g-1;else{const T=n.getIsCollapsed();if(!T)e.spliceElementList(c,i+1,r-i);else if(c[g+1])e.spliceElementList(c,g+1,1);else{let m=!0;if(f.isTable){const p=e.getTd();if(p?.linkTdNextId){const I=e.getTdById(p.linkTdNextId);I&&(m=!1,e.spliceElementList(I.value,1,1))}}if(m)return}u=T?g:i,u===0&&a&&(u=e.fixPosition(!0)??u)}}e.getGlobalEvent().setCanvasEventAbility(),u===null?(n.setRange(i,i),e.render({curIndex:i,isSubmitHistory:!1})):(n.setRange(u,u),e.render({curIndex:u}))}function Ia(o,t){const e=t.getDraw();if(e.isReadonly())return;const n=e.getRange();if(!n.getIsCanInput())return;const{startIndex:i,endIndex:r}=n.getRange(),s=n.getIsCollapsed(),a=e.getElementList(),c=a[i],d=a[r];if(s&&d.listId&&d.value===_&&a[r+1]?.listId!==d.listId){e.getListParticle().unsetList();return}let u={value:_};if(o.shiftKey&&c.listId&&(u.listWrap=!0),wt(a,[u],i,{isBreakWhenWrap:!0,editorOptions:e.getOptions()}),o.shiftKey&&d.areaId&&d.areaId!==a[r+1]?.areaId&&(u=se(u,He)),!(a[i+1]?.titleId&&(!c.titleId||c.titleId!==a[i+1]?.titleId))&&!(d.titleId&&d.titleId!==a[r+1]?.titleId)){const m=n.getRangeAnchorStyle(a,r);if(m){const p=[...$t],I=m.controlComponent===l.ControlComponent.POSTFIX||m.controlComponent===l.ControlComponent.POSTTEXTFIX||m.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||m.controlComponent===l.ControlComponent.POST_TEXT,L=m.control?.type===l.ControlType.BUTTON&&!m.control?.buttonText;!I&&!L&&p.push(...Re),p.forEach(P=>{const C=m[P];C!==void 0&&(u[P]=C)})}}const R=e.getControl(),h=R.getActiveControl();let g;const f=h?.getElement();if(f?.control?.type===l.ControlType.BUTTON&&!f.control?.buttonText&&f?.controlId){const m=f.controlId;let p=r;for(;p+1<a.length&&a[p+1]?.controlId===m;)p++;e.spliceElementList(a,p+1,0,[u]),g=p+1}else if(h&&R.getIsRangeWithinControl())g=R.setValue([u]),R.emitControlContentChange();else{const p=e.getPosition().getCursorPosition();if(!p)return;const{index:I}=p;if(s){if(e.spliceElementList(a,I+1,0,[u]),d.titleId&&a[I+2]?.titleId===d.titleId){const L=lt();let P=I+2;for(;P<a.length&&a[P]?.titleId===d.titleId;)a[P].titleId=L,P++}}else e.spliceElementList(a,i+1,r-i,[u]);g=I+1}~g&&(n.setRange(g,g),e.render({curIndex:g})),o.preventDefault()}function cs(o){return o&&(o.type===l.ElementType.MACRO||o.type===l.ElementType.CUSTOM_MACRO||o.type===l.ElementType.REUSABLE_ITEM||o.type===l.ElementType.SUB_TEMPLATE||o.type===l.ElementType.MENSTRUAL_HISTORY||o.type===l.ElementType.FETAL_HEART_POSITION||o.type===l.ElementType.TOOTH_POSITION||o.type===l.ElementType.LIST||o.type===l.ElementType.SPECIAL_SYMBOLS)}function Pa(o,t){const e=t.getDraw();if(e.isReadonly())return;const i=e.getPosition(),r=i.getCursorPosition();if(!r)return;const s=i.getPositionContext(),{index:a}=r;if(a<=0&&!s.isTable)return;const c=e.getRange(),{startIndex:d,endIndex:u}=c.getRange(),R=c.getIsCollapsed(),h=e.getElementList(),g=e.getControl(),f=e.getMode()===l.EditorMode.FORM,T=f?g.getActiveTextControlLimit():null,m=h[a],p=m?.controlComponent===l.ControlComponent.PREFIX||m?.controlComponent===l.ControlComponent.PRETEXTFIX||m?.controlComponent===l.ControlComponent.PRE_TEXT;let I=!1;if(p&&m?.originControlId){const V=m.originControlId;for(let Y=a-1;Y>=0;Y--){const E=h[Y];if(E.controlId===V&&!E.originControlId){I=!0;break}if(E.controlId&&E.controlId!==V&&E.originControlId!==V)break}}if(f&&g.getActiveControl()&&p&&!T&&!I){g.initNextControl({direction:Ut.UP});return}let L=1;if(Te(o)){const V=e.getLetterReg(),Y=o.shiftKey&&!R&&d===r?.index?u:d;if(V.test(h[Y]?.value)){let E=Y-1;for(;E>0;){const W=h[E];if(!V.test(W.value))break;L++,E--}}}if(f){const V=h[d],Y=V?.controlId;if(Y&&V?.controlComponent===l.ControlComponent.VALUE){let E=!1;for(let W=d;W>=0;W--){const X=h[W];if(X.controlId!==Y)break;if(X.control?.type===l.ControlType.TEXTFIELD){E=!0;break}}if(E){if(V.controlComponent===l.ControlComponent.VALUE&&cs(V))return;const W=d-L;if(W>=0){const X=h[W];if(X&&X.controlId===Y&&X.controlComponent===l.ControlComponent.VALUE&&cs(X))return}}}}const P=T?Math.max(d-L,T.startIndex):d-L;let C=P,S=P;if(o.shiftKey&&r&&(d!==u?d===r.index?(C=d,S=u-L):(C=P,S=u):S=u),!o.shiftKey){const V=h[d];if(V.type===l.ElementType.TABLE){const Y=V.trList,E=Y.length-1,W=Y[E],X=W.tdList.length-1,O=W.tdList[X];i.setPositionContext({isTable:!0,index:d,trIndex:E,tdIndex:X,tdId:O.id,trId:W.id,tableId:V.id}),C=O.value.length-1,S=C}else if(V.tableId&&d===0){const E=e.getOriginalElementList()[s.index],W=e.getTd();if(W?.linkTdPrevId){const X=e.getTdById(W.linkTdPrevId);X&&(i.setPositionContext({...s,isTable:!0,index:X.tableIndex,trIndex:X.trIndex,tdId:X.id,trId:X.trId,tableId:X.tableId}),C=X.value.length-1,S=C)}else{const X=E.trList;t:for(let O=0;O<X.length;O++){const M=X[O];if(M.id!==V.trId)continue;const b=M.tdList;for(let y=0;y<b.length;y++)if(b[y].id===V.tdId){if(O===0&&y===0)i.setPositionContext({isTable:!1}),C=s.index-1,S=C,e.getTableTool().dispose();else{let U=O,Q=y-1;Q<0&&(U=O-1,Q=X[U].tdList.length-1);const G=X[U],H=G.tdList[Q];i.setPositionContext({isTable:!0,index:s.index,trIndex:U,tdIndex:Q,tdId:H.id,trId:G.id,tableId:V.tableId}),C=H.value.length-1,S=C}break t}}}}}if(!~C||!~S)return;const F=e.getElementList();C=sn(F,C),S=sn(F,S),c.setRange(C,S);const N=C===S;e.updateTableTool(),e.render({curIndex:N?C:void 0,isSetCursor:N,isSubmitHistory:!1,isCompute:!1}),o.preventDefault()}function ds(o){return o&&(o.type===l.ElementType.MACRO||o.type===l.ElementType.CUSTOM_MACRO||o.type===l.ElementType.REUSABLE_ITEM||o.type===l.ElementType.SUB_TEMPLATE||o.type===l.ElementType.MENSTRUAL_HISTORY||o.type===l.ElementType.FETAL_HEART_POSITION||o.type===l.ElementType.TOOTH_POSITION||o.type===l.ElementType.LIST||o.type===l.ElementType.SPECIAL_SYMBOLS)}function Ma(o,t){const e=t.getDraw();if(e.isReadonly())return;const i=e.getPosition(),r=i.getCursorPosition();if(!r)return;const{index:s}=r,a=i.getPositionList(),c=i.getPositionContext();if(s>a.length-1&&!c.isTable)return;const d=e.getRange(),{startIndex:u,endIndex:R}=d.getRange(),h=d.getIsCollapsed();let g=e.getElementList();const f=e.getControl(),T=e.getMode()===l.EditorMode.FORM,m=T?f.getActiveTextControlLimit():null,p=g[s],I=p?.controlComponent===l.ControlComponent.POSTFIX||p?.controlComponent===l.ControlComponent.POSTTEXTFIX||p?.controlComponent===l.ControlComponent.POST_TEXT;let L=!1;if(I&&p?.originControlId){const E=p.originControlId;for(let W=s+1;W<g.length;W++){const X=g[W];if(X.controlId===E&&!X.originControlId){L=!0;break}if(X.controlId&&X.controlId!==E&&X.originControlId!==E)break}}if(T&&f.getActiveControl()&&I&&!m&&!L){f.initNextControl({direction:Ut.DOWN});return}let P=1;if(Te(o)){const E=e.getLetterReg(),W=o.shiftKey&&!h&&u===r?.index?R:u;if(E.test(g[W+1]?.value)){let X=W+2;for(;X<g.length;){const O=g[X];if(!E.test(O.value))break;P++,X++}}}if(T){const E=g[R],W=E?.controlId;if(W&&E?.controlComponent===l.ControlComponent.VALUE){let X=!1;for(let O=R;O>=0;O--){const M=g[O];if(M.controlId!==W)break;if(M.control?.type===l.ControlType.TEXTFIELD){X=!0;break}}if(X){if(E.controlComponent===l.ControlComponent.VALUE&&ds(E))return;const O=R+P;if(O<g.length){const M=g[O];if(M&&M.controlId===W&&M.controlComponent===l.ControlComponent.VALUE&&ds(M))return}}}}const C=m?Math.min(R+P,m.endIndex):R+P;let S=C,F=C;if(o.shiftKey&&r&&(u!==R?u===r.index?(S=u,F=C):(S=u+P,F=R):S=u),!o.shiftKey){const E=g[R],W=g[R+1];if(W?.type===l.ElementType.TABLE){const O=W.trList[0],M=O.tdList[0];i.setPositionContext({isTable:!0,index:R+1,trIndex:0,tdIndex:0,tdId:M.id,trId:O.id,tableId:W.id}),S=0,F=0}else if(E.tableId&&!W){const X=e.getTd(),O=X?.linkTdNextId?e.getTdById(X.linkTdNextId):void 0;if(O?.value.length)i.setPositionContext({...c,isTable:!0,index:O.tableIndex,trIndex:O.trIndex,tdId:O.id,trId:O.trId,tableId:O.tableId}),S=0,F=S;else{const b=e.getOriginalElementList()[c.index].trList;t:for(let y=0;y<b.length;y++){const D=b[y];if(D.id!==E.trId)continue;const U=D.tdList;for(let Q=0;Q<U.length;Q++)if(U[Q].id===E.tdId){if(y===b.length-1&&Q===U.length-1)i.setPositionContext({isTable:!1}),S=c.index,F=S,g=e.getElementList(),e.getTableTool().dispose();else{let H=y,tt=Q+1;tt>U.length-1&&(H=y+1,tt=0);const st=b[H],et=st.tdList[tt];i.setPositionContext({isTable:!0,index:c.index,trIndex:H,tdIndex:tt,tdId:et.id,trId:st.id,tableId:E.tableId}),S=0,F=S}break t}}}}}const N=g.length-1;if(S>N||F>N)return;const V=e.getElementList();S=sn(V,S,l.LocationPosition.AFTER),F=sn(V,F,l.LocationPosition.AFTER),d.setRange(S,F);const Y=S===F;e.updateTableTool(),e.render({curIndex:Y?S:void 0,isSetCursor:Y,isSubmitHistory:!1,isCompute:!1}),o.preventDefault()}function Oa(o,t){const e=t.getDraw();if(e.isReadonly())return;const i=e.getMode()===l.EditorMode.FORM,r=e.getControl(),s=r.getActiveControl();if(i&&s&&r.getIsRangeWithinControl())o.preventDefault(),r.initNextControl({direction:o.shiftKey?Ut.UP:Ut.DOWN});else{o.preventDefault();const a=e.getRange(),c=e.getElementList(),{startIndex:d,endIndex:u}=a.getRange(),R=a.getRangeAnchorStyle(c,u),g={...R?Dt(R,Re):null,type:l.ElementType.TAB,value:""};wt(c,[g],d,{editorOptions:e.getOptions()}),e.insertElementList([g])}}function Ho(o){const{positionList:t,index:e,isUp:n,rowNo:i,cursorX:r}=o;let s=-1;const a=[];if(n){let c=e-1;for(;c>=0;){const d=t[c];if(c--,d.rowNo!==i){if(a[0]&&a[0].rowNo!==d.rowNo)break;a.unshift(d)}}}else{let c=e+1;for(;c<t.length;){const d=t[c];if(c++,d.rowNo!==i){if(a[0]&&a[0].rowNo!==d.rowNo)break;a.push(d)}}}for(let c=0;c<a.length;c++){const d=a[c],{coordinate:{leftTop:[u],rightTop:[R]}}=d;if(c===a.length-1&&(s=d.index),!(r<u||r>R)){s=d.index;break}}return s}function Ca(o,t){const e=t.getDraw();if(e.isReadonly())return;const i=e.getPosition(),r=i.getCursorPosition();if(!r)return;const s=e.getRange(),{startIndex:a,endIndex:c}=s.getRange();let d=i.getPositionList();const u=o.key===l.KeyMap.Up;let R=-1,h=-1;const g=i.getPositionContext();if(!o.shiftKey&&g.isTable&&(u&&r.rowIndex===0||!u&&r.rowIndex===e.getRowCount()-1)){const{index:T,trIndex:m,tdIndex:p,tableId:I}=g;if(u){const L=e.getOriginalElementList();if(m===0)if(L[T].originalId){const C=T-1,S=L[C];for(let F=S.trList.length-1;F>=0;F--){const N=S.trList[F].tdList.find(V=>V.tdIndex===p);if(N?.value.length){i.setPositionContext({isTable:!0,tableId:S.id,index:C,trIndex:F,tdIndex:p}),R=N.value.length-1,h=N.value.length-1;break}}}else i.setPositionContext({isTable:!1}),R=T-1,h=R,e.getTableTool().dispose();else{let P=-1,C=-1;const S=L[T].trList,F=S[m].tdList[p].colIndex;t:for(let Y=m-1;Y>=0;Y--){const W=S[Y].tdList;for(let X=0;X<W.length;X++){const O=W[X];if(O.colIndex===F||O.colIndex+O.colspan-1>=F&&O.colIndex<=F){P=Y,C=X;break t}}}if(!~P||!~C)return;const N=S[P],V=N.tdList[C];i.setPositionContext({isTable:!0,index:T,trIndex:P,tdIndex:C,tdId:V.id,trId:N.id,tableId:I}),R=V.value.length-1,h=R}}else{const L=e.getOriginalElementList(),P=L[T],C=P.trList;if(m===C.length-1){const S=T+1,F=L[S];if(F&&[P.id,P.originalId].includes(F.originalId)){for(let V=p;V>=0;V--)if(F.trList[0].tdList[V].value.length){i.setPositionContext({isTable:!0,index:S,tableId:F.id,trIndex:0,tdIndex:V}),R=0,h=0;break}}else i.setPositionContext({isTable:!1}),R=T,h=R,e.getTableTool().dispose()}else{let S=-1,F=-1;const N=C[m].tdList[p].colIndex;t:for(let E=m+1;E<C.length;E++){const X=C[E].tdList;for(let O=0;O<X.length;O++){const M=X[O];if(M.colIndex===N||M.colIndex+M.colspan-1>=N&&M.colIndex<=N){S=E,F=O;break t}}}if(!~S||!~F)return;const V=C[S],Y=V.tdList[F];i.setPositionContext({isTable:!0,index:T,trIndex:S,tdIndex:F,tdId:Y.id,trId:V.id,tableId:I}),R=Y.value.length-1,h=R}}}else{let T=r;o.shiftKey&&(a===r.index?T=d[c]:T=d[a]);const{index:m,rowNo:p,rowIndex:I,coordinate:{rightTop:[L]}}=T;if(u&&I===0||!u&&I===e.getRowCount()-1)return;const P=Ho({positionList:d,index:m,rowNo:p,isUp:u,cursorX:L});if(P<0)return;R=P,h=P,o.shiftKey&&(a!==c?a===r.index?R=a:h=c:u?h=c:R=a);const S=e.getElementList()[P];if(S.type===l.ElementType.TABLE){const{scale:F}=e.getOptions(),N=e.getMargins(),V=S.trList;let Y=-1,E=-1,W=-1;if(u)t:for(let X=V.length-1;X>=0;X--){const M=V[X].tdList;for(let b=0;b<M.length;b++){const y=M[b],D=y.x*F+N[3],U=y.width*F;if(L>=D&&L<=D+U){const Q=y.positionList,G=Q[Q.length-1],H=Ho({positionList:Q,index:G.index+1,rowNo:G.rowNo-1,isUp:u,cursorX:L})||G.index;Y=X,E=b,W=H;break t}}}else t:for(let X=0;X<V.length;X++){const M=V[X].tdList;for(let b=0;b<M.length;b++){const y=M[b],D=y.x*F+N[3],U=y.width*F;if(L>=D&&L<=D+U){const Q=y.positionList,G=Ho({positionList:Q,index:-1,rowNo:-1,isUp:u,cursorX:L})||0;Y=X,E=b,W=G;break t}}}if(~Y&&~E&&~W){const X=V[Y],O=X.tdList[E];i.setPositionContext({isTable:!0,index:P,trIndex:Y,tdIndex:E,tdId:O.id,trId:X.id,tableId:S.id}),R=W,h=R,d=i.getPositionList()}}}if(!~R||!~h)return;R>h&&([R,h]=[h,R]),s.setRange(R,h);const f=R===h;e.render({curIndex:f?R:void 0,isSetCursor:f,isSubmitHistory:!1,isCompute:!1}),f||(e.getCursor().moveCursorToVisible({cursorPosition:d[u?R:h],direction:u?Ut.UP:Ut.DOWN}),e.updateTableTool())}function Sa(o,t){if(t.isComposing)return;const e=t.getDraw();if(o.key===l.KeyMap.Backspace)ma(o,t);else if(o.key===l.KeyMap.Delete)La(o,t);else if(o.key===l.KeyMap.Enter)Ia(o,t);else if(o.key===l.KeyMap.Left)Pa(o,t);else if(o.key===l.KeyMap.Right)Ma(o,t);else if(o.key===l.KeyMap.Up||o.key===l.KeyMap.Down)Ca(o,t);else if(Te(o)&&o.key.toLocaleLowerCase()===l.KeyMap.Z){if(e.isReadonly()&&e.getMode()!==l.EditorMode.FORM)return;e.getHistoryManager().undo(),o.preventDefault()}else if(Te(o)&&o.key.toLocaleLowerCase()===l.KeyMap.Y){if(e.isReadonly()&&e.getMode()!==l.EditorMode.FORM)return;e.getHistoryManager().redo(),o.preventDefault()}else if(Te(o)&&o.key.toLocaleLowerCase()===l.KeyMap.C)t.copy(),o.preventDefault();else if(Te(o)&&o.key.toLocaleLowerCase()===l.KeyMap.X)t.cut(),o.preventDefault();else if(Te(o)&&o.key.toLocaleLowerCase()===l.KeyMap.A)t.selectAll(),o.preventDefault();else if(Te(o)&&o.key.toLocaleLowerCase()===l.KeyMap.S){if(e.isReadonly())return;const n=e.getListener();n.saved&&n.saved(e.getValue());const i=e.getEventBus();i.isSubscribe("saved")&&i.emit("saved",e.getValue()),o.preventDefault()}else if(o.key===l.KeyMap.ESC){t.clearPainterStyle();const n=e.getZone();n.isMainActive()||n.setZone(l.EditorZone.MAIN),o.preventDefault()}else o.key===l.KeyMap.TAB&&Oa(o,t)}function Ea(o){return/[\u4e00-\u9fa5\u3000-\u303f\uff00-\uffef]/.test(o)}function Xa(o){return/[a-zA-Z]/.test(o)}function Na(o,t){return Ea(o)?t:Xa(o)?"Times New Roman":t}function Fa(o){return o?.type===l.ElementType.CONTROL&&(o.controlComponent===l.ControlComponent.PREFIX||o.controlComponent===l.ControlComponent.PRE_TEXT||o.controlComponent===l.ControlComponent.PRETEXTFIX||o.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)}function ya(o){return o?.type===l.ElementType.CONTROL&&(o.controlComponent===l.ControlComponent.POSTFIX||o.controlComponent===l.ControlComponent.POST_TEXT||o.controlComponent===l.ControlComponent.POSTTEXTFIX||o.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)}function _o(o,t,e="input"){const n=Vt(),i=t.getDraw(),r=i.getControl(),s=i.getOptions(),a=i.getElementList(),u=i.getPosition().getCursorPosition()?.index;if(i.isReadonly()||i.isDisabled())return;const h=i.getPosition().getCursorPosition();if(!o||!h)return;const g=t.isComposing;if(g&&t.compositionInfo?.value===o)return;const f=i.getRange();if(!f.getIsCanInput())return;const{endIndex:T}=f.getRange(),m=i.getElementList(),p=m[T],I=m[T+1];if(p?.type===l.ElementType.SUB_TEMPLATE&&I?.type===l.ElementType.SUB_TEMPLATE)return;if(i.getMode()===l.EditorMode.FORM){const K=r.getActiveTextControlLimit();if(!r.getActiveControl()||!r.getIsRangeWithinControl()&&!r.getIsRangeInPostfix())return;if(K){const x=f.getRange();if(x.startIndex<K.startIndex||x.endIndex>K.endIndex){const A=Math.min(Math.max(x.endIndex,K.startIndex),K.endIndex);f.setRange(A,A),i.render({curIndex:A,isSubmitHistory:!1});return}}const{endIndex:w}=f.getRange(),Z=i.getElementList(),J=Z[w];if(!J?.originControlId){if(J?.controlId&&J?.controlComponent===l.ControlComponent.VALUE)for(let x=w;x>=0;x--){const A=Z[x];if(A.controlId!==J.controlId||A.originControlId)break;if(A.control?.type===l.ControlType.TEXTFIELD)return}}}const P=f.getDefaultStyle()||t.compositionInfo?.defaultStyle||null,C=t.compositionInfo?.perfStartTime,S=Wa(t,i.getElementList());g||i.getCursor().clearAgentDomValue();const{TEXT:F,HYPERLINK:N,SUBSCRIPT:V,SUPERSCRIPT:Y,DATE:E,TAB:W}=l.ElementType,X=o.replaceAll(`
|
|
101
|
-
`,_),{startIndex:O,endIndex:M}=f.getRange(),b=f.getRangeAnchorStyle(S,O);if(!b)return;const y=O>0?S[O-1]:null,D=!!(b.controlId||b.control),Q={...!D&&y?y:b,...P},G=i.isDesignMode(),H=S[M+1],tt=Fa(H)&&!H?.originControlId,st=ya(b)&&!b.originControlId||b.type===l.ElementType.CONTROL&&b.controlComponent===l.ControlComponent.VALUE&&H?.type!==l.ElementType.CONTROL&&!b.originControlId,et=tt||st,nt=et?{...b,type:void 0,control:void 0,controlId:void 0,controlComponent:void 0,originControlId:void 0,color:s.defaultColor,highlight:void 0}:b,q=et||D?nt:Q,dt=ct(X).map(K=>{const v={value:K};if(G||!q.title?.disabled&&!q.control?.disabled){const w=S[M+1];(!q.type||q.type===F||q.type===N&&w?.type===N||q.type===E&&w?.type===E||q.type===V&&w?.type===V||q.type===Y&&w?.type===Y)&&rl.forEach(Z=>{if(Z==="groupIds"&&!w?.groupIds)return;const J=q[Z];J!==void 0&&(v[Z]=J)}),(P||q.type===W)&&Re.forEach(Z=>{const J=P?.[Z]||q[Z];J!==void 0&&(v[Z]=J)}),g&&(v.underline=!0)}if(!et){const w=b.originControlId&&(b.controlComponent===l.ControlComponent.POSTFIX||b.controlComponent===l.ControlComponent.POSTTEXTFIX||b.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||b.controlComponent===l.ControlComponent.POST_TEXT),Z=!b.originControlId&&b.controlId&&(b.controlComponent===l.ControlComponent.POSTFIX||b.controlComponent===l.ControlComponent.POSTTEXTFIX||b.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||b.controlComponent===l.ControlComponent.POST_TEXT)&&H?.controlId&&H.controlId!==b.controlId,J=b.controlId&&b.originControlId&&(b.controlComponent===l.ControlComponent.VALUE||b.controlComponent===l.ControlComponent.PLACEHOLDER);if(w&&!v.controlId){const x=b.originControlId;let A=null;for(let $=O;$>=0;$--){const B=S[$];if(B.controlId===x&&!B.originControlId&&B.control){A=B.control;break}}v.controlId=x,v.controlComponent=l.ControlComponent.VALUE,A&&(v.control=A)}else if(Z&&!v.controlId){if(H?.controlId&&H.controlId!==b.controlId)if(H.controlComponent===l.ControlComponent.PREFIX||H.controlComponent===l.ControlComponent.PRETEXTFIX)for(let x=O;x>=0;x--){const A=S[x];if(A.controlId===b.controlId&&(A.controlComponent===l.ControlComponent.PREFIX||A.controlComponent===l.ControlComponent.PRETEXTFIX)){for(let $=x-1;$>=0;$--){const B=S[$];if(B.controlId&&B.controlId!==b.controlId&&(B.controlComponent===l.ControlComponent.PRETEXTFIX||B.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||B.controlComponent===l.ControlComponent.PREFIX||B.controlComponent===l.ControlComponent.PRE_TEXT)){v.controlId=B.controlId,v.controlComponent=l.ControlComponent.VALUE,B.control&&(v.control=B.control);break}if(B.controlId&&B.controlId!==b.controlId&&(B.controlComponent===l.ControlComponent.POSTFIX||B.controlComponent===l.ControlComponent.POSTTEXTFIX))break}break}}else(H.controlComponent===l.ControlComponent.POSTFIX||H.controlComponent===l.ControlComponent.POSTTEXTFIX)&&(v.controlId=H.controlId,v.controlComponent=l.ControlComponent.VALUE,H.control&&(v.control=H.control));if(!v.controlId)for(let x=O;x>=0;x--){const A=S[x];if(A.controlId===b.controlId&&(A.controlComponent===l.ControlComponent.PREFIX||A.controlComponent===l.ControlComponent.PRETEXTFIX)){for(let $=x-1;$>=0;$--){const B=S[$];if(B.controlId&&B.controlId!==b.controlId&&(B.controlComponent===l.ControlComponent.PRETEXTFIX||B.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||B.controlComponent===l.ControlComponent.PREFIX||B.controlComponent===l.ControlComponent.PRE_TEXT)){v.controlId=B.controlId,v.controlComponent=l.ControlComponent.VALUE,B.control&&(v.control=B.control);break}if(B.controlId&&B.controlId!==b.controlId&&(B.controlComponent===l.ControlComponent.POSTFIX||B.controlComponent===l.ControlComponent.POSTTEXTFIX))break}break}}}else if(J&&!v.controlId){const x=b.controlId;let A=b.control;if(!A)for(let $=O;$>=0;$--){const B=S[$];if(B.controlId===x&&B.control&&(A=B.control,B.controlComponent===l.ControlComponent.PREFIX||B.controlComponent===l.ControlComponent.PRETEXTFIX))break}v.controlId=x,v.originControlId=b.originControlId,v.controlComponent=l.ControlComponent.VALUE,A&&(v.control=A)}else if(b.controlId&&!b.originControlId){let x=b.control;if(!x)for(let A=O;A>=0;A--){const $=S[A];if($.controlId===b.controlId&&!$.originControlId&&$.control){x=$.control;break}}v.controlId||(v.controlId=b.controlId),x&&!v.control&&(v.control=x),v.controlComponent||(v.controlComponent=l.ControlComponent.VALUE)}else if(!v.controlId&&!v.control&&H?.originControlId&&(H.controlComponent===l.ControlComponent.PREFIX||H.controlComponent===l.ControlComponent.PRETEXTFIX)){const x=H.originControlId;let A=null;for(let $=M;$>=0;$--){const B=S[$];if(B.controlId===x&&!B.originControlId&&B.control){A=B.control;break}}v.controlId=x,v.controlComponent=l.ControlComponent.VALUE,A&&(v.control=A)}}if(K&&K!==_){const w=Na(K,s.defaultFont);v.font=w}return v});let ot;const ut=a[u],ht=a[u+1];if(g)ot=O;else{const K=w=>{if(dt?.length)for(let Z=0;Z<dt.length;Z++)S.splice(w+Z,0,dt[Z]);return O+dt.length},v=O+1;if(O!==M&&(i.removeSplitTdOtherRangeElements(),i.spliceElementList(S,v,M-O)),et)ot=K(v);else if(ut?.originControlId&&(ut?.controlComponent==="postfix"||ut?.controlComponent==="postTextFix"))ot=K(v);else if((ut?.control?.type===l.ControlType.NUMBER||ht?.control?.type===l.ControlType.NUMBER)&&r.getActiveControl()?.getElement()?.control?.type===l.ControlType.NUMBER&&r.getIsRangeWithinControl()){const w=r.getActiveControl();w&&typeof w.awake=="function"&&w.awake(),ot=O}else if((ut?.control?.type===l.ControlType.SELECT||ht?.control?.type===l.ControlType.SELECT)&&r.getActiveControl()?.getElement()?.control?.type===l.ControlType.SELECT&&r.getIsRangeWithinControl()){const w=r.getActiveControl();w&&typeof w.awake=="function"&&w.awake(),ot=O}else ut?.control?.type==="button"||ht?.control?.type==="button"?(ut?.control||ht?.control)?.buttonText?ot=O:r.getActiveControl()&&r.getIsRangeWithinControl()?(r.removePlaceholder(O,{elementList:S}),ot=r.setValue(dt),r.emitControlContentChange()):ot=O:r.getActiveControl()&&r.getIsRangeWithinControl()?(r.removePlaceholder(O,{elementList:S}),ot=r.setValue(dt),r.emitControlContentChange()):(ut?.type==="control"||ht?.type==="control")&&!et?ot=K(v):(wt(S,dt,O,{editorOptions:s}),i.spliceElementList(S,v,0,dt),ot=O+dt.length)}if(~ot&&!g){const K=Vt()-n,v=Vt();f.setRange(ot,ot),i.render({curIndex:ot,isSubmitHistory:!g,traceLabel:`input:${e}`}),So(s,`input:${e}`,Vt()-n,[{label:"mutate",duration:K},{label:"renderCall",duration:Vt()-v}],{isComposing:g,textLength:dt.length,compositionChainDuration:e==="compositionend"&&C!==void 0?Number((Vt()-C).toFixed(2)):void 0})}g&&(t.compositionInfo={value:X,startIndex:ot,endIndex:M,defaultStyle:P,perfStartTime:n})}function ba(o){o.compositionInfo&&(o.compositionInfo=null)}function Wa(o,t){if(!o.compositionInfo||o.isComposing)return t;const{startIndex:e,endIndex:n}=o.compositionInfo;return e!==n&&(o.getDraw().removeSplitTdOtherRangeElements(),o.getDraw().spliceElementList(t,e+1,n-e),o.getDraw().getRange().setRange(e,e)),o.compositionInfo=null,t}async function Va(o){const t=o.getDraw(),e=t.getRange(),{startIndex:n,endIndex:i}=e.getRange();if(!~n&&!~n||t.isReadonly()||!e.getIsCanInput())return;const r=t.getElementList();let s=n,a=i;if(n===i){const h=t.getPosition().getPositionList(),g=h[n],f=g.rowNo,T=g.pageNo,m=[];for(let I=0;I<h.length;I++){const L=h[I];if(L.pageNo>T)break;L.pageNo===T&&L.rowNo===f&&m.push(I)}const p=m[0]-1;s=p<0?0:p,a=m[m.length-1]}const c=t.getOptions();await os(r.slice(s+1,a+1),c);const d=t.getControl();let u;d.getActiveControl()&&d.getIsRangeWithinControl()?(u=d.cut(),d.emitControlContentChange()):(t.spliceElementList(r,s+1,a-s),u=s),e.setRange(u,u),t.render({curIndex:u})}async function Ya(o,t){const e=o.getDraw(),{copy:n}=e.getOverride();if(n&&n()?.preventDefault!==!1)return;const i=e.getRange();let r=null;if(i.getRange().isCrossRowCol){const a=i.getRangeTableElement();if(!a)return;const c=e.getTableParticle().getRangeRowCol();if(!c)return;const d={type:l.ElementType.TABLE,value:"",colgroup:[],trList:[]},u=c[0],R=u[0].colIndex,h=u[u.length-1],g=h.colIndex+h.colspan-1;for(let f=R;f<=g;f++)d.colgroup.push(a.colgroup[f]);for(let f=0;f<c.length;f++){const T=c[f],m=a.trList[T[0].rowIndex],p={tdList:[],height:m.height,minHeight:m.minHeight};for(let I=0;I<T.length;I++)p.tdList.push(T[I]);d.trList.push(p)}r=Mt([d])}else r=i.getIsCollapsed()?i.getRangeRowElementList():i.getSelectionElementList();t?.isPlainText&&r?.length&&(r=[{value:xe(r)}]),r?.length&&await os(r,e.getOptions())}function Da(o,t){const e=t.getDraw(),{drop:n}=e.getOverride();if(n&&n(o)?.preventDefault!==!1)return;o.preventDefault();const i=o.dataTransfer?.getData("text");if(i)t.input(i);else{const r=o.dataTransfer?.files;if(!r)return;for(let s=0;s<r.length;s++){const a=r[s];a.type.startsWith("image")&&vo(t,a)}}}function us(o){if(!Intl.Segmenter)return null;const t=o.getDraw(),e=t.getPosition().getCursorPosition();if(!e)return null;const i=t.getRange().getRangeParagraphInfo();if(!i)return null;const r=i?.elementList?.map(h=>!h.type||h.type!==l.ElementType.CONTROL&&zt.includes(h.type)?h.value:_).join("")||"";if(!r)return null;const s=e.isFirstLetter||t.getCursor().getHitLineStartIndex()?e.index+1:e.index,a=i.startIndex,d=new Intl.Segmenter(void 0,{granularity:"word"}).segment(r);let u=-1,R=-1;for(const{segment:h,index:g,isWordLike:f}of d){const T=g+a;if(f&&s>=T&&s<T+h.length){u=T-1,R=u+h.length;break}}return~u&&~R?{startIndex:u,endIndex:R}:null}function Ua(o){const t=o.getDraw(),e=t.getPosition().getCursorPosition();if(!e)return null;const{value:n,index:i}=e,r=t.getLetterReg();let s=0,a=0;const c=po.test(n);if(c||r.test(n)){const u=t.getElementList();let R=i-1;for(;R>0;){const g=u[R].value;if(c&&po.test(g)||!c&&r.test(g))s++,R--;else break}let h=i+1;for(;h<u.length;){const g=u[h].value;if(c&&po.test(g)||!c&&r.test(g))a++,h++;else break}}const d=i-s-1;return d<0?null:{startIndex:d,endIndex:i+a}}function wa(o,t){const e=o.getDraw(),n=e.getPosition(),i=n.getPositionByXY({x:t.offsetX,y:t.offsetY});if(i.isImage&&i.isDirectHit){const a=e.getElementList(),c=e.getEventBus(),d=a[i.index];if(c.isSubscribe("imageDblclick")&&c.emit("imageDblclick",{evt:t,element:d}),d.imgPreviewDisabled)return;e.getPreviewer().render();return}if(e.getIsPagingMode()&&e.getMode()===l.EditorMode.EDIT&&!~i.index&&i.zone){e.getZone().setZone(i.zone),e.clearSideEffect(),n.setPositionContext({isTable:!1});return}if((i.isCheckbox||i.isRadio)&&i.isDirectHit)return;const r=e.getRange(),s=us(o)||Ua(o);s&&(r.setRange(s.startIndex,s.endIndex),e.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1}),r.setRangeStyle())}function Za(o){const t=o.getDraw(),e=t.getControl();if(e.getActiveControl()&&e.selectValue())return;const i=t.getPosition().getCursorPosition();if(!i)return;const{index:r}=i,s=t.getElementList();let a=0,c=0,d=r-1;for(;d>0;){const f=s[d],T=s[d-1];if(f.value===_&&!f.listWrap||f.listId!==T?.listId||f.titleId!==T?.titleId)break;a++,d--}let u=r+1;for(;u<s.length;){const f=s[u],T=s[u+1];if(f.value===_&&!f.listWrap||f.listId!==T?.listId||f.titleId!==T?.titleId)break;c++,u++}const R=t.getRange();let h=r-a-1;if(s[h]?.value!==_&&(h-=1),h<0)return;let g=r+c+1;(s[g]?.value===_||g>s.length-1)&&(g-=1),R.setRange(h,g),t.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1})}const Rs={dblclick:wa,threeClick:Za};function Qa(o){o.isComposing=!0}function va(o,t){const e=Vt();o.isComposing=!1;const n=o.getDraw(),i=n.getOptions();if(t.data)o.compositionInfo&&(o.compositionInfo.perfStartTime=e),sl?setTimeout(()=>{o.compositionInfo&&_o(t.data,o,"compositionend")},1):o.compositionInfo&&_o(t.data,o,"compositionend");else{const s=o.compositionInfo?.cancel;if(ba(o),!s){const a=n.getRange(),{endIndex:c}=a.getRange();n.render({curIndex:c,isSubmitHistory:!1,traceLabel:"compositionend:empty"})}}n.getCursor().clearAgentDomValue(),So(i,"compositionend",Vt()-e,[],{hasData:!!t.data,dataLength:t.data?.length||0})}function Ka(o){o.compositionInfo&&(o.compositionInfo.cancel=!0)}const xo={compositionstart:Qa,compositionend:va,compositionCancel:Ka};function Ha(o,t){const e=t.getDraw();if(e.isReadonly())return;o.preventDefault();const i=e.getPageContainer();if(!Wi(o.target,L=>L===i))return;const a=o.target.dataset.index;a&&e.setPageNo(Number(a));const c=e.getPosition(),d=c.adjustPositionContext({x:o.offsetX,y:o.offsetY});if(!d)return;const{isTable:u,tdValueIndex:R,index:h}=d,g=c.getPositionList(),f=u?R:h;~h&&(e.getRange().setRange(f,f),c.setCursorPosition(g[f]));const T=e.getCursor(),{cursor:{dragColor:m,dragWidth:p,dragFloatImageDisabled:I}}=e.getOptions();if(I){const L=t.cacheElementList?.[t.cacheRange.startIndex];if(L?.type===l.ElementType.IMAGE&&(L.imgDisplay===l.ImageDisplay.FLOAT_TOP||L.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM||L.imgDisplay===l.ImageDisplay.SURROUND))return}T.drawCursor({width:p,color:m,isBlink:!1,isFocus:!1})}const _a={dragover:Ha};class xa{isAllowSelection;isComposing;compositionInfo;isAllowDrag;isAllowDrop;cacheRange;cacheElementList;cachePositionList;cachePositionContext;mouseDownStartPosition;draw;pageContainer;pageList;range;position;constructor(t){this.draw=t,this.pageContainer=t.getPageContainer(),this.pageList=t.getPageList(),this.range=this.draw.getRange(),this.position=this.draw.getPosition(),this.isAllowSelection=!1,this.isComposing=!1,this.compositionInfo=null,this.isAllowDrag=!1,this.isAllowDrop=!1,this.cacheRange=null,this.cacheElementList=null,this.cachePositionList=null,this.cachePositionContext=null,this.mouseDownStartPosition=null}getDraw(){return this.draw}register(){this.pageContainer.addEventListener("click",this.click.bind(this)),this.pageContainer.addEventListener("mousedown",this.mousedown.bind(this)),this.pageContainer.addEventListener("mouseup",this.mouseup.bind(this)),this.pageContainer.addEventListener("mouseleave",this.mouseleave.bind(this)),this.pageContainer.addEventListener("mousemove",this.mousemove.bind(this)),this.pageContainer.addEventListener("dblclick",this.dblclick.bind(this)),this.pageContainer.addEventListener("dragover",this.dragover.bind(this)),this.pageContainer.addEventListener("drop",this.drop.bind(this)),Ar(this.pageContainer,this.threeClick.bind(this))}setIsAllowSelection(t){this.isAllowSelection=t,t||this.applyPainterStyle()}setIsAllowDrag(t){this.isAllowDrag=t,this.isAllowDrop=t}clearPainterStyle(){this.pageList.forEach(t=>{t.style.cursor="text"}),this.draw.setPainterStyle(null)}applyPainterStyle(){const t=this.draw.getPainterStyle();if(!t||this.draw.isReadonly()||this.draw.isDisabled())return;let n=this.range.getSelection();if(!n){const s=us(this);s&&(n=this.draw.getElementList().slice(s.startIndex+1,s.endIndex+1))}if(!n)return;const i=Object.keys(t);n.forEach(s=>{i.forEach(a=>{const c=a;Reflect.set(s,c,t[c])})}),this.draw.render({isSetCursor:!1});const r=this.draw.getPainterOptions();(!r||!r.isDblclick)&&this.clearPainterStyle()}selectAll(){if(this.position.getPositionContext().isTable)this.draw.getTableOperate().tableSelectAll();else{const t=this.position.getPositionList();this.range.setRange(0,t.length-1),this.draw.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1})}}mousemove(t){this.draw.isInteractionSuspended()||ga(t,this)}mousedown(t){this.draw.isInteractionSuspended()||ua(t,this)}click(){this.draw.isInteractionSuspended()||ol&&!this.draw.isReadonly()&&this.draw.getCursor().getAgentDom().focus()}mouseup(t){this.draw.isInteractionSuspended()||Ra(t,this)}mouseleave(t){this.draw.isInteractionSuspended()||ha(t,this)}keydown(t){this.draw.isInteractionSuspended()||Sa(t,this)}dblclick(t){this.draw.isInteractionSuspended()||Rs.dblclick(this,t)}threeClick(){this.draw.isInteractionSuspended()||Rs.threeClick(this)}input(t,e="input"){this.draw.isInteractionSuspended()||_o(t,this,e)}async cut(){this.draw.isInteractionSuspended()||await Va(this)}async copy(t){this.draw.isInteractionSuspended()||await Ya(this,t)}compositionstart(){this.draw.isInteractionSuspended()||xo.compositionstart(this)}compositionend(t){this.draw.isInteractionSuspended()||xo.compositionend(this,t)}compositionCancel(){this.draw.isInteractionSuspended()||xo.compositionCancel(this)}drop(t){this.draw.isInteractionSuspended()||Da(t,this)}dragover(t){this.draw.isInteractionSuspended()||_a.dragover(t,this)}}const hs={PAGE_SCALE:"pageScale"};class Ga{draw;options;cursor;canvasEvent;range;previewer;tableTool;hyperlinkParticle;control;dateParticle;imageParticle;dprMediaQueryList;constructor(t,e){this.draw=t,this.options=t.getOptions(),this.canvasEvent=e,this.cursor=null,this.range=t.getRange(),this.previewer=t.getPreviewer(),this.tableTool=t.getTableTool(),this.hyperlinkParticle=t.getHyperlinkParticle(),this.dateParticle=t.getDateParticle(),this.imageParticle=t.getImageParticle(),this.control=t.getControl(),this.dprMediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`)}register(){this.cursor=this.draw.getCursor(),this.addEvent()}addEvent(){window.addEventListener("blur",this.clearSideEffect),document.addEventListener("mousedown",this.clearSideEffect),document.addEventListener("mouseup",this.setCanvasEventAbility),document.addEventListener("wheel",this.setPageScale,{passive:!1}),document.addEventListener("visibilitychange",this._handleVisibilityChange),this.dprMediaQueryList.addEventListener("change",this._handleDprChange)}removeEvent(){window.removeEventListener("blur",this.clearSideEffect),document.removeEventListener("mousedown",this.clearSideEffect),document.removeEventListener("mouseup",this.setCanvasEventAbility),document.removeEventListener("wheel",this.setPageScale),document.removeEventListener("visibilitychange",this._handleVisibilityChange),this.dprMediaQueryList.removeEventListener("change",this._handleDprChange)}clearSideEffect=t=>{if(!this.cursor)return;if(this.draw.isInteractionSuspended()){this.resetSideEffect();return}const e=t?.composedPath?.()[0]||t.target;if(this.draw.isTargetInsideEditor(e)){this.watchCursorActive();return}this.resetSideEffect()};resetSideEffect=()=>{this.cursor&&(this.cursor.recoveryCursor(),this.range.recoveryRangeStyle(),this.previewer.clearResizer(),this.tableTool.dispose(),this.hyperlinkParticle.clearHyperlinkPopup(),this.control.destroyControl(),this.dateParticle.clearDatePicker(),this.imageParticle.destroyFloatImage())};setCanvasEventAbility=()=>{this.canvasEvent.setIsAllowDrag(!1),this.canvasEvent.setIsAllowSelection(!1)};watchCursorActive(){this.range.getIsCollapsed()&&setTimeout(()=>{this.cursor?.getAgentIsActive()||this.cursor?.drawCursor({isFocus:!1,isBlink:!1})})}setPageScale=t=>{if(this.draw.isInteractionSuspended()||!this.draw.isTargetInsideEditor(t.target)||this.options.shortcutDisableKeys.includes(hs.PAGE_SCALE)||!t.ctrlKey)return;t.preventDefault();const{scale:e}=this.options;if(t.deltaY<0){const n=e*10+1;n<=30&&this.draw.setPageScale(n/10)}else{const n=e*10-1;n>=5&&this.draw.setPageScale(n/10)}};_handleVisibilityChange=()=>{if(document.visibilityState==="visible"){const t=this.range.getRange(),e=!!~t.startIndex&&!!~t.endIndex&&t.startIndex===t.endIndex;this.range.replaceRange(t),this.draw.render({isSetCursor:e,isCompute:!1,isSubmitHistory:!1,curIndex:t.startIndex})}};_handleDprChange=()=>{this.draw.setPageDevicePixel()}}class Aa{undoStack=[];redoStack=[];maxRecordCount;constructor(t){this.maxRecordCount=t.getOptions().historyMaxRecordCount+1}undo(){if(this.undoStack.length>1){const t=this.undoStack.pop();this.redoStack.push(t),this.undoStack.length&&this.undoStack[this.undoStack.length-1]()}}redo(){if(this.redoStack.length){const t=this.redoStack.pop();this.undoStack.push(t),t()}}execute(t){for(this.undoStack.push(t),this.redoStack.length&&(this.redoStack=[]);this.undoStack.length>this.maxRecordCount;)this.undoStack.shift()}isCanUndo(){return this.undoStack.length>1}isCanRedo(){return!!this.redoStack.length}isStackEmpty(){return!this.undoStack.length&&!this.redoStack.length}recovery(){this.undoStack=[],this.redoStack=[]}popUndo(){return this.undoStack.pop()}}class ka{cursorPosition;positionContext;positionList;floatPositionList;draw;eventBus;options;constructor(t){this.positionList=[],this.floatPositionList=[],this.cursorPosition=null,this.positionContext={isTable:!1,isControl:!1},this.draw=t,this.eventBus=t.getEventBus(),this.options=t.getOptions()}getFloatPositionList(){return this.floatPositionList}getTablePositionList(t){const{index:e,trIndex:n,tdIndex:i}=this.positionContext;return t[e].trList[n].tdList[i].positionList||[]}getPositionList(){return this.positionContext.isTable?this.getTablePositionList(this.draw.getOriginalElementList()):this.getOriginalPositionList()}getMainPositionList(){return this.positionContext.isTable?this.getTablePositionList(this.draw.getOriginalMainElementList()):this.positionList}getOriginalPositionList(){const t=this.draw.getZone();return t.isHeaderActive()?this.draw.getHeader().getPositionList():t.isFooterActive()?this.draw.getFooter().getPositionList():this.positionList}getOriginalMainPositionList(){return this.positionList}getSelectionPositionList(){const{startIndex:t,endIndex:e}=this.draw.getRange().getRange();return t===e?null:this.getPositionList().slice(t+1,e+1)}setPositionList(t){this.positionList=t}setFloatPositionList(t){this.floatPositionList=t}computePageRowPosition(t){const{positionList:e,rowList:n,pageNo:i,startX:r,startY:s,startRowIndex:a,startIndex:c,innerWidth:d,zone:u}=t,{scale:R,table:{tdPadding:h}}=this.options;let g=r,f=s,T=c;for(let m=0;m<n.length;m++){const p=n[m];if(!p.isSurround){const P=p.width+(p.offsetX||0);p.rowFlex===l.RowFlex.CENTER?g+=(d-P)/2:p.rowFlex===l.RowFlex.RIGHT&&(g+=d-P)}g+=p.offsetX||0,f+=p.offsetY||0;const I=g,L=f;for(let P=0;P<p.elementList.length;P++){const C=p.elementList[P],S=C.metrics,F=!_t(C)&&(C.imgDisplay!==l.ImageDisplay.INLINE&&C.type===l.ElementType.IMAGE||C.type===l.ElementType.LATEX)?p.ascent-S.height:p.ascent;C.left&&(g+=C.left),C.translateX&&(g+=C.translateX*R);const N={pageNo:i,index:T,value:C.value,rowIndex:a+m,rowNo:m,metrics:S,left:C.left||0,ascent:F,lineHeight:p.height,isFirstLetter:P===0,isLastLetter:P===p.elementList.length-1,coordinate:{leftTop:[g,f],leftBottom:[g,f+p.height],rightTop:[g+S.width,f],rightBottom:[g+S.width,f+p.height]}};if(C.imgDisplay===l.ImageDisplay.SURROUND||C.imgDisplay===l.ImageDisplay.FLOAT_TOP||C.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM){const V=e[e.length-1];V&&(N.metrics=V.metrics,N.coordinate=V.coordinate),C.imgFloatPosition||(C.imgFloatPosition={x:g,y:f,pageNo:i}),this.floatPositionList.push({pageNo:i,element:C,position:N,isTable:t.isTable,index:t.index,tdIndex:t.tdIndex,trIndex:t.trIndex,tdValueIndex:T,zone:u})}if(e.push(N),T++,g+=S.width,C.type===l.ElementType.TABLE&&!_t(C)){const V=C.tdPadding||h,Y=V[1]+V[3],E=V[0]+V[2];for(let W=0;W<C.trList.length;W++){const X=C.trList[W];for(let O=0;O<X.tdList.length;O++){const M=X.tdList[O];M.positionList=[];const b=M.rowList,y=this.computePageRowPosition({positionList:M.positionList,rowList:b,pageNo:i,startRowIndex:0,startIndex:0,startX:(M.x+V[3])*R+I+(C.translateX||0)*R,startY:(M.y+V[0])*R+L,innerWidth:(M.width-Y)*R,isTable:!0,index:T-1,tdIndex:O,trIndex:W,zone:u});if(M.verticalAlign===l.VerticalAlign.MIDDLE||M.verticalAlign===l.VerticalAlign.BOTTOM){const D=b.reduce((G,H)=>G+H.height,0),U=(M.height-E)*R-D,Q=M.verticalAlign===l.VerticalAlign.MIDDLE?U/2:U;Math.floor(Q)>0&&M.positionList.forEach(G=>{const{coordinate:{leftTop:H,leftBottom:tt,rightBottom:st,rightTop:et}}=G;H[1]+=Q,tt[1]+=Q,st[1]+=Q,et[1]+=Q})}g=y.x,f=y.y}}g=I,f=L}}g=r,f+=p.height}return{x:g,y:f,index:T}}computePositionList(){this.positionList=[];const t=this.draw.getInnerWidth(),e=this.draw.getPageRowList(),n=this.draw.getMargins(),i=n[3],s=this.draw.getHeader().getExtraHeight(),a=n[0]+s;let c=0;for(let d=0;d<e.length;d++){const u=e[d];if(!u?.length)continue;const R=u[0].startIndex;this.computePageRowPosition({positionList:this.positionList,rowList:u,pageNo:d,startRowIndex:c,startIndex:R,startX:i,startY:a,innerWidth:t}),c+=u.length}}computeRowPosition(t){const{row:e,innerWidth:n}=t,i=[];return this.computePageRowPosition({positionList:i,innerWidth:n,rowList:[at(e)],pageNo:0,startX:0,startY:0,startIndex:0,startRowIndex:0}),i}setCursorPosition(t){this.cursorPosition=t}getCursorPosition(){return this.cursorPosition}getPositionContext(){return this.positionContext}setPositionContext(t){this.eventBus.emit("positionContextChange",{value:t,oldValue:this.positionContext}),this.positionContext=t}getPositionByXY(t){const{x:e,y:n,isTable:i}=t;let{elementList:r,positionList:s}=t;r||(r=this.draw.getOriginalElementList()),s||(s=this.getOriginalPositionList());const a=this.draw.getZone(),c=t.pageNo??this.draw.getPageNo(),d=a.isMainActive(),u=d?c:0;if(!i){const T=this.getFloatPositionByXY({...t,imgDisplays:[l.ImageDisplay.FLOAT_TOP,l.ImageDisplay.SURROUND]});if(T)return T}for(let T=0;T<s.length;T++){const{index:m,pageNo:p,left:I,isFirstLetter:L,coordinate:{leftTop:P,rightTop:C,leftBottom:S}}=s[T];if(u===p){if(p>u)break;if(P[0]-I<=e&&C[0]>=e&&P[1]<=n&&S[1]>=n){let F=T;const N=r[T];if(N.type===l.ElementType.TABLE)for(let Y=0;Y<N.trList.length;Y++){const E=N.trList[Y];for(let W=0;W<E.tdList.length;W++){const X=E.tdList[W],O=this.getPositionByXY({x:e,y:n,td:X,pageNo:c,tablePosition:s[T],isTable:!0,elementList:X.value,positionList:X.positionList});if(~O.index){const{index:M,hitLineStartIndex:b}=O,y=X.value[M];return{index:m,isCheckbox:O.isCheckbox||y.type===l.ElementType.CHECKBOX||y.controlComponent===l.ControlComponent.CHECKBOX,isRadio:y.type===l.ElementType.RADIO||y.controlComponent===l.ControlComponent.RADIO,isControl:!!y.controlId,isImage:O.isImage,isLabel:O.isLabel,isMacro:O.isMacro,isDirectHit:O.isDirectHit,isTable:!0,tdIndex:W,trIndex:Y,tdValueIndex:M,tdId:X.id,trId:E.id,tableId:N.id,hitLineStartIndex:b}}}}if(N.type===l.ElementType.IMAGE||N.type===l.ElementType.LATEX)return{index:F,isDirectHit:!0,isImage:!0};if(N.type===l.ElementType.MENSTRUAL_HISTORY)return{index:F,isDirectHit:!0};if(N.type===l.ElementType.FETAL_HEART_POSITION)return{index:F,isDirectHit:!0};if(N.type===l.ElementType.TOOTH_POSITION){const{scale:Y}=this.options,E=N.width*Y;return e>=P[0]&&e<=P[0]+E?{index:F,isDirectHit:!0}:{index:F}}if(N.type===l.ElementType.CHECKBOX||N.controlComponent===l.ControlComponent.CHECKBOX)return{index:F,isDirectHit:!0,isCheckbox:!0};if(N.type===l.ElementType.LABEL)return{index:F,isDirectHit:!0,isLabel:!0};if(N.type===l.ElementType.MACRO||N.type===l.ElementType.CUSTOM_MACRO||N.type===l.ElementType.REUSABLE_ITEM||N.type===l.ElementType.SUB_TEMPLATE)return{index:F,isDirectHit:!0,isMacro:!0};if(N.type===l.ElementType.TAB&&N.listStyle===l.ListStyle.CHECKBOX){let Y=F-1;for(;Y>0;){const E=r[Y];if(E.value===_&&E.listStyle===l.ListStyle.CHECKBOX)break;Y--}return{index:Y,isDirectHit:!0,isCheckbox:!0}}if(N.type===l.ElementType.RADIO||N.controlComponent===l.ControlComponent.RADIO)return{index:F,isDirectHit:!0,isRadio:!0};let V;if(r[m].value!==_){const Y=C[0]-P[0];e<P[0]+Y/2&&(F=T-1,L&&(V=T))}return{isDirectHit:!0,hitLineStartIndex:V,index:F,isControl:!!N.controlId}}}}if(!i){const T=this.getFloatPositionByXY({...t,imgDisplays:[l.ImageDisplay.FLOAT_BOTTOM]});if(T)return T}let R=!1,h=-1,g;if(i){const{scale:T}=this.options,{td:m,tablePosition:p}=t;if(m&&p){const{leftTop:I}=p.coordinate,L=m.x*T+I[0],P=m.y*T+I[1],C=m.width*T,S=m.height*T;if(!(L<e&&e<L+C&&P<n&&n<P+S))return{index:h}}}const f=s.filter(T=>T.isLastLetter&&T.pageNo===u);for(let T=0;T<f.length;T++){const{index:m,rowNo:p,coordinate:{leftTop:I,leftBottom:L}}=f[T];if(n>I[1]&&n<=L[1]){const P=s.findIndex(N=>N.pageNo===u&&N.rowNo===p),C=r[P],S=s[P],F=C.listStyle===l.ListStyle.CHECKBOX?this.draw.getMargins()[3]:S.coordinate.leftTop[0];if(e<F)~P?S.value===_?h=P:(h=P-1,g=P):h=m;else{if(C.listStyle===l.ListStyle.CHECKBOX&&e<I[0])return{index:P,isDirectHit:!0,isCheckbox:!0};h=m}R=!0;break}}if(!R){if(this.draw.getIsPagingMode()){const m=this.draw.getHeader(),p=m.getHeight(),I=m.getHeaderTop()+p,L=this.draw.getFooter(),C=this.draw.getHeight()-(L.getFooterBottom()+L.getHeight());if(d){if(n<I)return{index:-1,zone:l.EditorZone.HEADER};if(n>C)return{index:-1,zone:l.EditorZone.FOOTER}}else if(n<=C&&n>=I)return{index:-1,zone:l.EditorZone.MAIN}}const T=this.draw.getMargins();if(n<=T[0])for(let m=0;m<s.length;m++){const p=s[m];if(p.pageNo!==u||p.rowNo!==0)continue;const{leftTop:I,rightTop:L}=p.coordinate;if(e<=T[3]||e>=I[0]&&e<=L[0]||s[m+1]?.rowNo!==0)return{index:p.index}}else{const m=f[f.length-1];if(m){const p=m.rowNo;for(let I=0;I<s.length;I++){const L=s[I];if(L.pageNo!==u||L.rowNo!==p)continue;const{leftTop:P,rightTop:C}=L.coordinate;if(e<=T[3]||e>=P[0]&&e<=C[0]||s[I+1]?.rowNo!==p)return{index:L.index}}}}return{index:f[f.length-1]?.index||s.length-1}}return{hitLineStartIndex:g,index:h,isControl:!!r[h]?.controlId}}getFloatPositionByXY(t){const{x:e,y:n}=t,i=t.pageNo??this.draw.getPageNo(),r=this.draw.getZone().getZone(),{scale:s}=this.options;for(let a=0;a<this.floatPositionList.length;a++){const{position:c,element:d,isTable:u,index:R,trIndex:h,tdIndex:g,tdValueIndex:f,zone:T,pageNo:m}=this.floatPositionList[a];if(i===m&&d.type===l.ElementType.IMAGE&&d.imgDisplay&&t.imgDisplays.includes(d.imgDisplay)&&(!T||T===r)){const p=d.imgFloatPosition,I=p.x*s,L=p.y*s,P=d.width*s,C=d.height*s;if(e>=I&&e<=I+P&&n>=L&&n<=L+C)return u?{index:R,isDirectHit:!0,isImage:!0,isTable:u,trIndex:h,tdIndex:g,tdValueIndex:f,tdId:d.tdId,trId:d.trId,tableId:d.tableId}:{index:c.index,isDirectHit:!0,isImage:!0}}}}adjustPositionContext(t){const e=this.getPositionByXY(t);if(!~e.index)return null;if(e.isControl&&this.draw.getMode()!==l.EditorMode.READONLY){const{index:m,isTable:p,trIndex:I,tdIndex:L,tdValueIndex:P}=e,C=this.draw.getControl(),{newIndex:S}=C.moveCursor({index:m,isTable:p,trIndex:I,tdIndex:L,tdValueIndex:P});p?e.tdValueIndex=S:e.index=S}const{index:n,isCheckbox:i,isRadio:r,isControl:s,isImage:a,isLabel:c,isDirectHit:d,isTable:u,trIndex:R,tdIndex:h,tdId:g,trId:f,tableId:T}=e;return this.setPositionContext({isTable:u||!1,isCheckbox:i||!1,isRadio:r||!1,isControl:s||!1,isImage:a||!1,isLabel:c||!1,isDirectHit:d||!1,index:n,trIndex:R,tdIndex:h,tdId:g,trId:f,tableId:T}),e}setSurroundPosition(t){const{scale:e}=this.options,{pageNo:n,row:i,rowElement:r,rowElementRect:s,surroundElementList:a,availableWidth:c}=t;let d=s.x,u=0;if(a.length&&!on(r)&&!r.control?.minWidth)for(let R=0;R<a.length;R++){const h=a[R],g=h.imgFloatPosition;if(g.pageNo!==n)continue;const f={...g,x:g.x*e,y:g.y*e,width:h.width*e,height:h.height*e};if(qr(s,f)){i.isSurround=!0;const T=f.width+f.x-s.x;if(r.left=T,i.width+=T,u+=T,d=f.x+f.width,i.width+r.metrics.width>c){r.left=0,i.width-=u;break}}}return{x:d,rowIncreaseWidth:u}}}class Ja{draw;options;range;listener;eventBus;position;historyManager;defaultStyle;lastRangeStyle;constructor(t){this.draw=t,this.options=t.getOptions(),this.listener=t.getListener(),this.eventBus=t.getEventBus(),this.position=t.getPosition(),this.historyManager=t.getHistoryManager(),this.range={startIndex:-1,endIndex:-1},this.defaultStyle=null,this.lastRangeStyle=null}_isSameRangeStyle(t,e){if(!t||!["type","undo","redo","painter","font","size","bold","italic","underline","strikeout","deletePerson","color","highlight","rowFlex","vertical","rowMargin","level","listType","listStyle","textDecoration","extension"].every(c=>t[c]===e[c])||!(t.dashArray.length===e.dashArray.length&&t.dashArray.every((c,d)=>c===e.dashArray[d])))return!1;const s=t.groupIds||[],a=e.groupIds||[];return s.length===a.length&&s.every((c,d)=>c===a[d])}_emitRangeStyle(t){this._isSameRangeStyle(this.lastRangeStyle,t)||(this.lastRangeStyle={...t,dashArray:[...t.dashArray],groupIds:t.groupIds?[...t.groupIds]:null},this.listener.rangeStyleChange?.(t),this.eventBus.isSubscribe("rangeStyleChange")&&this.eventBus.emit("rangeStyleChange",t))}getRange(){return this.range}clearRange(){this.setRange(-1,-1)}setDefaultStyle(t){t?this.defaultStyle={...this.defaultStyle,...t}:this.defaultStyle=null}getDefaultStyle(){return this.defaultStyle}getRangeAnchorStyle(t,e){const n=tn(t,e);return n?{...n,...this.defaultStyle}:null}getIsRangeChange(t,e,n,i,r,s,a){return this.range.startIndex!==t||this.range.endIndex!==e||this.range.tableId!==n||this.range.startTdIndex!==i||this.range.endTdIndex!==r||this.range.startTrIndex!==s||this.range.endTrIndex!==a}getIsCollapsed(){const{startIndex:t,endIndex:e}=this.range;return t===e}getIsSelection(){const{startIndex:t,endIndex:e}=this.range;return!~t&&!~e?!1:t!==e}getSelection(){const{startIndex:t,endIndex:e,splitTdRange:n}=this.range;if(t===e)return null;if(n)return this.draw.getSplitTdValues(n.originalId).slice(n.startIndex+1,n.endIndex+1);const i=this.draw.getElementList();return i.slice(i[t]?.value===_?t:t+1,e+1)}getSelectionElementList(){if(this.range.isCrossRowCol){const t=this.draw.getTableParticle().getRangeRowCol();if(!t)return null;const e=[];for(let n=0;n<t.length;n++){const i=t[n];for(let r=0;r<i.length;r++){const s=i[r];e.push(...s.value)}}return e}return this.getSelection()}getTextLikeSelection(){const t=this.getSelection();return t?t.filter(e=>!e.type||zt.includes(e.type)):null}getTextLikeSelectionElementList(){const t=this.getSelectionElementList();return t?t.filter(e=>!e.type||zt.includes(e.type)):null}getRangeRow(){const{startIndex:t,endIndex:e}=this.range;if(!~t&&!~e)return null;const n=this.position.getPositionList(),i=new Map;for(let r=t;r<e+1;r++){const{pageNo:s,rowNo:a}=n[r],c=i.get(s);c?c.has(a)||c.add(a):i.set(s,new Set([a]))}return i}getRangeRowElementList(){const{startIndex:t,endIndex:e,isCrossRowCol:n}=this.range;if(!~t&&!~e)return null;if(n)return this.getSelectionElementList();const i=this.getRangeRow();if(!i)return null;const r=this.position.getPositionList(),s=this.draw.getElementList(),a=[];for(let c=0;c<r.length;c++){const d=r[c],u=i.get(d.pageNo);u&&u.has(d.rowNo)&&a.push(s[c])}return a}getRangeParagraph(){const{startIndex:t,endIndex:e}=this.range;if(!~t&&!~e)return null;const n=this.position.getPositionList(),i=this.draw.getElementList(),r=new Map;let s=t;for(;s>=0;){const{pageNo:d,rowNo:u}=n[s];let R=r.get(d);R||(R=[],r.set(d,R)),R.includes(u)||R.unshift(u);const h=i[s],g=i[s-1];if(h.value===_&&!h.listWrap||h.listId!==g?.listId||h.titleId!==g?.titleId)break;s--}const a=t===e;if(!a){let d=t+1;for(;d<e;){const{pageNo:u,rowNo:R}=n[d];let h=r.get(u);h||(h=[],r.set(u,h)),h.includes(R)||h.push(R),d++}}let c=e;for(a&&i[t].value===_&&(c+=1);c<n.length;){const d=i[c],u=i[c+1];if(d.value===_&&!d.listWrap||d.listId!==u?.listId||d.titleId!==u?.titleId)break;const{pageNo:R,rowNo:h}=n[c];let g=r.get(R);g||(g=[],r.set(R,g)),g.includes(h)||g.push(h),c++}return r}getRangeParagraphInfo(){const{startIndex:t,endIndex:e}=this.range;if(!~t&&!~e)return null;let n=-1;const i=[],r=this.getRangeParagraph();if(!r)return null;const s=this.draw.getElementList(),a=this.position.getPositionList();for(let c=0;c<a.length;c++){const d=a[c],u=r.get(d.pageNo);u&&u.includes(d.rowNo)&&(~n||(n=d.index),i.push(s[c]))}return i.length?{elementList:i,startIndex:n}:null}getRangeParagraphElementList(){return this.getRangeParagraphInfo()?.elementList||null}getRangeTableElement(){const t=this.position.getPositionContext();return t.isTable?this.draw.getOriginalElementList()[t.index]:null}getIsSelectAll(){const t=this.draw.getElementList(),{startIndex:e,endIndex:n}=this.range;return e===0&&t.length-1===n&&!this.position.getPositionContext().isTable}getIsPointInRange(t,e,n){const{startIndex:i,endIndex:r}=this.range,s=this.position.getPositionList();for(let a=i+1;a<=r&&s[a];a++){const{coordinate:{leftTop:d,rightBottom:u},pageNo:R}=s[a];if(n===R&&t>=d[0]&&t<=u[0]&&e>=d[1]&&e<=u[1])return!0}return!1}getKeywordRangeList(t){const e=this.draw.getSearch().getMatchList(t,this.draw.getOriginalElementList()),n=new Map;for(const r of e){const s=n.get(r.groupId);if(s)s.endIndex+=1;else{const{type:a,groupId:c,tableId:d,index:u,tdIndex:R,trIndex:h}=r,g={startIndex:u,endIndex:u};a===fe.TABLE&&(g.tableId=d,g.startTdIndex=R,g.endTdIndex=R,g.startTrIndex=h,g.endTrIndex=h),n.set(c,g)}}const i=[];return n.forEach(r=>{i.push(r)}),i}getIsCanInput(){const{range:{startIndex:t,endIndex:e},elementList:n}=this.getRangeElement(),i=n[t];if(!i)return!1;if(t===e)return(i.controlComponent!==l.ControlComponent.PRE_TEXT||n[t+1]?.controlComponent!==l.ControlComponent.PRE_TEXT)&&i.controlComponent!==l.ControlComponent.POST_TEXT;const r=n[e];return r?!i.controlId&&!r.controlId||(!i.controlId||i.controlComponent===l.ControlComponent.POSTFIX)&&(!r.controlId||r.controlComponent===l.ControlComponent.POSTFIX)||!!i.controlId&&r.controlId===i.controlId&&r.controlComponent!==l.ControlComponent.PRE_TEXT&&r.controlComponent!==l.ControlComponent.POST_TEXT&&r.controlComponent!==l.ControlComponent.POSTFIX:!1}setRange(t,e,n,i,r,s,a,c){this.getIsRangeChange(t,e,n,i,r,s,a)&&(this.range.startIndex=t,this.range.endIndex=e,this.range.tableId=n,this.range.startTdIndex=i,this.range.endTdIndex=r,this.range.startTrIndex=s,this.range.endTrIndex=a,this.range.isCrossRowCol=!!(i||r||s||a),this.range.splitTdRange=c,this.setDefaultStyle(null)),this.range.zone=this.draw.getZone().getZone();const u=this.draw.getControl();if(~t&&~e&&!!this.draw.getElementList()[t]?.controlId){u.initControl();return}u.destroyControl()}replaceRange(t){this.setRange(t.startIndex,t.endIndex,t.tableId,t.startTdIndex,t.endTdIndex,t.startTrIndex,t.endTrIndex)}shrinkRange(){const{startIndex:t,endIndex:e}=this.range;t===e||!~t&&!~e||this.replaceRange({...this.range,startIndex:e})}setRangeStyle(){const t=this.listener.rangeStyleChange,e=this.eventBus.isSubscribe("rangeStyleChange");if(!t&&!e)return;const{startIndex:n,endIndex:i,isCrossRowCol:r}=this.range;if(!~n&&!~i)return;let s;if(r){const b=this.draw.getOriginalElementList(),y=this.position.getPositionContext();s=b[y.index]}else{const b=~i?i:0,y=this.draw.getElementList();s=this.getRangeAnchorStyle(y,b)}if(!s)return;const a=this.getSelection()||[s],c=s.type||l.ElementType.TEXT,d=s.font||this.options.defaultFont,u=s.size||this.options.defaultSize,R=!~a.findIndex(b=>!b.bold),h=!~a.findIndex(b=>!b.italic),g=!~a.findIndex(b=>!b.underline&&!b.control?.underline),f=!~a.findIndex(b=>!b.strikeout),T=s.color||null,m=s.highlight||null,p=s.rowFlex||null,I=s.vertical||null,L=s.rowMargin??this.options.defaultRowMargin,P=s.dashArray||[],C=s.level||null,S=s.listType||null,F=s.listStyle||null,N=g&&s.textDecoration||null,V=!!this.draw.getPainterStyle(),Y=this.historyManager.isCanUndo(),E=this.historyManager.isCanRedo(),W=s.groupIds||null,X=s.extension??null,O=s.deletePerson??"",M={type:c,undo:Y,redo:E,painter:V,font:d,size:u,bold:R,italic:h,underline:g,strikeout:f,deletePerson:O,color:T,highlight:m,rowFlex:p,vertical:I,rowMargin:L,dashArray:P,level:C,listType:S,listStyle:F,groupIds:W,textDecoration:N,extension:X};this._emitRangeStyle(M)}recoveryRangeStyle(){const t=this.listener.rangeStyleChange,e=this.eventBus.isSubscribe("rangeStyleChange");if(!t&&!e)return;const n=this.options.defaultFont,i=this.options.defaultSize,r=this.options.defaultRowMargin,s=!!this.draw.getPainterStyle(),a=this.historyManager.isCanUndo(),c=this.historyManager.isCanRedo(),u={type:null,undo:a,redo:c,painter:s,font:n,size:i,bold:!1,italic:!1,underline:!1,strikeout:!1,deletePerson:"123",color:null,highlight:null,rowFlex:null,rowMargin:r,dashArray:[],level:null,listType:null,listStyle:null,groupIds:null,textDecoration:null,extension:null,vertical:null};this._emitRangeStyle(u)}shrinkBoundary(t={}){const{elementList:e,range:n}=this.getRangeElement(t),{startIndex:i,endIndex:r}=n;if(!~i&&!~r)return;const s=e[i],a=e[r];if(i===r){if(s.controlComponent===l.ControlComponent.PLACEHOLDER){let c=i-1;for(;c>0;){const d=e[c];if(d.controlId===s.controlId&&(d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.PRE_TEXT||d.controlComponent===l.ControlComponent.PRETEXTFIX||d.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)){n.startIndex=c,n.endIndex=c;break}if(d.controlId!==s.controlId&&!d.originControlId)break;c--}}if(s.controlComponent===l.ControlComponent.TEXTFIXLABEL){let c=i-1;for(;c>0;){const d=e[c];if(d.controlId!==s.controlId||d.controlComponent===l.ControlComponent.VALUE||d.controlComponent===l.ControlComponent.PRETEXTFIX||d.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){n.startIndex=c,n.endIndex=c;break}c--}}}else{if(s.controlComponent===l.ControlComponent.PLACEHOLDER||a.controlComponent===l.ControlComponent.PLACEHOLDER||s.controlComponent===l.ControlComponent.TEXTFIXLABEL||a.controlComponent===l.ControlComponent.TEXTFIXLABEL){let c=r-1;for(;c>0;){const d=e[c];if(d.controlId!==a.controlId||d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.PRE_TEXT||d.controlComponent===l.ControlComponent.PRETEXTFIX||d.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){n.startIndex=c,n.endIndex=c;return}c--}}if(s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT||s.controlComponent===l.ControlComponent.PRETEXTFIX||s.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){let c=i+1;for(;c<e.length;){const d=e[c];if(d.controlId!==s.controlId||d.controlComponent===l.ControlComponent.VALUE){n.startIndex=c-1;break}else if(d.controlComponent===l.ControlComponent.PLACEHOLDER){n.startIndex=c-1,n.endIndex=c-1;return}c++}}if(a.controlComponent!==l.ControlComponent.VALUE){let c=r-1;for(;c>0;){const d=e[c];if(d.controlId!==s.controlId||d.controlComponent===l.ControlComponent.VALUE){n.endIndex=c;break}else if(d.controlComponent===l.ControlComponent.PLACEHOLDER){n.startIndex=c,n.endIndex=c;return}c--}}}}render(t,e,n,i,r){t.save(),t.globalAlpha=this.options.rangeAlpha,t.fillStyle=this.options.rangeColor,t.fillRect(e,n,i,r),t.restore()}toString(){const t=this.getTextLikeSelection();return t?t.map(e=>e.value).join("").replace(new RegExp(_,"g"),""):""}getRangeElement(t={}){const e=t.elementList||this.draw.getElementList(),n=t.range||this.getRange(),{splitTdRange:i}=n,r={elementList:e,range:n};return i&&(r.range=i,r.elementList=this.draw.getSplitTdValues(i.originalId)??[]),r}}class Ba{draw;options;imageCache;constructor(t){this.draw=t,this.options=t.getOptions(),this.imageCache=new Map}_renderBackgroundColor(t,e,n,i){t.save(),t.fillStyle=e,t.fillRect(0,0,n,i),t.restore()}_drawImage(t,e,n,i){const{background:r,scale:s}=this.options;if(r.size===l.BackgroundSize.CONTAIN){const a=e.width*s,c=e.height*s;if(!r.repeat||r.repeat===l.BackgroundRepeat.NO_REPEAT)t.drawImage(e,0,0,a,c);else{let d=0,u=0;const R=r.repeat===l.BackgroundRepeat.REPEAT||r.repeat===l.BackgroundRepeat.REPEAT_X?Math.ceil(n*s/a):1,h=r.repeat===l.BackgroundRepeat.REPEAT||r.repeat===l.BackgroundRepeat.REPEAT_Y?Math.ceil(i*s/c):1;for(let g=0;g<R;g++){for(let f=0;f<h;f++)t.drawImage(e,d,u,a,c),u+=c;u=0,d+=a}}}else t.drawImage(e,0,0,n*s,i*s)}_renderBackgroundImage(t,e,n){const{background:i}=this.options,r=this.imageCache.get(i.image);if(r)this._drawImage(t,r,e,n);else{const s=new Image;s.setAttribute("crossOrigin","Anonymous"),s.src=i.image,s.onload=()=>{this.imageCache.set(i.image,s),this._drawImage(t,s,e,n),this.draw.render({isCompute:!1,isSubmitHistory:!1})}}}render(t,e){const{background:{image:n,color:i,applyPageNumbers:r}}=this.options;if(n&&(!r?.length||r.includes(e))){const{width:s,height:a}=this.options;this._renderBackgroundImage(t,s,a)}else{const s=this.draw.getCanvasWidth(e),a=this.draw.getCanvasHeight(e);this._renderBackgroundColor(t,i,s,a)}}}class Go{fillRect;fillColor;fillDecorationStyle;constructor(){this.fillRect=this.clearFillInfo()}clearFillInfo(){return this.fillColor=void 0,this.fillDecorationStyle=void 0,this.fillRect={x:0,y:0,width:0,height:0},this.fillRect}recordFillInfo(t,e,n,i,r,s,a){const c=!this.fillRect.width;if(!c&&(this.fillColor!==s||this.fillDecorationStyle!==a)){this.render(t),this.clearFillInfo(),this.recordFillInfo(t,e,n,i,r,s,a);return}c&&(this.fillRect.x=e,this.fillRect.y=n),r&&this.fillRect.height<r&&(this.fillRect.height=r),this.fillRect.width+=i,this.fillColor=s,this.fillDecorationStyle=a}}class $a extends Go{options;constructor(t){super(),this.options=t.getOptions()}render(t){if(!this.fillRect.width)return;const{highlightAlpha:e}=this.options,{x:n,y:i,width:r,height:s}=this.fillRect;t.save(),t.globalAlpha=e,t.fillStyle=this.fillColor,t.fillRect(n,i,r,s),t.restore(),this.clearFillInfo()}}class za{draw;options;constructor(t){this.draw=t,this.options=t.getOptions()}render(t,e){const{marginIndicatorColor:n,pageMode:i}=this.options,r=this.draw.getWidth(),s=i===l.PageMode.CONTINUITY?this.draw.getCanvasHeight(e)/this.draw.getPagePixelRatio():this.draw.getHeight(),a=this.draw.getMargins(),c=this.draw.getMarginIndicatorSize();t.save(),t.translate(.5,.5),t.strokeStyle=n,t.beginPath();const d=[a[3],a[0]],u=[r-a[1],a[0]],R=[a[3],s-a[2]],h=[r-a[1],s-a[2]];t.moveTo(d[0]-c,d[1]),t.lineTo(...d),t.lineTo(d[0],d[1]-c),t.moveTo(u[0]+c,u[1]),t.lineTo(...u),t.lineTo(u[0],u[1]-c),t.moveTo(R[0]-c,R[1]),t.lineTo(...R),t.lineTo(R[0],R[1]+c),t.moveTo(h[0]+c,h[1]),t.lineTo(...h),t.lineTo(h[0],h[1]+c),t.stroke(),t.restore()}}class ja{draw;options;position;range;searchKeyword;searchNavigateIndex;searchOptions;searchMatchList;constructor(t){this.draw=t,this.options=t.getOptions(),this.position=t.getPosition(),this.range=t.getRange(),this.searchNavigateIndex=null,this.searchOptions=null,this.searchKeyword=null,this.searchMatchList=[]}getSearchKeyword(){return this.searchKeyword}setSearchKeyword(t,e){this.searchKeyword=t,this.searchNavigateIndex=null,this.searchOptions=e||null}searchNavigatePre(){if(!this.searchMatchList.length||!this.searchKeyword)return null;if(this.searchNavigateIndex===null)this.searchNavigateIndex=0;else{let t=this.searchNavigateIndex-1,e=!1;const n=this.searchMatchList[this.searchNavigateIndex].groupId;for(;t>=0;){const i=this.searchMatchList[t];if(n!==i.groupId){e=!0,this.searchNavigateIndex=t-(this.searchKeyword.length-1);break}t--}if(!e){if(this.searchMatchList[this.searchMatchList.length-1].groupId===n)return null;this.searchNavigateIndex=this.searchMatchList.length-1-(this.searchKeyword.length-1)}}return this.searchNavigateIndex}searchNavigateNext(){if(!this.searchMatchList.length||!this.searchKeyword)return null;if(this.searchNavigateIndex===null)this.searchNavigateIndex=0;else{let t=this.searchNavigateIndex+1,e=!1;const n=this.searchMatchList[this.searchNavigateIndex].groupId;for(;t<this.searchMatchList.length;){const i=this.searchMatchList[t];if(n!==i.groupId){e=!0,this.searchNavigateIndex=t;break}t++}if(!e){if(this.searchMatchList[0].groupId===n)return null;this.searchNavigateIndex=0}}return this.searchNavigateIndex}searchNavigateScrollIntoView(t){const{coordinate:{leftTop:e,leftBottom:n,rightTop:i},pageNo:r}=t,s=this.draw.getHeight(),a=this.draw.getPageGap(),c=r*(s+a),d=document.createElement("div");d.style.position="absolute";const u=50;d.style.width=`${i[0]-e[0]+u}px`,d.style.height=`${n[1]-e[1]+u}px`,d.style.left=`${e[0]}px`,d.style.top=`${e[1]+c}px`,this.draw.getContainer().append(d),d.scrollIntoView(!1),d.remove()}getSearchNavigateIndexList(){return this.searchNavigateIndex===null||!this.searchKeyword?[]:new Array(this.searchKeyword.length).fill(this.searchNavigateIndex).map((t,e)=>t+e)}getSearchMatchList(){return this.searchMatchList}getSearchNavigateInfo(){if(!this.searchKeyword||!this.searchMatchList.length)return null;const t=this.searchNavigateIndex!==null?this.searchNavigateIndex/this.searchKeyword.length+1:0;let e=0,n=null;for(let i=0;i<this.searchMatchList.length;i++){const r=this.searchMatchList[i];n!==r.groupId&&(n=r.groupId,e+=1)}return{index:t,count:e}}getMatchList(t,e){const{isRegEnable:n=!1,isIgnoreCase:i=!0}=this.searchOptions||{},r=i?t.toLocaleLowerCase():t,s=[],a=[],c=e.length,d=[];for(let g=0;g<c;g++)e[g].type===l.ElementType.TABLE&&d.push(g);let u=0,R=0;for(;R<c-1;){const g=d.length?d[u]:c,f=e.slice(R,g);f.length&&a.push({index:R,type:fe.PAGE,elementList:f});const T=e[g];T&&a.push({index:g,type:fe.TABLE,elementList:[T]}),R=g+1,u++}function h(g,f,T,m){if(!g)return;let p=T.map(S=>!S.type||zt.includes(S.type)&&S.controlComponent!==l.ControlComponent.CHECKBOX&&S.controlComponent!==l.ControlComponent.RADIO&&!S.hide&&!S.control?.hide&&!S.area?.hide?S.value:_).filter(Boolean).join("");i&&(p=p.toLocaleLowerCase());const I=[],L=n?new RegExp(g):g;let{index:P,length:C}=Zi(p,L);for(;P!==-1&&C!==0;){I.push({index:P,length:C});const S=Zi(p,L,P+C);P=S.index,C=S.length}for(let S=0;S<I.length;S++){const{index:F,length:N}=I[S],V=lt();for(let Y=0;Y<N;Y++){const E=F+Y+(m?.startIndex||0);s.push({type:f,index:E,groupId:V,...m})}}}for(let g=0;g<a.length;g++){const f=a[g];if(f.type===fe.TABLE){const T=f.elementList[0];for(let m=0;m<T.trList.length;m++){const p=T.trList[m];for(let I=0;I<p.tdList.length;I++){const L=p.tdList[I],P={tableId:T.id,tableIndex:f.index,trIndex:m,tdIndex:I,tdId:L.id};h(r,f.type,L.value,P)}}}else h(r,f.type,f.elementList,{startIndex:f.index})}return s}compute(t){const e=this.searchOptions?.isLimitSelection&&!this.range.getIsCollapsed(),n=e?this.range.getSelectionElementList():this.draw.getOriginalElementList();if(!n?.length||(this.searchMatchList=this.getMatchList(t,n),!e||!this.searchMatchList.length))return;const{startIndex:i}=this.range.getRange(),r=i+1;for(const s of this.searchMatchList)s.type===fe.TABLE?s.tableIndex+=r:s.index+=r}render(t,e){if(!this.searchMatchList||!this.searchMatchList.length||!this.searchKeyword)return;const{searchMatchAlpha:n,searchMatchColor:i,searchNavigateMatchColor:r}=this.options,s=this.position.getOriginalPositionList(),a=this.draw.getOriginalElementList();t.save(),t.globalAlpha=n;for(let c=0;c<this.searchMatchList.length;c++){const d=this.searchMatchList[c];let u=null;if(d.type===fe.TABLE){const{tableIndex:P,trIndex:C,tdIndex:S,index:F}=d;u=a[P]?.trList[C].tdList[S]?.positionList[F]}else u=s[d.index];if(!u)continue;const{coordinate:{leftTop:R,leftBottom:h,rightTop:g},pageNo:f}=u;if(f!==e)continue;if(this.getSearchNavigateIndexList().includes(c)){t.fillStyle=r;const P=this.searchMatchList[c-1];(!P||P.groupId!==d.groupId)&&this.searchNavigateScrollIntoView(u)}else t.fillStyle=i;const m=R[0],p=R[1],I=g[0]-R[0],L=h[1]-R[1];t.fillRect(m,p,I,L)}t.restore()}replace(t,e){if(this.draw.isReadonly()||t==null)return;let i=this.getSearchMatchList();const r=e?.index;if(Oo(r)){const T=[];i.forEach(m=>{const p=T[T.length-1];!p||p[0].groupId!==m.groupId?T.push([m]):p.push(m)}),i=T[r]}if(!i?.length)return;const s=this.draw.isDesignMode();let a=0,c=0,d="",u="",R=-1;const h=this.draw.getOriginalElementList();for(let T=0;T<i.length;T++){const m=i[T];if(m.type===fe.TABLE){const{tableIndex:p,trIndex:I,tdIndex:L,index:P,tdId:C}=m;u&&C!==u&&(c=0),u=C;const S=p+a,F=h[S].trList[I].tdList[L].value,N=P+c,V=F[N];if(!s&&(V?.control?.deletable===!1||V?.title?.deletable===!1))continue;if(t===""){this.draw.spliceElementList(F,N,1),c--,~R||(R=T);continue}if(d===m.groupId){this.draw.spliceElementList(F,N,1),c--;continue}~R||(R=T);for(let Y=0;Y<t.length;Y++){const E=t[Y];Y===0?V.value=E:(this.draw.spliceElementList(F,N+Y,0,[{...V,value:E}]),c++)}}else{const p=m.index+a,I=h[p];if(!s&&(I?.control?.deletable===!1||I?.title?.deletable===!1)||I.type===l.ElementType.CONTROL&&I.controlComponent!==l.ControlComponent.VALUE)continue;if(t===""){this.draw.spliceElementList(h,p,1),a--,~R||(R=T);continue}if(~R||(R=T),d===m.groupId){this.draw.spliceElementList(h,p,1),a--;continue}for(let L=0;L<t.length;L++){const P=t[L];L===0?I.value=P:(this.draw.spliceElementList(h,p+L,0,[{...I,value:P}]),a++)}}d=m.groupId}if(!~R)return;const g=i[R],f=g.index+(t.length-1);if(g.type===fe.TABLE){const{tableIndex:T,trIndex:m,tdIndex:p,index:I}=g,L=h[T].trList[m].tdList[p].value[I];this.position.setPositionContext({isTable:!0,index:T,trIndex:m,tdIndex:p,tdId:L.tdId,trId:L.trId,tableId:L.tableId})}else this.position.setPositionContext({isTable:!1});this.draw.getRange().setRange(f,f),this.draw.render({curIndex:f})}}class qa extends Go{options;constructor(t){super(),this.options=t.getOptions()}render(t){if(!this.fillRect.width)return;const{scale:e,strikeoutColor:n}=this.options,{x:i,y:r,width:s}=this.fillRect;t.save(),t.lineWidth=e,t.strokeStyle=n;const a=r-3;t.beginPath(),t.moveTo(i,a),t.lineTo(i+s,a),t.stroke(),t.beginPath(),t.moveTo(i,r+3.5),t.lineTo(i+s,r+3.5),t.stroke(),t.restore(),this.clearFillInfo()}}l.TextDecorationStyle=void 0,(function(o){o.SOLID="solid",o.DOUBLE="double",o.DASHED="dashed",o.DOTTED="dotted",o.WAVY="wavy"})(l.TextDecorationStyle||(l.TextDecorationStyle={}));var ln;(function(o){o.SOLID="solid",o.DASHED="dashed",o.DOTTED="dotted"})(ln||(ln={}));class tc extends Go{options;constructor(t){super(),this.options=t.getOptions()}_drawLine(t,e,n,i,r){const s=e+i;switch(t.beginPath(),r){case ln.DASHED:t.setLineDash([3,1]);break;case ln.DOTTED:t.setLineDash([1,1]);break}t.moveTo(e,n),t.lineTo(s,n),t.stroke()}_drawDouble(t,e,n,i){const s=e+i,a=n+3*this.options.scale;this.options.mode===l.EditorMode.PRINT?t.strokeStyle="transparent":t.strokeStyle="red",t.beginPath(),t.moveTo(e,n),t.lineTo(s,n),t.stroke(),t.beginPath(),t.moveTo(e,a),t.lineTo(s,a),t.stroke()}_drawWave(t,e,n,i){const{scale:r}=this.options,s=1.2*r,a=1/r,c=n+2*s;t.beginPath();for(let d=0;d<i;d++){const u=s*Math.sin(a*d);t.lineTo(e+d,c+u)}t.stroke()}render(t){if(!this.fillRect.width)return;const{underlineColor:e,scale:n}=this.options,{x:i,y:r,width:s}=this.fillRect;t.save(),t.strokeStyle=this.fillColor||e,t.lineWidth=n;const a=Math.floor(r+2*t.lineWidth)+.5;switch(this.fillDecorationStyle){case l.TextDecorationStyle.WAVY:this._drawWave(t,i,a,s);break;case l.TextDecorationStyle.DOUBLE:this._drawDouble(t,i,a,s);break;case l.TextDecorationStyle.DASHED:this._drawLine(t,i,a,s,ln.DASHED);break;case l.TextDecorationStyle.DOTTED:this._drawLine(t,i,a,s,ln.DOTTED);break;default:this._drawLine(t,i,a,s);break}t.restore(),this.clearFillInfo()}}class ec{draw;options;ctx;curX;curY;text;curStyle;curColor;cacheMeasureText;constructor(t){this.draw=t,this.options=t.getOptions(),this.ctx=t.getCtx(),this.curX=-1,this.curY=-1,this.text="",this.curStyle="",this.cacheMeasureText=new Map}measureBasisWord(t,e){t.save(),t.font=e;const n=this.measureText(t,{value:wr});return t.restore(),n}measureWord(t,e,n){const i=this.draw.getLetterReg();let r=0,s=null,a=n;for(;a<e.length;){const c=e[a];if(c.type&&c.type!==l.ElementType.TEXT||!i.test(c.value)){s=c;break}r+=this.measureText(t,c).width,a++}return{width:r,endElement:s}}buttonMeasureWord(t,e,n){const i=this.draw.getLetterReg();let r=0,s=null,a=n;for(;a<e.length;){const c=e[a];if(c.type&&c.type!==l.ElementType.TEXT||!i.test(c.value)){s=c;break}r+=this.measureText(t,c).width,a++}return{width:r,endElement:s}}measurePunctuationWidth(t,e){return!e||!Ur.includes(e.value)?0:(t.font=this.draw.getElementFont(e),this.measureText(t,e).width)}measureText(t,e){if(e.width){const s=t.measureText(e.value);return{width:e.width,actualBoundingBoxAscent:s.actualBoundingBoxAscent,actualBoundingBoxDescent:s.actualBoundingBoxDescent,actualBoundingBoxLeft:s.actualBoundingBoxLeft,actualBoundingBoxRight:s.actualBoundingBoxRight,fontBoundingBoxAscent:s.fontBoundingBoxAscent,fontBoundingBoxDescent:s.fontBoundingBoxDescent}}const n=`${e.value}${t.font}`,i=this.cacheMeasureText.get(n);if(i)return i;const r=t.measureText(e.value);return this.cacheMeasureText.set(n,r),r}getBasisWordBoundingBoxAscent(t,e){return this.measureBasisWord(t,e).actualBoundingBoxAscent}complete(){this._render(),this.text=""}record(t,e,n,i){if(this.ctx=t,this.options.renderMode===l.RenderMode.COMPATIBILITY){this._setCurXY(n,i),this.text=e.value,this.curStyle=e.style,this.curColor=e.color,this.complete();return}this.text||this._setCurXY(n,i),(this.curStyle&&e.style!==this.curStyle||e.color!==this.curColor)&&(this.complete(),this._setCurXY(n,i)),this.text+=e.value,this.curStyle=e.style,this.curColor=e.color}_setCurXY(t,e){this.curX=t,this.curY=e}_render(){!this.text||!~this.curX||!~this.curX||(this.ctx.save(),this.ctx.font=this.curStyle,this.ctx.fillStyle=this.curColor||this.options.defaultColor,this.ctx.fillText(this.text,this.curX,this.curY),this.ctx.restore())}}class an{draw;options;constructor(t){this.draw=t,this.options=t.getOptions()}static formatNumberPlaceholder(t,e,n,i){const r=i===l.NumberType.CHINESE?Br(e):`${e}`;return t.replace(n,r)}render(t,e){const{scale:n,pageNumber:{size:i,font:r,color:s,rowFlex:a,numberType:c,format:d,startPageNo:u,fromPageNo:R}}=this.options;if(e<R)return;let h=d;const g=new RegExp(Pn.PAGE_NO);g.test(h)&&(h=an.formatNumberPlaceholder(h,e+u-R,g,c));const f=new RegExp(Pn.PAGE_COUNT);f.test(h)&&(h=an.formatNumberPlaceholder(h,this.draw.getPageCount()-R,f,c));const T=this.draw.getWidth(),m=this.draw.getHeight(),p=this.draw.getPageNumberBottom(),I=m-p;t.save(),t.fillStyle=s,t.font=`${i*n}px ${r}`;let L=0;const P=this.draw.getMargins(),{width:C}=t.measureText(h);a===l.RowFlex.CENTER?L=(T-C)/2:a===l.RowFlex.RIGHT?L=T-C-P[1]:L=P[3],t.fillText(h,L,I),t.restore()}}class nc{draw;options;scrollContainer;constructor(t){this.draw=t,this.options=t.getOptions(),this.scrollContainer=this.getScrollContainer(),setTimeout(()=>{window.scrollY||this._observer()}),this._addEvent()}getScrollContainer(){return this.options.scrollContainerSelector&&document.querySelector(this.options.scrollContainerSelector)||document}_addEvent(){this.scrollContainer.addEventListener("scroll",this._observer)}removeEvent(){this.scrollContainer.removeEventListener("scroll",this._observer)}getElementVisibleInfo(t){const e=t.getBoundingClientRect(),n=this.scrollContainer===document?Math.max(document.documentElement.clientHeight,window.innerHeight):this.scrollContainer.clientHeight,i=Math.min(e.bottom,n)-Math.max(e.top,0);return{intersectionHeight:i>0?i:0}}getPageVisibleInfo(){const t=this.draw.getPageList(),e=[];let n=0,i=0;for(let r=0;r<t.length;r++){const s=t[r],{intersectionHeight:a}=this.getElementVisibleInfo(s);if(i&&!a)break;a&&e.push(r),a>i&&(i=a,n=r)}return{intersectionPageNo:n,visiblePageNoList:e}}_observer=xr(()=>{const{intersectionPageNo:t,visiblePageNoList:e}=this.getPageVisibleInfo();this.draw.setIntersectionPageNo(t),this.draw.setVisiblePageNoList(e)},150)}class oc{draw;step=5;thresholdPoints=[70,40,10,20];selectionContainer;rangeManager;requestAnimationFrameId;isMousedown;isMoving;clientWidth;clientHeight;containerRect;constructor(t){this.draw=t,this.rangeManager=t.getRange();const{scrollContainerSelector:e}=t.getOptions();this.selectionContainer=e&&document.querySelector(e)||document,this.requestAnimationFrameId=null,this.isMousedown=!1,this.isMoving=!1,this.clientWidth=0,this.clientHeight=0,this.containerRect=null,this._addEvent()}_addEvent(){const t=this.selectionContainer;t.addEventListener("mousedown",this._mousedown),t.addEventListener("mousemove",this._mousemove),t.addEventListener("mouseup",this._mouseup),document.addEventListener("mouseleave",this._mouseup)}removeEvent(){const t=this.selectionContainer;t.removeEventListener("mousedown",this._mousedown),t.removeEventListener("mousemove",this._mousemove),t.removeEventListener("mouseup",this._mouseup),document.removeEventListener("mouseleave",this._mouseup)}_mousedown=t=>{if(this.draw.isInteractionSuspended()){this._mouseup();return}if(!this.draw.isTargetInsideEditor(t.target)){this._mouseup();return}if(this.isMousedown=!0,this.clientWidth=this.selectionContainer instanceof Document?document.documentElement.clientWidth:this.selectionContainer.clientWidth,this.clientHeight=this.selectionContainer instanceof Document?document.documentElement.clientHeight:this.selectionContainer.clientHeight,!(this.selectionContainer instanceof Document)){const e=this.selectionContainer.getBoundingClientRect();this.containerRect=e}};_mouseup=()=>{this.isMousedown=!1,this._stopMove()};_mousemove=t=>{if(this.draw.isInteractionSuspended()||!this.isMousedown||this.rangeManager.getIsCollapsed())return;let{x:e,y:n}=t;this.containerRect&&(e=e-this.containerRect.x,n=n-this.containerRect.y),n<this.thresholdPoints[0]?this._startMove(Ut.UP):this.clientHeight-n<=this.thresholdPoints[1]?this._startMove(Ut.DOWN):e<this.thresholdPoints[2]?this._startMove(Ut.LEFT):this.clientWidth-e<this.thresholdPoints[3]?this._startMove(Ut.RIGHT):this._stopMove()};_move(t){const e=this.selectionContainer instanceof Document?window:this.selectionContainer,n=this.selectionContainer instanceof Document?window.scrollX:e.scrollLeft,i=this.selectionContainer instanceof Document?window.scrollY:e.scrollTop;t===Ut.DOWN?e.scrollTo(n,i+this.step):t===Ut.UP?e.scrollTo(n,i-this.step):t===Ut.LEFT?e.scrollTo(n-this.step,i):e.scrollTo(n+this.step,i),this.requestAnimationFrameId=window.requestAnimationFrame(this._move.bind(this,t))}_startMove(t){this.isMoving||(this.isMoving=!0,this._move(t))}_stopMove(){this.requestAnimationFrameId&&(window.cancelAnimationFrame(this.requestAnimationFrameId),this.requestAnimationFrameId=null,this.isMoving=!1)}}class ic{draw;range;options;constructor(t){this.draw=t,this.range=t.getRange(),this.options=t.getOptions()}getTrListGroupByCol(t){const e=at(t);for(let n=0;n<t.length;n++){const i=e[n];for(let r=i.tdList.length-1;r>=0;r--){const s=i.tdList[r],{rowspan:a,rowIndex:c,colIndex:d}=s,u=c+a-1;if(u!==r){const R=i.tdList.splice(r,1)[0];e[u]?.tdList.splice(d,0,R)}}}return e}getRangeRowCol(){const{isTable:t,index:e,trIndex:n,tdIndex:i}=this.draw.getPosition().getPositionContext();if(!t)return null;const{isCrossRowCol:r,startTdIndex:s,endTdIndex:a,startTrIndex:c,endTrIndex:d}=this.range.getRange(),h=this.draw.getOriginalElementList()[e].trList;if(!r)return[[h[n].tdList[i]]];let g=h[c].tdList[s],f=h[d].tdList[a];(g.x>f.x||g.y>f.y)&&([g,f]=[f,g]);const T=g.colIndex,m=f.colIndex+(f.colspan-1),p=g.rowIndex,I=f.rowIndex+(f.rowspan-1),L=[];for(let P=0;P<h.length;P++){const C=h[P],S=[];for(let F=0;F<C.tdList.length;F++){const N=C.tdList[F],V=N.colIndex,Y=N.rowIndex;V>=T&&V<=m&&Y>=p&&Y<=I&&S.push(N)}S.length&&L.push(S)}return L.length?L:null}_drawOuterBorder(t){const{ctx:e,startX:n,startY:i,width:r,height:s,isDrawFullBorder:a,borderExternalWidth:c}=t,{scale:d}=this.options,u=e.lineWidth;c&&(e.lineWidth=c*d),e.beginPath();const R=Math.round(n),h=Math.round(i);e.translate(.5,.5),a?e.rect(R,h,r,s):(e.moveTo(R,h+s),e.lineTo(R,h),e.lineTo(R+r,h)),e.stroke(),c&&(e.lineWidth=u),e.translate(-.5,-.5)}_drawSlash(t,e,n,i){const{scale:r}=this.options;t.save();const s=e.width*r,a=e.height*r,c=Math.round(e.x*r+n),d=Math.round(e.y*r+i);e.slashTypes?.includes(l.TdSlash.FORWARD)&&(t.moveTo(c+s,d),t.lineTo(c,d+a)),e.slashTypes?.includes(l.TdSlash.BACK)&&(t.moveTo(c,d),t.lineTo(c+s,d+a)),t.stroke(),t.restore()}_drawBorder(t,e,n,i){const{colgroup:r,trList:s,borderType:a,borderColor:c,borderWidth:d=1,borderExternalWidth:u}=e;if(!r||!s)return;const{scale:R,table:{defaultBorderColor:h}}=this.options,g=e.width*R,f=e.height*R,T=a===l.TableBorder.EMPTY,m=a===l.TableBorder.EXTERNAL,p=a===l.TableBorder.INTERNAL;t.save(),a===l.TableBorder.DASH&&t.setLineDash([3,3]),t.lineWidth=d*R,t.strokeStyle=c||h,!T&&!p&&this._drawOuterBorder({ctx:t,startX:n,startY:i,width:g,height:f,borderExternalWidth:u,isDrawFullBorder:m});for(let I=0;I<s.length;I++){const L=s[I];for(let P=0;P<L.tdList.length;P++){const C=L.tdList[P];if(C.slashTypes?.length&&this._drawSlash(t,C,n,i),!C.borderTypes?.length&&(T||m))continue;const S=C.width*R,F=C.height*R,N=Math.round(C.x*R+n+S),V=Math.round(C.y*R+i);if(t.translate(.5,.5),t.beginPath(),C.borderTypes?.includes(l.TdBorder.TOP)&&(t.moveTo(N-S,V),t.lineTo(N,V),t.stroke()),C.borderTypes?.includes(l.TdBorder.RIGHT)&&(t.moveTo(N,V),t.lineTo(N,V+F),t.stroke()),C.borderTypes?.includes(l.TdBorder.BOTTOM)&&(t.moveTo(N,V+F),t.lineTo(N-S,V+F),t.stroke()),C.borderTypes?.includes(l.TdBorder.LEFT)&&(t.moveTo(N-S,V),t.lineTo(N-S,V+F),t.stroke()),!T&&!m){if((!p||C.colIndex+C.colspan<r.length)&&(t.moveTo(N,V),t.lineTo(N,V+F),u&&u!==d&&C.colIndex+C.colspan===r.length)){const Y=t.lineWidth;t.lineWidth=u*R,t.stroke(),t.beginPath(),t.lineWidth=Y}if(!p||C.rowIndex+C.rowspan<s.length){const Y=u&&u!==d&&C.rowIndex+C.rowspan===s.length;if(Y&&(t.stroke(),t.beginPath()),t.moveTo(N,V+F),t.lineTo(N-S,V+F),Y){const E=t.lineWidth;t.lineWidth=u*R,t.stroke(),t.beginPath(),t.lineWidth=E}}t.stroke()}t.translate(-.5,-.5)}}t.restore()}_drawBackgroundColor(t,e,n,i){const{trList:r}=e;if(!r)return;const{scale:s}=this.options;for(let a=0;a<r.length;a++){const c=r[a];for(let d=0;d<c.tdList.length;d++){const u=c.tdList[d];if(!u.backgroundColor)continue;t.save();const R=u.width*s,h=u.height*s,g=Math.round(u.x*s+n),f=Math.round(u.y*s+i);t.fillStyle=u.backgroundColor,t.fillRect(g,f,R,h),t.restore()}}}getTableWidth(t){return t.colgroup.reduce((e,n)=>e+n.width,0)}getTableHeight(t){const e=t.trList;return e?.length?this.getTdListByColIndex(e,0).reduce((n,i)=>n+i.height,0):0}getRowCountByColIndex(t,e){return this.getTdListByColIndex(t,e).reduce((n,i)=>n+i.rowspan,0)}getTdListByColIndex(t,e){const n=[];for(let i=0;i<t.length;i++){const r=t[i].tdList;for(let s=0;s<r.length;s++){const a=r[s],c=a.colIndex,d=c+a.colspan-1;e>=c&&e<=d&&n.push(a)}}return n}getTdListByRowIndex(t,e){const n=[];for(let i=0;i<t.length;i++){const r=t[i].tdList;for(let s=0;s<r.length;s++){const a=r[s],c=a.rowIndex,d=c+a.rowspan-1;e>=c&&e<=d&&n.push(a)}}return n}computeRowColInfo(t){const{colgroup:e,trList:n}=t;if(!e||!n)return;let i=0;for(let r=0;r<n.length;r++){const s=n[r],a=n.length-1===r;for(let c=0;c<s.tdList.length;c++){const d=s.tdList[c];let u=0;if(n.length>1&&r!==0){const p=s.tdList[c-1],I=p?p.colIndex+p.colspan:c;for(let L=I;L<e.length;L++)if(this.getRowCountByColIndex(n.slice(0,r),L)===r){u=L;let C=0;for(let S=0;S<L;S++)C+=e[S].width;i=C;break}}else{const p=s.tdList[c-1];p&&(u=p.colIndex+p.colspan)}let R=0;for(let p=0;p<d.colspan;p++)R+=e[p+u].width;let h=0;for(let p=0;p<d.rowspan;p++){const I=n[p+r]||n[r];h+=I.height}const g=s.tdList.length-1===c;let f=a;if(!f&&d.rowspan>1){const p=n.length-1-r;f=d.rowspan-1===p}const T=a&&g;d.isLastRowTd=g,d.isLastColTd=f,d.isLastTd=T,d.x=i;let m=0;for(let p=0;p<r;p++){const I=n[p].tdList;for(let L=0;L<I.length;L++){const P=I[L];if(u>=P.colIndex&&u<P.colIndex+P.colspan){m+=P.height;break}}}d.y=m,d.width=R,d.height=h,d.rowIndex=r,d.colIndex=u,d.trIndex=r,d.tdIndex=c,i+=R,g&&!T&&(i=0)}}}drawRange(t,e,n,i){const{scale:r,rangeAlpha:s,rangeColor:a}=this.options,{type:c,trList:d}=e;if(!d||c!==l.ElementType.TABLE)return;const{isCrossRowCol:u,startTdIndex:R,endTdIndex:h,startTrIndex:g,endTrIndex:f}=this.range.getRange();if(!u)return;let T=d[g].tdList[R],m=d[f].tdList[h];(T.x>m.x||T.y>m.y)&&([T,m]=[m,T]);const p=T.colIndex,I=m.colIndex+(m.colspan-1),L=T.rowIndex,P=m.rowIndex+(m.rowspan-1);t.save();for(let C=0;C<d.length;C++){const S=d[C];for(let F=0;F<S.tdList.length;F++){const N=S.tdList[F],V=N.colIndex,Y=N.rowIndex;if(V>=p&&V<=I&&Y>=L&&Y<=P){const E=N.x*r,W=N.y*r,X=N.width*r,O=N.height*r;t.globalAlpha=s,t.fillStyle=a,t.fillRect(E+n,W+i,X,O)}}}t.restore()}render(t,e,n,i){this._drawBackgroundColor(t,e,n,i),this._drawBorder(t,e,n,i)}findPreRowSpanTd(t,e,n){for(let i=e;i>=0;i--){const r=t[i].tdList.find(s=>s.colIndex===n);if(r)return r}}computeTrHeight(t,e){const{scale:n,table:{tdPadding:i,defaultTrMinHeight:r}}=this.options,s=t.tdPadding||i,a=s[0]+s[2],c=t.trList;for(let R=0;R<c.length;R++){const h=c[R];h.height=h.minHeight||r,h.minHeight=h.height}this.computeRowColInfo(t);const d={},u={};for(let R=0;R<c.length;R++){const h=c[R];if(!h.tdList.length){h.height=0;continue}const g=[],f=[];for(let m=0;m<t.colgroup.length;m++){const p=h.tdList.find(I=>I.colIndex===m);if(p){const I=e?e(p):p.rowList,L=I.reduce((C,S)=>C+S.height,0);p.rowList=I;const P=L/n+a;p.mainHeight=P,p.rowspan>1?(u[p.colIndex]=p.id,d[p.id]={td:p,rowSpan:[R,R+p.rowspan-1],preHeight:0,preMinHeight:0,extraHeight:P},f.push(P)):p.height<P?(p.height=P,p.realHeight=P,g.push(P)):g.push(p.height)}else{const I=d[u[m]];I?.rowSpan[1]==R&&g.push(I.extraHeight)}}const T=Math.max(...g.length?g:f);Object.values(d).forEach(m=>{m.rowSpan[0]<=R&&m.rowSpan[1]>=R&&(m.extraHeight-=T,m.preHeight+=T,m.preMinHeight+=h.minHeight)}),h.height=T;for(let m=0;m<t.colgroup.length;m++){const p=h.tdList.find(I=>I.colIndex===m)??this.findPreRowSpanTd(c,R,m);if(p){const I=d[p.id]?.preHeight??0,L=d[p.id]?.preMinHeight??h.minHeight;p.height=T+I,p.realHeight=T+I,p.realMinHeight=L}}}this.computeRowColInfo(t)}}var me;(function(o){o.ROW="row",o.COL="col"})(me||(me={}));class sc{MIN_TD_WIDTH=20;ROW_COL_OFFSET=18;ROW_COL_QUICK_WIDTH=16;ROW_COL_QUICK_OFFSET=5;ROW_COL_QUICK_POSITION=this.ROW_COL_OFFSET+(this.ROW_COL_OFFSET-this.ROW_COL_QUICK_WIDTH)/2;BORDER_VALUE=4;TABLE_SELECT_OFFSET=20;draw;canvas;options;position;range;container;toolRowContainer;toolRowAddBtn;toolColAddBtn;toolTableSelectBtn;toolColContainer;toolBorderContainer;anchorLine;mousedownX;mousedownY;constructor(t){this.draw=t,this.canvas=t.getPage(),this.options=t.getOptions(),this.position=t.getPosition(),this.range=t.getRange(),this.container=t.getContainer(),this.toolRowContainer=null,this.toolRowAddBtn=null,this.toolColAddBtn=null,this.toolTableSelectBtn=null,this.toolColContainer=null,this.toolBorderContainer=null,this.anchorLine=null,this.mousedownX=0,this.mousedownY=0}dispose(){this.toolRowContainer?.remove(),this.toolRowAddBtn?.remove(),this.toolColAddBtn?.remove(),this.toolTableSelectBtn?.remove(),this.toolColContainer?.remove(),this.toolBorderContainer?.remove(),this.toolRowContainer=null,this.toolRowAddBtn=null,this.toolColAddBtn=null,this.toolTableSelectBtn=null,this.toolColContainer=null,this.toolBorderContainer=null}render(){if(this.draw.getMode()===l.EditorMode.FORM){this.dispose();return}const{isTable:t,index:e,trIndex:n,tdIndex:i}=this.position.getPositionContext();if(!t)return;this.dispose();const r=this.draw.getOriginalElementList(),s=this.position.getOriginalPositionList(),a=r[e];if(a.tableToolDisabled&&!this.draw.isDesignMode())return;const{scale:c,table:{overflow:d}}=this.options,u=s[e],{colgroup:R,trList:h}=a,{coordinate:{leftTop:g}}=u,f=this.draw.getHeight(),T=this.draw.getPageGap(),m=this.draw.getPageNo()*(f+T),p=g[0],I=g[1]+m,L=a.trList[n].tdList[i],P=L.rowIndex,C=L.colIndex,S=a.height*c,F=a.width*c,N=document.createElement("div");N.classList.add(`${z}-table-tool__select`),N.style.height=`${S*c}`,N.style.left=`${p}px`,N.style.top=`${I}px`,N.style.transform=`translate(-${this.TABLE_SELECT_OFFSET*c}px, ${-this.TABLE_SELECT_OFFSET*c}px)`,N.onclick=()=>{this.draw.getTableOperate().tableSelectAll()},this.container.append(N),this.toolTableSelectBtn=N;const V=h.map(b=>b.height),Y=document.createElement("div");Y.classList.add(`${z}-table-tool__row`),Y.style.transform=`translateX(-${this.ROW_COL_OFFSET*c}px)`;for(let b=0;b<V.length;b++){const y=V[b]*c,D=document.createElement("div");D.classList.add(`${z}-table-tool__row__item`),b===P&&D.classList.add("active"),D.onclick=()=>{const Q=this.draw.getTableParticle().getTdListByRowIndex(h,b),G=Q[0],H=Q[Q.length-1];this.position.setPositionContext({index:e,isTable:!0,trIndex:G.trIndex,tdIndex:G.tdIndex,tableId:a.id}),this.range.setRange(0,0,a.id,G.tdIndex,H.tdIndex,G.trIndex,H.trIndex),this.draw.render({curIndex:0,isCompute:!1,isSubmitHistory:!1}),this._setAnchorActive(Y,b)};const U=document.createElement("div");U.classList.add(`${z}-table-tool__anchor`),U.onmousedown=Q=>{this._mousedown({evt:Q,element:a,index:b,order:me.ROW})},D.append(U),D.style.height=`${y}px`,Y.append(D)}Y.style.left=`${p}px`,Y.style.top=`${I}px`,this.container.append(Y),this.toolRowContainer=Y;const E=document.createElement("div");E.classList.add(`${z}-table-tool__quick__add`),E.style.height=`${S*c}`,E.style.left=`${p}px`,E.style.top=`${I+S}px`,E.style.transform=`translate(-${this.ROW_COL_QUICK_POSITION*c}px, ${this.ROW_COL_QUICK_OFFSET*c}px)`,E.onclick=()=>{this.position.setPositionContext({index:e,isTable:!0,trIndex:h.length-1,tdIndex:0,tableId:a.id}),this.draw.getTableOperate().insertTableBottomRow()},this.container.append(E),this.toolRowAddBtn=E;const W=R.map(b=>b.width),X=document.createElement("div");X.classList.add(`${z}-table-tool__col`),X.style.transform=`translateY(-${this.ROW_COL_OFFSET*c}px)`;for(let b=0;b<W.length;b++){const y=W[b]*c,D=document.createElement("div");D.classList.add(`${z}-table-tool__col__item`),b===C&&D.classList.add("active"),D.onclick=()=>{const Q=this.draw.getTableParticle().getTdListByColIndex(h,b),G=Q[0],H=Q[Q.length-1];this.position.setPositionContext({index:e,isTable:!0,trIndex:G.trIndex,tdIndex:G.tdIndex,tableId:a.id}),this.range.setRange(0,0,a.id,G.tdIndex,H.tdIndex,G.trIndex,H.trIndex),this.draw.render({curIndex:0,isCompute:!1,isSubmitHistory:!1}),this._setAnchorActive(X,b)};const U=document.createElement("div");U.classList.add(`${z}-table-tool__anchor`),U.onmousedown=Q=>{this._mousedown({evt:Q,element:a,index:b,order:me.COL})},D.append(U),D.style.width=`${y}px`,X.append(D)}X.style.left=`${p}px`,X.style.top=`${I}px`,this.container.append(X),this.toolColContainer=X;const O=document.createElement("div");O.classList.add(`${z}-table-tool__quick__add`),O.style.height=`${S*c}`,O.style.left=`${p+F}px`,O.style.top=`${I}px`,O.style.transform=`translate(${this.ROW_COL_QUICK_OFFSET*c}px, -${this.ROW_COL_QUICK_POSITION*c}px)`,O.onclick=()=>{this.position.setPositionContext({index:e,isTable:!0,trIndex:0,tdIndex:h[0].tdList.length-1||0,tableId:a.id}),this.draw.getTableOperate().insertTableRightCol()},this.container.append(O),this.toolColAddBtn=O;const M=document.createElement("div");M.classList.add(`${z}-table-tool__border`),M.style.height=`${S}px`,M.style.width=`${F}px`,M.style.left=`${p}px`,M.style.top=`${I}px`;for(let b=0;b<h.length;b++){const y=h[b];for(let D=0;D<y.tdList.length;D++){const U=y.tdList[D],Q=document.createElement("div");Q.classList.add(`${z}-table-tool__border__row`),Q.style.width=`${U.width*c}px`,Q.style.height=`${this.BORDER_VALUE}px`,Q.style.top=`${(U.y+U.height)*c-this.BORDER_VALUE/2}px`,Q.style.left=`${U.x*c}px`,Q.onmousedown=H=>{this._mousedown({evt:H,element:a,index:U.rowIndex+U.rowspan-1,order:me.ROW})},M.appendChild(Q);const G=document.createElement("div");if(G.classList.add(`${z}-table-tool__border__col`),G.style.width=`${this.BORDER_VALUE}px`,G.style.height=`${U.height*c}px`,G.style.top=`${U.y*c}px`,G.style.left=`${(U.x+U.width)*c-this.BORDER_VALUE/2}px`,G.onmousedown=H=>{this._mousedown({evt:H,element:a,index:U.colIndex+U.colspan-1,order:me.COL})},M.appendChild(G),d&&U.colIndex===0){const H=document.createElement("div");H.classList.add(`${z}-table-tool__border__col`),H.style.width=`${this.BORDER_VALUE}px`,H.style.height=`${U.height*c}px`,H.style.top=`${U.y*c}px`,H.style.left=`${U.x*c-this.BORDER_VALUE/2}px`,H.onmousedown=tt=>{this._mousedown({evt:tt,element:a,index:0,isLeftStartBorder:!0,order:me.COL})},M.appendChild(H)}}}this.container.append(M),this.toolBorderContainer=M}_setAnchorActive(t,e){const n=t.children;for(let i=0;i<n.length;i++){const r=n[i];i===e?r.classList.add("active"):r.classList.remove("active")}}_mousedown(t){const{evt:e,index:n,order:i,element:r,isLeftStartBorder:s}=t;this.canvas=this.draw.getPage();const{scale:a,table:{overflow:c}}=this.options,d=this.draw.getWidth(),u=this.draw.getHeight(),R=this.draw.getPageGap(),h=this.draw.getPageNo()*(u+R),g=this.position.getPositionContext(),m=(this.position.getOriginalPositionList()[g.index]?.coordinate?.leftTop?.[0]||0)*a,p=this.draw.getMargins(),I=p[0],L=p[1],P=I,C=d-L;this.mousedownX=e.x,this.mousedownY=e.y;const S=e.target,F=this.canvas.getBoundingClientRect(),N=window.getComputedStyle(S).cursor;document.body.style.cursor=N,this.canvas.style.cursor=N;let V=0,Y=0;const E=document.createElement("div");E.classList.add(`${z}-table-anchor__line`),i===me.ROW?(E.classList.add(`${z}-table-anchor__line__row`),E.style.width=`${d}px`,V=0,Y=h+this.mousedownY-F.top):(E.classList.add(`${z}-table-anchor__line__col`),E.style.height=`${u}px`,V=this.mousedownX-F.left,Y=h),E.style.left=`${V}px`,E.style.top=`${Y}px`,this.container.append(E),this.anchorLine=E;let W=0,X=0;const O=M=>{const b=this._mousemove(M,i,V,Y);b&&(W=b.dx,X=b.dy)};document.addEventListener("mousemove",O),document.addEventListener("mouseup",()=>{let M=!1;if(i===me.ROW){const b=r.trList,y=b[n]||b[n-1],{defaultTrMinHeight:D}=this.options.table;X<0&&y.height+X<D&&(X=D-y.height),X&&(y.height+=X,y.minHeight=y.height,M=!0)}else{const{colgroup:b}=r;if(b&&W)if(c&&s){b[n].width-W/a<=this.MIN_TD_WIDTH&&(W=(b[n].width-this.MIN_TD_WIDTH)*a);const y=m+(r.translateX||0)*a;y+W<P&&(W=P-y),b[n].width-=W/a,r.width-=W/a,r.translateX=(r.translateX||0)+W/a,M=!0}else{const y=b[n].width;W<0&&y*a+W<this.MIN_TD_WIDTH*a&&(W=this.MIN_TD_WIDTH*a-y*a);const D=b[n+1]?.width;if(W>0&&D&&D*a-W<this.MIN_TD_WIDTH*a&&(W=D*a-this.MIN_TD_WIDTH*a),n===b.length-1){const Q=m+(r.translateX||0)*a+r.width*a;Q+W>C&&(W=C-Q)}W&&(b.length-1!==n&&(b[n+1].width-=W/a),b[n].width+=W/a,M=!0)}}M&&this.draw.render({isSetCursor:!1}),E.remove(),document.removeEventListener("mousemove",O),document.body.style.cursor="",this.canvas.style.cursor="text"},{once:!0}),e.preventDefault()}_mousemove(t,e,n,i){if(!this.anchorLine)return null;const r=t.x-this.mousedownX,s=t.y-this.mousedownY;return e===me.ROW?this.anchorLine.style.top=`${i+s}px`:this.anchorLine.style.left=`${n+r}px`,t.preventDefault(),{dx:r,dy:s}}}class rc{draw;options;container;hyperlinkPopupContainer;hyperlinkDom;constructor(t){this.draw=t,this.options=t.getOptions(),this.container=t.getContainer();const{hyperlinkPopupContainer:e,hyperlinkDom:n}=this._createHyperlinkPopupDom();this.hyperlinkDom=n,this.hyperlinkPopupContainer=e}_createHyperlinkPopupDom(){const t=document.createElement("div");t.classList.add(`${z}-hyperlink-popup`);const e=document.createElement("a");return e.target="_blank",e.rel="noopener",t.append(e),this.container.append(t),{hyperlinkPopupContainer:t,hyperlinkDom:e}}drawHyperlinkPopup(t,e){const{coordinate:{leftTop:[n,i]},lineHeight:r}=e,s=this.draw.getHeight(),a=this.draw.getPageGap(),c=this.draw.getPageNo()*(s+a);this.hyperlinkPopupContainer.style.display="block",this.hyperlinkPopupContainer.style.left=`${n}px`,this.hyperlinkPopupContainer.style.top=`${i+c+r}px`;const d=t.url||"#";this.hyperlinkDom.href=d,this.hyperlinkDom.title=d,this.hyperlinkDom.innerText=d}clearHyperlinkPopup(){this.hyperlinkPopupContainer.style.display="none"}openHyperlink(t){const e=window.open(t.url,"_blank");e&&(e.opener=null)}render(t,e,n,i){t.save(),t.font=e.style,e.color||(e.color=this.options.defaultHyperlinkColor),t.fillStyle=e.color,e.underline===void 0&&(e.underline=!0),t.fillText(e.value,n,i),t.restore()}}class lc{options;constructor(t){this.options=t.getOptions()}render(t,e,n,i){const{scale:r,label:{defaultBackgroundColor:s,defaultColor:a,defaultBorderRadius:c,defaultPadding:d}}=this.options,u=e.label?.backgroundColor||s,R=e.label?.color||a,h=e.label?.borderRadius||c,g=e.label?.padding||d;t.save(),t.font=e.style;const{width:f,height:T,boundingBoxAscent:m}=e.metrics;t.fillStyle=u,this._drawRoundedRect(t,n,i-m,f,T+(g[0]+g[3])*r,h*r),t.fill(),t.fillStyle=R,t.fillText(e.value,n+g[3]*r,i),t.restore()}_drawRoundedRect(t,e,n,i,r,s){t.beginPath(),t.moveTo(e+s,n),t.lineTo(e+i-s,n),t.quadraticCurveTo(e+i,n,e+i,n+s),t.lineTo(e+i,n+r-s),t.quadraticCurveTo(e+i,n+r,e+i-s,n+r),t.lineTo(e+s,n+r),t.quadraticCurveTo(e,n+r,e,n+r-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+s,n),t.closePath()}}class ac{options;draw;activeInlineEditor;constructor(t){this.draw=t,this.options=t.getOptions(),this.activeInlineEditor=null}render(t,e,n,i){const r=this.draw.getMode(),s=e.macroConfig;if(r===l.EditorMode.EDIT){const c=e.label||e.value||"";this._renderEditMode(t,e,n,i,c);return}if(e.type==="macro"){const c=e.label||"",d=e.value||`获取 ${c}`;this._renderPlainText(t,e,n,i,d);return}if(e.type==="customMacro"){const c=s?.type||"text",d=s?.value||"",u=e.label||"";if(r===l.EditorMode.FORM)this.activeInlineEditor?.elementId===e.id&&this._syncInlineEditorPosition(),c==="select"?this._renderSelectControl(t,e,n,i,d):this._renderTextControl(t,e,n,i,d);else{const R=d||`获取 ${u}`;this._renderPlainText(t,e,n,i,R)}return}if(e.type==="reusableItem"){const d=e.reusableItemConfig?.value||"",u=e.label||"";if(r===l.EditorMode.FORM)this._renderTextControl(t,e,n,i,d);else{const R=d||`获取 ${u}`;this._renderPlainText(t,e,n,i,R)}return}if(e.type==="subTemplate"){const c=e.label||"子模板";r===l.EditorMode.FORM?e.subTemplateExpanded||this._renderEditMode(t,e,n,i,c):this._renderPlainText(t,e,n,i,c);return}const a=e.value||e.label||"";this._renderPlainText(t,e,n,i,a)}activateInlineEditor(t,e){if(this.draw.getMode()!==l.EditorMode.FORM||t.type!=="customMacro")return!1;const n=this._ensureMacroConfig(t),i=n.type||"text",r=this.activeInlineEditor;if(r&&r.elementId===t.id&&r.type===i)return r.input.focus(),r.input instanceof HTMLInputElement&&r.input.select(),!0;this.clearInlineEditor({isSubmitHistory:!1});const s=document.createElement("div");s.style.position="absolute",s.style.zIndex="1002",s.style.boxSizing="border-box",s.style.display="flex",s.style.alignItems="center";const a=this._getInlineEditorBaseStyle(t);let c;i==="select"?c=this._createSelectEditor(t,s):c=this._createTextEditor(t,s),c.style.boxSizing="border-box",c.style.width="100%",c.style.height="100%",c.style.border="none",c.style.outline="none",c.style.background="transparent",c.style.font=a.font,c.style.color=a.color,c.style.padding=a.padding,c.style.margin="0",s.append(c),s.addEventListener("mousedown",u=>u.stopPropagation()),s.addEventListener("click",u=>u.stopPropagation()),this.draw.getContainer().append(s),this.draw.setOverlayActive(!0);const d=u=>{const R=u.target;R instanceof Node&&s.contains(R)||this.clearInlineEditor()};return document.addEventListener("mousedown",d,!0),this.activeInlineEditor={elementId:t.id,index:e,type:i,wrapper:s,input:c,initialValue:n.value||"",initialCode:n.code,outsideHandler:d},this._syncInlineEditorPosition(),c.focus(),c instanceof HTMLInputElement?c.select():"showPicker"in c&&typeof c.showPicker=="function"?c.showPicker():c.click(),!0}clearInlineEditor(t={}){const e=this.activeInlineEditor;if(!e)return;const{isSubmitHistory:n=!0,isRestore:i=!1}=t;document.removeEventListener("mousedown",e.outsideHandler,!0);const r=this._getInlineEditorElement(e),s=r?.macroConfig,a=e.input.value||"",c=e.input instanceof HTMLSelectElement&&e.input.value||"";if(r&&s&&(i?(s.value=e.initialValue,e.type==="select"&&(s.code=e.initialCode)):e.type==="text"?s.value=a:(s.code=c||void 0,s.value=this._getSelectLabelByCode(s,c))),e.wrapper.remove(),this.activeInlineEditor=null,this.draw.setOverlayActive(!1),r&&!i){const d=this._ensureMacroConfig(r),u=d.value||"",R=d.code;u!==e.initialValue||R!==e.initialCode?this.draw.getCommand().setMacroValue({id:r.id,dictCode:r.dictCode,label:r.label,areaId:r.areaId,value:u,code:R,isSubmitHistory:n}):this.draw.render({isSubmitHistory:!1,isSetCursor:!1})}else this.draw.render({isSubmitHistory:!1,isSetCursor:!1})}_renderPlainText(t,e,n,i,r){t.save(),t.font=e.style,t.fillStyle=e.color||"#000000",t.textBaseline="alphabetic",t.fillText(r,n,i),t.restore()}_renderEditMode(t,e,n,i,r){const{scale:s}=this.options,a=e.type==="customMacro",c=e.type==="reusableItem",d=e.type==="subTemplate";let u,R;d?(u="#722ed1",R="#f9f0ff"):c?(u="#52c41a",R="#f6ffed"):a?(u="#fa8c16",R="#fff7e6"):(u="#1677ff",R="#e6f4ff"),t.save(),t.font=e.style;const h=t.measureText(r),g=h.actualBoundingBoxAscent+h.actualBoundingBoxDescent,f=8*s,T=4*s,m=4*s,p=h.width+f*2,I=g+T*2,L=e.metrics,P=n,C=i-L.boundingBoxAscent+(L.boundingBoxAscent+L.boundingBoxDescent-I)/2;t.fillStyle=R,this._drawRoundedRect(t,P,C,p,I,m),t.fill(),t.fillStyle=u,t.textBaseline="middle",t.fillText(r,n+f,C+I/2),t.restore()}_renderTextControl(t,e,n,i,r){const{scale:s,control:a,strikeoutColor:c}=this.options,{placeholderColor:d,bracketColor:u}=a;t.save(),t.font=e.style;const h=`请输入${e.label||""}`,g=r||h,T=t.measureText(g).width;t.fillStyle=u,t.textBaseline="alphabetic",t.fillText("[",n,i);const m=n+t.measureText("[").width;t.fillStyle=r?e.color||"#000000":d,t.fillText(g,m,i);const p=m+T;if(t.fillStyle=u,t.fillText("]",p,i),e.type==="reusableItem"){const I=t.measureText("[").width+T+t.measureText("]").width;if(t.lineWidth=s,this.draw.getMode()===l.EditorMode.PRINT?t.strokeStyle="transparent":t.strokeStyle=c||"red",e.strikeout){const L=i-3*s,P=i+3.5*s;t.beginPath(),t.moveTo(n,L),t.lineTo(n+I,L),t.stroke(),t.beginPath(),t.moveTo(n,P),t.lineTo(n+I,P),t.stroke()}else if(e.underline&&e.textDecoration?.style==="double"){const L=Math.floor(i+2*s)+.5,P=3*s;t.beginPath(),t.moveTo(n,L),t.lineTo(n+I,L),t.stroke(),t.beginPath(),t.moveTo(n,L+P),t.lineTo(n+I,L+P),t.stroke()}}t.restore()}_renderSelectControl(t,e,n,i,r){const{scale:s,control:a}=this.options,{placeholderColor:c,bracketColor:d}=a;t.save(),t.font=e.style;const R=`请选择${e.label||""}`,h=r||R,g=t.measureText(h),f=g.actualBoundingBoxAscent+g.actualBoundingBoxDescent;t.fillStyle=d,t.textBaseline="alphabetic",t.fillText("[",n,i);const T=n+t.measureText("[").width;t.fillStyle=r?e.color||"#000000":c,t.fillText(h,T,i);const m=T+g.width+2*s,p=i-f/2;t.beginPath(),t.moveTo(m,p-2*s),t.lineTo(m+5*s,p-2*s),t.lineTo(m+2.5*s,p+2*s),t.closePath(),t.fillStyle="#666666",t.fill();const I=m+6*s;t.fillStyle=d,t.fillText("]",I,i),t.restore()}_drawRoundedRect(t,e,n,i,r,s){t.beginPath(),t.moveTo(e+s,n),t.lineTo(e+i-s,n),t.quadraticCurveTo(e+i,n,e+i,n+s),t.lineTo(e+i,n+r-s),t.quadraticCurveTo(e+i,n+r,e+i-s,n+r),t.lineTo(e+s,n+r),t.quadraticCurveTo(e,n+r,e,n+r-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+s,n),t.closePath()}_createTextEditor(t,e){const n=document.createElement("input");return n.type="text",n.value=t.macroConfig?.value||"",n.placeholder=`请输入${t.label||""}`,n.style.minWidth="0",n.style.background="#ffffff",n.addEventListener("input",()=>{const i=this._ensureMacroConfig(t);i.value=n.value}),n.addEventListener("keydown",i=>{i.key==="Enter"?(i.preventDefault(),this.clearInlineEditor()):i.key==="Escape"&&(i.preventDefault(),this.clearInlineEditor({isSubmitHistory:!1,isRestore:!0}))}),n.addEventListener("blur",()=>{this.activeInlineEditor?.input===n&&this.clearInlineEditor()}),e.style.background="#ffffff",e.style.border="1px solid #1677ff",e.style.borderRadius="4px",e.style.boxShadow="0 0 0 2px rgba(22, 119, 255, 0.12)",n}_createSelectEditor(t,e){const n=document.createElement("select"),i=this._ensureMacroConfig(t),r=document.createElement("option");return r.value="",r.textContent=`请选择${t.label||""}`,n.append(r),i.items?.forEach(s=>{const a=document.createElement("option");a.value=s.code,a.textContent=s.value,n.append(a)}),n.value=i.code||i.items?.find(s=>s.value===i.value)?.code||"",n.addEventListener("change",()=>{i.code=n.value||void 0,i.value=this._getSelectLabelByCode(i,n.value),this.clearInlineEditor()}),n.addEventListener("keydown",s=>{s.key==="Escape"?(s.preventDefault(),this.clearInlineEditor({isSubmitHistory:!1,isRestore:!0})):s.key==="Enter"&&(s.preventDefault(),this.clearInlineEditor())}),n.addEventListener("blur",()=>{this.activeInlineEditor?.input===n&&this.clearInlineEditor()}),e.style.background="#ffffff",e.style.border="1px solid #1677ff",e.style.borderRadius="4px",e.style.boxShadow="0 0 0 2px rgba(22, 119, 255, 0.12)",n}_syncInlineEditorPosition(){const t=this.activeInlineEditor;if(!t)return;const e=this._getInlineEditorPosition(t);if(!e){this.clearInlineEditor({isSubmitHistory:!1});return}const n=e.pageNo*(this.draw.getHeight()+this.draw.getPageGap()),[i,r]=e.coordinate.leftTop,s=Math.max(e.lineHeight,e.metrics.height),a=Math.max(e.metrics.width,80*this.options.scale),c=Math.max(0,(e.lineHeight-s)/2);t.wrapper.style.left=`${i}px`,t.wrapper.style.top=`${r+n+c}px`,t.wrapper.style.width=`${a}px`,t.wrapper.style.height=`${s}px`}_getInlineEditorBaseStyle(t){return{font:this.draw.getElementFont(t),color:t.color||"#000000",padding:`0 ${6*this.options.scale}px`}}_getInlineEditorElement(t){const e=this.draw.getElementList()[t.index];return e?.id===t.elementId?e:t.elementId?this.draw.getElementList().find(n=>n.id===t.elementId)||null:e||null}_getInlineEditorPosition(t){return this.draw.getPosition().getPositionList()[t.index]||null}_ensureMacroConfig(t){return t.macroConfig||(t.macroConfig={type:"text"}),t.macroConfig}_getSelectLabelByCode(t,e){return e&&t.items?.find(n=>n.code===e)?.value||""}}class cc{draw;position;zone;options;elementList;rowList;positionList;constructor(t,e){this.draw=t,this.position=t.getPosition(),this.zone=t.getZone(),this.options=t.getOptions(),this.elementList=e||[],this.rowList=[],this.positionList=[]}getRowList(){return this.rowList}setElementList(t){this.elementList=t}getElementList(){return this.elementList}getPositionList(){return this.positionList}compute(){this.recovery(),this._computeRowList(),this._computePositionList()}recovery(){this.rowList=[],this.positionList=[]}_computeRowList(){const t=this.draw.getInnerWidth(),e=this.draw.getMargins(),n=Zo(this.elementList);this.rowList=this.draw.computeRowList({startX:e[3],startY:this.getHeaderTop(),innerWidth:t,elementList:this.elementList,surroundElementList:n})}_computePositionList(){const t=this.getHeaderTop(),e=this.draw.getInnerWidth(),i=this.draw.getMargins()[3],r=t;this.position.computePageRowPosition({positionList:this.positionList,rowList:this.rowList,pageNo:0,startRowIndex:0,startIndex:0,startX:i,startY:r,innerWidth:e,zone:l.EditorZone.HEADER})}getHeaderTop(){const{header:{top:t,disabled:e},scale:n}=this.options;return e?0:Math.floor(t*n)}getMaxHeight(){const{header:{maxHeightRadio:t}}=this.options,e=this.draw.getHeight();return Math.floor(e*bi[t])}getHeight(){if(this.options.header.disabled)return 0;const t=this.getMaxHeight(),e=this.getRowHeight();return e>t?t:e}getRowHeight(){return this.rowList.reduce((t,e)=>t+e.height,0)}getExtraHeight(){const t=this.draw.getMargins(),e=this.getHeight(),i=this.getHeaderTop()+e-t[0];return i<=0?0:i}render(t,e){t.save(),t.globalAlpha=this.zone.isHeaderActive()?1:this.options.header.inactiveAlpha;const n=this.draw.getInnerWidth(),i=this.getMaxHeight(),r=[];let s=0;for(let a=0;a<this.rowList.length;a++){const c=this.rowList[a];if(s+c.height>i)break;r.push(c),s+=c.height}this.draw.drawRow(t,{elementList:this.elementList,positionList:this.positionList,rowList:r,pageNo:e,startIndex:0,innerWidth:n,zone:l.EditorZone.HEADER}),t.restore()}}class dc{getOffsetY(t){return-t.metrics.height/2}render(t,e,n,i){t.save(),t.font=e.style,e.color&&(t.fillStyle=e.color),t.fillText(e.value,n,i+this.getOffsetY(e)),t.restore()}}class uc{getOffsetY(t){return t.metrics.height/2}render(t,e,n,i){t.save(),t.font=e.style,e.color&&(t.fillStyle=e.color),t.fillText(e.value,n,i+this.getOffsetY(e)),t.restore()}}class Rc{options;constructor(t){this.options=t.getOptions()}render(t,e,n,i){t.save();const{scale:r,separator:{lineWidth:s,strokeStyle:a}}=this.options;t.lineWidth=(e.lineWidth||s)*r,t.strokeStyle=e.color||a,e.dashArray?.length&&t.setLineDash(e.dashArray);const c=Math.round(i);t.translate(0,t.lineWidth/2),t.beginPath(),t.moveTo(n,c),t.lineTo(n+e.width*r,c),t.stroke(),t.restore()}}class hc{draw;options;i18n;constructor(t){this.draw=t,this.options=t.getOptions(),this.i18n=t.getI18n()}render(t,e,n,i){const{pageBreak:{font:r,fontSize:s,lineDash:a}}=this.options,c=this.i18n.t("pageBreak.displayName"),{scale:d,defaultRowMargin:u}=this.options,R=s*d,h=e.width*d,g=this.draw.getDefaultBasicRowMarginHeight()*u;t.save(),t.font=`${R}px ${r}`;const f=t.measureText(c),T=(h-f.width)/2;t.setLineDash(a),t.translate(0,.5+g),t.beginPath(),t.moveTo(n,i),t.lineTo(n+T,i),t.moveTo(n+T+f.width,i),t.lineTo(n+h,i),t.stroke(),t.fillText(c,n+T,i+f.actualBoundingBoxAscent-R/2),t.restore()}}class gc{draw;options;imageCache;constructor(t){this.draw=t,this.options=t.getOptions(),this.imageCache=new Map}renderText(t,e){const{watermark:{data:n,opacity:i,font:r,size:s,color:a,repeat:c,gap:d,numberType:u},scale:R}=this.options,h=this.draw.getWidth(),g=this.draw.getHeight();t.save(),t.globalAlpha=i,t.font=`${s*R}px ${r}`;let f=n;const T=new RegExp(Pn.PAGE_NO);T.test(f)&&(f=an.formatNumberPlaceholder(f,e+1,T,u));const m=new RegExp(Pn.PAGE_COUNT);m.test(f)&&(f=an.formatNumberPlaceholder(f,this.draw.getPageCount(),m,u));const p=t.measureText(f);if(c){const I=this.draw.getPagePixelRatio(),L=document.createElement("canvas"),P=L.getContext("2d"),C=p.width,S=p.actualBoundingBoxAscent+p.actualBoundingBoxDescent,F=Math.sqrt(Math.pow(C,2)+Math.pow(S,2)),N=F+2*d[0]*R,V=F+2*d[1]*R;L.width=N,L.height=V,L.style.width=`${N*I}px`,L.style.height=`${V*I}px`,P.translate(N/2,V/2),P.rotate(-45*Math.PI/180),P.translate(-N/2,-V/2),P.font=`${s*R}px ${r}`,P.fillStyle=a,P.fillText(f,(N-C)/2,(V-S)/2+p.actualBoundingBoxAscent);const Y=t.createPattern(L,"repeat");Y&&(t.fillStyle=Y,t.fillRect(0,0,h,g))}else{const I=h/2,L=g/2;t.fillStyle=a,t.translate(I,L),t.rotate(-45*Math.PI/180),t.fillText(f,-p.width/2,p.actualBoundingBoxAscent-s*R/2)}t.restore()}renderImage(t){const{watermark:{width:e,height:n,data:i,opacity:r,repeat:s,gap:a},scale:c}=this.options;if(!this.imageCache.has(i)){const g=new Image;g.setAttribute("crossOrigin","Anonymous"),g.src=i,g.onload=()=>{this.imageCache.set(i,g),this.draw.render({isCompute:!1,isSubmitHistory:!1})};return}const d=this.draw.getWidth(),u=this.draw.getHeight(),R=e*c,h=n*c;if(t.save(),t.globalAlpha=r,s){const g=this.draw.getPagePixelRatio(),f=document.createElement("canvas"),T=f.getContext("2d"),m=Math.sqrt(Math.pow(R,2)+Math.pow(h,2)),p=m+2*a[0]*c,I=m+2*a[1]*c;f.width=p,f.height=I,f.style.width=`${p*g}px`,f.style.height=`${I*g}px`,T.translate(p/2,I/2),T.rotate(-45*Math.PI/180),T.translate(-p/2,-I/2),T.drawImage(this.imageCache.get(i),(p-R)/2,(I-h)/2,R,h);const L=t.createPattern(f,"repeat");L&&(t.fillStyle=L,t.fillRect(0,0,d,u))}else{const g=d/2,f=u/2;t.translate(g,f),t.rotate(-45*Math.PI/180),t.drawImage(this.imageCache.get(i),-R/2,-h/2,R,h)}t.restore()}render(t,e){this.options.watermark.type===l.WatermarkType.IMAGE?this.renderImage(t):this.renderText(t,e)}}class fc{draw;control;options;highlightList;highlightMatchResult;constructor(t){this.draw=t.getDraw(),this.control=t,this.options=this.draw.getOptions(),this.highlightList=[],this.highlightMatchResult=[]}getControlHighlight(t,e){const{control:{activeBackgroundColor:n,disabledBackgroundColor:i,existValueBackgroundColor:r,noValueBackgroundColor:s}}=this.options,a=t[e],c=this.draw.isPrintMode(),d=this.control.getActiveControl()?.getElement();let u=!1,R=!1,h=!1,g=!1;return a.highlight||(u=!c&&!!n&&!!d&&a.controlId===d.controlId&&!this.control.getIsRangeInPostfix()),u||(R=!c&&!!i&&!!a.control?.disabled),R||(h=!c&&!!r&&!!a.controlId&&this.control.getIsExistValueByElementListIndex(t,e)),h||(g=!c&&!!s&&!!a.controlId&&!this.control.getIsExistValueByElementListIndex(t,e)),(u?n:"")||(R?i:"")||(h?r:"")||(g?s:"")}getHighlightMatchResult(){return this.highlightMatchResult}getHighlightList(){return this.highlightList}setHighlightList(t){this.highlightList=t}computeHighlightList(){const t=this.draw.getSearch(),e=(n,i)=>{let r=0;for(;r<n.length;){const s=n[r];if(r++,s.type===l.ElementType.TABLE){const f=s.trList;for(let T=0;T<f.length;T++){const m=f[T];for(let p=0;p<m.tdList.length;p++){const I=m.tdList[p],L={tableId:s.id,tableIndex:r-1,trIndex:T,tdIndex:p,tdId:I.id};e(I.value,L)}}}const a=s?.control;if(!a)continue;const c=this.highlightList.findIndex(f=>f.id===s.controlId||a.conceptId&&a.conceptId===f.conceptId);if(!~c)continue;const d=r;let u=r;for(;u<n.length&&n[u].controlId===s.controlId;)u++;r=u;const R=n.slice(d,u).map(f=>f.controlComponent===l.ControlComponent.VALUE?f:{value:_}),h=this.highlightList[c],{ruleList:g}=h;for(let f=0;f<g.length;f++){const T=g[f],m=t.getMatchList(T.keyword,R);this.highlightMatchResult.push(...m.map(p=>({...p,...T,...i,index:p.index+d})))}}};this.highlightMatchResult=[],e(this.draw.getOriginalMainElementList())}renderHighlightList(t,e){if(!this.highlightMatchResult?.length)return;const{searchMatchAlpha:n,searchMatchColor:i}=this.options,r=this.draw.getPosition().getOriginalPositionList(),s=this.draw.getOriginalElementList();t.save();for(let a=0;a<this.highlightMatchResult.length;a++){const c=this.highlightMatchResult[a];let d=null;if(c.tableId){const{tableIndex:I,trIndex:L,tdIndex:P,index:C}=c;d=s[I]?.trList[L].tdList[P]?.positionList[C]}else d=r[c.index];if(!d)continue;const{coordinate:{leftTop:u,leftBottom:R,rightTop:h},pageNo:g}=d;if(g!==e)continue;t.fillStyle=c.backgroundColor||i,t.globalAlpha=c.alpha||n;const f=u[0],T=u[1],m=h[0]-u[0],p=R[1]-u[1];t.fillRect(f,T,m,p)}t.restore()}}class Tc{borderRect;options;constructor(t){this.borderRect=this.clearBorderInfo(),this.options=t.getOptions()}clearBorderInfo(){return this.borderRect={x:0,y:0,width:0,height:0},this.borderRect}recordBorderInfo(t,e,n,i){!this.borderRect.width&&(this.borderRect.x=t,this.borderRect.y=e,this.borderRect.height=i),this.borderRect.width+=n}render(t){if(!this.borderRect.width)return;const{scale:e,control:{borderWidth:n,borderColor:i}}=this.options,{x:r,y:s,width:a,height:c}=this.borderRect;t.save(),t.translate(0,1*e),t.lineWidth=n*e,t.strokeStyle=i,t.beginPath(),t.rect(r,s,a,c),t.stroke(),t.restore(),this.clearBorderInfo()}}class Mn{draw;element;control;isPopup;selectDom;options;VALUE_DELIMITER=",";DEFAULT_MULTI_SELECT_DELIMITER=",";constructor(t,e){const n=e.getDraw();this.draw=n,this.options=n.getOptions(),this.element=t,this.control=e,this.isPopup=!1,this.selectDom=null}setElement(t){this.element=t}getElement(){return this.element}getIsPopup(){return this.isPopup}getCodes(){return this.element?.control?.code?this.element.control.code.split(","):[]}getText(t){if(!this.element?.control)return null;const e=this.element.control;if(!e.valueSets?.length)return null;const n=e?.multiSelectDelimiter||this.DEFAULT_MULTI_SELECT_DELIMITER,i=e.valueSets,r=[];return t.forEach(s=>{const a=i.find(c=>c.code===s);a&&!wi(a.value)&&r.push(a.value)}),r.join(n)||null}getValue(t={}){const{elementList:e,range:n}=this.control.mergeControl(t),{startIndex:i}=n,r=e[i],s=[];let a=i;for(;a>=0;){const d=e[a];if(!d||d.controlId!==r.controlId||d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.PRE_TEXT)break;d.controlComponent===l.ControlComponent.VALUE&&s.unshift(d),a--}let c=i+1;for(;c<e.length;){const d=e[c];if(d.controlId!==r.controlId||d.controlComponent===l.ControlComponent.POSTFIX||d.controlComponent===l.ControlComponent.POST_TEXT)break;d.controlComponent===l.ControlComponent.VALUE&&s.push(d),c++}return s}setValue(t,e={},n={}){if(!this.element.control?.selectExclusiveOptions?.inputAble||!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return-1;const{elementList:i,range:r}=this.control.mergeControl(e);this.control.shrinkBoundary(e);const{startIndex:s,endIndex:a}=r,c=this.control.getDraw();s!==a?c.spliceElementList(i,s+1,a-s):this.control.removePlaceholder(s,{elementList:i});const d=i[s],u=d.type&&!zt.includes(d.type)||d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.PRE_TEXT?Dt(d,["control","controlId",...At]):se(d,["type"]),R=r.startIndex+1;for(let h=0;h<t.length;h++){const g={...u,...t[h],controlComponent:l.ControlComponent.VALUE};wt(i,[g],s,{editorOptions:this.options}),c.spliceElementList(i,R+h,0,[g])}return R+t.length-1}keydown(t){if(this.control.getIsDisabledControl())return null;const e=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();const{startIndex:i,endIndex:r}=n,s=e[i],a=e[r],c=this.element.control?.selectExclusiveOptions?.inputAble;if(t.key===l.KeyMap.Backspace)return i!==r?c?(this.draw.spliceElementList(e,i+1,r-i),this.getValue().length||this.control.addPlaceholder(i),i):this.clearSelect():s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT||a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POST_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER?this.control.removeControl(i):c?(this.draw.spliceElementList(e,i,1),this.getValue().length||this.control.addPlaceholder(i-1),i-1):this.clearSelect();if(t.key===l.KeyMap.Delete){if(i!==r)return c?(this.draw.spliceElementList(e,i+1,r-i),this.getValue().length||this.control.addPlaceholder(i),i):this.clearSelect();{const d=e[r+1];return(s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT)&&d.controlComponent===l.ControlComponent.PLACEHOLDER||d.controlComponent===l.ControlComponent.POSTFIX||d.controlComponent===l.ControlComponent.POST_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER?this.control.removeControl(i):c?(this.draw.spliceElementList(e,i+1,1),this.getValue().length||this.control.addPlaceholder(i),i):this.clearSelect()}}return r}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();const{startIndex:t,endIndex:e}=this.control.getRange();return t===e?t:this.clearSelect()}clearSelect(t={},e={}){const{isIgnoreDisabledRule:n=!1,isAddPlaceholder:i=!0}=e;if(!n&&this.control.getIsDisabledControl(t))return-1;const r=t.elementList||this.control.getElementList(),{startIndex:s}=t.range||this.control.getRange(),a=r[s];let c=-1,d=-1,u=s;for(;u>0;){const g=r[u];if(g.controlId!==a.controlId||g.controlComponent===l.ControlComponent.PREFIX||g.controlComponent===l.ControlComponent.PRE_TEXT){c=u;break}u--}let R=s+1;for(;R<r.length;){const g=r[R];if(g.controlId!==a.controlId||g.controlComponent===l.ControlComponent.POSTFIX||g.controlComponent===l.ControlComponent.POST_TEXT){d=R-1;break}R++}return!~c||!~d?-1:(this.control.getDraw().spliceElementList(r,c+1,d-c,[],{isIgnoreDeletedRule:e.isIgnoreDeletedRule}),i&&this.control.addPlaceholder(u,t),this.control.setControlProperties({code:void 0},{elementList:r,range:{startIndex:u,endIndex:u}}),u)}setSelect(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return;const i=e.elementList||this.control.getElementList(),r=e.range||this.control.getRange(),s=this.element.control,a=t?.split(this.VALUE_DELIMITER)||[],c=s.code,d=s.code?.split(this.VALUE_DELIMITER)||[],u=s.isMultiSelect;if(!u&&t===c||u&&Ui(d,a)){this.control.repaintControl({curIndex:r.startIndex,isCompute:!1,isSubmitHistory:!1}),this.destroy();return}const R=s.valueSets;if(!Array.isArray(R)||!R.length)return;const h=this.getText(a);if(!h){if(c){const P=this.clearSelect(e,{isIgnoreDeletedRule:n.isIgnoreDeletedRule});~P&&(this.control.repaintControl({curIndex:P}),this.control.emitControlContentChange({controlValue:[]}))}return}const g=this.getValue(e)[0],f=g?Dt(g,Re):Dt(i[r.startIndex],At),T=this.clearSelect(e,{isAddPlaceholder:!1,isIgnoreDeletedRule:n.isIgnoreDeletedRule});if(!~T)return;c||this.control.removePlaceholder(T,e);const m=se(i[T],Re),p=T+1,I=ct(h),L=this.control.getDraw();for(let P=0;P<I.length;P++){const C={...f,...m,type:l.ElementType.TEXT,value:I[P],controlComponent:l.ControlComponent.VALUE};(C.color===this.options.control.bracketColor||C.color===this.options.control.placeholderColor)&&(C.color=this.options.defaultColor),wt(i,[C],T,{editorOptions:this.options}),L.spliceElementList(i,p+P,0,[C])}if(this.control.setControlProperties({code:t},{elementList:i,range:{startIndex:T,endIndex:T}}),!e.range){const P=p+I.length-1;this.control.repaintControl({curIndex:P}),this.control.emitControlContentChange({context:e}),u||this.destroy()}}_createSelectPopupDom(){const t=this.element.control,e=t.valueSets;if(!Array.isArray(e)||!e.length)return;const n=this.control.getPosition();if(!n)return;const i=document.createElement("div");i.classList.add(`${z}-select-control-popup`),i.setAttribute(ue,l.EditorComponent.POPUP);const r=document.createElement("ul");let s=null;for(let h=0;h<e.length;h++){const g=e[h],f=document.createElement("li");let T=this.getCodes();T.includes(g.code)&&(f.classList.add("active"),s=f),f.onclick=()=>{const m=T.findIndex(p=>p===g.code);t.isMultiSelect?~m?T.splice(m,1):T.push(g.code):~m?T=[]:T=[g.code],this.setSelect(T.join(this.VALUE_DELIMITER))},f.append(document.createTextNode(g.value)),r.append(f)}i.append(r);const{coordinate:{leftTop:[a,c]},lineHeight:d}=n,u=this.control.getPreY();i.style.left=`${a}px`,i.style.top=`${c+u+d}px`,this.control.getContainer().append(i),this.selectDom=i,s&&Qi(i,s)}awake(){if(this.isPopup||this.control.getIsDisabledControl())return;const{startIndex:t}=this.control.getRange(),n=this.control.getElementList()[t];if(!n||n.controlId!==this.element.controlId)return;const i=n.controlComponent===l.ControlComponent.PREFIX||n.controlComponent===l.ControlComponent.PRE_TEXT||n.controlComponent===l.ControlComponent.POSTFIX||n.controlComponent===l.ControlComponent.POST_TEXT||n.controlComponent===l.ControlComponent.PLACEHOLDER;!this.control.getIsRangeWithinControl()&&!i||(this._createSelectPopupDom(),this.isPopup=!0)}destroy(){this.isPopup&&(this.selectDom?.remove(),this.isPopup=!1)}}var gs;function j(){return gs.apply(null,arguments)}function mc(o){gs=o}function re(o){return o instanceof Array||Object.prototype.toString.call(o)==="[object Array]"}function Ge(o){return o!=null&&Object.prototype.toString.call(o)==="[object Object]"}function Ot(o,t){return Object.prototype.hasOwnProperty.call(o,t)}function Ao(o){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(o).length===0;var t;for(t in o)if(Ot(o,t))return!1;return!0}function Jt(o){return o===void 0}function Oe(o){return typeof o=="number"||Object.prototype.toString.call(o)==="[object Number]"}function On(o){return o instanceof Date||Object.prototype.toString.call(o)==="[object Date]"}function fs(o,t){var e=[],n,i=o.length;for(n=0;n<i;++n)e.push(t(o[n],n));return e}function we(o,t){for(var e in t)Ot(t,e)&&(o[e]=t[e]);return Ot(t,"toString")&&(o.toString=t.toString),Ot(t,"valueOf")&&(o.valueOf=t.valueOf),o}function pe(o,t,e,n){return Hs(o,t,e,n,!0).utc()}function pc(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Rt(o){return o._pf==null&&(o._pf=pc()),o._pf}var ko;Array.prototype.some?ko=Array.prototype.some:ko=function(o){var t=Object(this),e=t.length>>>0,n;for(n=0;n<e;n++)if(n in t&&o.call(this,t[n],n,t))return!0;return!1};function Jo(o){var t=null,e=!1,n=o._d&&!isNaN(o._d.getTime());if(n&&(t=Rt(o),e=ko.call(t.parsedDateParts,function(i){return i!=null}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&e),o._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(o))o._isValid=n;else return n;return o._isValid}function An(o){var t=pe(NaN);return o!=null?we(Rt(t),o):Rt(t).userInvalidated=!0,t}var Ts=j.momentProperties=[],Bo=!1;function $o(o,t){var e,n,i,r=Ts.length;if(Jt(t._isAMomentObject)||(o._isAMomentObject=t._isAMomentObject),Jt(t._i)||(o._i=t._i),Jt(t._f)||(o._f=t._f),Jt(t._l)||(o._l=t._l),Jt(t._strict)||(o._strict=t._strict),Jt(t._tzm)||(o._tzm=t._tzm),Jt(t._isUTC)||(o._isUTC=t._isUTC),Jt(t._offset)||(o._offset=t._offset),Jt(t._pf)||(o._pf=Rt(t)),Jt(t._locale)||(o._locale=t._locale),r>0)for(e=0;e<r;e++)n=Ts[e],i=t[n],Jt(i)||(o[n]=i);return o}function Cn(o){$o(this,o),this._d=new Date(o._d!=null?o._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Bo===!1&&(Bo=!0,j.updateOffset(this),Bo=!1)}function le(o){return o instanceof Cn||o!=null&&o._isAMomentObject!=null}function ms(o){j.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+o)}function ee(o,t){var e=!0;return we(function(){if(j.deprecationHandler!=null&&j.deprecationHandler(null,o),e){var n=[],i,r,s,a=arguments.length;for(r=0;r<a;r++){if(i="",typeof arguments[r]=="object"){i+=`
|
|
102
|
-
[`+r+"] ";for(s in arguments[0])Ot(arguments[0],s)&&(i+=s+": "+arguments[0][s]+", ");i=i.slice(0,-2)}else i=arguments[r];n.push(i)}
|
|
98
|
+
`)}}return n}return t(Mt(o))}function wo(o){return Io(o,["metrics","style"])}function sn(o){return!!o?.type&&(Rl.includes(o.type)||o.imgDisplay===l.ImageDisplay.INLINE)}function na(o,t){const e=document.createElement(t);for(let n=0;n<o.attributes.length;n++){const i=o.attributes[n];e.setAttribute(i.name,i.value)}return e.innerHTML=o.innerHTML,e}function Zo(o){const t=[];for(let e=0;e<o.length;e++){const n=o[e];n?.imgDisplay===l.ImageDisplay.SURROUND&&t.push(n)}return t}function oa(o,t){for(let e=o.length-1;e>=0;e--)o[e].imgFloatPosition?.pageNo===t&&o.splice(e,1)}function vt(o){return o?!!(o.hide||o.control?.hide||o.area?.hide):!0}function Ge(o,t,e=l.LocationPosition.BEFORE){if(!vt(o[t]))return t;let n=t;if(e===l.LocationPosition.BEFORE)for(n=t-1;n>0;){if(!vt(o[n]))return n;n--}else for(n=t+1;n<o.length;){if(!vt(o[n]))return n;n++}return n}const qi=`${Ln}-control`;function ia(o){localStorage.setItem(Ln,JSON.stringify({text:o.text,elementList:o.elementList}))}function ts(){const o=localStorage.getItem(Ln);return o?JSON.parse(o):null}function es(){localStorage.removeItem(Ln)}function sa(o){localStorage.setItem(qi,JSON.stringify(o))}function ns(){const o=localStorage.getItem(qi);return o?JSON.parse(o):null}function ra(){return!!ns()?.element}async function la(o,t,e){if(!o&&!t&&!e.length)return;const n=new Blob([o],{type:"text/plain"}),i=new Blob([t],{type:"text/html"});if(window.ClipboardItem){const r=new ClipboardItem({[n.type]:n,[i.type]:i});await window.navigator.clipboard.write([r])}else{const r=document.createElement("div");r.setAttribute("contenteditable","true"),r.innerHTML=t,document.body.append(r);const s=window.getSelection(),a=document.createRange(),c=document.createElement("span");c.innerText=`
|
|
99
|
+
`,r.append(c),a.selectNodeContents(r),s?.removeAllRanges(),s?.addRange(a),document.execCommand("copy"),r.remove()}ia({text:o,elementList:e})}async function os(o,t){const e=nn(o,t);document.body.append(e);const n=e.innerText;e.remove();const i=e.innerHTML;!n&&!i&&!o.length||await la(n,i,Mt(o))}function aa(o){let t=!1;for(let e=0;e<o.items.length;e++)if(o.items[e].kind==="file"){t=!0;break}return t}function Qo(o,t){const e=o.getDraw();if(e.isReadonly()||e.isDisabled()||e.getControl().getIsDisabledPasteControl())return;const n=e.getRange(),{startIndex:i}=n.getRange(),r=e.getElementList();if(~i&&!n.getIsSelectAll()){const s=r[i];if(s?.titleId||s?.listId){let a=0;for(;a<t.length;){const c=t[a];if(s.titleId&&/^\n/.test(c.value))break;if(gl.includes(c.type)){if(t.splice(a,1),c.valueList)for(let d=0;d<c.valueList.length;d++){const u=c.valueList[d];u.value===_||u.value===`
|
|
100
|
+
`||(t.splice(a,0,u),a++)}a--}a++}}wt(r,t,i,{isBreakWhenWrap:!0,editorOptions:e.getOptions()})}e.insertElementList(t)}function is(o,t){const e=o.getDraw();if(e.isReadonly()||e.isDisabled())return;const n=on(t,{innerWidth:e.getOriginalInnerWidth()});Qo(o,n)}function vo(o,t){const e=o.getDraw();if(e.isReadonly()||e.isDisabled())return;const n=e.getRange(),{startIndex:i}=n.getRange(),r=e.getElementList(),s=new FileReader;s.readAsDataURL(t),s.onload=()=>{const a=new Image,c=s.result;a.src=c,a.onload=()=>{const d={value:c,type:l.ElementType.IMAGE,width:a.width,height:a.height};~i&&wt(r,[d],i,{editorOptions:e.getOptions()}),e.insertElementList([d])}}}function ca(o,t){const e=o.getDraw();if(e.isReadonly()||e.isDisabled())return;const n=t.clipboardData;if(!n)return;const{paste:i}=e.getOverride();if(i&&i(t)?.preventDefault!==!1)return;if(!aa(n)){const s=n.getData("text"),a=ts();if(a&&Zn(s)===Zn(a.text)){Qo(o,a.elementList);return}}es();let r=!1;for(let s=0;s<n.items.length;s++)if(n.items[s].type==="text/html"){r=!0;break}for(let s=0;s<n.items.length;s++){const a=n.items[s];if(a.kind==="string"){if(a.type==="text/plain"&&!r){a.getAsString(c=>{o.input(c)});break}if(a.type==="text/html"&&r){a.getAsString(c=>{is(o,c)});break}}else if(a.kind==="file"&&a.type.includes("image")){const c=a.getAsFile();c&&vo(o,c)}}}async function da(o,t){const e=o.getDraw();if(e.isReadonly()||e.isDisabled())return;const{paste:n}=e.getOverride();if(n&&n()?.preventDefault!==!1)return;const i=await navigator.clipboard.readText(),r=ts();if(r&&Zn(i)===Zn(r.text)){Qo(o,r.elementList);return}if(es(),t?.isPlainText)i&&o.input(i);else{const s=await navigator.clipboard.read();let a=!1;for(const c of s)if(c.types.includes("text/html")){a=!0;break}for(const c of s)if(c.types.includes("text/plain")&&!a){const u=await(await c.getType("text/plain")).text();u&&o.input(u)}else if(c.types.includes("text/html")&&a){const u=await(await c.getType("text/html")).text();u&&is(o,u)}else if(c.types.some(d=>d.startsWith("image/"))){const d=c.types.find(R=>R.startsWith("image/")),u=await c.getType(d);vo(o,u)}}}class ua{draw;container;agentCursorDom;canvasEvent;eventBus;constructor(t,e){this.draw=t,this.container=t.getContainer(),this.canvasEvent=e,this.eventBus=t.getEventBus();const n=document.createElement("textarea");n.autocomplete="off",n.classList.add(`${z}-inputarea`),n.innerText="",this.container.append(n),this.agentCursorDom=n,n.onkeydown=i=>this._keyDown(i),n.oninput=this._input.bind(this),n.onpaste=i=>this._paste(i),n.addEventListener("compositionstart",this._compositionstart.bind(this)),n.addEventListener("compositionupdate",this._compositionupdate.bind(this)),n.addEventListener("compositionend",this._compositionend.bind(this)),n.addEventListener("keydown",this._keydown.bind(this)),this.eventBus.on("rangeStyleChange",i=>{this.agentCursorDom.style.fontSize=Math.max(i.size,18)+"px"})}getAgentCursorDom(){return this.agentCursorDom}_keyDown(t){this.draw.isInteractionSuspended()||this.canvasEvent.keydown(t)}_input(t){if(this.draw.isInteractionSuspended())return;const e=t.data;e&&this.canvasEvent.input(e),this.eventBus.isSubscribe("input")&&this.eventBus.emit("input",t)}_paste(t){this.draw.isInteractionSuspended()||this.draw.isReadonly()||!t.clipboardData||(ca(this.canvasEvent,t),t.preventDefault())}_compositionstart(){this.draw.isInteractionSuspended()||(this.agentCursorDom.style.zIndex="1000",this.agentCursorDom.style.width="0px",this.agentCursorDom.style.color="#000",this.agentCursorDom.style.background="#fff",this.canvasEvent.compositionstart())}_compositionupdate(){if(this.draw.isInteractionSuspended())return;this.agentCursorDom.style.width="9999px";let t=this.agentCursorDom.scrollWidth;const e=this.container.clientWidth,n=Math.max(e-this.agentCursorDom.offsetLeft,100);t>n&&(t=n),this.agentCursorDom.style.width=t+"px"}_compositionend(t){this.draw.isInteractionSuspended()||(this.agentCursorDom.style.zIndex="-1",this.agentCursorDom.style.width="0px",this.agentCursorDom.style.color="",this.agentCursorDom.style.background="",this.canvasEvent.compositionend(t))}_keydown(t){this.draw.isInteractionSuspended()||this.canvasEvent.isComposing&&t.code==="Escape"&&this.canvasEvent.compositionCancel()}}class Ra{ANIMATION_CLASS=`${z}-cursor--animation`;draw;container;options;position;cursorDom;cursorAgent;blinkTimeout;hitLineStartIndex;constructor(t,e){this.draw=t,this.container=t.getContainer(),this.position=t.getPosition(),this.options=t.getOptions(),this.cursorDom=document.createElement("div"),this.cursorDom.classList.add(`${z}-cursor`),this.container.append(this.cursorDom),this.cursorAgent=new ua(t,e),this.blinkTimeout=null}getCursorDom(){return this.cursorDom}getAgentDom(){return this.cursorAgent.getAgentCursorDom()}getAgentIsActive(){return this.getAgentDom()===document.activeElement}getAgentDomValue(){return this.getAgentDom().value}clearAgentDomValue(){this.getAgentDom().value=""}getHitLineStartIndex(){return this.hitLineStartIndex}_blinkStart(){this.cursorDom.classList.add(this.ANIMATION_CLASS)}_blinkStop(){this.cursorDom.classList.remove(this.ANIMATION_CLASS)}_setBlinkTimeout(){this._clearBlinkTimeout(),this.blinkTimeout=window.setTimeout(()=>{this._blinkStart()},500)}_clearBlinkTimeout(){this.blinkTimeout&&(this._blinkStop(),window.clearTimeout(this.blinkTimeout),this.blinkTimeout=null)}focus(){if(rl&&this.draw.isReadonly())return;const t=this.cursorAgent.getAgentCursorDom();document.activeElement!==t&&(t.focus(),t.setSelectionRange(0,0))}drawCursor(t){let e=this.position.getCursorPosition();if(!e)return;const{scale:n,cursor:i}=this.options,{color:r,width:s,isShow:a=!0,isBlink:c=!0,isFocus:d=!0,hitLineStartIndex:u}={...i,...t},R=this.draw.getHeight(),h=this.draw.getPageGap();this.hitLineStartIndex=u,u&&(e=this.position.getPositionList()[u]);const{metrics:g,coordinate:{leftTop:f,rightTop:T},ascent:m,pageNo:p}=e,P=(this.draw.getZone().isMainActive()?p:this.draw.getPageNo())*(R+h),C=ol*n,S=Math.min(g.height/4,C),F=g.height+S*2,N=this.cursorAgent.getAgentCursorDom();d&&setTimeout(()=>{this.focus()});const V=g.boundingBoxDescent<0?0:g.boundingBoxDescent,Y=f[1]+m+V-(F-S)+P,E=u?f[0]:T[0];if(N.style.left=`${E}px`,N.style.top=`${Y+F-C}px`,!a){this.recoveryCursor();return}const W=this.cursorDom.style.top,X=this.draw.isReadonly();this.cursorDom.style.width=`${s*n}px`,this.cursorDom.style.backgroundColor=r,this.cursorDom.style.left=`${E}px`,this.cursorDom.style.top=`${Y}px`,this.cursorDom.style.display=X?"none":"block",this.cursorDom.style.height=`${F}px`,c?this._setBlinkTimeout():this._clearBlinkTimeout(),Co(()=>{this.moveCursorToVisible({cursorPosition:e,direction:parseInt(W)>Y?Ut.UP:Ut.DOWN})})}recoveryCursor(){this.cursorDom.style.display="none",this._clearBlinkTimeout()}moveCursorToVisible(t){const{cursorPosition:e,direction:n}=t;if(!e||!n)return;const{pageNo:i,coordinate:{leftTop:r,leftBottom:s}}=e,a=qr(this.container),c={left:0,right:0,top:0,bottom:0},d=a===document.documentElement;if(d)c.right=window.innerWidth,c.bottom=window.innerHeight;else{const{left:T,right:m,top:p,bottom:I}=a.getBoundingClientRect();c.left=T,c.right=m,c.top=p,c.bottom=I}const u=i*(this.draw.getHeight()+this.draw.getPageGap())+this.container.getBoundingClientRect().top,R=n===Ut.UP,h=s[0]+(d?0:c.left),g=R?r[1]+u:s[1]+u,{maskMargin:f}=this.options;if(c.top+=f[0],c.bottom-=f[2],!(h>=c.left&&h<=c.right&&g>=c.top&&g<=c.bottom)){const{scrollLeft:T,scrollTop:m}=a;R?a.scroll(T,m-(c.top-g)):a.scroll(T,m+g-c.bottom)}}}var rn;(function(o){o[o.LEFT=0]="LEFT",o[o.CENTER=1]="CENTER",o[o.RIGHT=2]="RIGHT"})(rn||(rn={}));function Te(o){return Ke?o.metaKey:o.ctrlKey}l.KeyMap=void 0,(function(o){o.Delete="Delete",o.Backspace="Backspace",o.Enter="Enter",o.Left="ArrowLeft",o.Right="ArrowRight",o.Up="ArrowUp",o.Down="ArrowDown",o.ESC="Escape",o.TAB="Tab",o.META="Meta",o.LEFT_BRACKET="[",o.RIGHT_BRACKET="]",o.COMMA=",",o.PERIOD=".",o.LEFT_ANGLE_BRACKET="<",o.RIGHT_ANGLE_BRACKET=">",o.EQUAL="=",o.MINUS="-",o.PLUS="+",o.A="a",o.B="b",o.C="c",o.D="d",o.E="e",o.F="f",o.G="g",o.H="h",o.I="i",o.J="j",o.K="k",o.L="l",o.M="m",o.N="n",o.O="o",o.P="p",o.Q="q",o.R="r",o.S="s",o.T="t",o.U="u",o.V="v",o.W="w",o.X="x",o.Y="y",o.Z="z",o.A_UPPERCASE="A",o.B_UPPERCASE="B",o.C_UPPERCASE="C",o.D_UPPERCASE="D",o.E_UPPERCASE="E",o.F_UPPERCASE="F",o.G_UPPERCASE="G",o.H_UPPERCASE="H",o.I_UPPERCASE="I",o.J_UPPERCASE="J",o.K_UPPERCASE="K",o.L_UPPERCASE="L",o.M_UPPERCASE="M",o.N_UPPERCASE="N",o.O_UPPERCASE="O",o.P_UPPERCASE="P",o.Q_UPPERCASE="Q",o.R_UPPERCASE="R",o.S_UPPERCASE="S",o.T_UPPERCASE="T",o.U_UPPERCASE="U",o.V_UPPERCASE="V",o.W_UPPERCASE="W",o.X_UPPERCASE="X",o.Y_UPPERCASE="Y",o.Z_UPPERCASE="Z",o.ZERO="0",o.ONE="1",o.TWO="2",o.THREE="3",o.FOUR="4",o.FIVE="5",o.SIX="6",o.SEVEN="7",o.EIGHT="8",o.NINE="9"})(l.KeyMap||(l.KeyMap={}));class _n{element;control;constructor(t,e){this.element=t,this.control=e}setElement(t){this.element=t}getElement(){return this.element}getCode(){return this.element.control?.code||null}getValue(){const t=this.control.getElementList(),{startIndex:e}=this.control.getRange(),n=t[e],i=[];let r=e;for(;r>0;){const a=t[r];if(a.controlId!==n.controlId||a.controlComponent===l.ControlComponent.PREFIX||a.controlComponent===l.ControlComponent.PRE_TEXT)break;a.controlComponent===l.ControlComponent.VALUE&&i.unshift(a),r--}let s=e+1;for(;s<t.length;){const a=t[s];if(a.controlId!==n.controlId||a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POST_TEXT)break;a.controlComponent===l.ControlComponent.VALUE&&i.push(a),s++}return i}setValue(){return-1}setSelect(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return;const{control:i}=this.element,r=e.elementList||this.control.getElementList(),{startIndex:s}=e.range||this.control.getRange(),a=r[s];let c=s;for(;c>0;){const u=r[c];if(u.controlId!==a.controlId||u.controlComponent===l.ControlComponent.PREFIX||u.controlComponent===l.ControlComponent.PRE_TEXT)break;if(u.controlComponent===l.ControlComponent.CHECKBOX){const R=u.checkbox;R.value=t.includes(R.code)}c--}let d=s+1;for(;d<r.length;){const u=r[d];if(u.controlId!==a.controlId||u.controlComponent===l.ControlComponent.POSTFIX||u.controlComponent===l.ControlComponent.POST_TEXT)break;if(u.controlComponent===l.ControlComponent.CHECKBOX){const R=u.checkbox;R.value=t.includes(R.code)}d++}i.code=t.join(","),this.control.repaintControl({curIndex:s,isSetCursor:!1}),this.control.emitControlContentChange({context:e})}keydown(t){if(this.control.getIsDisabledControl())return null;const e=this.control.getRange();this.control.shrinkBoundary();const{startIndex:n,endIndex:i}=e;return t.key===l.KeyMap.Backspace||t.key===l.KeyMap.Delete?this.control.removeControl(n):i}cut(){return-1}}class Ko extends _n{setSelect(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return;const{control:i}=this.element,r=e.elementList||this.control.getElementList(),{startIndex:s}=e.range||this.control.getRange(),a=r[s];let c=s;for(;c>0;){const u=r[c];if(u.controlId!==a.controlId||u.controlComponent===l.ControlComponent.PREFIX||u.controlComponent===l.ControlComponent.PRE_TEXT)break;if(u.controlComponent===l.ControlComponent.RADIO){const R=u.radio;R.value=t.includes(R.code)}c--}let d=s+1;for(;d<r.length;){const u=r[d];if(u.controlId!==a.controlId||u.controlComponent===l.ControlComponent.POSTFIX||u.controlComponent===l.ControlComponent.POST_TEXT)break;if(u.controlComponent===l.ControlComponent.RADIO){const R=u.radio;R.value=t.includes(R.code)}d++}i.code=t.join(","),this.control.repaintControl({curIndex:s,isSetCursor:!1}),this.control.emitControlContentChange({context:e})}}function ss(o){const t=o.getDraw(),e=t.getPosition(),n=t.getRange();o.isAllowDrag=!0,o.cacheRange=at(n.getRange()),o.cacheElementList=t.getElementList(),o.cachePositionList=e.getPositionList(),o.cachePositionContext=e.getPositionContext()}function rs(o,t){const{checkbox:e,control:n}=o;if(!n)t.getCheckboxParticle().setSelect(o);else{const i=n?.code?n.code.split(","):[];if(e?.value){const s=i.findIndex(a=>a===e.code);i.splice(s,1)}else e?.code&&i.push(e.code);const r=t.getControl().getActiveControl();r instanceof _n&&r.setSelect(i)}}function ls(o,t){const{radio:e,control:n}=o;if(!n)t.getRadioParticle().setSelect(o);else{const i=e?.code?[e.code]:[],r=t.getControl().getActiveControl();r instanceof Ko&&r.setSelect(i)}}function ha(o,t){const e=t.getDraw();let n=e.isReadonly();const i=e.getRange(),r=e.getPosition(),s=i.getRange();if(o.button===rn.RIGHT&&(s.isCrossRowCol||!i.getIsCollapsed()))return;const c=o.target.dataset.index;if(c&&e.setPageNo(Number(c)),!t.isAllowDrag&&!n&&s.startIndex!==s.endIndex&&i.getIsPointInRange(o.offsetX,o.offsetY,e.getPageNo())){ss(t);return}t.isAllowSelection=!0;const d=at(r.getPositionContext()),u=r.adjustPositionContext({x:o.offsetX,y:o.offsetY});if(!u)return;const{index:R,isDirectHit:h,isCheckbox:g,isRadio:f,isImage:T,isLabel:m,isMacro:p,isTable:I,tdValueIndex:L,hitLineStartIndex:P}=u;h&&p&&console.log("mousedown - positionResult:",{index:R,isDirectHit:h,isMacro:p}),t.mouseDownStartPosition={...u,index:I?L:R,originalIndex:R,x:o.offsetX,y:o.offsetY};const C=e.getElementList(),S=r.getPositionList(),F=I?L:R;let N;I?N=e.getTd().value[L]:N=C[F];const V=!!(h&&T),Y=!!(h&&g),E=!!(h&&f),W=!!(h&&m),X=!!(h&&p),O=ot=>ot&&(ot.type===l.ElementType.MACRO||ot.type===l.ElementType.CUSTOM_MACRO||ot.type===l.ElementType.REUSABLE_ITEM||ot.type===l.ElementType.SUB_TEMPLATE||ot.type===l.ElementType.MENSTRUAL_HISTORY||ot.type===l.ElementType.FETAL_HEART_POSITION||ot.type===l.ElementType.TOOTH_POSITION||ot.type===l.ElementType.LIST||ot.type===l.ElementType.SPECIAL_SYMBOLS),M=ot=>ot&&!!ot.originControlId&&!!ot.controlId,b=ot=>ot&&!!ot.originControlId&&!!ot.controlId&&(ot.controlComponent===l.ControlComponent.POSTFIX||ot.controlComponent===l.ControlComponent.POSTTEXTFIX||ot.controlComponent===l.ControlComponent.POST_TEXT||ot.controlComponent===l.ControlComponent.PLACEHOLDER),y=e.getMode()===l.EditorMode.FORM,D=y?e.getControl().getActiveTextControlLimit():null;let U=F;const Q=!!(D&&(!N?.controlId||N.controlId===D.controlId&&(N.originControlId||null)===D.originControlId||D.parentControlId&&N.controlId===D.parentControlId&&!N.originControlId));if(y&&(N?.controlId||N?.originControlId)){let ot;const ut=N.originControlId||N.controlId;for(let ht=F;ht>=0;ht--){const K=C[ht];if(K.controlId===ut&&!K.originControlId&&K.control?.type){ot=K.control.type;break}if(K.controlId!==N.controlId&&K.controlId!==ut)break}if(ot===l.ControlType.TEXT&&M(N))N.controlComponent===l.ControlComponent.PREFIX||N.controlComponent===l.ControlComponent.PRE_TEXT||N.controlComponent===l.ControlComponent.PRETEXTFIX||N.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT?U=Math.max(F-1,0):(N.controlComponent===l.ControlComponent.POSTFIX||N.controlComponent===l.ControlComponent.POST_TEXT||N.controlComponent===l.ControlComponent.POSTTEXTFIX||N.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)&&(U=F);else if(ot===l.ControlType.TEXTFIELD){const ht=N.controlComponent;if(!M(N)){if(!(F>0&&b(C[F-1]))){if(!(N.controlComponent===l.ControlComponent.VALUE&&O(N))){if(ht===l.ControlComponent.PRETEXTFIX||ht===l.ControlComponent.PRETEXTFIX_TEXT||ht===l.ControlComponent.POSTTEXTFIX||ht===l.ControlComponent.POSTTEXTFIX_TEXT||ht===l.ControlComponent.TEXTFIXLABEL||ht===l.ControlComponent.PREFIX||ht===l.ControlComponent.POSTFIX||ht===l.ControlComponent.PRE_TEXT||ht===l.ControlComponent.POST_TEXT||ht===l.ControlComponent.PLACEHOLDER)for(let K=F+1;K<C.length;K++){const v=C[K];if(v.controlId!==ut&&v.originControlId!==ut)break;if(v.controlComponent===l.ControlComponent.VALUE&&!O(v)){U=K;break}if(v.controlComponent===l.ControlComponent.POSTTEXTFIX||v.controlComponent===l.ControlComponent.POSTFIX){for(let w=F-1;w>=0;w--){const Z=C[w];if(Z.controlId!==ut&&Z.originControlId!==ut)break;if(Z.controlComponent===l.ControlComponent.VALUE&&!O(Z)){U=w;break}}break}}else if(ht===l.ControlComponent.VALUE&&F>0){const K=C[F-1];if(K&&(K.controlId===ut||K.originControlId===ut)&&K.controlComponent===l.ControlComponent.VALUE&&O(K)){let v=!1;for(let w=F-2;w>=0;w--){const Z=C[w];if(Z.controlId!==ut&&Z.originControlId!==ut||Z.controlComponent!==l.ControlComponent.VALUE&&!Z.originControlId&&Z.controlId===ut)break;if(!O(Z)){U=w+1,v=!0;break}}if(!v)for(let w=F;w<C.length;w++){const Z=C[w];if(Z.controlId!==ut&&Z.originControlId!==ut||(Z.controlComponent===l.ControlComponent.POSTTEXTFIX||Z.controlComponent===l.ControlComponent.POSTFIX)&&!Z.originControlId&&Z.controlId===ut)break;if(!O(Z)){U=w,v=!0;break}}}}}}}}}if(~R){Q&&(U=Math.min(Math.max(U,D.startIndex),D.endIndex));let ot=U,ut=U;if(o.shiftKey){const{startIndex:ht}=i.getRange();~ht&&r.getPositionContext().tdId===d.tdId&&(F>ht?ot=ht:ut=ht)}if(Q&&(ot=Math.min(Math.max(ot,D.startIndex),D.endIndex),ut=Math.min(Math.max(ut,D.startIndex),D.endIndex),U=Math.min(Math.max(U,D.startIndex),D.endIndex)),i.setRange(ot,ut),r.setCursorPosition(S[U]),n=e.isReadonly(),Y&&!n)rs(N,e);else if(E&&!n)ls(N,e);else if(N.controlComponent===l.ControlComponent.VALUE&&(N.control?.type===l.ControlType.CHECKBOX||N.control?.type===l.ControlType.RADIO)){let ht=F;for(;ht>0;){const K=C[ht];if(K.controlComponent===l.ControlComponent.CHECKBOX){rs(K,e);break}else if(K.controlComponent===l.ControlComponent.RADIO){ls(K,e);break}ht--}}else{const ht=N?.control?.type===l.ControlType.BUTTON&&!N.control?.buttonText,K=h&&ht;let v=!1;if(y&&N?.controlId&&N?.controlComponent===l.ControlComponent.VALUE&&!N.originControlId)for(let x=F;x>=0;x--){const A=C[x];if(A.controlId!==N.controlId)break;if(A.control?.type===l.ControlType.TEXTFIELD){v=!0;break}}const w=v&&O(N),Z=X&&!w?U+1:void 0;e.render({curIndex:X&&!w?Z:U,isCompute:!1,isSubmitHistory:!1,isSetCursor:!V&&!Y&&!E&&!(K&&y)&&!w});const J=C[U];if(!n&&h&&J?.controlId&&o.button===rn.LEFT){const A=e.getControl().getActiveControl(),$=A?.getElement()?.control?.type;A&&($===l.ControlType.NUMBER||$===l.ControlType.SELECT)&&A.getElement()?.controlId===J.controlId&&J.controlComponent!==l.ControlComponent.POSTFIX&&J.controlComponent!==l.ControlComponent.POSTTEXTFIX&&J.controlComponent!==l.ControlComponent.POSTTEXTFIX_TEXT&&J.controlComponent!==l.ControlComponent.POST_TEXT&&typeof A.awake=="function"&&A.awake()}}P&&t.getDraw().getCursor().drawCursor({hitLineStartIndex:P})}const G=e.getEventBus();if(W&&G.isSubscribe("labelMousedown")&&G.emit("labelMousedown",{evt:o,element:N}),X&&(N.type===l.ElementType.MACRO||N.type===l.ElementType.CUSTOM_MACRO||N.type===l.ElementType.REUSABLE_ITEM)){const ot=e.getMode();if(ot===l.EditorMode.EDIT&&N.type===l.ElementType.CUSTOM_MACRO)G.isSubscribe("macroClick")&&G.emit("macroClick",{evt:o,element:N});else if(ot===l.EditorMode.FORM){let ut=!1;N.type===l.ElementType.CUSTOM_MACRO&&o.button===rn.LEFT&&!n&&(ut=e.getMacroParticle().activateInlineEditor(N,F)),!ut&&G.isSubscribe("macroValueChange")&&G.emit("macroValueChange",{evt:o,element:N})}}o.button===rn.LEFT&&X&&N.type===l.ElementType.SUB_TEMPLATE&&e.getMode()===l.EditorMode.FORM&&G.isSubscribe("subTemplateClick")&&G.emit("subTemplateClick",{evt:o,element:N});const H=e.getPreviewer();if(H.clearResizer(),V){const ot={dragDisable:n||!N.controlId&&e.getMode()===l.EditorMode.FORM};N.type===l.ElementType.LATEX&&(ot.mime="svg",ot.srcKey="laTexSVG"),H.drawResizer(N,S[F],ot),e.getCursor().drawCursor({isShow:!1}),ss(t),(N.imgDisplay===l.ImageDisplay.SURROUND||N.imgDisplay===l.ImageDisplay.FLOAT_TOP||N.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM)&&e.getImageParticle().createFloatImage(N),G.isSubscribe("imageMousedown")&&G.emit("imageMousedown",{evt:o,element:N})}const tt=e.getTableTool();tt.dispose(),I&&!n&&e.getMode()!==l.EditorMode.FORM&&tt.render();const st=e.getHyperlinkParticle();st.clearHyperlinkPopup(),N.type===l.ElementType.HYPERLINK&&(Te(o)?st.openHyperlink(N):st.drawHyperlinkPopup(N,S[F]));const et=e.getDateParticle();et.clearDatePicker(),N.type===l.ElementType.DATE&&!n&&et.renderDatePicker(N,S[F]);const nt=e.getMenstrualHistoryParticle();nt.clearMenstrualHistoryEditor(),N.type===l.ElementType.MENSTRUAL_HISTORY&&h&&(e.getMode()===l.EditorMode.FORM||e.getMode()===l.EditorMode.EDIT)&&nt.renderMenstrualHistoryEditor(N,S[F]);const q=e.getFetalHeartPositionParticle();q.clearFetalHeartPositionEditor(),N.type===l.ElementType.FETAL_HEART_POSITION&&h&&(e.getMode()===l.EditorMode.FORM||e.getMode()===l.EditorMode.EDIT)&&q.renderFetalHeartPositionEditor(N,S[F]);const dt=e.getToothPositionParticle();dt.clearToothPositionEditor(),N.type===l.ElementType.TOOTH_POSITION&&h&&(e.getMode()===l.EditorMode.FORM||e.getMode()===l.EditorMode.EDIT)&&dt.renderToothPositionEditor(N,S[F])}function xn(o){const t=lt();return Reflect.set(o,"dragId",t),t}function Gn(o,t){return t.findIndex(e=>e.dragId===o)}function as(o,t,e){const n=e.getDraw();if(o.imgDisplay===l.ImageDisplay.SURROUND||o.imgDisplay===l.ImageDisplay.FLOAT_TOP||o.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM){const i=t.offsetX-e.mouseDownStartPosition.x,r=t.offsetY-e.mouseDownStartPosition.y,s=o.imgFloatPosition;o.imgFloatPosition={x:s.x+i,y:s.y+r,pageNo:n.getPageNo()}}n.getImageParticle().destroyFloatImage()}function ga(o,t){if(t.isAllowDrop){const e=t.getDraw();if(e.isReadonly()||e.isDisabled()){t.mousedown(o);return}const n=e.getPosition(),i=n.getPositionList(),r=n.getPositionContext(),s=e.getRange(),a=t.cacheRange,c=t.cacheElementList,d=t.cachePositionList,u=t.cachePositionContext,R=s.getRange(),h=a.startIndex===a.endIndex,g=h?a.startIndex-1:a.startIndex,f=a.endIndex;if(R.startIndex>=g&&R.endIndex<=f&&t.cachePositionContext?.tdId===r.tdId){e.clearSideEffect();let et=!1,nt=!1;if(h){const q=c[f];if(q.type===l.ElementType.IMAGE||q.type===l.ElementType.LATEX){if(as(q,o,t),q.imgDisplay===l.ImageDisplay.SURROUND||q.imgDisplay===l.ImageDisplay.FLOAT_TOP||q.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM)e.getPreviewer().drawResizer(q),et=!0;else{const dt=d[f];e.getPreviewer().drawResizer(q,dt)}nt=q.imgDisplay===l.ImageDisplay.SURROUND}}s.replaceRange({...a}),e.render({isCompute:nt,isSubmitHistory:et,isSetCursor:!1});return}const T=c.slice(g+1,f+1),m=T.find(et=>et.controlId);if(m){const et=c[g+1],nt=c[f];if(!((!et.controlId||et.controlComponent===l.ControlComponent.PREFIX)&&(!nt.controlId||nt.controlComponent===l.ControlComponent.POSTFIX)||et.controlId===nt.controlId&&et.controlComponent===l.ControlComponent.PREFIX&&nt.controlComponent===l.ControlComponent.POSTFIX||et.control?.type===l.ControlType.TEXT&&et.controlComponent===l.ControlComponent.VALUE&&nt.control?.type===l.ControlType.TEXT&&nt.controlComponent===l.ControlComponent.VALUE)){e.render({curIndex:R.startIndex,isCompute:!1,isSubmitHistory:!1});return}}const p=e.getControl(),I=e.getElementList(),L=!m||!!I[R.startIndex].controlId||!p.getIsElementListContainFullControl(T),P=e.getOptions(),C=T.map(et=>{if(!et.type||et.type===l.ElementType.TEXT){const nt={value:et.value},q=Re;return L||q.push(...No),q.forEach(dt=>{const ot=et[dt];ot!==void 0&&(nt[dt]=ot)}),nt}else{let nt=at(et);return L&&(nt=se(nt,No)),bt([nt],{isHandleFirstElement:!1,editorOptions:P}),nt}});wt(I,C,R.startIndex,{editorOptions:e.getOptions()});const S=c[g],F=d[g],N=xn(c[g]),V=xn(c[f]),Y=C.length;let E=R.startIndex,W=E+Y;const X=p.getActiveControl();if(X&&c[E].controlComponent!==l.ControlComponent.POSTFIX?(W=X.setValue(C),E=W-Y):e.spliceElementList(I,E+1,0,C),!~W){e.render({isSetCursor:!1});return}const O=xn(I[E]),M=xn(I[W]),b=Gn(N,c),y=Gn(V,c),D=c[y];if(D.controlId&&D.controlComponent!==l.ControlComponent.POSTFIX)s.replaceRange({...a,startIndex:b,endIndex:y}),p.getActiveControl()?.cut();else{let et=!0;if(u?.isTable){const{tableId:nt,trIndex:q,tdIndex:dt}=u;et=!e.getOriginalElementList().some(ut=>ut.id===nt&&ut?.trList?.[q]?.tdList?.[dt]?.deletable===!1)}et&&e.spliceElementList(c,b+1,y-b)}const U=I[R.startIndex],Q=i[R.startIndex];let G=r.index;G&&(U.tableId&&!S.tableId?F.index<G&&(G-=Y):!U.tableId&&S.tableId&&Q.index<G&&(G+=Y),n.setPositionContext({...r,index:G}));const H=Gn(O,I),tt=Gn(M,I);s.setRange(h?tt:H,tt,R.tableId,R.startTdIndex,R.endTdIndex,R.startTrIndex,R.endTrIndex),e.clearSideEffect();let st=null;if(h){const nt=e.getElementList()[tt];(nt.type===l.ElementType.IMAGE||nt.type===l.ElementType.LATEX)&&(as(nt,o,t),st=nt)}if(e.render({isSetCursor:!1}),X?p.emitControlContentChange():S.controlId&&p.emitControlContentChange({context:{range:a,elementList:c},controlElement:S}),st)if(st.imgDisplay===l.ImageDisplay.SURROUND||st.imgDisplay===l.ImageDisplay.FLOAT_TOP||st.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM)e.getPreviewer().drawResizer(st);else{const nt=n.getPositionList()[tt];e.getPreviewer().drawResizer(st,nt)}}else t.isAllowDrag&&t.cacheRange?.startIndex!==t.cacheRange?.endIndex&&t.mousedown(o)}function fa(o,t){const e=t.getDraw();if(!e.getOptions().pageOuterSelectionDisable)return;const n=e.getPageContainer(),{x:i,y:r,width:s,height:a}=n.getBoundingClientRect();o.x>=i&&o.x<=i+s&&o.y>=r&&o.y<=r+a||t.setIsAllowSelection(!1)}function Ta(o,t){const e=t.getDraw(),n=e.getControl(),i=e.getPageList(),r=e.getPageNo(),s=i[r],c=e.getPosition().getPositionByXY({x:o.offsetX,y:o.offsetY});if(~c.index){const O=e.getElementList(),M=c.isTable?c.tdValueIndex:c.index,b=O[M];b?.control?.type===l.ControlType.BUTTON&&!b.control?.buttonText?s&&(s.style.cursor="pointer"):s&&(s.style.cursor="text")}else s&&(s.style.cursor="text");if(t.isAllowDrag){const O=o.offsetX,M=o.offsetY,{startIndex:b,endIndex:y}=t.cacheRange,D=t.cachePositionList;for(let Q=b+1;Q<=y;Q++){const{coordinate:{leftTop:G,rightBottom:H}}=D[Q];if(O>=G[0]&&O<=H[0]&&M>=G[1]&&M<=H[1])return}const U=t.cacheRange?.startIndex;if(U){const Q=t.cacheElementList[U];Q?.type===l.ElementType.IMAGE&&(Q.imgDisplay===l.ImageDisplay.SURROUND||Q.imgDisplay===l.ImageDisplay.FLOAT_TOP||Q.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM)&&(e.getPreviewer().clearResizer(),e.getImageParticle().dragFloatImage(o.movementX,o.movementY))}t.dragover(o),t.isAllowDrop=!0;return}if(!t.isAllowSelection||!t.mouseDownStartPosition)return;const u=o.target.dataset.index;u&&e.setPageNo(Number(u));const R=e.getPosition(),h=R.getPositionByXY({x:o.offsetX,y:o.offsetY});if(!~h.index)return;const{index:g,isTable:f,tdValueIndex:T,tdIndex:m,trIndex:p,tableId:I,trId:L,tdId:P}=h,{index:C,isTable:S,tdIndex:F,tdId:N,trIndex:V,tableId:Y}=t.mouseDownStartPosition,E=f?T:g,W=e.getRange();let X;if(P!==N&&P&&N){const O=e.getTdByPosition({...t.mouseDownStartPosition,isTable:!!t.mouseDownStartPosition.tableId,index:t.mouseDownStartPosition.originalIndex??t.mouseDownStartPosition.index}),M=e.getTdByPosition({...h,isTable:!!h.tableId,index:h.index});if(e.isSplitTd(O,M)){const b=(O.valueStartIndex??0)+C,y=(M.valueStartIndex??0)+T;X=[{index:b,element:O.value[C],originalId:O.originalId,isCurrent:!1,length:O.value.length,startIndex:O.valueStartIndex??0},{index:y,element:M.value[T],originalId:M.originalId,isCurrent:!0,length:M.value.length,startIndex:M.valueStartIndex??0}]}}if(f&&S&&P!==N&&!X)W.setRange(E,E,I,F,m,V,p),R.setPositionContext({isTable:!!f,index:g,trIndex:p,tdIndex:m,tdId:P,trId:L,tableId:I});else{let O=~E?E:0;if((S||f)&&Y!==I&&!X)return;R.setPositionContext({isTable:!!f,index:g,trIndex:p,tdIndex:m,tdId:P,trId:L,tableId:I});let M=C,b,y;if(X)[{element:b},{element:y}]=X;else{const Q=e.getElementList();b=Q[M+1],y=Q[O]}if(M===O||b?.controlComponent===l.ControlComponent.PLACEHOLDER&&y?.controlComponent===l.ControlComponent.PLACEHOLDER&&b.controlId===y.controlId)return;if(M>O&&([M,O]=[O,M]),e.getMode()===l.EditorMode.FORM){const Q=n.getActiveTextControlLimit();Q&&(M=Math.min(Math.max(M,Q.startIndex),Q.endIndex),O=Math.min(Math.max(O,Q.startIndex),Q.endIndex));const G=e.getElementList(),H=G[M],tt=G[O];if(H?.control?.type===l.ControlType.TEXTFIELD||tt?.control?.type===l.ControlType.TEXTFIELD){const st=H?.controlId||tt?.controlId;if(st){let et=-1,nt=-1;for(let q=M;q>=0;q--){const dt=G[q];if(dt.controlId!==st)break;if(dt.controlComponent===l.ControlComponent.PRETEXTFIX||dt.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||dt.controlComponent===l.ControlComponent.TEXTFIXLABEL||dt.controlComponent===l.ControlComponent.PREFIX||dt.controlComponent===l.ControlComponent.PRE_TEXT){et=q+1;break}}for(let q=O;q<G.length;q++){const dt=G[q];if(dt.controlId!==st)break;if(dt.controlComponent===l.ControlComponent.POSTTEXTFIX||dt.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||dt.controlComponent===l.ControlComponent.POSTFIX||dt.controlComponent===l.ControlComponent.POST_TEXT){nt=q-1;break}}et!==-1&&M<et&&(M=et),nt!==-1&&O>nt&&(O=nt)}}}let U;if(X){const[Q,G]=X.sort((H,tt)=>H.index-tt.index);U={originalId:X[0].originalId??X[1].originalId,startIndex:Q.index,endIndex:G.index},Q.isCurrent?(M=Q.index,O=Q.length-1):(M=0,O=U.endIndex-G.startIndex)}W.setRange(M,O,void 0,void 0,void 0,void 0,void 0,U)}e.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1})}function ma(o,t){const e=o[t];if(!e?.subTemplateParentId)return null;const n=e.subTemplateParentId;for(let i=t-1;i>=0;i--){const r=o[i];if(r.type===l.ElementType.SUB_TEMPLATE&&r.id===n)return{labelIndex:i,labelElement:r};if(r.type===l.ElementType.SUB_TEMPLATE&&r.id!==n)break}return null}function cs(o,t,e){const n=o[t];n.subTemplateExpanded=!1,n.hide=!1;let i=t+1;for(;i<o.length&&o[i].subTemplateParentId===n.id;)i++;const r=i-t-1;return r>0&&e.spliceElementList(o,t+1,r),t}function pa(o){const t=o.getDraw(),e=t.getRange(),n=e.getRange(),i=t.getElementList(),r=i[n.startIndex];if(!vt(r))return;let s=n.startIndex;for(;s>0;){const a=i[s];if(a.type===l.ElementType.SUB_TEMPLATE&&a.subTemplateExpanded){const u=cs(i,s,t);n.startIndex=u,n.endIndex=u,e.replaceRange(n);const R=t.getPosition(),h=R.getPositionList();R.setCursorPosition(h[u]);return}let c=null;a.controlId?(c=t.getControl().removeControl(s),c!==null&&(s=c)):(t.spliceElementList(i,s,1),c=s-1,s--);const d=i[c];if(!d||!vt(d)){if(c){n.startIndex=c,n.endIndex=c,e.replaceRange(n);const u=t.getPosition(),R=u.getPositionList();u.setCursorPosition(R[c])}break}}}function La(o,t,e){if(e.originControlId){const n=e.originControlId;for(let i=t;i<o.length;i++){const r=o[i];if(r.controlId===n)return r.controlComponent===l.ControlComponent.POSTFIX||r.controlComponent===l.ControlComponent.POSTTEXTFIX||r.controlComponent===l.ControlComponent.POST_TEXT?{isInParent:!1}:{isInParent:!0,parentControlId:n};if(r.controlId&&r.controlId!==n&&r.originControlId!==n)break}}if(!e.originControlId&&e.controlId){const n=o[t];if(n?.controlId&&n.controlId!==e.controlId&&(n.controlComponent===l.ControlComponent.PREFIX||n.controlComponent===l.ControlComponent.PRETEXTFIX))for(let i=t-1;i>=0;i--){const r=o[i];if(r.controlId===e.controlId&&(r.controlComponent===l.ControlComponent.PREFIX||r.controlComponent===l.ControlComponent.PRETEXTFIX)){for(let s=i-1;s>=0;s--){const a=o[s];if(a.controlId&&a.controlId!==e.controlId&&(a.controlComponent===l.ControlComponent.PRETEXTFIX||a.controlComponent===l.ControlComponent.PREFIX))return{isInParent:!0,parentControlId:a.controlId};if(a.controlId&&a.controlId!==e.controlId&&(a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POSTTEXTFIX))return{isInParent:!1}}break}}if(n?.controlId&&n.controlId!==e.controlId&&!n.originControlId&&(n.controlComponent===l.ControlComponent.POSTFIX||n.controlComponent===l.ControlComponent.POSTTEXTFIX))return e.originControlId===n.controlId?{isInParent:!0,parentControlId:n.controlId}:{isInParent:!1}}return{isInParent:!1}}function Ia(o,t){const e=t.getDraw();if(e.isReadonly())return;const n=e.getRange();if(!n.getIsCanInput())return;n.getIsCollapsed()&&pa(t);const i=e.getControl(),{startIndex:r,endIndex:s,isCrossRowCol:a}=n.getRange();let c;const d=e.getElementList();if(n.getIsCollapsed()&&r>0){const R=d[r-1],h=d[r];if(R?.subTemplateParentId){const Y=ma(d,r-1);if(Y){const E=cs(d,Y.labelIndex,e);e.getGlobalEvent().setCanvasEventAbility(),n.setRange(E,E),e.render({curIndex:E});return}}const f=e.getPosition().getPositionList(),T=f[r],m=f[r-1],p=T&&m&&T.rowIndex===m.rowIndex,I=R?.controlComponent===l.ControlComponent.PREFIX||R?.controlComponent===l.ControlComponent.PRETEXTFIX||R?.controlComponent===l.ControlComponent.PRE_TEXT||R?.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT,L=R?.controlComponent===l.ControlComponent.POSTFIX||R?.controlComponent===l.ControlComponent.POSTTEXTFIX||R?.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||R?.controlComponent===l.ControlComponent.POST_TEXT,P=!!R?.controlId,C=h?.controlComponent===l.ControlComponent.PLACEHOLDER,S=h?.controlComponent===l.ControlComponent.POSTFIX||h?.controlComponent===l.ControlComponent.POSTTEXTFIX||h?.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||h?.controlComponent===l.ControlComponent.POST_TEXT,F=!!h&&!h.controlId&&!h.control;if(C&&I&&P&&p)return;const{isInParent:N,parentControlId:V}=La(d,r,R);if(L&&P&&p&&N){if(R.originControlId&&V)for(let Y=r;Y<d.length;Y++){const E=d[Y];if(E.controlId===V&&!E.originControlId){if(E.controlComponent===l.ControlComponent.VALUE){n.setRange(Y,Y),e.render({curIndex:Y,isSubmitHistory:!1});return}if(E.controlComponent===l.ControlComponent.POSTFIX||E.controlComponent===l.ControlComponent.POSTTEXTFIX||E.controlComponent===l.ControlComponent.POST_TEXT)return}E.controlId!==V&&E.originControlId}return}if(L&&P&&p&&!N&&!(F&&!C&&!S)){const Y=r-1;c=i.removeControl(Y),e.getGlobalEvent().setCanvasEventAbility(),c===null?(n.setRange(Y,Y),e.render({curIndex:Y,isSubmitHistory:!1})):(n.setRange(c,c),e.render({curIndex:c}));return}if(S&&h?.controlId&&p){const Y=r;c=i.removeControl(Y),e.getGlobalEvent().setCanvasEventAbility(),c===null?(n.setRange(Y,Y),e.render({curIndex:Y,isSubmitHistory:!1})):(n.setRange(c,c),e.render({curIndex:c}));return}}if(a){const R=e.getTableParticle().getRangeRowCol();if(!R)return;let h=!1;for(let g=0;g<R.length;g++){const f=R[g];for(let T=0;T<f.length;T++){const m=f[T];m.value.length>1&&(e.spliceElementList(m.value,1,m.value.length-1),h=!0)}}c=h?0:null}else if(i.getActiveControl()&&i.getIsRangeCanCaptureEvent())c=i.keydown(o),c&&i.emitControlContentChange();else{const R=e.getPosition().getCursorPosition();if(!R)return;const{index:h}=R,g=n.getIsCollapsed(),f=e.getElementList();if(g&&h===0){const I=f[h];if(I.value===_){I.listId&&e.getListParticle().unsetList(),o.preventDefault();return}}const T=f[r];if(g&&T.rowFlex&&T.value===_){const I=n.getRangeRowElementList();if(I){const L=f[r-1];I.forEach(P=>{P.rowFlex=L?.rowFlex})}}const m=T.value===_?f[r-1]:T,p=f[s+1];if(m?.titleId&&p?.titleId&&m.level===p.level&&m.titleId!==p.titleId){const I=m.titleId,L=p.titleId;let P=s+1;for(;P<f.length&&f[P]?.titleId===L;)f[P].titleId=I,P++}g?e.spliceElementList(f,h,1):e.spliceElementList(f,r+1,s-r),c=g?h-1:r}e.getGlobalEvent().setCanvasEventAbility(),c===null?(n.setRange(r,r),e.render({curIndex:r,isSubmitHistory:!1})):(n.setRange(c,c),e.render({curIndex:c}))}function ds(o,t,e){const n=o[t];n.subTemplateExpanded=!1,n.hide=!1;let i=t+1;for(;i<o.length&&o[i].subTemplateParentId===n.id;)i++;const r=i-t-1;return r>0&&e.spliceElementList(o,t+1,r),t}function Pa(o){const t=o.getDraw(),n=t.getRange().getRange(),i=t.getElementList(),r=i[n.startIndex+1];if(!vt(r))return;const s=n.startIndex+1;for(;s<i.length;){const a=i[s];if(a.type===l.ElementType.SUB_TEMPLATE&&a.subTemplateExpanded){ds(i,s,t);return}let c=null;a.controlId?c=t.getControl().removeControl(s):(t.spliceElementList(i,s,1),c=s);const d=i[c];if(!d||!vt(d))break}}function Ma(o,t){const e=t.getDraw();if(e.isReadonly())return;const n=e.getRange();if(!n.getIsCanInput())return;const{startIndex:i,endIndex:r,isCrossRowCol:s,splitTdRange:a}=n.getRange(),c=e.getElementList(),d=e.getControl();n.getIsCollapsed()&&Pa(t);let u;if(s){const R=e.getTableParticle().getRangeRowCol();if(!R)return;let h=!1;for(let g=0;g<R.length;g++){const f=R[g];for(let T=0;T<f.length;T++){const m=f[T];m.value.length>1&&(e.spliceElementList(m.value,1,m.value.length-1),h=!0)}}u=h?0:null}else if(d.getActiveControl()&&d.getIsRangeWithinControl())u=d.keydown(o),u&&d.emitControlContentChange();else if(c[r+1]?.controlId)u=d.removeControl(r+1);else if(n.getIsCollapsed()&&c[r+1]?.subTemplateParentId){const R=c[r+1].subTemplateParentId;let h=-1;for(let g=r;g>=0;g--){const f=c[g];if(f.type===l.ElementType.SUB_TEMPLATE&&f.id===R){h=g;break}}h!==-1?u=ds(c,h,e):u=null}else{e.removeSplitTdOtherRangeElements();const R=e.getPosition(),h=R.getCursorPosition();if(!h)return;const{index:g}=h,f=R.getPositionContext();if(f.isDirectHit&&f.isImage)e.spliceElementList(c,g,1),u=g-1;else{const T=n.getIsCollapsed();if(!T)e.spliceElementList(c,i+1,r-i);else if(c[g+1])e.spliceElementList(c,g+1,1);else{let m=!0;if(f.isTable){const p=e.getTd();if(p?.linkTdNextId){const I=e.getTdById(p.linkTdNextId);I&&(m=!1,e.spliceElementList(I.value,1,1))}}if(m)return}u=T?g:i,u===0&&a&&(u=e.fixPosition(!0)??u)}}e.getGlobalEvent().setCanvasEventAbility(),u===null?(n.setRange(i,i),e.render({curIndex:i,isSubmitHistory:!1})):(n.setRange(u,u),e.render({curIndex:u}))}function Oa(o,t){const e=t.getDraw();if(e.isReadonly())return;const n=e.getRange();if(!n.getIsCanInput())return;const{startIndex:i,endIndex:r}=n.getRange(),s=n.getIsCollapsed(),a=e.getElementList(),c=a[i],d=a[r];if(s&&d.listId&&d.value===_&&a[r+1]?.listId!==d.listId){e.getListParticle().unsetList();return}let u={value:_};if(o.shiftKey&&c.listId&&(u.listWrap=!0),wt(a,[u],i,{isBreakWhenWrap:!0,editorOptions:e.getOptions()}),o.shiftKey&&d.areaId&&d.areaId!==a[r+1]?.areaId&&(u=se(u,He)),!(a[i+1]?.titleId&&(!c.titleId||c.titleId!==a[i+1]?.titleId))&&!(d.titleId&&d.titleId!==a[r+1]?.titleId)){const m=n.getRangeAnchorStyle(a,r);if(m){const p=[...$t],I=m.controlComponent===l.ControlComponent.POSTFIX||m.controlComponent===l.ControlComponent.POSTTEXTFIX||m.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||m.controlComponent===l.ControlComponent.POST_TEXT,L=m.control?.type===l.ControlType.BUTTON&&!m.control?.buttonText;!I&&!L&&p.push(...Re),p.forEach(P=>{const C=m[P];C!==void 0&&(u[P]=C)})}}const R=e.getControl(),h=R.getActiveControl();let g;const f=h?.getElement();if(f?.control?.type===l.ControlType.BUTTON&&!f.control?.buttonText&&f?.controlId){const m=f.controlId;let p=r;for(;p+1<a.length&&a[p+1]?.controlId===m;)p++;e.spliceElementList(a,p+1,0,[u]),g=p+1}else if(h&&R.getIsRangeWithinControl())g=R.setValue([u]),R.emitControlContentChange();else{const p=e.getPosition().getCursorPosition();if(!p)return;const{index:I}=p;if(s){if(e.spliceElementList(a,I+1,0,[u]),d.titleId&&a[I+2]?.titleId===d.titleId){const L=lt();let P=I+2;for(;P<a.length&&a[P]?.titleId===d.titleId;)a[P].titleId=L,P++}}else e.spliceElementList(a,i+1,r-i,[u]);g=I+1}~g&&(n.setRange(g,g),e.render({curIndex:g})),o.preventDefault()}function us(o){return o&&(o.type===l.ElementType.MACRO||o.type===l.ElementType.CUSTOM_MACRO||o.type===l.ElementType.REUSABLE_ITEM||o.type===l.ElementType.SUB_TEMPLATE||o.type===l.ElementType.MENSTRUAL_HISTORY||o.type===l.ElementType.FETAL_HEART_POSITION||o.type===l.ElementType.TOOTH_POSITION||o.type===l.ElementType.LIST||o.type===l.ElementType.SPECIAL_SYMBOLS)}function Ca(o,t){const e=t.getDraw();if(e.isReadonly())return;const i=e.getPosition(),r=i.getCursorPosition();if(!r)return;const s=i.getPositionContext(),{index:a}=r;if(a<=0&&!s.isTable)return;const c=e.getRange(),{startIndex:d,endIndex:u}=c.getRange(),R=c.getIsCollapsed(),h=e.getElementList(),g=e.getControl(),f=e.getMode()===l.EditorMode.FORM,T=f?g.getActiveTextControlLimit():null,m=h[a],p=m?.controlComponent===l.ControlComponent.PREFIX||m?.controlComponent===l.ControlComponent.PRETEXTFIX||m?.controlComponent===l.ControlComponent.PRE_TEXT;let I=!1;if(p&&m?.originControlId){const V=m.originControlId;for(let Y=a-1;Y>=0;Y--){const E=h[Y];if(E.controlId===V&&!E.originControlId){I=!0;break}if(E.controlId&&E.controlId!==V&&E.originControlId!==V)break}}if(f&&g.getActiveControl()&&p&&!T&&!I){g.initNextControl({direction:Ut.UP});return}let L=1;if(Te(o)){const V=e.getLetterReg(),Y=o.shiftKey&&!R&&d===r?.index?u:d;if(V.test(h[Y]?.value)){let E=Y-1;for(;E>0;){const W=h[E];if(!V.test(W.value))break;L++,E--}}}if(f){const V=h[d],Y=V?.controlId;if(Y&&V?.controlComponent===l.ControlComponent.VALUE){let E=!1;for(let W=d;W>=0;W--){const X=h[W];if(X.controlId!==Y)break;if(X.control?.type===l.ControlType.TEXTFIELD){E=!0;break}}if(E){if(V.controlComponent===l.ControlComponent.VALUE&&us(V))return;const W=d-L;if(W>=0){const X=h[W];if(X&&X.controlId===Y&&X.controlComponent===l.ControlComponent.VALUE&&us(X))return}}}}const P=T?Math.max(d-L,T.startIndex):d-L;let C=P,S=P;if(o.shiftKey&&r&&(d!==u?d===r.index?(C=d,S=u-L):(C=P,S=u):S=u),!o.shiftKey){const V=h[d];if(V.type===l.ElementType.TABLE){const Y=V.trList,E=Y.length-1,W=Y[E],X=W.tdList.length-1,O=W.tdList[X];i.setPositionContext({isTable:!0,index:d,trIndex:E,tdIndex:X,tdId:O.id,trId:W.id,tableId:V.id}),C=O.value.length-1,S=C}else if(V.tableId&&d===0){const E=e.getOriginalElementList()[s.index],W=e.getTd();if(W?.linkTdPrevId){const X=e.getTdById(W.linkTdPrevId);X&&(i.setPositionContext({...s,isTable:!0,index:X.tableIndex,trIndex:X.trIndex,tdId:X.id,trId:X.trId,tableId:X.tableId}),C=X.value.length-1,S=C)}else{const X=E.trList;t:for(let O=0;O<X.length;O++){const M=X[O];if(M.id!==V.trId)continue;const b=M.tdList;for(let y=0;y<b.length;y++)if(b[y].id===V.tdId){if(O===0&&y===0)i.setPositionContext({isTable:!1}),C=s.index-1,S=C,e.getTableTool().dispose();else{let U=O,Q=y-1;Q<0&&(U=O-1,Q=X[U].tdList.length-1);const G=X[U],H=G.tdList[Q];i.setPositionContext({isTable:!0,index:s.index,trIndex:U,tdIndex:Q,tdId:H.id,trId:G.id,tableId:V.tableId}),C=H.value.length-1,S=C}break t}}}}}if(!~C||!~S)return;const F=e.getElementList();C=Ge(F,C),S=Ge(F,S),c.setRange(C,S);const N=C===S;e.updateTableTool(),e.render({curIndex:N?C:void 0,isSetCursor:N,isSubmitHistory:!1,isCompute:!1}),o.preventDefault()}function Rs(o){return o&&(o.type===l.ElementType.MACRO||o.type===l.ElementType.CUSTOM_MACRO||o.type===l.ElementType.REUSABLE_ITEM||o.type===l.ElementType.SUB_TEMPLATE||o.type===l.ElementType.MENSTRUAL_HISTORY||o.type===l.ElementType.FETAL_HEART_POSITION||o.type===l.ElementType.TOOTH_POSITION||o.type===l.ElementType.LIST||o.type===l.ElementType.SPECIAL_SYMBOLS)}function Sa(o,t){const e=t.getDraw();if(e.isReadonly())return;const i=e.getPosition(),r=i.getCursorPosition();if(!r)return;const{index:s}=r,a=i.getPositionList(),c=i.getPositionContext();if(s>a.length-1&&!c.isTable)return;const d=e.getRange(),{startIndex:u,endIndex:R}=d.getRange(),h=d.getIsCollapsed();let g=e.getElementList();const f=e.getControl(),T=e.getMode()===l.EditorMode.FORM,m=T?f.getActiveTextControlLimit():null,p=g[s],I=p?.controlComponent===l.ControlComponent.POSTFIX||p?.controlComponent===l.ControlComponent.POSTTEXTFIX||p?.controlComponent===l.ControlComponent.POST_TEXT;let L=!1;if(I&&p?.originControlId){const E=p.originControlId;for(let W=s+1;W<g.length;W++){const X=g[W];if(X.controlId===E&&!X.originControlId){L=!0;break}if(X.controlId&&X.controlId!==E&&X.originControlId!==E)break}}if(T&&f.getActiveControl()&&I&&!m&&!L){f.initNextControl({direction:Ut.DOWN});return}let P=1;if(Te(o)){const E=e.getLetterReg(),W=o.shiftKey&&!h&&u===r?.index?R:u;if(E.test(g[W+1]?.value)){let X=W+2;for(;X<g.length;){const O=g[X];if(!E.test(O.value))break;P++,X++}}}if(T){const E=g[R],W=E?.controlId;if(W&&E?.controlComponent===l.ControlComponent.VALUE){let X=!1;for(let O=R;O>=0;O--){const M=g[O];if(M.controlId!==W)break;if(M.control?.type===l.ControlType.TEXTFIELD){X=!0;break}}if(X){if(E.controlComponent===l.ControlComponent.VALUE&&Rs(E))return;const O=R+P;if(O<g.length){const M=g[O];if(M&&M.controlId===W&&M.controlComponent===l.ControlComponent.VALUE&&Rs(M))return}}}}const C=m?Math.min(R+P,m.endIndex):R+P;let S=C,F=C;if(o.shiftKey&&r&&(u!==R?u===r.index?(S=u,F=C):(S=u+P,F=R):S=u),!o.shiftKey){const E=g[R],W=g[R+1];if(W?.type===l.ElementType.TABLE){const O=W.trList[0],M=O.tdList[0];i.setPositionContext({isTable:!0,index:R+1,trIndex:0,tdIndex:0,tdId:M.id,trId:O.id,tableId:W.id}),S=0,F=0}else if(E.tableId&&!W){const X=e.getTd(),O=X?.linkTdNextId?e.getTdById(X.linkTdNextId):void 0;if(O?.value.length)i.setPositionContext({...c,isTable:!0,index:O.tableIndex,trIndex:O.trIndex,tdId:O.id,trId:O.trId,tableId:O.tableId}),S=0,F=S;else{const b=e.getOriginalElementList()[c.index].trList;t:for(let y=0;y<b.length;y++){const D=b[y];if(D.id!==E.trId)continue;const U=D.tdList;for(let Q=0;Q<U.length;Q++)if(U[Q].id===E.tdId){if(y===b.length-1&&Q===U.length-1)i.setPositionContext({isTable:!1}),S=c.index,F=S,g=e.getElementList(),e.getTableTool().dispose();else{let H=y,tt=Q+1;tt>U.length-1&&(H=y+1,tt=0);const st=b[H],et=st.tdList[tt];i.setPositionContext({isTable:!0,index:c.index,trIndex:H,tdIndex:tt,tdId:et.id,trId:st.id,tableId:E.tableId}),S=0,F=S}break t}}}}}const N=g.length-1;if(S>N||F>N)return;const V=e.getElementList();S=Ge(V,S,l.LocationPosition.AFTER),F=Ge(V,F,l.LocationPosition.AFTER),d.setRange(S,F);const Y=S===F;e.updateTableTool(),e.render({curIndex:Y?S:void 0,isSetCursor:Y,isSubmitHistory:!1,isCompute:!1}),o.preventDefault()}function Ea(o,t){const e=t.getDraw();if(e.isReadonly())return;const i=e.getMode()===l.EditorMode.FORM,r=e.getControl(),s=r.getActiveControl();if(i&&s&&r.getIsRangeWithinControl())o.preventDefault(),r.initNextControl({direction:o.shiftKey?Ut.UP:Ut.DOWN});else{o.preventDefault();const a=e.getRange(),c=e.getElementList(),{startIndex:d,endIndex:u}=a.getRange(),R=a.getRangeAnchorStyle(c,u),g={...R?Dt(R,Re):null,type:l.ElementType.TAB,value:""};wt(c,[g],d,{editorOptions:e.getOptions()}),e.insertElementList([g])}}function Ho(o){const{positionList:t,index:e,isUp:n,rowNo:i,cursorX:r}=o;let s=-1;const a=[];if(n){let c=e-1;for(;c>=0;){const d=t[c];if(c--,d.rowNo!==i){if(a[0]&&a[0].rowNo!==d.rowNo)break;a.unshift(d)}}}else{let c=e+1;for(;c<t.length;){const d=t[c];if(c++,d.rowNo!==i){if(a[0]&&a[0].rowNo!==d.rowNo)break;a.push(d)}}}for(let c=0;c<a.length;c++){const d=a[c],{coordinate:{leftTop:[u],rightTop:[R]}}=d;if(c===a.length-1&&(s=d.index),!(r<u||r>R)){s=d.index;break}}return s}function Xa(o,t){const e=t.getDraw();if(e.isReadonly())return;const i=e.getPosition(),r=i.getCursorPosition();if(!r)return;const s=e.getRange(),{startIndex:a,endIndex:c}=s.getRange();let d=i.getPositionList();const u=o.key===l.KeyMap.Up;let R=-1,h=-1;const g=i.getPositionContext();if(!o.shiftKey&&g.isTable&&(u&&r.rowIndex===0||!u&&r.rowIndex===e.getRowCount()-1)){const{index:T,trIndex:m,tdIndex:p,tableId:I}=g;if(u){const L=e.getOriginalElementList();if(m===0)if(L[T].originalId){const C=T-1,S=L[C];for(let F=S.trList.length-1;F>=0;F--){const N=S.trList[F].tdList.find(V=>V.tdIndex===p);if(N?.value.length){i.setPositionContext({isTable:!0,tableId:S.id,index:C,trIndex:F,tdIndex:p}),R=N.value.length-1,h=N.value.length-1;break}}}else i.setPositionContext({isTable:!1}),R=T-1,h=R,e.getTableTool().dispose();else{let P=-1,C=-1;const S=L[T].trList,F=S[m].tdList[p].colIndex;t:for(let Y=m-1;Y>=0;Y--){const W=S[Y].tdList;for(let X=0;X<W.length;X++){const O=W[X];if(O.colIndex===F||O.colIndex+O.colspan-1>=F&&O.colIndex<=F){P=Y,C=X;break t}}}if(!~P||!~C)return;const N=S[P],V=N.tdList[C];i.setPositionContext({isTable:!0,index:T,trIndex:P,tdIndex:C,tdId:V.id,trId:N.id,tableId:I}),R=V.value.length-1,h=R}}else{const L=e.getOriginalElementList(),P=L[T],C=P.trList;if(m===C.length-1){const S=T+1,F=L[S];if(F&&[P.id,P.originalId].includes(F.originalId)){for(let V=p;V>=0;V--)if(F.trList[0].tdList[V].value.length){i.setPositionContext({isTable:!0,index:S,tableId:F.id,trIndex:0,tdIndex:V}),R=0,h=0;break}}else i.setPositionContext({isTable:!1}),R=T,h=R,e.getTableTool().dispose()}else{let S=-1,F=-1;const N=C[m].tdList[p].colIndex;t:for(let E=m+1;E<C.length;E++){const X=C[E].tdList;for(let O=0;O<X.length;O++){const M=X[O];if(M.colIndex===N||M.colIndex+M.colspan-1>=N&&M.colIndex<=N){S=E,F=O;break t}}}if(!~S||!~F)return;const V=C[S],Y=V.tdList[F];i.setPositionContext({isTable:!0,index:T,trIndex:S,tdIndex:F,tdId:Y.id,trId:V.id,tableId:I}),R=Y.value.length-1,h=R}}}else{let T=r;o.shiftKey&&(a===r.index?T=d[c]:T=d[a]);const{index:m,rowNo:p,rowIndex:I,coordinate:{rightTop:[L]}}=T;if(u&&I===0||!u&&I===e.getRowCount()-1)return;const P=Ho({positionList:d,index:m,rowNo:p,isUp:u,cursorX:L});if(P<0)return;R=P,h=P,o.shiftKey&&(a!==c?a===r.index?R=a:h=c:u?h=c:R=a);const S=e.getElementList()[P];if(S.type===l.ElementType.TABLE){const{scale:F}=e.getOptions(),N=e.getMargins(),V=S.trList;let Y=-1,E=-1,W=-1;if(u)t:for(let X=V.length-1;X>=0;X--){const M=V[X].tdList;for(let b=0;b<M.length;b++){const y=M[b],D=y.x*F+N[3],U=y.width*F;if(L>=D&&L<=D+U){const Q=y.positionList,G=Q[Q.length-1],H=Ho({positionList:Q,index:G.index+1,rowNo:G.rowNo-1,isUp:u,cursorX:L})||G.index;Y=X,E=b,W=H;break t}}}else t:for(let X=0;X<V.length;X++){const M=V[X].tdList;for(let b=0;b<M.length;b++){const y=M[b],D=y.x*F+N[3],U=y.width*F;if(L>=D&&L<=D+U){const Q=y.positionList,G=Ho({positionList:Q,index:-1,rowNo:-1,isUp:u,cursorX:L})||0;Y=X,E=b,W=G;break t}}}if(~Y&&~E&&~W){const X=V[Y],O=X.tdList[E];i.setPositionContext({isTable:!0,index:P,trIndex:Y,tdIndex:E,tdId:O.id,trId:X.id,tableId:S.id}),R=W,h=R,d=i.getPositionList()}}}if(!~R||!~h)return;R>h&&([R,h]=[h,R]),s.setRange(R,h);const f=R===h;e.render({curIndex:f?R:void 0,isSetCursor:f,isSubmitHistory:!1,isCompute:!1}),f||(e.getCursor().moveCursorToVisible({cursorPosition:d[u?R:h],direction:u?Ut.UP:Ut.DOWN}),e.updateTableTool())}function Na(o,t){if(t.isComposing)return;const e=t.getDraw();if(o.key===l.KeyMap.Backspace)Ia(o,t);else if(o.key===l.KeyMap.Delete)Ma(o,t);else if(o.key===l.KeyMap.Enter)Oa(o,t);else if(o.key===l.KeyMap.Left)Ca(o,t);else if(o.key===l.KeyMap.Right)Sa(o,t);else if(o.key===l.KeyMap.Up||o.key===l.KeyMap.Down)Xa(o,t);else if(Te(o)&&o.key.toLocaleLowerCase()===l.KeyMap.Z){if(e.isReadonly()&&e.getMode()!==l.EditorMode.FORM)return;e.getHistoryManager().undo(),o.preventDefault()}else if(Te(o)&&o.key.toLocaleLowerCase()===l.KeyMap.Y){if(e.isReadonly()&&e.getMode()!==l.EditorMode.FORM)return;e.getHistoryManager().redo(),o.preventDefault()}else if(Te(o)&&o.key.toLocaleLowerCase()===l.KeyMap.C)t.copy(),o.preventDefault();else if(Te(o)&&o.key.toLocaleLowerCase()===l.KeyMap.X)t.cut(),o.preventDefault();else if(Te(o)&&o.key.toLocaleLowerCase()===l.KeyMap.A)t.selectAll(),o.preventDefault();else if(Te(o)&&o.key.toLocaleLowerCase()===l.KeyMap.S){if(e.isReadonly())return;const n=e.getListener();n.saved&&n.saved(e.getValue());const i=e.getEventBus();i.isSubscribe("saved")&&i.emit("saved",e.getValue()),o.preventDefault()}else if(o.key===l.KeyMap.ESC){t.clearPainterStyle();const n=e.getZone();n.isMainActive()||n.setZone(l.EditorZone.MAIN),o.preventDefault()}else o.key===l.KeyMap.TAB&&Ea(o,t)}function Fa(o){return/[\u4e00-\u9fa5\u3000-\u303f\uff00-\uffef]/.test(o)}function ya(o){return/[a-zA-Z]/.test(o)}function ba(o,t){return Fa(o)?t:ya(o)?"Times New Roman":t}function Wa(o){return o?.type===l.ElementType.CONTROL&&(o.controlComponent===l.ControlComponent.PREFIX||o.controlComponent===l.ControlComponent.PRE_TEXT||o.controlComponent===l.ControlComponent.PRETEXTFIX||o.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)}function Va(o){return o?.type===l.ElementType.CONTROL&&(o.controlComponent===l.ControlComponent.POSTFIX||o.controlComponent===l.ControlComponent.POST_TEXT||o.controlComponent===l.ControlComponent.POSTTEXTFIX||o.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)}function _o(o,t,e="input"){const n=Vt(),i=t.getDraw(),r=i.getControl(),s=i.getOptions(),a=i.getElementList(),u=i.getPosition().getCursorPosition()?.index;if(i.isReadonly()||i.isDisabled())return;const h=i.getPosition().getCursorPosition();if(!o||!h)return;const g=t.isComposing;if(g&&t.compositionInfo?.value===o)return;const f=i.getRange();if(!f.getIsCanInput())return;const{endIndex:T}=f.getRange(),m=i.getElementList();if(vt(m[T])){const v=m[T]?.type===l.ElementType.SUB_TEMPLATE&&m[T].subTemplateExpanded?l.LocationPosition.AFTER:l.LocationPosition.BEFORE,w=Ge(m,T,v);if(w!==T&&!vt(m[w])){f.setRange(w,w),i.render({curIndex:w,isSubmitHistory:!1});return}}const p=m[T],I=m[T+1];if(p?.type===l.ElementType.SUB_TEMPLATE&&I?.type===l.ElementType.SUB_TEMPLATE)return;if(i.getMode()===l.EditorMode.FORM){const K=r.getActiveTextControlLimit();if(!r.getActiveControl()||!r.getIsRangeWithinControl()&&!r.getIsRangeInPostfix())return;if(K){const x=f.getRange();if(x.startIndex<K.startIndex||x.endIndex>K.endIndex){const A=Math.min(Math.max(x.endIndex,K.startIndex),K.endIndex);f.setRange(A,A),i.render({curIndex:A,isSubmitHistory:!1});return}}const{endIndex:w}=f.getRange(),Z=i.getElementList(),J=Z[w];if(!J?.originControlId){if(J?.controlId&&J?.controlComponent===l.ControlComponent.VALUE)for(let x=w;x>=0;x--){const A=Z[x];if(A.controlId!==J.controlId||A.originControlId)break;if(A.control?.type===l.ControlType.TEXTFIELD)return}}}const P=f.getDefaultStyle()||t.compositionInfo?.defaultStyle||null,C=t.compositionInfo?.perfStartTime,S=Da(t,i.getElementList());g||i.getCursor().clearAgentDomValue();const{TEXT:F,HYPERLINK:N,SUBSCRIPT:V,SUPERSCRIPT:Y,DATE:E,TAB:W}=l.ElementType,X=o.replaceAll(`
|
|
101
|
+
`,_),{startIndex:O,endIndex:M}=f.getRange(),b=f.getRangeAnchorStyle(S,O);if(!b)return;const y=O>0?S[O-1]:null,D=!!(b.controlId||b.control),Q={...!D&&y?y:b,...P},G=i.isDesignMode(),H=S[M+1],tt=Wa(H)&&!H?.originControlId,st=Va(b)&&!b.originControlId||b.type===l.ElementType.CONTROL&&b.controlComponent===l.ControlComponent.VALUE&&H?.type!==l.ElementType.CONTROL&&!b.originControlId,et=tt||st,nt=et?{...b,type:void 0,control:void 0,controlId:void 0,controlComponent:void 0,originControlId:void 0,color:s.defaultColor,highlight:void 0}:b,q=et||D?nt:Q,dt=ct(X).map(K=>{const v={value:K};if(G||!q.title?.disabled&&!q.control?.disabled){const w=S[M+1];(!q.type||q.type===F||q.type===N&&w?.type===N||q.type===E&&w?.type===E||q.type===V&&w?.type===V||q.type===Y&&w?.type===Y)&&al.forEach(Z=>{if(Z==="groupIds"&&!w?.groupIds)return;const J=q[Z];J!==void 0&&(v[Z]=J)}),(P||q.type===W)&&Re.forEach(Z=>{const J=P?.[Z]||q[Z];J!==void 0&&(v[Z]=J)}),g&&(v.underline=!0)}if(!et){const w=b.originControlId&&(b.controlComponent===l.ControlComponent.POSTFIX||b.controlComponent===l.ControlComponent.POSTTEXTFIX||b.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||b.controlComponent===l.ControlComponent.POST_TEXT),Z=!b.originControlId&&b.controlId&&(b.controlComponent===l.ControlComponent.POSTFIX||b.controlComponent===l.ControlComponent.POSTTEXTFIX||b.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||b.controlComponent===l.ControlComponent.POST_TEXT)&&H?.controlId&&H.controlId!==b.controlId,J=b.controlId&&b.originControlId&&(b.controlComponent===l.ControlComponent.VALUE||b.controlComponent===l.ControlComponent.PLACEHOLDER);if(w&&!v.controlId){const x=b.originControlId;let A=null;for(let $=O;$>=0;$--){const B=S[$];if(B.controlId===x&&!B.originControlId&&B.control){A=B.control;break}}v.controlId=x,v.controlComponent=l.ControlComponent.VALUE,A&&(v.control=A)}else if(Z&&!v.controlId){if(H?.controlId&&H.controlId!==b.controlId)if(H.controlComponent===l.ControlComponent.PREFIX||H.controlComponent===l.ControlComponent.PRETEXTFIX)for(let x=O;x>=0;x--){const A=S[x];if(A.controlId===b.controlId&&(A.controlComponent===l.ControlComponent.PREFIX||A.controlComponent===l.ControlComponent.PRETEXTFIX)){for(let $=x-1;$>=0;$--){const B=S[$];if(B.controlId&&B.controlId!==b.controlId&&(B.controlComponent===l.ControlComponent.PRETEXTFIX||B.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||B.controlComponent===l.ControlComponent.PREFIX||B.controlComponent===l.ControlComponent.PRE_TEXT)){v.controlId=B.controlId,v.controlComponent=l.ControlComponent.VALUE,B.control&&(v.control=B.control);break}if(B.controlId&&B.controlId!==b.controlId&&(B.controlComponent===l.ControlComponent.POSTFIX||B.controlComponent===l.ControlComponent.POSTTEXTFIX))break}break}}else(H.controlComponent===l.ControlComponent.POSTFIX||H.controlComponent===l.ControlComponent.POSTTEXTFIX)&&(v.controlId=H.controlId,v.controlComponent=l.ControlComponent.VALUE,H.control&&(v.control=H.control));if(!v.controlId)for(let x=O;x>=0;x--){const A=S[x];if(A.controlId===b.controlId&&(A.controlComponent===l.ControlComponent.PREFIX||A.controlComponent===l.ControlComponent.PRETEXTFIX)){for(let $=x-1;$>=0;$--){const B=S[$];if(B.controlId&&B.controlId!==b.controlId&&(B.controlComponent===l.ControlComponent.PRETEXTFIX||B.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||B.controlComponent===l.ControlComponent.PREFIX||B.controlComponent===l.ControlComponent.PRE_TEXT)){v.controlId=B.controlId,v.controlComponent=l.ControlComponent.VALUE,B.control&&(v.control=B.control);break}if(B.controlId&&B.controlId!==b.controlId&&(B.controlComponent===l.ControlComponent.POSTFIX||B.controlComponent===l.ControlComponent.POSTTEXTFIX))break}break}}}else if(J&&!v.controlId){const x=b.controlId;let A=b.control;if(!A)for(let $=O;$>=0;$--){const B=S[$];if(B.controlId===x&&B.control&&(A=B.control,B.controlComponent===l.ControlComponent.PREFIX||B.controlComponent===l.ControlComponent.PRETEXTFIX))break}v.controlId=x,v.originControlId=b.originControlId,v.controlComponent=l.ControlComponent.VALUE,A&&(v.control=A)}else if(b.controlId&&!b.originControlId){let x=b.control;if(!x)for(let A=O;A>=0;A--){const $=S[A];if($.controlId===b.controlId&&!$.originControlId&&$.control){x=$.control;break}}v.controlId||(v.controlId=b.controlId),x&&!v.control&&(v.control=x),v.controlComponent||(v.controlComponent=l.ControlComponent.VALUE)}else if(!v.controlId&&!v.control&&H?.originControlId&&(H.controlComponent===l.ControlComponent.PREFIX||H.controlComponent===l.ControlComponent.PRETEXTFIX)){const x=H.originControlId;let A=null;for(let $=M;$>=0;$--){const B=S[$];if(B.controlId===x&&!B.originControlId&&B.control){A=B.control;break}}v.controlId=x,v.controlComponent=l.ControlComponent.VALUE,A&&(v.control=A)}}if(K&&K!==_){const w=ba(K,s.defaultFont);v.font=w}return v});let ot;const ut=a[u],ht=a[u+1];if(g)ot=O;else{const K=w=>{if(dt?.length)for(let Z=0;Z<dt.length;Z++)S.splice(w+Z,0,dt[Z]);return O+dt.length},v=O+1;if(O!==M&&(i.removeSplitTdOtherRangeElements(),i.spliceElementList(S,v,M-O)),et)ot=K(v);else if(ut?.originControlId&&(ut?.controlComponent==="postfix"||ut?.controlComponent==="postTextFix"))ot=K(v);else if((ut?.control?.type===l.ControlType.NUMBER||ht?.control?.type===l.ControlType.NUMBER)&&r.getActiveControl()?.getElement()?.control?.type===l.ControlType.NUMBER&&r.getIsRangeWithinControl()){const w=r.getActiveControl();w&&typeof w.awake=="function"&&w.awake(),ot=O}else if((ut?.control?.type===l.ControlType.SELECT||ht?.control?.type===l.ControlType.SELECT)&&r.getActiveControl()?.getElement()?.control?.type===l.ControlType.SELECT&&r.getIsRangeWithinControl()){const w=r.getActiveControl();w&&typeof w.awake=="function"&&w.awake(),ot=O}else ut?.control?.type==="button"||ht?.control?.type==="button"?(ut?.control||ht?.control)?.buttonText?ot=O:r.getActiveControl()&&r.getIsRangeWithinControl()?(r.removePlaceholder(O,{elementList:S}),ot=r.setValue(dt),r.emitControlContentChange()):ot=O:r.getActiveControl()&&r.getIsRangeWithinControl()?(r.removePlaceholder(O,{elementList:S}),ot=r.setValue(dt),r.emitControlContentChange()):(ut?.type==="control"||ht?.type==="control")&&!et?ot=K(v):(wt(S,dt,O,{editorOptions:s}),i.spliceElementList(S,v,0,dt),ot=O+dt.length)}if(~ot&&!g){const K=Vt()-n,v=Vt();f.setRange(ot,ot),i.render({curIndex:ot,isSubmitHistory:!g,traceLabel:`input:${e}`}),So(s,`input:${e}`,Vt()-n,[{label:"mutate",duration:K},{label:"renderCall",duration:Vt()-v}],{isComposing:g,textLength:dt.length,compositionChainDuration:e==="compositionend"&&C!==void 0?Number((Vt()-C).toFixed(2)):void 0})}g&&(t.compositionInfo={value:X,startIndex:ot,endIndex:M,defaultStyle:P,perfStartTime:n})}function Ya(o){o.compositionInfo&&(o.compositionInfo=null)}function Da(o,t){if(!o.compositionInfo||o.isComposing)return t;const{startIndex:e,endIndex:n}=o.compositionInfo;return e!==n&&(o.getDraw().removeSplitTdOtherRangeElements(),o.getDraw().spliceElementList(t,e+1,n-e),o.getDraw().getRange().setRange(e,e)),o.compositionInfo=null,t}async function Ua(o){const t=o.getDraw(),e=t.getRange(),{startIndex:n,endIndex:i}=e.getRange();if(!~n&&!~n||t.isReadonly()||!e.getIsCanInput())return;const r=t.getElementList();let s=n,a=i;if(n===i){const h=t.getPosition().getPositionList(),g=h[n],f=g.rowNo,T=g.pageNo,m=[];for(let I=0;I<h.length;I++){const L=h[I];if(L.pageNo>T)break;L.pageNo===T&&L.rowNo===f&&m.push(I)}const p=m[0]-1;s=p<0?0:p,a=m[m.length-1]}const c=t.getOptions();await os(r.slice(s+1,a+1),c);const d=t.getControl();let u;d.getActiveControl()&&d.getIsRangeWithinControl()?(u=d.cut(),d.emitControlContentChange()):(t.spliceElementList(r,s+1,a-s),u=s),e.setRange(u,u),t.render({curIndex:u})}async function wa(o,t){const e=o.getDraw(),{copy:n}=e.getOverride();if(n&&n()?.preventDefault!==!1)return;const i=e.getRange();let r=null;if(i.getRange().isCrossRowCol){const a=i.getRangeTableElement();if(!a)return;const c=e.getTableParticle().getRangeRowCol();if(!c)return;const d={type:l.ElementType.TABLE,value:"",colgroup:[],trList:[]},u=c[0],R=u[0].colIndex,h=u[u.length-1],g=h.colIndex+h.colspan-1;for(let f=R;f<=g;f++)d.colgroup.push(a.colgroup[f]);for(let f=0;f<c.length;f++){const T=c[f],m=a.trList[T[0].rowIndex],p={tdList:[],height:m.height,minHeight:m.minHeight};for(let I=0;I<T.length;I++)p.tdList.push(T[I]);d.trList.push(p)}r=Mt([d])}else r=i.getIsCollapsed()?i.getRangeRowElementList():i.getSelectionElementList();t?.isPlainText&&r?.length&&(r=[{value:xe(r)}]),r?.length&&await os(r,e.getOptions())}function Za(o,t){const e=t.getDraw(),{drop:n}=e.getOverride();if(n&&n(o)?.preventDefault!==!1)return;o.preventDefault();const i=o.dataTransfer?.getData("text");if(i)t.input(i);else{const r=o.dataTransfer?.files;if(!r)return;for(let s=0;s<r.length;s++){const a=r[s];a.type.startsWith("image")&&vo(t,a)}}}function hs(o){if(!Intl.Segmenter)return null;const t=o.getDraw(),e=t.getPosition().getCursorPosition();if(!e)return null;const i=t.getRange().getRangeParagraphInfo();if(!i)return null;const r=i?.elementList?.map(h=>!h.type||h.type!==l.ElementType.CONTROL&&zt.includes(h.type)?h.value:_).join("")||"";if(!r)return null;const s=e.isFirstLetter||t.getCursor().getHitLineStartIndex()?e.index+1:e.index,a=i.startIndex,d=new Intl.Segmenter(void 0,{granularity:"word"}).segment(r);let u=-1,R=-1;for(const{segment:h,index:g,isWordLike:f}of d){const T=g+a;if(f&&s>=T&&s<T+h.length){u=T-1,R=u+h.length;break}}return~u&&~R?{startIndex:u,endIndex:R}:null}function Qa(o){const t=o.getDraw(),e=t.getPosition().getCursorPosition();if(!e)return null;const{value:n,index:i}=e,r=t.getLetterReg();let s=0,a=0;const c=po.test(n);if(c||r.test(n)){const u=t.getElementList();let R=i-1;for(;R>0;){const g=u[R].value;if(c&&po.test(g)||!c&&r.test(g))s++,R--;else break}let h=i+1;for(;h<u.length;){const g=u[h].value;if(c&&po.test(g)||!c&&r.test(g))a++,h++;else break}}const d=i-s-1;return d<0?null:{startIndex:d,endIndex:i+a}}function va(o,t){const e=o.getDraw(),n=e.getPosition(),i=n.getPositionByXY({x:t.offsetX,y:t.offsetY});if(i.isImage&&i.isDirectHit){const a=e.getElementList(),c=e.getEventBus(),d=a[i.index];if(c.isSubscribe("imageDblclick")&&c.emit("imageDblclick",{evt:t,element:d}),d.imgPreviewDisabled)return;e.getPreviewer().render();return}if(e.getIsPagingMode()&&e.getMode()===l.EditorMode.EDIT&&!~i.index&&i.zone){e.getZone().setZone(i.zone),e.clearSideEffect(),n.setPositionContext({isTable:!1});return}if((i.isCheckbox||i.isRadio)&&i.isDirectHit)return;const r=e.getRange(),s=hs(o)||Qa(o);s&&(r.setRange(s.startIndex,s.endIndex),e.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1}),r.setRangeStyle())}function Ka(o){const t=o.getDraw(),e=t.getControl();if(e.getActiveControl()&&e.selectValue())return;const i=t.getPosition().getCursorPosition();if(!i)return;const{index:r}=i,s=t.getElementList();let a=0,c=0,d=r-1;for(;d>0;){const f=s[d],T=s[d-1];if(f.value===_&&!f.listWrap||f.listId!==T?.listId||f.titleId!==T?.titleId)break;a++,d--}let u=r+1;for(;u<s.length;){const f=s[u],T=s[u+1];if(f.value===_&&!f.listWrap||f.listId!==T?.listId||f.titleId!==T?.titleId)break;c++,u++}const R=t.getRange();let h=r-a-1;if(s[h]?.value!==_&&(h-=1),h<0)return;let g=r+c+1;(s[g]?.value===_||g>s.length-1)&&(g-=1),R.setRange(h,g),t.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1})}const gs={dblclick:va,threeClick:Ka};function Ha(o){o.isComposing=!0}function _a(o,t){const e=Vt();o.isComposing=!1;const n=o.getDraw(),i=n.getOptions();if(t.data)o.compositionInfo&&(o.compositionInfo.perfStartTime=e),ll?setTimeout(()=>{o.compositionInfo&&_o(t.data,o,"compositionend")},1):o.compositionInfo&&_o(t.data,o,"compositionend");else{const s=o.compositionInfo?.cancel;if(Ya(o),!s){const a=n.getRange(),{endIndex:c}=a.getRange();n.render({curIndex:c,isSubmitHistory:!1,traceLabel:"compositionend:empty"})}}n.getCursor().clearAgentDomValue(),So(i,"compositionend",Vt()-e,[],{hasData:!!t.data,dataLength:t.data?.length||0})}function xa(o){o.compositionInfo&&(o.compositionInfo.cancel=!0)}const xo={compositionstart:Ha,compositionend:_a,compositionCancel:xa};function Ga(o,t){const e=t.getDraw();if(e.isReadonly())return;o.preventDefault();const i=e.getPageContainer();if(!Wi(o.target,L=>L===i))return;const a=o.target.dataset.index;a&&e.setPageNo(Number(a));const c=e.getPosition(),d=c.adjustPositionContext({x:o.offsetX,y:o.offsetY});if(!d)return;const{isTable:u,tdValueIndex:R,index:h}=d,g=c.getPositionList(),f=u?R:h;~h&&(e.getRange().setRange(f,f),c.setCursorPosition(g[f]));const T=e.getCursor(),{cursor:{dragColor:m,dragWidth:p,dragFloatImageDisabled:I}}=e.getOptions();if(I){const L=t.cacheElementList?.[t.cacheRange.startIndex];if(L?.type===l.ElementType.IMAGE&&(L.imgDisplay===l.ImageDisplay.FLOAT_TOP||L.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM||L.imgDisplay===l.ImageDisplay.SURROUND))return}T.drawCursor({width:p,color:m,isBlink:!1,isFocus:!1})}const Aa={dragover:Ga};class ka{isAllowSelection;isComposing;compositionInfo;isAllowDrag;isAllowDrop;cacheRange;cacheElementList;cachePositionList;cachePositionContext;mouseDownStartPosition;draw;pageContainer;pageList;range;position;constructor(t){this.draw=t,this.pageContainer=t.getPageContainer(),this.pageList=t.getPageList(),this.range=this.draw.getRange(),this.position=this.draw.getPosition(),this.isAllowSelection=!1,this.isComposing=!1,this.compositionInfo=null,this.isAllowDrag=!1,this.isAllowDrop=!1,this.cacheRange=null,this.cacheElementList=null,this.cachePositionList=null,this.cachePositionContext=null,this.mouseDownStartPosition=null}getDraw(){return this.draw}register(){this.pageContainer.addEventListener("click",this.click.bind(this)),this.pageContainer.addEventListener("mousedown",this.mousedown.bind(this)),this.pageContainer.addEventListener("mouseup",this.mouseup.bind(this)),this.pageContainer.addEventListener("mouseleave",this.mouseleave.bind(this)),this.pageContainer.addEventListener("mousemove",this.mousemove.bind(this)),this.pageContainer.addEventListener("dblclick",this.dblclick.bind(this)),this.pageContainer.addEventListener("dragover",this.dragover.bind(this)),this.pageContainer.addEventListener("drop",this.drop.bind(this)),Jr(this.pageContainer,this.threeClick.bind(this))}setIsAllowSelection(t){this.isAllowSelection=t,t||this.applyPainterStyle()}setIsAllowDrag(t){this.isAllowDrag=t,this.isAllowDrop=t}clearPainterStyle(){this.pageList.forEach(t=>{t.style.cursor="text"}),this.draw.setPainterStyle(null)}applyPainterStyle(){const t=this.draw.getPainterStyle();if(!t||this.draw.isReadonly()||this.draw.isDisabled())return;let n=this.range.getSelection();if(!n){const s=hs(this);s&&(n=this.draw.getElementList().slice(s.startIndex+1,s.endIndex+1))}if(!n)return;const i=Object.keys(t);n.forEach(s=>{i.forEach(a=>{const c=a;Reflect.set(s,c,t[c])})}),this.draw.render({isSetCursor:!1});const r=this.draw.getPainterOptions();(!r||!r.isDblclick)&&this.clearPainterStyle()}selectAll(){if(this.position.getPositionContext().isTable)this.draw.getTableOperate().tableSelectAll();else{const t=this.position.getPositionList();this.range.setRange(0,t.length-1),this.draw.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1})}}mousemove(t){this.draw.isInteractionSuspended()||Ta(t,this)}mousedown(t){this.draw.isInteractionSuspended()||ha(t,this)}click(){this.draw.isInteractionSuspended()||sl&&!this.draw.isReadonly()&&this.draw.getCursor().getAgentDom().focus()}mouseup(t){this.draw.isInteractionSuspended()||ga(t,this)}mouseleave(t){this.draw.isInteractionSuspended()||fa(t,this)}keydown(t){this.draw.isInteractionSuspended()||Na(t,this)}dblclick(t){this.draw.isInteractionSuspended()||gs.dblclick(this,t)}threeClick(){this.draw.isInteractionSuspended()||gs.threeClick(this)}input(t,e="input"){this.draw.isInteractionSuspended()||_o(t,this,e)}async cut(){this.draw.isInteractionSuspended()||await Ua(this)}async copy(t){this.draw.isInteractionSuspended()||await wa(this,t)}compositionstart(){this.draw.isInteractionSuspended()||xo.compositionstart(this)}compositionend(t){this.draw.isInteractionSuspended()||xo.compositionend(this,t)}compositionCancel(){this.draw.isInteractionSuspended()||xo.compositionCancel(this)}drop(t){this.draw.isInteractionSuspended()||Za(t,this)}dragover(t){this.draw.isInteractionSuspended()||Aa.dragover(t,this)}}const fs={PAGE_SCALE:"pageScale"};class Ja{draw;options;cursor;canvasEvent;range;previewer;tableTool;hyperlinkParticle;control;dateParticle;imageParticle;dprMediaQueryList;constructor(t,e){this.draw=t,this.options=t.getOptions(),this.canvasEvent=e,this.cursor=null,this.range=t.getRange(),this.previewer=t.getPreviewer(),this.tableTool=t.getTableTool(),this.hyperlinkParticle=t.getHyperlinkParticle(),this.dateParticle=t.getDateParticle(),this.imageParticle=t.getImageParticle(),this.control=t.getControl(),this.dprMediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`)}register(){this.cursor=this.draw.getCursor(),this.addEvent()}addEvent(){window.addEventListener("blur",this.clearSideEffect),document.addEventListener("mousedown",this.clearSideEffect),document.addEventListener("mouseup",this.setCanvasEventAbility),document.addEventListener("wheel",this.setPageScale,{passive:!1}),document.addEventListener("visibilitychange",this._handleVisibilityChange),this.dprMediaQueryList.addEventListener("change",this._handleDprChange)}removeEvent(){window.removeEventListener("blur",this.clearSideEffect),document.removeEventListener("mousedown",this.clearSideEffect),document.removeEventListener("mouseup",this.setCanvasEventAbility),document.removeEventListener("wheel",this.setPageScale),document.removeEventListener("visibilitychange",this._handleVisibilityChange),this.dprMediaQueryList.removeEventListener("change",this._handleDprChange)}clearSideEffect=t=>{if(!this.cursor)return;if(this.draw.isInteractionSuspended()){this.resetSideEffect();return}const e=t?.composedPath?.()[0]||t.target;if(this.draw.isTargetInsideEditor(e)){this.watchCursorActive();return}this.resetSideEffect()};resetSideEffect=()=>{this.cursor&&(this.cursor.recoveryCursor(),this.range.recoveryRangeStyle(),this.previewer.clearResizer(),this.tableTool.dispose(),this.hyperlinkParticle.clearHyperlinkPopup(),this.control.destroyControl(),this.dateParticle.clearDatePicker(),this.imageParticle.destroyFloatImage())};setCanvasEventAbility=()=>{this.canvasEvent.setIsAllowDrag(!1),this.canvasEvent.setIsAllowSelection(!1)};watchCursorActive(){this.range.getIsCollapsed()&&setTimeout(()=>{this.cursor?.getAgentIsActive()||this.cursor?.drawCursor({isFocus:!1,isBlink:!1})})}setPageScale=t=>{if(this.draw.isInteractionSuspended()||!this.draw.isTargetInsideEditor(t.target)||this.options.shortcutDisableKeys.includes(fs.PAGE_SCALE)||!t.ctrlKey)return;t.preventDefault();const{scale:e}=this.options;if(t.deltaY<0){const n=e*10+1;n<=30&&this.draw.setPageScale(n/10)}else{const n=e*10-1;n>=5&&this.draw.setPageScale(n/10)}};_handleVisibilityChange=()=>{if(document.visibilityState==="visible"){const t=this.range.getRange(),e=!!~t.startIndex&&!!~t.endIndex&&t.startIndex===t.endIndex;this.range.replaceRange(t),this.draw.render({isSetCursor:e,isCompute:!1,isSubmitHistory:!1,curIndex:t.startIndex})}};_handleDprChange=()=>{this.draw.setPageDevicePixel()}}class Ba{undoStack=[];redoStack=[];maxRecordCount;constructor(t){this.maxRecordCount=t.getOptions().historyMaxRecordCount+1}undo(){if(this.undoStack.length>1){const t=this.undoStack.pop();this.redoStack.push(t),this.undoStack.length&&this.undoStack[this.undoStack.length-1]()}}redo(){if(this.redoStack.length){const t=this.redoStack.pop();this.undoStack.push(t),t()}}execute(t){for(this.undoStack.push(t),this.redoStack.length&&(this.redoStack=[]);this.undoStack.length>this.maxRecordCount;)this.undoStack.shift()}isCanUndo(){return this.undoStack.length>1}isCanRedo(){return!!this.redoStack.length}isStackEmpty(){return!this.undoStack.length&&!this.redoStack.length}recovery(){this.undoStack=[],this.redoStack=[]}popUndo(){return this.undoStack.pop()}}class $a{cursorPosition;positionContext;positionList;floatPositionList;draw;eventBus;options;constructor(t){this.positionList=[],this.floatPositionList=[],this.cursorPosition=null,this.positionContext={isTable:!1,isControl:!1},this.draw=t,this.eventBus=t.getEventBus(),this.options=t.getOptions()}getFloatPositionList(){return this.floatPositionList}getTablePositionList(t){const{index:e,trIndex:n,tdIndex:i}=this.positionContext;return t[e].trList[n].tdList[i].positionList||[]}getPositionList(){return this.positionContext.isTable?this.getTablePositionList(this.draw.getOriginalElementList()):this.getOriginalPositionList()}getMainPositionList(){return this.positionContext.isTable?this.getTablePositionList(this.draw.getOriginalMainElementList()):this.positionList}getOriginalPositionList(){const t=this.draw.getZone();return t.isHeaderActive()?this.draw.getHeader().getPositionList():t.isFooterActive()?this.draw.getFooter().getPositionList():this.positionList}getOriginalMainPositionList(){return this.positionList}getSelectionPositionList(){const{startIndex:t,endIndex:e}=this.draw.getRange().getRange();return t===e?null:this.getPositionList().slice(t+1,e+1)}setPositionList(t){this.positionList=t}setFloatPositionList(t){this.floatPositionList=t}computePageRowPosition(t){const{positionList:e,rowList:n,pageNo:i,startX:r,startY:s,startRowIndex:a,startIndex:c,innerWidth:d,zone:u}=t,{scale:R,table:{tdPadding:h}}=this.options;let g=r,f=s,T=c;for(let m=0;m<n.length;m++){const p=n[m];if(!p.isSurround){const P=p.width+(p.offsetX||0);p.rowFlex===l.RowFlex.CENTER?g+=(d-P)/2:p.rowFlex===l.RowFlex.RIGHT&&(g+=d-P)}g+=p.offsetX||0,f+=p.offsetY||0;const I=g,L=f;for(let P=0;P<p.elementList.length;P++){const C=p.elementList[P],S=C.metrics,F=!vt(C)&&(C.imgDisplay!==l.ImageDisplay.INLINE&&C.type===l.ElementType.IMAGE||C.type===l.ElementType.LATEX)?p.ascent-S.height:p.ascent;C.left&&(g+=C.left),C.translateX&&(g+=C.translateX*R);const N={pageNo:i,index:T,value:C.value,rowIndex:a+m,rowNo:m,metrics:S,left:C.left||0,ascent:F,lineHeight:p.height,isFirstLetter:P===0,isLastLetter:P===p.elementList.length-1,coordinate:{leftTop:[g,f],leftBottom:[g,f+p.height],rightTop:[g+S.width,f],rightBottom:[g+S.width,f+p.height]}};if(C.imgDisplay===l.ImageDisplay.SURROUND||C.imgDisplay===l.ImageDisplay.FLOAT_TOP||C.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM){const V=e[e.length-1];V&&(N.metrics=V.metrics,N.coordinate=V.coordinate),C.imgFloatPosition||(C.imgFloatPosition={x:g,y:f,pageNo:i}),this.floatPositionList.push({pageNo:i,element:C,position:N,isTable:t.isTable,index:t.index,tdIndex:t.tdIndex,trIndex:t.trIndex,tdValueIndex:T,zone:u})}if(e.push(N),T++,g+=S.width,C.type===l.ElementType.TABLE&&!vt(C)){const V=C.tdPadding||h,Y=V[1]+V[3],E=V[0]+V[2];for(let W=0;W<C.trList.length;W++){const X=C.trList[W];for(let O=0;O<X.tdList.length;O++){const M=X.tdList[O];M.positionList=[];const b=M.rowList,y=this.computePageRowPosition({positionList:M.positionList,rowList:b,pageNo:i,startRowIndex:0,startIndex:0,startX:(M.x+V[3])*R+I+(C.translateX||0)*R,startY:(M.y+V[0])*R+L,innerWidth:(M.width-Y)*R,isTable:!0,index:T-1,tdIndex:O,trIndex:W,zone:u});if(M.verticalAlign===l.VerticalAlign.MIDDLE||M.verticalAlign===l.VerticalAlign.BOTTOM){const D=b.reduce((G,H)=>G+H.height,0),U=(M.height-E)*R-D,Q=M.verticalAlign===l.VerticalAlign.MIDDLE?U/2:U;Math.floor(Q)>0&&M.positionList.forEach(G=>{const{coordinate:{leftTop:H,leftBottom:tt,rightBottom:st,rightTop:et}}=G;H[1]+=Q,tt[1]+=Q,st[1]+=Q,et[1]+=Q})}g=y.x,f=y.y}}g=I,f=L}}g=r,f+=p.height}return{x:g,y:f,index:T}}computePositionList(){this.positionList=[];const t=this.draw.getInnerWidth(),e=this.draw.getPageRowList(),n=this.draw.getMargins(),i=n[3],s=this.draw.getHeader().getExtraHeight(),a=n[0]+s;let c=0;for(let d=0;d<e.length;d++){const u=e[d];if(!u?.length)continue;const R=u[0].startIndex;this.computePageRowPosition({positionList:this.positionList,rowList:u,pageNo:d,startRowIndex:c,startIndex:R,startX:i,startY:a,innerWidth:t}),c+=u.length}}computeRowPosition(t){const{row:e,innerWidth:n}=t,i=[];return this.computePageRowPosition({positionList:i,innerWidth:n,rowList:[at(e)],pageNo:0,startX:0,startY:0,startIndex:0,startRowIndex:0}),i}setCursorPosition(t){this.cursorPosition=t}getCursorPosition(){return this.cursorPosition}getPositionContext(){return this.positionContext}setPositionContext(t){this.eventBus.emit("positionContextChange",{value:t,oldValue:this.positionContext}),this.positionContext=t}getPositionByXY(t){const{x:e,y:n,isTable:i}=t;let{elementList:r,positionList:s}=t;r||(r=this.draw.getOriginalElementList()),s||(s=this.getOriginalPositionList());const a=this.draw.getZone(),c=t.pageNo??this.draw.getPageNo(),d=a.isMainActive(),u=d?c:0;if(!i){const T=this.getFloatPositionByXY({...t,imgDisplays:[l.ImageDisplay.FLOAT_TOP,l.ImageDisplay.SURROUND]});if(T)return T}for(let T=0;T<s.length;T++){const{index:m,pageNo:p,left:I,isFirstLetter:L,coordinate:{leftTop:P,rightTop:C,leftBottom:S}}=s[T];if(u===p){if(p>u)break;if(P[0]-I<=e&&C[0]>=e&&P[1]<=n&&S[1]>=n){let F=T;const N=r[T];if(N.type===l.ElementType.TABLE)for(let Y=0;Y<N.trList.length;Y++){const E=N.trList[Y];for(let W=0;W<E.tdList.length;W++){const X=E.tdList[W],O=this.getPositionByXY({x:e,y:n,td:X,pageNo:c,tablePosition:s[T],isTable:!0,elementList:X.value,positionList:X.positionList});if(~O.index){const{index:M,hitLineStartIndex:b}=O,y=X.value[M];return{index:m,isCheckbox:O.isCheckbox||y.type===l.ElementType.CHECKBOX||y.controlComponent===l.ControlComponent.CHECKBOX,isRadio:y.type===l.ElementType.RADIO||y.controlComponent===l.ControlComponent.RADIO,isControl:!!y.controlId,isImage:O.isImage,isLabel:O.isLabel,isMacro:O.isMacro,isDirectHit:O.isDirectHit,isTable:!0,tdIndex:W,trIndex:Y,tdValueIndex:M,tdId:X.id,trId:E.id,tableId:N.id,hitLineStartIndex:b}}}}if(N.type===l.ElementType.IMAGE||N.type===l.ElementType.LATEX)return{index:F,isDirectHit:!0,isImage:!0};if(N.type===l.ElementType.MENSTRUAL_HISTORY)return{index:F,isDirectHit:!0};if(N.type===l.ElementType.FETAL_HEART_POSITION)return{index:F,isDirectHit:!0};if(N.type===l.ElementType.TOOTH_POSITION){const{scale:Y}=this.options,E=N.width*Y;return e>=P[0]&&e<=P[0]+E?{index:F,isDirectHit:!0}:{index:F}}if(N.type===l.ElementType.CHECKBOX||N.controlComponent===l.ControlComponent.CHECKBOX)return{index:F,isDirectHit:!0,isCheckbox:!0};if(N.type===l.ElementType.LABEL)return{index:F,isDirectHit:!0,isLabel:!0};if(N.type===l.ElementType.MACRO||N.type===l.ElementType.CUSTOM_MACRO||N.type===l.ElementType.REUSABLE_ITEM||N.type===l.ElementType.SUB_TEMPLATE)return{index:F,isDirectHit:!0,isMacro:!0};if(N.type===l.ElementType.TAB&&N.listStyle===l.ListStyle.CHECKBOX){let Y=F-1;for(;Y>0;){const E=r[Y];if(E.value===_&&E.listStyle===l.ListStyle.CHECKBOX)break;Y--}return{index:Y,isDirectHit:!0,isCheckbox:!0}}if(N.type===l.ElementType.RADIO||N.controlComponent===l.ControlComponent.RADIO)return{index:F,isDirectHit:!0,isRadio:!0};let V;if(r[m].value!==_){const Y=C[0]-P[0];e<P[0]+Y/2&&(F=T-1,L&&(V=T))}return{isDirectHit:!0,hitLineStartIndex:V,index:F,isControl:!!N.controlId}}}}if(!i){const T=this.getFloatPositionByXY({...t,imgDisplays:[l.ImageDisplay.FLOAT_BOTTOM]});if(T)return T}let R=!1,h=-1,g;if(i){const{scale:T}=this.options,{td:m,tablePosition:p}=t;if(m&&p){const{leftTop:I}=p.coordinate,L=m.x*T+I[0],P=m.y*T+I[1],C=m.width*T,S=m.height*T;if(!(L<e&&e<L+C&&P<n&&n<P+S))return{index:h}}}const f=s.filter(T=>T.isLastLetter&&T.pageNo===u);for(let T=0;T<f.length;T++){const{index:m,rowNo:p,coordinate:{leftTop:I,leftBottom:L}}=f[T];if(n>I[1]&&n<=L[1]){const P=s.findIndex(N=>N.pageNo===u&&N.rowNo===p),C=r[P],S=s[P],F=C.listStyle===l.ListStyle.CHECKBOX?this.draw.getMargins()[3]:S.coordinate.leftTop[0];if(e<F)~P?S.value===_?h=P:(h=P-1,g=P):h=m;else{if(C.listStyle===l.ListStyle.CHECKBOX&&e<I[0])return{index:P,isDirectHit:!0,isCheckbox:!0};h=m}R=!0;break}}if(!R){if(this.draw.getIsPagingMode()){const m=this.draw.getHeader(),p=m.getHeight(),I=m.getHeaderTop()+p,L=this.draw.getFooter(),C=this.draw.getHeight()-(L.getFooterBottom()+L.getHeight());if(d){if(n<I)return{index:-1,zone:l.EditorZone.HEADER};if(n>C)return{index:-1,zone:l.EditorZone.FOOTER}}else if(n<=C&&n>=I)return{index:-1,zone:l.EditorZone.MAIN}}const T=this.draw.getMargins();if(n<=T[0])for(let m=0;m<s.length;m++){const p=s[m];if(p.pageNo!==u||p.rowNo!==0)continue;const{leftTop:I,rightTop:L}=p.coordinate;if(e<=T[3]||e>=I[0]&&e<=L[0]||s[m+1]?.rowNo!==0)return{index:p.index}}else{const m=f[f.length-1];if(m){const p=m.rowNo;for(let I=0;I<s.length;I++){const L=s[I];if(L.pageNo!==u||L.rowNo!==p)continue;const{leftTop:P,rightTop:C}=L.coordinate;if(e<=T[3]||e>=P[0]&&e<=C[0]||s[I+1]?.rowNo!==p)return{index:L.index}}}}return{index:f[f.length-1]?.index||s.length-1}}return{hitLineStartIndex:g,index:h,isControl:!!r[h]?.controlId}}getFloatPositionByXY(t){const{x:e,y:n}=t,i=t.pageNo??this.draw.getPageNo(),r=this.draw.getZone().getZone(),{scale:s}=this.options;for(let a=0;a<this.floatPositionList.length;a++){const{position:c,element:d,isTable:u,index:R,trIndex:h,tdIndex:g,tdValueIndex:f,zone:T,pageNo:m}=this.floatPositionList[a];if(i===m&&d.type===l.ElementType.IMAGE&&d.imgDisplay&&t.imgDisplays.includes(d.imgDisplay)&&(!T||T===r)){const p=d.imgFloatPosition,I=p.x*s,L=p.y*s,P=d.width*s,C=d.height*s;if(e>=I&&e<=I+P&&n>=L&&n<=L+C)return u?{index:R,isDirectHit:!0,isImage:!0,isTable:u,trIndex:h,tdIndex:g,tdValueIndex:f,tdId:d.tdId,trId:d.trId,tableId:d.tableId}:{index:c.index,isDirectHit:!0,isImage:!0}}}}adjustPositionContext(t){const e=this.getPositionByXY(t);if(!~e.index)return null;if(e.isControl&&this.draw.getMode()!==l.EditorMode.READONLY){const{index:m,isTable:p,trIndex:I,tdIndex:L,tdValueIndex:P}=e,C=this.draw.getControl(),{newIndex:S}=C.moveCursor({index:m,isTable:p,trIndex:I,tdIndex:L,tdValueIndex:P});p?e.tdValueIndex=S:e.index=S}const{index:n,isCheckbox:i,isRadio:r,isControl:s,isImage:a,isLabel:c,isDirectHit:d,isTable:u,trIndex:R,tdIndex:h,tdId:g,trId:f,tableId:T}=e;return this.setPositionContext({isTable:u||!1,isCheckbox:i||!1,isRadio:r||!1,isControl:s||!1,isImage:a||!1,isLabel:c||!1,isDirectHit:d||!1,index:n,trIndex:R,tdIndex:h,tdId:g,trId:f,tableId:T}),e}setSurroundPosition(t){const{scale:e}=this.options,{pageNo:n,row:i,rowElement:r,rowElementRect:s,surroundElementList:a,availableWidth:c}=t;let d=s.x,u=0;if(a.length&&!sn(r)&&!r.control?.minWidth)for(let R=0;R<a.length;R++){const h=a[R],g=h.imgFloatPosition;if(g.pageNo!==n)continue;const f={...g,x:g.x*e,y:g.y*e,width:h.width*e,height:h.height*e};if(el(s,f)){i.isSurround=!0;const T=f.width+f.x-s.x;if(r.left=T,i.width+=T,u+=T,d=f.x+f.width,i.width+r.metrics.width>c){r.left=0,i.width-=u;break}}}return{x:d,rowIncreaseWidth:u}}}class za{draw;options;range;listener;eventBus;position;historyManager;defaultStyle;lastRangeStyle;constructor(t){this.draw=t,this.options=t.getOptions(),this.listener=t.getListener(),this.eventBus=t.getEventBus(),this.position=t.getPosition(),this.historyManager=t.getHistoryManager(),this.range={startIndex:-1,endIndex:-1},this.defaultStyle=null,this.lastRangeStyle=null}_isSameRangeStyle(t,e){if(!t||!["type","undo","redo","painter","font","size","bold","italic","underline","strikeout","deletePerson","color","highlight","rowFlex","vertical","rowMargin","level","listType","listStyle","textDecoration","extension"].every(c=>t[c]===e[c])||!(t.dashArray.length===e.dashArray.length&&t.dashArray.every((c,d)=>c===e.dashArray[d])))return!1;const s=t.groupIds||[],a=e.groupIds||[];return s.length===a.length&&s.every((c,d)=>c===a[d])}_emitRangeStyle(t){this._isSameRangeStyle(this.lastRangeStyle,t)||(this.lastRangeStyle={...t,dashArray:[...t.dashArray],groupIds:t.groupIds?[...t.groupIds]:null},this.listener.rangeStyleChange?.(t),this.eventBus.isSubscribe("rangeStyleChange")&&this.eventBus.emit("rangeStyleChange",t))}getRange(){return this.range}clearRange(){this.setRange(-1,-1)}setDefaultStyle(t){t?this.defaultStyle={...this.defaultStyle,...t}:this.defaultStyle=null}getDefaultStyle(){return this.defaultStyle}getRangeAnchorStyle(t,e){const n=en(t,e);return n?{...n,...this.defaultStyle}:null}getIsRangeChange(t,e,n,i,r,s,a){return this.range.startIndex!==t||this.range.endIndex!==e||this.range.tableId!==n||this.range.startTdIndex!==i||this.range.endTdIndex!==r||this.range.startTrIndex!==s||this.range.endTrIndex!==a}getIsCollapsed(){const{startIndex:t,endIndex:e}=this.range;return t===e}getIsSelection(){const{startIndex:t,endIndex:e}=this.range;return!~t&&!~e?!1:t!==e}getSelection(){const{startIndex:t,endIndex:e,splitTdRange:n}=this.range;if(t===e)return null;if(n)return this.draw.getSplitTdValues(n.originalId).slice(n.startIndex+1,n.endIndex+1);const i=this.draw.getElementList();return i.slice(i[t]?.value===_?t:t+1,e+1)}getSelectionElementList(){if(this.range.isCrossRowCol){const t=this.draw.getTableParticle().getRangeRowCol();if(!t)return null;const e=[];for(let n=0;n<t.length;n++){const i=t[n];for(let r=0;r<i.length;r++){const s=i[r];e.push(...s.value)}}return e}return this.getSelection()}getTextLikeSelection(){const t=this.getSelection();return t?t.filter(e=>!e.type||zt.includes(e.type)):null}getTextLikeSelectionElementList(){const t=this.getSelectionElementList();return t?t.filter(e=>!e.type||zt.includes(e.type)):null}getRangeRow(){const{startIndex:t,endIndex:e}=this.range;if(!~t&&!~e)return null;const n=this.position.getPositionList(),i=new Map;for(let r=t;r<e+1;r++){const{pageNo:s,rowNo:a}=n[r],c=i.get(s);c?c.has(a)||c.add(a):i.set(s,new Set([a]))}return i}getRangeRowElementList(){const{startIndex:t,endIndex:e,isCrossRowCol:n}=this.range;if(!~t&&!~e)return null;if(n)return this.getSelectionElementList();const i=this.getRangeRow();if(!i)return null;const r=this.position.getPositionList(),s=this.draw.getElementList(),a=[];for(let c=0;c<r.length;c++){const d=r[c],u=i.get(d.pageNo);u&&u.has(d.rowNo)&&a.push(s[c])}return a}getRangeParagraph(){const{startIndex:t,endIndex:e}=this.range;if(!~t&&!~e)return null;const n=this.position.getPositionList(),i=this.draw.getElementList(),r=new Map;let s=t;for(;s>=0;){const{pageNo:d,rowNo:u}=n[s];let R=r.get(d);R||(R=[],r.set(d,R)),R.includes(u)||R.unshift(u);const h=i[s],g=i[s-1];if(h.value===_&&!h.listWrap||h.listId!==g?.listId||h.titleId!==g?.titleId)break;s--}const a=t===e;if(!a){let d=t+1;for(;d<e;){const{pageNo:u,rowNo:R}=n[d];let h=r.get(u);h||(h=[],r.set(u,h)),h.includes(R)||h.push(R),d++}}let c=e;for(a&&i[t].value===_&&(c+=1);c<n.length;){const d=i[c],u=i[c+1];if(d.value===_&&!d.listWrap||d.listId!==u?.listId||d.titleId!==u?.titleId)break;const{pageNo:R,rowNo:h}=n[c];let g=r.get(R);g||(g=[],r.set(R,g)),g.includes(h)||g.push(h),c++}return r}getRangeParagraphInfo(){const{startIndex:t,endIndex:e}=this.range;if(!~t&&!~e)return null;let n=-1;const i=[],r=this.getRangeParagraph();if(!r)return null;const s=this.draw.getElementList(),a=this.position.getPositionList();for(let c=0;c<a.length;c++){const d=a[c],u=r.get(d.pageNo);u&&u.includes(d.rowNo)&&(~n||(n=d.index),i.push(s[c]))}return i.length?{elementList:i,startIndex:n}:null}getRangeParagraphElementList(){return this.getRangeParagraphInfo()?.elementList||null}getRangeTableElement(){const t=this.position.getPositionContext();return t.isTable?this.draw.getOriginalElementList()[t.index]:null}getIsSelectAll(){const t=this.draw.getElementList(),{startIndex:e,endIndex:n}=this.range;return e===0&&t.length-1===n&&!this.position.getPositionContext().isTable}getIsPointInRange(t,e,n){const{startIndex:i,endIndex:r}=this.range,s=this.position.getPositionList();for(let a=i+1;a<=r&&s[a];a++){const{coordinate:{leftTop:d,rightBottom:u},pageNo:R}=s[a];if(n===R&&t>=d[0]&&t<=u[0]&&e>=d[1]&&e<=u[1])return!0}return!1}getKeywordRangeList(t){const e=this.draw.getSearch().getMatchList(t,this.draw.getOriginalElementList()),n=new Map;for(const r of e){const s=n.get(r.groupId);if(s)s.endIndex+=1;else{const{type:a,groupId:c,tableId:d,index:u,tdIndex:R,trIndex:h}=r,g={startIndex:u,endIndex:u};a===fe.TABLE&&(g.tableId=d,g.startTdIndex=R,g.endTdIndex=R,g.startTrIndex=h,g.endTrIndex=h),n.set(c,g)}}const i=[];return n.forEach(r=>{i.push(r)}),i}getIsCanInput(){const{range:{startIndex:t,endIndex:e},elementList:n}=this.getRangeElement(),i=n[t];if(!i)return!1;if(t===e)return(i.controlComponent!==l.ControlComponent.PRE_TEXT||n[t+1]?.controlComponent!==l.ControlComponent.PRE_TEXT)&&i.controlComponent!==l.ControlComponent.POST_TEXT;const r=n[e];return r?!i.controlId&&!r.controlId||(!i.controlId||i.controlComponent===l.ControlComponent.POSTFIX)&&(!r.controlId||r.controlComponent===l.ControlComponent.POSTFIX)||!!i.controlId&&r.controlId===i.controlId&&r.controlComponent!==l.ControlComponent.PRE_TEXT&&r.controlComponent!==l.ControlComponent.POST_TEXT&&r.controlComponent!==l.ControlComponent.POSTFIX:!1}setRange(t,e,n,i,r,s,a,c){this.getIsRangeChange(t,e,n,i,r,s,a)&&(this.range.startIndex=t,this.range.endIndex=e,this.range.tableId=n,this.range.startTdIndex=i,this.range.endTdIndex=r,this.range.startTrIndex=s,this.range.endTrIndex=a,this.range.isCrossRowCol=!!(i||r||s||a),this.range.splitTdRange=c,this.setDefaultStyle(null)),this.range.zone=this.draw.getZone().getZone();const u=this.draw.getControl();if(~t&&~e&&!!this.draw.getElementList()[t]?.controlId){u.initControl();return}u.destroyControl()}replaceRange(t){this.setRange(t.startIndex,t.endIndex,t.tableId,t.startTdIndex,t.endTdIndex,t.startTrIndex,t.endTrIndex)}shrinkRange(){const{startIndex:t,endIndex:e}=this.range;t===e||!~t&&!~e||this.replaceRange({...this.range,startIndex:e})}setRangeStyle(){const t=this.listener.rangeStyleChange,e=this.eventBus.isSubscribe("rangeStyleChange");if(!t&&!e)return;const{startIndex:n,endIndex:i,isCrossRowCol:r}=this.range;if(!~n&&!~i)return;let s;if(r){const b=this.draw.getOriginalElementList(),y=this.position.getPositionContext();s=b[y.index]}else{const b=~i?i:0,y=this.draw.getElementList();s=this.getRangeAnchorStyle(y,b)}if(!s)return;const a=this.getSelection()||[s],c=s.type||l.ElementType.TEXT,d=s.font||this.options.defaultFont,u=s.size||this.options.defaultSize,R=!~a.findIndex(b=>!b.bold),h=!~a.findIndex(b=>!b.italic),g=!~a.findIndex(b=>!b.underline&&!b.control?.underline),f=!~a.findIndex(b=>!b.strikeout),T=s.color||null,m=s.highlight||null,p=s.rowFlex||null,I=s.vertical||null,L=s.rowMargin??this.options.defaultRowMargin,P=s.dashArray||[],C=s.level||null,S=s.listType||null,F=s.listStyle||null,N=g&&s.textDecoration||null,V=!!this.draw.getPainterStyle(),Y=this.historyManager.isCanUndo(),E=this.historyManager.isCanRedo(),W=s.groupIds||null,X=s.extension??null,O=s.deletePerson??"",M={type:c,undo:Y,redo:E,painter:V,font:d,size:u,bold:R,italic:h,underline:g,strikeout:f,deletePerson:O,color:T,highlight:m,rowFlex:p,vertical:I,rowMargin:L,dashArray:P,level:C,listType:S,listStyle:F,groupIds:W,textDecoration:N,extension:X};this._emitRangeStyle(M)}recoveryRangeStyle(){const t=this.listener.rangeStyleChange,e=this.eventBus.isSubscribe("rangeStyleChange");if(!t&&!e)return;const n=this.options.defaultFont,i=this.options.defaultSize,r=this.options.defaultRowMargin,s=!!this.draw.getPainterStyle(),a=this.historyManager.isCanUndo(),c=this.historyManager.isCanRedo(),u={type:null,undo:a,redo:c,painter:s,font:n,size:i,bold:!1,italic:!1,underline:!1,strikeout:!1,deletePerson:"123",color:null,highlight:null,rowFlex:null,rowMargin:r,dashArray:[],level:null,listType:null,listStyle:null,groupIds:null,textDecoration:null,extension:null,vertical:null};this._emitRangeStyle(u)}shrinkBoundary(t={}){const{elementList:e,range:n}=this.getRangeElement(t),{startIndex:i,endIndex:r}=n;if(!~i&&!~r)return;const s=e[i],a=e[r];if(i===r){if(s.controlComponent===l.ControlComponent.PLACEHOLDER){let c=i-1;for(;c>0;){const d=e[c];if(d.controlId===s.controlId&&(d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.PRE_TEXT||d.controlComponent===l.ControlComponent.PRETEXTFIX||d.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)){n.startIndex=c,n.endIndex=c;break}if(d.controlId!==s.controlId&&!d.originControlId)break;c--}}if(s.controlComponent===l.ControlComponent.TEXTFIXLABEL){let c=i-1;for(;c>0;){const d=e[c];if(d.controlId!==s.controlId||d.controlComponent===l.ControlComponent.VALUE||d.controlComponent===l.ControlComponent.PRETEXTFIX||d.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){n.startIndex=c,n.endIndex=c;break}c--}}}else{if(s.controlComponent===l.ControlComponent.PLACEHOLDER||a.controlComponent===l.ControlComponent.PLACEHOLDER||s.controlComponent===l.ControlComponent.TEXTFIXLABEL||a.controlComponent===l.ControlComponent.TEXTFIXLABEL){let c=r-1;for(;c>0;){const d=e[c];if(d.controlId!==a.controlId||d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.PRE_TEXT||d.controlComponent===l.ControlComponent.PRETEXTFIX||d.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){n.startIndex=c,n.endIndex=c;return}c--}}if(s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT||s.controlComponent===l.ControlComponent.PRETEXTFIX||s.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){let c=i+1;for(;c<e.length;){const d=e[c];if(d.controlId!==s.controlId||d.controlComponent===l.ControlComponent.VALUE){n.startIndex=c-1;break}else if(d.controlComponent===l.ControlComponent.PLACEHOLDER){n.startIndex=c-1,n.endIndex=c-1;return}c++}}if(a.controlComponent!==l.ControlComponent.VALUE){let c=r-1;for(;c>0;){const d=e[c];if(d.controlId!==s.controlId||d.controlComponent===l.ControlComponent.VALUE){n.endIndex=c;break}else if(d.controlComponent===l.ControlComponent.PLACEHOLDER){n.startIndex=c,n.endIndex=c;return}c--}}}}render(t,e,n,i,r){t.save(),t.globalAlpha=this.options.rangeAlpha,t.fillStyle=this.options.rangeColor,t.fillRect(e,n,i,r),t.restore()}toString(){const t=this.getTextLikeSelection();return t?t.map(e=>e.value).join("").replace(new RegExp(_,"g"),""):""}getRangeElement(t={}){const e=t.elementList||this.draw.getElementList(),n=t.range||this.getRange(),{splitTdRange:i}=n,r={elementList:e,range:n};return i&&(r.range=i,r.elementList=this.draw.getSplitTdValues(i.originalId)??[]),r}}class ja{draw;options;imageCache;constructor(t){this.draw=t,this.options=t.getOptions(),this.imageCache=new Map}_renderBackgroundColor(t,e,n,i){t.save(),t.fillStyle=e,t.fillRect(0,0,n,i),t.restore()}_drawImage(t,e,n,i){const{background:r,scale:s}=this.options;if(r.size===l.BackgroundSize.CONTAIN){const a=e.width*s,c=e.height*s;if(!r.repeat||r.repeat===l.BackgroundRepeat.NO_REPEAT)t.drawImage(e,0,0,a,c);else{let d=0,u=0;const R=r.repeat===l.BackgroundRepeat.REPEAT||r.repeat===l.BackgroundRepeat.REPEAT_X?Math.ceil(n*s/a):1,h=r.repeat===l.BackgroundRepeat.REPEAT||r.repeat===l.BackgroundRepeat.REPEAT_Y?Math.ceil(i*s/c):1;for(let g=0;g<R;g++){for(let f=0;f<h;f++)t.drawImage(e,d,u,a,c),u+=c;u=0,d+=a}}}else t.drawImage(e,0,0,n*s,i*s)}_renderBackgroundImage(t,e,n){const{background:i}=this.options,r=this.imageCache.get(i.image);if(r)this._drawImage(t,r,e,n);else{const s=new Image;s.setAttribute("crossOrigin","Anonymous"),s.src=i.image,s.onload=()=>{this.imageCache.set(i.image,s),this._drawImage(t,s,e,n),this.draw.render({isCompute:!1,isSubmitHistory:!1})}}}render(t,e){const{background:{image:n,color:i,applyPageNumbers:r}}=this.options;if(n&&(!r?.length||r.includes(e))){const{width:s,height:a}=this.options;this._renderBackgroundImage(t,s,a)}else{const s=this.draw.getCanvasWidth(e),a=this.draw.getCanvasHeight(e);this._renderBackgroundColor(t,i,s,a)}}}class Go{fillRect;fillColor;fillDecorationStyle;constructor(){this.fillRect=this.clearFillInfo()}clearFillInfo(){return this.fillColor=void 0,this.fillDecorationStyle=void 0,this.fillRect={x:0,y:0,width:0,height:0},this.fillRect}recordFillInfo(t,e,n,i,r,s,a){const c=!this.fillRect.width;if(!c&&(this.fillColor!==s||this.fillDecorationStyle!==a)){this.render(t),this.clearFillInfo(),this.recordFillInfo(t,e,n,i,r,s,a);return}c&&(this.fillRect.x=e,this.fillRect.y=n),r&&this.fillRect.height<r&&(this.fillRect.height=r),this.fillRect.width+=i,this.fillColor=s,this.fillDecorationStyle=a}}class qa extends Go{options;constructor(t){super(),this.options=t.getOptions()}render(t){if(!this.fillRect.width)return;const{highlightAlpha:e}=this.options,{x:n,y:i,width:r,height:s}=this.fillRect;t.save(),t.globalAlpha=e,t.fillStyle=this.fillColor,t.fillRect(n,i,r,s),t.restore(),this.clearFillInfo()}}class tc{draw;options;constructor(t){this.draw=t,this.options=t.getOptions()}render(t,e){const{marginIndicatorColor:n,pageMode:i}=this.options,r=this.draw.getWidth(),s=i===l.PageMode.CONTINUITY?this.draw.getCanvasHeight(e)/this.draw.getPagePixelRatio():this.draw.getHeight(),a=this.draw.getMargins(),c=this.draw.getMarginIndicatorSize();t.save(),t.translate(.5,.5),t.strokeStyle=n,t.beginPath();const d=[a[3],a[0]],u=[r-a[1],a[0]],R=[a[3],s-a[2]],h=[r-a[1],s-a[2]];t.moveTo(d[0]-c,d[1]),t.lineTo(...d),t.lineTo(d[0],d[1]-c),t.moveTo(u[0]+c,u[1]),t.lineTo(...u),t.lineTo(u[0],u[1]-c),t.moveTo(R[0]-c,R[1]),t.lineTo(...R),t.lineTo(R[0],R[1]+c),t.moveTo(h[0]+c,h[1]),t.lineTo(...h),t.lineTo(h[0],h[1]+c),t.stroke(),t.restore()}}class ec{draw;options;position;range;searchKeyword;searchNavigateIndex;searchOptions;searchMatchList;constructor(t){this.draw=t,this.options=t.getOptions(),this.position=t.getPosition(),this.range=t.getRange(),this.searchNavigateIndex=null,this.searchOptions=null,this.searchKeyword=null,this.searchMatchList=[]}getSearchKeyword(){return this.searchKeyword}setSearchKeyword(t,e){this.searchKeyword=t,this.searchNavigateIndex=null,this.searchOptions=e||null}searchNavigatePre(){if(!this.searchMatchList.length||!this.searchKeyword)return null;if(this.searchNavigateIndex===null)this.searchNavigateIndex=0;else{let t=this.searchNavigateIndex-1,e=!1;const n=this.searchMatchList[this.searchNavigateIndex].groupId;for(;t>=0;){const i=this.searchMatchList[t];if(n!==i.groupId){e=!0,this.searchNavigateIndex=t-(this.searchKeyword.length-1);break}t--}if(!e){if(this.searchMatchList[this.searchMatchList.length-1].groupId===n)return null;this.searchNavigateIndex=this.searchMatchList.length-1-(this.searchKeyword.length-1)}}return this.searchNavigateIndex}searchNavigateNext(){if(!this.searchMatchList.length||!this.searchKeyword)return null;if(this.searchNavigateIndex===null)this.searchNavigateIndex=0;else{let t=this.searchNavigateIndex+1,e=!1;const n=this.searchMatchList[this.searchNavigateIndex].groupId;for(;t<this.searchMatchList.length;){const i=this.searchMatchList[t];if(n!==i.groupId){e=!0,this.searchNavigateIndex=t;break}t++}if(!e){if(this.searchMatchList[0].groupId===n)return null;this.searchNavigateIndex=0}}return this.searchNavigateIndex}searchNavigateScrollIntoView(t){const{coordinate:{leftTop:e,leftBottom:n,rightTop:i},pageNo:r}=t,s=this.draw.getHeight(),a=this.draw.getPageGap(),c=r*(s+a),d=document.createElement("div");d.style.position="absolute";const u=50;d.style.width=`${i[0]-e[0]+u}px`,d.style.height=`${n[1]-e[1]+u}px`,d.style.left=`${e[0]}px`,d.style.top=`${e[1]+c}px`,this.draw.getContainer().append(d),d.scrollIntoView(!1),d.remove()}getSearchNavigateIndexList(){return this.searchNavigateIndex===null||!this.searchKeyword?[]:new Array(this.searchKeyword.length).fill(this.searchNavigateIndex).map((t,e)=>t+e)}getSearchMatchList(){return this.searchMatchList}getSearchNavigateInfo(){if(!this.searchKeyword||!this.searchMatchList.length)return null;const t=this.searchNavigateIndex!==null?this.searchNavigateIndex/this.searchKeyword.length+1:0;let e=0,n=null;for(let i=0;i<this.searchMatchList.length;i++){const r=this.searchMatchList[i];n!==r.groupId&&(n=r.groupId,e+=1)}return{index:t,count:e}}getMatchList(t,e){const{isRegEnable:n=!1,isIgnoreCase:i=!0}=this.searchOptions||{},r=i?t.toLocaleLowerCase():t,s=[],a=[],c=e.length,d=[];for(let g=0;g<c;g++)e[g].type===l.ElementType.TABLE&&d.push(g);let u=0,R=0;for(;R<c-1;){const g=d.length?d[u]:c,f=e.slice(R,g);f.length&&a.push({index:R,type:fe.PAGE,elementList:f});const T=e[g];T&&a.push({index:g,type:fe.TABLE,elementList:[T]}),R=g+1,u++}function h(g,f,T,m){if(!g)return;let p=T.map(S=>!S.type||zt.includes(S.type)&&S.controlComponent!==l.ControlComponent.CHECKBOX&&S.controlComponent!==l.ControlComponent.RADIO&&!S.hide&&!S.control?.hide&&!S.area?.hide?S.value:_).filter(Boolean).join("");i&&(p=p.toLocaleLowerCase());const I=[],L=n?new RegExp(g):g;let{index:P,length:C}=Zi(p,L);for(;P!==-1&&C!==0;){I.push({index:P,length:C});const S=Zi(p,L,P+C);P=S.index,C=S.length}for(let S=0;S<I.length;S++){const{index:F,length:N}=I[S],V=lt();for(let Y=0;Y<N;Y++){const E=F+Y+(m?.startIndex||0);s.push({type:f,index:E,groupId:V,...m})}}}for(let g=0;g<a.length;g++){const f=a[g];if(f.type===fe.TABLE){const T=f.elementList[0];for(let m=0;m<T.trList.length;m++){const p=T.trList[m];for(let I=0;I<p.tdList.length;I++){const L=p.tdList[I],P={tableId:T.id,tableIndex:f.index,trIndex:m,tdIndex:I,tdId:L.id};h(r,f.type,L.value,P)}}}else h(r,f.type,f.elementList,{startIndex:f.index})}return s}compute(t){const e=this.searchOptions?.isLimitSelection&&!this.range.getIsCollapsed(),n=e?this.range.getSelectionElementList():this.draw.getOriginalElementList();if(!n?.length||(this.searchMatchList=this.getMatchList(t,n),!e||!this.searchMatchList.length))return;const{startIndex:i}=this.range.getRange(),r=i+1;for(const s of this.searchMatchList)s.type===fe.TABLE?s.tableIndex+=r:s.index+=r}render(t,e){if(!this.searchMatchList||!this.searchMatchList.length||!this.searchKeyword)return;const{searchMatchAlpha:n,searchMatchColor:i,searchNavigateMatchColor:r}=this.options,s=this.position.getOriginalPositionList(),a=this.draw.getOriginalElementList();t.save(),t.globalAlpha=n;for(let c=0;c<this.searchMatchList.length;c++){const d=this.searchMatchList[c];let u=null;if(d.type===fe.TABLE){const{tableIndex:P,trIndex:C,tdIndex:S,index:F}=d;u=a[P]?.trList[C].tdList[S]?.positionList[F]}else u=s[d.index];if(!u)continue;const{coordinate:{leftTop:R,leftBottom:h,rightTop:g},pageNo:f}=u;if(f!==e)continue;if(this.getSearchNavigateIndexList().includes(c)){t.fillStyle=r;const P=this.searchMatchList[c-1];(!P||P.groupId!==d.groupId)&&this.searchNavigateScrollIntoView(u)}else t.fillStyle=i;const m=R[0],p=R[1],I=g[0]-R[0],L=h[1]-R[1];t.fillRect(m,p,I,L)}t.restore()}replace(t,e){if(this.draw.isReadonly()||t==null)return;let i=this.getSearchMatchList();const r=e?.index;if(Oo(r)){const T=[];i.forEach(m=>{const p=T[T.length-1];!p||p[0].groupId!==m.groupId?T.push([m]):p.push(m)}),i=T[r]}if(!i?.length)return;const s=this.draw.isDesignMode();let a=0,c=0,d="",u="",R=-1;const h=this.draw.getOriginalElementList();for(let T=0;T<i.length;T++){const m=i[T];if(m.type===fe.TABLE){const{tableIndex:p,trIndex:I,tdIndex:L,index:P,tdId:C}=m;u&&C!==u&&(c=0),u=C;const S=p+a,F=h[S].trList[I].tdList[L].value,N=P+c,V=F[N];if(!s&&(V?.control?.deletable===!1||V?.title?.deletable===!1))continue;if(t===""){this.draw.spliceElementList(F,N,1),c--,~R||(R=T);continue}if(d===m.groupId){this.draw.spliceElementList(F,N,1),c--;continue}~R||(R=T);for(let Y=0;Y<t.length;Y++){const E=t[Y];Y===0?V.value=E:(this.draw.spliceElementList(F,N+Y,0,[{...V,value:E}]),c++)}}else{const p=m.index+a,I=h[p];if(!s&&(I?.control?.deletable===!1||I?.title?.deletable===!1)||I.type===l.ElementType.CONTROL&&I.controlComponent!==l.ControlComponent.VALUE)continue;if(t===""){this.draw.spliceElementList(h,p,1),a--,~R||(R=T);continue}if(~R||(R=T),d===m.groupId){this.draw.spliceElementList(h,p,1),a--;continue}for(let L=0;L<t.length;L++){const P=t[L];L===0?I.value=P:(this.draw.spliceElementList(h,p+L,0,[{...I,value:P}]),a++)}}d=m.groupId}if(!~R)return;const g=i[R],f=g.index+(t.length-1);if(g.type===fe.TABLE){const{tableIndex:T,trIndex:m,tdIndex:p,index:I}=g,L=h[T].trList[m].tdList[p].value[I];this.position.setPositionContext({isTable:!0,index:T,trIndex:m,tdIndex:p,tdId:L.tdId,trId:L.trId,tableId:L.tableId})}else this.position.setPositionContext({isTable:!1});this.draw.getRange().setRange(f,f),this.draw.render({curIndex:f})}}class nc extends Go{options;constructor(t){super(),this.options=t.getOptions()}render(t){if(!this.fillRect.width)return;const{scale:e,strikeoutColor:n}=this.options,{x:i,y:r,width:s}=this.fillRect;t.save(),t.lineWidth=e,t.strokeStyle=n;const a=r-3;t.beginPath(),t.moveTo(i,a),t.lineTo(i+s,a),t.stroke(),t.beginPath(),t.moveTo(i,r+3.5),t.lineTo(i+s,r+3.5),t.stroke(),t.restore(),this.clearFillInfo()}}l.TextDecorationStyle=void 0,(function(o){o.SOLID="solid",o.DOUBLE="double",o.DASHED="dashed",o.DOTTED="dotted",o.WAVY="wavy"})(l.TextDecorationStyle||(l.TextDecorationStyle={}));var ln;(function(o){o.SOLID="solid",o.DASHED="dashed",o.DOTTED="dotted"})(ln||(ln={}));class oc extends Go{options;constructor(t){super(),this.options=t.getOptions()}_drawLine(t,e,n,i,r){const s=e+i;switch(t.beginPath(),r){case ln.DASHED:t.setLineDash([3,1]);break;case ln.DOTTED:t.setLineDash([1,1]);break}t.moveTo(e,n),t.lineTo(s,n),t.stroke()}_drawDouble(t,e,n,i){const s=e+i,a=n+3*this.options.scale;this.options.mode===l.EditorMode.PRINT?t.strokeStyle="transparent":t.strokeStyle="red",t.beginPath(),t.moveTo(e,n),t.lineTo(s,n),t.stroke(),t.beginPath(),t.moveTo(e,a),t.lineTo(s,a),t.stroke()}_drawWave(t,e,n,i){const{scale:r}=this.options,s=1.2*r,a=1/r,c=n+2*s;t.beginPath();for(let d=0;d<i;d++){const u=s*Math.sin(a*d);t.lineTo(e+d,c+u)}t.stroke()}render(t){if(!this.fillRect.width)return;const{underlineColor:e,scale:n}=this.options,{x:i,y:r,width:s}=this.fillRect;t.save(),t.strokeStyle=this.fillColor||e,t.lineWidth=n;const a=Math.floor(r+2*t.lineWidth)+.5;switch(this.fillDecorationStyle){case l.TextDecorationStyle.WAVY:this._drawWave(t,i,a,s);break;case l.TextDecorationStyle.DOUBLE:this._drawDouble(t,i,a,s);break;case l.TextDecorationStyle.DASHED:this._drawLine(t,i,a,s,ln.DASHED);break;case l.TextDecorationStyle.DOTTED:this._drawLine(t,i,a,s,ln.DOTTED);break;default:this._drawLine(t,i,a,s);break}t.restore(),this.clearFillInfo()}}class ic{draw;options;ctx;curX;curY;text;curStyle;curColor;cacheMeasureText;constructor(t){this.draw=t,this.options=t.getOptions(),this.ctx=t.getCtx(),this.curX=-1,this.curY=-1,this.text="",this.curStyle="",this.cacheMeasureText=new Map}measureBasisWord(t,e){t.save(),t.font=e;const n=this.measureText(t,{value:Qr});return t.restore(),n}measureWord(t,e,n){const i=this.draw.getLetterReg();let r=0,s=null,a=n;for(;a<e.length;){const c=e[a];if(c.type&&c.type!==l.ElementType.TEXT||!i.test(c.value)){s=c;break}r+=this.measureText(t,c).width,a++}return{width:r,endElement:s}}buttonMeasureWord(t,e,n){const i=this.draw.getLetterReg();let r=0,s=null,a=n;for(;a<e.length;){const c=e[a];if(c.type&&c.type!==l.ElementType.TEXT||!i.test(c.value)){s=c;break}r+=this.measureText(t,c).width,a++}return{width:r,endElement:s}}measurePunctuationWidth(t,e){return!e||!Zr.includes(e.value)?0:(t.font=this.draw.getElementFont(e),this.measureText(t,e).width)}measureText(t,e){if(e.width){const s=t.measureText(e.value);return{width:e.width,actualBoundingBoxAscent:s.actualBoundingBoxAscent,actualBoundingBoxDescent:s.actualBoundingBoxDescent,actualBoundingBoxLeft:s.actualBoundingBoxLeft,actualBoundingBoxRight:s.actualBoundingBoxRight,fontBoundingBoxAscent:s.fontBoundingBoxAscent,fontBoundingBoxDescent:s.fontBoundingBoxDescent}}const n=`${e.value}${t.font}`,i=this.cacheMeasureText.get(n);if(i)return i;const r=t.measureText(e.value);return this.cacheMeasureText.set(n,r),r}getBasisWordBoundingBoxAscent(t,e){return this.measureBasisWord(t,e).actualBoundingBoxAscent}complete(){this._render(),this.text=""}record(t,e,n,i){if(this.ctx=t,this.options.renderMode===l.RenderMode.COMPATIBILITY){this._setCurXY(n,i),this.text=e.value,this.curStyle=e.style,this.curColor=e.color,this.complete();return}this.text||this._setCurXY(n,i),(this.curStyle&&e.style!==this.curStyle||e.color!==this.curColor)&&(this.complete(),this._setCurXY(n,i)),this.text+=e.value,this.curStyle=e.style,this.curColor=e.color}_setCurXY(t,e){this.curX=t,this.curY=e}_render(){!this.text||!~this.curX||!~this.curX||(this.ctx.save(),this.ctx.font=this.curStyle,this.ctx.fillStyle=this.curColor||this.options.defaultColor,this.ctx.fillText(this.text,this.curX,this.curY),this.ctx.restore())}}class an{draw;options;constructor(t){this.draw=t,this.options=t.getOptions()}static formatNumberPlaceholder(t,e,n,i){const r=i===l.NumberType.CHINESE?zr(e):`${e}`;return t.replace(n,r)}render(t,e){const{scale:n,pageNumber:{size:i,font:r,color:s,rowFlex:a,numberType:c,format:d,startPageNo:u,fromPageNo:R}}=this.options;if(e<R)return;let h=d;const g=new RegExp(Pn.PAGE_NO);g.test(h)&&(h=an.formatNumberPlaceholder(h,e+u-R,g,c));const f=new RegExp(Pn.PAGE_COUNT);f.test(h)&&(h=an.formatNumberPlaceholder(h,this.draw.getPageCount()-R,f,c));const T=this.draw.getWidth(),m=this.draw.getHeight(),p=this.draw.getPageNumberBottom(),I=m-p;t.save(),t.fillStyle=s,t.font=`${i*n}px ${r}`;let L=0;const P=this.draw.getMargins(),{width:C}=t.measureText(h);a===l.RowFlex.CENTER?L=(T-C)/2:a===l.RowFlex.RIGHT?L=T-C-P[1]:L=P[3],t.fillText(h,L,I),t.restore()}}class sc{draw;options;scrollContainer;constructor(t){this.draw=t,this.options=t.getOptions(),this.scrollContainer=this.getScrollContainer(),setTimeout(()=>{window.scrollY||this._observer()}),this._addEvent()}getScrollContainer(){return this.options.scrollContainerSelector&&document.querySelector(this.options.scrollContainerSelector)||document}_addEvent(){this.scrollContainer.addEventListener("scroll",this._observer)}removeEvent(){this.scrollContainer.removeEventListener("scroll",this._observer)}getElementVisibleInfo(t){const e=t.getBoundingClientRect(),n=this.scrollContainer===document?Math.max(document.documentElement.clientHeight,window.innerHeight):this.scrollContainer.clientHeight,i=Math.min(e.bottom,n)-Math.max(e.top,0);return{intersectionHeight:i>0?i:0}}getPageVisibleInfo(){const t=this.draw.getPageList(),e=[];let n=0,i=0;for(let r=0;r<t.length;r++){const s=t[r],{intersectionHeight:a}=this.getElementVisibleInfo(s);if(i&&!a)break;a&&e.push(r),a>i&&(i=a,n=r)}return{intersectionPageNo:n,visiblePageNoList:e}}_observer=Ar(()=>{const{intersectionPageNo:t,visiblePageNoList:e}=this.getPageVisibleInfo();this.draw.setIntersectionPageNo(t),this.draw.setVisiblePageNoList(e)},150)}class rc{draw;step=5;thresholdPoints=[70,40,10,20];selectionContainer;rangeManager;requestAnimationFrameId;isMousedown;isMoving;clientWidth;clientHeight;containerRect;constructor(t){this.draw=t,this.rangeManager=t.getRange();const{scrollContainerSelector:e}=t.getOptions();this.selectionContainer=e&&document.querySelector(e)||document,this.requestAnimationFrameId=null,this.isMousedown=!1,this.isMoving=!1,this.clientWidth=0,this.clientHeight=0,this.containerRect=null,this._addEvent()}_addEvent(){const t=this.selectionContainer;t.addEventListener("mousedown",this._mousedown),t.addEventListener("mousemove",this._mousemove),t.addEventListener("mouseup",this._mouseup),document.addEventListener("mouseleave",this._mouseup)}removeEvent(){const t=this.selectionContainer;t.removeEventListener("mousedown",this._mousedown),t.removeEventListener("mousemove",this._mousemove),t.removeEventListener("mouseup",this._mouseup),document.removeEventListener("mouseleave",this._mouseup)}_mousedown=t=>{if(this.draw.isInteractionSuspended()){this._mouseup();return}if(!this.draw.isTargetInsideEditor(t.target)){this._mouseup();return}if(this.isMousedown=!0,this.clientWidth=this.selectionContainer instanceof Document?document.documentElement.clientWidth:this.selectionContainer.clientWidth,this.clientHeight=this.selectionContainer instanceof Document?document.documentElement.clientHeight:this.selectionContainer.clientHeight,!(this.selectionContainer instanceof Document)){const e=this.selectionContainer.getBoundingClientRect();this.containerRect=e}};_mouseup=()=>{this.isMousedown=!1,this._stopMove()};_mousemove=t=>{if(this.draw.isInteractionSuspended()||!this.isMousedown||this.rangeManager.getIsCollapsed())return;let{x:e,y:n}=t;this.containerRect&&(e=e-this.containerRect.x,n=n-this.containerRect.y),n<this.thresholdPoints[0]?this._startMove(Ut.UP):this.clientHeight-n<=this.thresholdPoints[1]?this._startMove(Ut.DOWN):e<this.thresholdPoints[2]?this._startMove(Ut.LEFT):this.clientWidth-e<this.thresholdPoints[3]?this._startMove(Ut.RIGHT):this._stopMove()};_move(t){const e=this.selectionContainer instanceof Document?window:this.selectionContainer,n=this.selectionContainer instanceof Document?window.scrollX:e.scrollLeft,i=this.selectionContainer instanceof Document?window.scrollY:e.scrollTop;t===Ut.DOWN?e.scrollTo(n,i+this.step):t===Ut.UP?e.scrollTo(n,i-this.step):t===Ut.LEFT?e.scrollTo(n-this.step,i):e.scrollTo(n+this.step,i),this.requestAnimationFrameId=window.requestAnimationFrame(this._move.bind(this,t))}_startMove(t){this.isMoving||(this.isMoving=!0,this._move(t))}_stopMove(){this.requestAnimationFrameId&&(window.cancelAnimationFrame(this.requestAnimationFrameId),this.requestAnimationFrameId=null,this.isMoving=!1)}}class lc{draw;range;options;constructor(t){this.draw=t,this.range=t.getRange(),this.options=t.getOptions()}getTrListGroupByCol(t){const e=at(t);for(let n=0;n<t.length;n++){const i=e[n];for(let r=i.tdList.length-1;r>=0;r--){const s=i.tdList[r],{rowspan:a,rowIndex:c,colIndex:d}=s,u=c+a-1;if(u!==r){const R=i.tdList.splice(r,1)[0];e[u]?.tdList.splice(d,0,R)}}}return e}getRangeRowCol(){const{isTable:t,index:e,trIndex:n,tdIndex:i}=this.draw.getPosition().getPositionContext();if(!t)return null;const{isCrossRowCol:r,startTdIndex:s,endTdIndex:a,startTrIndex:c,endTrIndex:d}=this.range.getRange(),h=this.draw.getOriginalElementList()[e].trList;if(!r)return[[h[n].tdList[i]]];let g=h[c].tdList[s],f=h[d].tdList[a];(g.x>f.x||g.y>f.y)&&([g,f]=[f,g]);const T=g.colIndex,m=f.colIndex+(f.colspan-1),p=g.rowIndex,I=f.rowIndex+(f.rowspan-1),L=[];for(let P=0;P<h.length;P++){const C=h[P],S=[];for(let F=0;F<C.tdList.length;F++){const N=C.tdList[F],V=N.colIndex,Y=N.rowIndex;V>=T&&V<=m&&Y>=p&&Y<=I&&S.push(N)}S.length&&L.push(S)}return L.length?L:null}_drawOuterBorder(t){const{ctx:e,startX:n,startY:i,width:r,height:s,isDrawFullBorder:a,borderExternalWidth:c}=t,{scale:d}=this.options,u=e.lineWidth;c&&(e.lineWidth=c*d),e.beginPath();const R=Math.round(n),h=Math.round(i);e.translate(.5,.5),a?e.rect(R,h,r,s):(e.moveTo(R,h+s),e.lineTo(R,h),e.lineTo(R+r,h)),e.stroke(),c&&(e.lineWidth=u),e.translate(-.5,-.5)}_drawSlash(t,e,n,i){const{scale:r}=this.options;t.save();const s=e.width*r,a=e.height*r,c=Math.round(e.x*r+n),d=Math.round(e.y*r+i);e.slashTypes?.includes(l.TdSlash.FORWARD)&&(t.moveTo(c+s,d),t.lineTo(c,d+a)),e.slashTypes?.includes(l.TdSlash.BACK)&&(t.moveTo(c,d),t.lineTo(c+s,d+a)),t.stroke(),t.restore()}_drawBorder(t,e,n,i){const{colgroup:r,trList:s,borderType:a,borderColor:c,borderWidth:d=1,borderExternalWidth:u}=e;if(!r||!s)return;const{scale:R,table:{defaultBorderColor:h}}=this.options,g=e.width*R,f=e.height*R,T=a===l.TableBorder.EMPTY,m=a===l.TableBorder.EXTERNAL,p=a===l.TableBorder.INTERNAL;t.save(),a===l.TableBorder.DASH&&t.setLineDash([3,3]),t.lineWidth=d*R,t.strokeStyle=c||h,!T&&!p&&this._drawOuterBorder({ctx:t,startX:n,startY:i,width:g,height:f,borderExternalWidth:u,isDrawFullBorder:m});for(let I=0;I<s.length;I++){const L=s[I];for(let P=0;P<L.tdList.length;P++){const C=L.tdList[P];if(C.slashTypes?.length&&this._drawSlash(t,C,n,i),!C.borderTypes?.length&&(T||m))continue;const S=C.width*R,F=C.height*R,N=Math.round(C.x*R+n+S),V=Math.round(C.y*R+i);if(t.translate(.5,.5),t.beginPath(),C.borderTypes?.includes(l.TdBorder.TOP)&&(t.moveTo(N-S,V),t.lineTo(N,V),t.stroke()),C.borderTypes?.includes(l.TdBorder.RIGHT)&&(t.moveTo(N,V),t.lineTo(N,V+F),t.stroke()),C.borderTypes?.includes(l.TdBorder.BOTTOM)&&(t.moveTo(N,V+F),t.lineTo(N-S,V+F),t.stroke()),C.borderTypes?.includes(l.TdBorder.LEFT)&&(t.moveTo(N-S,V),t.lineTo(N-S,V+F),t.stroke()),!T&&!m){if((!p||C.colIndex+C.colspan<r.length)&&(t.moveTo(N,V),t.lineTo(N,V+F),u&&u!==d&&C.colIndex+C.colspan===r.length)){const Y=t.lineWidth;t.lineWidth=u*R,t.stroke(),t.beginPath(),t.lineWidth=Y}if(!p||C.rowIndex+C.rowspan<s.length){const Y=u&&u!==d&&C.rowIndex+C.rowspan===s.length;if(Y&&(t.stroke(),t.beginPath()),t.moveTo(N,V+F),t.lineTo(N-S,V+F),Y){const E=t.lineWidth;t.lineWidth=u*R,t.stroke(),t.beginPath(),t.lineWidth=E}}t.stroke()}t.translate(-.5,-.5)}}t.restore()}_drawBackgroundColor(t,e,n,i){const{trList:r}=e;if(!r)return;const{scale:s}=this.options;for(let a=0;a<r.length;a++){const c=r[a];for(let d=0;d<c.tdList.length;d++){const u=c.tdList[d];if(!u.backgroundColor)continue;t.save();const R=u.width*s,h=u.height*s,g=Math.round(u.x*s+n),f=Math.round(u.y*s+i);t.fillStyle=u.backgroundColor,t.fillRect(g,f,R,h),t.restore()}}}getTableWidth(t){return t.colgroup.reduce((e,n)=>e+n.width,0)}getTableHeight(t){const e=t.trList;return e?.length?this.getTdListByColIndex(e,0).reduce((n,i)=>n+i.height,0):0}getRowCountByColIndex(t,e){return this.getTdListByColIndex(t,e).reduce((n,i)=>n+i.rowspan,0)}getTdListByColIndex(t,e){const n=[];for(let i=0;i<t.length;i++){const r=t[i].tdList;for(let s=0;s<r.length;s++){const a=r[s],c=a.colIndex,d=c+a.colspan-1;e>=c&&e<=d&&n.push(a)}}return n}getTdListByRowIndex(t,e){const n=[];for(let i=0;i<t.length;i++){const r=t[i].tdList;for(let s=0;s<r.length;s++){const a=r[s],c=a.rowIndex,d=c+a.rowspan-1;e>=c&&e<=d&&n.push(a)}}return n}computeRowColInfo(t){const{colgroup:e,trList:n}=t;if(!e||!n)return;let i=0;for(let r=0;r<n.length;r++){const s=n[r],a=n.length-1===r;for(let c=0;c<s.tdList.length;c++){const d=s.tdList[c];let u=0;if(n.length>1&&r!==0){const p=s.tdList[c-1],I=p?p.colIndex+p.colspan:c;for(let L=I;L<e.length;L++)if(this.getRowCountByColIndex(n.slice(0,r),L)===r){u=L;let C=0;for(let S=0;S<L;S++)C+=e[S].width;i=C;break}}else{const p=s.tdList[c-1];p&&(u=p.colIndex+p.colspan)}let R=0;for(let p=0;p<d.colspan;p++)R+=e[p+u].width;let h=0;for(let p=0;p<d.rowspan;p++){const I=n[p+r]||n[r];h+=I.height}const g=s.tdList.length-1===c;let f=a;if(!f&&d.rowspan>1){const p=n.length-1-r;f=d.rowspan-1===p}const T=a&&g;d.isLastRowTd=g,d.isLastColTd=f,d.isLastTd=T,d.x=i;let m=0;for(let p=0;p<r;p++){const I=n[p].tdList;for(let L=0;L<I.length;L++){const P=I[L];if(u>=P.colIndex&&u<P.colIndex+P.colspan){m+=P.height;break}}}d.y=m,d.width=R,d.height=h,d.rowIndex=r,d.colIndex=u,d.trIndex=r,d.tdIndex=c,i+=R,g&&!T&&(i=0)}}}drawRange(t,e,n,i){const{scale:r,rangeAlpha:s,rangeColor:a}=this.options,{type:c,trList:d}=e;if(!d||c!==l.ElementType.TABLE)return;const{isCrossRowCol:u,startTdIndex:R,endTdIndex:h,startTrIndex:g,endTrIndex:f}=this.range.getRange();if(!u)return;let T=d[g].tdList[R],m=d[f].tdList[h];(T.x>m.x||T.y>m.y)&&([T,m]=[m,T]);const p=T.colIndex,I=m.colIndex+(m.colspan-1),L=T.rowIndex,P=m.rowIndex+(m.rowspan-1);t.save();for(let C=0;C<d.length;C++){const S=d[C];for(let F=0;F<S.tdList.length;F++){const N=S.tdList[F],V=N.colIndex,Y=N.rowIndex;if(V>=p&&V<=I&&Y>=L&&Y<=P){const E=N.x*r,W=N.y*r,X=N.width*r,O=N.height*r;t.globalAlpha=s,t.fillStyle=a,t.fillRect(E+n,W+i,X,O)}}}t.restore()}render(t,e,n,i){this._drawBackgroundColor(t,e,n,i),this._drawBorder(t,e,n,i)}findPreRowSpanTd(t,e,n){for(let i=e;i>=0;i--){const r=t[i].tdList.find(s=>s.colIndex===n);if(r)return r}}computeTrHeight(t,e){const{scale:n,table:{tdPadding:i,defaultTrMinHeight:r}}=this.options,s=t.tdPadding||i,a=s[0]+s[2],c=t.trList;for(let R=0;R<c.length;R++){const h=c[R];h.height=h.minHeight||r,h.minHeight=h.height}this.computeRowColInfo(t);const d={},u={};for(let R=0;R<c.length;R++){const h=c[R];if(!h.tdList.length){h.height=0;continue}const g=[],f=[];for(let m=0;m<t.colgroup.length;m++){const p=h.tdList.find(I=>I.colIndex===m);if(p){const I=e?e(p):p.rowList,L=I.reduce((C,S)=>C+S.height,0);p.rowList=I;const P=L/n+a;p.mainHeight=P,p.rowspan>1?(u[p.colIndex]=p.id,d[p.id]={td:p,rowSpan:[R,R+p.rowspan-1],preHeight:0,preMinHeight:0,extraHeight:P},f.push(P)):p.height<P?(p.height=P,p.realHeight=P,g.push(P)):g.push(p.height)}else{const I=d[u[m]];I?.rowSpan[1]==R&&g.push(I.extraHeight)}}const T=Math.max(...g.length?g:f);Object.values(d).forEach(m=>{m.rowSpan[0]<=R&&m.rowSpan[1]>=R&&(m.extraHeight-=T,m.preHeight+=T,m.preMinHeight+=h.minHeight)}),h.height=T;for(let m=0;m<t.colgroup.length;m++){const p=h.tdList.find(I=>I.colIndex===m)??this.findPreRowSpanTd(c,R,m);if(p){const I=d[p.id]?.preHeight??0,L=d[p.id]?.preMinHeight??h.minHeight;p.height=T+I,p.realHeight=T+I,p.realMinHeight=L}}}this.computeRowColInfo(t)}}var me;(function(o){o.ROW="row",o.COL="col"})(me||(me={}));class ac{MIN_TD_WIDTH=20;ROW_COL_OFFSET=18;ROW_COL_QUICK_WIDTH=16;ROW_COL_QUICK_OFFSET=5;ROW_COL_QUICK_POSITION=this.ROW_COL_OFFSET+(this.ROW_COL_OFFSET-this.ROW_COL_QUICK_WIDTH)/2;BORDER_VALUE=4;TABLE_SELECT_OFFSET=20;draw;canvas;options;position;range;container;toolRowContainer;toolRowAddBtn;toolColAddBtn;toolTableSelectBtn;toolColContainer;toolBorderContainer;anchorLine;mousedownX;mousedownY;constructor(t){this.draw=t,this.canvas=t.getPage(),this.options=t.getOptions(),this.position=t.getPosition(),this.range=t.getRange(),this.container=t.getContainer(),this.toolRowContainer=null,this.toolRowAddBtn=null,this.toolColAddBtn=null,this.toolTableSelectBtn=null,this.toolColContainer=null,this.toolBorderContainer=null,this.anchorLine=null,this.mousedownX=0,this.mousedownY=0}dispose(){this.toolRowContainer?.remove(),this.toolRowAddBtn?.remove(),this.toolColAddBtn?.remove(),this.toolTableSelectBtn?.remove(),this.toolColContainer?.remove(),this.toolBorderContainer?.remove(),this.toolRowContainer=null,this.toolRowAddBtn=null,this.toolColAddBtn=null,this.toolTableSelectBtn=null,this.toolColContainer=null,this.toolBorderContainer=null}render(){if(this.draw.getMode()===l.EditorMode.FORM){this.dispose();return}const{isTable:t,index:e,trIndex:n,tdIndex:i}=this.position.getPositionContext();if(!t)return;this.dispose();const r=this.draw.getOriginalElementList(),s=this.position.getOriginalPositionList(),a=r[e];if(a.tableToolDisabled&&!this.draw.isDesignMode())return;const{scale:c,table:{overflow:d}}=this.options,u=s[e],{colgroup:R,trList:h}=a,{coordinate:{leftTop:g}}=u,f=this.draw.getHeight(),T=this.draw.getPageGap(),m=this.draw.getPageNo()*(f+T),p=g[0],I=g[1]+m,L=a.trList[n].tdList[i],P=L.rowIndex,C=L.colIndex,S=a.height*c,F=a.width*c,N=document.createElement("div");N.classList.add(`${z}-table-tool__select`),N.style.height=`${S*c}`,N.style.left=`${p}px`,N.style.top=`${I}px`,N.style.transform=`translate(-${this.TABLE_SELECT_OFFSET*c}px, ${-this.TABLE_SELECT_OFFSET*c}px)`,N.onclick=()=>{this.draw.getTableOperate().tableSelectAll()},this.container.append(N),this.toolTableSelectBtn=N;const V=h.map(b=>b.height),Y=document.createElement("div");Y.classList.add(`${z}-table-tool__row`),Y.style.transform=`translateX(-${this.ROW_COL_OFFSET*c}px)`;for(let b=0;b<V.length;b++){const y=V[b]*c,D=document.createElement("div");D.classList.add(`${z}-table-tool__row__item`),b===P&&D.classList.add("active"),D.onclick=()=>{const Q=this.draw.getTableParticle().getTdListByRowIndex(h,b),G=Q[0],H=Q[Q.length-1];this.position.setPositionContext({index:e,isTable:!0,trIndex:G.trIndex,tdIndex:G.tdIndex,tableId:a.id}),this.range.setRange(0,0,a.id,G.tdIndex,H.tdIndex,G.trIndex,H.trIndex),this.draw.render({curIndex:0,isCompute:!1,isSubmitHistory:!1}),this._setAnchorActive(Y,b)};const U=document.createElement("div");U.classList.add(`${z}-table-tool__anchor`),U.onmousedown=Q=>{this._mousedown({evt:Q,element:a,index:b,order:me.ROW})},D.append(U),D.style.height=`${y}px`,Y.append(D)}Y.style.left=`${p}px`,Y.style.top=`${I}px`,this.container.append(Y),this.toolRowContainer=Y;const E=document.createElement("div");E.classList.add(`${z}-table-tool__quick__add`),E.style.height=`${S*c}`,E.style.left=`${p}px`,E.style.top=`${I+S}px`,E.style.transform=`translate(-${this.ROW_COL_QUICK_POSITION*c}px, ${this.ROW_COL_QUICK_OFFSET*c}px)`,E.onclick=()=>{this.position.setPositionContext({index:e,isTable:!0,trIndex:h.length-1,tdIndex:0,tableId:a.id}),this.draw.getTableOperate().insertTableBottomRow()},this.container.append(E),this.toolRowAddBtn=E;const W=R.map(b=>b.width),X=document.createElement("div");X.classList.add(`${z}-table-tool__col`),X.style.transform=`translateY(-${this.ROW_COL_OFFSET*c}px)`;for(let b=0;b<W.length;b++){const y=W[b]*c,D=document.createElement("div");D.classList.add(`${z}-table-tool__col__item`),b===C&&D.classList.add("active"),D.onclick=()=>{const Q=this.draw.getTableParticle().getTdListByColIndex(h,b),G=Q[0],H=Q[Q.length-1];this.position.setPositionContext({index:e,isTable:!0,trIndex:G.trIndex,tdIndex:G.tdIndex,tableId:a.id}),this.range.setRange(0,0,a.id,G.tdIndex,H.tdIndex,G.trIndex,H.trIndex),this.draw.render({curIndex:0,isCompute:!1,isSubmitHistory:!1}),this._setAnchorActive(X,b)};const U=document.createElement("div");U.classList.add(`${z}-table-tool__anchor`),U.onmousedown=Q=>{this._mousedown({evt:Q,element:a,index:b,order:me.COL})},D.append(U),D.style.width=`${y}px`,X.append(D)}X.style.left=`${p}px`,X.style.top=`${I}px`,this.container.append(X),this.toolColContainer=X;const O=document.createElement("div");O.classList.add(`${z}-table-tool__quick__add`),O.style.height=`${S*c}`,O.style.left=`${p+F}px`,O.style.top=`${I}px`,O.style.transform=`translate(${this.ROW_COL_QUICK_OFFSET*c}px, -${this.ROW_COL_QUICK_POSITION*c}px)`,O.onclick=()=>{this.position.setPositionContext({index:e,isTable:!0,trIndex:0,tdIndex:h[0].tdList.length-1||0,tableId:a.id}),this.draw.getTableOperate().insertTableRightCol()},this.container.append(O),this.toolColAddBtn=O;const M=document.createElement("div");M.classList.add(`${z}-table-tool__border`),M.style.height=`${S}px`,M.style.width=`${F}px`,M.style.left=`${p}px`,M.style.top=`${I}px`;for(let b=0;b<h.length;b++){const y=h[b];for(let D=0;D<y.tdList.length;D++){const U=y.tdList[D],Q=document.createElement("div");Q.classList.add(`${z}-table-tool__border__row`),Q.style.width=`${U.width*c}px`,Q.style.height=`${this.BORDER_VALUE}px`,Q.style.top=`${(U.y+U.height)*c-this.BORDER_VALUE/2}px`,Q.style.left=`${U.x*c}px`,Q.onmousedown=H=>{this._mousedown({evt:H,element:a,index:U.rowIndex+U.rowspan-1,order:me.ROW})},M.appendChild(Q);const G=document.createElement("div");if(G.classList.add(`${z}-table-tool__border__col`),G.style.width=`${this.BORDER_VALUE}px`,G.style.height=`${U.height*c}px`,G.style.top=`${U.y*c}px`,G.style.left=`${(U.x+U.width)*c-this.BORDER_VALUE/2}px`,G.onmousedown=H=>{this._mousedown({evt:H,element:a,index:U.colIndex+U.colspan-1,order:me.COL})},M.appendChild(G),d&&U.colIndex===0){const H=document.createElement("div");H.classList.add(`${z}-table-tool__border__col`),H.style.width=`${this.BORDER_VALUE}px`,H.style.height=`${U.height*c}px`,H.style.top=`${U.y*c}px`,H.style.left=`${U.x*c-this.BORDER_VALUE/2}px`,H.onmousedown=tt=>{this._mousedown({evt:tt,element:a,index:0,isLeftStartBorder:!0,order:me.COL})},M.appendChild(H)}}}this.container.append(M),this.toolBorderContainer=M}_setAnchorActive(t,e){const n=t.children;for(let i=0;i<n.length;i++){const r=n[i];i===e?r.classList.add("active"):r.classList.remove("active")}}_mousedown(t){const{evt:e,index:n,order:i,element:r,isLeftStartBorder:s}=t;this.canvas=this.draw.getPage();const{scale:a,table:{overflow:c}}=this.options,d=this.draw.getWidth(),u=this.draw.getHeight(),R=this.draw.getPageGap(),h=this.draw.getPageNo()*(u+R),g=this.position.getPositionContext(),m=(this.position.getOriginalPositionList()[g.index]?.coordinate?.leftTop?.[0]||0)*a,p=this.draw.getMargins(),I=p[0],L=p[1],P=I,C=d-L;this.mousedownX=e.x,this.mousedownY=e.y;const S=e.target,F=this.canvas.getBoundingClientRect(),N=window.getComputedStyle(S).cursor;document.body.style.cursor=N,this.canvas.style.cursor=N;let V=0,Y=0;const E=document.createElement("div");E.classList.add(`${z}-table-anchor__line`),i===me.ROW?(E.classList.add(`${z}-table-anchor__line__row`),E.style.width=`${d}px`,V=0,Y=h+this.mousedownY-F.top):(E.classList.add(`${z}-table-anchor__line__col`),E.style.height=`${u}px`,V=this.mousedownX-F.left,Y=h),E.style.left=`${V}px`,E.style.top=`${Y}px`,this.container.append(E),this.anchorLine=E;let W=0,X=0;const O=M=>{const b=this._mousemove(M,i,V,Y);b&&(W=b.dx,X=b.dy)};document.addEventListener("mousemove",O),document.addEventListener("mouseup",()=>{let M=!1;if(i===me.ROW){const b=r.trList,y=b[n]||b[n-1],{defaultTrMinHeight:D}=this.options.table;X<0&&y.height+X<D&&(X=D-y.height),X&&(y.height+=X,y.minHeight=y.height,M=!0)}else{const{colgroup:b}=r;if(b&&W)if(c&&s){b[n].width-W/a<=this.MIN_TD_WIDTH&&(W=(b[n].width-this.MIN_TD_WIDTH)*a);const y=m+(r.translateX||0)*a;y+W<P&&(W=P-y),b[n].width-=W/a,r.width-=W/a,r.translateX=(r.translateX||0)+W/a,M=!0}else{const y=b[n].width;W<0&&y*a+W<this.MIN_TD_WIDTH*a&&(W=this.MIN_TD_WIDTH*a-y*a);const D=b[n+1]?.width;if(W>0&&D&&D*a-W<this.MIN_TD_WIDTH*a&&(W=D*a-this.MIN_TD_WIDTH*a),n===b.length-1){const Q=m+(r.translateX||0)*a+r.width*a;Q+W>C&&(W=C-Q)}W&&(b.length-1!==n&&(b[n+1].width-=W/a),b[n].width+=W/a,M=!0)}}M&&this.draw.render({isSetCursor:!1}),E.remove(),document.removeEventListener("mousemove",O),document.body.style.cursor="",this.canvas.style.cursor="text"},{once:!0}),e.preventDefault()}_mousemove(t,e,n,i){if(!this.anchorLine)return null;const r=t.x-this.mousedownX,s=t.y-this.mousedownY;return e===me.ROW?this.anchorLine.style.top=`${i+s}px`:this.anchorLine.style.left=`${n+r}px`,t.preventDefault(),{dx:r,dy:s}}}class cc{draw;options;container;hyperlinkPopupContainer;hyperlinkDom;constructor(t){this.draw=t,this.options=t.getOptions(),this.container=t.getContainer();const{hyperlinkPopupContainer:e,hyperlinkDom:n}=this._createHyperlinkPopupDom();this.hyperlinkDom=n,this.hyperlinkPopupContainer=e}_createHyperlinkPopupDom(){const t=document.createElement("div");t.classList.add(`${z}-hyperlink-popup`);const e=document.createElement("a");return e.target="_blank",e.rel="noopener",t.append(e),this.container.append(t),{hyperlinkPopupContainer:t,hyperlinkDom:e}}drawHyperlinkPopup(t,e){const{coordinate:{leftTop:[n,i]},lineHeight:r}=e,s=this.draw.getHeight(),a=this.draw.getPageGap(),c=this.draw.getPageNo()*(s+a);this.hyperlinkPopupContainer.style.display="block",this.hyperlinkPopupContainer.style.left=`${n}px`,this.hyperlinkPopupContainer.style.top=`${i+c+r}px`;const d=t.url||"#";this.hyperlinkDom.href=d,this.hyperlinkDom.title=d,this.hyperlinkDom.innerText=d}clearHyperlinkPopup(){this.hyperlinkPopupContainer.style.display="none"}openHyperlink(t){const e=window.open(t.url,"_blank");e&&(e.opener=null)}render(t,e,n,i){t.save(),t.font=e.style,e.color||(e.color=this.options.defaultHyperlinkColor),t.fillStyle=e.color,e.underline===void 0&&(e.underline=!0),t.fillText(e.value,n,i),t.restore()}}class dc{options;constructor(t){this.options=t.getOptions()}render(t,e,n,i){const{scale:r,label:{defaultBackgroundColor:s,defaultColor:a,defaultBorderRadius:c,defaultPadding:d}}=this.options,u=e.label?.backgroundColor||s,R=e.label?.color||a,h=e.label?.borderRadius||c,g=e.label?.padding||d;t.save(),t.font=e.style;const{width:f,height:T,boundingBoxAscent:m}=e.metrics;t.fillStyle=u,this._drawRoundedRect(t,n,i-m,f,T+(g[0]+g[3])*r,h*r),t.fill(),t.fillStyle=R,t.fillText(e.value,n+g[3]*r,i),t.restore()}_drawRoundedRect(t,e,n,i,r,s){t.beginPath(),t.moveTo(e+s,n),t.lineTo(e+i-s,n),t.quadraticCurveTo(e+i,n,e+i,n+s),t.lineTo(e+i,n+r-s),t.quadraticCurveTo(e+i,n+r,e+i-s,n+r),t.lineTo(e+s,n+r),t.quadraticCurveTo(e,n+r,e,n+r-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+s,n),t.closePath()}}class uc{options;draw;activeInlineEditor;constructor(t){this.draw=t,this.options=t.getOptions(),this.activeInlineEditor=null}render(t,e,n,i){const r=this.draw.getMode(),s=e.macroConfig;if(r===l.EditorMode.EDIT){const c=e.label||e.value||"";this._renderEditMode(t,e,n,i,c);return}if(e.type==="macro"){const c=e.label||"",d=e.value||`获取 ${c}`;this._renderPlainText(t,e,n,i,d);return}if(e.type==="customMacro"){const c=s?.type||"text",d=s?.value||"",u=e.label||"";if(r===l.EditorMode.FORM)this.activeInlineEditor?.elementId===e.id&&this._syncInlineEditorPosition(),c==="select"?this._renderSelectControl(t,e,n,i,d):this._renderTextControl(t,e,n,i,d);else{const R=d||`获取 ${u}`;this._renderPlainText(t,e,n,i,R)}return}if(e.type==="reusableItem"){const d=e.reusableItemConfig?.value||"",u=e.label||"";if(r===l.EditorMode.FORM)this._renderTextControl(t,e,n,i,d);else{const R=d||`获取 ${u}`;this._renderPlainText(t,e,n,i,R)}return}if(e.type==="subTemplate"){const c=e.label||"子模板";r===l.EditorMode.FORM?e.subTemplateExpanded||this._renderEditMode(t,e,n,i,c):this._renderPlainText(t,e,n,i,c);return}const a=e.value||e.label||"";this._renderPlainText(t,e,n,i,a)}activateInlineEditor(t,e){if(this.draw.getMode()!==l.EditorMode.FORM||t.type!=="customMacro")return!1;const n=this._ensureMacroConfig(t),i=n.type||"text",r=this.activeInlineEditor;if(r&&r.elementId===t.id&&r.type===i)return r.input.focus(),r.input instanceof HTMLInputElement&&r.input.select(),!0;this.clearInlineEditor({isSubmitHistory:!1});const s=document.createElement("div");s.style.position="absolute",s.style.zIndex="1002",s.style.boxSizing="border-box",s.style.display="flex",s.style.alignItems="center";const a=this._getInlineEditorBaseStyle(t);let c;i==="select"?c=this._createSelectEditor(t,s):c=this._createTextEditor(t,s),c.style.boxSizing="border-box",c.style.width="100%",c.style.height="100%",c.style.border="none",c.style.outline="none",c.style.background="transparent",c.style.font=a.font,c.style.color=a.color,c.style.padding=a.padding,c.style.margin="0",s.append(c),s.addEventListener("mousedown",u=>u.stopPropagation()),s.addEventListener("click",u=>u.stopPropagation()),this.draw.getContainer().append(s),this.draw.setOverlayActive(!0);const d=u=>{const R=u.target;R instanceof Node&&s.contains(R)||this.clearInlineEditor()};return document.addEventListener("mousedown",d,!0),this.activeInlineEditor={elementId:t.id,index:e,type:i,wrapper:s,input:c,initialValue:n.value||"",initialCode:n.code,outsideHandler:d},this._syncInlineEditorPosition(),c.focus(),c instanceof HTMLInputElement?c.select():"showPicker"in c&&typeof c.showPicker=="function"?c.showPicker():c.click(),!0}clearInlineEditor(t={}){const e=this.activeInlineEditor;if(!e)return;const{isSubmitHistory:n=!0,isRestore:i=!1}=t;document.removeEventListener("mousedown",e.outsideHandler,!0);const r=this._getInlineEditorElement(e),s=r?.macroConfig,a=e.input.value||"",c=e.input instanceof HTMLSelectElement&&e.input.value||"";if(r&&s&&(i?(s.value=e.initialValue,e.type==="select"&&(s.code=e.initialCode)):e.type==="text"?s.value=a:(s.code=c||void 0,s.value=this._getSelectLabelByCode(s,c))),e.wrapper.remove(),this.activeInlineEditor=null,this.draw.setOverlayActive(!1),r&&!i){const d=this._ensureMacroConfig(r),u=d.value||"",R=d.code;u!==e.initialValue||R!==e.initialCode?this.draw.getCommand().setMacroValue({id:r.id,dictCode:r.dictCode,label:r.label,areaId:r.areaId,value:u,code:R,isSubmitHistory:n}):this.draw.render({isSubmitHistory:!1,isSetCursor:!1})}else this.draw.render({isSubmitHistory:!1,isSetCursor:!1})}_renderPlainText(t,e,n,i,r){t.save(),t.font=e.style,t.fillStyle=e.color||"#000000",t.textBaseline="alphabetic",t.fillText(r,n,i),t.restore()}_renderEditMode(t,e,n,i,r){const{scale:s}=this.options,a=e.type==="customMacro",c=e.type==="reusableItem",d=e.type==="subTemplate";let u,R;d?(u="#722ed1",R="#f9f0ff"):c?(u="#52c41a",R="#f6ffed"):a?(u="#fa8c16",R="#fff7e6"):(u="#1677ff",R="#e6f4ff"),t.save(),t.font=e.style;const h=t.measureText(r),g=h.actualBoundingBoxAscent+h.actualBoundingBoxDescent,f=8*s,T=4*s,m=4*s,p=h.width+f*2,I=g+T*2,L=e.metrics,P=n,C=i-L.boundingBoxAscent+(L.boundingBoxAscent+L.boundingBoxDescent-I)/2;t.fillStyle=R,this._drawRoundedRect(t,P,C,p,I,m),t.fill(),t.fillStyle=u,t.textBaseline="middle",t.fillText(r,n+f,C+I/2),t.restore()}_renderTextControl(t,e,n,i,r){const{scale:s,control:a,strikeoutColor:c}=this.options,{placeholderColor:d,bracketColor:u}=a;t.save(),t.font=e.style;const h=`请输入${e.label||""}`,g=r||h,T=t.measureText(g).width;t.fillStyle=u,t.textBaseline="alphabetic",t.fillText("[",n,i);const m=n+t.measureText("[").width;t.fillStyle=r?e.color||"#000000":d,t.fillText(g,m,i);const p=m+T;if(t.fillStyle=u,t.fillText("]",p,i),e.type==="reusableItem"){const I=t.measureText("[").width+T+t.measureText("]").width;if(t.lineWidth=s,this.draw.getMode()===l.EditorMode.PRINT?t.strokeStyle="transparent":t.strokeStyle=c||"red",e.strikeout){const L=i-3*s,P=i+3.5*s;t.beginPath(),t.moveTo(n,L),t.lineTo(n+I,L),t.stroke(),t.beginPath(),t.moveTo(n,P),t.lineTo(n+I,P),t.stroke()}else if(e.underline&&e.textDecoration?.style==="double"){const L=Math.floor(i+2*s)+.5,P=3*s;t.beginPath(),t.moveTo(n,L),t.lineTo(n+I,L),t.stroke(),t.beginPath(),t.moveTo(n,L+P),t.lineTo(n+I,L+P),t.stroke()}}t.restore()}_renderSelectControl(t,e,n,i,r){const{scale:s,control:a}=this.options,{placeholderColor:c,bracketColor:d}=a;t.save(),t.font=e.style;const R=`请选择${e.label||""}`,h=r||R,g=t.measureText(h),f=g.actualBoundingBoxAscent+g.actualBoundingBoxDescent;t.fillStyle=d,t.textBaseline="alphabetic",t.fillText("[",n,i);const T=n+t.measureText("[").width;t.fillStyle=r?e.color||"#000000":c,t.fillText(h,T,i);const m=T+g.width+2*s,p=i-f/2;t.beginPath(),t.moveTo(m,p-2*s),t.lineTo(m+5*s,p-2*s),t.lineTo(m+2.5*s,p+2*s),t.closePath(),t.fillStyle="#666666",t.fill();const I=m+6*s;t.fillStyle=d,t.fillText("]",I,i),t.restore()}_drawRoundedRect(t,e,n,i,r,s){t.beginPath(),t.moveTo(e+s,n),t.lineTo(e+i-s,n),t.quadraticCurveTo(e+i,n,e+i,n+s),t.lineTo(e+i,n+r-s),t.quadraticCurveTo(e+i,n+r,e+i-s,n+r),t.lineTo(e+s,n+r),t.quadraticCurveTo(e,n+r,e,n+r-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+s,n),t.closePath()}_createTextEditor(t,e){const n=document.createElement("input");return n.type="text",n.value=t.macroConfig?.value||"",n.placeholder=`请输入${t.label||""}`,n.style.minWidth="0",n.style.background="#ffffff",n.addEventListener("input",()=>{const i=this._ensureMacroConfig(t);i.value=n.value}),n.addEventListener("keydown",i=>{i.key==="Enter"?(i.preventDefault(),this.clearInlineEditor()):i.key==="Escape"&&(i.preventDefault(),this.clearInlineEditor({isSubmitHistory:!1,isRestore:!0}))}),n.addEventListener("blur",()=>{this.activeInlineEditor?.input===n&&this.clearInlineEditor()}),e.style.background="#ffffff",e.style.border="1px solid #1677ff",e.style.borderRadius="4px",e.style.boxShadow="0 0 0 2px rgba(22, 119, 255, 0.12)",n}_createSelectEditor(t,e){const n=document.createElement("select"),i=this._ensureMacroConfig(t),r=document.createElement("option");return r.value="",r.textContent=`请选择${t.label||""}`,n.append(r),i.items?.forEach(s=>{const a=document.createElement("option");a.value=s.code,a.textContent=s.value,n.append(a)}),n.value=i.code||i.items?.find(s=>s.value===i.value)?.code||"",n.addEventListener("change",()=>{i.code=n.value||void 0,i.value=this._getSelectLabelByCode(i,n.value),this.clearInlineEditor()}),n.addEventListener("keydown",s=>{s.key==="Escape"?(s.preventDefault(),this.clearInlineEditor({isSubmitHistory:!1,isRestore:!0})):s.key==="Enter"&&(s.preventDefault(),this.clearInlineEditor())}),n.addEventListener("blur",()=>{this.activeInlineEditor?.input===n&&this.clearInlineEditor()}),e.style.background="#ffffff",e.style.border="1px solid #1677ff",e.style.borderRadius="4px",e.style.boxShadow="0 0 0 2px rgba(22, 119, 255, 0.12)",n}_syncInlineEditorPosition(){const t=this.activeInlineEditor;if(!t)return;const e=this._getInlineEditorPosition(t);if(!e){this.clearInlineEditor({isSubmitHistory:!1});return}const n=e.pageNo*(this.draw.getHeight()+this.draw.getPageGap()),[i,r]=e.coordinate.leftTop,s=Math.max(e.lineHeight,e.metrics.height),a=Math.max(e.metrics.width,80*this.options.scale),c=Math.max(0,(e.lineHeight-s)/2);t.wrapper.style.left=`${i}px`,t.wrapper.style.top=`${r+n+c}px`,t.wrapper.style.width=`${a}px`,t.wrapper.style.height=`${s}px`}_getInlineEditorBaseStyle(t){return{font:this.draw.getElementFont(t),color:t.color||"#000000",padding:`0 ${6*this.options.scale}px`}}_getInlineEditorElement(t){const e=this.draw.getElementList()[t.index];return e?.id===t.elementId?e:t.elementId?this.draw.getElementList().find(n=>n.id===t.elementId)||null:e||null}_getInlineEditorPosition(t){return this.draw.getPosition().getPositionList()[t.index]||null}_ensureMacroConfig(t){return t.macroConfig||(t.macroConfig={type:"text"}),t.macroConfig}_getSelectLabelByCode(t,e){return e&&t.items?.find(n=>n.code===e)?.value||""}}class Rc{draw;position;zone;options;elementList;rowList;positionList;constructor(t,e){this.draw=t,this.position=t.getPosition(),this.zone=t.getZone(),this.options=t.getOptions(),this.elementList=e||[],this.rowList=[],this.positionList=[]}getRowList(){return this.rowList}setElementList(t){this.elementList=t}getElementList(){return this.elementList}getPositionList(){return this.positionList}compute(){this.recovery(),this._computeRowList(),this._computePositionList()}recovery(){this.rowList=[],this.positionList=[]}_computeRowList(){const t=this.draw.getInnerWidth(),e=this.draw.getMargins(),n=Zo(this.elementList);this.rowList=this.draw.computeRowList({startX:e[3],startY:this.getHeaderTop(),innerWidth:t,elementList:this.elementList,surroundElementList:n})}_computePositionList(){const t=this.getHeaderTop(),e=this.draw.getInnerWidth(),i=this.draw.getMargins()[3],r=t;this.position.computePageRowPosition({positionList:this.positionList,rowList:this.rowList,pageNo:0,startRowIndex:0,startIndex:0,startX:i,startY:r,innerWidth:e,zone:l.EditorZone.HEADER})}getHeaderTop(){const{header:{top:t,disabled:e},scale:n}=this.options;return e?0:Math.floor(t*n)}getMaxHeight(){const{header:{maxHeightRadio:t}}=this.options,e=this.draw.getHeight();return Math.floor(e*bi[t])}getHeight(){if(this.options.header.disabled)return 0;const t=this.getMaxHeight(),e=this.getRowHeight();return e>t?t:e}getRowHeight(){return this.rowList.reduce((t,e)=>t+e.height,0)}getExtraHeight(){const t=this.draw.getMargins(),e=this.getHeight(),i=this.getHeaderTop()+e-t[0];return i<=0?0:i}render(t,e){t.save(),t.globalAlpha=this.zone.isHeaderActive()?1:this.options.header.inactiveAlpha;const n=this.draw.getInnerWidth(),i=this.getMaxHeight(),r=[];let s=0;for(let a=0;a<this.rowList.length;a++){const c=this.rowList[a];if(s+c.height>i)break;r.push(c),s+=c.height}this.draw.drawRow(t,{elementList:this.elementList,positionList:this.positionList,rowList:r,pageNo:e,startIndex:0,innerWidth:n,zone:l.EditorZone.HEADER}),t.restore()}}class hc{getOffsetY(t){return-t.metrics.height/2}render(t,e,n,i){t.save(),t.font=e.style,e.color&&(t.fillStyle=e.color),t.fillText(e.value,n,i+this.getOffsetY(e)),t.restore()}}class gc{getOffsetY(t){return t.metrics.height/2}render(t,e,n,i){t.save(),t.font=e.style,e.color&&(t.fillStyle=e.color),t.fillText(e.value,n,i+this.getOffsetY(e)),t.restore()}}class fc{options;constructor(t){this.options=t.getOptions()}render(t,e,n,i){t.save();const{scale:r,separator:{lineWidth:s,strokeStyle:a}}=this.options;t.lineWidth=(e.lineWidth||s)*r,t.strokeStyle=e.color||a,e.dashArray?.length&&t.setLineDash(e.dashArray);const c=Math.round(i);t.translate(0,t.lineWidth/2),t.beginPath(),t.moveTo(n,c),t.lineTo(n+e.width*r,c),t.stroke(),t.restore()}}class Tc{draw;options;i18n;constructor(t){this.draw=t,this.options=t.getOptions(),this.i18n=t.getI18n()}render(t,e,n,i){const{pageBreak:{font:r,fontSize:s,lineDash:a}}=this.options,c=this.i18n.t("pageBreak.displayName"),{scale:d,defaultRowMargin:u}=this.options,R=s*d,h=e.width*d,g=this.draw.getDefaultBasicRowMarginHeight()*u;t.save(),t.font=`${R}px ${r}`;const f=t.measureText(c),T=(h-f.width)/2;t.setLineDash(a),t.translate(0,.5+g),t.beginPath(),t.moveTo(n,i),t.lineTo(n+T,i),t.moveTo(n+T+f.width,i),t.lineTo(n+h,i),t.stroke(),t.fillText(c,n+T,i+f.actualBoundingBoxAscent-R/2),t.restore()}}class mc{draw;options;imageCache;constructor(t){this.draw=t,this.options=t.getOptions(),this.imageCache=new Map}renderText(t,e){const{watermark:{data:n,opacity:i,font:r,size:s,color:a,repeat:c,gap:d,numberType:u},scale:R}=this.options,h=this.draw.getWidth(),g=this.draw.getHeight();t.save(),t.globalAlpha=i,t.font=`${s*R}px ${r}`;let f=n;const T=new RegExp(Pn.PAGE_NO);T.test(f)&&(f=an.formatNumberPlaceholder(f,e+1,T,u));const m=new RegExp(Pn.PAGE_COUNT);m.test(f)&&(f=an.formatNumberPlaceholder(f,this.draw.getPageCount(),m,u));const p=t.measureText(f);if(c){const I=this.draw.getPagePixelRatio(),L=document.createElement("canvas"),P=L.getContext("2d"),C=p.width,S=p.actualBoundingBoxAscent+p.actualBoundingBoxDescent,F=Math.sqrt(Math.pow(C,2)+Math.pow(S,2)),N=F+2*d[0]*R,V=F+2*d[1]*R;L.width=N,L.height=V,L.style.width=`${N*I}px`,L.style.height=`${V*I}px`,P.translate(N/2,V/2),P.rotate(-45*Math.PI/180),P.translate(-N/2,-V/2),P.font=`${s*R}px ${r}`,P.fillStyle=a,P.fillText(f,(N-C)/2,(V-S)/2+p.actualBoundingBoxAscent);const Y=t.createPattern(L,"repeat");Y&&(t.fillStyle=Y,t.fillRect(0,0,h,g))}else{const I=h/2,L=g/2;t.fillStyle=a,t.translate(I,L),t.rotate(-45*Math.PI/180),t.fillText(f,-p.width/2,p.actualBoundingBoxAscent-s*R/2)}t.restore()}renderImage(t){const{watermark:{width:e,height:n,data:i,opacity:r,repeat:s,gap:a},scale:c}=this.options;if(!this.imageCache.has(i)){const g=new Image;g.setAttribute("crossOrigin","Anonymous"),g.src=i,g.onload=()=>{this.imageCache.set(i,g),this.draw.render({isCompute:!1,isSubmitHistory:!1})};return}const d=this.draw.getWidth(),u=this.draw.getHeight(),R=e*c,h=n*c;if(t.save(),t.globalAlpha=r,s){const g=this.draw.getPagePixelRatio(),f=document.createElement("canvas"),T=f.getContext("2d"),m=Math.sqrt(Math.pow(R,2)+Math.pow(h,2)),p=m+2*a[0]*c,I=m+2*a[1]*c;f.width=p,f.height=I,f.style.width=`${p*g}px`,f.style.height=`${I*g}px`,T.translate(p/2,I/2),T.rotate(-45*Math.PI/180),T.translate(-p/2,-I/2),T.drawImage(this.imageCache.get(i),(p-R)/2,(I-h)/2,R,h);const L=t.createPattern(f,"repeat");L&&(t.fillStyle=L,t.fillRect(0,0,d,u))}else{const g=d/2,f=u/2;t.translate(g,f),t.rotate(-45*Math.PI/180),t.drawImage(this.imageCache.get(i),-R/2,-h/2,R,h)}t.restore()}render(t,e){this.options.watermark.type===l.WatermarkType.IMAGE?this.renderImage(t):this.renderText(t,e)}}class pc{draw;control;options;highlightList;highlightMatchResult;constructor(t){this.draw=t.getDraw(),this.control=t,this.options=this.draw.getOptions(),this.highlightList=[],this.highlightMatchResult=[]}getControlHighlight(t,e){const{control:{activeBackgroundColor:n,disabledBackgroundColor:i,existValueBackgroundColor:r,noValueBackgroundColor:s}}=this.options,a=t[e],c=this.draw.isPrintMode(),d=this.control.getActiveControl()?.getElement();let u=!1,R=!1,h=!1,g=!1;return a.highlight||(u=!c&&!!n&&!!d&&a.controlId===d.controlId&&!this.control.getIsRangeInPostfix()),u||(R=!c&&!!i&&!!a.control?.disabled),R||(h=!c&&!!r&&!!a.controlId&&this.control.getIsExistValueByElementListIndex(t,e)),h||(g=!c&&!!s&&!!a.controlId&&!this.control.getIsExistValueByElementListIndex(t,e)),(u?n:"")||(R?i:"")||(h?r:"")||(g?s:"")}getHighlightMatchResult(){return this.highlightMatchResult}getHighlightList(){return this.highlightList}setHighlightList(t){this.highlightList=t}computeHighlightList(){const t=this.draw.getSearch(),e=(n,i)=>{let r=0;for(;r<n.length;){const s=n[r];if(r++,s.type===l.ElementType.TABLE){const f=s.trList;for(let T=0;T<f.length;T++){const m=f[T];for(let p=0;p<m.tdList.length;p++){const I=m.tdList[p],L={tableId:s.id,tableIndex:r-1,trIndex:T,tdIndex:p,tdId:I.id};e(I.value,L)}}}const a=s?.control;if(!a)continue;const c=this.highlightList.findIndex(f=>f.id===s.controlId||a.conceptId&&a.conceptId===f.conceptId);if(!~c)continue;const d=r;let u=r;for(;u<n.length&&n[u].controlId===s.controlId;)u++;r=u;const R=n.slice(d,u).map(f=>f.controlComponent===l.ControlComponent.VALUE?f:{value:_}),h=this.highlightList[c],{ruleList:g}=h;for(let f=0;f<g.length;f++){const T=g[f],m=t.getMatchList(T.keyword,R);this.highlightMatchResult.push(...m.map(p=>({...p,...T,...i,index:p.index+d})))}}};this.highlightMatchResult=[],e(this.draw.getOriginalMainElementList())}renderHighlightList(t,e){if(!this.highlightMatchResult?.length)return;const{searchMatchAlpha:n,searchMatchColor:i}=this.options,r=this.draw.getPosition().getOriginalPositionList(),s=this.draw.getOriginalElementList();t.save();for(let a=0;a<this.highlightMatchResult.length;a++){const c=this.highlightMatchResult[a];let d=null;if(c.tableId){const{tableIndex:I,trIndex:L,tdIndex:P,index:C}=c;d=s[I]?.trList[L].tdList[P]?.positionList[C]}else d=r[c.index];if(!d)continue;const{coordinate:{leftTop:u,leftBottom:R,rightTop:h},pageNo:g}=d;if(g!==e)continue;t.fillStyle=c.backgroundColor||i,t.globalAlpha=c.alpha||n;const f=u[0],T=u[1],m=h[0]-u[0],p=R[1]-u[1];t.fillRect(f,T,m,p)}t.restore()}}class Lc{borderRect;options;constructor(t){this.borderRect=this.clearBorderInfo(),this.options=t.getOptions()}clearBorderInfo(){return this.borderRect={x:0,y:0,width:0,height:0},this.borderRect}recordBorderInfo(t,e,n,i){!this.borderRect.width&&(this.borderRect.x=t,this.borderRect.y=e,this.borderRect.height=i),this.borderRect.width+=n}render(t){if(!this.borderRect.width)return;const{scale:e,control:{borderWidth:n,borderColor:i}}=this.options,{x:r,y:s,width:a,height:c}=this.borderRect;t.save(),t.translate(0,1*e),t.lineWidth=n*e,t.strokeStyle=i,t.beginPath(),t.rect(r,s,a,c),t.stroke(),t.restore(),this.clearBorderInfo()}}class Mn{draw;element;control;isPopup;selectDom;options;VALUE_DELIMITER=",";DEFAULT_MULTI_SELECT_DELIMITER=",";constructor(t,e){const n=e.getDraw();this.draw=n,this.options=n.getOptions(),this.element=t,this.control=e,this.isPopup=!1,this.selectDom=null}setElement(t){this.element=t}getElement(){return this.element}getIsPopup(){return this.isPopup}getCodes(){return this.element?.control?.code?this.element.control.code.split(","):[]}getText(t){if(!this.element?.control)return null;const e=this.element.control;if(!e.valueSets?.length)return null;const n=e?.multiSelectDelimiter||this.DEFAULT_MULTI_SELECT_DELIMITER,i=e.valueSets,r=[];return t.forEach(s=>{const a=i.find(c=>c.code===s);a&&!wi(a.value)&&r.push(a.value)}),r.join(n)||null}getValue(t={}){const{elementList:e,range:n}=this.control.mergeControl(t),{startIndex:i}=n,r=e[i],s=[];let a=i;for(;a>=0;){const d=e[a];if(!d||d.controlId!==r.controlId||d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.PRE_TEXT)break;d.controlComponent===l.ControlComponent.VALUE&&s.unshift(d),a--}let c=i+1;for(;c<e.length;){const d=e[c];if(d.controlId!==r.controlId||d.controlComponent===l.ControlComponent.POSTFIX||d.controlComponent===l.ControlComponent.POST_TEXT)break;d.controlComponent===l.ControlComponent.VALUE&&s.push(d),c++}return s}setValue(t,e={},n={}){if(!this.element.control?.selectExclusiveOptions?.inputAble||!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return-1;const{elementList:i,range:r}=this.control.mergeControl(e);this.control.shrinkBoundary(e);const{startIndex:s,endIndex:a}=r,c=this.control.getDraw();s!==a?c.spliceElementList(i,s+1,a-s):this.control.removePlaceholder(s,{elementList:i});const d=i[s],u=d.type&&!zt.includes(d.type)||d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.PRE_TEXT?Dt(d,["control","controlId",...At]):se(d,["type"]),R=r.startIndex+1;for(let h=0;h<t.length;h++){const g={...u,...t[h],controlComponent:l.ControlComponent.VALUE};wt(i,[g],s,{editorOptions:this.options}),c.spliceElementList(i,R+h,0,[g])}return R+t.length-1}keydown(t){if(this.control.getIsDisabledControl())return null;const e=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();const{startIndex:i,endIndex:r}=n,s=e[i],a=e[r],c=this.element.control?.selectExclusiveOptions?.inputAble;if(t.key===l.KeyMap.Backspace)return i!==r?c?(this.draw.spliceElementList(e,i+1,r-i),this.getValue().length||this.control.addPlaceholder(i),i):this.clearSelect():s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT||a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POST_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER?this.control.removeControl(i):c?(this.draw.spliceElementList(e,i,1),this.getValue().length||this.control.addPlaceholder(i-1),i-1):this.clearSelect();if(t.key===l.KeyMap.Delete){if(i!==r)return c?(this.draw.spliceElementList(e,i+1,r-i),this.getValue().length||this.control.addPlaceholder(i),i):this.clearSelect();{const d=e[r+1];return(s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT)&&d.controlComponent===l.ControlComponent.PLACEHOLDER||d.controlComponent===l.ControlComponent.POSTFIX||d.controlComponent===l.ControlComponent.POST_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER?this.control.removeControl(i):c?(this.draw.spliceElementList(e,i+1,1),this.getValue().length||this.control.addPlaceholder(i),i):this.clearSelect()}}return r}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();const{startIndex:t,endIndex:e}=this.control.getRange();return t===e?t:this.clearSelect()}clearSelect(t={},e={}){const{isIgnoreDisabledRule:n=!1,isAddPlaceholder:i=!0}=e;if(!n&&this.control.getIsDisabledControl(t))return-1;const r=t.elementList||this.control.getElementList(),{startIndex:s}=t.range||this.control.getRange(),a=r[s];let c=-1,d=-1,u=s;for(;u>0;){const g=r[u];if(g.controlId!==a.controlId||g.controlComponent===l.ControlComponent.PREFIX||g.controlComponent===l.ControlComponent.PRE_TEXT){c=u;break}u--}let R=s+1;for(;R<r.length;){const g=r[R];if(g.controlId!==a.controlId||g.controlComponent===l.ControlComponent.POSTFIX||g.controlComponent===l.ControlComponent.POST_TEXT){d=R-1;break}R++}return!~c||!~d?-1:(this.control.getDraw().spliceElementList(r,c+1,d-c,[],{isIgnoreDeletedRule:e.isIgnoreDeletedRule}),i&&this.control.addPlaceholder(u,t),this.control.setControlProperties({code:void 0},{elementList:r,range:{startIndex:u,endIndex:u}}),u)}setSelect(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return;const i=e.elementList||this.control.getElementList(),r=e.range||this.control.getRange(),s=this.element.control,a=t?.split(this.VALUE_DELIMITER)||[],c=s.code,d=s.code?.split(this.VALUE_DELIMITER)||[],u=s.isMultiSelect;if(!u&&t===c||u&&Ui(d,a)){this.control.repaintControl({curIndex:r.startIndex,isCompute:!1,isSubmitHistory:!1}),this.destroy();return}const R=s.valueSets;if(!Array.isArray(R)||!R.length)return;const h=this.getText(a);if(!h){if(c){const P=this.clearSelect(e,{isIgnoreDeletedRule:n.isIgnoreDeletedRule});~P&&(this.control.repaintControl({curIndex:P}),this.control.emitControlContentChange({controlValue:[]}))}return}const g=this.getValue(e)[0],f=g?Dt(g,Re):Dt(i[r.startIndex],At),T=this.clearSelect(e,{isAddPlaceholder:!1,isIgnoreDeletedRule:n.isIgnoreDeletedRule});if(!~T)return;c||this.control.removePlaceholder(T,e);const m=se(i[T],Re),p=T+1,I=ct(h),L=this.control.getDraw();for(let P=0;P<I.length;P++){const C={...f,...m,type:l.ElementType.TEXT,value:I[P],controlComponent:l.ControlComponent.VALUE};(C.color===this.options.control.bracketColor||C.color===this.options.control.placeholderColor)&&(C.color=this.options.defaultColor),wt(i,[C],T,{editorOptions:this.options}),L.spliceElementList(i,p+P,0,[C])}if(this.control.setControlProperties({code:t},{elementList:i,range:{startIndex:T,endIndex:T}}),!e.range){const P=p+I.length-1;this.control.repaintControl({curIndex:P}),this.control.emitControlContentChange({context:e}),u||this.destroy()}}_createSelectPopupDom(){const t=this.element.control,e=t.valueSets;if(!Array.isArray(e)||!e.length)return;const n=this.control.getPosition();if(!n)return;const i=document.createElement("div");i.classList.add(`${z}-select-control-popup`),i.setAttribute(ue,l.EditorComponent.POPUP);const r=document.createElement("ul");let s=null;for(let h=0;h<e.length;h++){const g=e[h],f=document.createElement("li");let T=this.getCodes();T.includes(g.code)&&(f.classList.add("active"),s=f),f.onclick=()=>{const m=T.findIndex(p=>p===g.code);t.isMultiSelect?~m?T.splice(m,1):T.push(g.code):~m?T=[]:T=[g.code],this.setSelect(T.join(this.VALUE_DELIMITER))},f.append(document.createTextNode(g.value)),r.append(f)}i.append(r);const{coordinate:{leftTop:[a,c]},lineHeight:d}=n,u=this.control.getPreY();i.style.left=`${a}px`,i.style.top=`${c+u+d}px`,this.control.getContainer().append(i),this.selectDom=i,s&&Qi(i,s)}awake(){if(this.isPopup||this.control.getIsDisabledControl())return;const{startIndex:t}=this.control.getRange(),n=this.control.getElementList()[t];if(!n||n.controlId!==this.element.controlId)return;const i=n.controlComponent===l.ControlComponent.PREFIX||n.controlComponent===l.ControlComponent.PRE_TEXT||n.controlComponent===l.ControlComponent.POSTFIX||n.controlComponent===l.ControlComponent.POST_TEXT||n.controlComponent===l.ControlComponent.PLACEHOLDER;!this.control.getIsRangeWithinControl()&&!i||(this._createSelectPopupDom(),this.isPopup=!0)}destroy(){this.isPopup&&(this.selectDom?.remove(),this.isPopup=!1)}}var Ts;function j(){return Ts.apply(null,arguments)}function Ic(o){Ts=o}function re(o){return o instanceof Array||Object.prototype.toString.call(o)==="[object Array]"}function Ae(o){return o!=null&&Object.prototype.toString.call(o)==="[object Object]"}function Ot(o,t){return Object.prototype.hasOwnProperty.call(o,t)}function Ao(o){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(o).length===0;var t;for(t in o)if(Ot(o,t))return!1;return!0}function Jt(o){return o===void 0}function Oe(o){return typeof o=="number"||Object.prototype.toString.call(o)==="[object Number]"}function On(o){return o instanceof Date||Object.prototype.toString.call(o)==="[object Date]"}function ms(o,t){var e=[],n,i=o.length;for(n=0;n<i;++n)e.push(t(o[n],n));return e}function we(o,t){for(var e in t)Ot(t,e)&&(o[e]=t[e]);return Ot(t,"toString")&&(o.toString=t.toString),Ot(t,"valueOf")&&(o.valueOf=t.valueOf),o}function pe(o,t,e,n){return xs(o,t,e,n,!0).utc()}function Pc(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Rt(o){return o._pf==null&&(o._pf=Pc()),o._pf}var ko;Array.prototype.some?ko=Array.prototype.some:ko=function(o){var t=Object(this),e=t.length>>>0,n;for(n=0;n<e;n++)if(n in t&&o.call(this,t[n],n,t))return!0;return!1};function Jo(o){var t=null,e=!1,n=o._d&&!isNaN(o._d.getTime());if(n&&(t=Rt(o),e=ko.call(t.parsedDateParts,function(i){return i!=null}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&e),o._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(o))o._isValid=n;else return n;return o._isValid}function An(o){var t=pe(NaN);return o!=null?we(Rt(t),o):Rt(t).userInvalidated=!0,t}var ps=j.momentProperties=[],Bo=!1;function $o(o,t){var e,n,i,r=ps.length;if(Jt(t._isAMomentObject)||(o._isAMomentObject=t._isAMomentObject),Jt(t._i)||(o._i=t._i),Jt(t._f)||(o._f=t._f),Jt(t._l)||(o._l=t._l),Jt(t._strict)||(o._strict=t._strict),Jt(t._tzm)||(o._tzm=t._tzm),Jt(t._isUTC)||(o._isUTC=t._isUTC),Jt(t._offset)||(o._offset=t._offset),Jt(t._pf)||(o._pf=Rt(t)),Jt(t._locale)||(o._locale=t._locale),r>0)for(e=0;e<r;e++)n=ps[e],i=t[n],Jt(i)||(o[n]=i);return o}function Cn(o){$o(this,o),this._d=new Date(o._d!=null?o._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Bo===!1&&(Bo=!0,j.updateOffset(this),Bo=!1)}function le(o){return o instanceof Cn||o!=null&&o._isAMomentObject!=null}function Ls(o){j.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+o)}function ee(o,t){var e=!0;return we(function(){if(j.deprecationHandler!=null&&j.deprecationHandler(null,o),e){var n=[],i,r,s,a=arguments.length;for(r=0;r<a;r++){if(i="",typeof arguments[r]=="object"){i+=`
|
|
102
|
+
[`+r+"] ";for(s in arguments[0])Ot(arguments[0],s)&&(i+=s+": "+arguments[0][s]+", ");i=i.slice(0,-2)}else i=arguments[r];n.push(i)}Ls(o+`
|
|
103
103
|
Arguments: `+Array.prototype.slice.call(n).join("")+`
|
|
104
|
-
`+new Error().stack),e=!1}return t.apply(this,arguments)},t)}var ps={};function Ls(o,t){j.deprecationHandler!=null&&j.deprecationHandler(o,t),ps[o]||(ms(t),ps[o]=!0)}j.suppressDeprecationWarnings=!1,j.deprecationHandler=null;function Le(o){return typeof Function<"u"&&o instanceof Function||Object.prototype.toString.call(o)==="[object Function]"}function Lc(o){var t,e;for(e in o)Ot(o,e)&&(t=o[e],Le(t)?this[e]=t:this["_"+e]=t);this._config=o,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function zo(o,t){var e=we({},o),n;for(n in t)Ot(t,n)&&(Ge(o[n])&&Ge(t[n])?(e[n]={},we(e[n],o[n]),we(e[n],t[n])):t[n]!=null?e[n]=t[n]:delete e[n]);for(n in o)Ot(o,n)&&!Ot(t,n)&&Ge(o[n])&&(e[n]=we({},e[n]));return e}function jo(o){o!=null&&this.set(o)}var qo;Object.keys?qo=Object.keys:qo=function(o){var t,e=[];for(t in o)Ot(o,t)&&e.push(t);return e};var Ic={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Pc(o,t,e){var n=this._calendar[o]||this._calendar.sameElse;return Le(n)?n.call(t,e):n}function Ie(o,t,e){var n=""+Math.abs(o),i=t-n.length,r=o>=0;return(r?e?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}var ti=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,kn=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ei={},cn={};function rt(o,t,e,n){var i=n;typeof n=="string"&&(i=function(){return this[n]()}),o&&(cn[o]=i),t&&(cn[t[0]]=function(){return Ie(i.apply(this,arguments),t[1],t[2])}),e&&(cn[e]=function(){return this.localeData().ordinal(i.apply(this,arguments),o)})}function Mc(o){return o.match(/\[[\s\S]/)?o.replace(/^\[|\]$/g,""):o.replace(/\\/g,"")}function Oc(o){var t=o.match(ti),e,n;for(e=0,n=t.length;e<n;e++)cn[t[e]]?t[e]=cn[t[e]]:t[e]=Mc(t[e]);return function(i){var r="",s;for(s=0;s<n;s++)r+=Le(t[s])?t[s].call(i,o):t[s];return r}}function Jn(o,t){return o.isValid()?(t=Is(t,o.localeData()),ei[t]=ei[t]||Oc(t),ei[t](o)):o.localeData().invalidDate()}function Is(o,t){var e=5;function n(i){return t.longDateFormat(i)||i}for(kn.lastIndex=0;e>=0&&kn.test(o);)o=o.replace(kn,n),kn.lastIndex=0,e-=1;return o}var Cc={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Sc(o){var t=this._longDateFormat[o],e=this._longDateFormat[o.toUpperCase()];return t||!e?t:(this._longDateFormat[o]=e.match(ti).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[o])}var Ec="Invalid date";function Xc(){return this._invalidDate}var Nc="%d",Fc=/\d{1,2}/;function yc(o){return this._ordinal.replace("%d",o)}var bc={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Wc(o,t,e,n){var i=this._relativeTime[e];return Le(i)?i(o,t,e,n):i.replace(/%d/i,o)}function Vc(o,t){var e=this._relativeTime[o>0?"future":"past"];return Le(e)?e(t):e.replace(/%s/i,t)}var Ps={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ne(o){return typeof o=="string"?Ps[o]||Ps[o.toLowerCase()]:void 0}function ni(o){var t={},e,n;for(n in o)Ot(o,n)&&(e=ne(n),e&&(t[e]=o[n]));return t}var Yc={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Dc(o){var t=[],e;for(e in o)Ot(o,e)&&t.push({unit:e,priority:Yc[e]});return t.sort(function(n,i){return n.priority-i.priority}),t}var Ms=/\d/,jt=/\d\d/,Os=/\d{3}/,oi=/\d{4}/,Bn=/[+-]?\d{6}/,Nt=/\d\d?/,Cs=/\d\d\d\d?/,Ss=/\d\d\d\d\d\d?/,$n=/\d{1,3}/,ii=/\d{1,4}/,zn=/[+-]?\d{1,6}/,dn=/\d+/,jn=/[+-]?\d+/,Uc=/Z|[+-]\d\d:?\d\d/gi,qn=/Z|[+-]\d\d(?::?\d\d)?/gi,wc=/[+-]?\d+(\.\d{1,3})?/,Sn=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,un=/^[1-9]\d?/,si=/^([1-9]\d|\d)/,to;to={};function it(o,t,e){to[o]=Le(t)?t:function(n,i){return n&&e?e:t}}function Zc(o,t){return Ot(to,o)?to[o](t._strict,t._locale):new RegExp(Qc(o))}function Qc(o){return Ce(o.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r}))}function Ce(o){return o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function oe(o){return o<0?Math.ceil(o)||0:Math.floor(o)}function ft(o){var t=+o,e=0;return t!==0&&isFinite(t)&&(e=oe(t)),e}var ri={};function Et(o,t){var e,n=t,i;for(typeof o=="string"&&(o=[o]),Oe(t)&&(n=function(r,s){s[t]=ft(r)}),i=o.length,e=0;e<i;e++)ri[o[e]]=n}function En(o,t){Et(o,function(e,n,i,r){i._w=i._w||{},t(e,i._w,i,r)})}function vc(o,t,e){t!=null&&Ot(ri,o)&&ri[o](t,e._a,e,o)}function eo(o){return o%4===0&&o%100!==0||o%400===0}var Gt=0,Se=1,Pe=2,vt=3,ae=4,Ee=5,Ae=6,Kc=7,Hc=8;rt("Y",0,0,function(){var o=this.year();return o<=9999?Ie(o,4):"+"+o}),rt(0,["YY",2],0,function(){return this.year()%100}),rt(0,["YYYY",4],0,"year"),rt(0,["YYYYY",5],0,"year"),rt(0,["YYYYYY",6,!0],0,"year"),it("Y",jn),it("YY",Nt,jt),it("YYYY",ii,oi),it("YYYYY",zn,Bn),it("YYYYYY",zn,Bn),Et(["YYYYY","YYYYYY"],Gt),Et("YYYY",function(o,t){t[Gt]=o.length===2?j.parseTwoDigitYear(o):ft(o)}),Et("YY",function(o,t){t[Gt]=j.parseTwoDigitYear(o)}),Et("Y",function(o,t){t[Gt]=parseInt(o,10)});function Xn(o){return eo(o)?366:365}j.parseTwoDigitYear=function(o){return ft(o)+(ft(o)>68?1900:2e3)};var Es=Rn("FullYear",!0);function _c(){return eo(this.year())}function Rn(o,t){return function(e){return e!=null?(Xs(this,o,e),j.updateOffset(this,t),this):Nn(this,o)}}function Nn(o,t){if(!o.isValid())return NaN;var e=o._d,n=o._isUTC;switch(t){case"Milliseconds":return n?e.getUTCMilliseconds():e.getMilliseconds();case"Seconds":return n?e.getUTCSeconds():e.getSeconds();case"Minutes":return n?e.getUTCMinutes():e.getMinutes();case"Hours":return n?e.getUTCHours():e.getHours();case"Date":return n?e.getUTCDate():e.getDate();case"Day":return n?e.getUTCDay():e.getDay();case"Month":return n?e.getUTCMonth():e.getMonth();case"FullYear":return n?e.getUTCFullYear():e.getFullYear();default:return NaN}}function Xs(o,t,e){var n,i,r,s,a;if(!(!o.isValid()||isNaN(e))){switch(n=o._d,i=o._isUTC,t){case"Milliseconds":return void(i?n.setUTCMilliseconds(e):n.setMilliseconds(e));case"Seconds":return void(i?n.setUTCSeconds(e):n.setSeconds(e));case"Minutes":return void(i?n.setUTCMinutes(e):n.setMinutes(e));case"Hours":return void(i?n.setUTCHours(e):n.setHours(e));case"Date":return void(i?n.setUTCDate(e):n.setDate(e));case"FullYear":break;default:return}r=e,s=o.month(),a=o.date(),a=a===29&&s===1&&!eo(r)?28:a,i?n.setUTCFullYear(r,s,a):n.setFullYear(r,s,a)}}function xc(o){return o=ne(o),Le(this[o])?this[o]():this}function Gc(o,t){if(typeof o=="object"){o=ni(o);var e=Dc(o),n,i=e.length;for(n=0;n<i;n++)this[e[n].unit](o[e[n].unit])}else if(o=ne(o),Le(this[o]))return this[o](t);return this}function Ac(o,t){return(o%t+t)%t}var Zt;Array.prototype.indexOf?Zt=Array.prototype.indexOf:Zt=function(o){var t;for(t=0;t<this.length;++t)if(this[t]===o)return t;return-1};function li(o,t){if(isNaN(o)||isNaN(t))return NaN;var e=Ac(t,12);return o+=(t-e)/12,e===1?eo(o)?29:28:31-e%7%2}rt("M",["MM",2],"Mo",function(){return this.month()+1}),rt("MMM",0,0,function(o){return this.localeData().monthsShort(this,o)}),rt("MMMM",0,0,function(o){return this.localeData().months(this,o)}),it("M",Nt,un),it("MM",Nt,jt),it("MMM",function(o,t){return t.monthsShortRegex(o)}),it("MMMM",function(o,t){return t.monthsRegex(o)}),Et(["M","MM"],function(o,t){t[Se]=ft(o)-1}),Et(["MMM","MMMM"],function(o,t,e,n){var i=e._locale.monthsParse(o,n,e._strict);i!=null?t[Se]=i:Rt(e).invalidMonth=o});var kc="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ns="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Fs=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Jc=Sn,Bc=Sn;function $c(o,t){return o?re(this._months)?this._months[o.month()]:this._months[(this._months.isFormat||Fs).test(t)?"format":"standalone"][o.month()]:re(this._months)?this._months:this._months.standalone}function zc(o,t){return o?re(this._monthsShort)?this._monthsShort[o.month()]:this._monthsShort[Fs.test(t)?"format":"standalone"][o.month()]:re(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function jc(o,t,e){var n,i,r,s=o.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)r=pe([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(r,"").toLocaleLowerCase();return e?t==="MMM"?(i=Zt.call(this._shortMonthsParse,s),i!==-1?i:null):(i=Zt.call(this._longMonthsParse,s),i!==-1?i:null):t==="MMM"?(i=Zt.call(this._shortMonthsParse,s),i!==-1?i:(i=Zt.call(this._longMonthsParse,s),i!==-1?i:null)):(i=Zt.call(this._longMonthsParse,s),i!==-1?i:(i=Zt.call(this._shortMonthsParse,s),i!==-1?i:null))}function qc(o,t,e){var n,i,r;if(this._monthsParseExact)return jc.call(this,o,t,e);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(i=pe([2e3,n]),e&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!e&&!this._monthsParse[n]&&(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[n]=new RegExp(r.replace(".",""),"i")),e&&t==="MMMM"&&this._longMonthsParse[n].test(o))return n;if(e&&t==="MMM"&&this._shortMonthsParse[n].test(o))return n;if(!e&&this._monthsParse[n].test(o))return n}}function ys(o,t){if(!o.isValid())return o;if(typeof t=="string"){if(/^\d+$/.test(t))t=ft(t);else if(t=o.localeData().monthsParse(t),!Oe(t))return o}var e=t,n=o.date();return n=n<29?n:Math.min(n,li(o.year(),e)),o._isUTC?o._d.setUTCMonth(e,n):o._d.setMonth(e,n),o}function bs(o){return o!=null?(ys(this,o),j.updateOffset(this,!0),this):Nn(this,"Month")}function td(){return li(this.year(),this.month())}function ed(o){return this._monthsParseExact?(Ot(this,"_monthsRegex")||Ws.call(this),o?this._monthsShortStrictRegex:this._monthsShortRegex):(Ot(this,"_monthsShortRegex")||(this._monthsShortRegex=Jc),this._monthsShortStrictRegex&&o?this._monthsShortStrictRegex:this._monthsShortRegex)}function nd(o){return this._monthsParseExact?(Ot(this,"_monthsRegex")||Ws.call(this),o?this._monthsStrictRegex:this._monthsRegex):(Ot(this,"_monthsRegex")||(this._monthsRegex=Bc),this._monthsStrictRegex&&o?this._monthsStrictRegex:this._monthsRegex)}function Ws(){function o(c,d){return d.length-c.length}var t=[],e=[],n=[],i,r,s,a;for(i=0;i<12;i++)r=pe([2e3,i]),s=Ce(this.monthsShort(r,"")),a=Ce(this.months(r,"")),t.push(s),e.push(a),n.push(a),n.push(s);t.sort(o),e.sort(o),n.sort(o),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+e.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function od(o,t,e,n,i,r,s){var a;return o<100&&o>=0?(a=new Date(o+400,t,e,n,i,r,s),isFinite(a.getFullYear())&&a.setFullYear(o)):a=new Date(o,t,e,n,i,r,s),a}function Fn(o){var t,e;return o<100&&o>=0?(e=Array.prototype.slice.call(arguments),e[0]=o+400,t=new Date(Date.UTC.apply(null,e)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(o)):t=new Date(Date.UTC.apply(null,arguments)),t}function no(o,t,e){var n=7+t-e,i=(7+Fn(o,0,n).getUTCDay()-t)%7;return-i+n-1}function Vs(o,t,e,n,i){var r=(7+e-n)%7,s=no(o,n,i),a=1+7*(t-1)+r+s,c,d;return a<=0?(c=o-1,d=Xn(c)+a):a>Xn(o)?(c=o+1,d=a-Xn(o)):(c=o,d=a),{year:c,dayOfYear:d}}function yn(o,t,e){var n=no(o.year(),t,e),i=Math.floor((o.dayOfYear()-n-1)/7)+1,r,s;return i<1?(s=o.year()-1,r=i+Xe(s,t,e)):i>Xe(o.year(),t,e)?(r=i-Xe(o.year(),t,e),s=o.year()+1):(s=o.year(),r=i),{week:r,year:s}}function Xe(o,t,e){var n=no(o,t,e),i=no(o+1,t,e);return(Xn(o)-n+i)/7}rt("w",["ww",2],"wo","week"),rt("W",["WW",2],"Wo","isoWeek"),it("w",Nt,un),it("ww",Nt,jt),it("W",Nt,un),it("WW",Nt,jt),En(["w","ww","W","WW"],function(o,t,e,n){t[n.substr(0,1)]=ft(o)});function id(o){return yn(o,this._week.dow,this._week.doy).week}var sd={dow:0,doy:6};function rd(){return this._week.dow}function ld(){return this._week.doy}function ad(o){var t=this.localeData().week(this);return o==null?t:this.add((o-t)*7,"d")}function cd(o){var t=yn(this,1,4).week;return o==null?t:this.add((o-t)*7,"d")}rt("d",0,"do","day"),rt("dd",0,0,function(o){return this.localeData().weekdaysMin(this,o)}),rt("ddd",0,0,function(o){return this.localeData().weekdaysShort(this,o)}),rt("dddd",0,0,function(o){return this.localeData().weekdays(this,o)}),rt("e",0,0,"weekday"),rt("E",0,0,"isoWeekday"),it("d",Nt),it("e",Nt),it("E",Nt),it("dd",function(o,t){return t.weekdaysMinRegex(o)}),it("ddd",function(o,t){return t.weekdaysShortRegex(o)}),it("dddd",function(o,t){return t.weekdaysRegex(o)}),En(["dd","ddd","dddd"],function(o,t,e,n){var i=e._locale.weekdaysParse(o,n,e._strict);i!=null?t.d=i:Rt(e).invalidWeekday=o}),En(["d","e","E"],function(o,t,e,n){t[n]=ft(o)});function dd(o,t){return typeof o!="string"?o:isNaN(o)?(o=t.weekdaysParse(o),typeof o=="number"?o:null):parseInt(o,10)}function ud(o,t){return typeof o=="string"?t.weekdaysParse(o)%7||7:isNaN(o)?null:o}function ai(o,t){return o.slice(t,7).concat(o.slice(0,t))}var Rd="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ys="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),hd="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),gd=Sn,fd=Sn,Td=Sn;function md(o,t){var e=re(this._weekdays)?this._weekdays:this._weekdays[o&&o!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return o===!0?ai(e,this._week.dow):o?e[o.day()]:e}function pd(o){return o===!0?ai(this._weekdaysShort,this._week.dow):o?this._weekdaysShort[o.day()]:this._weekdaysShort}function Ld(o){return o===!0?ai(this._weekdaysMin,this._week.dow):o?this._weekdaysMin[o.day()]:this._weekdaysMin}function Id(o,t,e){var n,i,r,s=o.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)r=pe([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(r,"").toLocaleLowerCase();return e?t==="dddd"?(i=Zt.call(this._weekdaysParse,s),i!==-1?i:null):t==="ddd"?(i=Zt.call(this._shortWeekdaysParse,s),i!==-1?i:null):(i=Zt.call(this._minWeekdaysParse,s),i!==-1?i:null):t==="dddd"?(i=Zt.call(this._weekdaysParse,s),i!==-1||(i=Zt.call(this._shortWeekdaysParse,s),i!==-1)?i:(i=Zt.call(this._minWeekdaysParse,s),i!==-1?i:null)):t==="ddd"?(i=Zt.call(this._shortWeekdaysParse,s),i!==-1||(i=Zt.call(this._weekdaysParse,s),i!==-1)?i:(i=Zt.call(this._minWeekdaysParse,s),i!==-1?i:null)):(i=Zt.call(this._minWeekdaysParse,s),i!==-1||(i=Zt.call(this._weekdaysParse,s),i!==-1)?i:(i=Zt.call(this._shortWeekdaysParse,s),i!==-1?i:null))}function Pd(o,t,e){var n,i,r;if(this._weekdaysParseExact)return Id.call(this,o,t,e);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=pe([2e3,1]).day(n),e&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(r.replace(".",""),"i")),e&&t==="dddd"&&this._fullWeekdaysParse[n].test(o))return n;if(e&&t==="ddd"&&this._shortWeekdaysParse[n].test(o))return n;if(e&&t==="dd"&&this._minWeekdaysParse[n].test(o))return n;if(!e&&this._weekdaysParse[n].test(o))return n}}function Md(o){if(!this.isValid())return o!=null?this:NaN;var t=Nn(this,"Day");return o!=null?(o=dd(o,this.localeData()),this.add(o-t,"d")):t}function Od(o){if(!this.isValid())return o!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return o==null?t:this.add(o-t,"d")}function Cd(o){if(!this.isValid())return o!=null?this:NaN;if(o!=null){var t=ud(o,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Sd(o){return this._weekdaysParseExact?(Ot(this,"_weekdaysRegex")||ci.call(this),o?this._weekdaysStrictRegex:this._weekdaysRegex):(Ot(this,"_weekdaysRegex")||(this._weekdaysRegex=gd),this._weekdaysStrictRegex&&o?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ed(o){return this._weekdaysParseExact?(Ot(this,"_weekdaysRegex")||ci.call(this),o?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ot(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=fd),this._weekdaysShortStrictRegex&&o?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Xd(o){return this._weekdaysParseExact?(Ot(this,"_weekdaysRegex")||ci.call(this),o?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ot(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Td),this._weekdaysMinStrictRegex&&o?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ci(){function o(u,R){return R.length-u.length}var t=[],e=[],n=[],i=[],r,s,a,c,d;for(r=0;r<7;r++)s=pe([2e3,1]).day(r),a=Ce(this.weekdaysMin(s,"")),c=Ce(this.weekdaysShort(s,"")),d=Ce(this.weekdays(s,"")),t.push(a),e.push(c),n.push(d),i.push(a),i.push(c),i.push(d);t.sort(o),e.sort(o),n.sort(o),i.sort(o),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+e.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function di(){return this.hours()%12||12}function Nd(){return this.hours()||24}rt("H",["HH",2],0,"hour"),rt("h",["hh",2],0,di),rt("k",["kk",2],0,Nd),rt("hmm",0,0,function(){return""+di.apply(this)+Ie(this.minutes(),2)}),rt("hmmss",0,0,function(){return""+di.apply(this)+Ie(this.minutes(),2)+Ie(this.seconds(),2)}),rt("Hmm",0,0,function(){return""+this.hours()+Ie(this.minutes(),2)}),rt("Hmmss",0,0,function(){return""+this.hours()+Ie(this.minutes(),2)+Ie(this.seconds(),2)});function Ds(o,t){rt(o,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ds("a",!0),Ds("A",!1);function Us(o,t){return t._meridiemParse}it("a",Us),it("A",Us),it("H",Nt,si),it("h",Nt,un),it("k",Nt,un),it("HH",Nt,jt),it("hh",Nt,jt),it("kk",Nt,jt),it("hmm",Cs),it("hmmss",Ss),it("Hmm",Cs),it("Hmmss",Ss),Et(["H","HH"],vt),Et(["k","kk"],function(o,t,e){var n=ft(o);t[vt]=n===24?0:n}),Et(["a","A"],function(o,t,e){e._isPm=e._locale.isPM(o),e._meridiem=o}),Et(["h","hh"],function(o,t,e){t[vt]=ft(o),Rt(e).bigHour=!0}),Et("hmm",function(o,t,e){var n=o.length-2;t[vt]=ft(o.substr(0,n)),t[ae]=ft(o.substr(n)),Rt(e).bigHour=!0}),Et("hmmss",function(o,t,e){var n=o.length-4,i=o.length-2;t[vt]=ft(o.substr(0,n)),t[ae]=ft(o.substr(n,2)),t[Ee]=ft(o.substr(i)),Rt(e).bigHour=!0}),Et("Hmm",function(o,t,e){var n=o.length-2;t[vt]=ft(o.substr(0,n)),t[ae]=ft(o.substr(n))}),Et("Hmmss",function(o,t,e){var n=o.length-4,i=o.length-2;t[vt]=ft(o.substr(0,n)),t[ae]=ft(o.substr(n,2)),t[Ee]=ft(o.substr(i))});function Fd(o){return(o+"").toLowerCase().charAt(0)==="p"}var yd=/[ap]\.?m?\.?/i,bd=Rn("Hours",!0);function Wd(o,t,e){return o>11?e?"pm":"PM":e?"am":"AM"}var ws={calendar:Ic,longDateFormat:Cc,invalidDate:Ec,ordinal:Nc,dayOfMonthOrdinalParse:Fc,relativeTime:bc,months:kc,monthsShort:Ns,week:sd,weekdays:Rd,weekdaysMin:hd,weekdaysShort:Ys,meridiemParse:yd},Wt={},bn={},Wn;function Vd(o,t){var e,n=Math.min(o.length,t.length);for(e=0;e<n;e+=1)if(o[e]!==t[e])return e;return n}function Zs(o){return o&&o.toLowerCase().replace("_","-")}function Yd(o){for(var t=0,e,n,i,r;t<o.length;){for(r=Zs(o[t]).split("-"),e=r.length,n=Zs(o[t+1]),n=n?n.split("-"):null;e>0;){if(i=oo(r.slice(0,e).join("-")),i)return i;if(n&&n.length>=e&&Vd(r,n)>=e-1)break;e--}t++}return Wn}function Dd(o){return!!(o&&o.match("^[^/\\\\]*$"))}function oo(o){var t=null,e;if(Wt[o]===void 0&&typeof module<"u"&&module&&module.exports&&Dd(o))try{t=Wn._abbr,e=require,e("./locale/"+o),Ze(t)}catch{Wt[o]=null}return Wt[o]}function Ze(o,t){var e;return o&&(Jt(t)?e=Ne(o):e=ui(o,t),e?Wn=e:typeof console<"u"&&console.warn&&console.warn("Locale "+o+" not found. Did you forget to load it?")),Wn._abbr}function ui(o,t){if(t!==null){var e,n=ws;if(t.abbr=o,Wt[o]!=null)Ls("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Wt[o]._config;else if(t.parentLocale!=null)if(Wt[t.parentLocale]!=null)n=Wt[t.parentLocale]._config;else if(e=oo(t.parentLocale),e!=null)n=e._config;else return bn[t.parentLocale]||(bn[t.parentLocale]=[]),bn[t.parentLocale].push({name:o,config:t}),null;return Wt[o]=new jo(zo(n,t)),bn[o]&&bn[o].forEach(function(i){ui(i.name,i.config)}),Ze(o),Wt[o]}else return delete Wt[o],null}function Ud(o,t){if(t!=null){var e,n,i=ws;Wt[o]!=null&&Wt[o].parentLocale!=null?Wt[o].set(zo(Wt[o]._config,t)):(n=oo(o),n!=null&&(i=n._config),t=zo(i,t),n==null&&(t.abbr=o),e=new jo(t),e.parentLocale=Wt[o],Wt[o]=e),Ze(o)}else Wt[o]!=null&&(Wt[o].parentLocale!=null?(Wt[o]=Wt[o].parentLocale,o===Ze()&&Ze(o)):Wt[o]!=null&&delete Wt[o]);return Wt[o]}function Ne(o){var t;if(o&&o._locale&&o._locale._abbr&&(o=o._locale._abbr),!o)return Wn;if(!re(o)){if(t=oo(o),t)return t;o=[o]}return Yd(o)}function wd(){return qo(Wt)}function Ri(o){var t,e=o._a;return e&&Rt(o).overflow===-2&&(t=e[Se]<0||e[Se]>11?Se:e[Pe]<1||e[Pe]>li(e[Gt],e[Se])?Pe:e[vt]<0||e[vt]>24||e[vt]===24&&(e[ae]!==0||e[Ee]!==0||e[Ae]!==0)?vt:e[ae]<0||e[ae]>59?ae:e[Ee]<0||e[Ee]>59?Ee:e[Ae]<0||e[Ae]>999?Ae:-1,Rt(o)._overflowDayOfYear&&(t<Gt||t>Pe)&&(t=Pe),Rt(o)._overflowWeeks&&t===-1&&(t=Kc),Rt(o)._overflowWeekday&&t===-1&&(t=Hc),Rt(o).overflow=t),o}var Zd=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Qd=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vd=/Z|[+-]\d\d(?::?\d\d)?/,io=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],hi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Kd=/^\/?Date\((-?\d+)/i,Hd=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,_d={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Qs(o){var t,e,n=o._i,i=Zd.exec(n)||Qd.exec(n),r,s,a,c,d=io.length,u=hi.length;if(i){for(Rt(o).iso=!0,t=0,e=d;t<e;t++)if(io[t][1].exec(i[1])){s=io[t][0],r=io[t][2]!==!1;break}if(s==null){o._isValid=!1;return}if(i[3]){for(t=0,e=u;t<e;t++)if(hi[t][1].exec(i[3])){a=(i[2]||" ")+hi[t][0];break}if(a==null){o._isValid=!1;return}}if(!r&&a!=null){o._isValid=!1;return}if(i[4])if(vd.exec(i[4]))c="Z";else{o._isValid=!1;return}o._f=s+(a||"")+(c||""),fi(o)}else o._isValid=!1}function xd(o,t,e,n,i,r){var s=[Gd(o),Ns.indexOf(t),parseInt(e,10),parseInt(n,10),parseInt(i,10)];return r&&s.push(parseInt(r,10)),s}function Gd(o){var t=parseInt(o,10);return t<=49?2e3+t:t<=999?1900+t:t}function Ad(o){return o.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function kd(o,t,e){if(o){var n=Ys.indexOf(o),i=new Date(t[0],t[1],t[2]).getDay();if(n!==i)return Rt(e).weekdayMismatch=!0,e._isValid=!1,!1}return!0}function Jd(o,t,e){if(o)return _d[o];if(t)return 0;var n=parseInt(e,10),i=n%100,r=(n-i)/100;return r*60+i}function vs(o){var t=Hd.exec(Ad(o._i)),e;if(t){if(e=xd(t[4],t[3],t[2],t[5],t[6],t[7]),!kd(t[1],e,o))return;o._a=e,o._tzm=Jd(t[8],t[9],t[10]),o._d=Fn.apply(null,o._a),o._d.setUTCMinutes(o._d.getUTCMinutes()-o._tzm),Rt(o).rfc2822=!0}else o._isValid=!1}function Bd(o){var t=Kd.exec(o._i);if(t!==null){o._d=new Date(+t[1]);return}if(Qs(o),o._isValid===!1)delete o._isValid;else return;if(vs(o),o._isValid===!1)delete o._isValid;else return;o._strict?o._isValid=!1:j.createFromInputFallback(o)}j.createFromInputFallback=ee("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(o){o._d=new Date(o._i+(o._useUTC?" UTC":""))});function hn(o,t,e){return o??t??e}function $d(o){var t=new Date(j.now());return o._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function gi(o){var t,e,n=[],i,r,s;if(!o._d){for(i=$d(o),o._w&&o._a[Pe]==null&&o._a[Se]==null&&zd(o),o._dayOfYear!=null&&(s=hn(o._a[Gt],i[Gt]),(o._dayOfYear>Xn(s)||o._dayOfYear===0)&&(Rt(o)._overflowDayOfYear=!0),e=Fn(s,0,o._dayOfYear),o._a[Se]=e.getUTCMonth(),o._a[Pe]=e.getUTCDate()),t=0;t<3&&o._a[t]==null;++t)o._a[t]=n[t]=i[t];for(;t<7;t++)o._a[t]=n[t]=o._a[t]==null?t===2?1:0:o._a[t];o._a[vt]===24&&o._a[ae]===0&&o._a[Ee]===0&&o._a[Ae]===0&&(o._nextDay=!0,o._a[vt]=0),o._d=(o._useUTC?Fn:od).apply(null,n),r=o._useUTC?o._d.getUTCDay():o._d.getDay(),o._tzm!=null&&o._d.setUTCMinutes(o._d.getUTCMinutes()-o._tzm),o._nextDay&&(o._a[vt]=24),o._w&&typeof o._w.d<"u"&&o._w.d!==r&&(Rt(o).weekdayMismatch=!0)}}function zd(o){var t,e,n,i,r,s,a,c,d;t=o._w,t.GG!=null||t.W!=null||t.E!=null?(r=1,s=4,e=hn(t.GG,o._a[Gt],yn(Ft(),1,4).year),n=hn(t.W,1),i=hn(t.E,1),(i<1||i>7)&&(c=!0)):(r=o._locale._week.dow,s=o._locale._week.doy,d=yn(Ft(),r,s),e=hn(t.gg,o._a[Gt],d.year),n=hn(t.w,d.week),t.d!=null?(i=t.d,(i<0||i>6)&&(c=!0)):t.e!=null?(i=t.e+r,(t.e<0||t.e>6)&&(c=!0)):i=r),n<1||n>Xe(e,r,s)?Rt(o)._overflowWeeks=!0:c!=null?Rt(o)._overflowWeekday=!0:(a=Vs(e,n,i,r,s),o._a[Gt]=a.year,o._dayOfYear=a.dayOfYear)}j.ISO_8601=function(){},j.RFC_2822=function(){};function fi(o){if(o._f===j.ISO_8601){Qs(o);return}if(o._f===j.RFC_2822){vs(o);return}o._a=[],Rt(o).empty=!0;var t=""+o._i,e,n,i,r,s,a=t.length,c=0,d,u;for(i=Is(o._f,o._locale).match(ti)||[],u=i.length,e=0;e<u;e++)r=i[e],n=(t.match(Zc(r,o))||[])[0],n&&(s=t.substr(0,t.indexOf(n)),s.length>0&&Rt(o).unusedInput.push(s),t=t.slice(t.indexOf(n)+n.length),c+=n.length),cn[r]?(n?Rt(o).empty=!1:Rt(o).unusedTokens.push(r),vc(r,n,o)):o._strict&&!n&&Rt(o).unusedTokens.push(r);Rt(o).charsLeftOver=a-c,t.length>0&&Rt(o).unusedInput.push(t),o._a[vt]<=12&&Rt(o).bigHour===!0&&o._a[vt]>0&&(Rt(o).bigHour=void 0),Rt(o).parsedDateParts=o._a.slice(0),Rt(o).meridiem=o._meridiem,o._a[vt]=jd(o._locale,o._a[vt],o._meridiem),d=Rt(o).era,d!==null&&(o._a[Gt]=o._locale.erasConvertYear(d,o._a[Gt])),gi(o),Ri(o)}function jd(o,t,e){var n;return e==null?t:o.meridiemHour!=null?o.meridiemHour(t,e):(o.isPM!=null&&(n=o.isPM(e),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function qd(o){var t,e,n,i,r,s,a=!1,c=o._f.length;if(c===0){Rt(o).invalidFormat=!0,o._d=new Date(NaN);return}for(i=0;i<c;i++)r=0,s=!1,t=$o({},o),o._useUTC!=null&&(t._useUTC=o._useUTC),t._f=o._f[i],fi(t),Jo(t)&&(s=!0),r+=Rt(t).charsLeftOver,r+=Rt(t).unusedTokens.length*10,Rt(t).score=r,a?r<n&&(n=r,e=t):(n==null||r<n||s)&&(n=r,e=t,s&&(a=!0));we(o,e||t)}function tu(o){if(!o._d){var t=ni(o._i),e=t.day===void 0?t.date:t.day;o._a=fs([t.year,t.month,e,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),gi(o)}}function eu(o){var t=new Cn(Ri(Ks(o)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Ks(o){var t=o._i,e=o._f;return o._locale=o._locale||Ne(o._l),t===null||e===void 0&&t===""?An({nullInput:!0}):(typeof t=="string"&&(o._i=t=o._locale.preparse(t)),le(t)?new Cn(Ri(t)):(On(t)?o._d=t:re(e)?qd(o):e?fi(o):nu(o),Jo(o)||(o._d=null),o))}function nu(o){var t=o._i;Jt(t)?o._d=new Date(j.now()):On(t)?o._d=new Date(t.valueOf()):typeof t=="string"?Bd(o):re(t)?(o._a=fs(t.slice(0),function(e){return parseInt(e,10)}),gi(o)):Ge(t)?tu(o):Oe(t)?o._d=new Date(t):j.createFromInputFallback(o)}function Hs(o,t,e,n,i){var r={};return(t===!0||t===!1)&&(n=t,t=void 0),(e===!0||e===!1)&&(n=e,e=void 0),(Ge(o)&&Ao(o)||re(o)&&o.length===0)&&(o=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=e,r._i=o,r._f=t,r._strict=n,eu(r)}function Ft(o,t,e,n){return Hs(o,t,e,n,!1)}var ou=ee("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var o=Ft.apply(null,arguments);return this.isValid()&&o.isValid()?o<this?this:o:An()}),iu=ee("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var o=Ft.apply(null,arguments);return this.isValid()&&o.isValid()?o>this?this:o:An()});function _s(o,t){var e,n;if(t.length===1&&re(t[0])&&(t=t[0]),!t.length)return Ft();for(e=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][o](e))&&(e=t[n]);return e}function su(){var o=[].slice.call(arguments,0);return _s("isBefore",o)}function ru(){var o=[].slice.call(arguments,0);return _s("isAfter",o)}var lu=function(){return Date.now?Date.now():+new Date},Vn=["year","quarter","month","week","day","hour","minute","second","millisecond"];function au(o){var t,e=!1,n,i=Vn.length;for(t in o)if(Ot(o,t)&&!(Zt.call(Vn,t)!==-1&&(o[t]==null||!isNaN(o[t]))))return!1;for(n=0;n<i;++n)if(o[Vn[n]]){if(e)return!1;parseFloat(o[Vn[n]])!==ft(o[Vn[n]])&&(e=!0)}return!0}function cu(){return this._isValid}function du(){return ce(NaN)}function so(o){var t=ni(o),e=t.year||0,n=t.quarter||0,i=t.month||0,r=t.week||t.isoWeek||0,s=t.day||0,a=t.hour||0,c=t.minute||0,d=t.second||0,u=t.millisecond||0;this._isValid=au(t),this._milliseconds=+u+d*1e3+c*6e4+a*1e3*60*60,this._days=+s+r*7,this._months=+i+n*3+e*12,this._data={},this._locale=Ne(),this._bubble()}function ro(o){return o instanceof so}function Ti(o){return o<0?Math.round(-1*o)*-1:Math.round(o)}function uu(o,t,e){var n=Math.min(o.length,t.length),i=Math.abs(o.length-t.length),r=0,s;for(s=0;s<n;s++)ft(o[s])!==ft(t[s])&&r++;return r+i}function xs(o,t){rt(o,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+Ie(~~(e/60),2)+t+Ie(~~e%60,2)})}xs("Z",":"),xs("ZZ",""),it("Z",qn),it("ZZ",qn),Et(["Z","ZZ"],function(o,t,e){e._useUTC=!0,e._tzm=mi(qn,o)});var Ru=/([\+\-]|\d\d)/gi;function mi(o,t){var e=(t||"").match(o),n,i,r;return e===null?null:(n=e[e.length-1]||[],i=(n+"").match(Ru)||["-",0,0],r=+(i[1]*60)+ft(i[2]),r===0?0:i[0]==="+"?r:-r)}function pi(o,t){var e,n;return t._isUTC?(e=t.clone(),n=(le(o)||On(o)?o.valueOf():Ft(o).valueOf())-e.valueOf(),e._d.setTime(e._d.valueOf()+n),j.updateOffset(e,!1),e):Ft(o).local()}function Li(o){return-Math.round(o._d.getTimezoneOffset())}j.updateOffset=function(){};function hu(o,t,e){var n=this._offset||0,i;if(!this.isValid())return o!=null?this:NaN;if(o!=null){if(typeof o=="string"){if(o=mi(qn,o),o===null)return this}else Math.abs(o)<16&&!e&&(o=o*60);return!this._isUTC&&t&&(i=Li(this)),this._offset=o,this._isUTC=!0,i!=null&&this.add(i,"m"),n!==o&&(!t||this._changeInProgress?Js(this,ce(o-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,j.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:Li(this)}function gu(o,t){return o!=null?(typeof o!="string"&&(o=-o),this.utcOffset(o,t),this):-this.utcOffset()}function fu(o){return this.utcOffset(0,o)}function Tu(o){return this._isUTC&&(this.utcOffset(0,o),this._isUTC=!1,o&&this.subtract(Li(this),"m")),this}function mu(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var o=mi(Uc,this._i);o!=null?this.utcOffset(o):this.utcOffset(0,!0)}return this}function pu(o){return this.isValid()?(o=o?Ft(o).utcOffset():0,(this.utcOffset()-o)%60===0):!1}function Lu(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Iu(){if(!Jt(this._isDSTShifted))return this._isDSTShifted;var o={},t;return $o(o,this),o=Ks(o),o._a?(t=o._isUTC?pe(o._a):Ft(o._a),this._isDSTShifted=this.isValid()&&uu(o._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Pu(){return this.isValid()?!this._isUTC:!1}function Mu(){return this.isValid()?this._isUTC:!1}function Gs(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Ou=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Cu=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ce(o,t){var e=o,n=null,i,r,s;return ro(o)?e={ms:o._milliseconds,d:o._days,M:o._months}:Oe(o)||!isNaN(+o)?(e={},t?e[t]=+o:e.milliseconds=+o):(n=Ou.exec(o))?(i=n[1]==="-"?-1:1,e={y:0,d:ft(n[Pe])*i,h:ft(n[vt])*i,m:ft(n[ae])*i,s:ft(n[Ee])*i,ms:ft(Ti(n[Ae]*1e3))*i}):(n=Cu.exec(o))?(i=n[1]==="-"?-1:1,e={y:ke(n[2],i),M:ke(n[3],i),w:ke(n[4],i),d:ke(n[5],i),h:ke(n[6],i),m:ke(n[7],i),s:ke(n[8],i)}):e==null?e={}:typeof e=="object"&&("from"in e||"to"in e)&&(s=Su(Ft(e.from),Ft(e.to)),e={},e.ms=s.milliseconds,e.M=s.months),r=new so(e),ro(o)&&Ot(o,"_locale")&&(r._locale=o._locale),ro(o)&&Ot(o,"_isValid")&&(r._isValid=o._isValid),r}ce.fn=so.prototype,ce.invalid=du;function ke(o,t){var e=o&&parseFloat(o.replace(",","."));return(isNaN(e)?0:e)*t}function As(o,t){var e={};return e.months=t.month()-o.month()+(t.year()-o.year())*12,o.clone().add(e.months,"M").isAfter(t)&&--e.months,e.milliseconds=+t-+o.clone().add(e.months,"M"),e}function Su(o,t){var e;return o.isValid()&&t.isValid()?(t=pi(t,o),o.isBefore(t)?e=As(o,t):(e=As(t,o),e.milliseconds=-e.milliseconds,e.months=-e.months),e):{milliseconds:0,months:0}}function ks(o,t){return function(e,n){var i,r;return n!==null&&!isNaN(+n)&&(Ls(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=e,e=n,n=r),i=ce(e,n),Js(this,i,o),this}}function Js(o,t,e,n){var i=t._milliseconds,r=Ti(t._days),s=Ti(t._months);o.isValid()&&(n=n??!0,s&&ys(o,Nn(o,"Month")+s*e),r&&Xs(o,"Date",Nn(o,"Date")+r*e),i&&o._d.setTime(o._d.valueOf()+i*e),n&&j.updateOffset(o,r||s))}var Eu=ks(1,"add"),Xu=ks(-1,"subtract");function Bs(o){return typeof o=="string"||o instanceof String}function Nu(o){return le(o)||On(o)||Bs(o)||Oe(o)||yu(o)||Fu(o)||o===null||o===void 0}function Fu(o){var t=Ge(o)&&!Ao(o),e=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,r,s=n.length;for(i=0;i<s;i+=1)r=n[i],e=e||Ot(o,r);return t&&e}function yu(o){var t=re(o),e=!1;return t&&(e=o.filter(function(n){return!Oe(n)&&Bs(o)}).length===0),t&&e}function bu(o){var t=Ge(o)&&!Ao(o),e=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,r;for(i=0;i<n.length;i+=1)r=n[i],e=e||Ot(o,r);return t&&e}function Wu(o,t){var e=o.diff(t,"days",!0);return e<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse"}function Vu(o,t){arguments.length===1&&(arguments[0]?Nu(arguments[0])?(o=arguments[0],t=void 0):bu(arguments[0])&&(t=arguments[0],o=void 0):(o=void 0,t=void 0));var e=o||Ft(),n=pi(e,this).startOf("day"),i=j.calendarFormat(this,n)||"sameElse",r=t&&(Le(t[i])?t[i].call(this,e):t[i]);return this.format(r||this.localeData().calendar(i,this,Ft(e)))}function Yu(){return new Cn(this)}function Du(o,t){var e=le(o)?o:Ft(o);return this.isValid()&&e.isValid()?(t=ne(t)||"millisecond",t==="millisecond"?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf()):!1}function Uu(o,t){var e=le(o)?o:Ft(o);return this.isValid()&&e.isValid()?(t=ne(t)||"millisecond",t==="millisecond"?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf()):!1}function wu(o,t,e,n){var i=le(o)?o:Ft(o),r=le(t)?t:Ft(t);return this.isValid()&&i.isValid()&&r.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(i,e):!this.isBefore(i,e))&&(n[1]===")"?this.isBefore(r,e):!this.isAfter(r,e))):!1}function Zu(o,t){var e=le(o)?o:Ft(o),n;return this.isValid()&&e.isValid()?(t=ne(t)||"millisecond",t==="millisecond"?this.valueOf()===e.valueOf():(n=e.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function Qu(o,t){return this.isSame(o,t)||this.isAfter(o,t)}function vu(o,t){return this.isSame(o,t)||this.isBefore(o,t)}function Ku(o,t,e){var n,i,r;if(!this.isValid())return NaN;if(n=pi(o,this),!n.isValid())return NaN;switch(i=(n.utcOffset()-this.utcOffset())*6e4,t=ne(t),t){case"year":r=lo(this,n)/12;break;case"month":r=lo(this,n);break;case"quarter":r=lo(this,n)/3;break;case"second":r=(this-n)/1e3;break;case"minute":r=(this-n)/6e4;break;case"hour":r=(this-n)/36e5;break;case"day":r=(this-n-i)/864e5;break;case"week":r=(this-n-i)/6048e5;break;default:r=this-n}return e?r:oe(r)}function lo(o,t){if(o.date()<t.date())return-lo(t,o);var e=(t.year()-o.year())*12+(t.month()-o.month()),n=o.clone().add(e,"months"),i,r;return t-n<0?(i=o.clone().add(e-1,"months"),r=(t-n)/(n-i)):(i=o.clone().add(e+1,"months"),r=(t-n)/(i-n)),-(e+r)||0}j.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",j.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Hu(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function _u(o){if(!this.isValid())return null;var t=o!==!0,e=t?this.clone().utc():this;return e.year()<0||e.year()>9999?Jn(e,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Le(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Jn(e,"Z")):Jn(e,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function xu(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var o="moment",t="",e,n,i,r;return this.isLocal()||(o=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),e="["+o+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",r=t+'[")]',this.format(e+n+i+r)}function Gu(o){o||(o=this.isUtc()?j.defaultFormatUtc:j.defaultFormat);var t=Jn(this,o);return this.localeData().postformat(t)}function Au(o,t){return this.isValid()&&(le(o)&&o.isValid()||Ft(o).isValid())?ce({to:this,from:o}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ku(o){return this.from(Ft(),o)}function Ju(o,t){return this.isValid()&&(le(o)&&o.isValid()||Ft(o).isValid())?ce({from:this,to:o}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Bu(o){return this.to(Ft(),o)}function $s(o){var t;return o===void 0?this._locale._abbr:(t=Ne(o),t!=null&&(this._locale=t),this)}var zs=ee("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(o){return o===void 0?this.localeData():this.locale(o)});function js(){return this._locale}var ao=1e3,gn=60*ao,co=60*gn,qs=(365*400+97)*24*co;function fn(o,t){return(o%t+t)%t}function tr(o,t,e){return o<100&&o>=0?new Date(o+400,t,e)-qs:new Date(o,t,e).valueOf()}function er(o,t,e){return o<100&&o>=0?Date.UTC(o+400,t,e)-qs:Date.UTC(o,t,e)}function $u(o){var t,e;if(o=ne(o),o===void 0||o==="millisecond"||!this.isValid())return this;switch(e=this._isUTC?er:tr,o){case"year":t=e(this.year(),0,1);break;case"quarter":t=e(this.year(),this.month()-this.month()%3,1);break;case"month":t=e(this.year(),this.month(),1);break;case"week":t=e(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=e(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=e(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fn(t+(this._isUTC?0:this.utcOffset()*gn),co);break;case"minute":t=this._d.valueOf(),t-=fn(t,gn);break;case"second":t=this._d.valueOf(),t-=fn(t,ao);break}return this._d.setTime(t),j.updateOffset(this,!0),this}function zu(o){var t,e;if(o=ne(o),o===void 0||o==="millisecond"||!this.isValid())return this;switch(e=this._isUTC?er:tr,o){case"year":t=e(this.year()+1,0,1)-1;break;case"quarter":t=e(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=e(this.year(),this.month()+1,1)-1;break;case"week":t=e(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=e(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=e(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=co-fn(t+(this._isUTC?0:this.utcOffset()*gn),co)-1;break;case"minute":t=this._d.valueOf(),t+=gn-fn(t,gn)-1;break;case"second":t=this._d.valueOf(),t+=ao-fn(t,ao)-1;break}return this._d.setTime(t),j.updateOffset(this,!0),this}function ju(){return this._d.valueOf()-(this._offset||0)*6e4}function qu(){return Math.floor(this.valueOf()/1e3)}function tR(){return new Date(this.valueOf())}function eR(){var o=this;return[o.year(),o.month(),o.date(),o.hour(),o.minute(),o.second(),o.millisecond()]}function nR(){var o=this;return{years:o.year(),months:o.month(),date:o.date(),hours:o.hours(),minutes:o.minutes(),seconds:o.seconds(),milliseconds:o.milliseconds()}}function oR(){return this.isValid()?this.toISOString():null}function iR(){return Jo(this)}function sR(){return we({},Rt(this))}function rR(){return Rt(this).overflow}function lR(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}rt("N",0,0,"eraAbbr"),rt("NN",0,0,"eraAbbr"),rt("NNN",0,0,"eraAbbr"),rt("NNNN",0,0,"eraName"),rt("NNNNN",0,0,"eraNarrow"),rt("y",["y",1],"yo","eraYear"),rt("y",["yy",2],0,"eraYear"),rt("y",["yyy",3],0,"eraYear"),rt("y",["yyyy",4],0,"eraYear"),it("N",Ii),it("NN",Ii),it("NNN",Ii),it("NNNN",pR),it("NNNNN",LR),Et(["N","NN","NNN","NNNN","NNNNN"],function(o,t,e,n){var i=e._locale.erasParse(o,n,e._strict);i?Rt(e).era=i:Rt(e).invalidEra=o}),it("y",dn),it("yy",dn),it("yyy",dn),it("yyyy",dn),it("yo",IR),Et(["y","yy","yyy","yyyy"],Gt),Et(["yo"],function(o,t,e,n){var i;e._locale._eraYearOrdinalRegex&&(i=o.match(e._locale._eraYearOrdinalRegex)),e._locale.eraYearOrdinalParse?t[Gt]=e._locale.eraYearOrdinalParse(o,i):t[Gt]=parseInt(o,10)});function aR(o,t){var e,n,i,r=this._eras||Ne("en")._eras;for(e=0,n=r.length;e<n;++e)switch(typeof r[e].since==="string"&&(i=j(r[e].since).startOf("day"),r[e].since=i.valueOf()),typeof r[e].until){case"undefined":r[e].until=1/0;break;case"string":i=j(r[e].until).startOf("day").valueOf(),r[e].until=i.valueOf();break}return r}function cR(o,t,e){var n,i,r=this.eras(),s,a,c;for(o=o.toUpperCase(),n=0,i=r.length;n<i;++n)if(s=r[n].name.toUpperCase(),a=r[n].abbr.toUpperCase(),c=r[n].narrow.toUpperCase(),e)switch(t){case"N":case"NN":case"NNN":if(a===o)return r[n];break;case"NNNN":if(s===o)return r[n];break;case"NNNNN":if(c===o)return r[n];break}else if([s,a,c].indexOf(o)>=0)return r[n]}function dR(o,t){var e=o.since<=o.until?1:-1;return t===void 0?j(o.since).year():j(o.since).year()+(t-o.offset)*e}function uR(){var o,t,e,n=this.localeData().eras();for(o=0,t=n.length;o<t;++o)if(e=this.clone().startOf("day").valueOf(),n[o].since<=e&&e<=n[o].until||n[o].until<=e&&e<=n[o].since)return n[o].name;return""}function RR(){var o,t,e,n=this.localeData().eras();for(o=0,t=n.length;o<t;++o)if(e=this.clone().startOf("day").valueOf(),n[o].since<=e&&e<=n[o].until||n[o].until<=e&&e<=n[o].since)return n[o].narrow;return""}function hR(){var o,t,e,n=this.localeData().eras();for(o=0,t=n.length;o<t;++o)if(e=this.clone().startOf("day").valueOf(),n[o].since<=e&&e<=n[o].until||n[o].until<=e&&e<=n[o].since)return n[o].abbr;return""}function gR(){var o,t,e,n,i=this.localeData().eras();for(o=0,t=i.length;o<t;++o)if(e=i[o].since<=i[o].until?1:-1,n=this.clone().startOf("day").valueOf(),i[o].since<=n&&n<=i[o].until||i[o].until<=n&&n<=i[o].since)return(this.year()-j(i[o].since).year())*e+i[o].offset;return this.year()}function fR(o){return Ot(this,"_erasNameRegex")||Pi.call(this),o?this._erasNameRegex:this._erasRegex}function TR(o){return Ot(this,"_erasAbbrRegex")||Pi.call(this),o?this._erasAbbrRegex:this._erasRegex}function mR(o){return Ot(this,"_erasNarrowRegex")||Pi.call(this),o?this._erasNarrowRegex:this._erasRegex}function Ii(o,t){return t.erasAbbrRegex(o)}function pR(o,t){return t.erasNameRegex(o)}function LR(o,t){return t.erasNarrowRegex(o)}function IR(o,t){return t._eraYearOrdinalRegex||dn}function Pi(){var o=[],t=[],e=[],n=[],i,r,s,a,c,d=this.eras();for(i=0,r=d.length;i<r;++i)s=Ce(d[i].name),a=Ce(d[i].abbr),c=Ce(d[i].narrow),t.push(s),o.push(a),e.push(c),n.push(s),n.push(a),n.push(c);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+e.join("|")+")","i")}rt(0,["gg",2],0,function(){return this.weekYear()%100}),rt(0,["GG",2],0,function(){return this.isoWeekYear()%100});function uo(o,t){rt(0,[o,o.length],0,t)}uo("gggg","weekYear"),uo("ggggg","weekYear"),uo("GGGG","isoWeekYear"),uo("GGGGG","isoWeekYear"),it("G",jn),it("g",jn),it("GG",Nt,jt),it("gg",Nt,jt),it("GGGG",ii,oi),it("gggg",ii,oi),it("GGGGG",zn,Bn),it("ggggg",zn,Bn),En(["gggg","ggggg","GGGG","GGGGG"],function(o,t,e,n){t[n.substr(0,2)]=ft(o)}),En(["gg","GG"],function(o,t,e,n){t[n]=j.parseTwoDigitYear(o)});function PR(o){return nr.call(this,o,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function MR(o){return nr.call(this,o,this.isoWeek(),this.isoWeekday(),1,4)}function OR(){return Xe(this.year(),1,4)}function CR(){return Xe(this.isoWeekYear(),1,4)}function SR(){var o=this.localeData()._week;return Xe(this.year(),o.dow,o.doy)}function ER(){var o=this.localeData()._week;return Xe(this.weekYear(),o.dow,o.doy)}function nr(o,t,e,n,i){var r;return o==null?yn(this,n,i).year:(r=Xe(o,n,i),t>r&&(t=r),XR.call(this,o,t,e,n,i))}function XR(o,t,e,n,i){var r=Vs(o,t,e,n,i),s=Fn(r.year,0,r.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}rt("Q",0,"Qo","quarter"),it("Q",Ms),Et("Q",function(o,t){t[Se]=(ft(o)-1)*3});function NR(o){return o==null?Math.ceil((this.month()+1)/3):this.month((o-1)*3+this.month()%3)}rt("D",["DD",2],"Do","date"),it("D",Nt,un),it("DD",Nt,jt),it("Do",function(o,t){return o?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Et(["D","DD"],Pe),Et("Do",function(o,t){t[Pe]=ft(o.match(Nt)[0])});var or=Rn("Date",!0);rt("DDD",["DDDD",3],"DDDo","dayOfYear"),it("DDD",$n),it("DDDD",Os),Et(["DDD","DDDD"],function(o,t,e){e._dayOfYear=ft(o)});function FR(o){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return o==null?t:this.add(o-t,"d")}rt("m",["mm",2],0,"minute"),it("m",Nt,si),it("mm",Nt,jt),Et(["m","mm"],ae);var yR=Rn("Minutes",!1);rt("s",["ss",2],0,"second"),it("s",Nt,si),it("ss",Nt,jt),Et(["s","ss"],Ee);var bR=Rn("Seconds",!1);rt("S",0,0,function(){return~~(this.millisecond()/100)}),rt(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),rt(0,["SSS",3],0,"millisecond"),rt(0,["SSSS",4],0,function(){return this.millisecond()*10}),rt(0,["SSSSS",5],0,function(){return this.millisecond()*100}),rt(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),rt(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),rt(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),rt(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),it("S",$n,Ms),it("SS",$n,jt),it("SSS",$n,Os);var Qe,ir;for(Qe="SSSS";Qe.length<=9;Qe+="S")it(Qe,dn);function WR(o,t){t[Ae]=ft(("0."+o)*1e3)}for(Qe="S";Qe.length<=9;Qe+="S")Et(Qe,WR);ir=Rn("Milliseconds",!1),rt("z",0,0,"zoneAbbr"),rt("zz",0,0,"zoneName");function VR(){return this._isUTC?"UTC":""}function YR(){return this._isUTC?"Coordinated Universal Time":""}var k=Cn.prototype;k.add=Eu,k.calendar=Vu,k.clone=Yu,k.diff=Ku,k.endOf=zu,k.format=Gu,k.from=Au,k.fromNow=ku,k.to=Ju,k.toNow=Bu,k.get=xc,k.invalidAt=rR,k.isAfter=Du,k.isBefore=Uu,k.isBetween=wu,k.isSame=Zu,k.isSameOrAfter=Qu,k.isSameOrBefore=vu,k.isValid=iR,k.lang=zs,k.locale=$s,k.localeData=js,k.max=iu,k.min=ou,k.parsingFlags=sR,k.set=Gc,k.startOf=$u,k.subtract=Xu,k.toArray=eR,k.toObject=nR,k.toDate=tR,k.toISOString=_u,k.inspect=xu,typeof Symbol<"u"&&Symbol.for!=null&&(k[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),k.toJSON=oR,k.toString=Hu,k.unix=qu,k.valueOf=ju,k.creationData=lR,k.eraName=uR,k.eraNarrow=RR,k.eraAbbr=hR,k.eraYear=gR,k.year=Es,k.isLeapYear=_c,k.weekYear=PR,k.isoWeekYear=MR,k.quarter=k.quarters=NR,k.month=bs,k.daysInMonth=td,k.week=k.weeks=ad,k.isoWeek=k.isoWeeks=cd,k.weeksInYear=SR,k.weeksInWeekYear=ER,k.isoWeeksInYear=OR,k.isoWeeksInISOWeekYear=CR,k.date=or,k.day=k.days=Md,k.weekday=Od,k.isoWeekday=Cd,k.dayOfYear=FR,k.hour=k.hours=bd,k.minute=k.minutes=yR,k.second=k.seconds=bR,k.millisecond=k.milliseconds=ir,k.utcOffset=hu,k.utc=fu,k.local=Tu,k.parseZone=mu,k.hasAlignedHourOffset=pu,k.isDST=Lu,k.isLocal=Pu,k.isUtcOffset=Mu,k.isUtc=Gs,k.isUTC=Gs,k.zoneAbbr=VR,k.zoneName=YR,k.dates=ee("dates accessor is deprecated. Use date instead.",or),k.months=ee("months accessor is deprecated. Use month instead",bs),k.years=ee("years accessor is deprecated. Use year instead",Es),k.zone=ee("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gu),k.isDSTShifted=ee("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Iu);function DR(o){return Ft(o*1e3)}function UR(){return Ft.apply(null,arguments).parseZone()}function sr(o){return o}var Ct=jo.prototype;Ct.calendar=Pc,Ct.longDateFormat=Sc,Ct.invalidDate=Xc,Ct.ordinal=yc,Ct.preparse=sr,Ct.postformat=sr,Ct.relativeTime=Wc,Ct.pastFuture=Vc,Ct.set=Lc,Ct.eras=aR,Ct.erasParse=cR,Ct.erasConvertYear=dR,Ct.erasAbbrRegex=TR,Ct.erasNameRegex=fR,Ct.erasNarrowRegex=mR,Ct.months=$c,Ct.monthsShort=zc,Ct.monthsParse=qc,Ct.monthsRegex=nd,Ct.monthsShortRegex=ed,Ct.week=id,Ct.firstDayOfYear=ld,Ct.firstDayOfWeek=rd,Ct.weekdays=md,Ct.weekdaysMin=Ld,Ct.weekdaysShort=pd,Ct.weekdaysParse=Pd,Ct.weekdaysRegex=Sd,Ct.weekdaysShortRegex=Ed,Ct.weekdaysMinRegex=Xd,Ct.isPM=Fd,Ct.meridiem=Wd;function Ro(o,t,e,n){var i=Ne(),r=pe().set(n,t);return i[e](r,o)}function rr(o,t,e){if(Oe(o)&&(t=o,o=void 0),o=o||"",t!=null)return Ro(o,t,e,"month");var n,i=[];for(n=0;n<12;n++)i[n]=Ro(o,n,e,"month");return i}function Mi(o,t,e,n){typeof o=="boolean"?(Oe(t)&&(e=t,t=void 0),t=t||""):(t=o,e=t,o=!1,Oe(t)&&(e=t,t=void 0),t=t||"");var i=Ne(),r=o?i._week.dow:0,s,a=[];if(e!=null)return Ro(t,(e+r)%7,n,"day");for(s=0;s<7;s++)a[s]=Ro(t,(s+r)%7,n,"day");return a}function wR(o,t){return rr(o,t,"months")}function ZR(o,t){return rr(o,t,"monthsShort")}function QR(o,t,e){return Mi(o,t,e,"weekdays")}function vR(o,t,e){return Mi(o,t,e,"weekdaysShort")}function KR(o,t,e){return Mi(o,t,e,"weekdaysMin")}Ze("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(o){var t=o%10,e=ft(o%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return o+e}}),j.lang=ee("moment.lang is deprecated. Use moment.locale instead.",Ze),j.langData=ee("moment.langData is deprecated. Use moment.localeData instead.",Ne);var Fe=Math.abs;function HR(){var o=this._data;return this._milliseconds=Fe(this._milliseconds),this._days=Fe(this._days),this._months=Fe(this._months),o.milliseconds=Fe(o.milliseconds),o.seconds=Fe(o.seconds),o.minutes=Fe(o.minutes),o.hours=Fe(o.hours),o.months=Fe(o.months),o.years=Fe(o.years),this}function lr(o,t,e,n){var i=ce(t,e);return o._milliseconds+=n*i._milliseconds,o._days+=n*i._days,o._months+=n*i._months,o._bubble()}function _R(o,t){return lr(this,o,t,1)}function xR(o,t){return lr(this,o,t,-1)}function ar(o){return o<0?Math.floor(o):Math.ceil(o)}function GR(){var o=this._milliseconds,t=this._days,e=this._months,n=this._data,i,r,s,a,c;return o>=0&&t>=0&&e>=0||o<=0&&t<=0&&e<=0||(o+=ar(Oi(e)+t)*864e5,t=0,e=0),n.milliseconds=o%1e3,i=oe(o/1e3),n.seconds=i%60,r=oe(i/60),n.minutes=r%60,s=oe(r/60),n.hours=s%24,t+=oe(s/24),c=oe(cr(t)),e+=c,t-=ar(Oi(c)),a=oe(e/12),e%=12,n.days=t,n.months=e,n.years=a,this}function cr(o){return o*4800/146097}function Oi(o){return o*146097/4800}function AR(o){if(!this.isValid())return NaN;var t,e,n=this._milliseconds;if(o=ne(o),o==="month"||o==="quarter"||o==="year")switch(t=this._days+n/864e5,e=this._months+cr(t),o){case"month":return e;case"quarter":return e/3;case"year":return e/12}else switch(t=this._days+Math.round(Oi(this._months)),o){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+o)}}function ye(o){return function(){return this.as(o)}}var dr=ye("ms"),kR=ye("s"),JR=ye("m"),BR=ye("h"),$R=ye("d"),zR=ye("w"),jR=ye("M"),qR=ye("Q"),th=ye("y"),eh=dr;function nh(){return ce(this)}function oh(o){return o=ne(o),this.isValid()?this[o+"s"]():NaN}function Je(o){return function(){return this.isValid()?this._data[o]:NaN}}var ih=Je("milliseconds"),sh=Je("seconds"),rh=Je("minutes"),lh=Je("hours"),ah=Je("days"),ch=Je("months"),dh=Je("years");function uh(){return oe(this.days()/7)}var be=Math.round,Tn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Rh(o,t,e,n,i){return i.relativeTime(t||1,!!e,o,n)}function hh(o,t,e,n){var i=ce(o).abs(),r=be(i.as("s")),s=be(i.as("m")),a=be(i.as("h")),c=be(i.as("d")),d=be(i.as("M")),u=be(i.as("w")),R=be(i.as("y")),h=r<=e.ss&&["s",r]||r<e.s&&["ss",r]||s<=1&&["m"]||s<e.m&&["mm",s]||a<=1&&["h"]||a<e.h&&["hh",a]||c<=1&&["d"]||c<e.d&&["dd",c];return e.w!=null&&(h=h||u<=1&&["w"]||u<e.w&&["ww",u]),h=h||d<=1&&["M"]||d<e.M&&["MM",d]||R<=1&&["y"]||["yy",R],h[2]=t,h[3]=+o>0,h[4]=n,Rh.apply(null,h)}function gh(o){return o===void 0?be:typeof o=="function"?(be=o,!0):!1}function fh(o,t){return Tn[o]===void 0?!1:t===void 0?Tn[o]:(Tn[o]=t,o==="s"&&(Tn.ss=t-1),!0)}function Th(o,t){if(!this.isValid())return this.localeData().invalidDate();var e=!1,n=Tn,i,r;return typeof o=="object"&&(t=o,o=!1),typeof o=="boolean"&&(e=o),typeof t=="object"&&(n=Object.assign({},Tn,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),i=this.localeData(),r=hh(this,!e,n,i),e&&(r=i.pastFuture(+this,r)),i.postformat(r)}var Ci=Math.abs;function mn(o){return(o>0)-(o<0)||+o}function ho(){if(!this.isValid())return this.localeData().invalidDate();var o=Ci(this._milliseconds)/1e3,t=Ci(this._days),e=Ci(this._months),n,i,r,s,a=this.asSeconds(),c,d,u,R;return a?(n=oe(o/60),i=oe(n/60),o%=60,n%=60,r=oe(e/12),e%=12,s=o?o.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",d=mn(this._months)!==mn(a)?"-":"",u=mn(this._days)!==mn(a)?"-":"",R=mn(this._milliseconds)!==mn(a)?"-":"",c+"P"+(r?d+r+"Y":"")+(e?d+e+"M":"")+(t?u+t+"D":"")+(i||n||o?"T":"")+(i?R+i+"H":"")+(n?R+n+"M":"")+(o?R+s+"S":"")):"P0D"}var It=so.prototype;It.isValid=cu,It.abs=HR,It.add=_R,It.subtract=xR,It.as=AR,It.asMilliseconds=dr,It.asSeconds=kR,It.asMinutes=JR,It.asHours=BR,It.asDays=$R,It.asWeeks=zR,It.asMonths=jR,It.asQuarters=qR,It.asYears=th,It.valueOf=eh,It._bubble=GR,It.clone=nh,It.get=oh,It.milliseconds=ih,It.seconds=sh,It.minutes=rh,It.hours=lh,It.days=ah,It.weeks=uh,It.months=ch,It.years=dh,It.humanize=Th,It.toISOString=ho,It.toString=ho,It.toJSON=ho,It.locale=$s,It.localeData=js,It.toIsoString=ee("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ho),It.lang=zs,rt("X",0,0,"unix"),rt("x",0,0,"valueOf"),it("x",jn),it("X",wc),Et("X",function(o,t,e){e._d=new Date(parseFloat(o)*1e3)}),Et("x",function(o,t,e){e._d=new Date(ft(o))});j.version="2.30.1",mc(Ft),j.fn=k,j.min=su,j.max=ru,j.now=lu,j.utc=pe,j.unix=DR,j.months=wR,j.isDate=On,j.locale=Ze,j.invalid=An,j.duration=ce,j.isMoment=le,j.weekdays=QR,j.parseZone=UR,j.localeData=Ne,j.isDuration=ro,j.monthsShort=ZR,j.weekdaysMin=KR,j.defineLocale=ui,j.updateLocale=Ud,j.locales=wd,j.weekdaysShort=vR,j.normalizeUnits=ne,j.relativeTimeRounding=gh,j.relativeTimeThreshold=fh,j.calendarFormat=Wu,j.prototype=k,j.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};class Si{draws;ranges;element;control;options;position;constructor(t,e){const n=e.getDraw();this.draws=n,this.position=n.getPosition(),this.ranges=n.getRange(),this.options=n.getOptions(),this.element=t,this.control=e}setElement(t){this.element=t}getElement(){return this.element}getValue(t={}){const e=t.elementList||this.control.getElementList();let{startIndex:n}=t.range||this.control.getRange();const i=this.control.getDraw(),r=t?null:i.getTd();n>=e.length&&(n=e.length-1);const s=e[n],a=[];let c=r,d=e,u=n;for(;;){if(u<0&&c?.linkTdPrevId){const T=i.getTdById(c.linkTdPrevId);if(T){d=T.value,u=d.length-1,c=T;continue}}if(u<0)break;const f=d[u];if(f.controlId!==s.controlId||f.controlComponent===l.ControlComponent.PREFIX||f.controlComponent===l.ControlComponent.PRE_TEXT)break;f.controlComponent===l.ControlComponent.VALUE&&a.unshift(f),u--}c=r;let R=e,h=n+1;for(;;){if(h>=R.length&&c?.linkTdNextId){const T=i.getTdById(c.linkTdNextId);if(T){R=T.value,h=0,c=T;continue}}const f=R[h];if(!f||f.controlId!==s.controlId||f.controlComponent===l.ControlComponent.POSTFIX||f.controlComponent===l.ControlComponent.POST_TEXT)break;f.controlComponent===l.ControlComponent.VALUE&&a.push(f),h++}return a.filter(f=>f.type!==l.ElementType.SPLIT_TAG)}removeNextControlElement(t,e){const n=this.control.getDraw();if(e=e??n.getTd()?.linkTdNextId,e){const i=n.getTdById(e);if(i){if(i.value.length){if(i.value[1].controlId===t)return n.spliceElementList(i.value,1,1),i.value[1]}else if(i.linkTdNextId)return this.removeNextControlElement(t,i.linkTdNextId)}}}setValue(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return-1;const{elementList:i,range:r}=this.control.mergeControl(e);this.control.shrinkBoundary(e);const{startIndex:s,endIndex:a}=r,c=this.control.getDraw();s!==a?c.spliceElementList(i,s+1,a-s,[],{isIgnoreDeletedRule:n.isIgnoreDeletedRule}):this.control.removePlaceholder(s,{elementList:i});const d=i[s],u=d.controlId;this._removeControlPlaceholders(i,s);const R=d.type&&!zt.includes(d.type)||d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.PRE_TEXT?Dt(d,["control","controlId",...At]):se(d,["type"]),h=!!this.element.control?.underline,g=this.options.mode===l.EditorMode.FORM&&this.options.modeRule.form.inputTraceEnabled&&!h,f=r.startIndex+1,T=[],m=p=>{const I=T.length?T:i,L=T.length?T.length-1:r.startIndex;wt(I,[p],L,{editorOptions:this.options}),T.push(p)};for(let p=0;p<t.length;p++){const I=t[p];if(I.type===l.ElementType.CONTROL&&I.control){const L=I,P=L.controlId||lt(),C=L.control?.value||[],S=L.control?.type===l.ControlType.TEXTFIELD,F={...R,controlId:P,type:l.ElementType.CONTROL,control:L.control,originControlId:u},N=S?l.ControlComponent.PRETEXTFIX:l.ControlComponent.PREFIX,V=S?l.ControlComponent.POSTTEXTFIX:l.ControlComponent.POSTFIX,Y=S?L.control?.preTextFix||this.options.control.preTextFix:L.control?.prefix||this.options.control.prefix;for(let W=0;W<Y.length;W++){const X={...F,value:Y[W],controlComponent:N};m(X)}for(let W=0;W<C.length;W++){const X=C[W],O={...F,...X,controlComponent:l.ControlComponent.VALUE};(O.color===this.options.control.bracketColor||O.color===this.options.control.placeholderColor)&&(O.color=this.options.defaultColor),m(O)}if(C.length===0){const W=L.control?.placeholder||"";for(let X=0;X<W.length;X++){const O={...F,value:W[X],controlComponent:l.ControlComponent.PLACEHOLDER,color:this.options.control.placeholderColor};m(O)}}const E=S?L.control?.postTextFix||this.options.control.postTextFix:L.control?.postfix||this.options.control.postfix;for(let W=0;W<E.length;W++){const X={...F,value:E[W],controlComponent:V};m(X)}}else if(I.type||I.value){(d.controlComponent===l.ControlComponent.PRE_TEXT||d.controlComponent===l.ControlComponent.POST_TEXT||d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.POSTFIX)&&(R.color=this.options.defaultColor);const P={...R,...I,controlComponent:l.ControlComponent.VALUE};(P.color===this.options.control.bracketColor||P.color===this.options.control.placeholderColor||P.color===this.options.control.textFixColor)&&(P.color=this.options.defaultColor),P.strikeout&&delete P.strikeout,g&&(P.textDecoration={style:l.TextDecorationStyle.DOUBLE},P.underline=!0),m(P)}}return T.length&&c.spliceElementList(i,f,0,T),r.startIndex+T.length}_removeControlPlaceholders(t,e){const n=t[e];if(!n?.controlId)return;const i=a=>!!a&&a.controlId===n.controlId&&a.originControlId===n.originControlId;let r=e;for(;r>=0&&i(t[r]);)r--;let s=e+1;for(;s<t.length&&i(t[s]);)s++;for(let a=s-1;a>r;a--)t[a].controlComponent===l.ControlComponent.PLACEHOLDER&&t.splice(a,1)}clearValue(t={},e={}){if(!e.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return-1;const n=t.elementList||this.control.getElementList(),i=t.range||this.control.getValueRange()||this.control.getRange();this.control.shrinkBoundary(t);const{startIndex:r,endIndex:s}=i;return this.control.getDraw().spliceElementList(n,r+1,s-r,[],{isIgnoreDeletedRule:e.isIgnoreDeletedRule}),e.isAddPlaceholder!==!1&&(this.getValue(t).length||this.control.addPlaceholder(r,t)),r}keydown(t){if(this.control.getIsDisabledControl())return null;const e=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();const{startIndex:i,endIndex:r}=n,s=e[i],a=e[r],c=this.control.getDraw(),d=!!s.originControlId;if(t.key===l.KeyMap.Backspace)if(this.options.mode===l.EditorMode.FORM&&this.options.modeRule.form.deleteTraceEnabled&&!d){if(s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER)return i;this.strikeout()}else{if(s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER)return i;if(i!==r){c.spliceElementList(e,i+1,r-i);const R=e[i+1];return(R?.controlComponent===l.ControlComponent.POSTFIX||R?.controlComponent===l.ControlComponent.POST_TEXT||R?.controlComponent===l.ControlComponent.POSTTEXTFIX||R?.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)&&this.control.addPlaceholder(i),i===0&&e[0].type===l.ElementType.SPLIT_TAG?c.fixPosition(!0)??i:i}else{const R=e[i+1];return R?.controlComponent===l.ControlComponent.POSTFIX||R?.controlComponent===l.ControlComponent.POST_TEXT||R?.controlComponent===l.ControlComponent.POSTTEXTFIX||R?.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT?(c.spliceElementList(e,i,1),this.control.addPlaceholder(i-1),i-1):(c.spliceElementList(e,i,1),i===1&&e[0].type===l.ElementType.SPLIT_TAG||i===0?c.fixPosition(!0)??i-1:i-1)}}else if(t.key===l.KeyMap.Delete){const u=e[r+1],R=!!s.originControlId;if(this.options.mode===l.EditorMode.FORM&&this.options.modeRule.form.deleteTraceEnabled&&!R){if(a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POST_TEXT||a.controlComponent===l.ControlComponent.POSTTEXTFIX||a.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER)return r;if(u?.controlComponent===l.ControlComponent.POSTFIX||u?.controlComponent===l.ControlComponent.POST_TEXT||u?.controlComponent===l.ControlComponent.POSTTEXTFIX||u?.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)return c.spliceElementList(e,i+1,1),this.control.addPlaceholder(i),i;this.strikeout()}else{const g=e[r+1];return s.controlComponent===l.ControlComponent.PLACEHOLDER?r:g?.controlComponent===l.ControlComponent.POSTFIX||g?.controlComponent===l.ControlComponent.POST_TEXT||g?.controlComponent===l.ControlComponent.POSTTEXTFIX||g?.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT?(c.spliceElementList(e,i+1,1),this.control.addPlaceholder(i),i):i!==r?(c.spliceElementList(e,i+1,r-i),i===0&&e[0].type===l.ElementType.SPLIT_TAG?c.fixPosition(!0)??i:i):g?(c.spliceElementList(e,i+1,1),i===0&&e[0].type===l.ElementType.SPLIT_TAG?c.fixPosition(!0)??i:i):(c.getTd()?.linkTdNextId&&s.controlId&&this.removeNextControlElement(s.controlId),r)}}return r}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();const{startIndex:t,endIndex:e}=this.control.getRange();if(t===e)return t;const n=this.control.getDraw(),i=this.control.getElementList();n.spliceElementList(i,t+1,e-t);const r=i[t+1];return(r?.controlComponent===l.ControlComponent.POSTFIX||r?.controlComponent===l.ControlComponent.POST_TEXT||r?.controlComponent===l.ControlComponent.POSTTEXTFIX||r?.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)&&this.control.addPlaceholder(t),t}strikeout(t){const e=this.control.getRange(),{endIndex:n}=e,{isIgnoreDisabledRule:i=!1}=t||{};if(!i&&(this.draws.isReadonly()||this.draws.isDisabled()))return;const s=this.ranges.getSelectionElementList(),a=this.position.getCursorPosition(),c=j(new Date).format("YYYY-MM-DD HH:mm:ss");if(s?.length){if(!this.element.strikeout){const d=s.findIndex(u=>!u.strikeout);s.forEach(u=>{u.deletePerson="SWJ",u.deleteTime=c,u.strikeout=!!~d}),this.draws.render({isSetCursor:!0,isCompute:!1,isDel:!0,isSubmitHistory:!1}),setTimeout(()=>{this.strikeoute()},100)}}else{const d=this.control.getElementList()[a.index],u=this.control.getElementList();if(!this.control.getElementList()[a.index].strikeout&&d?.metrics.width>0){this.control.getElementList()[a.index].strikeout=!0,this.control.getElementList()[a.index].deletePerson="SWJ",this.control.getElementList()[a.index].deleteTime=c;const R=--a.index;setTimeout(()=>{this.strikeoute()},100),setTimeout(()=>{const g=R;this.draws.render({curIndex:g,isSetCursor:!0}),a.index=R,this.position.setCursorPosition(a),this.ranges.setRange(R,R)},100)}else n>=0&&n<u.length&&u[n]?.metrics?.width!==void 0&&u[n].metrics.width<=0&&!u[n]?.strikeout&&(setTimeout(()=>{u.splice(n,1)},100),setTimeout(()=>{const h=n-1;this.draws.render({curIndex:h,isSetCursor:!0}),a.index=h,delete a.value,this.position.setCursorPosition(a),this.ranges.setRange(h,h)},100))}}strikeoute(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draws.isReadonly()||this.draws.isDisabled()))return;if(!this.ranges.getSelectionElementList()?.length){const{endIndex:r}=this.ranges.getRange(),a=this.draws.getElementList()[r];this.ranges.setDefaultStyle({strikeout:a.strikeout?!1:!this.ranges.getDefaultStyle()?.strikeout})}}}class ur{draw;options;now;dom;renderOptions;isDatePicker;pickDate;lang;constructor(t,e={}){this.draw=t,this.options=e,this.lang=this._getLang(),this.now=new Date,this.dom=this._createDom(),this.renderOptions=null,this.isDatePicker=!0,this.pickDate=null,this._bindEvent()}_createDom(){const t=document.createElement("div");t.classList.add(`${z}-date-container`),t.setAttribute(ue,l.EditorComponent.POPUP);const e=document.createElement("div");e.classList.add(`${z}-date-wrap`);const n=document.createElement("div");n.classList.add(`${z}-date-title`);const i=document.createElement("span");i.classList.add(`${z}-date-title__pre-year`),i.innerText="<<";const r=document.createElement("span");r.classList.add(`${z}-date-title__pre-month`),r.innerText="<";const s=document.createElement("span");s.classList.add(`${z}-date-title__now`);const a=document.createElement("span");a.classList.add(`${z}-date-title__next-month`),a.innerText=">";const c=document.createElement("span");c.classList.add(`${z}-date-title__next-year`),c.innerText=">>",n.append(i),n.append(r),n.append(s),n.append(a),n.append(c);const d=document.createElement("div");d.classList.add(`${z}-date-week`);const{weeks:{sun:u,mon:R,tue:h,wed:g,thu:f,fri:T,sat:m}}=this.lang;[u,R,h,g,f,T,m].forEach(W=>{const X=document.createElement("span");X.innerText=`${W}`,d.append(X)});const I=document.createElement("div");I.classList.add(`${z}-date-day`),e.append(n),e.append(d),e.append(I);const L=document.createElement("ul");L.classList.add(`${z}-time-wrap`);let P,C,S;[this.lang.hour,this.lang.minute,this.lang.second].forEach((W,X)=>{const O=document.createElement("li"),M=document.createElement("span");M.innerText=W,O.append(M);const b=document.createElement("ol"),y=X===0,D=X===1,U=y?24:60;for(let Q=0;Q<U;Q++){const G=document.createElement("li");G.innerText=`${String(Q).padStart(2,"0")}`,G.setAttribute("data-id",`${Q}`),b.append(G)}y?P=b:D?C=b:S=b,O.append(b),L.append(O)});const N=document.createElement("div");N.classList.add(`${z}-date-menu`);const V=document.createElement("button");V.classList.add(`${z}-date-menu__time`),V.innerText=this.lang.timeSelect;const Y=document.createElement("button");Y.classList.add(`${z}-date-menu__now`),Y.innerText=this.lang.now;const E=document.createElement("button");return E.classList.add(`${z}-date-menu__submit`),E.innerText=this.lang.confirm,N.append(V),N.append(Y),N.append(E),t.append(e),t.append(L),t.append(N),this.draw.getContainer().append(t),{container:t,dateWrap:e,datePickerWeek:d,timeWrap:L,title:{preYear:i,preMonth:r,now:s,nextMonth:a,nextYear:c},day:I,time:{hour:P,minute:C,second:S},menu:{time:V,now:Y,submit:E}}}_bindEvent(){this.dom.title.preYear.onclick=()=>{this._preYear()},this.dom.title.preMonth.onclick=()=>{this._preMonth()},this.dom.title.nextMonth.onclick=()=>{this._nextMonth()},this.dom.title.nextYear.onclick=()=>{this._nextYear()},this.dom.menu.time.onclick=()=>{this.isDatePicker=!this.isDatePicker,this._toggleDateTimePicker()},this.dom.menu.now.onclick=()=>{this._now(),this._submit()},this.dom.menu.submit.onclick=()=>{this.dispose(),this._submit()},this.dom.time.hour.onclick=t=>{if(!this.pickDate)return;const n=t.target.dataset.id;n&&(this.pickDate.setHours(Number(n)),this._setTimePick(!1))},this.dom.time.minute.onclick=t=>{if(!this.pickDate)return;const n=t.target.dataset.id;n&&(this.pickDate.setMinutes(Number(n)),this._setTimePick(!1))},this.dom.time.second.onclick=t=>{if(!this.pickDate)return;const n=t.target.dataset.id;n&&(this.pickDate.setSeconds(Number(n)),this._setTimePick(!1))}}_setPosition(){if(!this.renderOptions)return;const{position:{coordinate:{leftTop:[t,e]},lineHeight:n,pageNo:i}}=this.renderOptions,r=this.draw.getHeight(),s=this.draw.getPageGap(),c=(i??this.draw.getPageNo())*(r+s);this.dom.container.style.left=`${t}px`,this.dom.container.style.top=`${e+c+n}px`}isInvalidDate(t){return t.toDateString()==="Invalid Date"}_setValue(){const t=this.renderOptions?.value;if(t){const e=new Date(t);this.now=this.isInvalidDate(e)?new Date:e}else this.now=new Date;this.pickDate=new Date(this.now)}_getLang(){const t=this.draw.getI18n(),e=t.t.bind(t);return{now:e("datePicker.now"),confirm:e("datePicker.confirm"),return:e("datePicker.return"),timeSelect:e("datePicker.timeSelect"),weeks:{sun:e("datePicker.weeks.sun"),mon:e("datePicker.weeks.mon"),tue:e("datePicker.weeks.tue"),wed:e("datePicker.weeks.wed"),thu:e("datePicker.weeks.thu"),fri:e("datePicker.weeks.fri"),sat:e("datePicker.weeks.sat")},year:e("datePicker.year"),month:e("datePicker.month"),hour:e("datePicker.hour"),minute:e("datePicker.minute"),second:e("datePicker.second")}}_setLangChange(){this.dom.menu.time.innerText=this.lang.timeSelect,this.dom.menu.now.innerText=this.lang.now,this.dom.menu.submit.innerText=this.lang.confirm;const{weeks:{sun:t,mon:e,tue:n,wed:i,thu:r,fri:s,sat:a}}=this.lang,c=[t,e,n,i,r,s,a];this.dom.datePickerWeek.childNodes.forEach((h,g)=>{const f=h;f.innerText=c[g]});const d=this.dom.time.hour.previousElementSibling;d.innerText=this.lang.hour;const u=this.dom.time.minute.previousElementSibling;u.innerText=this.lang.minute;const R=this.dom.time.second.previousElementSibling;R.innerText=this.lang.second}_update(){const t=new Date,e=t.getFullYear(),n=t.getMonth()+1,i=t.getDate();let r=null,s=null,a=null;this.pickDate&&(r=this.pickDate.getFullYear(),s=this.pickDate.getMonth()+1,a=this.pickDate.getDate());const c=this.now.getFullYear(),d=this.now.getMonth()+1;this.dom.title.now.innerText=`${c}${this.lang.year} ${String(d).padStart(2,"0")}${this.lang.month}`;const R=new Date(c,d,0).getDate();let h=new Date(c,d-1,1).getDay();h===0&&(h=7);const g=new Date(c,d-1,0).getDate();this.dom.day.innerHTML="";const f=g-h+1;for(let m=f;m<=g;m++){const p=document.createElement("div");p.classList.add("disable"),p.innerText=`${m}`,p.onclick=()=>{const I=d-2;this.now=new Date(c,I,m),this._setDatePick(c,I,m)},this.dom.day.append(p)}for(let m=1;m<=R;m++){const p=document.createElement("div");e===c&&n===d&&i===m&&p.classList.add("active"),this.pickDate&&r===c&&s===d&&a===m&&p.classList.add("select"),p.innerText=`${m}`,p.onclick=I=>{const L=d-1;this.now=new Date(c,L,m),this._setDatePick(c,L,m),I.stopPropagation()},this.dom.day.append(p)}const T=42-h-R;for(let m=1;m<=T;m++){const p=document.createElement("div");p.classList.add("disable"),p.innerText=`${m}`,p.onclick=()=>{this.now=new Date(c,d,m),this._setDatePick(c,d,m)},this.dom.day.append(p)}}_toggleDateTimePicker(){this.isDatePicker?(this.dom.dateWrap.classList.add("active"),this.dom.timeWrap.classList.remove("active"),this.dom.menu.time.innerText=this.lang.timeSelect):(this.dom.dateWrap.classList.remove("active"),this.dom.timeWrap.classList.add("active"),this.dom.menu.time.innerText=this.lang.return,this._setTimePick())}_setDatePick(t,e,n){this.now=new Date(t,e,n),this.pickDate?.setFullYear(t),this.pickDate?.setMonth(e),this.pickDate?.setDate(n),this._update()}_setTimePick(t=!0){const e=this.pickDate?.getHours()||0,n=this.pickDate?.getMinutes()||0,i=this.pickDate?.getSeconds()||0,{hour:r,minute:s,second:a}=this.dom.time;[r,s,a].forEach(u=>{u.querySelectorAll("li").forEach(R=>R.classList.remove("active"))}),[[r,e],[s,n],[a,i]].forEach(([u,R])=>{const h=u.querySelector(`[data-id='${R}']`);h.classList.add("active"),t&&Qi(u,h)})}_preMonth(){this.now.setMonth(this.now.getMonth()-1),this._update()}_nextMonth(){this.now.setMonth(this.now.getMonth()+1),this._update()}_preYear(){this.now.setFullYear(this.now.getFullYear()-1),this._update()}_nextYear(){this.now.setFullYear(this.now.getFullYear()+1),this._update()}_now(){this.pickDate=new Date,this.dispose()}_toggleVisible(t){t?this.dom.container.classList.add("active"):this.dom.container.classList.remove("active")}_submit(){if(this.options.onSubmit&&this.pickDate){const t=this.renderOptions?.dateFormat,e=this.formatDate(this.pickDate,t);this.options.onSubmit(e)}}formatDate(t,e="YYYY-MM-DD HH:mm:ss"){let n=e;const i=t.getFullYear().toString(),r=(t.getMonth()+1).toString(),s=t.getDate().toString(),a=t.getHours(),c=a%12===0?12:a%12,d=t.getMinutes().toString(),u=t.getSeconds().toString(),R=t.getMilliseconds().toString(),h={"y+":i,"Y+":i,"M+":r,"d+":s,"D+":s,"h+":c.toString(),"H+":a.toString(),"m+":d,"s+":u,"S+":R};for(const g in h){const f=new RegExp("("+g+")").exec(e),T=g;f&&(n=n.replace(f[1],f[1].length===1?h[T]:h[T].padStart(f[1].length,"0")))}return n}render(t){this.renderOptions=t,this.lang=this._getLang(),this._setLangChange(),this._setValue(),this._update(),this._setPosition(),this.isDatePicker=!0,this._toggleDateTimePicker(),this._toggleVisible(!0)}dispose(){this._toggleVisible(!1)}destroy(){this.dom.container.remove()}}class Yn{draw;element;control;isPopup;datePicker;options;constructor(t,e){const n=e.getDraw();this.draw=n,this.options=n.getOptions(),this.element=t,this.control=e,this.isPopup=!1,this.datePicker=null}setElement(t){this.element=t}getElement(){return this.element}getIsPopup(){return this.isPopup}getValue(t={}){const e=t.elementList||this.control.getElementList(),n=this.control.getValueRange(t);if(!n)return[];const i=[],{startIndex:r,endIndex:s}=n;for(let a=r;a<=s;a++){const c=e[a];c.controlComponent===l.ControlComponent.VALUE&&i.push(c)}return i}setValue(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return-1;const{elementList:i,range:r}=this.control.mergeControl(e);this.control.shrinkBoundary(e);const{startIndex:s,endIndex:a}=r,c=this.control.getDraw();s!==a?c.spliceElementList(i,s+1,a-s):this.control.removePlaceholder(s,{elementList:i});const d=i[s],u=d.type&&!zt.includes(d.type)||d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.PRE_TEXT?Dt(d,["control","controlId",...At]):se(d,["type"]),R=r.startIndex+1;for(let h=0;h<t.length;h++){const g={...u,...t[h],controlComponent:l.ControlComponent.VALUE};wt(i,[g],s,{editorOptions:this.options}),c.spliceElementList(i,R+h,0,[g])}return R+t.length-1}clearSelect(t={},e={}){const{isIgnoreDisabledRule:n=!1,isAddPlaceholder:i=!0}=e;if(!n&&this.control.getIsDisabledControl(t))return-1;const r=this.control.getValueRange(t);if(!r)return-1;const{startIndex:s,endIndex:a}=r;if(!~s||!~a)return-1;const c=t.elementList||this.control.getElementList();return this.control.getDraw().spliceElementList(c,s+1,a-s,[],{isIgnoreDeletedRule:e.isIgnoreDeletedRule}),i&&this.control.addPlaceholder(s,t),s}setSelect(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return;const i=e.elementList||this.control.getElementList(),r=e.range||this.control.getRange(),s=this.getValue(e)[0],a=s?Dt(s,Re):Dt(i[r.startIndex],At),c=this.clearSelect(e,{isAddPlaceholder:!1,isIgnoreDeletedRule:n.isIgnoreDeletedRule});if(!~c)return;const d=se(i[c],Re),u=c+1,R=this.control.getDraw();for(let h=0;h<t.length;h++){const g={...a,...d,type:l.ElementType.TEXT,value:t[h],controlComponent:l.ControlComponent.VALUE};(g.color===this.options.control.bracketColor||g.color===this.options.control.placeholderColor)&&(g.color=this.options.defaultColor),wt(i,[g],c,{editorOptions:this.options}),R.spliceElementList(i,u+h,0,[g])}if(!e.range){const h=u+t.length-1;this.control.repaintControl({curIndex:h}),this.control.emitControlContentChange({context:e}),this.destroy()}}keydown(t){if(this.control.getIsDisabledControl())return null;const e=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();const{startIndex:i,endIndex:r}=n,s=e[i],a=e[r],c=this.control.getDraw();if(t.key===l.KeyMap.Backspace)return i!==r?(c.spliceElementList(e,i+1,r-i),this.getValue().length||this.control.addPlaceholder(i),i):s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT||a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POST_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER?this.control.removeControl(i):(c.spliceElementList(e,i,1),this.getValue().length||this.control.addPlaceholder(i-1),i-1);if(t.key===l.KeyMap.Delete){if(i!==r)return c.spliceElementList(e,i+1,r-i),this.getValue().length||this.control.addPlaceholder(i),i;{const d=e[r+1];return(s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT)&&d.controlComponent===l.ControlComponent.PLACEHOLDER||d.controlComponent===l.ControlComponent.POSTFIX||d.controlComponent===l.ControlComponent.POST_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER?this.control.removeControl(i):(c.spliceElementList(e,i+1,1),this.getValue().length||this.control.addPlaceholder(i),i)}}return r}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();const{startIndex:t,endIndex:e}=this.control.getRange();if(t===e)return t;const n=this.control.getDraw(),i=this.control.getElementList();return n.spliceElementList(i,t+1,e-t),this.getValue().length||this.control.addPlaceholder(t),t}awake(){if(this.isPopup||this.control.getIsDisabledControl()||!this.control.getIsRangeWithinControl())return;const t=this.control.getPosition();if(!t)return;const e=this.draw.getElementList(),{startIndex:n}=this.control.getRange();if(e[n+1]?.controlId!==this.element.controlId)return;this.datePicker=new ur(this.draw,{onSubmit:this._setDate.bind(this)});const i=this.getValue().map(s=>s.value).join("")||"",r=this.element.control?.dateFormat;this.datePicker.render({value:i,position:t,dateFormat:r}),this.isPopup=!0}destroy(){this.isPopup&&(this.datePicker?.destroy(),this.isPopup=!1)}_setDate(t){t?this.setSelect(t):this.clearSelect(),this.destroy()}}class Dn extends Si{isPopup;inputPopup;constructor(t,e){super(t,e),this.isPopup=!1,this.inputPopup=null}getIsPopup(){return this.isPopup}setValue(t,e={},n={}){if(t.some(P=>!$l(P)||Hr.test(P.value)))return-1;const i=e.elementList||this.control.getElementList(),r=e.range||this.control.getRange();this.control.shrinkBoundary(e);const s=at(t),{startIndex:a,endIndex:c}=r,d=i[a];let u=null;for(let P=a;P>=0;P--)if(i[P].controlComponent===l.ControlComponent.PREFIX){u=i[P];break}const R=u?.control||this.element.control;if(this.control.getIsExistValueByElementListIndex(i,a)){let P=a;for(;P>0;){const S=i[P];if(S.controlId!==d.controlId||S.controlComponent===l.ControlComponent.PREFIX||S.controlComponent===l.ControlComponent.PRE_TEXT)break;s.unshift(S),P--}let C=c+1;for(;C<i.length;){const S=i[C];if(S.controlId!==d.controlId||S.controlComponent===l.ControlComponent.POSTFIX||S.controlComponent===l.ControlComponent.POST_TEXT)break;s.push(S),C++}}const h=zi(s);if(Number.isNaN(Number(h))||!Number.isFinite(Number(h)))return-1;const g=R?.numberExclusiveOptions,f=g?.maxLength??null,T=g?.decimalPlaces??null,m=h.replace(/[.-]/g,"").length;if(f!=null&&m>f||T!=null&&(h.split(".")[1]||"").length>T)return-1;const p=Number(h),I=g?.minValue,L=g?.maxValue;return I!=null&&p<I||L!=null&&p>L?-1:super.setValue(t,e,n)}_setNumberValue(t){const e=this.control.getElementList(),n=this.control.getRange(),{startIndex:i}=n;let r=null;for(let F=i;F>=0;F--)if(e[F].controlComponent===l.ControlComponent.PREFIX){r=e[F];break}const a=(r?.control||this.element.control)?.numberExclusiveOptions,c=a?.minValue,d=a?.maxValue,u=a?.decimalPlaces,R=a?.minLength,h=a?.maxLength;let g=t;u!=null&&(g=parseFloat(t.toFixed(u)));const f=g.toString(),T=f.replace(/[.-]/g,"").length;if(R!=null&&T<R||h!=null&&T>h||c!=null&&g<c||d!=null&&g>d)return!1;let m=i;for(let F=i;F>=0;F--)if(e[F].controlComponent===l.ControlComponent.PREFIX){m=F;break}let p=m+1;for(let F=m+1;F<e.length;F++)if(e[F].controlComponent===l.ControlComponent.POSTFIX){p=F;break}const I=this.options.mode===l.EditorMode.FORM,L=I&&this.options.modeRule.form.inputTraceEnabled,P=I&&this.options.modeRule.form.deleteTraceEnabled,C=j(new Date).format("YYYY-MM-DD HH:mm:ss");if(P)for(let F=m+1;F<p;F++){const N=e[F];N.controlComponent===l.ControlComponent.VALUE&&!N.strikeout&&N.value&&(N.strikeout=!0,N.deletePerson="SYSTEM",N.deleteTime=C),N.controlComponent===l.ControlComponent.PLACEHOLDER&&(this.control.getDraw().spliceElementList(e,F,1),p--,F--)}else{const F=m+1,N=p-F;N>0&&this.control.getDraw().spliceElementList(e,F,N),p=m+1}p=m+1;for(let F=m+1;F<e.length;F++)if(e[F].controlComponent===l.ControlComponent.POSTFIX){p=F;break}const S=[];for(let F=0;F<f.length;F++){const N={type:l.ElementType.TEXT,value:f[F],controlComponent:l.ControlComponent.VALUE,controlId:e[m].controlId};L&&(N.textDecoration={style:l.TextDecorationStyle.DOUBLE},N.underline=!0),S.push(N)}for(let F=0;F<S.length;F++)this.control.getDraw().spliceElementList(e,p+F,0,[S[F]]);return this.control.repaintControl({curIndex:p+S.length-1}),this.control.emitControlContentChange(),!0}awake(){if(this.isPopup||this.control.getIsDisabledControl()||!this.control.getIsRangeWithinControl())return;const t=this.control.getElementList(),e=this.control.getRange(),{startIndex:n}=e,i=t[n];if(!i||i.controlId!==this.element.controlId)return;let r=null;for(let f=n;f>=0;f--)if(t[f].controlComponent===l.ControlComponent.PREFIX){r=t[f];break}const s=r?.control||this.element.control,c=this.getValue().filter(f=>!f.strikeout),d=c.length>0?zi(c):"",u=s?.numberExclusiveOptions,R=u?.minValue,h=u?.maxValue,g=u?.decimalPlaces;this.inputPopup=new mh({control:this.control,currentValue:d,minValue:R,maxValue:h,decimalPlaces:g,onConfirm:f=>{if(!f||f.trim()==="")return this._clearNumberValue(),!0;const T=parseFloat(f);return Number.isNaN(T)||!Number.isFinite(T)?!1:this._setNumberValue(T)},onTab:f=>{this.destroy(),setTimeout(()=>{this.control.initNextControl({direction:f})})},onClose:()=>{this.destroy()}}),this.inputPopup.create(),this.isPopup=!0}_clearNumberValue(){const t=this.control.getElementList(),e=this.control.getRange(),{startIndex:n}=e;let i=n;for(let c=n;c>=0;c--)if(t[c].controlComponent===l.ControlComponent.PREFIX){i=c;break}let r=i+1;for(let c=i+1;c<t.length;c++)if(t[c].controlComponent===l.ControlComponent.POSTFIX){r=c;break}const s=i+1,a=r-s;a>0&&this.control.getDraw().spliceElementList(t,s,a),this.control.addPlaceholder(i),this.control.repaintControl({curIndex:i}),this.control.emitControlContentChange()}keydown(t){if(this.control.getIsDisabledControl())return null;const e=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();const{startIndex:i,endIndex:r}=n,s=e[i],a=e[r],c=this.control.getDraw();if(t.key==="Backspace")return s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER?this.control.removeControl(i):a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POST_TEXT?i:i!==r?(c.spliceElementList(e,i+1,r-i),this.getValue().length||this.control.addPlaceholder(i),i):(c.spliceElementList(e,i,1),this.getValue().length||this.control.addPlaceholder(i-1),i-1);if(t.key==="Delete"){const u=e[r+1];return s.controlComponent===l.ControlComponent.PLACEHOLDER||a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POST_TEXT?this.control.removeControl(i):s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT||u?.controlComponent===l.ControlComponent.POSTFIX||u?.controlComponent===l.ControlComponent.POST_TEXT?r:i!==r?(c.spliceElementList(e,i+1,r-i),this.getValue().length||this.control.addPlaceholder(i),i):(c.spliceElementList(e,i+1,1),this.getValue().length||this.control.addPlaceholder(i),i)}return t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey?(t.preventDefault(),this.awake(),null):r}destroy(){this.inputPopup&&(this.inputPopup.destroy(),this.inputPopup=null),this.isPopup=!1}}class mh{options;popupDom;constructor(t){this.options=t,this.popupDom=null}create(){const{currentValue:t,minValue:e,maxValue:n,decimalPlaces:i,onConfirm:r,onTab:s,onClose:a}=this.options,c=document.createElement("div");c.classList.add(`${z}-number-input-modal`),c.setAttribute(ue,l.EditorComponent.POPUP);const d=document.createElement("div");d.classList.add(`${z}-number-input-modal__content`);const u=document.createElement("div");if(u.classList.add(`${z}-number-input-modal__title`),u.textContent="请输入数值",d.appendChild(u),e!==void 0||n!==void 0){const I=document.createElement("div");I.classList.add(`${z}-number-input-modal__hint`);let L="有效范围:";e!==void 0&&n!==void 0?L+=`${e} ~ ${n}`:e!==void 0?L+=`≥ ${e}`:L+=`≤ ${n}`,i!=null&&(L+=`,保留${i}位小数`),I.textContent=L,d.appendChild(I)}const R=document.createElement("input");R.classList.add(`${z}-number-input-modal__input`),R.type="number",R.value=t,R.placeholder="请输入数值",e!==void 0&&(R.min=String(e)),n!==void 0&&(R.max=String(n)),i!=null&&(R.step=(1/Math.pow(10,i)).toString()),setTimeout(()=>{R.focus(),R.select()},100),d.appendChild(R);const h=document.createElement("div");h.classList.add(`${z}-number-input-modal__error`),h.style.display="none",d.appendChild(h);const g=document.createElement("div");g.classList.add(`${z}-number-input-modal__buttons`);const f=document.createElement("button");f.classList.add(`${z}-number-input-modal__cancel`),f.textContent="取消",f.onclick=()=>{a()},g.appendChild(f);const T=document.createElement("button");T.classList.add(`${z}-number-input-modal__confirm`),T.textContent="确定";const m=()=>{const I=R.value.trim();if(!I)return r("");const L=parseFloat(I);return Number.isNaN(L)||!Number.isFinite(L)?(h.textContent="请输入有效的数值",h.style.display="block",!1):i!=null&&(I.split(".")[1]||"").length>i?(h.textContent=`小数位数不能超过${i}位`,h.style.display="block",!1):e!==void 0&&L<e?(h.textContent=`数值不能小于 ${e}`,h.style.display="block",!1):n!==void 0&&L>n?(h.textContent=`数值不能大于 ${n}`,h.style.display="block",!1):(h.style.display="none",r(I))};T.onclick=()=>{m()&&a()},g.appendChild(T),d.appendChild(g),c.appendChild(d),R.onkeydown=I=>{I.key==="Enter"?T.click():I.key==="Tab"?(I.preventDefault(),m()&&(a(),s(I.shiftKey?Ut.UP:Ut.DOWN))):I.key==="Escape"&&a()},this.options.control.getContainer().appendChild(c),this.popupDom=c}destroy(){this.popupDom&&(this.popupDom.remove(),this.popupDom=null)}}class ph{options;mask;container;inputList;optionItemContainers;data;constructor(t){this.options=t,this.mask=null,this.container=null,this.inputList=[],this.optionItemContainers=[],this.data=t.data,this._render()}_getFieldValue(t){const e=this.inputList.filter(n=>n.name===t);if(e.length!==0){for(const n of e)if(n instanceof HTMLInputElement&&n.type==="radio"&&n.checked)return n.value;return e[0].value}}_updateFieldVisibility(){this.data.forEach((t,e)=>{if(t.visibleWhen){const{field:n,value:i}=t.visibleWhen,r=this._getFieldValue(n),s=this.optionItemContainers[e];if(s){const a=r===i;s.style.display=a?"":"none"}}})}_render(){const{title:t,onClose:e,onCancel:n,onConfirm:i}=this.options,r=document.createElement("div");r.classList.add("dialog-mask"),r.setAttribute(ue,l.EditorComponent.COMPONENT),document.body.append(r);const s=document.createElement("div");s.classList.add("dialog-container"),s.setAttribute(ue,l.EditorComponent.COMPONENT);const a=document.createElement("div");a.classList.add("dialog"),s.append(a);const c=document.createElement("div");c.classList.add("dialog-title");const d=document.createElement("span");d.append(document.createTextNode(t));const u=document.createElement("i");u.onclick=()=>{e&&e(),this._dispose()},c.append(d),c.append(u),a.append(c);const R=document.createElement("div");R.classList.add("dialog-option");for(let T=0;T<this.data.length;T++){const m=this.data[T],p=document.createElement("div");if(p.classList.add("dialog-option__item"),m.visible===!1&&(p.style.display="none"),m.label){const I=document.createElement("span");I.append(document.createTextNode(m.label)),p.append(I),m.required&&I.classList.add("dialog-option__item--require")}if(m.type==="radio"){const I=document.createElement("div");I.classList.add("dialog-radio-group"),m.horizontal&&I.classList.add("dialog-radio-group--horizontal"),m.options?.forEach(L=>{const P=document.createElement("label");P.classList.add("dialog-radio-item");const C=document.createElement("input");C.type="radio",C.name=m.name,C.value=L.value,L.value===(m.value||"")&&(C.checked=!0);const S=document.createElement("span");S.textContent=L.label,P.append(C),P.append(S),I.append(P),C.addEventListener("change",()=>{this._updateFieldVisibility()}),this.inputList.push(C)}),p.append(I)}else if(m.type==="select"){const I=document.createElement("select"),L=m.value||"";m.options?.forEach(P=>{const C=document.createElement("option");C.value=P.value,C.label=P.label,P.value===L&&(C.selected=!0),I.append(C)}),I.name=m.name,I.value=L,I.addEventListener("change",()=>{this._updateFieldVisibility()}),m.width&&(I.style.width=`${m.width}px`),p.append(I),this.inputList.push(I)}else if(m.type==="textarea"){const I=document.createElement("textarea");I.name=m.name,I.value=m.value||"",I.placeholder=m.placeholder||"",m.width&&(I.style.width=`${m.width}px`),m.height&&(I.style.height=`${m.height}px`),p.append(I),this.inputList.push(I)}else{const I=document.createElement("input");I.type=m.type,I.name=m.name,I.value=m.value||"",I.placeholder=m.placeholder||"",m.width&&(I.style.width=`${m.width}px`),m.height&&(I.style.height=`${m.height}px`),p.append(I),this.inputList.push(I)}R.append(p),this.optionItemContainers.push(p)}a.append(R);const h=document.createElement("div");h.classList.add("dialog-menu");const g=document.createElement("button");g.classList.add("dialog-menu__cancel"),g.append(document.createTextNode("取消")),g.type="button",g.onclick=()=>{n&&n(),this._dispose()},h.append(g);const f=document.createElement("button");f.append(document.createTextNode("确定")),f.type="submit",f.onclick=()=>{if(i){const T=new Set,m=[];for(const p of this.inputList)if(!T.has(p.name))if(p instanceof HTMLInputElement&&p.type==="radio"){const I=this.inputList.find(L=>L.name===p.name&&L instanceof HTMLInputElement&&L.checked);I&&(m.push({name:p.name,value:I.value}),T.add(p.name))}else m.push({name:p.name,value:p.value}),T.add(p.name);i(m)}this._dispose()},h.append(f),a.append(h),document.body.append(s),this.container=s,this.mask=r,this._updateFieldVisibility()}_dispose(){this.mask?.remove(),this.container?.remove()}}class Be{draw;element;control;isPopup;datePicker;options;range;static isDeleting=!1;inputModal=null;constructor(t,e){const n=e.getDraw();this.draw=n,this.range=n.getRange(),this.options=n.getOptions(),this.element=t,this.control=e,this.isPopup=!1,this.datePicker=null}setElement(t){this.element=t}getElement(){return this.element}getIsPopup(){return this.isPopup}getValue(){return[]}setValue(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return-1;const{elementList:i,range:r}=this.control.mergeControl(e),s=this.control.getDraw(),{startIndex:a}=r,d=i[a].controlId;let u=a;for(let p=a;p>=0;p--){const I=i[p];if(I.controlId!==d)break;if(I.controlComponent===l.ControlComponent.PREFIX){u=p;break}}let R=a;for(let p=a;p<i.length;p++){const I=i[p];if(I.controlId!==d){R=p;break}if(I.controlComponent===l.ControlComponent.POSTFIX){R=p;break}}const h=u+1,g=R-1;g>=h&&s.spliceElementList(i,h,g-h+1);const f=i[u],T=Dt(f,["control","controlId",...At]),m=u+1;for(let p=0;p<t.length;p++){const I={...T,...t[p],controlComponent:l.ControlComponent.VALUE};I.color="#fff",I.highlight="#1677FF",wt(i,[I],u,{editorOptions:this.options}),s.spliceElementList(i,m+p,0,[I])}return m+t.length-1}clearSelect(t={},e={}){const{isIgnoreDisabledRule:n=!1,isAddPlaceholder:i=!0}=e;if(!n&&this.control.getIsDisabledControl(t))return-1;const r=this.control.getValueRange(t);if(!r)return-1;const{startIndex:s,endIndex:a}=r;if(!~s||!~a)return-1;const c=t.elementList||this.control.getElementList();return this.control.getDraw().spliceElementList(c,s+1,a-s,[],{isIgnoreDeletedRule:e.isIgnoreDeletedRule}),i&&this.control.addPlaceholder(s,t),s}keydown(t){if(this.control.getIsDisabledControl())return null;const e=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();const{endIndex:i}=n,r=e[i];return!!r?.originControlId&&!!r?.controlId&&r.originControlId!==r.controlId&&r.control?.type===l.ControlType.BUTTON&&!r.control?.buttonText&&(t.key===l.KeyMap.Backspace||t.key===l.KeyMap.Delete)?this.control.removeControl(i):r?.controlComponent==="value"&&r.control?.type==="button"&&r.control?.buttonText?t.key===l.KeyMap.Backspace||t.key===l.KeyMap.Delete?(r.controlId&&this.removeByValue(e,r.controlId),i):null:(t.key===l.KeyMap.Backspace&&r?.controlComponent==="value"&&r.control?.type==="button"&&!r.control?.buttonText,null)}removeByValue(t,e){return Be.isDeleting=!0,new Promise(n=>{for(let c=t.length-1;c>=0;c--)(t[c].type=="control"||t[c].type=="text")&&t[c].controlId===e&&t.splice(c,1);const{startIndex:i,endIndex:r}=this.range.getRange(),s=!0,a=r;this.draw.render({curIndex:a,isSetCursor:s}),setTimeout(()=>{Be.isDeleting=!1},300),n(!0)})}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();const{startIndex:t,endIndex:e}=this.control.getRange();if(t===e)return t;const n=this.control.getDraw(),i=this.control.getElementList();return n.spliceElementList(i,t+1,e-t),this.getValue().length||this.control.addPlaceholder(t),t}awake(){if(this.isPopup||this.control.getIsDisabledControl()||!this.control.getIsRangeWithinControl()||Be.isDeleting||!this.control.getPosition())return;const e=this.draw.getElementList(),{startIndex:n}=this.control.getRange();if(e[n]?.controlId!==this.element?.controlId)return;const i=this.control.getDraw().getPosition().getPositionContext();if(!i.isDirectHit||i.index!==n||e[i.index]?.controlId!==this.element?.controlId)return;const r=e[n]?.controlId,s=e[n]?.control;if(!(r?.endsWith("_text")||s?.buttonText)){if(this.options.mode=="form"){const a=e[n].controlId;if(!a)return;const c=e.filter(d=>d.controlId==a);c[0].control.buttonText||this.showInputModal(c)}else if(this.options.mode=="edit"){const a=e[n].controlId,c=e.filter(d=>d.controlId==a);this.showEditModal(c)}}}showInputModal(t){if(this.inputModal){this.closeInputModal();return}this.isPopup=!0,this.inputModal=document.createElement("div"),this.inputModal.classList.add(`${z}-button-input-modal`),this.inputModal.setAttribute(ue,l.EditorComponent.POPUP),this.inputModal.oncontextmenu=c=>{c.preventDefault(),c.stopPropagation()};const e=document.createElement("div");e.classList.add(`${z}-button-input-modal__content`),e.oncontextmenu=c=>{c.preventDefault(),c.stopPropagation()};const n=document.createElement("div");n.classList.add(`${z}-button-input-modal__title`),n.innerText="请输入按钮展开文字(用逗号分隔)";const i=document.createElement("textarea");i.classList.add(`${z}-button-input-modal__textarea`),i.placeholder="例如:选项1,选项2,选项3",i.rows=5;const r=document.createElement("div");r.classList.add(`${z}-button-input-modal__buttons`);const s=document.createElement("button");s.classList.add(`${z}-button-input-modal__cancel`),s.innerText="取消",s.onclick=()=>this.closeInputModal();const a=document.createElement("button");a.classList.add(`${z}-button-input-modal__confirm`),a.innerText="确认",a.onclick=()=>{const c=i.value.trim();if(c){const d=c.split(/[,,]/).map((u,R)=>({value:u.trim(),code:String(R+1)})).filter(u=>u.value);if(d.length>0&&t[0]?.controlId){const u={controlId:t[0].controlId,element:[{...t[0],newButtonValue:d}]};this.draw.getCommand().executeButton(u)}}this.closeInputModal()},r.appendChild(s),r.appendChild(a),e.appendChild(n),e.appendChild(i),e.appendChild(r),this.inputModal.appendChild(e),this.draw.getContainer().appendChild(this.inputModal),setTimeout(()=>i.focus(),100),this.inputModal.onclick=c=>{c.target===this.inputModal&&this.closeInputModal()}}closeInputModal(){this.inputModal&&(this.inputModal.remove(),this.inputModal=null),this.isPopup=!1}showEditModal(t){const e=t[0]?.control||{},n=e.buttonLabel||e.label||"按钮",i=e.code||"";this.isPopup=!0,new ph({title:"修改按钮属性",data:[{type:"text",label:"按钮标签",name:"buttonLabel",required:!0,placeholder:"请输入按钮标签",value:n},{type:"text",label:"按钮代码",name:"code",placeholder:"请输入按钮代码",value:i}],onClose:()=>{this.isPopup=!1},onCancel:()=>{this.isPopup=!1},onConfirm:r=>{const s=r.find(h=>h.name==="buttonLabel")?.value?.trim()||"按钮",a=r.find(h=>h.name==="code")?.value?.trim()||"",c=this.control.getElementList(),d=t[0]?.controlId;if(d)for(let h=0;h<c.length;h++){const g=c[h];g.controlId===d&&g.control&&(g.control.buttonLabel=s,g.control.label=s,g.control.code=a)}const u=[];for(let h=0;h<s.length;h++)u.push({value:s[h],controlComponent:l.ControlComponent.VALUE});const R=this.setValue(u);R!==-1&&this.control.repaintControl({curIndex:R}),this.isPopup=!1}})}destroy(){this.isPopup&&(this.datePicker?.destroy(),this.isPopup=!1)}}class Rr{draws;ranges;element;control;options;position;constructor(t,e){const n=e.getDraw();this.draws=n,this.position=n.getPosition(),this.ranges=n.getRange(),this.options=n.getOptions(),this.element=t,this.control=e}setElement(t){this.element=t}getElement(){return this.element}getValue(t={}){const e=t.elementList||this.control.getElementList();let{startIndex:n}=t.range||this.control.getRange();const i=this.control.getDraw(),r=t?null:i.getTd();n>=e.length&&(n=e.length-1);const s=e[n],a=[];let c=r;if(s.controlComponent===l.ControlComponent.PRETEXTFIX||s.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){let f=n+1;for(;f<e.length;){const T=e[f];if(T.controlId!==s.controlId||T.controlComponent!==l.ControlComponent.PRETEXTFIX&&T.controlComponent!==l.ControlComponent.PRETEXTFIX_TEXT){n=f-1;break}f++}}let d=e,u=n;for(;;){if(u<0&&c?.linkTdPrevId){const T=i.getTdById(c.linkTdPrevId);if(T){d=T.value,u=d.length-1,c=T;continue}}if(u<0)break;const f=d[u];if(f.controlId!==s.controlId||f.controlComponent===l.ControlComponent.PRETEXTFIX||f.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||f.controlComponent===l.ControlComponent.TEXTFIXLABEL)break;f.controlComponent===l.ControlComponent.VALUE&&a.unshift(f),u--}c=r;let R=e,h=n+1;for(;;){if(h>=R.length&&c?.linkTdNextId){const T=i.getTdById(c.linkTdNextId);if(T){R=T.value,h=0,c=T;continue}}const f=R[h];if(!f||f.controlId!==s.controlId||f.controlComponent===l.ControlComponent.POSTTEXTFIX||f.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||f.controlComponent===l.ControlComponent.TEXTFIXLABEL)break;f.controlComponent===l.ControlComponent.VALUE&&a.push(f),h++}return a.filter(f=>f.type!==l.ElementType.SPLIT_TAG)}removeNextControlElement(t,e){const n=this.control.getDraw();if(e=e??n.getTd()?.linkTdNextId,e){const i=n.getTdById(e);if(i){if(i.value.length){if(i.value[1].controlId===t)return n.spliceElementList(i.value,1,1),i.value[1]}else if(i.linkTdNextId)return this.removeNextControlElement(t,i.linkTdNextId)}}}setValue(t,e={},n={}){if(this.options.mode===l.EditorMode.FORM||!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return-1;const{elementList:i,range:r}=this.control.mergeControl(e);this.control.shrinkBoundary(e);const{startIndex:s,endIndex:a}=r,c=this.control.getDraw();s!==a?c.spliceElementList(i,s+1,a-s,[],{isIgnoreDeletedRule:n.isIgnoreDeletedRule}):this.control.removePlaceholder(s,{elementList:i});const d=i[s],u=i[s+1];let R=d.originControlId||d.controlId,h=d.originControlId&&(d.controlComponent===l.ControlComponent.POSTFIX||d.controlComponent===l.ControlComponent.POSTTEXTFIX||d.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||d.controlComponent===l.ControlComponent.POST_TEXT);if(!h&&d.controlId&&(d.controlComponent===l.ControlComponent.POSTFIX||d.controlComponent===l.ControlComponent.POSTTEXTFIX||d.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||d.controlComponent===l.ControlComponent.POST_TEXT)&&u?.controlId&&u.controlId!==d.controlId)if(u.controlComponent===l.ControlComponent.PREFIX||u.controlComponent===l.ControlComponent.PRETEXTFIX)for(let p=s;p>=0;p--){const I=i[p];if(I.controlId===d.controlId&&(I.controlComponent===l.ControlComponent.PREFIX||I.controlComponent===l.ControlComponent.PRETEXTFIX)){for(let L=p-1;L>=0;L--){const P=i[L];if(P.controlId&&P.controlId!==d.controlId&&(P.controlComponent===l.ControlComponent.PRETEXTFIX||P.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||P.controlComponent===l.ControlComponent.PREFIX||P.controlComponent===l.ControlComponent.PRE_TEXT)){R=P.controlId,h=!0;break}if(P.controlId&&P.controlId!==d.controlId&&(P.controlComponent===l.ControlComponent.POSTFIX||P.controlComponent===l.ControlComponent.POSTTEXTFIX))break}break}}else(u.controlComponent===l.ControlComponent.POSTFIX||u.controlComponent===l.ControlComponent.POSTTEXTFIX)&&(R=u.controlId,h=!0);if(!h&&d.controlId&&(d.controlComponent===l.ControlComponent.POSTFIX||d.controlComponent===l.ControlComponent.POSTTEXTFIX||d.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||d.controlComponent===l.ControlComponent.POST_TEXT))for(let p=s;p>=0;p--){const I=i[p];if(I.controlId===d.controlId&&(I.controlComponent===l.ControlComponent.PREFIX||I.controlComponent===l.ControlComponent.PRETEXTFIX)){for(let L=p-1;L>=0;L--){const P=i[L];if(P.controlId&&P.controlId!==d.controlId&&(P.controlComponent===l.ControlComponent.PRETEXTFIX||P.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||P.controlComponent===l.ControlComponent.PREFIX||P.controlComponent===l.ControlComponent.PRE_TEXT)){R=P.controlId,h=!0;break}if(P.controlId&&P.controlId!==d.controlId&&(P.controlComponent===l.ControlComponent.POSTFIX||P.controlComponent===l.ControlComponent.POSTTEXTFIX))break}break}}const g=d.type&&!zt.includes(d.type)||d.controlComponent===l.ControlComponent.PRETEXTFIX||d.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT?Dt(d,["control","controlId",...At]):se(d,["type"]);h&&(g.controlId=R,delete g.originControlId);const f=r.startIndex+1,T=[],m=p=>{const I=T.length?T:i,L=T.length?T.length-1:r.startIndex;wt(I,[p],L,{editorOptions:this.options}),T.push(p)};for(let p=0;p<t.length;p++){const I=t[p];if(I.type===l.ElementType.CONTROL&&I.control){const L=I,P=L.controlId||lt(),C=L.control?.value||[],S=L.control?.type===l.ControlType.TEXTFIELD,F={...g,controlId:P,type:l.ElementType.CONTROL,control:L.control,originControlId:R},N=S?l.ControlComponent.PRETEXTFIX:l.ControlComponent.PREFIX,V=S?l.ControlComponent.POSTTEXTFIX:l.ControlComponent.POSTFIX,Y=S?L.control?.preTextFix||this.options.control.preTextFix:L.control?.prefix||this.options.control.prefix;for(let W=0;W<Y.length;W++){const X={...F,value:Y[W],controlComponent:N};m(X)}for(let W=0;W<C.length;W++){const X=C[W],O={...F,...X,controlComponent:l.ControlComponent.VALUE,type:X.type};(O.color===this.options.control.textFixColor||O.color===this.options.control.placeholderColor)&&(O.color=this.options.defaultColor),m(O)}if(C.length===0){const W=L.control?.placeholder||"";for(let X=0;X<W.length;X++){const O={...F,value:W[X],controlComponent:l.ControlComponent.PLACEHOLDER,color:this.options.control.placeholderColor};m(O)}}const E=S?L.control?.postTextFix||this.options.control.postTextFix:L.control?.postfix||this.options.control.postfix;for(let W=0;W<E.length;W++){const X={...F,value:E[W],controlComponent:V};m(X)}}else if(I.type||I.value){g.color=this.options.defaultColor;const L={...g,...I,controlComponent:l.ControlComponent.VALUE};(L.color===this.options.control.textFixColor||L.color===this.options.control.placeholderColor)&&(L.color=this.options.defaultColor),m(L)}}return T.length&&c.spliceElementList(i,f,0,T),r.startIndex+T.length}clearValue(t={},e={}){if(!e.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return-1;const n=t.elementList||this.control.getElementList(),i=t.range||this.control.getValueRange()||this.control.getRange();this.control.shrinkBoundary(t);const{startIndex:r,endIndex:s}=i;return this.control.getDraw().spliceElementList(n,r+1,s-r,[],{isIgnoreDeletedRule:e.isIgnoreDeletedRule}),e.isAddPlaceholder!==!1&&(this.getValue(t).length||this.control.addPlaceholder(r,t)),r}keydown(t){if(this.control.getIsDisabledControl())return null;const e=this.control.getElementList(),n=this.control.getRange(),i=n.startIndex,r=n.endIndex;if(t.key===l.KeyMap.Backspace&&i===r&&i>0){const m=e[i-1],p=m?.controlComponent===l.ControlComponent.POSTFIX||m?.controlComponent===l.ControlComponent.POSTTEXTFIX,I=m?.controlComponent===l.ControlComponent.PLACEHOLDER,L=!!m?.controlId,C=this.draws.getPosition().getPositionList(),S=C[i],F=C[i-1],N=S&&F&&S.rowIndex===F.rowIndex;if((p||I)&&L&&N)return this.control.removeControl(i-1)}this.control.shrinkBoundary();const{startIndex:s,endIndex:a}=n,c=e[s],d=this.control.getDraw(),u=e[a+1],R=!!c?.originControlId&&!!c?.controlId&&c.originControlId!==c.controlId,h=R&&(c.controlComponent===l.ControlComponent.PREFIX||c.controlComponent===l.ControlComponent.PRE_TEXT||c.controlComponent===l.ControlComponent.PRETEXTFIX||c.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||c.controlComponent===l.ControlComponent.POSTFIX||c.controlComponent===l.ControlComponent.POST_TEXT||c.controlComponent===l.ControlComponent.POSTTEXTFIX||c.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||c.controlComponent===l.ControlComponent.PLACEHOLDER||c.controlComponent===l.ControlComponent.TEXTFIXLABEL),g=R&&c.control?.type===l.ControlType.BUTTON&&c.controlComponent===l.ControlComponent.VALUE,f=!!u?.originControlId&&!!u?.controlId&&u.originControlId!==u.controlId&&(u.controlComponent===l.ControlComponent.PREFIX||u.controlComponent===l.ControlComponent.PRE_TEXT||u.controlComponent===l.ControlComponent.PRETEXTFIX||u.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||u.controlComponent===l.ControlComponent.PLACEHOLDER||u.controlComponent===l.ControlComponent.TEXTFIXLABEL),T=!!u?.originControlId&&!!u?.controlId&&u.originControlId!==u.controlId&&u.control?.type===l.ControlType.BUTTON;if(t.key===l.KeyMap.Backspace){if(s===a&&(h||g))return this.control.removeControl(s);if(this.options.mode===l.EditorMode.FORM)this.strikeout();else return s!==a?e.slice(s,a+1).some(I=>I.controlComponent===l.ControlComponent.POSTTEXTFIX||I.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)?s:(d.spliceElementList(e,s+1,a-s),this.getValue().length||this.control.addPlaceholder(s),s===0&&e[0].type===l.ElementType.SPLIT_TAG?d.fixPosition(!0)??s:s):c.controlComponent===l.ControlComponent.PRETEXTFIX||c.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||c.controlComponent===l.ControlComponent.POSTTEXTFIX||c.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||c.controlComponent===l.ControlComponent.TEXTFIXLABEL||c.controlComponent===l.ControlComponent.PLACEHOLDER?s:(d.spliceElementList(e,s,1),this.getValue().length||this.control.addPlaceholder(s-1),s===1&&e[0].type===l.ElementType.SPLIT_TAG||s===0?d.fixPosition(!0)??s-1:s-1)}else if(t.key===l.KeyMap.Delete){if(s===a&&(h||g))return this.control.removeControl(s);if(s===a&&(f||T))return this.control.removeControl(a+1);if(this.options.mode===l.EditorMode.FORM)this.strikeout();else return s!==a?(d.spliceElementList(e,s+1,a-s),this.getValue().length||this.control.addPlaceholder(s),s===0&&e[0].type===l.ElementType.SPLIT_TAG?d.fixPosition(!0)??s:s):(u||d.getTd()?.linkTdNextId&&c.controlId&&this.removeNextControlElement(c.controlId),u&&((c.controlComponent===l.ControlComponent.PRETEXTFIX||c.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)&&(u.controlComponent===l.ControlComponent.PLACEHOLDER||u.controlComponent===l.ControlComponent.TEXTFIXLABEL)||u.controlComponent===l.ControlComponent.POSTTEXTFIX||u.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||c.controlComponent===l.ControlComponent.PLACEHOLDER||c.controlComponent===l.ControlComponent.TEXTFIXLABEL)?s:(d.spliceElementList(e,s+1,1),this.getValue().length||this.control.addPlaceholder(s),s===0&&e[0].type===l.ElementType.SPLIT_TAG?d.fixPosition(!0)??s:s))}return a}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();const{startIndex:t,endIndex:e}=this.control.getRange();if(t===e)return t;const n=this.control.getDraw(),i=this.control.getElementList();return n.spliceElementList(i,t+1,e-t),this.getValue().length||this.control.addPlaceholder(t),t}strikeout(t,e={},n={}){const{isIgnoreDisabledRule:i=!1}=t||{};if(!i&&(this.draws.isReadonly()||this.draws.isDisabled()))return;const s=this.ranges.getSelectionElementList(),a=this.position.getCursorPosition(),c=j(new Date).format("YYYY-MM-DD HH:mm:ss");if(s?.length){if(!this.element.strikeout){const d=s.findIndex(u=>!u.strikeout);s.forEach(u=>{u.deletePerson="SWJ",u.deleteTime=c,u.strikeout=!!~d}),this.draws.render({isSetCursor:!0,isCompute:!1,isDel:!0,isSubmitHistory:!1}),setTimeout(()=>{this.strikeoute()},100)}}else{const d=this.control.getElementList()[a.index];if(!this.control.getElementList()[a.index].strikeout&&d?.metrics.width>0){this.control.getElementList()[a.index].strikeout=!0,this.control.getElementList()[a.index].deletePerson="SWJ",this.control.getElementList()[a.index].deleteTime=c;const u=--a.index;setTimeout(()=>{this.strikeoute()},100),setTimeout(()=>{const h=u;this.draws.render({curIndex:h,isSetCursor:!0}),a.index=u,this.position.setCursorPosition(a),this.ranges.setRange(u,u)},100)}else{const{elementList:u,range:R}=this.control.mergeControl(n),h=R.startIndex;if(h>=0&&h<u.length&&u[h]?.metrics?.width!==void 0&&u[h].metrics.width<=0&&!u[h]?.strikeout){this.draws.spliceElementList(u,R.startIndex,1,[],{isIgnoreDeletedRule:e.isIgnoreDeletedRule});const g=!0,f=R.startIndex-1;this.draws.render({curIndex:f,isSetCursor:g}),a.index=f,delete a.value,this.position.setCursorPosition(a),this.ranges.setRange(f,f)}}}}strikeoute(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draws.isReadonly()||this.draws.isDisabled()))return;if(!this.ranges.getSelectionElementList()?.length){const{endIndex:r}=this.ranges.getRange(),a=this.draws.getElementList()[r];this.ranges.setDefaultStyle({strikeout:a.strikeout?!1:!this.ranges.getDefaultStyle()?.strikeout})}}}const Lh={indent:" ",divider:"────────────────"};class hr{draw;element;control;options;isPopup;inputModal=null;constructor(t,e){const n=e.getDraw();this.draw=n,this.options=n.getOptions(),this.element=t,this.control=e,this.isPopup=!1}setElement(t){this.element=t}getElement(){return this.element}getIsPopup(){return this.isPopup}getValue(t={}){const e=t.elementList||this.control.getElementList(),n=this.control.getValueRange(t);if(!n)return[];const i=[],{startIndex:r,endIndex:s}=n;for(let a=r;a<=s;a++){const c=e[a];c.controlComponent===l.ControlComponent.VALUE&&i.push(c)}return i}setValue(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return-1;const{elementList:i,range:r}=this.control.mergeControl(e),s=this.control.getDraw(),{startIndex:a}=r,d=i[a].controlId;let u=a;for(let p=a;p>=0;p--){const I=i[p];if(I.controlId!==d)break;if(I.controlComponent===l.ControlComponent.PREFIX){u=p;break}}let R=a;for(let p=a;p<i.length;p++){const I=i[p];if(I.controlId!==d){R=p;break}if(I.controlComponent===l.ControlComponent.POSTFIX){R=p;break}}const h=u+1,g=R-1;g>=h&&s.spliceElementList(i,h,g-h+1);const f=i[u],T=Dt(f,["control","controlId",...At]),m=u+1;for(let p=0;p<t.length;p++){const I={...T,...t[p],value:t[p].value===`
|
|
105
|
-
`?_:t[p].value,controlComponent:l.ControlComponent.VALUE};(I.color===this.options.control.bracketColor||I.color===this.options.control.placeholderColor)&&(I.color=this.options.defaultColor),wt(i,[I],u,{editorOptions:this.options}),s.spliceElementList(i,m+p,0,[I])}return m+t.length-1}keydown(t){if(this.control.getIsDisabledControl()||this.options.mode===l.EditorMode.FORM)return null;const e=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();const{startIndex:i}=n,r=e[i];if(t.key===l.KeyMap.Backspace||t.key===l.KeyMap.Delete){const s=r.controlId;let a=i,c=i;for(;a>0&&e[a-1].controlId===s;)a--;for(;c<e.length-1&&e[c+1].controlId===s;)c++;return this.draw.spliceElementList(e,a,c-a+1),a>0?a-1:0}return null}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();const{startIndex:t,endIndex:e}=this.control.getRange();if(t===e)return t;const n=this.control.getDraw(),i=this.control.getElementList();return n.spliceElementList(i,t+1,e-t),this.getValue().length||this.control.addPlaceholder(t),t}awake(){if(this.options.mode===l.EditorMode.PRINT||this.isPopup||this.control.getIsDisabledControl())return;let t=!1;const e=this.control.getElementList(),n=this.element.controlId;for(let i=0;i<e.length;i++){const r=e[i];r.controlId===n&&r.control&&r.control._justCreated&&(t=!0,delete r.control._justCreated)}t||this.showMenstrualHistoryDialog()}generateDisplayText(t){const{indent:e,divider:n}=
|
|
104
|
+
`+new Error().stack),e=!1}return t.apply(this,arguments)},t)}var Is={};function Ps(o,t){j.deprecationHandler!=null&&j.deprecationHandler(o,t),Is[o]||(Ls(t),Is[o]=!0)}j.suppressDeprecationWarnings=!1,j.deprecationHandler=null;function Le(o){return typeof Function<"u"&&o instanceof Function||Object.prototype.toString.call(o)==="[object Function]"}function Mc(o){var t,e;for(e in o)Ot(o,e)&&(t=o[e],Le(t)?this[e]=t:this["_"+e]=t);this._config=o,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function zo(o,t){var e=we({},o),n;for(n in t)Ot(t,n)&&(Ae(o[n])&&Ae(t[n])?(e[n]={},we(e[n],o[n]),we(e[n],t[n])):t[n]!=null?e[n]=t[n]:delete e[n]);for(n in o)Ot(o,n)&&!Ot(t,n)&&Ae(o[n])&&(e[n]=we({},e[n]));return e}function jo(o){o!=null&&this.set(o)}var qo;Object.keys?qo=Object.keys:qo=function(o){var t,e=[];for(t in o)Ot(o,t)&&e.push(t);return e};var Oc={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Cc(o,t,e){var n=this._calendar[o]||this._calendar.sameElse;return Le(n)?n.call(t,e):n}function Ie(o,t,e){var n=""+Math.abs(o),i=t-n.length,r=o>=0;return(r?e?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}var ti=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,kn=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ei={},cn={};function rt(o,t,e,n){var i=n;typeof n=="string"&&(i=function(){return this[n]()}),o&&(cn[o]=i),t&&(cn[t[0]]=function(){return Ie(i.apply(this,arguments),t[1],t[2])}),e&&(cn[e]=function(){return this.localeData().ordinal(i.apply(this,arguments),o)})}function Sc(o){return o.match(/\[[\s\S]/)?o.replace(/^\[|\]$/g,""):o.replace(/\\/g,"")}function Ec(o){var t=o.match(ti),e,n;for(e=0,n=t.length;e<n;e++)cn[t[e]]?t[e]=cn[t[e]]:t[e]=Sc(t[e]);return function(i){var r="",s;for(s=0;s<n;s++)r+=Le(t[s])?t[s].call(i,o):t[s];return r}}function Jn(o,t){return o.isValid()?(t=Ms(t,o.localeData()),ei[t]=ei[t]||Ec(t),ei[t](o)):o.localeData().invalidDate()}function Ms(o,t){var e=5;function n(i){return t.longDateFormat(i)||i}for(kn.lastIndex=0;e>=0&&kn.test(o);)o=o.replace(kn,n),kn.lastIndex=0,e-=1;return o}var Xc={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Nc(o){var t=this._longDateFormat[o],e=this._longDateFormat[o.toUpperCase()];return t||!e?t:(this._longDateFormat[o]=e.match(ti).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[o])}var Fc="Invalid date";function yc(){return this._invalidDate}var bc="%d",Wc=/\d{1,2}/;function Vc(o){return this._ordinal.replace("%d",o)}var Yc={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Dc(o,t,e,n){var i=this._relativeTime[e];return Le(i)?i(o,t,e,n):i.replace(/%d/i,o)}function Uc(o,t){var e=this._relativeTime[o>0?"future":"past"];return Le(e)?e(t):e.replace(/%s/i,t)}var Os={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ne(o){return typeof o=="string"?Os[o]||Os[o.toLowerCase()]:void 0}function ni(o){var t={},e,n;for(n in o)Ot(o,n)&&(e=ne(n),e&&(t[e]=o[n]));return t}var wc={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Zc(o){var t=[],e;for(e in o)Ot(o,e)&&t.push({unit:e,priority:wc[e]});return t.sort(function(n,i){return n.priority-i.priority}),t}var Cs=/\d/,jt=/\d\d/,Ss=/\d{3}/,oi=/\d{4}/,Bn=/[+-]?\d{6}/,Nt=/\d\d?/,Es=/\d\d\d\d?/,Xs=/\d\d\d\d\d\d?/,$n=/\d{1,3}/,ii=/\d{1,4}/,zn=/[+-]?\d{1,6}/,dn=/\d+/,jn=/[+-]?\d+/,Qc=/Z|[+-]\d\d:?\d\d/gi,qn=/Z|[+-]\d\d(?::?\d\d)?/gi,vc=/[+-]?\d+(\.\d{1,3})?/,Sn=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,un=/^[1-9]\d?/,si=/^([1-9]\d|\d)/,to;to={};function it(o,t,e){to[o]=Le(t)?t:function(n,i){return n&&e?e:t}}function Kc(o,t){return Ot(to,o)?to[o](t._strict,t._locale):new RegExp(Hc(o))}function Hc(o){return Ce(o.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r}))}function Ce(o){return o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function oe(o){return o<0?Math.ceil(o)||0:Math.floor(o)}function ft(o){var t=+o,e=0;return t!==0&&isFinite(t)&&(e=oe(t)),e}var ri={};function Et(o,t){var e,n=t,i;for(typeof o=="string"&&(o=[o]),Oe(t)&&(n=function(r,s){s[t]=ft(r)}),i=o.length,e=0;e<i;e++)ri[o[e]]=n}function En(o,t){Et(o,function(e,n,i,r){i._w=i._w||{},t(e,i._w,i,r)})}function _c(o,t,e){t!=null&&Ot(ri,o)&&ri[o](t,e._a,e,o)}function eo(o){return o%4===0&&o%100!==0||o%400===0}var Gt=0,Se=1,Pe=2,Kt=3,ae=4,Ee=5,ke=6,xc=7,Gc=8;rt("Y",0,0,function(){var o=this.year();return o<=9999?Ie(o,4):"+"+o}),rt(0,["YY",2],0,function(){return this.year()%100}),rt(0,["YYYY",4],0,"year"),rt(0,["YYYYY",5],0,"year"),rt(0,["YYYYYY",6,!0],0,"year"),it("Y",jn),it("YY",Nt,jt),it("YYYY",ii,oi),it("YYYYY",zn,Bn),it("YYYYYY",zn,Bn),Et(["YYYYY","YYYYYY"],Gt),Et("YYYY",function(o,t){t[Gt]=o.length===2?j.parseTwoDigitYear(o):ft(o)}),Et("YY",function(o,t){t[Gt]=j.parseTwoDigitYear(o)}),Et("Y",function(o,t){t[Gt]=parseInt(o,10)});function Xn(o){return eo(o)?366:365}j.parseTwoDigitYear=function(o){return ft(o)+(ft(o)>68?1900:2e3)};var Ns=Rn("FullYear",!0);function Ac(){return eo(this.year())}function Rn(o,t){return function(e){return e!=null?(Fs(this,o,e),j.updateOffset(this,t),this):Nn(this,o)}}function Nn(o,t){if(!o.isValid())return NaN;var e=o._d,n=o._isUTC;switch(t){case"Milliseconds":return n?e.getUTCMilliseconds():e.getMilliseconds();case"Seconds":return n?e.getUTCSeconds():e.getSeconds();case"Minutes":return n?e.getUTCMinutes():e.getMinutes();case"Hours":return n?e.getUTCHours():e.getHours();case"Date":return n?e.getUTCDate():e.getDate();case"Day":return n?e.getUTCDay():e.getDay();case"Month":return n?e.getUTCMonth():e.getMonth();case"FullYear":return n?e.getUTCFullYear():e.getFullYear();default:return NaN}}function Fs(o,t,e){var n,i,r,s,a;if(!(!o.isValid()||isNaN(e))){switch(n=o._d,i=o._isUTC,t){case"Milliseconds":return void(i?n.setUTCMilliseconds(e):n.setMilliseconds(e));case"Seconds":return void(i?n.setUTCSeconds(e):n.setSeconds(e));case"Minutes":return void(i?n.setUTCMinutes(e):n.setMinutes(e));case"Hours":return void(i?n.setUTCHours(e):n.setHours(e));case"Date":return void(i?n.setUTCDate(e):n.setDate(e));case"FullYear":break;default:return}r=e,s=o.month(),a=o.date(),a=a===29&&s===1&&!eo(r)?28:a,i?n.setUTCFullYear(r,s,a):n.setFullYear(r,s,a)}}function kc(o){return o=ne(o),Le(this[o])?this[o]():this}function Jc(o,t){if(typeof o=="object"){o=ni(o);var e=Zc(o),n,i=e.length;for(n=0;n<i;n++)this[e[n].unit](o[e[n].unit])}else if(o=ne(o),Le(this[o]))return this[o](t);return this}function Bc(o,t){return(o%t+t)%t}var Zt;Array.prototype.indexOf?Zt=Array.prototype.indexOf:Zt=function(o){var t;for(t=0;t<this.length;++t)if(this[t]===o)return t;return-1};function li(o,t){if(isNaN(o)||isNaN(t))return NaN;var e=Bc(t,12);return o+=(t-e)/12,e===1?eo(o)?29:28:31-e%7%2}rt("M",["MM",2],"Mo",function(){return this.month()+1}),rt("MMM",0,0,function(o){return this.localeData().monthsShort(this,o)}),rt("MMMM",0,0,function(o){return this.localeData().months(this,o)}),it("M",Nt,un),it("MM",Nt,jt),it("MMM",function(o,t){return t.monthsShortRegex(o)}),it("MMMM",function(o,t){return t.monthsRegex(o)}),Et(["M","MM"],function(o,t){t[Se]=ft(o)-1}),Et(["MMM","MMMM"],function(o,t,e,n){var i=e._locale.monthsParse(o,n,e._strict);i!=null?t[Se]=i:Rt(e).invalidMonth=o});var $c="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ys="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),bs=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,zc=Sn,jc=Sn;function qc(o,t){return o?re(this._months)?this._months[o.month()]:this._months[(this._months.isFormat||bs).test(t)?"format":"standalone"][o.month()]:re(this._months)?this._months:this._months.standalone}function td(o,t){return o?re(this._monthsShort)?this._monthsShort[o.month()]:this._monthsShort[bs.test(t)?"format":"standalone"][o.month()]:re(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ed(o,t,e){var n,i,r,s=o.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)r=pe([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(r,"").toLocaleLowerCase();return e?t==="MMM"?(i=Zt.call(this._shortMonthsParse,s),i!==-1?i:null):(i=Zt.call(this._longMonthsParse,s),i!==-1?i:null):t==="MMM"?(i=Zt.call(this._shortMonthsParse,s),i!==-1?i:(i=Zt.call(this._longMonthsParse,s),i!==-1?i:null)):(i=Zt.call(this._longMonthsParse,s),i!==-1?i:(i=Zt.call(this._shortMonthsParse,s),i!==-1?i:null))}function nd(o,t,e){var n,i,r;if(this._monthsParseExact)return ed.call(this,o,t,e);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(i=pe([2e3,n]),e&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!e&&!this._monthsParse[n]&&(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[n]=new RegExp(r.replace(".",""),"i")),e&&t==="MMMM"&&this._longMonthsParse[n].test(o))return n;if(e&&t==="MMM"&&this._shortMonthsParse[n].test(o))return n;if(!e&&this._monthsParse[n].test(o))return n}}function Ws(o,t){if(!o.isValid())return o;if(typeof t=="string"){if(/^\d+$/.test(t))t=ft(t);else if(t=o.localeData().monthsParse(t),!Oe(t))return o}var e=t,n=o.date();return n=n<29?n:Math.min(n,li(o.year(),e)),o._isUTC?o._d.setUTCMonth(e,n):o._d.setMonth(e,n),o}function Vs(o){return o!=null?(Ws(this,o),j.updateOffset(this,!0),this):Nn(this,"Month")}function od(){return li(this.year(),this.month())}function id(o){return this._monthsParseExact?(Ot(this,"_monthsRegex")||Ys.call(this),o?this._monthsShortStrictRegex:this._monthsShortRegex):(Ot(this,"_monthsShortRegex")||(this._monthsShortRegex=zc),this._monthsShortStrictRegex&&o?this._monthsShortStrictRegex:this._monthsShortRegex)}function sd(o){return this._monthsParseExact?(Ot(this,"_monthsRegex")||Ys.call(this),o?this._monthsStrictRegex:this._monthsRegex):(Ot(this,"_monthsRegex")||(this._monthsRegex=jc),this._monthsStrictRegex&&o?this._monthsStrictRegex:this._monthsRegex)}function Ys(){function o(c,d){return d.length-c.length}var t=[],e=[],n=[],i,r,s,a;for(i=0;i<12;i++)r=pe([2e3,i]),s=Ce(this.monthsShort(r,"")),a=Ce(this.months(r,"")),t.push(s),e.push(a),n.push(a),n.push(s);t.sort(o),e.sort(o),n.sort(o),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+e.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function rd(o,t,e,n,i,r,s){var a;return o<100&&o>=0?(a=new Date(o+400,t,e,n,i,r,s),isFinite(a.getFullYear())&&a.setFullYear(o)):a=new Date(o,t,e,n,i,r,s),a}function Fn(o){var t,e;return o<100&&o>=0?(e=Array.prototype.slice.call(arguments),e[0]=o+400,t=new Date(Date.UTC.apply(null,e)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(o)):t=new Date(Date.UTC.apply(null,arguments)),t}function no(o,t,e){var n=7+t-e,i=(7+Fn(o,0,n).getUTCDay()-t)%7;return-i+n-1}function Ds(o,t,e,n,i){var r=(7+e-n)%7,s=no(o,n,i),a=1+7*(t-1)+r+s,c,d;return a<=0?(c=o-1,d=Xn(c)+a):a>Xn(o)?(c=o+1,d=a-Xn(o)):(c=o,d=a),{year:c,dayOfYear:d}}function yn(o,t,e){var n=no(o.year(),t,e),i=Math.floor((o.dayOfYear()-n-1)/7)+1,r,s;return i<1?(s=o.year()-1,r=i+Xe(s,t,e)):i>Xe(o.year(),t,e)?(r=i-Xe(o.year(),t,e),s=o.year()+1):(s=o.year(),r=i),{week:r,year:s}}function Xe(o,t,e){var n=no(o,t,e),i=no(o+1,t,e);return(Xn(o)-n+i)/7}rt("w",["ww",2],"wo","week"),rt("W",["WW",2],"Wo","isoWeek"),it("w",Nt,un),it("ww",Nt,jt),it("W",Nt,un),it("WW",Nt,jt),En(["w","ww","W","WW"],function(o,t,e,n){t[n.substr(0,1)]=ft(o)});function ld(o){return yn(o,this._week.dow,this._week.doy).week}var ad={dow:0,doy:6};function cd(){return this._week.dow}function dd(){return this._week.doy}function ud(o){var t=this.localeData().week(this);return o==null?t:this.add((o-t)*7,"d")}function Rd(o){var t=yn(this,1,4).week;return o==null?t:this.add((o-t)*7,"d")}rt("d",0,"do","day"),rt("dd",0,0,function(o){return this.localeData().weekdaysMin(this,o)}),rt("ddd",0,0,function(o){return this.localeData().weekdaysShort(this,o)}),rt("dddd",0,0,function(o){return this.localeData().weekdays(this,o)}),rt("e",0,0,"weekday"),rt("E",0,0,"isoWeekday"),it("d",Nt),it("e",Nt),it("E",Nt),it("dd",function(o,t){return t.weekdaysMinRegex(o)}),it("ddd",function(o,t){return t.weekdaysShortRegex(o)}),it("dddd",function(o,t){return t.weekdaysRegex(o)}),En(["dd","ddd","dddd"],function(o,t,e,n){var i=e._locale.weekdaysParse(o,n,e._strict);i!=null?t.d=i:Rt(e).invalidWeekday=o}),En(["d","e","E"],function(o,t,e,n){t[n]=ft(o)});function hd(o,t){return typeof o!="string"?o:isNaN(o)?(o=t.weekdaysParse(o),typeof o=="number"?o:null):parseInt(o,10)}function gd(o,t){return typeof o=="string"?t.weekdaysParse(o)%7||7:isNaN(o)?null:o}function ai(o,t){return o.slice(t,7).concat(o.slice(0,t))}var fd="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Us="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Td="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),md=Sn,pd=Sn,Ld=Sn;function Id(o,t){var e=re(this._weekdays)?this._weekdays:this._weekdays[o&&o!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return o===!0?ai(e,this._week.dow):o?e[o.day()]:e}function Pd(o){return o===!0?ai(this._weekdaysShort,this._week.dow):o?this._weekdaysShort[o.day()]:this._weekdaysShort}function Md(o){return o===!0?ai(this._weekdaysMin,this._week.dow):o?this._weekdaysMin[o.day()]:this._weekdaysMin}function Od(o,t,e){var n,i,r,s=o.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)r=pe([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(r,"").toLocaleLowerCase();return e?t==="dddd"?(i=Zt.call(this._weekdaysParse,s),i!==-1?i:null):t==="ddd"?(i=Zt.call(this._shortWeekdaysParse,s),i!==-1?i:null):(i=Zt.call(this._minWeekdaysParse,s),i!==-1?i:null):t==="dddd"?(i=Zt.call(this._weekdaysParse,s),i!==-1||(i=Zt.call(this._shortWeekdaysParse,s),i!==-1)?i:(i=Zt.call(this._minWeekdaysParse,s),i!==-1?i:null)):t==="ddd"?(i=Zt.call(this._shortWeekdaysParse,s),i!==-1||(i=Zt.call(this._weekdaysParse,s),i!==-1)?i:(i=Zt.call(this._minWeekdaysParse,s),i!==-1?i:null)):(i=Zt.call(this._minWeekdaysParse,s),i!==-1||(i=Zt.call(this._weekdaysParse,s),i!==-1)?i:(i=Zt.call(this._shortWeekdaysParse,s),i!==-1?i:null))}function Cd(o,t,e){var n,i,r;if(this._weekdaysParseExact)return Od.call(this,o,t,e);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=pe([2e3,1]).day(n),e&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(r.replace(".",""),"i")),e&&t==="dddd"&&this._fullWeekdaysParse[n].test(o))return n;if(e&&t==="ddd"&&this._shortWeekdaysParse[n].test(o))return n;if(e&&t==="dd"&&this._minWeekdaysParse[n].test(o))return n;if(!e&&this._weekdaysParse[n].test(o))return n}}function Sd(o){if(!this.isValid())return o!=null?this:NaN;var t=Nn(this,"Day");return o!=null?(o=hd(o,this.localeData()),this.add(o-t,"d")):t}function Ed(o){if(!this.isValid())return o!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return o==null?t:this.add(o-t,"d")}function Xd(o){if(!this.isValid())return o!=null?this:NaN;if(o!=null){var t=gd(o,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Nd(o){return this._weekdaysParseExact?(Ot(this,"_weekdaysRegex")||ci.call(this),o?this._weekdaysStrictRegex:this._weekdaysRegex):(Ot(this,"_weekdaysRegex")||(this._weekdaysRegex=md),this._weekdaysStrictRegex&&o?this._weekdaysStrictRegex:this._weekdaysRegex)}function Fd(o){return this._weekdaysParseExact?(Ot(this,"_weekdaysRegex")||ci.call(this),o?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ot(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=pd),this._weekdaysShortStrictRegex&&o?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function yd(o){return this._weekdaysParseExact?(Ot(this,"_weekdaysRegex")||ci.call(this),o?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ot(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ld),this._weekdaysMinStrictRegex&&o?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ci(){function o(u,R){return R.length-u.length}var t=[],e=[],n=[],i=[],r,s,a,c,d;for(r=0;r<7;r++)s=pe([2e3,1]).day(r),a=Ce(this.weekdaysMin(s,"")),c=Ce(this.weekdaysShort(s,"")),d=Ce(this.weekdays(s,"")),t.push(a),e.push(c),n.push(d),i.push(a),i.push(c),i.push(d);t.sort(o),e.sort(o),n.sort(o),i.sort(o),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+e.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function di(){return this.hours()%12||12}function bd(){return this.hours()||24}rt("H",["HH",2],0,"hour"),rt("h",["hh",2],0,di),rt("k",["kk",2],0,bd),rt("hmm",0,0,function(){return""+di.apply(this)+Ie(this.minutes(),2)}),rt("hmmss",0,0,function(){return""+di.apply(this)+Ie(this.minutes(),2)+Ie(this.seconds(),2)}),rt("Hmm",0,0,function(){return""+this.hours()+Ie(this.minutes(),2)}),rt("Hmmss",0,0,function(){return""+this.hours()+Ie(this.minutes(),2)+Ie(this.seconds(),2)});function ws(o,t){rt(o,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}ws("a",!0),ws("A",!1);function Zs(o,t){return t._meridiemParse}it("a",Zs),it("A",Zs),it("H",Nt,si),it("h",Nt,un),it("k",Nt,un),it("HH",Nt,jt),it("hh",Nt,jt),it("kk",Nt,jt),it("hmm",Es),it("hmmss",Xs),it("Hmm",Es),it("Hmmss",Xs),Et(["H","HH"],Kt),Et(["k","kk"],function(o,t,e){var n=ft(o);t[Kt]=n===24?0:n}),Et(["a","A"],function(o,t,e){e._isPm=e._locale.isPM(o),e._meridiem=o}),Et(["h","hh"],function(o,t,e){t[Kt]=ft(o),Rt(e).bigHour=!0}),Et("hmm",function(o,t,e){var n=o.length-2;t[Kt]=ft(o.substr(0,n)),t[ae]=ft(o.substr(n)),Rt(e).bigHour=!0}),Et("hmmss",function(o,t,e){var n=o.length-4,i=o.length-2;t[Kt]=ft(o.substr(0,n)),t[ae]=ft(o.substr(n,2)),t[Ee]=ft(o.substr(i)),Rt(e).bigHour=!0}),Et("Hmm",function(o,t,e){var n=o.length-2;t[Kt]=ft(o.substr(0,n)),t[ae]=ft(o.substr(n))}),Et("Hmmss",function(o,t,e){var n=o.length-4,i=o.length-2;t[Kt]=ft(o.substr(0,n)),t[ae]=ft(o.substr(n,2)),t[Ee]=ft(o.substr(i))});function Wd(o){return(o+"").toLowerCase().charAt(0)==="p"}var Vd=/[ap]\.?m?\.?/i,Yd=Rn("Hours",!0);function Dd(o,t,e){return o>11?e?"pm":"PM":e?"am":"AM"}var Qs={calendar:Oc,longDateFormat:Xc,invalidDate:Fc,ordinal:bc,dayOfMonthOrdinalParse:Wc,relativeTime:Yc,months:$c,monthsShort:ys,week:ad,weekdays:fd,weekdaysMin:Td,weekdaysShort:Us,meridiemParse:Vd},Wt={},bn={},Wn;function Ud(o,t){var e,n=Math.min(o.length,t.length);for(e=0;e<n;e+=1)if(o[e]!==t[e])return e;return n}function vs(o){return o&&o.toLowerCase().replace("_","-")}function wd(o){for(var t=0,e,n,i,r;t<o.length;){for(r=vs(o[t]).split("-"),e=r.length,n=vs(o[t+1]),n=n?n.split("-"):null;e>0;){if(i=oo(r.slice(0,e).join("-")),i)return i;if(n&&n.length>=e&&Ud(r,n)>=e-1)break;e--}t++}return Wn}function Zd(o){return!!(o&&o.match("^[^/\\\\]*$"))}function oo(o){var t=null,e;if(Wt[o]===void 0&&typeof module<"u"&&module&&module.exports&&Zd(o))try{t=Wn._abbr,e=require,e("./locale/"+o),Ze(t)}catch{Wt[o]=null}return Wt[o]}function Ze(o,t){var e;return o&&(Jt(t)?e=Ne(o):e=ui(o,t),e?Wn=e:typeof console<"u"&&console.warn&&console.warn("Locale "+o+" not found. Did you forget to load it?")),Wn._abbr}function ui(o,t){if(t!==null){var e,n=Qs;if(t.abbr=o,Wt[o]!=null)Ps("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Wt[o]._config;else if(t.parentLocale!=null)if(Wt[t.parentLocale]!=null)n=Wt[t.parentLocale]._config;else if(e=oo(t.parentLocale),e!=null)n=e._config;else return bn[t.parentLocale]||(bn[t.parentLocale]=[]),bn[t.parentLocale].push({name:o,config:t}),null;return Wt[o]=new jo(zo(n,t)),bn[o]&&bn[o].forEach(function(i){ui(i.name,i.config)}),Ze(o),Wt[o]}else return delete Wt[o],null}function Qd(o,t){if(t!=null){var e,n,i=Qs;Wt[o]!=null&&Wt[o].parentLocale!=null?Wt[o].set(zo(Wt[o]._config,t)):(n=oo(o),n!=null&&(i=n._config),t=zo(i,t),n==null&&(t.abbr=o),e=new jo(t),e.parentLocale=Wt[o],Wt[o]=e),Ze(o)}else Wt[o]!=null&&(Wt[o].parentLocale!=null?(Wt[o]=Wt[o].parentLocale,o===Ze()&&Ze(o)):Wt[o]!=null&&delete Wt[o]);return Wt[o]}function Ne(o){var t;if(o&&o._locale&&o._locale._abbr&&(o=o._locale._abbr),!o)return Wn;if(!re(o)){if(t=oo(o),t)return t;o=[o]}return wd(o)}function vd(){return qo(Wt)}function Ri(o){var t,e=o._a;return e&&Rt(o).overflow===-2&&(t=e[Se]<0||e[Se]>11?Se:e[Pe]<1||e[Pe]>li(e[Gt],e[Se])?Pe:e[Kt]<0||e[Kt]>24||e[Kt]===24&&(e[ae]!==0||e[Ee]!==0||e[ke]!==0)?Kt:e[ae]<0||e[ae]>59?ae:e[Ee]<0||e[Ee]>59?Ee:e[ke]<0||e[ke]>999?ke:-1,Rt(o)._overflowDayOfYear&&(t<Gt||t>Pe)&&(t=Pe),Rt(o)._overflowWeeks&&t===-1&&(t=xc),Rt(o)._overflowWeekday&&t===-1&&(t=Gc),Rt(o).overflow=t),o}var Kd=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Hd=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_d=/Z|[+-]\d\d(?::?\d\d)?/,io=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],hi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],xd=/^\/?Date\((-?\d+)/i,Gd=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ad={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ks(o){var t,e,n=o._i,i=Kd.exec(n)||Hd.exec(n),r,s,a,c,d=io.length,u=hi.length;if(i){for(Rt(o).iso=!0,t=0,e=d;t<e;t++)if(io[t][1].exec(i[1])){s=io[t][0],r=io[t][2]!==!1;break}if(s==null){o._isValid=!1;return}if(i[3]){for(t=0,e=u;t<e;t++)if(hi[t][1].exec(i[3])){a=(i[2]||" ")+hi[t][0];break}if(a==null){o._isValid=!1;return}}if(!r&&a!=null){o._isValid=!1;return}if(i[4])if(_d.exec(i[4]))c="Z";else{o._isValid=!1;return}o._f=s+(a||"")+(c||""),fi(o)}else o._isValid=!1}function kd(o,t,e,n,i,r){var s=[Jd(o),ys.indexOf(t),parseInt(e,10),parseInt(n,10),parseInt(i,10)];return r&&s.push(parseInt(r,10)),s}function Jd(o){var t=parseInt(o,10);return t<=49?2e3+t:t<=999?1900+t:t}function Bd(o){return o.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function $d(o,t,e){if(o){var n=Us.indexOf(o),i=new Date(t[0],t[1],t[2]).getDay();if(n!==i)return Rt(e).weekdayMismatch=!0,e._isValid=!1,!1}return!0}function zd(o,t,e){if(o)return Ad[o];if(t)return 0;var n=parseInt(e,10),i=n%100,r=(n-i)/100;return r*60+i}function Hs(o){var t=Gd.exec(Bd(o._i)),e;if(t){if(e=kd(t[4],t[3],t[2],t[5],t[6],t[7]),!$d(t[1],e,o))return;o._a=e,o._tzm=zd(t[8],t[9],t[10]),o._d=Fn.apply(null,o._a),o._d.setUTCMinutes(o._d.getUTCMinutes()-o._tzm),Rt(o).rfc2822=!0}else o._isValid=!1}function jd(o){var t=xd.exec(o._i);if(t!==null){o._d=new Date(+t[1]);return}if(Ks(o),o._isValid===!1)delete o._isValid;else return;if(Hs(o),o._isValid===!1)delete o._isValid;else return;o._strict?o._isValid=!1:j.createFromInputFallback(o)}j.createFromInputFallback=ee("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(o){o._d=new Date(o._i+(o._useUTC?" UTC":""))});function hn(o,t,e){return o??t??e}function qd(o){var t=new Date(j.now());return o._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function gi(o){var t,e,n=[],i,r,s;if(!o._d){for(i=qd(o),o._w&&o._a[Pe]==null&&o._a[Se]==null&&tu(o),o._dayOfYear!=null&&(s=hn(o._a[Gt],i[Gt]),(o._dayOfYear>Xn(s)||o._dayOfYear===0)&&(Rt(o)._overflowDayOfYear=!0),e=Fn(s,0,o._dayOfYear),o._a[Se]=e.getUTCMonth(),o._a[Pe]=e.getUTCDate()),t=0;t<3&&o._a[t]==null;++t)o._a[t]=n[t]=i[t];for(;t<7;t++)o._a[t]=n[t]=o._a[t]==null?t===2?1:0:o._a[t];o._a[Kt]===24&&o._a[ae]===0&&o._a[Ee]===0&&o._a[ke]===0&&(o._nextDay=!0,o._a[Kt]=0),o._d=(o._useUTC?Fn:rd).apply(null,n),r=o._useUTC?o._d.getUTCDay():o._d.getDay(),o._tzm!=null&&o._d.setUTCMinutes(o._d.getUTCMinutes()-o._tzm),o._nextDay&&(o._a[Kt]=24),o._w&&typeof o._w.d<"u"&&o._w.d!==r&&(Rt(o).weekdayMismatch=!0)}}function tu(o){var t,e,n,i,r,s,a,c,d;t=o._w,t.GG!=null||t.W!=null||t.E!=null?(r=1,s=4,e=hn(t.GG,o._a[Gt],yn(Ft(),1,4).year),n=hn(t.W,1),i=hn(t.E,1),(i<1||i>7)&&(c=!0)):(r=o._locale._week.dow,s=o._locale._week.doy,d=yn(Ft(),r,s),e=hn(t.gg,o._a[Gt],d.year),n=hn(t.w,d.week),t.d!=null?(i=t.d,(i<0||i>6)&&(c=!0)):t.e!=null?(i=t.e+r,(t.e<0||t.e>6)&&(c=!0)):i=r),n<1||n>Xe(e,r,s)?Rt(o)._overflowWeeks=!0:c!=null?Rt(o)._overflowWeekday=!0:(a=Ds(e,n,i,r,s),o._a[Gt]=a.year,o._dayOfYear=a.dayOfYear)}j.ISO_8601=function(){},j.RFC_2822=function(){};function fi(o){if(o._f===j.ISO_8601){Ks(o);return}if(o._f===j.RFC_2822){Hs(o);return}o._a=[],Rt(o).empty=!0;var t=""+o._i,e,n,i,r,s,a=t.length,c=0,d,u;for(i=Ms(o._f,o._locale).match(ti)||[],u=i.length,e=0;e<u;e++)r=i[e],n=(t.match(Kc(r,o))||[])[0],n&&(s=t.substr(0,t.indexOf(n)),s.length>0&&Rt(o).unusedInput.push(s),t=t.slice(t.indexOf(n)+n.length),c+=n.length),cn[r]?(n?Rt(o).empty=!1:Rt(o).unusedTokens.push(r),_c(r,n,o)):o._strict&&!n&&Rt(o).unusedTokens.push(r);Rt(o).charsLeftOver=a-c,t.length>0&&Rt(o).unusedInput.push(t),o._a[Kt]<=12&&Rt(o).bigHour===!0&&o._a[Kt]>0&&(Rt(o).bigHour=void 0),Rt(o).parsedDateParts=o._a.slice(0),Rt(o).meridiem=o._meridiem,o._a[Kt]=eu(o._locale,o._a[Kt],o._meridiem),d=Rt(o).era,d!==null&&(o._a[Gt]=o._locale.erasConvertYear(d,o._a[Gt])),gi(o),Ri(o)}function eu(o,t,e){var n;return e==null?t:o.meridiemHour!=null?o.meridiemHour(t,e):(o.isPM!=null&&(n=o.isPM(e),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function nu(o){var t,e,n,i,r,s,a=!1,c=o._f.length;if(c===0){Rt(o).invalidFormat=!0,o._d=new Date(NaN);return}for(i=0;i<c;i++)r=0,s=!1,t=$o({},o),o._useUTC!=null&&(t._useUTC=o._useUTC),t._f=o._f[i],fi(t),Jo(t)&&(s=!0),r+=Rt(t).charsLeftOver,r+=Rt(t).unusedTokens.length*10,Rt(t).score=r,a?r<n&&(n=r,e=t):(n==null||r<n||s)&&(n=r,e=t,s&&(a=!0));we(o,e||t)}function ou(o){if(!o._d){var t=ni(o._i),e=t.day===void 0?t.date:t.day;o._a=ms([t.year,t.month,e,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),gi(o)}}function iu(o){var t=new Cn(Ri(_s(o)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function _s(o){var t=o._i,e=o._f;return o._locale=o._locale||Ne(o._l),t===null||e===void 0&&t===""?An({nullInput:!0}):(typeof t=="string"&&(o._i=t=o._locale.preparse(t)),le(t)?new Cn(Ri(t)):(On(t)?o._d=t:re(e)?nu(o):e?fi(o):su(o),Jo(o)||(o._d=null),o))}function su(o){var t=o._i;Jt(t)?o._d=new Date(j.now()):On(t)?o._d=new Date(t.valueOf()):typeof t=="string"?jd(o):re(t)?(o._a=ms(t.slice(0),function(e){return parseInt(e,10)}),gi(o)):Ae(t)?ou(o):Oe(t)?o._d=new Date(t):j.createFromInputFallback(o)}function xs(o,t,e,n,i){var r={};return(t===!0||t===!1)&&(n=t,t=void 0),(e===!0||e===!1)&&(n=e,e=void 0),(Ae(o)&&Ao(o)||re(o)&&o.length===0)&&(o=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=e,r._i=o,r._f=t,r._strict=n,iu(r)}function Ft(o,t,e,n){return xs(o,t,e,n,!1)}var ru=ee("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var o=Ft.apply(null,arguments);return this.isValid()&&o.isValid()?o<this?this:o:An()}),lu=ee("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var o=Ft.apply(null,arguments);return this.isValid()&&o.isValid()?o>this?this:o:An()});function Gs(o,t){var e,n;if(t.length===1&&re(t[0])&&(t=t[0]),!t.length)return Ft();for(e=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][o](e))&&(e=t[n]);return e}function au(){var o=[].slice.call(arguments,0);return Gs("isBefore",o)}function cu(){var o=[].slice.call(arguments,0);return Gs("isAfter",o)}var du=function(){return Date.now?Date.now():+new Date},Vn=["year","quarter","month","week","day","hour","minute","second","millisecond"];function uu(o){var t,e=!1,n,i=Vn.length;for(t in o)if(Ot(o,t)&&!(Zt.call(Vn,t)!==-1&&(o[t]==null||!isNaN(o[t]))))return!1;for(n=0;n<i;++n)if(o[Vn[n]]){if(e)return!1;parseFloat(o[Vn[n]])!==ft(o[Vn[n]])&&(e=!0)}return!0}function Ru(){return this._isValid}function hu(){return ce(NaN)}function so(o){var t=ni(o),e=t.year||0,n=t.quarter||0,i=t.month||0,r=t.week||t.isoWeek||0,s=t.day||0,a=t.hour||0,c=t.minute||0,d=t.second||0,u=t.millisecond||0;this._isValid=uu(t),this._milliseconds=+u+d*1e3+c*6e4+a*1e3*60*60,this._days=+s+r*7,this._months=+i+n*3+e*12,this._data={},this._locale=Ne(),this._bubble()}function ro(o){return o instanceof so}function Ti(o){return o<0?Math.round(-1*o)*-1:Math.round(o)}function gu(o,t,e){var n=Math.min(o.length,t.length),i=Math.abs(o.length-t.length),r=0,s;for(s=0;s<n;s++)ft(o[s])!==ft(t[s])&&r++;return r+i}function As(o,t){rt(o,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+Ie(~~(e/60),2)+t+Ie(~~e%60,2)})}As("Z",":"),As("ZZ",""),it("Z",qn),it("ZZ",qn),Et(["Z","ZZ"],function(o,t,e){e._useUTC=!0,e._tzm=mi(qn,o)});var fu=/([\+\-]|\d\d)/gi;function mi(o,t){var e=(t||"").match(o),n,i,r;return e===null?null:(n=e[e.length-1]||[],i=(n+"").match(fu)||["-",0,0],r=+(i[1]*60)+ft(i[2]),r===0?0:i[0]==="+"?r:-r)}function pi(o,t){var e,n;return t._isUTC?(e=t.clone(),n=(le(o)||On(o)?o.valueOf():Ft(o).valueOf())-e.valueOf(),e._d.setTime(e._d.valueOf()+n),j.updateOffset(e,!1),e):Ft(o).local()}function Li(o){return-Math.round(o._d.getTimezoneOffset())}j.updateOffset=function(){};function Tu(o,t,e){var n=this._offset||0,i;if(!this.isValid())return o!=null?this:NaN;if(o!=null){if(typeof o=="string"){if(o=mi(qn,o),o===null)return this}else Math.abs(o)<16&&!e&&(o=o*60);return!this._isUTC&&t&&(i=Li(this)),this._offset=o,this._isUTC=!0,i!=null&&this.add(i,"m"),n!==o&&(!t||this._changeInProgress?$s(this,ce(o-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,j.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:Li(this)}function mu(o,t){return o!=null?(typeof o!="string"&&(o=-o),this.utcOffset(o,t),this):-this.utcOffset()}function pu(o){return this.utcOffset(0,o)}function Lu(o){return this._isUTC&&(this.utcOffset(0,o),this._isUTC=!1,o&&this.subtract(Li(this),"m")),this}function Iu(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var o=mi(Qc,this._i);o!=null?this.utcOffset(o):this.utcOffset(0,!0)}return this}function Pu(o){return this.isValid()?(o=o?Ft(o).utcOffset():0,(this.utcOffset()-o)%60===0):!1}function Mu(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ou(){if(!Jt(this._isDSTShifted))return this._isDSTShifted;var o={},t;return $o(o,this),o=_s(o),o._a?(t=o._isUTC?pe(o._a):Ft(o._a),this._isDSTShifted=this.isValid()&&gu(o._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Cu(){return this.isValid()?!this._isUTC:!1}function Su(){return this.isValid()?this._isUTC:!1}function ks(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Eu=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Xu=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ce(o,t){var e=o,n=null,i,r,s;return ro(o)?e={ms:o._milliseconds,d:o._days,M:o._months}:Oe(o)||!isNaN(+o)?(e={},t?e[t]=+o:e.milliseconds=+o):(n=Eu.exec(o))?(i=n[1]==="-"?-1:1,e={y:0,d:ft(n[Pe])*i,h:ft(n[Kt])*i,m:ft(n[ae])*i,s:ft(n[Ee])*i,ms:ft(Ti(n[ke]*1e3))*i}):(n=Xu.exec(o))?(i=n[1]==="-"?-1:1,e={y:Je(n[2],i),M:Je(n[3],i),w:Je(n[4],i),d:Je(n[5],i),h:Je(n[6],i),m:Je(n[7],i),s:Je(n[8],i)}):e==null?e={}:typeof e=="object"&&("from"in e||"to"in e)&&(s=Nu(Ft(e.from),Ft(e.to)),e={},e.ms=s.milliseconds,e.M=s.months),r=new so(e),ro(o)&&Ot(o,"_locale")&&(r._locale=o._locale),ro(o)&&Ot(o,"_isValid")&&(r._isValid=o._isValid),r}ce.fn=so.prototype,ce.invalid=hu;function Je(o,t){var e=o&&parseFloat(o.replace(",","."));return(isNaN(e)?0:e)*t}function Js(o,t){var e={};return e.months=t.month()-o.month()+(t.year()-o.year())*12,o.clone().add(e.months,"M").isAfter(t)&&--e.months,e.milliseconds=+t-+o.clone().add(e.months,"M"),e}function Nu(o,t){var e;return o.isValid()&&t.isValid()?(t=pi(t,o),o.isBefore(t)?e=Js(o,t):(e=Js(t,o),e.milliseconds=-e.milliseconds,e.months=-e.months),e):{milliseconds:0,months:0}}function Bs(o,t){return function(e,n){var i,r;return n!==null&&!isNaN(+n)&&(Ps(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=e,e=n,n=r),i=ce(e,n),$s(this,i,o),this}}function $s(o,t,e,n){var i=t._milliseconds,r=Ti(t._days),s=Ti(t._months);o.isValid()&&(n=n??!0,s&&Ws(o,Nn(o,"Month")+s*e),r&&Fs(o,"Date",Nn(o,"Date")+r*e),i&&o._d.setTime(o._d.valueOf()+i*e),n&&j.updateOffset(o,r||s))}var Fu=Bs(1,"add"),yu=Bs(-1,"subtract");function zs(o){return typeof o=="string"||o instanceof String}function bu(o){return le(o)||On(o)||zs(o)||Oe(o)||Vu(o)||Wu(o)||o===null||o===void 0}function Wu(o){var t=Ae(o)&&!Ao(o),e=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,r,s=n.length;for(i=0;i<s;i+=1)r=n[i],e=e||Ot(o,r);return t&&e}function Vu(o){var t=re(o),e=!1;return t&&(e=o.filter(function(n){return!Oe(n)&&zs(o)}).length===0),t&&e}function Yu(o){var t=Ae(o)&&!Ao(o),e=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,r;for(i=0;i<n.length;i+=1)r=n[i],e=e||Ot(o,r);return t&&e}function Du(o,t){var e=o.diff(t,"days",!0);return e<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse"}function Uu(o,t){arguments.length===1&&(arguments[0]?bu(arguments[0])?(o=arguments[0],t=void 0):Yu(arguments[0])&&(t=arguments[0],o=void 0):(o=void 0,t=void 0));var e=o||Ft(),n=pi(e,this).startOf("day"),i=j.calendarFormat(this,n)||"sameElse",r=t&&(Le(t[i])?t[i].call(this,e):t[i]);return this.format(r||this.localeData().calendar(i,this,Ft(e)))}function wu(){return new Cn(this)}function Zu(o,t){var e=le(o)?o:Ft(o);return this.isValid()&&e.isValid()?(t=ne(t)||"millisecond",t==="millisecond"?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf()):!1}function Qu(o,t){var e=le(o)?o:Ft(o);return this.isValid()&&e.isValid()?(t=ne(t)||"millisecond",t==="millisecond"?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf()):!1}function vu(o,t,e,n){var i=le(o)?o:Ft(o),r=le(t)?t:Ft(t);return this.isValid()&&i.isValid()&&r.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(i,e):!this.isBefore(i,e))&&(n[1]===")"?this.isBefore(r,e):!this.isAfter(r,e))):!1}function Ku(o,t){var e=le(o)?o:Ft(o),n;return this.isValid()&&e.isValid()?(t=ne(t)||"millisecond",t==="millisecond"?this.valueOf()===e.valueOf():(n=e.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function Hu(o,t){return this.isSame(o,t)||this.isAfter(o,t)}function _u(o,t){return this.isSame(o,t)||this.isBefore(o,t)}function xu(o,t,e){var n,i,r;if(!this.isValid())return NaN;if(n=pi(o,this),!n.isValid())return NaN;switch(i=(n.utcOffset()-this.utcOffset())*6e4,t=ne(t),t){case"year":r=lo(this,n)/12;break;case"month":r=lo(this,n);break;case"quarter":r=lo(this,n)/3;break;case"second":r=(this-n)/1e3;break;case"minute":r=(this-n)/6e4;break;case"hour":r=(this-n)/36e5;break;case"day":r=(this-n-i)/864e5;break;case"week":r=(this-n-i)/6048e5;break;default:r=this-n}return e?r:oe(r)}function lo(o,t){if(o.date()<t.date())return-lo(t,o);var e=(t.year()-o.year())*12+(t.month()-o.month()),n=o.clone().add(e,"months"),i,r;return t-n<0?(i=o.clone().add(e-1,"months"),r=(t-n)/(n-i)):(i=o.clone().add(e+1,"months"),r=(t-n)/(i-n)),-(e+r)||0}j.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",j.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Gu(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Au(o){if(!this.isValid())return null;var t=o!==!0,e=t?this.clone().utc():this;return e.year()<0||e.year()>9999?Jn(e,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Le(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Jn(e,"Z")):Jn(e,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ku(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var o="moment",t="",e,n,i,r;return this.isLocal()||(o=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),e="["+o+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",r=t+'[")]',this.format(e+n+i+r)}function Ju(o){o||(o=this.isUtc()?j.defaultFormatUtc:j.defaultFormat);var t=Jn(this,o);return this.localeData().postformat(t)}function Bu(o,t){return this.isValid()&&(le(o)&&o.isValid()||Ft(o).isValid())?ce({to:this,from:o}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function $u(o){return this.from(Ft(),o)}function zu(o,t){return this.isValid()&&(le(o)&&o.isValid()||Ft(o).isValid())?ce({from:this,to:o}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ju(o){return this.to(Ft(),o)}function js(o){var t;return o===void 0?this._locale._abbr:(t=Ne(o),t!=null&&(this._locale=t),this)}var qs=ee("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(o){return o===void 0?this.localeData():this.locale(o)});function tr(){return this._locale}var ao=1e3,gn=60*ao,co=60*gn,er=(365*400+97)*24*co;function fn(o,t){return(o%t+t)%t}function nr(o,t,e){return o<100&&o>=0?new Date(o+400,t,e)-er:new Date(o,t,e).valueOf()}function or(o,t,e){return o<100&&o>=0?Date.UTC(o+400,t,e)-er:Date.UTC(o,t,e)}function qu(o){var t,e;if(o=ne(o),o===void 0||o==="millisecond"||!this.isValid())return this;switch(e=this._isUTC?or:nr,o){case"year":t=e(this.year(),0,1);break;case"quarter":t=e(this.year(),this.month()-this.month()%3,1);break;case"month":t=e(this.year(),this.month(),1);break;case"week":t=e(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=e(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=e(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fn(t+(this._isUTC?0:this.utcOffset()*gn),co);break;case"minute":t=this._d.valueOf(),t-=fn(t,gn);break;case"second":t=this._d.valueOf(),t-=fn(t,ao);break}return this._d.setTime(t),j.updateOffset(this,!0),this}function tR(o){var t,e;if(o=ne(o),o===void 0||o==="millisecond"||!this.isValid())return this;switch(e=this._isUTC?or:nr,o){case"year":t=e(this.year()+1,0,1)-1;break;case"quarter":t=e(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=e(this.year(),this.month()+1,1)-1;break;case"week":t=e(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=e(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=e(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=co-fn(t+(this._isUTC?0:this.utcOffset()*gn),co)-1;break;case"minute":t=this._d.valueOf(),t+=gn-fn(t,gn)-1;break;case"second":t=this._d.valueOf(),t+=ao-fn(t,ao)-1;break}return this._d.setTime(t),j.updateOffset(this,!0),this}function eR(){return this._d.valueOf()-(this._offset||0)*6e4}function nR(){return Math.floor(this.valueOf()/1e3)}function oR(){return new Date(this.valueOf())}function iR(){var o=this;return[o.year(),o.month(),o.date(),o.hour(),o.minute(),o.second(),o.millisecond()]}function sR(){var o=this;return{years:o.year(),months:o.month(),date:o.date(),hours:o.hours(),minutes:o.minutes(),seconds:o.seconds(),milliseconds:o.milliseconds()}}function rR(){return this.isValid()?this.toISOString():null}function lR(){return Jo(this)}function aR(){return we({},Rt(this))}function cR(){return Rt(this).overflow}function dR(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}rt("N",0,0,"eraAbbr"),rt("NN",0,0,"eraAbbr"),rt("NNN",0,0,"eraAbbr"),rt("NNNN",0,0,"eraName"),rt("NNNNN",0,0,"eraNarrow"),rt("y",["y",1],"yo","eraYear"),rt("y",["yy",2],0,"eraYear"),rt("y",["yyy",3],0,"eraYear"),rt("y",["yyyy",4],0,"eraYear"),it("N",Ii),it("NN",Ii),it("NNN",Ii),it("NNNN",PR),it("NNNNN",MR),Et(["N","NN","NNN","NNNN","NNNNN"],function(o,t,e,n){var i=e._locale.erasParse(o,n,e._strict);i?Rt(e).era=i:Rt(e).invalidEra=o}),it("y",dn),it("yy",dn),it("yyy",dn),it("yyyy",dn),it("yo",OR),Et(["y","yy","yyy","yyyy"],Gt),Et(["yo"],function(o,t,e,n){var i;e._locale._eraYearOrdinalRegex&&(i=o.match(e._locale._eraYearOrdinalRegex)),e._locale.eraYearOrdinalParse?t[Gt]=e._locale.eraYearOrdinalParse(o,i):t[Gt]=parseInt(o,10)});function uR(o,t){var e,n,i,r=this._eras||Ne("en")._eras;for(e=0,n=r.length;e<n;++e)switch(typeof r[e].since==="string"&&(i=j(r[e].since).startOf("day"),r[e].since=i.valueOf()),typeof r[e].until){case"undefined":r[e].until=1/0;break;case"string":i=j(r[e].until).startOf("day").valueOf(),r[e].until=i.valueOf();break}return r}function RR(o,t,e){var n,i,r=this.eras(),s,a,c;for(o=o.toUpperCase(),n=0,i=r.length;n<i;++n)if(s=r[n].name.toUpperCase(),a=r[n].abbr.toUpperCase(),c=r[n].narrow.toUpperCase(),e)switch(t){case"N":case"NN":case"NNN":if(a===o)return r[n];break;case"NNNN":if(s===o)return r[n];break;case"NNNNN":if(c===o)return r[n];break}else if([s,a,c].indexOf(o)>=0)return r[n]}function hR(o,t){var e=o.since<=o.until?1:-1;return t===void 0?j(o.since).year():j(o.since).year()+(t-o.offset)*e}function gR(){var o,t,e,n=this.localeData().eras();for(o=0,t=n.length;o<t;++o)if(e=this.clone().startOf("day").valueOf(),n[o].since<=e&&e<=n[o].until||n[o].until<=e&&e<=n[o].since)return n[o].name;return""}function fR(){var o,t,e,n=this.localeData().eras();for(o=0,t=n.length;o<t;++o)if(e=this.clone().startOf("day").valueOf(),n[o].since<=e&&e<=n[o].until||n[o].until<=e&&e<=n[o].since)return n[o].narrow;return""}function TR(){var o,t,e,n=this.localeData().eras();for(o=0,t=n.length;o<t;++o)if(e=this.clone().startOf("day").valueOf(),n[o].since<=e&&e<=n[o].until||n[o].until<=e&&e<=n[o].since)return n[o].abbr;return""}function mR(){var o,t,e,n,i=this.localeData().eras();for(o=0,t=i.length;o<t;++o)if(e=i[o].since<=i[o].until?1:-1,n=this.clone().startOf("day").valueOf(),i[o].since<=n&&n<=i[o].until||i[o].until<=n&&n<=i[o].since)return(this.year()-j(i[o].since).year())*e+i[o].offset;return this.year()}function pR(o){return Ot(this,"_erasNameRegex")||Pi.call(this),o?this._erasNameRegex:this._erasRegex}function LR(o){return Ot(this,"_erasAbbrRegex")||Pi.call(this),o?this._erasAbbrRegex:this._erasRegex}function IR(o){return Ot(this,"_erasNarrowRegex")||Pi.call(this),o?this._erasNarrowRegex:this._erasRegex}function Ii(o,t){return t.erasAbbrRegex(o)}function PR(o,t){return t.erasNameRegex(o)}function MR(o,t){return t.erasNarrowRegex(o)}function OR(o,t){return t._eraYearOrdinalRegex||dn}function Pi(){var o=[],t=[],e=[],n=[],i,r,s,a,c,d=this.eras();for(i=0,r=d.length;i<r;++i)s=Ce(d[i].name),a=Ce(d[i].abbr),c=Ce(d[i].narrow),t.push(s),o.push(a),e.push(c),n.push(s),n.push(a),n.push(c);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+e.join("|")+")","i")}rt(0,["gg",2],0,function(){return this.weekYear()%100}),rt(0,["GG",2],0,function(){return this.isoWeekYear()%100});function uo(o,t){rt(0,[o,o.length],0,t)}uo("gggg","weekYear"),uo("ggggg","weekYear"),uo("GGGG","isoWeekYear"),uo("GGGGG","isoWeekYear"),it("G",jn),it("g",jn),it("GG",Nt,jt),it("gg",Nt,jt),it("GGGG",ii,oi),it("gggg",ii,oi),it("GGGGG",zn,Bn),it("ggggg",zn,Bn),En(["gggg","ggggg","GGGG","GGGGG"],function(o,t,e,n){t[n.substr(0,2)]=ft(o)}),En(["gg","GG"],function(o,t,e,n){t[n]=j.parseTwoDigitYear(o)});function CR(o){return ir.call(this,o,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function SR(o){return ir.call(this,o,this.isoWeek(),this.isoWeekday(),1,4)}function ER(){return Xe(this.year(),1,4)}function XR(){return Xe(this.isoWeekYear(),1,4)}function NR(){var o=this.localeData()._week;return Xe(this.year(),o.dow,o.doy)}function FR(){var o=this.localeData()._week;return Xe(this.weekYear(),o.dow,o.doy)}function ir(o,t,e,n,i){var r;return o==null?yn(this,n,i).year:(r=Xe(o,n,i),t>r&&(t=r),yR.call(this,o,t,e,n,i))}function yR(o,t,e,n,i){var r=Ds(o,t,e,n,i),s=Fn(r.year,0,r.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}rt("Q",0,"Qo","quarter"),it("Q",Cs),Et("Q",function(o,t){t[Se]=(ft(o)-1)*3});function bR(o){return o==null?Math.ceil((this.month()+1)/3):this.month((o-1)*3+this.month()%3)}rt("D",["DD",2],"Do","date"),it("D",Nt,un),it("DD",Nt,jt),it("Do",function(o,t){return o?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Et(["D","DD"],Pe),Et("Do",function(o,t){t[Pe]=ft(o.match(Nt)[0])});var sr=Rn("Date",!0);rt("DDD",["DDDD",3],"DDDo","dayOfYear"),it("DDD",$n),it("DDDD",Ss),Et(["DDD","DDDD"],function(o,t,e){e._dayOfYear=ft(o)});function WR(o){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return o==null?t:this.add(o-t,"d")}rt("m",["mm",2],0,"minute"),it("m",Nt,si),it("mm",Nt,jt),Et(["m","mm"],ae);var VR=Rn("Minutes",!1);rt("s",["ss",2],0,"second"),it("s",Nt,si),it("ss",Nt,jt),Et(["s","ss"],Ee);var YR=Rn("Seconds",!1);rt("S",0,0,function(){return~~(this.millisecond()/100)}),rt(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),rt(0,["SSS",3],0,"millisecond"),rt(0,["SSSS",4],0,function(){return this.millisecond()*10}),rt(0,["SSSSS",5],0,function(){return this.millisecond()*100}),rt(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),rt(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),rt(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),rt(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),it("S",$n,Cs),it("SS",$n,jt),it("SSS",$n,Ss);var Qe,rr;for(Qe="SSSS";Qe.length<=9;Qe+="S")it(Qe,dn);function DR(o,t){t[ke]=ft(("0."+o)*1e3)}for(Qe="S";Qe.length<=9;Qe+="S")Et(Qe,DR);rr=Rn("Milliseconds",!1),rt("z",0,0,"zoneAbbr"),rt("zz",0,0,"zoneName");function UR(){return this._isUTC?"UTC":""}function wR(){return this._isUTC?"Coordinated Universal Time":""}var k=Cn.prototype;k.add=Fu,k.calendar=Uu,k.clone=wu,k.diff=xu,k.endOf=tR,k.format=Ju,k.from=Bu,k.fromNow=$u,k.to=zu,k.toNow=ju,k.get=kc,k.invalidAt=cR,k.isAfter=Zu,k.isBefore=Qu,k.isBetween=vu,k.isSame=Ku,k.isSameOrAfter=Hu,k.isSameOrBefore=_u,k.isValid=lR,k.lang=qs,k.locale=js,k.localeData=tr,k.max=lu,k.min=ru,k.parsingFlags=aR,k.set=Jc,k.startOf=qu,k.subtract=yu,k.toArray=iR,k.toObject=sR,k.toDate=oR,k.toISOString=Au,k.inspect=ku,typeof Symbol<"u"&&Symbol.for!=null&&(k[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),k.toJSON=rR,k.toString=Gu,k.unix=nR,k.valueOf=eR,k.creationData=dR,k.eraName=gR,k.eraNarrow=fR,k.eraAbbr=TR,k.eraYear=mR,k.year=Ns,k.isLeapYear=Ac,k.weekYear=CR,k.isoWeekYear=SR,k.quarter=k.quarters=bR,k.month=Vs,k.daysInMonth=od,k.week=k.weeks=ud,k.isoWeek=k.isoWeeks=Rd,k.weeksInYear=NR,k.weeksInWeekYear=FR,k.isoWeeksInYear=ER,k.isoWeeksInISOWeekYear=XR,k.date=sr,k.day=k.days=Sd,k.weekday=Ed,k.isoWeekday=Xd,k.dayOfYear=WR,k.hour=k.hours=Yd,k.minute=k.minutes=VR,k.second=k.seconds=YR,k.millisecond=k.milliseconds=rr,k.utcOffset=Tu,k.utc=pu,k.local=Lu,k.parseZone=Iu,k.hasAlignedHourOffset=Pu,k.isDST=Mu,k.isLocal=Cu,k.isUtcOffset=Su,k.isUtc=ks,k.isUTC=ks,k.zoneAbbr=UR,k.zoneName=wR,k.dates=ee("dates accessor is deprecated. Use date instead.",sr),k.months=ee("months accessor is deprecated. Use month instead",Vs),k.years=ee("years accessor is deprecated. Use year instead",Ns),k.zone=ee("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",mu),k.isDSTShifted=ee("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ou);function ZR(o){return Ft(o*1e3)}function QR(){return Ft.apply(null,arguments).parseZone()}function lr(o){return o}var Ct=jo.prototype;Ct.calendar=Cc,Ct.longDateFormat=Nc,Ct.invalidDate=yc,Ct.ordinal=Vc,Ct.preparse=lr,Ct.postformat=lr,Ct.relativeTime=Dc,Ct.pastFuture=Uc,Ct.set=Mc,Ct.eras=uR,Ct.erasParse=RR,Ct.erasConvertYear=hR,Ct.erasAbbrRegex=LR,Ct.erasNameRegex=pR,Ct.erasNarrowRegex=IR,Ct.months=qc,Ct.monthsShort=td,Ct.monthsParse=nd,Ct.monthsRegex=sd,Ct.monthsShortRegex=id,Ct.week=ld,Ct.firstDayOfYear=dd,Ct.firstDayOfWeek=cd,Ct.weekdays=Id,Ct.weekdaysMin=Md,Ct.weekdaysShort=Pd,Ct.weekdaysParse=Cd,Ct.weekdaysRegex=Nd,Ct.weekdaysShortRegex=Fd,Ct.weekdaysMinRegex=yd,Ct.isPM=Wd,Ct.meridiem=Dd;function Ro(o,t,e,n){var i=Ne(),r=pe().set(n,t);return i[e](r,o)}function ar(o,t,e){if(Oe(o)&&(t=o,o=void 0),o=o||"",t!=null)return Ro(o,t,e,"month");var n,i=[];for(n=0;n<12;n++)i[n]=Ro(o,n,e,"month");return i}function Mi(o,t,e,n){typeof o=="boolean"?(Oe(t)&&(e=t,t=void 0),t=t||""):(t=o,e=t,o=!1,Oe(t)&&(e=t,t=void 0),t=t||"");var i=Ne(),r=o?i._week.dow:0,s,a=[];if(e!=null)return Ro(t,(e+r)%7,n,"day");for(s=0;s<7;s++)a[s]=Ro(t,(s+r)%7,n,"day");return a}function vR(o,t){return ar(o,t,"months")}function KR(o,t){return ar(o,t,"monthsShort")}function HR(o,t,e){return Mi(o,t,e,"weekdays")}function _R(o,t,e){return Mi(o,t,e,"weekdaysShort")}function xR(o,t,e){return Mi(o,t,e,"weekdaysMin")}Ze("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(o){var t=o%10,e=ft(o%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return o+e}}),j.lang=ee("moment.lang is deprecated. Use moment.locale instead.",Ze),j.langData=ee("moment.langData is deprecated. Use moment.localeData instead.",Ne);var Fe=Math.abs;function GR(){var o=this._data;return this._milliseconds=Fe(this._milliseconds),this._days=Fe(this._days),this._months=Fe(this._months),o.milliseconds=Fe(o.milliseconds),o.seconds=Fe(o.seconds),o.minutes=Fe(o.minutes),o.hours=Fe(o.hours),o.months=Fe(o.months),o.years=Fe(o.years),this}function cr(o,t,e,n){var i=ce(t,e);return o._milliseconds+=n*i._milliseconds,o._days+=n*i._days,o._months+=n*i._months,o._bubble()}function AR(o,t){return cr(this,o,t,1)}function kR(o,t){return cr(this,o,t,-1)}function dr(o){return o<0?Math.floor(o):Math.ceil(o)}function JR(){var o=this._milliseconds,t=this._days,e=this._months,n=this._data,i,r,s,a,c;return o>=0&&t>=0&&e>=0||o<=0&&t<=0&&e<=0||(o+=dr(Oi(e)+t)*864e5,t=0,e=0),n.milliseconds=o%1e3,i=oe(o/1e3),n.seconds=i%60,r=oe(i/60),n.minutes=r%60,s=oe(r/60),n.hours=s%24,t+=oe(s/24),c=oe(ur(t)),e+=c,t-=dr(Oi(c)),a=oe(e/12),e%=12,n.days=t,n.months=e,n.years=a,this}function ur(o){return o*4800/146097}function Oi(o){return o*146097/4800}function BR(o){if(!this.isValid())return NaN;var t,e,n=this._milliseconds;if(o=ne(o),o==="month"||o==="quarter"||o==="year")switch(t=this._days+n/864e5,e=this._months+ur(t),o){case"month":return e;case"quarter":return e/3;case"year":return e/12}else switch(t=this._days+Math.round(Oi(this._months)),o){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+o)}}function ye(o){return function(){return this.as(o)}}var Rr=ye("ms"),$R=ye("s"),zR=ye("m"),jR=ye("h"),qR=ye("d"),th=ye("w"),eh=ye("M"),nh=ye("Q"),oh=ye("y"),ih=Rr;function sh(){return ce(this)}function rh(o){return o=ne(o),this.isValid()?this[o+"s"]():NaN}function Be(o){return function(){return this.isValid()?this._data[o]:NaN}}var lh=Be("milliseconds"),ah=Be("seconds"),ch=Be("minutes"),dh=Be("hours"),uh=Be("days"),Rh=Be("months"),hh=Be("years");function gh(){return oe(this.days()/7)}var be=Math.round,Tn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function fh(o,t,e,n,i){return i.relativeTime(t||1,!!e,o,n)}function Th(o,t,e,n){var i=ce(o).abs(),r=be(i.as("s")),s=be(i.as("m")),a=be(i.as("h")),c=be(i.as("d")),d=be(i.as("M")),u=be(i.as("w")),R=be(i.as("y")),h=r<=e.ss&&["s",r]||r<e.s&&["ss",r]||s<=1&&["m"]||s<e.m&&["mm",s]||a<=1&&["h"]||a<e.h&&["hh",a]||c<=1&&["d"]||c<e.d&&["dd",c];return e.w!=null&&(h=h||u<=1&&["w"]||u<e.w&&["ww",u]),h=h||d<=1&&["M"]||d<e.M&&["MM",d]||R<=1&&["y"]||["yy",R],h[2]=t,h[3]=+o>0,h[4]=n,fh.apply(null,h)}function mh(o){return o===void 0?be:typeof o=="function"?(be=o,!0):!1}function ph(o,t){return Tn[o]===void 0?!1:t===void 0?Tn[o]:(Tn[o]=t,o==="s"&&(Tn.ss=t-1),!0)}function Lh(o,t){if(!this.isValid())return this.localeData().invalidDate();var e=!1,n=Tn,i,r;return typeof o=="object"&&(t=o,o=!1),typeof o=="boolean"&&(e=o),typeof t=="object"&&(n=Object.assign({},Tn,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),i=this.localeData(),r=Th(this,!e,n,i),e&&(r=i.pastFuture(+this,r)),i.postformat(r)}var Ci=Math.abs;function mn(o){return(o>0)-(o<0)||+o}function ho(){if(!this.isValid())return this.localeData().invalidDate();var o=Ci(this._milliseconds)/1e3,t=Ci(this._days),e=Ci(this._months),n,i,r,s,a=this.asSeconds(),c,d,u,R;return a?(n=oe(o/60),i=oe(n/60),o%=60,n%=60,r=oe(e/12),e%=12,s=o?o.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",d=mn(this._months)!==mn(a)?"-":"",u=mn(this._days)!==mn(a)?"-":"",R=mn(this._milliseconds)!==mn(a)?"-":"",c+"P"+(r?d+r+"Y":"")+(e?d+e+"M":"")+(t?u+t+"D":"")+(i||n||o?"T":"")+(i?R+i+"H":"")+(n?R+n+"M":"")+(o?R+s+"S":"")):"P0D"}var It=so.prototype;It.isValid=Ru,It.abs=GR,It.add=AR,It.subtract=kR,It.as=BR,It.asMilliseconds=Rr,It.asSeconds=$R,It.asMinutes=zR,It.asHours=jR,It.asDays=qR,It.asWeeks=th,It.asMonths=eh,It.asQuarters=nh,It.asYears=oh,It.valueOf=ih,It._bubble=JR,It.clone=sh,It.get=rh,It.milliseconds=lh,It.seconds=ah,It.minutes=ch,It.hours=dh,It.days=uh,It.weeks=gh,It.months=Rh,It.years=hh,It.humanize=Lh,It.toISOString=ho,It.toString=ho,It.toJSON=ho,It.locale=js,It.localeData=tr,It.toIsoString=ee("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ho),It.lang=qs,rt("X",0,0,"unix"),rt("x",0,0,"valueOf"),it("x",jn),it("X",vc),Et("X",function(o,t,e){e._d=new Date(parseFloat(o)*1e3)}),Et("x",function(o,t,e){e._d=new Date(ft(o))});j.version="2.30.1",Ic(Ft),j.fn=k,j.min=au,j.max=cu,j.now=du,j.utc=pe,j.unix=ZR,j.months=vR,j.isDate=On,j.locale=Ze,j.invalid=An,j.duration=ce,j.isMoment=le,j.weekdays=HR,j.parseZone=QR,j.localeData=Ne,j.isDuration=ro,j.monthsShort=KR,j.weekdaysMin=xR,j.defineLocale=ui,j.updateLocale=Qd,j.locales=vd,j.weekdaysShort=_R,j.normalizeUnits=ne,j.relativeTimeRounding=mh,j.relativeTimeThreshold=ph,j.calendarFormat=Du,j.prototype=k,j.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};class Si{draws;ranges;element;control;options;position;constructor(t,e){const n=e.getDraw();this.draws=n,this.position=n.getPosition(),this.ranges=n.getRange(),this.options=n.getOptions(),this.element=t,this.control=e}setElement(t){this.element=t}getElement(){return this.element}getValue(t={}){const e=t.elementList||this.control.getElementList();let{startIndex:n}=t.range||this.control.getRange();const i=this.control.getDraw(),r=t?null:i.getTd();n>=e.length&&(n=e.length-1);const s=e[n],a=[];let c=r,d=e,u=n;for(;;){if(u<0&&c?.linkTdPrevId){const T=i.getTdById(c.linkTdPrevId);if(T){d=T.value,u=d.length-1,c=T;continue}}if(u<0)break;const f=d[u];if(f.controlId!==s.controlId||f.controlComponent===l.ControlComponent.PREFIX||f.controlComponent===l.ControlComponent.PRE_TEXT)break;f.controlComponent===l.ControlComponent.VALUE&&a.unshift(f),u--}c=r;let R=e,h=n+1;for(;;){if(h>=R.length&&c?.linkTdNextId){const T=i.getTdById(c.linkTdNextId);if(T){R=T.value,h=0,c=T;continue}}const f=R[h];if(!f||f.controlId!==s.controlId||f.controlComponent===l.ControlComponent.POSTFIX||f.controlComponent===l.ControlComponent.POST_TEXT)break;f.controlComponent===l.ControlComponent.VALUE&&a.push(f),h++}return a.filter(f=>f.type!==l.ElementType.SPLIT_TAG)}removeNextControlElement(t,e){const n=this.control.getDraw();if(e=e??n.getTd()?.linkTdNextId,e){const i=n.getTdById(e);if(i){if(i.value.length){if(i.value[1].controlId===t)return n.spliceElementList(i.value,1,1),i.value[1]}else if(i.linkTdNextId)return this.removeNextControlElement(t,i.linkTdNextId)}}}setValue(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return-1;const{elementList:i,range:r}=this.control.mergeControl(e);this.control.shrinkBoundary(e);const{startIndex:s,endIndex:a}=r,c=this.control.getDraw();s!==a?c.spliceElementList(i,s+1,a-s,[],{isIgnoreDeletedRule:n.isIgnoreDeletedRule}):this.control.removePlaceholder(s,{elementList:i});const d=i[s],u=d.controlId;this._removeControlPlaceholders(i,s);const R=d.type&&!zt.includes(d.type)||d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.PRE_TEXT?Dt(d,["control","controlId",...At]):se(d,["type"]),h=!!this.element.control?.underline,g=this.options.mode===l.EditorMode.FORM&&this.options.modeRule.form.inputTraceEnabled&&!h,f=r.startIndex+1,T=[],m=p=>{const I=T.length?T:i,L=T.length?T.length-1:r.startIndex;wt(I,[p],L,{editorOptions:this.options}),T.push(p)};for(let p=0;p<t.length;p++){const I=t[p];if(I.type===l.ElementType.CONTROL&&I.control){const L=I,P=L.controlId||lt(),C=L.control?.value||[],S=L.control?.type===l.ControlType.TEXTFIELD,F={...R,controlId:P,type:l.ElementType.CONTROL,control:L.control,originControlId:u},N=S?l.ControlComponent.PRETEXTFIX:l.ControlComponent.PREFIX,V=S?l.ControlComponent.POSTTEXTFIX:l.ControlComponent.POSTFIX,Y=S?L.control?.preTextFix||this.options.control.preTextFix:L.control?.prefix||this.options.control.prefix;for(let W=0;W<Y.length;W++){const X={...F,value:Y[W],controlComponent:N};m(X)}for(let W=0;W<C.length;W++){const X=C[W],O={...F,...X,controlComponent:l.ControlComponent.VALUE};(O.color===this.options.control.bracketColor||O.color===this.options.control.placeholderColor)&&(O.color=this.options.defaultColor),m(O)}if(C.length===0){const W=L.control?.placeholder||"";for(let X=0;X<W.length;X++){const O={...F,value:W[X],controlComponent:l.ControlComponent.PLACEHOLDER,color:this.options.control.placeholderColor};m(O)}}const E=S?L.control?.postTextFix||this.options.control.postTextFix:L.control?.postfix||this.options.control.postfix;for(let W=0;W<E.length;W++){const X={...F,value:E[W],controlComponent:V};m(X)}}else if(I.type||I.value){(d.controlComponent===l.ControlComponent.PRE_TEXT||d.controlComponent===l.ControlComponent.POST_TEXT||d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.POSTFIX)&&(R.color=this.options.defaultColor);const P={...R,...I,controlComponent:l.ControlComponent.VALUE};(P.color===this.options.control.bracketColor||P.color===this.options.control.placeholderColor||P.color===this.options.control.textFixColor)&&(P.color=this.options.defaultColor),P.strikeout&&delete P.strikeout,g&&(P.textDecoration={style:l.TextDecorationStyle.DOUBLE},P.underline=!0),m(P)}}return T.length&&c.spliceElementList(i,f,0,T),r.startIndex+T.length}_removeControlPlaceholders(t,e){const n=t[e];if(!n?.controlId)return;const i=a=>!!a&&a.controlId===n.controlId&&a.originControlId===n.originControlId;let r=e;for(;r>=0&&i(t[r]);)r--;let s=e+1;for(;s<t.length&&i(t[s]);)s++;for(let a=s-1;a>r;a--)t[a].controlComponent===l.ControlComponent.PLACEHOLDER&&t.splice(a,1)}clearValue(t={},e={}){if(!e.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return-1;const n=t.elementList||this.control.getElementList(),i=t.range||this.control.getValueRange()||this.control.getRange();this.control.shrinkBoundary(t);const{startIndex:r,endIndex:s}=i;return this.control.getDraw().spliceElementList(n,r+1,s-r,[],{isIgnoreDeletedRule:e.isIgnoreDeletedRule}),e.isAddPlaceholder!==!1&&(this.getValue(t).length||this.control.addPlaceholder(r,t)),r}keydown(t){if(this.control.getIsDisabledControl())return null;const e=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();const{startIndex:i,endIndex:r}=n,s=e[i],a=e[r],c=this.control.getDraw(),d=!!s.originControlId;if(t.key===l.KeyMap.Backspace)if(this.options.mode===l.EditorMode.FORM&&this.options.modeRule.form.deleteTraceEnabled&&!d){if(s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER)return i;this.strikeout()}else{if(s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER)return i;if(i!==r){c.spliceElementList(e,i+1,r-i);const R=e[i+1];return(R?.controlComponent===l.ControlComponent.POSTFIX||R?.controlComponent===l.ControlComponent.POST_TEXT||R?.controlComponent===l.ControlComponent.POSTTEXTFIX||R?.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)&&this.control.addPlaceholder(i),i===0&&e[0].type===l.ElementType.SPLIT_TAG?c.fixPosition(!0)??i:i}else{const R=e[i+1];return R?.controlComponent===l.ControlComponent.POSTFIX||R?.controlComponent===l.ControlComponent.POST_TEXT||R?.controlComponent===l.ControlComponent.POSTTEXTFIX||R?.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT?(c.spliceElementList(e,i,1),this.control.addPlaceholder(i-1),i-1):(c.spliceElementList(e,i,1),i===1&&e[0].type===l.ElementType.SPLIT_TAG||i===0?c.fixPosition(!0)??i-1:i-1)}}else if(t.key===l.KeyMap.Delete){const u=e[r+1],R=!!s.originControlId;if(this.options.mode===l.EditorMode.FORM&&this.options.modeRule.form.deleteTraceEnabled&&!R){if(a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POST_TEXT||a.controlComponent===l.ControlComponent.POSTTEXTFIX||a.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER)return r;if(u?.controlComponent===l.ControlComponent.POSTFIX||u?.controlComponent===l.ControlComponent.POST_TEXT||u?.controlComponent===l.ControlComponent.POSTTEXTFIX||u?.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)return c.spliceElementList(e,i+1,1),this.control.addPlaceholder(i),i;this.strikeout()}else{const g=e[r+1];return s.controlComponent===l.ControlComponent.PLACEHOLDER?r:g?.controlComponent===l.ControlComponent.POSTFIX||g?.controlComponent===l.ControlComponent.POST_TEXT||g?.controlComponent===l.ControlComponent.POSTTEXTFIX||g?.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT?(c.spliceElementList(e,i+1,1),this.control.addPlaceholder(i),i):i!==r?(c.spliceElementList(e,i+1,r-i),i===0&&e[0].type===l.ElementType.SPLIT_TAG?c.fixPosition(!0)??i:i):g?(c.spliceElementList(e,i+1,1),i===0&&e[0].type===l.ElementType.SPLIT_TAG?c.fixPosition(!0)??i:i):(c.getTd()?.linkTdNextId&&s.controlId&&this.removeNextControlElement(s.controlId),r)}}return r}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();const{startIndex:t,endIndex:e}=this.control.getRange();if(t===e)return t;const n=this.control.getDraw(),i=this.control.getElementList();n.spliceElementList(i,t+1,e-t);const r=i[t+1];return(r?.controlComponent===l.ControlComponent.POSTFIX||r?.controlComponent===l.ControlComponent.POST_TEXT||r?.controlComponent===l.ControlComponent.POSTTEXTFIX||r?.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)&&this.control.addPlaceholder(t),t}strikeout(t){const e=this.control.getRange(),{endIndex:n}=e,{isIgnoreDisabledRule:i=!1}=t||{};if(!i&&(this.draws.isReadonly()||this.draws.isDisabled()))return;const s=this.ranges.getSelectionElementList(),a=this.position.getCursorPosition(),c=j(new Date).format("YYYY-MM-DD HH:mm:ss");if(s?.length){if(!this.element.strikeout){const d=s.findIndex(u=>!u.strikeout);s.forEach(u=>{u.deletePerson="SWJ",u.deleteTime=c,u.strikeout=!!~d}),this.draws.render({isSetCursor:!0,isCompute:!1,isDel:!0,isSubmitHistory:!1}),setTimeout(()=>{this.strikeoute()},100)}}else{const d=this.control.getElementList()[a.index],u=this.control.getElementList();if(!this.control.getElementList()[a.index].strikeout&&d?.metrics.width>0){this.control.getElementList()[a.index].strikeout=!0,this.control.getElementList()[a.index].deletePerson="SWJ",this.control.getElementList()[a.index].deleteTime=c;const R=--a.index;setTimeout(()=>{this.strikeoute()},100),setTimeout(()=>{const g=R;this.draws.render({curIndex:g,isSetCursor:!0}),a.index=R,this.position.setCursorPosition(a),this.ranges.setRange(R,R)},100)}else n>=0&&n<u.length&&u[n]?.metrics?.width!==void 0&&u[n].metrics.width<=0&&!u[n]?.strikeout&&(setTimeout(()=>{u.splice(n,1)},100),setTimeout(()=>{const h=n-1;this.draws.render({curIndex:h,isSetCursor:!0}),a.index=h,delete a.value,this.position.setCursorPosition(a),this.ranges.setRange(h,h)},100))}}strikeoute(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draws.isReadonly()||this.draws.isDisabled()))return;if(!this.ranges.getSelectionElementList()?.length){const{endIndex:r}=this.ranges.getRange(),a=this.draws.getElementList()[r];this.ranges.setDefaultStyle({strikeout:a.strikeout?!1:!this.ranges.getDefaultStyle()?.strikeout})}}}class hr{draw;options;now;dom;renderOptions;isDatePicker;pickDate;lang;constructor(t,e={}){this.draw=t,this.options=e,this.lang=this._getLang(),this.now=new Date,this.dom=this._createDom(),this.renderOptions=null,this.isDatePicker=!0,this.pickDate=null,this._bindEvent()}_createDom(){const t=document.createElement("div");t.classList.add(`${z}-date-container`),t.setAttribute(ue,l.EditorComponent.POPUP);const e=document.createElement("div");e.classList.add(`${z}-date-wrap`);const n=document.createElement("div");n.classList.add(`${z}-date-title`);const i=document.createElement("span");i.classList.add(`${z}-date-title__pre-year`),i.innerText="<<";const r=document.createElement("span");r.classList.add(`${z}-date-title__pre-month`),r.innerText="<";const s=document.createElement("span");s.classList.add(`${z}-date-title__now`);const a=document.createElement("span");a.classList.add(`${z}-date-title__next-month`),a.innerText=">";const c=document.createElement("span");c.classList.add(`${z}-date-title__next-year`),c.innerText=">>",n.append(i),n.append(r),n.append(s),n.append(a),n.append(c);const d=document.createElement("div");d.classList.add(`${z}-date-week`);const{weeks:{sun:u,mon:R,tue:h,wed:g,thu:f,fri:T,sat:m}}=this.lang;[u,R,h,g,f,T,m].forEach(W=>{const X=document.createElement("span");X.innerText=`${W}`,d.append(X)});const I=document.createElement("div");I.classList.add(`${z}-date-day`),e.append(n),e.append(d),e.append(I);const L=document.createElement("ul");L.classList.add(`${z}-time-wrap`);let P,C,S;[this.lang.hour,this.lang.minute,this.lang.second].forEach((W,X)=>{const O=document.createElement("li"),M=document.createElement("span");M.innerText=W,O.append(M);const b=document.createElement("ol"),y=X===0,D=X===1,U=y?24:60;for(let Q=0;Q<U;Q++){const G=document.createElement("li");G.innerText=`${String(Q).padStart(2,"0")}`,G.setAttribute("data-id",`${Q}`),b.append(G)}y?P=b:D?C=b:S=b,O.append(b),L.append(O)});const N=document.createElement("div");N.classList.add(`${z}-date-menu`);const V=document.createElement("button");V.classList.add(`${z}-date-menu__time`),V.innerText=this.lang.timeSelect;const Y=document.createElement("button");Y.classList.add(`${z}-date-menu__now`),Y.innerText=this.lang.now;const E=document.createElement("button");return E.classList.add(`${z}-date-menu__submit`),E.innerText=this.lang.confirm,N.append(V),N.append(Y),N.append(E),t.append(e),t.append(L),t.append(N),this.draw.getContainer().append(t),{container:t,dateWrap:e,datePickerWeek:d,timeWrap:L,title:{preYear:i,preMonth:r,now:s,nextMonth:a,nextYear:c},day:I,time:{hour:P,minute:C,second:S},menu:{time:V,now:Y,submit:E}}}_bindEvent(){this.dom.title.preYear.onclick=()=>{this._preYear()},this.dom.title.preMonth.onclick=()=>{this._preMonth()},this.dom.title.nextMonth.onclick=()=>{this._nextMonth()},this.dom.title.nextYear.onclick=()=>{this._nextYear()},this.dom.menu.time.onclick=()=>{this.isDatePicker=!this.isDatePicker,this._toggleDateTimePicker()},this.dom.menu.now.onclick=()=>{this._now(),this._submit()},this.dom.menu.submit.onclick=()=>{this.dispose(),this._submit()},this.dom.time.hour.onclick=t=>{if(!this.pickDate)return;const n=t.target.dataset.id;n&&(this.pickDate.setHours(Number(n)),this._setTimePick(!1))},this.dom.time.minute.onclick=t=>{if(!this.pickDate)return;const n=t.target.dataset.id;n&&(this.pickDate.setMinutes(Number(n)),this._setTimePick(!1))},this.dom.time.second.onclick=t=>{if(!this.pickDate)return;const n=t.target.dataset.id;n&&(this.pickDate.setSeconds(Number(n)),this._setTimePick(!1))}}_setPosition(){if(!this.renderOptions)return;const{position:{coordinate:{leftTop:[t,e]},lineHeight:n,pageNo:i}}=this.renderOptions,r=this.draw.getHeight(),s=this.draw.getPageGap(),c=(i??this.draw.getPageNo())*(r+s);this.dom.container.style.left=`${t}px`,this.dom.container.style.top=`${e+c+n}px`}isInvalidDate(t){return t.toDateString()==="Invalid Date"}_setValue(){const t=this.renderOptions?.value;if(t){const e=new Date(t);this.now=this.isInvalidDate(e)?new Date:e}else this.now=new Date;this.pickDate=new Date(this.now)}_getLang(){const t=this.draw.getI18n(),e=t.t.bind(t);return{now:e("datePicker.now"),confirm:e("datePicker.confirm"),return:e("datePicker.return"),timeSelect:e("datePicker.timeSelect"),weeks:{sun:e("datePicker.weeks.sun"),mon:e("datePicker.weeks.mon"),tue:e("datePicker.weeks.tue"),wed:e("datePicker.weeks.wed"),thu:e("datePicker.weeks.thu"),fri:e("datePicker.weeks.fri"),sat:e("datePicker.weeks.sat")},year:e("datePicker.year"),month:e("datePicker.month"),hour:e("datePicker.hour"),minute:e("datePicker.minute"),second:e("datePicker.second")}}_setLangChange(){this.dom.menu.time.innerText=this.lang.timeSelect,this.dom.menu.now.innerText=this.lang.now,this.dom.menu.submit.innerText=this.lang.confirm;const{weeks:{sun:t,mon:e,tue:n,wed:i,thu:r,fri:s,sat:a}}=this.lang,c=[t,e,n,i,r,s,a];this.dom.datePickerWeek.childNodes.forEach((h,g)=>{const f=h;f.innerText=c[g]});const d=this.dom.time.hour.previousElementSibling;d.innerText=this.lang.hour;const u=this.dom.time.minute.previousElementSibling;u.innerText=this.lang.minute;const R=this.dom.time.second.previousElementSibling;R.innerText=this.lang.second}_update(){const t=new Date,e=t.getFullYear(),n=t.getMonth()+1,i=t.getDate();let r=null,s=null,a=null;this.pickDate&&(r=this.pickDate.getFullYear(),s=this.pickDate.getMonth()+1,a=this.pickDate.getDate());const c=this.now.getFullYear(),d=this.now.getMonth()+1;this.dom.title.now.innerText=`${c}${this.lang.year} ${String(d).padStart(2,"0")}${this.lang.month}`;const R=new Date(c,d,0).getDate();let h=new Date(c,d-1,1).getDay();h===0&&(h=7);const g=new Date(c,d-1,0).getDate();this.dom.day.innerHTML="";const f=g-h+1;for(let m=f;m<=g;m++){const p=document.createElement("div");p.classList.add("disable"),p.innerText=`${m}`,p.onclick=()=>{const I=d-2;this.now=new Date(c,I,m),this._setDatePick(c,I,m)},this.dom.day.append(p)}for(let m=1;m<=R;m++){const p=document.createElement("div");e===c&&n===d&&i===m&&p.classList.add("active"),this.pickDate&&r===c&&s===d&&a===m&&p.classList.add("select"),p.innerText=`${m}`,p.onclick=I=>{const L=d-1;this.now=new Date(c,L,m),this._setDatePick(c,L,m),I.stopPropagation()},this.dom.day.append(p)}const T=42-h-R;for(let m=1;m<=T;m++){const p=document.createElement("div");p.classList.add("disable"),p.innerText=`${m}`,p.onclick=()=>{this.now=new Date(c,d,m),this._setDatePick(c,d,m)},this.dom.day.append(p)}}_toggleDateTimePicker(){this.isDatePicker?(this.dom.dateWrap.classList.add("active"),this.dom.timeWrap.classList.remove("active"),this.dom.menu.time.innerText=this.lang.timeSelect):(this.dom.dateWrap.classList.remove("active"),this.dom.timeWrap.classList.add("active"),this.dom.menu.time.innerText=this.lang.return,this._setTimePick())}_setDatePick(t,e,n){this.now=new Date(t,e,n),this.pickDate?.setFullYear(t),this.pickDate?.setMonth(e),this.pickDate?.setDate(n),this._update()}_setTimePick(t=!0){const e=this.pickDate?.getHours()||0,n=this.pickDate?.getMinutes()||0,i=this.pickDate?.getSeconds()||0,{hour:r,minute:s,second:a}=this.dom.time;[r,s,a].forEach(u=>{u.querySelectorAll("li").forEach(R=>R.classList.remove("active"))}),[[r,e],[s,n],[a,i]].forEach(([u,R])=>{const h=u.querySelector(`[data-id='${R}']`);h.classList.add("active"),t&&Qi(u,h)})}_preMonth(){this.now.setMonth(this.now.getMonth()-1),this._update()}_nextMonth(){this.now.setMonth(this.now.getMonth()+1),this._update()}_preYear(){this.now.setFullYear(this.now.getFullYear()-1),this._update()}_nextYear(){this.now.setFullYear(this.now.getFullYear()+1),this._update()}_now(){this.pickDate=new Date,this.dispose()}_toggleVisible(t){t?this.dom.container.classList.add("active"):this.dom.container.classList.remove("active")}_submit(){if(this.options.onSubmit&&this.pickDate){const t=this.renderOptions?.dateFormat,e=this.formatDate(this.pickDate,t);this.options.onSubmit(e)}}formatDate(t,e="YYYY-MM-DD HH:mm:ss"){let n=e;const i=t.getFullYear().toString(),r=(t.getMonth()+1).toString(),s=t.getDate().toString(),a=t.getHours(),c=a%12===0?12:a%12,d=t.getMinutes().toString(),u=t.getSeconds().toString(),R=t.getMilliseconds().toString(),h={"y+":i,"Y+":i,"M+":r,"d+":s,"D+":s,"h+":c.toString(),"H+":a.toString(),"m+":d,"s+":u,"S+":R};for(const g in h){const f=new RegExp("("+g+")").exec(e),T=g;f&&(n=n.replace(f[1],f[1].length===1?h[T]:h[T].padStart(f[1].length,"0")))}return n}render(t){this.renderOptions=t,this.lang=this._getLang(),this._setLangChange(),this._setValue(),this._update(),this._setPosition(),this.isDatePicker=!0,this._toggleDateTimePicker(),this._toggleVisible(!0)}dispose(){this._toggleVisible(!1)}destroy(){this.dom.container.remove()}}class Yn{draw;element;control;isPopup;datePicker;options;constructor(t,e){const n=e.getDraw();this.draw=n,this.options=n.getOptions(),this.element=t,this.control=e,this.isPopup=!1,this.datePicker=null}setElement(t){this.element=t}getElement(){return this.element}getIsPopup(){return this.isPopup}getValue(t={}){const e=t.elementList||this.control.getElementList(),n=this.control.getValueRange(t);if(!n)return[];const i=[],{startIndex:r,endIndex:s}=n;for(let a=r;a<=s;a++){const c=e[a];c.controlComponent===l.ControlComponent.VALUE&&i.push(c)}return i}setValue(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return-1;const{elementList:i,range:r}=this.control.mergeControl(e);this.control.shrinkBoundary(e);const{startIndex:s,endIndex:a}=r,c=this.control.getDraw();s!==a?c.spliceElementList(i,s+1,a-s):this.control.removePlaceholder(s,{elementList:i});const d=i[s],u=d.type&&!zt.includes(d.type)||d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.PRE_TEXT?Dt(d,["control","controlId",...At]):se(d,["type"]),R=r.startIndex+1;for(let h=0;h<t.length;h++){const g={...u,...t[h],controlComponent:l.ControlComponent.VALUE};wt(i,[g],s,{editorOptions:this.options}),c.spliceElementList(i,R+h,0,[g])}return R+t.length-1}clearSelect(t={},e={}){const{isIgnoreDisabledRule:n=!1,isAddPlaceholder:i=!0}=e;if(!n&&this.control.getIsDisabledControl(t))return-1;const r=this.control.getValueRange(t);if(!r)return-1;const{startIndex:s,endIndex:a}=r;if(!~s||!~a)return-1;const c=t.elementList||this.control.getElementList();return this.control.getDraw().spliceElementList(c,s+1,a-s,[],{isIgnoreDeletedRule:e.isIgnoreDeletedRule}),i&&this.control.addPlaceholder(s,t),s}setSelect(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return;const i=e.elementList||this.control.getElementList(),r=e.range||this.control.getRange(),s=this.getValue(e)[0],a=s?Dt(s,Re):Dt(i[r.startIndex],At),c=this.clearSelect(e,{isAddPlaceholder:!1,isIgnoreDeletedRule:n.isIgnoreDeletedRule});if(!~c)return;const d=se(i[c],Re),u=c+1,R=this.control.getDraw();for(let h=0;h<t.length;h++){const g={...a,...d,type:l.ElementType.TEXT,value:t[h],controlComponent:l.ControlComponent.VALUE};(g.color===this.options.control.bracketColor||g.color===this.options.control.placeholderColor)&&(g.color=this.options.defaultColor),wt(i,[g],c,{editorOptions:this.options}),R.spliceElementList(i,u+h,0,[g])}if(!e.range){const h=u+t.length-1;this.control.repaintControl({curIndex:h}),this.control.emitControlContentChange({context:e}),this.destroy()}}keydown(t){if(this.control.getIsDisabledControl())return null;const e=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();const{startIndex:i,endIndex:r}=n,s=e[i],a=e[r],c=this.control.getDraw();if(t.key===l.KeyMap.Backspace)return i!==r?(c.spliceElementList(e,i+1,r-i),this.getValue().length||this.control.addPlaceholder(i),i):s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT||a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POST_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER?this.control.removeControl(i):(c.spliceElementList(e,i,1),this.getValue().length||this.control.addPlaceholder(i-1),i-1);if(t.key===l.KeyMap.Delete){if(i!==r)return c.spliceElementList(e,i+1,r-i),this.getValue().length||this.control.addPlaceholder(i),i;{const d=e[r+1];return(s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT)&&d.controlComponent===l.ControlComponent.PLACEHOLDER||d.controlComponent===l.ControlComponent.POSTFIX||d.controlComponent===l.ControlComponent.POST_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER?this.control.removeControl(i):(c.spliceElementList(e,i+1,1),this.getValue().length||this.control.addPlaceholder(i),i)}}return r}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();const{startIndex:t,endIndex:e}=this.control.getRange();if(t===e)return t;const n=this.control.getDraw(),i=this.control.getElementList();return n.spliceElementList(i,t+1,e-t),this.getValue().length||this.control.addPlaceholder(t),t}awake(){if(this.isPopup||this.control.getIsDisabledControl()||!this.control.getIsRangeWithinControl())return;const t=this.control.getPosition();if(!t)return;const e=this.draw.getElementList(),{startIndex:n}=this.control.getRange();if(e[n+1]?.controlId!==this.element.controlId)return;this.datePicker=new hr(this.draw,{onSubmit:this._setDate.bind(this)});const i=this.getValue().map(s=>s.value).join("")||"",r=this.element.control?.dateFormat;this.datePicker.render({value:i,position:t,dateFormat:r}),this.isPopup=!0}destroy(){this.isPopup&&(this.datePicker?.destroy(),this.isPopup=!1)}_setDate(t){t?this.setSelect(t):this.clearSelect(),this.destroy()}}class Dn extends Si{isPopup;inputPopup;constructor(t,e){super(t,e),this.isPopup=!1,this.inputPopup=null}getIsPopup(){return this.isPopup}setValue(t,e={},n={}){if(t.some(P=>!jl(P)||xr.test(P.value)))return-1;const i=e.elementList||this.control.getElementList(),r=e.range||this.control.getRange();this.control.shrinkBoundary(e);const s=at(t),{startIndex:a,endIndex:c}=r,d=i[a];let u=null;for(let P=a;P>=0;P--)if(i[P].controlComponent===l.ControlComponent.PREFIX){u=i[P];break}const R=u?.control||this.element.control;if(this.control.getIsExistValueByElementListIndex(i,a)){let P=a;for(;P>0;){const S=i[P];if(S.controlId!==d.controlId||S.controlComponent===l.ControlComponent.PREFIX||S.controlComponent===l.ControlComponent.PRE_TEXT)break;s.unshift(S),P--}let C=c+1;for(;C<i.length;){const S=i[C];if(S.controlId!==d.controlId||S.controlComponent===l.ControlComponent.POSTFIX||S.controlComponent===l.ControlComponent.POST_TEXT)break;s.push(S),C++}}const h=zi(s);if(Number.isNaN(Number(h))||!Number.isFinite(Number(h)))return-1;const g=R?.numberExclusiveOptions,f=g?.maxLength??null,T=g?.decimalPlaces??null,m=h.replace(/[.-]/g,"").length;if(f!=null&&m>f||T!=null&&(h.split(".")[1]||"").length>T)return-1;const p=Number(h),I=g?.minValue,L=g?.maxValue;return I!=null&&p<I||L!=null&&p>L?-1:super.setValue(t,e,n)}_setNumberValue(t){const e=this.control.getElementList(),n=this.control.getRange(),{startIndex:i}=n;let r=null;for(let F=i;F>=0;F--)if(e[F].controlComponent===l.ControlComponent.PREFIX){r=e[F];break}const a=(r?.control||this.element.control)?.numberExclusiveOptions,c=a?.minValue,d=a?.maxValue,u=a?.decimalPlaces,R=a?.minLength,h=a?.maxLength;let g=t;u!=null&&(g=parseFloat(t.toFixed(u)));const f=g.toString(),T=f.replace(/[.-]/g,"").length;if(R!=null&&T<R||h!=null&&T>h||c!=null&&g<c||d!=null&&g>d)return!1;let m=i;for(let F=i;F>=0;F--)if(e[F].controlComponent===l.ControlComponent.PREFIX){m=F;break}let p=m+1;for(let F=m+1;F<e.length;F++)if(e[F].controlComponent===l.ControlComponent.POSTFIX){p=F;break}const I=this.options.mode===l.EditorMode.FORM,L=I&&this.options.modeRule.form.inputTraceEnabled,P=I&&this.options.modeRule.form.deleteTraceEnabled,C=j(new Date).format("YYYY-MM-DD HH:mm:ss");if(P)for(let F=m+1;F<p;F++){const N=e[F];N.controlComponent===l.ControlComponent.VALUE&&!N.strikeout&&N.value&&(N.strikeout=!0,N.deletePerson="SYSTEM",N.deleteTime=C),N.controlComponent===l.ControlComponent.PLACEHOLDER&&(this.control.getDraw().spliceElementList(e,F,1),p--,F--)}else{const F=m+1,N=p-F;N>0&&this.control.getDraw().spliceElementList(e,F,N),p=m+1}p=m+1;for(let F=m+1;F<e.length;F++)if(e[F].controlComponent===l.ControlComponent.POSTFIX){p=F;break}const S=[];for(let F=0;F<f.length;F++){const N={type:l.ElementType.TEXT,value:f[F],controlComponent:l.ControlComponent.VALUE,controlId:e[m].controlId};L&&(N.textDecoration={style:l.TextDecorationStyle.DOUBLE},N.underline=!0),S.push(N)}for(let F=0;F<S.length;F++)this.control.getDraw().spliceElementList(e,p+F,0,[S[F]]);return this.control.repaintControl({curIndex:p+S.length-1}),this.control.emitControlContentChange(),!0}awake(){if(this.isPopup||this.control.getIsDisabledControl()||!this.control.getIsRangeWithinControl())return;const t=this.control.getElementList(),e=this.control.getRange(),{startIndex:n}=e,i=t[n];if(!i||i.controlId!==this.element.controlId)return;let r=null;for(let f=n;f>=0;f--)if(t[f].controlComponent===l.ControlComponent.PREFIX){r=t[f];break}const s=r?.control||this.element.control,c=this.getValue().filter(f=>!f.strikeout),d=c.length>0?zi(c):"",u=s?.numberExclusiveOptions,R=u?.minValue,h=u?.maxValue,g=u?.decimalPlaces;this.inputPopup=new Ih({control:this.control,currentValue:d,minValue:R,maxValue:h,decimalPlaces:g,onConfirm:f=>{if(!f||f.trim()==="")return this._clearNumberValue(),!0;const T=parseFloat(f);return Number.isNaN(T)||!Number.isFinite(T)?!1:this._setNumberValue(T)},onTab:f=>{this.destroy(),setTimeout(()=>{this.control.initNextControl({direction:f})})},onClose:()=>{this.destroy()}}),this.inputPopup.create(),this.isPopup=!0}_clearNumberValue(){const t=this.control.getElementList(),e=this.control.getRange(),{startIndex:n}=e;let i=n;for(let c=n;c>=0;c--)if(t[c].controlComponent===l.ControlComponent.PREFIX){i=c;break}let r=i+1;for(let c=i+1;c<t.length;c++)if(t[c].controlComponent===l.ControlComponent.POSTFIX){r=c;break}const s=i+1,a=r-s;a>0&&this.control.getDraw().spliceElementList(t,s,a),this.control.addPlaceholder(i),this.control.repaintControl({curIndex:i}),this.control.emitControlContentChange()}keydown(t){if(this.control.getIsDisabledControl())return null;const e=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();const{startIndex:i,endIndex:r}=n,s=e[i],a=e[r],c=this.control.getDraw();if(t.key==="Backspace")return s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT||s.controlComponent===l.ControlComponent.PLACEHOLDER?this.control.removeControl(i):a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POST_TEXT?i:i!==r?(c.spliceElementList(e,i+1,r-i),this.getValue().length||this.control.addPlaceholder(i),i):(c.spliceElementList(e,i,1),this.getValue().length||this.control.addPlaceholder(i-1),i-1);if(t.key==="Delete"){const u=e[r+1];return s.controlComponent===l.ControlComponent.PLACEHOLDER||a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POST_TEXT?this.control.removeControl(i):s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRE_TEXT||u?.controlComponent===l.ControlComponent.POSTFIX||u?.controlComponent===l.ControlComponent.POST_TEXT?r:i!==r?(c.spliceElementList(e,i+1,r-i),this.getValue().length||this.control.addPlaceholder(i),i):(c.spliceElementList(e,i+1,1),this.getValue().length||this.control.addPlaceholder(i),i)}return t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey?(t.preventDefault(),this.awake(),null):r}destroy(){this.inputPopup&&(this.inputPopup.destroy(),this.inputPopup=null),this.isPopup=!1}}class Ih{options;popupDom;constructor(t){this.options=t,this.popupDom=null}create(){const{currentValue:t,minValue:e,maxValue:n,decimalPlaces:i,onConfirm:r,onTab:s,onClose:a}=this.options,c=document.createElement("div");c.classList.add(`${z}-number-input-modal`),c.setAttribute(ue,l.EditorComponent.POPUP);const d=document.createElement("div");d.classList.add(`${z}-number-input-modal__content`);const u=document.createElement("div");if(u.classList.add(`${z}-number-input-modal__title`),u.textContent="请输入数值",d.appendChild(u),e!==void 0||n!==void 0){const I=document.createElement("div");I.classList.add(`${z}-number-input-modal__hint`);let L="有效范围:";e!==void 0&&n!==void 0?L+=`${e} ~ ${n}`:e!==void 0?L+=`≥ ${e}`:L+=`≤ ${n}`,i!=null&&(L+=`,保留${i}位小数`),I.textContent=L,d.appendChild(I)}const R=document.createElement("input");R.classList.add(`${z}-number-input-modal__input`),R.type="number",R.value=t,R.placeholder="请输入数值",e!==void 0&&(R.min=String(e)),n!==void 0&&(R.max=String(n)),i!=null&&(R.step=(1/Math.pow(10,i)).toString()),setTimeout(()=>{R.focus(),R.select()},100),d.appendChild(R);const h=document.createElement("div");h.classList.add(`${z}-number-input-modal__error`),h.style.display="none",d.appendChild(h);const g=document.createElement("div");g.classList.add(`${z}-number-input-modal__buttons`);const f=document.createElement("button");f.classList.add(`${z}-number-input-modal__cancel`),f.textContent="取消",f.onclick=()=>{a()},g.appendChild(f);const T=document.createElement("button");T.classList.add(`${z}-number-input-modal__confirm`),T.textContent="确定";const m=()=>{const I=R.value.trim();if(!I)return r("");const L=parseFloat(I);return Number.isNaN(L)||!Number.isFinite(L)?(h.textContent="请输入有效的数值",h.style.display="block",!1):i!=null&&(I.split(".")[1]||"").length>i?(h.textContent=`小数位数不能超过${i}位`,h.style.display="block",!1):e!==void 0&&L<e?(h.textContent=`数值不能小于 ${e}`,h.style.display="block",!1):n!==void 0&&L>n?(h.textContent=`数值不能大于 ${n}`,h.style.display="block",!1):(h.style.display="none",r(I))};T.onclick=()=>{m()&&a()},g.appendChild(T),d.appendChild(g),c.appendChild(d),R.onkeydown=I=>{I.key==="Enter"?T.click():I.key==="Tab"?(I.preventDefault(),m()&&(a(),s(I.shiftKey?Ut.UP:Ut.DOWN))):I.key==="Escape"&&a()},this.options.control.getContainer().appendChild(c),this.popupDom=c}destroy(){this.popupDom&&(this.popupDom.remove(),this.popupDom=null)}}class Ph{options;mask;container;inputList;optionItemContainers;data;constructor(t){this.options=t,this.mask=null,this.container=null,this.inputList=[],this.optionItemContainers=[],this.data=t.data,this._render()}_getFieldValue(t){const e=this.inputList.filter(n=>n.name===t);if(e.length!==0){for(const n of e)if(n instanceof HTMLInputElement&&n.type==="radio"&&n.checked)return n.value;return e[0].value}}_updateFieldVisibility(){this.data.forEach((t,e)=>{if(t.visibleWhen){const{field:n,value:i}=t.visibleWhen,r=this._getFieldValue(n),s=this.optionItemContainers[e];if(s){const a=r===i;s.style.display=a?"":"none"}}})}_render(){const{title:t,onClose:e,onCancel:n,onConfirm:i}=this.options,r=document.createElement("div");r.classList.add("dialog-mask"),r.setAttribute(ue,l.EditorComponent.COMPONENT),document.body.append(r);const s=document.createElement("div");s.classList.add("dialog-container"),s.setAttribute(ue,l.EditorComponent.COMPONENT);const a=document.createElement("div");a.classList.add("dialog"),s.append(a);const c=document.createElement("div");c.classList.add("dialog-title");const d=document.createElement("span");d.append(document.createTextNode(t));const u=document.createElement("i");u.onclick=()=>{e&&e(),this._dispose()},c.append(d),c.append(u),a.append(c);const R=document.createElement("div");R.classList.add("dialog-option");for(let T=0;T<this.data.length;T++){const m=this.data[T],p=document.createElement("div");if(p.classList.add("dialog-option__item"),m.visible===!1&&(p.style.display="none"),m.label){const I=document.createElement("span");I.append(document.createTextNode(m.label)),p.append(I),m.required&&I.classList.add("dialog-option__item--require")}if(m.type==="radio"){const I=document.createElement("div");I.classList.add("dialog-radio-group"),m.horizontal&&I.classList.add("dialog-radio-group--horizontal"),m.options?.forEach(L=>{const P=document.createElement("label");P.classList.add("dialog-radio-item");const C=document.createElement("input");C.type="radio",C.name=m.name,C.value=L.value,L.value===(m.value||"")&&(C.checked=!0);const S=document.createElement("span");S.textContent=L.label,P.append(C),P.append(S),I.append(P),C.addEventListener("change",()=>{this._updateFieldVisibility()}),this.inputList.push(C)}),p.append(I)}else if(m.type==="select"){const I=document.createElement("select"),L=m.value||"";m.options?.forEach(P=>{const C=document.createElement("option");C.value=P.value,C.label=P.label,P.value===L&&(C.selected=!0),I.append(C)}),I.name=m.name,I.value=L,I.addEventListener("change",()=>{this._updateFieldVisibility()}),m.width&&(I.style.width=`${m.width}px`),p.append(I),this.inputList.push(I)}else if(m.type==="textarea"){const I=document.createElement("textarea");I.name=m.name,I.value=m.value||"",I.placeholder=m.placeholder||"",m.width&&(I.style.width=`${m.width}px`),m.height&&(I.style.height=`${m.height}px`),p.append(I),this.inputList.push(I)}else{const I=document.createElement("input");I.type=m.type,I.name=m.name,I.value=m.value||"",I.placeholder=m.placeholder||"",m.width&&(I.style.width=`${m.width}px`),m.height&&(I.style.height=`${m.height}px`),p.append(I),this.inputList.push(I)}R.append(p),this.optionItemContainers.push(p)}a.append(R);const h=document.createElement("div");h.classList.add("dialog-menu");const g=document.createElement("button");g.classList.add("dialog-menu__cancel"),g.append(document.createTextNode("取消")),g.type="button",g.onclick=()=>{n&&n(),this._dispose()},h.append(g);const f=document.createElement("button");f.append(document.createTextNode("确定")),f.type="submit",f.onclick=()=>{if(i){const T=new Set,m=[];for(const p of this.inputList)if(!T.has(p.name))if(p instanceof HTMLInputElement&&p.type==="radio"){const I=this.inputList.find(L=>L.name===p.name&&L instanceof HTMLInputElement&&L.checked);I&&(m.push({name:p.name,value:I.value}),T.add(p.name))}else m.push({name:p.name,value:p.value}),T.add(p.name);i(m)}this._dispose()},h.append(f),a.append(h),document.body.append(s),this.container=s,this.mask=r,this._updateFieldVisibility()}_dispose(){this.mask?.remove(),this.container?.remove()}}class $e{draw;element;control;isPopup;datePicker;options;range;static isDeleting=!1;inputModal=null;constructor(t,e){const n=e.getDraw();this.draw=n,this.range=n.getRange(),this.options=n.getOptions(),this.element=t,this.control=e,this.isPopup=!1,this.datePicker=null}setElement(t){this.element=t}getElement(){return this.element}getIsPopup(){return this.isPopup}getValue(){return[]}setValue(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return-1;const{elementList:i,range:r}=this.control.mergeControl(e),s=this.control.getDraw(),{startIndex:a}=r,d=i[a].controlId;let u=a;for(let p=a;p>=0;p--){const I=i[p];if(I.controlId!==d)break;if(I.controlComponent===l.ControlComponent.PREFIX){u=p;break}}let R=a;for(let p=a;p<i.length;p++){const I=i[p];if(I.controlId!==d){R=p;break}if(I.controlComponent===l.ControlComponent.POSTFIX){R=p;break}}const h=u+1,g=R-1;g>=h&&s.spliceElementList(i,h,g-h+1);const f=i[u],T=Dt(f,["control","controlId",...At]),m=u+1;for(let p=0;p<t.length;p++){const I={...T,...t[p],controlComponent:l.ControlComponent.VALUE};I.color="#fff",I.highlight="#1677FF",wt(i,[I],u,{editorOptions:this.options}),s.spliceElementList(i,m+p,0,[I])}return m+t.length-1}clearSelect(t={},e={}){const{isIgnoreDisabledRule:n=!1,isAddPlaceholder:i=!0}=e;if(!n&&this.control.getIsDisabledControl(t))return-1;const r=this.control.getValueRange(t);if(!r)return-1;const{startIndex:s,endIndex:a}=r;if(!~s||!~a)return-1;const c=t.elementList||this.control.getElementList();return this.control.getDraw().spliceElementList(c,s+1,a-s,[],{isIgnoreDeletedRule:e.isIgnoreDeletedRule}),i&&this.control.addPlaceholder(s,t),s}keydown(t){if(this.control.getIsDisabledControl())return null;const e=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();const{endIndex:i}=n,r=e[i];return!!r?.originControlId&&!!r?.controlId&&r.originControlId!==r.controlId&&r.control?.type===l.ControlType.BUTTON&&!r.control?.buttonText&&(t.key===l.KeyMap.Backspace||t.key===l.KeyMap.Delete)?this.control.removeControl(i):r?.controlComponent==="value"&&r.control?.type==="button"&&r.control?.buttonText?t.key===l.KeyMap.Backspace||t.key===l.KeyMap.Delete?(r.controlId&&this.removeByValue(e,r.controlId),i):null:(t.key===l.KeyMap.Backspace&&r?.controlComponent==="value"&&r.control?.type==="button"&&!r.control?.buttonText,null)}removeByValue(t,e){return $e.isDeleting=!0,new Promise(n=>{for(let c=t.length-1;c>=0;c--)(t[c].type=="control"||t[c].type=="text")&&t[c].controlId===e&&t.splice(c,1);const{startIndex:i,endIndex:r}=this.range.getRange(),s=!0,a=r;this.draw.render({curIndex:a,isSetCursor:s}),setTimeout(()=>{$e.isDeleting=!1},300),n(!0)})}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();const{startIndex:t,endIndex:e}=this.control.getRange();if(t===e)return t;const n=this.control.getDraw(),i=this.control.getElementList();return n.spliceElementList(i,t+1,e-t),this.getValue().length||this.control.addPlaceholder(t),t}awake(){if(this.isPopup||this.control.getIsDisabledControl()||!this.control.getIsRangeWithinControl()||$e.isDeleting||!this.control.getPosition())return;const e=this.draw.getElementList(),{startIndex:n}=this.control.getRange();if(e[n]?.controlId!==this.element?.controlId)return;const i=this.control.getDraw().getPosition().getPositionContext();if(!i.isDirectHit||i.index!==n||e[i.index]?.controlId!==this.element?.controlId)return;const r=e[n]?.controlId,s=e[n]?.control;if(!(r?.endsWith("_text")||s?.buttonText)){if(this.options.mode=="form"){const a=e[n].controlId;if(!a)return;const c=e.filter(d=>d.controlId==a);c[0].control.buttonText||this.showInputModal(c)}else if(this.options.mode=="edit"){const a=e[n].controlId,c=e.filter(d=>d.controlId==a);this.showEditModal(c)}}}showInputModal(t){if(this.inputModal){this.closeInputModal();return}this.isPopup=!0,this.inputModal=document.createElement("div"),this.inputModal.classList.add(`${z}-button-input-modal`),this.inputModal.setAttribute(ue,l.EditorComponent.POPUP),this.inputModal.oncontextmenu=c=>{c.preventDefault(),c.stopPropagation()};const e=document.createElement("div");e.classList.add(`${z}-button-input-modal__content`),e.oncontextmenu=c=>{c.preventDefault(),c.stopPropagation()};const n=document.createElement("div");n.classList.add(`${z}-button-input-modal__title`),n.innerText="请输入按钮展开文字(用逗号分隔)";const i=document.createElement("textarea");i.classList.add(`${z}-button-input-modal__textarea`),i.placeholder="例如:选项1,选项2,选项3",i.rows=5;const r=document.createElement("div");r.classList.add(`${z}-button-input-modal__buttons`);const s=document.createElement("button");s.classList.add(`${z}-button-input-modal__cancel`),s.innerText="取消",s.onclick=()=>this.closeInputModal();const a=document.createElement("button");a.classList.add(`${z}-button-input-modal__confirm`),a.innerText="确认",a.onclick=()=>{const c=i.value.trim();if(c){const d=c.split(/[,,]/).map((u,R)=>({value:u.trim(),code:String(R+1)})).filter(u=>u.value);if(d.length>0&&t[0]?.controlId){const u={controlId:t[0].controlId,element:[{...t[0],newButtonValue:d}]};this.draw.getCommand().executeButton(u)}}this.closeInputModal()},r.appendChild(s),r.appendChild(a),e.appendChild(n),e.appendChild(i),e.appendChild(r),this.inputModal.appendChild(e),this.draw.getContainer().appendChild(this.inputModal),setTimeout(()=>i.focus(),100),this.inputModal.onclick=c=>{c.target===this.inputModal&&this.closeInputModal()}}closeInputModal(){this.inputModal&&(this.inputModal.remove(),this.inputModal=null),this.isPopup=!1}showEditModal(t){const e=t[0]?.control||{},n=e.buttonLabel||e.label||"按钮",i=e.code||"";this.isPopup=!0,new Ph({title:"修改按钮属性",data:[{type:"text",label:"按钮标签",name:"buttonLabel",required:!0,placeholder:"请输入按钮标签",value:n},{type:"text",label:"按钮代码",name:"code",placeholder:"请输入按钮代码",value:i}],onClose:()=>{this.isPopup=!1},onCancel:()=>{this.isPopup=!1},onConfirm:r=>{const s=r.find(h=>h.name==="buttonLabel")?.value?.trim()||"按钮",a=r.find(h=>h.name==="code")?.value?.trim()||"",c=this.control.getElementList(),d=t[0]?.controlId;if(d)for(let h=0;h<c.length;h++){const g=c[h];g.controlId===d&&g.control&&(g.control.buttonLabel=s,g.control.label=s,g.control.code=a)}const u=[];for(let h=0;h<s.length;h++)u.push({value:s[h],controlComponent:l.ControlComponent.VALUE});const R=this.setValue(u);R!==-1&&this.control.repaintControl({curIndex:R}),this.isPopup=!1}})}destroy(){this.isPopup&&(this.datePicker?.destroy(),this.isPopup=!1)}}class gr{draws;ranges;element;control;options;position;constructor(t,e){const n=e.getDraw();this.draws=n,this.position=n.getPosition(),this.ranges=n.getRange(),this.options=n.getOptions(),this.element=t,this.control=e}setElement(t){this.element=t}getElement(){return this.element}getValue(t={}){const e=t.elementList||this.control.getElementList();let{startIndex:n}=t.range||this.control.getRange();const i=this.control.getDraw(),r=t?null:i.getTd();n>=e.length&&(n=e.length-1);const s=e[n],a=[];let c=r;if(s.controlComponent===l.ControlComponent.PRETEXTFIX||s.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){let f=n+1;for(;f<e.length;){const T=e[f];if(T.controlId!==s.controlId||T.controlComponent!==l.ControlComponent.PRETEXTFIX&&T.controlComponent!==l.ControlComponent.PRETEXTFIX_TEXT){n=f-1;break}f++}}let d=e,u=n;for(;;){if(u<0&&c?.linkTdPrevId){const T=i.getTdById(c.linkTdPrevId);if(T){d=T.value,u=d.length-1,c=T;continue}}if(u<0)break;const f=d[u];if(f.controlId!==s.controlId||f.controlComponent===l.ControlComponent.PRETEXTFIX||f.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||f.controlComponent===l.ControlComponent.TEXTFIXLABEL)break;f.controlComponent===l.ControlComponent.VALUE&&a.unshift(f),u--}c=r;let R=e,h=n+1;for(;;){if(h>=R.length&&c?.linkTdNextId){const T=i.getTdById(c.linkTdNextId);if(T){R=T.value,h=0,c=T;continue}}const f=R[h];if(!f||f.controlId!==s.controlId||f.controlComponent===l.ControlComponent.POSTTEXTFIX||f.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||f.controlComponent===l.ControlComponent.TEXTFIXLABEL)break;f.controlComponent===l.ControlComponent.VALUE&&a.push(f),h++}return a.filter(f=>f.type!==l.ElementType.SPLIT_TAG)}removeNextControlElement(t,e){const n=this.control.getDraw();if(e=e??n.getTd()?.linkTdNextId,e){const i=n.getTdById(e);if(i){if(i.value.length){if(i.value[1].controlId===t)return n.spliceElementList(i.value,1,1),i.value[1]}else if(i.linkTdNextId)return this.removeNextControlElement(t,i.linkTdNextId)}}}setValue(t,e={},n={}){if(this.options.mode===l.EditorMode.FORM||!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return-1;const{elementList:i,range:r}=this.control.mergeControl(e);this.control.shrinkBoundary(e);const{startIndex:s,endIndex:a}=r,c=this.control.getDraw();s!==a?c.spliceElementList(i,s+1,a-s,[],{isIgnoreDeletedRule:n.isIgnoreDeletedRule}):this.control.removePlaceholder(s,{elementList:i});const d=i[s],u=i[s+1];let R=d.originControlId||d.controlId,h=d.originControlId&&(d.controlComponent===l.ControlComponent.POSTFIX||d.controlComponent===l.ControlComponent.POSTTEXTFIX||d.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||d.controlComponent===l.ControlComponent.POST_TEXT);if(!h&&d.controlId&&(d.controlComponent===l.ControlComponent.POSTFIX||d.controlComponent===l.ControlComponent.POSTTEXTFIX||d.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||d.controlComponent===l.ControlComponent.POST_TEXT)&&u?.controlId&&u.controlId!==d.controlId)if(u.controlComponent===l.ControlComponent.PREFIX||u.controlComponent===l.ControlComponent.PRETEXTFIX)for(let p=s;p>=0;p--){const I=i[p];if(I.controlId===d.controlId&&(I.controlComponent===l.ControlComponent.PREFIX||I.controlComponent===l.ControlComponent.PRETEXTFIX)){for(let L=p-1;L>=0;L--){const P=i[L];if(P.controlId&&P.controlId!==d.controlId&&(P.controlComponent===l.ControlComponent.PRETEXTFIX||P.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||P.controlComponent===l.ControlComponent.PREFIX||P.controlComponent===l.ControlComponent.PRE_TEXT)){R=P.controlId,h=!0;break}if(P.controlId&&P.controlId!==d.controlId&&(P.controlComponent===l.ControlComponent.POSTFIX||P.controlComponent===l.ControlComponent.POSTTEXTFIX))break}break}}else(u.controlComponent===l.ControlComponent.POSTFIX||u.controlComponent===l.ControlComponent.POSTTEXTFIX)&&(R=u.controlId,h=!0);if(!h&&d.controlId&&(d.controlComponent===l.ControlComponent.POSTFIX||d.controlComponent===l.ControlComponent.POSTTEXTFIX||d.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||d.controlComponent===l.ControlComponent.POST_TEXT))for(let p=s;p>=0;p--){const I=i[p];if(I.controlId===d.controlId&&(I.controlComponent===l.ControlComponent.PREFIX||I.controlComponent===l.ControlComponent.PRETEXTFIX)){for(let L=p-1;L>=0;L--){const P=i[L];if(P.controlId&&P.controlId!==d.controlId&&(P.controlComponent===l.ControlComponent.PRETEXTFIX||P.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||P.controlComponent===l.ControlComponent.PREFIX||P.controlComponent===l.ControlComponent.PRE_TEXT)){R=P.controlId,h=!0;break}if(P.controlId&&P.controlId!==d.controlId&&(P.controlComponent===l.ControlComponent.POSTFIX||P.controlComponent===l.ControlComponent.POSTTEXTFIX))break}break}}const g=d.type&&!zt.includes(d.type)||d.controlComponent===l.ControlComponent.PRETEXTFIX||d.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT?Dt(d,["control","controlId",...At]):se(d,["type"]);h&&(g.controlId=R,delete g.originControlId);const f=r.startIndex+1,T=[],m=p=>{const I=T.length?T:i,L=T.length?T.length-1:r.startIndex;wt(I,[p],L,{editorOptions:this.options}),T.push(p)};for(let p=0;p<t.length;p++){const I=t[p];if(I.type===l.ElementType.CONTROL&&I.control){const L=I,P=L.controlId||lt(),C=L.control?.value||[],S=L.control?.type===l.ControlType.TEXTFIELD,F={...g,controlId:P,type:l.ElementType.CONTROL,control:L.control,originControlId:R},N=S?l.ControlComponent.PRETEXTFIX:l.ControlComponent.PREFIX,V=S?l.ControlComponent.POSTTEXTFIX:l.ControlComponent.POSTFIX,Y=S?L.control?.preTextFix||this.options.control.preTextFix:L.control?.prefix||this.options.control.prefix;for(let W=0;W<Y.length;W++){const X={...F,value:Y[W],controlComponent:N};m(X)}for(let W=0;W<C.length;W++){const X=C[W],O={...F,...X,controlComponent:l.ControlComponent.VALUE,type:X.type};(O.color===this.options.control.textFixColor||O.color===this.options.control.placeholderColor)&&(O.color=this.options.defaultColor),m(O)}if(C.length===0){const W=L.control?.placeholder||"";for(let X=0;X<W.length;X++){const O={...F,value:W[X],controlComponent:l.ControlComponent.PLACEHOLDER,color:this.options.control.placeholderColor};m(O)}}const E=S?L.control?.postTextFix||this.options.control.postTextFix:L.control?.postfix||this.options.control.postfix;for(let W=0;W<E.length;W++){const X={...F,value:E[W],controlComponent:V};m(X)}}else if(I.type||I.value){g.color=this.options.defaultColor;const L={...g,...I,controlComponent:l.ControlComponent.VALUE};(L.color===this.options.control.textFixColor||L.color===this.options.control.placeholderColor)&&(L.color=this.options.defaultColor),m(L)}}return T.length&&c.spliceElementList(i,f,0,T),r.startIndex+T.length}clearValue(t={},e={}){if(!e.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return-1;const n=t.elementList||this.control.getElementList(),i=t.range||this.control.getValueRange()||this.control.getRange();this.control.shrinkBoundary(t);const{startIndex:r,endIndex:s}=i;return this.control.getDraw().spliceElementList(n,r+1,s-r,[],{isIgnoreDeletedRule:e.isIgnoreDeletedRule}),e.isAddPlaceholder!==!1&&(this.getValue(t).length||this.control.addPlaceholder(r,t)),r}keydown(t){if(this.control.getIsDisabledControl())return null;const e=this.control.getElementList(),n=this.control.getRange(),i=n.startIndex,r=n.endIndex;if(t.key===l.KeyMap.Backspace&&i===r&&i>0){const m=e[i-1],p=m?.controlComponent===l.ControlComponent.POSTFIX||m?.controlComponent===l.ControlComponent.POSTTEXTFIX,I=m?.controlComponent===l.ControlComponent.PLACEHOLDER,L=!!m?.controlId,C=this.draws.getPosition().getPositionList(),S=C[i],F=C[i-1],N=S&&F&&S.rowIndex===F.rowIndex;if((p||I)&&L&&N)return this.control.removeControl(i-1)}this.control.shrinkBoundary();const{startIndex:s,endIndex:a}=n,c=e[s],d=this.control.getDraw(),u=e[a+1],R=!!c?.originControlId&&!!c?.controlId&&c.originControlId!==c.controlId,h=R&&(c.controlComponent===l.ControlComponent.PREFIX||c.controlComponent===l.ControlComponent.PRE_TEXT||c.controlComponent===l.ControlComponent.PRETEXTFIX||c.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||c.controlComponent===l.ControlComponent.POSTFIX||c.controlComponent===l.ControlComponent.POST_TEXT||c.controlComponent===l.ControlComponent.POSTTEXTFIX||c.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||c.controlComponent===l.ControlComponent.PLACEHOLDER||c.controlComponent===l.ControlComponent.TEXTFIXLABEL),g=R&&c.control?.type===l.ControlType.BUTTON&&c.controlComponent===l.ControlComponent.VALUE,f=!!u?.originControlId&&!!u?.controlId&&u.originControlId!==u.controlId&&(u.controlComponent===l.ControlComponent.PREFIX||u.controlComponent===l.ControlComponent.PRE_TEXT||u.controlComponent===l.ControlComponent.PRETEXTFIX||u.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||u.controlComponent===l.ControlComponent.PLACEHOLDER||u.controlComponent===l.ControlComponent.TEXTFIXLABEL),T=!!u?.originControlId&&!!u?.controlId&&u.originControlId!==u.controlId&&u.control?.type===l.ControlType.BUTTON;if(t.key===l.KeyMap.Backspace){if(s===a&&(h||g))return this.control.removeControl(s);if(this.options.mode===l.EditorMode.FORM)this.strikeout();else return s!==a?e.slice(s,a+1).some(I=>I.controlComponent===l.ControlComponent.POSTTEXTFIX||I.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)?s:(d.spliceElementList(e,s+1,a-s),this.getValue().length||this.control.addPlaceholder(s),s===0&&e[0].type===l.ElementType.SPLIT_TAG?d.fixPosition(!0)??s:s):c.controlComponent===l.ControlComponent.PRETEXTFIX||c.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||c.controlComponent===l.ControlComponent.POSTTEXTFIX||c.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||c.controlComponent===l.ControlComponent.TEXTFIXLABEL||c.controlComponent===l.ControlComponent.PLACEHOLDER?s:(d.spliceElementList(e,s,1),this.getValue().length||this.control.addPlaceholder(s-1),s===1&&e[0].type===l.ElementType.SPLIT_TAG||s===0?d.fixPosition(!0)??s-1:s-1)}else if(t.key===l.KeyMap.Delete){if(s===a&&(h||g))return this.control.removeControl(s);if(s===a&&(f||T))return this.control.removeControl(a+1);if(this.options.mode===l.EditorMode.FORM)this.strikeout();else return s!==a?(d.spliceElementList(e,s+1,a-s),this.getValue().length||this.control.addPlaceholder(s),s===0&&e[0].type===l.ElementType.SPLIT_TAG?d.fixPosition(!0)??s:s):(u||d.getTd()?.linkTdNextId&&c.controlId&&this.removeNextControlElement(c.controlId),u&&((c.controlComponent===l.ControlComponent.PRETEXTFIX||c.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)&&(u.controlComponent===l.ControlComponent.PLACEHOLDER||u.controlComponent===l.ControlComponent.TEXTFIXLABEL)||u.controlComponent===l.ControlComponent.POSTTEXTFIX||u.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||c.controlComponent===l.ControlComponent.PLACEHOLDER||c.controlComponent===l.ControlComponent.TEXTFIXLABEL)?s:(d.spliceElementList(e,s+1,1),this.getValue().length||this.control.addPlaceholder(s),s===0&&e[0].type===l.ElementType.SPLIT_TAG?d.fixPosition(!0)??s:s))}return a}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();const{startIndex:t,endIndex:e}=this.control.getRange();if(t===e)return t;const n=this.control.getDraw(),i=this.control.getElementList();return n.spliceElementList(i,t+1,e-t),this.getValue().length||this.control.addPlaceholder(t),t}strikeout(t,e={},n={}){const{isIgnoreDisabledRule:i=!1}=t||{};if(!i&&(this.draws.isReadonly()||this.draws.isDisabled()))return;const s=this.ranges.getSelectionElementList(),a=this.position.getCursorPosition(),c=j(new Date).format("YYYY-MM-DD HH:mm:ss");if(s?.length){if(!this.element.strikeout){const d=s.findIndex(u=>!u.strikeout);s.forEach(u=>{u.deletePerson="SWJ",u.deleteTime=c,u.strikeout=!!~d}),this.draws.render({isSetCursor:!0,isCompute:!1,isDel:!0,isSubmitHistory:!1}),setTimeout(()=>{this.strikeoute()},100)}}else{const d=this.control.getElementList()[a.index];if(!this.control.getElementList()[a.index].strikeout&&d?.metrics.width>0){this.control.getElementList()[a.index].strikeout=!0,this.control.getElementList()[a.index].deletePerson="SWJ",this.control.getElementList()[a.index].deleteTime=c;const u=--a.index;setTimeout(()=>{this.strikeoute()},100),setTimeout(()=>{const h=u;this.draws.render({curIndex:h,isSetCursor:!0}),a.index=u,this.position.setCursorPosition(a),this.ranges.setRange(u,u)},100)}else{const{elementList:u,range:R}=this.control.mergeControl(n),h=R.startIndex;if(h>=0&&h<u.length&&u[h]?.metrics?.width!==void 0&&u[h].metrics.width<=0&&!u[h]?.strikeout){this.draws.spliceElementList(u,R.startIndex,1,[],{isIgnoreDeletedRule:e.isIgnoreDeletedRule});const g=!0,f=R.startIndex-1;this.draws.render({curIndex:f,isSetCursor:g}),a.index=f,delete a.value,this.position.setCursorPosition(a),this.ranges.setRange(f,f)}}}}strikeoute(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draws.isReadonly()||this.draws.isDisabled()))return;if(!this.ranges.getSelectionElementList()?.length){const{endIndex:r}=this.ranges.getRange(),a=this.draws.getElementList()[r];this.ranges.setDefaultStyle({strikeout:a.strikeout?!1:!this.ranges.getDefaultStyle()?.strikeout})}}}const Mh={indent:" ",divider:"────────────────"};class fr{draw;element;control;options;isPopup;inputModal=null;constructor(t,e){const n=e.getDraw();this.draw=n,this.options=n.getOptions(),this.element=t,this.control=e,this.isPopup=!1}setElement(t){this.element=t}getElement(){return this.element}getIsPopup(){return this.isPopup}getValue(t={}){const e=t.elementList||this.control.getElementList(),n=this.control.getValueRange(t);if(!n)return[];const i=[],{startIndex:r,endIndex:s}=n;for(let a=r;a<=s;a++){const c=e[a];c.controlComponent===l.ControlComponent.VALUE&&i.push(c)}return i}setValue(t,e={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return-1;const{elementList:i,range:r}=this.control.mergeControl(e),s=this.control.getDraw(),{startIndex:a}=r,d=i[a].controlId;let u=a;for(let p=a;p>=0;p--){const I=i[p];if(I.controlId!==d)break;if(I.controlComponent===l.ControlComponent.PREFIX){u=p;break}}let R=a;for(let p=a;p<i.length;p++){const I=i[p];if(I.controlId!==d){R=p;break}if(I.controlComponent===l.ControlComponent.POSTFIX){R=p;break}}const h=u+1,g=R-1;g>=h&&s.spliceElementList(i,h,g-h+1);const f=i[u],T=Dt(f,["control","controlId",...At]),m=u+1;for(let p=0;p<t.length;p++){const I={...T,...t[p],value:t[p].value===`
|
|
105
|
+
`?_:t[p].value,controlComponent:l.ControlComponent.VALUE};(I.color===this.options.control.bracketColor||I.color===this.options.control.placeholderColor)&&(I.color=this.options.defaultColor),wt(i,[I],u,{editorOptions:this.options}),s.spliceElementList(i,m+p,0,[I])}return m+t.length-1}keydown(t){if(this.control.getIsDisabledControl()||this.options.mode===l.EditorMode.FORM)return null;const e=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();const{startIndex:i}=n,r=e[i];if(t.key===l.KeyMap.Backspace||t.key===l.KeyMap.Delete){const s=r.controlId;let a=i,c=i;for(;a>0&&e[a-1].controlId===s;)a--;for(;c<e.length-1&&e[c+1].controlId===s;)c++;return this.draw.spliceElementList(e,a,c-a+1),a>0?a-1:0}return null}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();const{startIndex:t,endIndex:e}=this.control.getRange();if(t===e)return t;const n=this.control.getDraw(),i=this.control.getElementList();return n.spliceElementList(i,t+1,e-t),this.getValue().length||this.control.addPlaceholder(t),t}awake(){if(this.options.mode===l.EditorMode.PRINT||this.isPopup||this.control.getIsDisabledControl())return;let t=!1;const e=this.control.getElementList(),n=this.element.controlId;for(let i=0;i<e.length;i++){const r=e[i];r.controlId===n&&r.control&&r.control._justCreated&&(t=!0,delete r.control._justCreated)}t||this.showMenstrualHistoryDialog()}generateDisplayText(t){const{indent:e,divider:n}=Mh,{isMenopause:i,periodMin:r,periodMax:s,menarcheAge:a,cycleMin:c,cycleMax:d}=t,u=`${e}月经持续${r}~${s}天`,R=`${e}生理周期持续${c}~${d}天${_}`;let h;return i?h=`初潮年龄${a}岁${n}闭经年龄${t.menopauseAge||"_"}岁`:h=`初潮年龄${a}岁${n}末次日期${t.lastPeriod||"____-__-__"}`,`${_} ${u}
|
|
106
106
|
${h}
|
|
107
107
|
${R} `}textToElements(t){const e=[],n=t.split(`
|
|
108
108
|
`);return n.forEach((i,r)=>{for(let s=0;s<i.length;s++)e.push({value:i[s],controlComponent:l.ControlComponent.VALUE});r<n.length-1&&e.push({value:_,controlComponent:l.ControlComponent.VALUE})}),e}showMenstrualHistoryDialog(){this.inputModal&&this.closeModal(),this.isPopup=!0;const t=this.element.control?.menstrualData;this.inputModal=document.createElement("div"),this.inputModal.className="menstrual-history-edit-modal",this.inputModal.setAttribute("editor-component","menstrual-history-edit-modal"),this.inputModal.innerHTML=`
|
|
@@ -181,8 +181,8 @@ ${R} `}textToElements(t){const e=[],n=t.split(`
|
|
|
181
181
|
<button class="btn-confirm">确认</button>
|
|
182
182
|
</div>
|
|
183
183
|
</div>
|
|
184
|
-
`,document.body.appendChild(this.inputModal);const e=this.inputModal.querySelector(".menstrual-history-modal__mask"),n=this.inputModal.querySelector(".menstrual-history-modal__container"),i=this.inputModal.querySelector(".menstrual-history-modal__close"),r=this.inputModal.querySelector(".btn-cancel"),s=this.inputModal.querySelector(".btn-confirm"),a=this.inputModal.querySelector("#mh-edit-notMenopause"),c=this.inputModal.querySelector("#mh-edit-isMenopauseForm"),d=this.inputModal.querySelectorAll('input[name="mh-edit-isMenopause"]'),u=()=>{this.closeModal()};n.addEventListener("click",R=>{R.stopPropagation()}),e.addEventListener("click",u),i.addEventListener("click",u),r.addEventListener("click",u),d.forEach(R=>{R.addEventListener("change",()=>{const h=R.value==="true";a.style.display=h?"none":"block",c.style.display=h?"block":"none"})}),s.addEventListener("click",R=>{R.preventDefault(),R.stopPropagation();const h=this.inputModal;if(!h)return;const g=h.querySelector('input[name="mh-edit-isMenopause"]:checked')?.value==="true";let f;g?f={isMenopause:!0,periodMin:h.querySelector("#mh-edit-periodMin2")?.value||"_",periodMax:h.querySelector("#mh-edit-periodMax2")?.value||"_",menarcheAge:h.querySelector("#mh-edit-menarcheAge2")?.value||"_",menopauseAge:h.querySelector("#mh-edit-menopauseAge")?.value||"_",cycleMin:h.querySelector("#mh-edit-cycleMin2")?.value||"_",cycleMax:h.querySelector("#mh-edit-cycleMax2")?.value||"_"}:f={isMenopause:!1,periodMin:h.querySelector("#mh-edit-periodMin")?.value||"_",periodMax:h.querySelector("#mh-edit-periodMax")?.value||"_",menarcheAge:h.querySelector("#mh-edit-menarcheAge1")?.value||"_",lastPeriod:h.querySelector("#mh-edit-lastPeriod")?.value||"____-__-__",cycleMin:h.querySelector("#mh-edit-cycleMin")?.value||"_",cycleMax:h.querySelector("#mh-edit-cycleMax")?.value||"_"};const T=this.control.getElementList(),m=this.element.controlId;for(let P=0;P<T.length;P++){const C=T[P];C.controlId===m&&C.control&&(C.control.menstrualData=f)}const p=this.generateDisplayText(f),I=this.textToElements(p);this.closeModal();const L=this.setValue(I);L!==-1&&(this.control.repaintControl({curIndex:L}),this.control.emitControlContentChange({}))})}closeModal(){this.inputModal&&(this.inputModal.remove(),this.inputModal=null),this.isPopup=!1}destroy(){this.closeModal()}}l.AreaMode=void 0,(function(o){o.EDIT="edit",o.READONLY="readonly",o.FORM="form"})(l.AreaMode||(l.AreaMode={}));class Ih{controlBorder;textFieldUnderline;draw;range;listener;eventBus;controlSearch;options;controlOptions;activeControl;activeControlValue;preElement;constructor(t){this.controlBorder=new Tc(t),this.textFieldUnderline=new Ph(t),this.draw=t,this.range=t.getRange(),this.listener=t.getListener(),this.eventBus=t.getEventBus(),this.controlSearch=new fc(this),this.options=t.getOptions(),this.controlOptions=this.options.control,this.activeControl=null,this.activeControlValue=[],this.preElement=null}setHighlightList(t){this.controlSearch.setHighlightList(t)}computeHighlightList(){this.controlSearch.getHighlightList().length&&this.controlSearch.computeHighlightList()}renderHighlightList(t,e){this.controlSearch.getHighlightMatchResult().length&&this.controlSearch.renderHighlightList(t,e)}getDraw(){return this.draw}filterAssistElement(t){return t.filter((e,n)=>{if(e.type===l.ElementType.TABLE){const i=e.trList;for(let r=0;r<i.length;r++){const s=i[r];for(let a=0;a<s.tdList.length;a++){const c=s.tdList[a];c.value=this.filterAssistElement(c.value)}}}if(!e.controlId)return!0;if(e.control?.type===l.ControlType.MENSTRUAL_HISTORY&&this.options.mode===l.EditorMode.PRINT&&(e.controlComponent===l.ControlComponent.PREFIX||e.controlComponent===l.ControlComponent.POSTFIX)||e.control?.type===l.ControlType.SELECT&&this.options.mode===l.EditorMode.PRINT&&(e.controlComponent===l.ControlComponent.PREFIX||e.controlComponent===l.ControlComponent.POSTFIX)||e.control?.type===l.ControlType.NUMBER&&this.options.mode===l.EditorMode.PRINT&&(e.controlComponent===l.ControlComponent.PREFIX||e.controlComponent===l.ControlComponent.POSTFIX)||e.control?.type===l.ControlType.TEXT&&this.options.mode===l.EditorMode.PRINT&&e.strikeout&&e.deletePerson)return!1;if(e.control?.minWidth){if(e.controlComponent===l.ControlComponent.PREFIX||e.controlComponent===l.ControlComponent.POSTFIX)return e.value="",!0}else{const i=this.options.mode===l.EditorMode.FORM;if(e.control?.preText&&e.controlComponent===l.ControlComponent.PRE_TEXT){if(i)return!0;let r=!1,s=n+1;for(;s<t.length;){const a=t[s];if(e.controlId!==a.controlId)break;if(a.controlComponent===l.ControlComponent.VALUE){r=!0;break}s++}return r}if(e.control?.postText&&e.controlComponent===l.ControlComponent.POST_TEXT){if(i)return!0;let r=!1,s=n-1;for(;s<t.length;){const a=t[s];if(e.controlId!==a.controlId)break;if(a.controlComponent===l.ControlComponent.VALUE){r=!0;break}s--}return r}}if(e.control?.preTextFix&&e.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT){let i=!1,r=n+1;for(;r<t.length;){const s=t[r];if(e.controlId!==s.controlId)break;if(s.controlComponent===l.ControlComponent.VALUE){i=!0;break}r++}return i}if(e.control?.postTextFix&&e.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT){let i=!1,r=n-1;for(;r<t.length;){const s=t[r];if(e.controlId!==s.controlId)break;if(s.controlComponent===l.ControlComponent.VALUE){i=!0;break}r--}return i}return e.controlComponent!==l.ControlComponent.PREFIX&&e.controlComponent!==l.ControlComponent.POSTFIX&&e.controlComponent!==l.ControlComponent.PLACEHOLDER&&e.controlComponent!==l.ControlComponent.PRETEXTFIX&&e.controlComponent!==l.ControlComponent.POSTTEXTFIX&&e.controlComponent!==l.ControlComponent.TEXTFIXLABEL})}getIsRangeCanCaptureEvent(){if(!this.activeControl)return!1;const{startIndex:t,endIndex:e}=this.getRange();if(!~t&&!~e)return!1;const n=this.getElementList(),i=n[t];if(i.controlComponent===l.ControlComponent.PLACEHOLDER)return!1;if(t===e&&t>0){const s=n[t-1],a=s?.controlComponent===l.ControlComponent.POSTFIX||s?.controlComponent===l.ControlComponent.POSTTEXTFIX,c=s?.controlComponent===l.ControlComponent.PLACEHOLDER,d=!!s?.controlId,u=!!s?.originControlId;let R=!1;if(u){const p=s.originControlId;for(let I=t;I<n.length;I++){const L=n[I];if(L.controlId===p&&!L.originControlId){R=!0;break}if(L.controlId&&L.controlId!==p&&L.originControlId!==p)break}}const g=this.draw.getPosition().getPositionList(),f=g[t],T=g[t-1],m=f&&T&&f.rowIndex===T.rowIndex;if((a||c)&&d&&m&&!R)return!1}if(t===e&&(i.controlComponent===l.ControlComponent.POSTFIX||i.controlComponent===l.ControlComponent.POSTTEXTFIX))return!0;const r=n[e];return!!(i.controlId&&i.controlId===r.controlId&&r.controlComponent!==l.ControlComponent.POSTFIX&&r.controlComponent!==l.ControlComponent.POSTTEXTFIX)}getIsRangeInPostfix(){if(!this.activeControl)return!1;const{startIndex:t,endIndex:e}=this.getRange();if(t!==e)return!1;const i=this.getElementList()[t];return i.controlComponent===l.ControlComponent.POSTFIX||i.controlComponent===l.ControlComponent.POSTTEXTFIX}getIsRangeWithinControl(){const{range:{startIndex:t,endIndex:e},elementList:n}=this.range.getRangeElement();if(!~t&&!~e)return!1;const i=n[t],r=n[e];if(i?.controlId&&i.controlId===r.controlId&&r.controlComponent!==l.ControlComponent.POSTFIX&&r.controlComponent!==l.ControlComponent.POSTTEXTFIX&&r.controlComponent!==l.ControlComponent.POSTTEXTFIX_TEXT&&r.controlComponent!==l.ControlComponent.POST_TEXT)return!0;if(r?.originControlId&&(r.controlComponent===l.ControlComponent.POSTFIX||r.controlComponent===l.ControlComponent.POSTTEXTFIX)){const s=r.originControlId;for(let a=e+1;a<n.length;a++){const c=n[a];if(c.controlId===s)return!0;if(c.controlId&&c.controlId!==s&&c.originControlId!==s)break}}if(!r?.originControlId&&r?.controlId&&(r.controlComponent===l.ControlComponent.POSTFIX||r.controlComponent===l.ControlComponent.POSTTEXTFIX)){const s=n[e+1];if(s?.controlId&&s.controlId!==r.controlId&&(s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRETEXTFIX))return!0;if(s?.controlId&&s.controlId!==r.controlId&&(s.controlComponent===l.ControlComponent.POSTFIX||s.controlComponent===l.ControlComponent.POSTTEXTFIX))return s.originControlId,!0;for(let a=e;a>=0;a--){const c=n[a];if(c.controlId===r.controlId&&(c.controlComponent===l.ControlComponent.PREFIX||c.controlComponent===l.ControlComponent.PRETEXTFIX)){for(let d=a-1;d>=0;d--){const u=n[d];if(u.controlId&&u.controlId!==r.controlId&&(u.controlComponent===l.ControlComponent.PRETEXTFIX||u.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||u.controlComponent===l.ControlComponent.PREFIX||u.controlComponent===l.ControlComponent.PRE_TEXT))return!0;if(u.controlId&&u.controlId!==r.controlId&&(u.controlComponent===l.ControlComponent.POSTFIX||u.controlComponent===l.ControlComponent.POSTTEXTFIX))break}break}}}if(r?.originControlId){const s=r.originControlId;for(let a=e+1;a<n.length;a++){const c=n[a];if(c.controlId===s)return!0;if(c.controlId&&c.controlId!==s&&c.originControlId!==s)break}}if(!i?.controlId&&this.activeControl){const a=this.activeControl.getElement()?.controlId;if(a)for(let c=t;c>=0;c--){const d=n[c];if(d.controlId===a&&!d.originControlId){if(d.controlComponent===l.ControlComponent.PRETEXTFIX||d.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.PRE_TEXT)for(let u=e;u<n.length;u++){const R=n[u];if(R.controlId===a&&!R.originControlId){if(R.controlComponent===l.ControlComponent.POSTTEXTFIX||R.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||R.controlComponent===l.ControlComponent.POSTFIX||R.controlComponent===l.ControlComponent.POST_TEXT)return!0;break}}break}}}return!1}getIsElementListContainFullControl(t){if(!t.some(i=>i.controlId))return!1;let e=0,n=0;for(let i=0;i<t.length;i++){const r=t[i];r.controlComponent===l.ControlComponent.PREFIX||r.controlComponent===l.ControlComponent.PRETEXTFIX?e++:(r.controlComponent===l.ControlComponent.POSTFIX||r.controlComponent===l.ControlComponent.POSTTEXTFIX)&&n++}return!e||!n?!1:e===n}getIsDisabledControl(t={}){if(this.draw.isDesignMode()||!this.activeControl)return!1;const{startIndex:e,endIndex:n}=t.range||this.range.getRange();if(e===n&&~e&&~n){const r=(t.elementList||this.getElementList())[e];if(r.controlComponent===l.ControlComponent.POSTFIX||r.controlComponent===l.ControlComponent.POSTTEXTFIX)return!1}return!!this.activeControl.getElement()?.control?.disabled}getIsDisabledPasteControl(t={}){if(this.draw.isDesignMode()||!this.activeControl)return!1;const{startIndex:e,endIndex:n}=t.range||this.range.getRange();return e===n&&~e&&~n&&(t.elementList||this.getElementList())[e].controlComponent===l.ControlComponent.POSTFIX?!1:!!this.activeControl.getElement()?.control?.pasteDisabled}getIsExistValueByElementListIndex(t,e){const n=t[e];if(!n.controlId)return!1;if(n.control?.type===l.ControlType.CHECKBOX||n.control?.type===l.ControlType.RADIO)return!!n.control?.code;if(n.controlComponent===l.ControlComponent.VALUE)return!0;if(n.controlComponent===l.ControlComponent.PLACEHOLDER)return!1;if(n.controlComponent===l.ControlComponent.PREFIX||n.controlComponent===l.ControlComponent.PRE_TEXT){let i=e+1;for(;i<t.length;){const r=t[i];if(r.controlId!==n.controlId)return!1;if(r.controlComponent===l.ControlComponent.VALUE)return!0;if(r.controlComponent===l.ControlComponent.PLACEHOLDER)return!1;i++}}if(n.controlComponent===l.ControlComponent.PRETEXTFIX||n.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){let i=e+1;for(;i<t.length;){const r=t[i];if(r.controlId!==n.controlId)return!1;if(r.controlComponent===l.ControlComponent.VALUE)return!0;if(r.controlComponent===l.ControlComponent.PLACEHOLDER||r.controlComponent===l.ControlComponent.TEXTFIXLABEL)return!1;i++}}if(n.controlComponent===l.ControlComponent.POSTFIX||n.controlComponent===l.ControlComponent.POSTTEXTFIX){let i=e-1;for(;i>=0;){const r=t[i];if(r.controlId!==n.controlId)return!1;if(r.controlComponent===l.ControlComponent.VALUE)return!0;if(r.controlComponent===l.ControlComponent.PLACEHOLDER)return!1;i--}}return!1}getControlHighlight(t,e){return this.controlSearch.getControlHighlight(t,e)}getContainer(){return this.draw.getContainer()}getElementList(){return this.draw.getElementList()}getPosition(){const t=this.draw.getPosition().getPositionList(),{endIndex:e}=this.range.getRange();return t[e]||null}getPreY(){const t=this.draw.getHeight(),e=this.draw.getPageGap();return(this.getPosition()?.pageNo??this.draw.getPageNo())*(t+e)}getRange(){return this.range.getRange()}getValueRange(t={}){const e=t.elementList||this.getElementList(),{startIndex:n}=t.range||this.getRange(),i=e[n];let r=n;for(;r>0;){const a=e[r];if(a.controlId!==i.controlId||a.controlComponent===l.ControlComponent.PREFIX||a.controlComponent===l.ControlComponent.PRE_TEXT||a.controlComponent===l.ControlComponent.PRETEXTFIX||a.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)break;r--}let s=n+1;for(;s<e.length;){const a=e[s];if(a.controlId!==i.controlId||a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POST_TEXT||a.controlComponent===l.ControlComponent.POSTTEXTFIX||a.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)break;s++}return r===s?null:{startIndex:r,endIndex:s-1}}shrinkBoundary(t={}){this.range.shrinkBoundary(t)}getActiveControl(){return this.activeControl}getActiveTextControlLimit(){if(!this.activeControl)return null;const t=this.activeControl.getElement(),e=t?.controlId,n=t?.originControlId||null;if(!e||t.control?.type!==l.ControlType.TEXT)return null;const i=this.getElementList(),r=n||null;let s=-1,a=-1,c=-1,d=-1;for(let h=0;h<i.length;h++){const g=i[h];g.controlId!==e||(n?g.originControlId!==n:g.originControlId)||(s===-1&&(s=h),a=h,(g.controlComponent===l.ControlComponent.PREFIX||g.controlComponent===l.ControlComponent.PRE_TEXT||g.controlComponent===l.ControlComponent.PRETEXTFIX||g.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)&&(c=h),d===-1&&(g.controlComponent===l.ControlComponent.POSTFIX||g.controlComponent===l.ControlComponent.POST_TEXT||g.controlComponent===l.ControlComponent.POSTTEXTFIX||g.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)&&(d=h))}if(s===-1)return null;const u=c!==-1?c:s,R=d!==-1?d-1:a;return{controlId:e,originControlId:n,parentControlId:r,startIndex:u,endIndex:R<u?u:R}}getActiveNestedTextLimit(){const t=this.getActiveTextControlLimit();return!t?.parentControlId||!this.getElementList().some(n=>n.controlId===t.parentControlId&&!n.originControlId&&n.control?.type===l.ControlType.TEXTFIELD)?null:{controlId:t.controlId,parentControlId:t.parentControlId,startIndex:t.startIndex,endIndex:t.endIndex}}getControlElementList(t={}){const e=t.elementList||this.getElementList(),{startIndex:n}=t.range||this.getRange(),i=e[n];if(!i?.controlId)return[];const r=[];let s=n;for(;s>0;){const c=e[s];if(c.controlId!==i.controlId)break;r.unshift(c),s--}let a=n+1;for(;a<e.length;){const c=e[a];if(c.controlId!==i.controlId)break;r.push(c),a++}return r}updateActiveControlValue(){this.activeControl&&(this.activeControlValue=this.getControlElementList())}emitControlChange(t){if(!this.activeControl)return;const e=this.eventBus.isSubscribe("controlChange");if(!this.listener.controlChange&&!e)return;let n;const i=this.activeControlValue,r=this.activeControl.getElement();i?.length?n=i[0].control:(n=Ue(at(r)).control,n.value=[]);const s={state:t,control:n,controlId:r.controlId};this.listener.controlChange?.(s),e&&this.eventBus.emit("controlChange",s)}initControl(){const t=this.getElementList(),e=this.getRange(),n=t[e.startIndex];if(this.activeControl){if(this.activeControl instanceof Mn||this.activeControl instanceof Yn||this.activeControl instanceof Dn||this.activeControl instanceof Be){const u=this.activeControl.getElement();n?.controlId!==u?.controlId?this.destroyControl():n.controlComponent===l.ControlComponent.POSTFIX?this.activeControl.destroy():this.activeControl.awake()}if(this.activeControl){const u=this.activeControl.getElement(),R=n.controlId,h=u.controlId;if(R&&R===h){this.updateActiveControlValue(),this.preElement=n;return}if(n.originControlId&&n.originControlId===h&&!(this.activeControl.getElement()?.control?.type===l.ControlType.TEXTFIELD&&n.controlId!==h)){this.updateActiveControlValue(),this.preElement=n;return}if(n.originControlId&&n.controlId&&n.controlId,!n.originControlId&&n.controlId&&n.controlId!==h&&(this.activeControl.getElement()?.originControlId,n.controlId),n.controlId&&n.controlId===h&&n.originControlId){this.updateActiveControlValue(),this.preElement=n;return}if(!R){const g=this.getElementList(),f=this.getRange(),{startIndex:T}=f;let m=null;for(let p=T;p>=0;p--){const I=g[p];if(I.controlComponent===l.ControlComponent.PRETEXTFIX||I.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||I.controlComponent===l.ControlComponent.PREFIX||I.controlComponent===l.ControlComponent.PRE_TEXT){m=I.controlId||null;break}if(I.controlId&&I.controlId!==h||I.controlComponent===l.ControlComponent.POSTTEXTFIX||I.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||I.controlComponent===l.ControlComponent.POSTFIX||I.controlComponent===l.ControlComponent.POST_TEXT)break}if(m===h){this.updateActiveControlValue(),this.preElement=n;return}}}}if(this.destroyControl(),this.draw.isReadonly())return;let r=n.control,s=n;if(n.originControlId&&!r){const u=n.originControlId;for(let R=this.range.getRange().startIndex;R>=0;R--){const h=t[R];if(h.controlId===u&&!h.originControlId&&h.control){r=h.control,s=h;break}if(h.controlId===u&&!h.originControlId&&(h.controlComponent===l.ControlComponent.PRETEXTFIX||h.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||h.controlComponent===l.ControlComponent.PREFIX||h.controlComponent===l.ControlComponent.PRE_TEXT)){h.control&&(r=h.control,s=h);break}}}else if(!r&&n.controlId){const u=this.getElementList();for(let R=this.range.getRange().startIndex;R>=0;R--){const h=u[R];if(h.controlId!==n.controlId)break;if(h.control){r=h.control,s=h;break}if(h.controlComponent===l.ControlComponent.PRETEXTFIX||h.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||h.controlComponent===l.ControlComponent.PREFIX||h.controlComponent===l.ControlComponent.PRE_TEXT)break}}if(!r)return;if(r?.type===l.ControlType.TEXTFIELD&&this.draw.getMode()!==l.EditorMode.EDIT)if(n.originControlId){const u=n.controlId;for(let R=this.range.getRange().startIndex;R>=0;R--){const h=t[R];if(h.controlId===u&&h.originControlId===n.originControlId&&h.control&&h.control.type!==l.ControlType.TEXTFIELD){r=h.control,s=h;break}if(h.controlComponent===l.ControlComponent.PREFIX||h.controlComponent===l.ControlComponent.PRETEXTFIX)break}if(r?.type===l.ControlType.TEXTFIELD)return}else return;const a=this.draw.getPosition().getPositionContext(),c=this.range.getRange().startIndex,d=!!(a.isDirectHit&&a.index===c&&t[a.index]?.controlId===s.controlId);if(r?.type===l.ControlType.TEXTFIELD)this.activeControl=new Rr(s,this);else if(r.type===l.ControlType.TEXT)this.activeControl=new Si(s,this);else if(r.type===l.ControlType.SELECT){const u=new Mn(s,this);this.activeControl=u,(d||this.draw.getMode()===l.EditorMode.FORM)&&u.awake()}else if(r.type===l.ControlType.CHECKBOX)this.activeControl=new _n(s,this);else if(r.type===l.ControlType.RADIO)this.activeControl=new Ko(s,this);else if(r.type===l.ControlType.DATE){const u=new Yn(s,this);this.activeControl=u,u.awake()}else if(r.type===l.ControlType.NUMBER){const u=new Dn(s,this);this.activeControl=u,d&&u.awake()}else if(r.type===l.ControlType.BUTTON){const u=new Be(s,this);if(this.activeControl=u,d){u.awake();return}}else if(r.type===l.ControlType.MENSTRUAL_HISTORY){const u=new hr(s,this);this.activeControl=u,u.awake()}this.updateActiveControlValue(),this.preElement=s,s.controlComponent!==l.ControlComponent.POSTFIX&&s.controlComponent!==l.ControlComponent.POSTTEXTFIX&&this.emitControlChange(l.ControlState.ACTIVE)}destroyControl(t={}){if(!this.activeControl)return;const{isEmitEvent:e=!0}=t;(this.activeControl instanceof Mn||this.activeControl instanceof Yn||this.activeControl instanceof Dn||this.activeControl instanceof hr)&&this.activeControl.destroy(),e&&this.preElement?.controlComponent!==l.ControlComponent.POSTFIX&&this.preElement?.controlComponent!==l.ControlComponent.POSTTEXTFIX&&this.emitControlChange(l.ControlState.INACTIVE),this.preElement=null,this.activeControl=null,this.activeControlValue=[]}repaintControl(t={}){const{curIndex:e,isCompute:n=!0,isSubmitHistory:i=!0,isSetCursor:r=!0}=t;e===void 0?(this.range.clearRange(),this.draw.render({isCompute:n,isSubmitHistory:i,isSetCursor:!1})):(this.range.setRange(e,e),this.draw.render({curIndex:e,isCompute:n,isSetCursor:r,isSubmitHistory:i}))}emitControlContentChange(t){const e=this.eventBus.isSubscribe("controlContentChange");if(!e&&!this.listener.controlContentChange)return;const n=t?.controlElement||this.activeControl?.getElement();if(!n)return;const i=t?.context?.elementList||this.getElementList(),{startIndex:r}=t?.context?.range||this.getRange();if(!i[r]?.controlId)return;const s=t?.controlValue||this.getControlElementList(t?.context);let a;if(s?.length?a=Mt(s)[0].control:(a=n.control,a.value=[]),!a)return;const c={control:a,controlId:n.controlId};this.listener.controlContentChange?.(c),e&&this.eventBus.emit("controlContentChange",c)}reAwakeControl(){if(!this.activeControl)return;const t=this.getElementList(),e=this.getRange(),n=t[e.startIndex];this.activeControl.setElement(n),(this.activeControl instanceof Yn||this.activeControl instanceof Mn)&&this.activeControl.getIsPopup()&&(this.activeControl.destroy(),this.activeControl.awake())}selectValue(){const t=this.getElementList(),{startIndex:e}=this.getRange(),n=t[e];if(!n?.controlId||n.controlComponent!==l.ControlComponent.VALUE&&t[e+1]?.controlComponent===l.ControlComponent.VALUE)return!1;let i=e;for(;i>0&&t[i].controlComponent===l.ControlComponent.VALUE;)i--;let r=e+1;for(;r<t.length;){if(t[r].controlComponent!==l.ControlComponent.VALUE){r--;break}r++}if(i!==r){const s=this.range.getRange();return this.range.replaceRange({...s,startIndex:i,endIndex:r}),this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1}),!0}return!1}moveCursor(t){const{index:e,trIndex:n,tdIndex:i,tdValueIndex:r}=t;let s=this.draw.getOriginalElementList(),a;const c=t.isTable?r:e;if(t.isTable?(s=s[e].trList[n].tdList[i].value,a=s[r]):a=s[e],a.control?.hide||a.area?.hide){const d=sn(s,c);return{newIndex:d,newElement:s[d]}}if(a.controlComponent===l.ControlComponent.VALUE)return{newIndex:c,newElement:a};if(a.controlComponent===l.ControlComponent.POSTFIX){let d=c+1;for(;d<s.length;){if(s[d].controlId!==a.controlId)return{newIndex:d-1,newElement:s[d-1]};if(d===s.length-1)return{newIndex:d,newElement:s[d]};d++}}else if(a.controlComponent===l.ControlComponent.PREFIX||a.controlComponent===l.ControlComponent.PRE_TEXT){let d=c+1;for(;d<s.length;){const u=s[d];if(u.controlId!==a.controlId||u.controlComponent!==l.ControlComponent.PREFIX&&u.controlComponent!==l.ControlComponent.PRE_TEXT)return{newIndex:d-1,newElement:s[d-1]};d++}}else if(a.controlComponent===l.ControlComponent.PLACEHOLDER){let d=c-1;for(;d>0;){const u=s[d];if(u.controlId!==a.controlId||u.controlComponent===l.ControlComponent.VALUE||u.controlComponent===l.ControlComponent.PREFIX||u.controlComponent===l.ControlComponent.PRE_TEXT||u.controlComponent===l.ControlComponent.PRETEXTFIX||u.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)return{newIndex:d,newElement:s[d]};d--}}else if(a.controlComponent===l.ControlComponent.POST_TEXT||a.controlComponent===l.ControlComponent.TEXTFIXLABEL||a.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT){let d=c-1;for(;d>0;){const u=s[d];if(u.controlId!==a.controlId||u.controlComponent===l.ControlComponent.VALUE||u.controlComponent===l.ControlComponent.PREFIX||u.controlComponent===l.ControlComponent.PRE_TEXT||u.controlComponent===l.ControlComponent.PRETEXTFIX||u.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)return{newIndex:d,newElement:s[d]};d--}}else if(a.controlComponent===l.ControlComponent.POSTTEXTFIX){let d=c+1;for(;d<s.length;){if(s[d].controlId!==a.controlId)return{newIndex:d-1,newElement:s[d-1]};if(d===s.length-1)return{newIndex:d,newElement:s[d]};d++}}else if(a.controlComponent===l.ControlComponent.PRETEXTFIX||a.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){let d=c+1;for(;d<s.length;){const u=s[d];if(u.controlId!==a.controlId||u.controlComponent!==l.ControlComponent.PRETEXTFIX&&u.controlComponent!==l.ControlComponent.PRETEXTFIX_TEXT)return{newIndex:d-1,newElement:s[d-1]};d++}}return{newIndex:c,newElement:a}}removeControl(t,e={}){const n=e.elementList||this.getElementList(),i=n[t];if(!this.draw.isDesignMode()&&!i?.control?.hide&&!i?.area?.hide){const{deletable:L=!0}=i.control;if(!L)return null;const P=this.draw.getMode();if(P===l.EditorMode.FORM&&this.options.modeRule[P].controlDeletableDisabled)return null}let r=-1,s=-1;const a=!!i.originControlId,c=i.controlId,d=i.originControlId,u=i.control?.type===l.ControlType.BUTTON&&!i.control?.buttonText?`${c}_text`:"";let R=t;for(;R>=0;){const L=n[R];let P=!1;if(a?P=L.controlId===c&&L.originControlId===d:P=L.controlId===c&&!L.originControlId,!P){r=R;break}R--}let h=t;for(;h<n.length;){const L=n[h];let P=!1;if(a?P=L.controlId===c&&L.originControlId===d:P=L.controlId===c&&!L.originControlId,!P){s=h-1;break}h++}if(h===n.length&&(s=h-1),!~r&&!~s)return t;r=~r?r:0;const g=n[r+1],f=g.control,T=f?.type&&[l.ControlType.TEXT,l.ControlType.TEXTFIELD,l.ControlType.DATE,l.ControlType.NUMBER,l.ControlType.SELECT,l.ControlType.BUTTON].includes(f.type);let m=n[0]?.type===l.ElementType.SPLIT_TAG;if(!e.removeNext&&T&&!a&&g.controlComponent!==l.ControlComponent.PREFIX&&g.type!==l.ElementType.SPLIT_TAG)if(e.removePrev)e.removePrev();else{const L=this.draw.getTd();L&&this.createRemoveControlHandler(L,i.controlId,!0)}if(!e.removeNext&&T&&!a&&g.controlComponent!==l.ControlComponent.PRETEXTFIX&&g.type!==l.ElementType.SPLIT_TAG)if(e.removePrev)e.removePrev();else{const L=this.draw.getTd();L&&this.createRemoveControlHandler(L,i.controlId,!0)}if(!e.removePrev&&T&&!a&&n[s].controlComponent!==l.ControlComponent.POSTFIX)if(e.removeNext)e.removeNext();else{const L=this.draw.getTd();m=!!L?.linkTdNextId,L&&this.createRemoveControlHandler(L,i.controlId,!1)}if(!e.removePrev&&T&&!a&&n[s].controlComponent!==l.ControlComponent.POSTTEXTFIX)if(e.removeNext)e.removeNext();else{const L=this.draw.getTd();m=!!L?.linkTdNextId,L&&this.createRemoveControlHandler(L,i.controlId,!1)}this.draw.spliceElementList(n,r+1,s-r);let p=0;if(u)for(let L=n.length-1;L>=0;L--)n[L].controlId===u&&(L<=r&&p++,n.splice(L,1));const I=r-p;return!e.elementList&&m&&r===0?this.draw.fixPosition(!0)??I:I}createRemoveControlHandler(t,e,n){if(n){const i=this.draw.getTdById(t.linkTdPrevId);i&&i.value.splice(-1)[0]?.controlId===e&&this.removeControl(i.value.length-1,{elementList:i.value,removePrev:()=>{this.createRemoveControlHandler(i,e,n)}})}else{const i=this.draw.getTdById(t.linkTdNextId);i&&i.value[1]?.controlId===e&&this.removeControl(1,{elementList:i.value,removeNext:()=>{this.createRemoveControlHandler(i,e,n)}})}}removePlaceholder(t,e={}){const n=e.elementList||this.getElementList(),i=n[t],r=n[t+1];if(i.controlComponent===l.ControlComponent.PLACEHOLDER||i.controlComponent===l.ControlComponent.TEXTFIXLABEL||r?.controlComponent===l.ControlComponent.PLACEHOLDER||r?.controlComponent===l.ControlComponent.TEXTFIXLABEL){let s=!1,a=t;for(;a<n.length;){const c=n[a];if(c.controlId!==i.controlId)break;c.controlComponent===l.ControlComponent.PLACEHOLDER||c.controlComponent===l.ControlComponent.TEXTFIXLABEL?(s||(s=!0,this.draw.getHistoryManager().popUndo(),this.draw.submitHistory(t)),n.splice(a,1)):a++}}}addPlaceholder(t,e={}){const n=e.elementList||this.getElementList(),i=n[t],r=i.control;if(!r.placeholder)return;let s=t;for(;s>=0;){const g=n[s];if(g.controlId!==i.controlId){s++;break}if(g.controlComponent===l.ControlComponent.PREFIX||g.controlComponent===l.ControlComponent.PRE_TEXT||g.controlComponent===l.ControlComponent.PRETEXTFIX||g.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)break;s--}s<0&&(s=0);const a=s+1;if(a<n.length){const g=n[a];if(g.controlId===i.controlId&&(g.controlComponent===l.ControlComponent.PLACEHOLDER||g.controlComponent===l.ControlComponent.VALUE))return}let c=!1,d=s+1;for(;d<n.length;){const g=n[d];if(g.controlId===i.controlId){if(g.controlComponent===l.ControlComponent.POSTFIX||g.controlComponent===l.ControlComponent.POST_TEXT||g.controlComponent===l.ControlComponent.POSTTEXTFIX||g.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)break}else if(g.controlId!==i.controlId&&(g.controlComponent===l.ControlComponent.VALUE||g.controlComponent===l.ControlComponent.PREFIX||g.controlComponent===l.ControlComponent.PRE_TEXT)){c=!0;break}d++}if(c)return;const u=ct(r.placeholder),R=Dt(i,At),h=s+1;for(let g=0;g<u.length;g++){const f=u[g],T={...R,value:f===`
|
|
185
|
-
`?_:f,controlId:i.controlId,type:l.ElementType.CONTROL,control:i.control,controlComponent:l.ControlComponent.PLACEHOLDER,color:this.controlOptions.placeholderColor};wt(n,[T],s,{editorOptions:this.options}),this.draw.spliceElementList(n,h+g,0,[T])}}setValue(t){if(!this.activeControl)throw new Error("active control is null");return this.activeControl.setValue(t)}setControlProperties(t,e={}){const n=e.elementList||this.getElementList(),{startIndex:i}=e.range||this.getRange(),r=n[i];let s=i;for(;s>0;){const c=n[s];if(c.controlId!==r.controlId)break;c.control={...c.control,...t},s--}let a=i+1;for(;a<n.length;){const c=n[a];if(c.controlId!==r.controlId)break;c.control={...c.control,...t},a++}}keydown(t){if(!this.activeControl)throw new Error("active control is null");return this.activeControl.keydown(t)}cut(){if(!this.activeControl)throw new Error("active control is null");return this.activeControl.cut()}getValueById(t){const{id:e,groupId:n,conceptId:i,areaId:r}=t,s=[];if(!e&&!i&&!n)return s;const a=new Set,c=(u,R)=>{let h=0;for(;h<u.length;){const g=u[h];if(h++,g.type===l.ElementType.TABLE){const P=g.trList;for(let C=0;C<P.length;C++){const S=P[C];for(let F=0;F<S.tdList.length;F++){const N=S.tdList[F],V=N.originalId??N.id;a.has(V)||(a.add(V),N.linkTdNextId?c(this.draw.getSplitTdValues(V),R):c(N.value,R))}}}if(!g.control||n&&g.control.groupId!==n||e&&g.controlId!==e||i&&g.control.conceptId!==i||r&&g.areaId!==r)continue;const{type:f,code:T,valueSets:m}=g.control;let p=h,I="";const L=[];for(;p<u.length;){const P=u[p];if(P.controlId!==g.controlId)break;(f===l.ControlType.TEXT||f===l.ControlType.TEXTFIELD||f===l.ControlType.DATE||f===l.ControlType.NUMBER)&&P.controlComponent===l.ControlComponent.VALUE&&(I+=P.value,L.push(se(P,No))),p++}if(f===l.ControlType.TEXT||f===l.ControlType.TEXTFIELD||f===l.ControlType.DATE||f===l.ControlType.NUMBER)s.push({...g.control,zone:R,value:I||null,innerText:I||null,elementList:Mt(L)});else if(f===l.ControlType.SELECT||f===l.ControlType.CHECKBOX||f===l.ControlType.RADIO){const P=T?.split(",").map(C=>m?.find(S=>S.code===C)?.value).filter(Boolean).join("");s.push({...g.control,zone:R,value:T||null,innerText:P||null})}h=p}},d=[{zone:l.EditorZone.HEADER,elementList:this.draw.getHeaderElementList()},{zone:l.EditorZone.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:l.EditorZone.FOOTER,elementList:this.draw.getFooterElementList()}];for(const{zone:u,elementList:R}of d)c(R,u);return s}setValueListById(t){if(!t.length)return;let e=!1,n=!1;const i=(s,a)=>{let c=0;for(;c<s.length;){const d=s[c];if(c++,d.type===l.ElementType.TABLE){const L=d.trList;for(let P=0;P<L.length;P++){const C=L[P];for(let S=0;S<C.tdList.length;S++){const F=C.tdList[S];i(F.value,F.id)}}}if(!d.control||d.type===l.ElementType.SPLIT_TAG)continue;const u=t.find(L=>(!L.groupId||L.groupId===d.control?.groupId)&&(L.id&&d.controlId===L.id||L.conceptId&&d.control.conceptId===L.conceptId||L.areaId&&d.areaId===L.areaId));if(!u)continue;const{value:R,isSubmitHistory:h=!0}=u;e=!0,h&&(n=!0);const{type:g}=d.control,{range:f,fullRange:T}=this.mergeControl({elementList:s,range:{startIndex:c,endIndex:c},tdId:a}),m={range:T??f,elementList:s,tdId:a},p={isIgnoreDisabledRule:!0,isIgnoreDeletedRule:!0};if(g===l.ControlType.TEXTFIELD){const L=Array.isArray(R)?R:R?[{value:R}]:[];L.length&&bt(L,{isHandleFirstElement:!1,editorOptions:this.options});const P=new Rr(d,this);this.activeControl=P,L.length?P.setValue(L,m,p):P.clearValue(m,p)}else if(g===l.ControlType.TEXT){const L=Array.isArray(R)?R:R?[{value:R}]:[];L.length&&bt(L,{isHandleFirstElement:!1,editorOptions:this.options});const P=new Si(d,this);this.activeControl=P,L.length?P.setValue(L,m,p):P.clearValue(m,p)}else if(g===l.ControlType.SELECT){if(Array.isArray(R))continue;const L=new Mn(d,this);this.activeControl=L,R?L.setSelect(R,m,p):L.clearSelect(m,p)}else if(g===l.ControlType.CHECKBOX){if(Array.isArray(R))continue;const L=new _n(d,this);this.activeControl=L;const P=R?R.split(","):[];L.setSelect(P,m,p)}else if(g===l.ControlType.RADIO){if(Array.isArray(R))continue;const L=new Ko(d,this);this.activeControl=L;const P=R?[R]:[];L.setSelect(P,m,p)}else if(g===l.ControlType.DATE){const L=new Yn(d,this);this.activeControl=L,Mo(R)?(R.length&&bt(R,{isHandleFirstElement:!1,editorOptions:this.options}),L.setValue(R,m,p)):Jr(R)?L.setSelect(R,m,p):L.clearSelect(m,p)}else if(g===l.ControlType.NUMBER){const L=Array.isArray(R)?R:R?[{value:R}]:[];L.length&&bt(L,{isHandleFirstElement:!1,editorOptions:this.options});const P=new Dn(d,this);this.activeControl=P,L.length?P.setValue(L,m,p):P.clearValue(m,p)}else if(g===l.ControlType.BUTTON){const L=Array.isArray(R)?R:R?[{value:R}]:[];L.length&&bt(L,{isHandleFirstElement:!1,editorOptions:this.options});const P=new Be(d,this);this.activeControl=P,L.length?P.setValue(L,m,p):P.clearSelect(m,p)}this.emitControlContentChange({context:m}),this.activeControl=null;let I=c;for(;I<s.length&&s[I].controlId===d.controlId;)I++;c=I}};this.destroyControl({isEmitEvent:!1});const r=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const s of r)i(s);e&&(n||this.draw.getHistoryManager().recovery(),this.draw.render({isSubmitHistory:n,isSetCursor:!1}))}setExtensionListById(t){if(!t.length)return;const e=i=>{let r=0;for(;r<i.length;){const s=i[r];if(r++,s.type===l.ElementType.TABLE){const u=s.trList;for(let R=0;R<u.length;R++){const h=u[R];for(let g=0;g<h.tdList.length;g++){const f=h.tdList[g];e(f.value)}}}if(!s.control)continue;const a=t.find(u=>u.id&&s.controlId===u.id||u.conceptId&&s.control.conceptId===u.conceptId||u.areaId&&s.areaId===u.areaId);if(!a)continue;const{extension:c}=a;this.setControlProperties({extension:c},{elementList:i,range:{startIndex:r,endIndex:r}});let d=r;for(;d<i.length&&i[d].controlId===s.controlId;)d++;r=d}},n=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const i of n)e(i)}setPropertiesListById(t){if(!t.length)return;let e=!1,n=!1;const i=s=>{let a=0;for(;a<s.length;){const c=s[a];if(a++,c.type===l.ElementType.TABLE){const g=c.trList;for(let f=0;f<g.length;f++){const T=g[f];for(let m=0;m<T.tdList.length;m++){const p=T.tdList[m];i(p.value)}}}if(!c.control)continue;const d=t.find(g=>g.id&&c.controlId===g.id||g.conceptId&&c.control.conceptId===g.conceptId||g.areaId&&c.areaId===g.areaId);if(!d)continue;const{properties:u,isSubmitHistory:R=!0}=d;if(e=!0,R&&(n=!0),this.setControlProperties({...c.control,...u,value:c.control.value},{elementList:s,range:{startIndex:a-1,endIndex:a-1}}),At.forEach(g=>{const f=u[g];f&&Reflect.set(c,g,f)}),c.control?.type===l.ControlType.NUMBER&&u.numberExclusiveOptions){const g={...c.control.numberExclusiveOptions,...u.numberExclusiveOptions},f=g?.minValue,T=g?.maxValue,m=new Dn(c,this),p=m.getValue({elementList:s,range:{startIndex:a-1,endIndex:a-1}});if(p.length>0){const I=p.map(P=>P.value).join(""),L=Number(I);!Number.isNaN(L)&&Number.isFinite(L)&&(f!=null&&L<f||T!=null&&L>T)&&m.clearValue({elementList:s,range:{startIndex:a-1,endIndex:a-1}},{isAddPlaceholder:!0})}}let h=a;for(;h<s.length&&s[h].controlId===c.controlId;)h++;a=h}},r={header:this.draw.getHeaderElementList(),main:this.draw.getOriginalMainElementList(),footer:this.draw.getFooterElementList()};for(const s in r){const a=r[s];i(a)}if(e){for(const s in r){const a=s,c=Mt(r[a],{isClassifyArea:!0,extraPickAttrs:["id","controlId"]});r[a]=c,bt(c,{editorOptions:this.options,isForceCompensation:!0})}this.draw.setEditorData(r),n||this.draw.getHistoryManager().recovery(),this.draw.render({isSubmitHistory:n,isSetCursor:!1})}}getList(){const t=[];function e(i){for(let r=0;r<i.length;r++){const s=i[r];if(s.type===l.ElementType.TABLE){const a=s.trList;for(let c=0;c<a.length;c++){const d=a[c];for(let u=0;u<d.tdList.length;u++){const h=d.tdList[u].value;e(h)}}}if(s.controlId){const a=se(s,[...Xo,...In]);t.push(a)}}}const n=[this.draw.getHeader().getElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooter().getElementList()];for(const i of n)e(i);return Mt(t,{extraPickAttrs:["controlId"]})}recordBorderInfo(t,e,n,i){this.controlBorder.recordBorderInfo(t,e,n,i)}drawBorder(t){this.controlBorder.render(t)}startTextFieldUnderline(t,e,n){this.textFieldUnderline.startTextFieldValue(t,e,n)}recordTextFieldUnderlineWidth(t){this.textFieldUnderline.recordValueWidth(t)}drawTextFieldUnderline(t){this.textFieldUnderline.endTextFieldValue(t)}getPreControlContext(){if(!this.activeControl)return null;const t=this.activeControl.getElement(),e=this.getControlKey(t);if(!e)return null;const n=this.getOrderedNavigableControlContexts(),i=n.findIndex(r=>r.controlKey===e);return i<=0?null:n[i-1]}getNextControlContext(){if(!this.activeControl)return null;const t=this.activeControl.getElement(),e=this.getControlKey(t);if(!e)return null;const n=this.getOrderedNavigableControlContexts(),i=n.findIndex(r=>r.controlKey===e);return i===-1||i>=n.length-1?null:n[i+1]}initNextControl(t={}){const{direction:e=Ut.DOWN}=t;let n=null;if(e===Ut.UP?n=this.getPreControlContext():n=this.getNextControlContext(),!n)return;const{nextIndex:i,positionContext:r}=n,s=this.draw.getPosition();s.setPositionContext(r),this.draw.getRange().replaceRange({startIndex:i,endIndex:i}),this.draw.render({curIndex:i,isCompute:!1,isSetCursor:!0,isSubmitHistory:!1});const a=s.getPositionList();this.draw.getCursor().moveCursorToVisible({cursorPosition:a[i],direction:e})}getControlKey(t){return t?.controlId?`${t.controlId}_${t.originControlId||""}`:null}getControlStartIndex(t,e){const n=this.getControlKey(t[e]);if(!n)return e;let i=e;for(;i>0&&this.getControlKey(t[i-1])===n;)i--;return i}getControlEnterIndex(t,e){const n=this.getControlStartIndex(t,e),i=this.getControlKey(t[n]);if(!i)return e;let r=n,s=n;for(;s<t.length;){const a=t[s];if(this.getControlKey(a)!==i)break;if(a.controlComponent===l.ControlComponent.PREFIX||a.controlComponent===l.ControlComponent.PRE_TEXT||a.controlComponent===l.ControlComponent.PRETEXTFIX||a.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){r=s,s++;continue}return r}return r}isNavigableControlElement(t,e){return!t?.controlId||!t.control?!1:this.options.mode!==l.EditorMode.FORM?!0:!(_t(t)||e?.disabled||t.area?.mode===l.AreaMode.READONLY||t.control.disabled||t.control.readonly||t.control.buttonText||t.control.type===l.ControlType.TEXTFIELD&&!t.originControlId)}getOrderedNavigableControlContexts(){const t=[],e=(n,i,r)=>{let s=0;for(;s<n.length;){const a=n[s];if(a.type===l.ElementType.TABLE){const d=a.trList||[];for(let u=0;u<d.length;u++){const R=d[u],h=R.tdList;for(let g=0;g<h.length;g++){const f=h[g];e(f.value,{isTable:!0,index:s,trIndex:u,tdIndex:g,tdId:f.id,trId:R.id,tableId:a.id},f)}}s++;continue}const c=this.getControlKey(a);c&&this.isNavigableControlElement(a,r)&&t[t.length-1]?.controlKey!==c&&t.push({controlKey:c,positionContext:{...i},nextIndex:this.getControlEnterIndex(n,s)}),s++}};return e(this.draw.getOriginalElementList(),{isTable:!1}),t}setMinWidthControlInfo(t){const{row:e,rowElement:n,controlRealWidth:i,availableWidth:r}=t;if(!n.control?.minWidth)return;const{scale:s}=this.options,a=n.control.minWidth*s;let c=null;if(n.control?.minWidth&&(n.control?.rowFlex===l.RowFlex.CENTER||n.control?.rowFlex===l.RowFlex.RIGHT)){let u=n.metrics.width,R=e.elementList.length-1;for(;R>=0;){const h=e.elementList[R];if(u+=h.metrics.width,e.elementList[R-1]?.controlComponent===l.ControlComponent.PREFIX){c=h;break}R--}c&&u<a&&(n.control.rowFlex===l.RowFlex.CENTER?c.left=(a-u)/2:n.control.rowFlex===l.RowFlex.RIGHT&&(c.left=a-u-n.metrics.width))}const d=a-i;if(d>0){const u=c?.left||0,R=r-e.width-n.metrics.width,h=Math.min(R,d);n.left=h-u,e.width+=h-u}}mergeControl(t={}){const e=t.elementList||this.getElementList(),n=t.range||this.getRange(),{startIndex:i}=n,r=t.tdId??this.draw.getPosition().getPositionContext().tdId,s=r?this.draw.getTdById(r):void 0,a=e[i];if(!a?.controlId)return{range:n,elementList:[],tdId:r};const c={startIndex:i,endIndex:i},d=[];let u=!1,R=i,h=s,g=e;for(;R>=0;){const p=g[R];if(p.controlId!==a.controlId)break;if(p.type!==l.ElementType.SPLIT_TAG&&(d.unshift(p),u&&(g.splice(R,1),e[0].type===l.ElementType.SPLIT_TAG?e.splice(0,1):(n.startIndex++,n.endIndex++),e.unshift(p)),c.startIndex=R),R===0&&p.controlComponent!==l.ControlComponent.PREFIX&&h?.linkTdPrevId&&(h=this.draw.getTdById(h.linkTdPrevId),h)){g=h.value,R=h.value.length-1,u=!0;continue}if(R===0&&p.controlComponent!==l.ControlComponent.PRETEXTFIX&&h?.linkTdPrevId&&(h=this.draw.getTdById(h.linkTdPrevId),h)){g=h.value,R=h.value.length-1,u=!0;continue}R--}u=!1;let f=i+1,T=s,m=e;for(;f<m.length;){const p=m[f];if(p.controlId!==a.controlId)break;if(p.type!==l.ElementType.SPLIT_TAG&&(d.push(p),u&&(m.splice(f,1),e.push(p),f--)),f===m.length-1&&p.controlComponent!==l.ControlComponent.POSTFIX&&T?.linkTdNextId&&(T=this.draw.getTdById(T.linkTdNextId),T)){m=T.value,f=0,u=!0;continue}if(f===m.length-1&&p.controlComponent!==l.ControlComponent.POSTTEXTFIX&&T?.linkTdNextId&&(T=this.draw.getTdById(T.linkTdNextId),T)){m=T.value,f=0,u=!0;continue}f++}return c.endIndex=c.startIndex+d.length,{range:n,elementList:e,tdId:r,fullRange:{startIndex:c.startIndex,endIndex:c.endIndex-2}}}}class Ph{options;currentTextFieldId=null;valueStartX=0;valueWidth=0;valueY=0;constructor(t){this.options=t.getOptions()}startTextFieldValue(t,e,n){this.currentTextFieldId=t,this.valueStartX=e,this.valueY=n,this.valueWidth=0}recordValueWidth(t){this.valueWidth+=t}endTextFieldValue(t){if(!this.currentTextFieldId||this.valueWidth<=0){this.reset();return}const{scale:e}=this.options;t.save(),t.strokeStyle=this.options.defaultColor,t.lineWidth=e,t.beginPath();const n=this.valueY-.5*e;t.moveTo(this.valueStartX,n),t.lineTo(this.valueStartX+this.valueWidth,n),t.stroke(),t.restore(),this.reset()}reset(){this.currentTextFieldId=null,this.valueStartX=0,this.valueWidth=0,this.valueY=0}}function gr(o,t){const e=n=>{for(let i=0;i<n.length;i++){const r=n[i];if(t(r),r.valueList?.length&&e(r.valueList),r.control?.value?.length&&e(r.control.value),r.type===l.ElementType.TABLE&&r.trList?.length)for(let s=0;s<r.trList.length;s++){const a=r.trList[s];for(let c=0;c<a.tdList.length;c++)e(a.tdList[c].value)}}};e(o)}function Mh(o){const t=o.control;return t?t.type===l.ControlType.TEXT||t.type===l.ControlType.TEXTFIELD||t.type===l.ControlType.DATE||t.type===l.ControlType.NUMBER?xe(t.value||[])||null:(t.type===l.ControlType.SELECT||t.type===l.ControlType.CHECKBOX||t.type===l.ControlType.RADIO)&&t.code?.split(",").map(e=>t.valueSets?.find(n=>n.code===e)?.value).filter(Boolean).join("")||null:null}function Oh(o){const t=new Map,e=new Set,n=new Set,i=(r,s,a)=>{if(!r||s==null)return;const c=t.get(r)||[];c.push({label:r,source:a,value:s}),t.set(r,c)};return gr(o,r=>{r.control&&r.controlId&&!e.has(r.controlId)&&(e.add(r.controlId),i(r.control.label,Mh(r),"control"));const s=r.id;if(s&&!n.has(s)&&(r.type===l.ElementType.MACRO||r.type===l.ElementType.CUSTOM_MACRO||r.type===l.ElementType.REUSABLE_ITEM)){n.add(s);let a;r.type===l.ElementType.MACRO?a=r.value:r.type===l.ElementType.CUSTOM_MACRO?a=r.macroConfig?.value:r.type===l.ElementType.REUSABLE_ITEM&&(a=r.reusableItemConfig?.value),i(r.label,a,"macro")}}),t}function fr(o,t){const{label:e,regex:n,source:i="all"}=o;if(!e||!n)return!1;const r=t.get(e);if(!r?.length)return!1;let s;try{s=new RegExp(n)}catch(a){return console.warn("子模板匹配正则无效:",n,a),!1}return r.some(a=>i!=="all"&&a.source!==i?!1:s.test(a.value))}function Ch(o,t,e="and"){return o?.length?e==="or"?o.some(n=>fr(n,t)):o.every(n=>fr(n,t)):!0}class Sh{draw;options;constructor(t){this.draw=t,this.options=t.getOptions()}setSelect(t){const{checkbox:e}=t;e?e.value=!e.value:t.checkbox={value:!0},this.draw.render({isCompute:!1,isSetCursor:!1})}render(t){const{ctx:e,x:n,index:i,row:r}=t;let{y:s}=t;const{checkbox:{gap:a,lineWidth:c,fillStyle:d,strokeStyle:u,verticalAlign:R},scale:h}=this.options,{metrics:g,checkbox:f}=r.elementList[i];if(R===l.VerticalAlign.TOP||R===l.VerticalAlign.MIDDLE){let L=i+1,P=null;for(;L<r.elementList.length&&(P=r.elementList[L],!(P.value!==_&&P.value!==To));)L++;if(P){const{metrics:{boundingBoxAscent:C,boundingBoxDescent:S}}=P,F=C+S;F>g.height&&(R===l.VerticalAlign.TOP?s-=C-g.height:R===l.VerticalAlign.MIDDLE&&(s-=(F-g.height)/2))}}const T=Math.round(n+a*h),m=Math.round(s-g.height+c),p=g.width-a*2*h,I=g.height;e.save(),e.beginPath(),e.translate(.5,.5),f?.value?(e.lineWidth=c,e.strokeStyle=d,e.rect(T,m,p,I),e.stroke(),e.beginPath(),e.fillStyle=d,e.fillRect(T,m,p,I),e.beginPath(),e.strokeStyle=u,e.lineWidth=c*2*h,e.moveTo(T+2*h,m+I/2),e.lineTo(T+p/2,m+I-3*h),e.lineTo(T+p-2*h,m+3*h),e.stroke()):(e.lineWidth=c,e.rect(T,m,p,I),e.stroke()),e.closePath(),e.restore()}}class Eh{draw;options;constructor(t){this.draw=t,this.options=t.getOptions()}setSelect(t){const{radio:e}=t;e?e.value=!e.value:t.radio={value:!0},this.draw.render({isCompute:!1,isSetCursor:!1})}render(t){const{ctx:e,x:n,index:i,row:r}=t;let{y:s}=t;const{radio:{gap:a,lineWidth:c,fillStyle:d,strokeStyle:u,verticalAlign:R},scale:h}=this.options,{metrics:g,radio:f}=r.elementList[i];if(R===l.VerticalAlign.TOP||R===l.VerticalAlign.MIDDLE){let L=i+1,P=null;for(;L<r.elementList.length&&(P=r.elementList[L],!(P.value!==_&&P.value!==To));)L++;if(P){const{metrics:{boundingBoxAscent:C,boundingBoxDescent:S}}=P,F=C+S;F>g.height&&(R===l.VerticalAlign.TOP?s-=C-g.height:R===l.VerticalAlign.MIDDLE&&(s-=(F-g.height)/2))}}const T=Math.round(n+a*h),m=Math.round(s-g.height+c),p=g.width-a*2*h,I=g.height;e.save(),e.beginPath(),e.translate(.5,.5),e.strokeStyle=f?.value?d:u,e.lineWidth=c,e.arc(T+p/2,m+I/2,p/2,0,Math.PI*2),e.stroke(),f?.value&&(e.beginPath(),e.fillStyle=d,e.arc(T+p/2,m+I/2,p/3,0,Math.PI*2),e.fill()),e.closePath(),e.restore()}}const go={fontSize:11,smallFontSize:9,lineHeight:12,dividerWidth:40,gap:4,totalHeight:36};class Xh{draw;options;inputModal=null;isPopup=!1;constructor(t){this.draw=t,this.options=t.getOptions()}computeSize(t){const e=go,n=this.options.scale,i=e.fontSize*n,r=e.smallFontSize*n,s=e.gap*n,a=e.dividerWidth*n,d=document.createElement("canvas").getContext("2d"),u=t.menstrualData;d.font=`${i}px "Microsoft YaHei", sans-serif`;let R=a;d.font=`${r}px "Microsoft YaHei", sans-serif`;let h=0;if(u){const f=this.getValue(u.menarcheAge);d.font=`${i}px "Microsoft YaHei", sans-serif`,f&&(R+=d.measureText(`${f}岁`).width+s);let T="";if(u.isMenopause){const P=this.getValue(u.menopauseAge);P&&(T=`${P}岁`)}else{const P=this.getValue(u.lastPeriod);P&&(T=P)}T&&(R+=d.measureText(T).width+s),d.font=`${r}px "Microsoft YaHei", sans-serif`;const m=this.getValue(u.periodMin),p=this.getValue(u.periodMax);if(m||p){const P=`${m||""}~${p||""}`;h=Math.max(h,d.measureText(P).width)}const I=this.getValue(u.cycleMin),L=this.getValue(u.cycleMax);if(I||L){const P=`${I||""}~${L||""}`;h=Math.max(h,d.measureText(P).width)}}else d.font=`${i}px "Microsoft YaHei", sans-serif`,h=d.measureText("~").width;return{width:Math.max(R,h),height:e.totalHeight*n}}getValue(t){return!t||t===""||t==="_"||t==="____-__-__"?"":t}render(t){const{ctx:e,x:n,y:i,element:r}=t,s=r.menstrualData,a=this.options.scale;e.save(),e.font=`${go.fontSize*a}px "Microsoft YaHei", sans-serif`,e.fillStyle=this.options.defaultColor,e.textBaseline="bottom",s?this.renderWithData(e,n,i,s,a):this.renderEmpty(e,n,i,a),e.restore()}renderEmpty(t,e,n,i){const r=go,s=r.fontSize*i,a=r.lineHeight*i,c=r.dividerWidth*i,d=n-a*1.5,u=e+c/2;t.font=`${s}px "Microsoft YaHei", sans-serif`;const R=t.measureText("~").width,h=u-R/2;t.fillText("~",h,d+a);const g=d+a*2;this.drawDivider(t,e,g-s/2,c,i),t.fillText("~",h,g+a)}renderWithData(t,e,n,i,r){const s=go,a=s.fontSize*r,c=s.smallFontSize*r,d=s.lineHeight*r,u=s.gap*r,R=s.dividerWidth*r,h=n-d*2,g=h+d*2;t.font=`${a}px "Microsoft YaHei", sans-serif`;const f=this.getValue(i.menarcheAge);let T=e;if(f){const O=`${f}岁`;t.fillText(O,e,g),T=e+t.measureText(O).width+u}const m=T+R/2,p=h+d;t.font=`${c}px "Microsoft YaHei", sans-serif`;const I=this.getValue(i.periodMin),L=this.getValue(i.periodMax);let P="";I||L?P=`${I||""}~${L||""}`:(t.font=`${a}px "Microsoft YaHei", sans-serif`,P="~");const C=t.measureText(P).width,S=m-C/2;t.fillText(P,S,p),this.drawDivider(t,T,g-a/2,R,r),t.font=`${a}px "Microsoft YaHei", sans-serif`;let F="";if(i.isMenopause){const O=this.getValue(i.menopauseAge);O&&(F=`${O}岁`)}else{const O=this.getValue(i.lastPeriod);O&&(F=O)}F&&t.fillText(F,T+R+u,g);const N=g+d;t.font=`${c}px "Microsoft YaHei", sans-serif`;const V=this.getValue(i.cycleMin),Y=this.getValue(i.cycleMax);let E="";V||Y?E=`${V||""}~${Y||""}`:(t.font=`${a}px "Microsoft YaHei", sans-serif`,E="~");const W=t.measureText(E).width,X=m-W/2;t.fillText(E,X,N)}drawDivider(t,e,n,i,r){t.save(),t.beginPath(),t.strokeStyle=this.options.defaultColor,t.lineWidth=.5*r,t.moveTo(e,n),t.lineTo(e+i,n),t.stroke(),t.restore()}clearMenstrualHistoryEditor(){this.inputModal&&(this.inputModal.remove(),this.inputModal=null),this.isPopup=!1}renderMenstrualHistoryEditor(t,e){if(this.options.mode===l.EditorMode.PRINT)return;(this.isPopup||this.inputModal)&&this.clearMenstrualHistoryEditor(),this.isPopup=!0;const n=t.menstrualData;this.inputModal=document.createElement("div"),this.inputModal.className="menstrual-history-edit-modal",this.inputModal.setAttribute("editor-component","menstrual-history-edit-modal"),this.inputModal.innerHTML=`
|
|
184
|
+
`,document.body.appendChild(this.inputModal);const e=this.inputModal.querySelector(".menstrual-history-modal__mask"),n=this.inputModal.querySelector(".menstrual-history-modal__container"),i=this.inputModal.querySelector(".menstrual-history-modal__close"),r=this.inputModal.querySelector(".btn-cancel"),s=this.inputModal.querySelector(".btn-confirm"),a=this.inputModal.querySelector("#mh-edit-notMenopause"),c=this.inputModal.querySelector("#mh-edit-isMenopauseForm"),d=this.inputModal.querySelectorAll('input[name="mh-edit-isMenopause"]'),u=()=>{this.closeModal()};n.addEventListener("click",R=>{R.stopPropagation()}),e.addEventListener("click",u),i.addEventListener("click",u),r.addEventListener("click",u),d.forEach(R=>{R.addEventListener("change",()=>{const h=R.value==="true";a.style.display=h?"none":"block",c.style.display=h?"block":"none"})}),s.addEventListener("click",R=>{R.preventDefault(),R.stopPropagation();const h=this.inputModal;if(!h)return;const g=h.querySelector('input[name="mh-edit-isMenopause"]:checked')?.value==="true";let f;g?f={isMenopause:!0,periodMin:h.querySelector("#mh-edit-periodMin2")?.value||"_",periodMax:h.querySelector("#mh-edit-periodMax2")?.value||"_",menarcheAge:h.querySelector("#mh-edit-menarcheAge2")?.value||"_",menopauseAge:h.querySelector("#mh-edit-menopauseAge")?.value||"_",cycleMin:h.querySelector("#mh-edit-cycleMin2")?.value||"_",cycleMax:h.querySelector("#mh-edit-cycleMax2")?.value||"_"}:f={isMenopause:!1,periodMin:h.querySelector("#mh-edit-periodMin")?.value||"_",periodMax:h.querySelector("#mh-edit-periodMax")?.value||"_",menarcheAge:h.querySelector("#mh-edit-menarcheAge1")?.value||"_",lastPeriod:h.querySelector("#mh-edit-lastPeriod")?.value||"____-__-__",cycleMin:h.querySelector("#mh-edit-cycleMin")?.value||"_",cycleMax:h.querySelector("#mh-edit-cycleMax")?.value||"_"};const T=this.control.getElementList(),m=this.element.controlId;for(let P=0;P<T.length;P++){const C=T[P];C.controlId===m&&C.control&&(C.control.menstrualData=f)}const p=this.generateDisplayText(f),I=this.textToElements(p);this.closeModal();const L=this.setValue(I);L!==-1&&(this.control.repaintControl({curIndex:L}),this.control.emitControlContentChange({}))})}closeModal(){this.inputModal&&(this.inputModal.remove(),this.inputModal=null),this.isPopup=!1}destroy(){this.closeModal()}}l.AreaMode=void 0,(function(o){o.EDIT="edit",o.READONLY="readonly",o.FORM="form"})(l.AreaMode||(l.AreaMode={}));class Oh{controlBorder;textFieldUnderline;draw;range;listener;eventBus;controlSearch;options;controlOptions;activeControl;activeControlValue;preElement;constructor(t){this.controlBorder=new Lc(t),this.textFieldUnderline=new Ch(t),this.draw=t,this.range=t.getRange(),this.listener=t.getListener(),this.eventBus=t.getEventBus(),this.controlSearch=new pc(this),this.options=t.getOptions(),this.controlOptions=this.options.control,this.activeControl=null,this.activeControlValue=[],this.preElement=null}setHighlightList(t){this.controlSearch.setHighlightList(t)}computeHighlightList(){this.controlSearch.getHighlightList().length&&this.controlSearch.computeHighlightList()}renderHighlightList(t,e){this.controlSearch.getHighlightMatchResult().length&&this.controlSearch.renderHighlightList(t,e)}getDraw(){return this.draw}filterAssistElement(t){return t.filter((e,n)=>{if(e.type===l.ElementType.TABLE){const i=e.trList;for(let r=0;r<i.length;r++){const s=i[r];for(let a=0;a<s.tdList.length;a++){const c=s.tdList[a];c.value=this.filterAssistElement(c.value)}}}if(!e.controlId)return!0;if(e.control?.type===l.ControlType.MENSTRUAL_HISTORY&&this.options.mode===l.EditorMode.PRINT&&(e.controlComponent===l.ControlComponent.PREFIX||e.controlComponent===l.ControlComponent.POSTFIX)||e.control?.type===l.ControlType.SELECT&&this.options.mode===l.EditorMode.PRINT&&(e.controlComponent===l.ControlComponent.PREFIX||e.controlComponent===l.ControlComponent.POSTFIX)||e.control?.type===l.ControlType.NUMBER&&this.options.mode===l.EditorMode.PRINT&&(e.controlComponent===l.ControlComponent.PREFIX||e.controlComponent===l.ControlComponent.POSTFIX)||e.control?.type===l.ControlType.TEXT&&this.options.mode===l.EditorMode.PRINT&&e.strikeout&&e.deletePerson)return!1;if(e.control?.minWidth){if(e.controlComponent===l.ControlComponent.PREFIX||e.controlComponent===l.ControlComponent.POSTFIX)return e.value="",!0}else{const i=this.options.mode===l.EditorMode.FORM;if(e.control?.preText&&e.controlComponent===l.ControlComponent.PRE_TEXT){if(i)return!0;let r=!1,s=n+1;for(;s<t.length;){const a=t[s];if(e.controlId!==a.controlId)break;if(a.controlComponent===l.ControlComponent.VALUE){r=!0;break}s++}return r}if(e.control?.postText&&e.controlComponent===l.ControlComponent.POST_TEXT){if(i)return!0;let r=!1,s=n-1;for(;s<t.length;){const a=t[s];if(e.controlId!==a.controlId)break;if(a.controlComponent===l.ControlComponent.VALUE){r=!0;break}s--}return r}}if(e.control?.preTextFix&&e.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT){let i=!1,r=n+1;for(;r<t.length;){const s=t[r];if(e.controlId!==s.controlId)break;if(s.controlComponent===l.ControlComponent.VALUE){i=!0;break}r++}return i}if(e.control?.postTextFix&&e.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT){let i=!1,r=n-1;for(;r<t.length;){const s=t[r];if(e.controlId!==s.controlId)break;if(s.controlComponent===l.ControlComponent.VALUE){i=!0;break}r--}return i}return e.controlComponent!==l.ControlComponent.PREFIX&&e.controlComponent!==l.ControlComponent.POSTFIX&&e.controlComponent!==l.ControlComponent.PLACEHOLDER&&e.controlComponent!==l.ControlComponent.PRETEXTFIX&&e.controlComponent!==l.ControlComponent.POSTTEXTFIX&&e.controlComponent!==l.ControlComponent.TEXTFIXLABEL})}getIsRangeCanCaptureEvent(){if(!this.activeControl)return!1;const{startIndex:t,endIndex:e}=this.getRange();if(!~t&&!~e)return!1;const n=this.getElementList(),i=n[t];if(i.controlComponent===l.ControlComponent.PLACEHOLDER)return!1;if(t===e&&t>0){const s=n[t-1],a=s?.controlComponent===l.ControlComponent.POSTFIX||s?.controlComponent===l.ControlComponent.POSTTEXTFIX,c=s?.controlComponent===l.ControlComponent.PLACEHOLDER,d=!!s?.controlId,u=!!s?.originControlId;let R=!1;if(u){const p=s.originControlId;for(let I=t;I<n.length;I++){const L=n[I];if(L.controlId===p&&!L.originControlId){R=!0;break}if(L.controlId&&L.controlId!==p&&L.originControlId!==p)break}}const g=this.draw.getPosition().getPositionList(),f=g[t],T=g[t-1],m=f&&T&&f.rowIndex===T.rowIndex;if((a||c)&&d&&m&&!R)return!1}if(t===e&&(i.controlComponent===l.ControlComponent.POSTFIX||i.controlComponent===l.ControlComponent.POSTTEXTFIX))return!0;const r=n[e];return!!(i.controlId&&i.controlId===r.controlId&&r.controlComponent!==l.ControlComponent.POSTFIX&&r.controlComponent!==l.ControlComponent.POSTTEXTFIX)}getIsRangeInPostfix(){if(!this.activeControl)return!1;const{startIndex:t,endIndex:e}=this.getRange();if(t!==e)return!1;const i=this.getElementList()[t];return i.controlComponent===l.ControlComponent.POSTFIX||i.controlComponent===l.ControlComponent.POSTTEXTFIX}getIsRangeWithinControl(){const{range:{startIndex:t,endIndex:e},elementList:n}=this.range.getRangeElement();if(!~t&&!~e)return!1;const i=n[t],r=n[e];if(i?.controlId&&i.controlId===r.controlId&&r.controlComponent!==l.ControlComponent.POSTFIX&&r.controlComponent!==l.ControlComponent.POSTTEXTFIX&&r.controlComponent!==l.ControlComponent.POSTTEXTFIX_TEXT&&r.controlComponent!==l.ControlComponent.POST_TEXT)return!0;if(r?.originControlId&&(r.controlComponent===l.ControlComponent.POSTFIX||r.controlComponent===l.ControlComponent.POSTTEXTFIX)){const s=r.originControlId;for(let a=e+1;a<n.length;a++){const c=n[a];if(c.controlId===s)return!0;if(c.controlId&&c.controlId!==s&&c.originControlId!==s)break}}if(!r?.originControlId&&r?.controlId&&(r.controlComponent===l.ControlComponent.POSTFIX||r.controlComponent===l.ControlComponent.POSTTEXTFIX)){const s=n[e+1];if(s?.controlId&&s.controlId!==r.controlId&&(s.controlComponent===l.ControlComponent.PREFIX||s.controlComponent===l.ControlComponent.PRETEXTFIX))return!0;if(s?.controlId&&s.controlId!==r.controlId&&(s.controlComponent===l.ControlComponent.POSTFIX||s.controlComponent===l.ControlComponent.POSTTEXTFIX))return s.originControlId,!0;for(let a=e;a>=0;a--){const c=n[a];if(c.controlId===r.controlId&&(c.controlComponent===l.ControlComponent.PREFIX||c.controlComponent===l.ControlComponent.PRETEXTFIX)){for(let d=a-1;d>=0;d--){const u=n[d];if(u.controlId&&u.controlId!==r.controlId&&(u.controlComponent===l.ControlComponent.PRETEXTFIX||u.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||u.controlComponent===l.ControlComponent.PREFIX||u.controlComponent===l.ControlComponent.PRE_TEXT))return!0;if(u.controlId&&u.controlId!==r.controlId&&(u.controlComponent===l.ControlComponent.POSTFIX||u.controlComponent===l.ControlComponent.POSTTEXTFIX))break}break}}}if(r?.originControlId){const s=r.originControlId;for(let a=e+1;a<n.length;a++){const c=n[a];if(c.controlId===s)return!0;if(c.controlId&&c.controlId!==s&&c.originControlId!==s)break}}if(!i?.controlId&&this.activeControl){const a=this.activeControl.getElement()?.controlId;if(a)for(let c=t;c>=0;c--){const d=n[c];if(d.controlId===a&&!d.originControlId){if(d.controlComponent===l.ControlComponent.PRETEXTFIX||d.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||d.controlComponent===l.ControlComponent.PREFIX||d.controlComponent===l.ControlComponent.PRE_TEXT)for(let u=e;u<n.length;u++){const R=n[u];if(R.controlId===a&&!R.originControlId){if(R.controlComponent===l.ControlComponent.POSTTEXTFIX||R.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||R.controlComponent===l.ControlComponent.POSTFIX||R.controlComponent===l.ControlComponent.POST_TEXT)return!0;break}}break}}}return!1}getIsElementListContainFullControl(t){if(!t.some(i=>i.controlId))return!1;let e=0,n=0;for(let i=0;i<t.length;i++){const r=t[i];r.controlComponent===l.ControlComponent.PREFIX||r.controlComponent===l.ControlComponent.PRETEXTFIX?e++:(r.controlComponent===l.ControlComponent.POSTFIX||r.controlComponent===l.ControlComponent.POSTTEXTFIX)&&n++}return!e||!n?!1:e===n}getIsDisabledControl(t={}){if(this.draw.isDesignMode()||!this.activeControl)return!1;const{startIndex:e,endIndex:n}=t.range||this.range.getRange();if(e===n&&~e&&~n){const r=(t.elementList||this.getElementList())[e];if(r.controlComponent===l.ControlComponent.POSTFIX||r.controlComponent===l.ControlComponent.POSTTEXTFIX)return!1}return!!this.activeControl.getElement()?.control?.disabled}getIsDisabledPasteControl(t={}){if(this.draw.isDesignMode()||!this.activeControl)return!1;const{startIndex:e,endIndex:n}=t.range||this.range.getRange();return e===n&&~e&&~n&&(t.elementList||this.getElementList())[e].controlComponent===l.ControlComponent.POSTFIX?!1:!!this.activeControl.getElement()?.control?.pasteDisabled}getIsExistValueByElementListIndex(t,e){const n=t[e];if(!n.controlId)return!1;if(n.control?.type===l.ControlType.CHECKBOX||n.control?.type===l.ControlType.RADIO)return!!n.control?.code;if(n.controlComponent===l.ControlComponent.VALUE)return!0;if(n.controlComponent===l.ControlComponent.PLACEHOLDER)return!1;if(n.controlComponent===l.ControlComponent.PREFIX||n.controlComponent===l.ControlComponent.PRE_TEXT){let i=e+1;for(;i<t.length;){const r=t[i];if(r.controlId!==n.controlId)return!1;if(r.controlComponent===l.ControlComponent.VALUE)return!0;if(r.controlComponent===l.ControlComponent.PLACEHOLDER)return!1;i++}}if(n.controlComponent===l.ControlComponent.PRETEXTFIX||n.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){let i=e+1;for(;i<t.length;){const r=t[i];if(r.controlId!==n.controlId)return!1;if(r.controlComponent===l.ControlComponent.VALUE)return!0;if(r.controlComponent===l.ControlComponent.PLACEHOLDER||r.controlComponent===l.ControlComponent.TEXTFIXLABEL)return!1;i++}}if(n.controlComponent===l.ControlComponent.POSTFIX||n.controlComponent===l.ControlComponent.POSTTEXTFIX){let i=e-1;for(;i>=0;){const r=t[i];if(r.controlId!==n.controlId)return!1;if(r.controlComponent===l.ControlComponent.VALUE)return!0;if(r.controlComponent===l.ControlComponent.PLACEHOLDER)return!1;i--}}return!1}getControlHighlight(t,e){return this.controlSearch.getControlHighlight(t,e)}getContainer(){return this.draw.getContainer()}getElementList(){return this.draw.getElementList()}getPosition(){const t=this.draw.getPosition().getPositionList(),{endIndex:e}=this.range.getRange();return t[e]||null}getPreY(){const t=this.draw.getHeight(),e=this.draw.getPageGap();return(this.getPosition()?.pageNo??this.draw.getPageNo())*(t+e)}getRange(){return this.range.getRange()}getValueRange(t={}){const e=t.elementList||this.getElementList(),{startIndex:n}=t.range||this.getRange(),i=e[n];let r=n;for(;r>0;){const a=e[r];if(a.controlId!==i.controlId||a.controlComponent===l.ControlComponent.PREFIX||a.controlComponent===l.ControlComponent.PRE_TEXT||a.controlComponent===l.ControlComponent.PRETEXTFIX||a.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)break;r--}let s=n+1;for(;s<e.length;){const a=e[s];if(a.controlId!==i.controlId||a.controlComponent===l.ControlComponent.POSTFIX||a.controlComponent===l.ControlComponent.POST_TEXT||a.controlComponent===l.ControlComponent.POSTTEXTFIX||a.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)break;s++}return r===s?null:{startIndex:r,endIndex:s-1}}shrinkBoundary(t={}){this.range.shrinkBoundary(t)}getActiveControl(){return this.activeControl}getActiveTextControlLimit(){if(!this.activeControl)return null;const t=this.activeControl.getElement(),e=t?.controlId,n=t?.originControlId||null;if(!e||t.control?.type!==l.ControlType.TEXT)return null;const i=this.getElementList(),r=n||null;let s=-1,a=-1,c=-1,d=-1;for(let h=0;h<i.length;h++){const g=i[h];g.controlId!==e||(n?g.originControlId!==n:g.originControlId)||(s===-1&&(s=h),a=h,(g.controlComponent===l.ControlComponent.PREFIX||g.controlComponent===l.ControlComponent.PRE_TEXT||g.controlComponent===l.ControlComponent.PRETEXTFIX||g.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)&&(c=h),d===-1&&(g.controlComponent===l.ControlComponent.POSTFIX||g.controlComponent===l.ControlComponent.POST_TEXT||g.controlComponent===l.ControlComponent.POSTTEXTFIX||g.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)&&(d=h))}if(s===-1)return null;const u=c!==-1?c:s,R=d!==-1?d-1:a;return{controlId:e,originControlId:n,parentControlId:r,startIndex:u,endIndex:R<u?u:R}}getActiveNestedTextLimit(){const t=this.getActiveTextControlLimit();return!t?.parentControlId||!this.getElementList().some(n=>n.controlId===t.parentControlId&&!n.originControlId&&n.control?.type===l.ControlType.TEXTFIELD)?null:{controlId:t.controlId,parentControlId:t.parentControlId,startIndex:t.startIndex,endIndex:t.endIndex}}getControlElementList(t={}){const e=t.elementList||this.getElementList(),{startIndex:n}=t.range||this.getRange(),i=e[n];if(!i?.controlId)return[];const r=[];let s=n;for(;s>0;){const c=e[s];if(c.controlId!==i.controlId)break;r.unshift(c),s--}let a=n+1;for(;a<e.length;){const c=e[a];if(c.controlId!==i.controlId)break;r.push(c),a++}return r}updateActiveControlValue(){this.activeControl&&(this.activeControlValue=this.getControlElementList())}emitControlChange(t){if(!this.activeControl)return;const e=this.eventBus.isSubscribe("controlChange");if(!this.listener.controlChange&&!e)return;let n;const i=this.activeControlValue,r=this.activeControl.getElement();i?.length?n=i[0].control:(n=Ue(at(r)).control,n.value=[]);const s={state:t,control:n,controlId:r.controlId};this.listener.controlChange?.(s),e&&this.eventBus.emit("controlChange",s)}initControl(){const t=this.getElementList(),e=this.getRange(),n=t[e.startIndex];if(this.activeControl){if(this.activeControl instanceof Mn||this.activeControl instanceof Yn||this.activeControl instanceof Dn||this.activeControl instanceof $e){const u=this.activeControl.getElement();n?.controlId!==u?.controlId?this.destroyControl():n.controlComponent===l.ControlComponent.POSTFIX?this.activeControl.destroy():this.activeControl.awake()}if(this.activeControl){const u=this.activeControl.getElement(),R=n.controlId,h=u.controlId;if(R&&R===h){this.updateActiveControlValue(),this.preElement=n;return}if(n.originControlId&&n.originControlId===h&&!(this.activeControl.getElement()?.control?.type===l.ControlType.TEXTFIELD&&n.controlId!==h)){this.updateActiveControlValue(),this.preElement=n;return}if(n.originControlId&&n.controlId&&n.controlId,!n.originControlId&&n.controlId&&n.controlId!==h&&(this.activeControl.getElement()?.originControlId,n.controlId),n.controlId&&n.controlId===h&&n.originControlId){this.updateActiveControlValue(),this.preElement=n;return}if(!R){const g=this.getElementList(),f=this.getRange(),{startIndex:T}=f;let m=null;for(let p=T;p>=0;p--){const I=g[p];if(I.controlComponent===l.ControlComponent.PRETEXTFIX||I.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||I.controlComponent===l.ControlComponent.PREFIX||I.controlComponent===l.ControlComponent.PRE_TEXT){m=I.controlId||null;break}if(I.controlId&&I.controlId!==h||I.controlComponent===l.ControlComponent.POSTTEXTFIX||I.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||I.controlComponent===l.ControlComponent.POSTFIX||I.controlComponent===l.ControlComponent.POST_TEXT)break}if(m===h){this.updateActiveControlValue(),this.preElement=n;return}}}}if(this.destroyControl(),this.draw.isReadonly())return;let r=n.control,s=n;if(n.originControlId&&!r){const u=n.originControlId;for(let R=this.range.getRange().startIndex;R>=0;R--){const h=t[R];if(h.controlId===u&&!h.originControlId&&h.control){r=h.control,s=h;break}if(h.controlId===u&&!h.originControlId&&(h.controlComponent===l.ControlComponent.PRETEXTFIX||h.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||h.controlComponent===l.ControlComponent.PREFIX||h.controlComponent===l.ControlComponent.PRE_TEXT)){h.control&&(r=h.control,s=h);break}}}else if(!r&&n.controlId){const u=this.getElementList();for(let R=this.range.getRange().startIndex;R>=0;R--){const h=u[R];if(h.controlId!==n.controlId)break;if(h.control){r=h.control,s=h;break}if(h.controlComponent===l.ControlComponent.PRETEXTFIX||h.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||h.controlComponent===l.ControlComponent.PREFIX||h.controlComponent===l.ControlComponent.PRE_TEXT)break}}if(!r)return;if(r?.type===l.ControlType.TEXTFIELD&&this.draw.getMode()!==l.EditorMode.EDIT)if(n.originControlId){const u=n.controlId;for(let R=this.range.getRange().startIndex;R>=0;R--){const h=t[R];if(h.controlId===u&&h.originControlId===n.originControlId&&h.control&&h.control.type!==l.ControlType.TEXTFIELD){r=h.control,s=h;break}if(h.controlComponent===l.ControlComponent.PREFIX||h.controlComponent===l.ControlComponent.PRETEXTFIX)break}if(r?.type===l.ControlType.TEXTFIELD)return}else return;const a=this.draw.getPosition().getPositionContext(),c=this.range.getRange().startIndex,d=!!(a.isDirectHit&&a.index===c&&t[a.index]?.controlId===s.controlId);if(r?.type===l.ControlType.TEXTFIELD)this.activeControl=new gr(s,this);else if(r.type===l.ControlType.TEXT)this.activeControl=new Si(s,this);else if(r.type===l.ControlType.SELECT){const u=new Mn(s,this);this.activeControl=u,(d||this.draw.getMode()===l.EditorMode.FORM)&&u.awake()}else if(r.type===l.ControlType.CHECKBOX)this.activeControl=new _n(s,this);else if(r.type===l.ControlType.RADIO)this.activeControl=new Ko(s,this);else if(r.type===l.ControlType.DATE){const u=new Yn(s,this);this.activeControl=u,u.awake()}else if(r.type===l.ControlType.NUMBER){const u=new Dn(s,this);this.activeControl=u,d&&u.awake()}else if(r.type===l.ControlType.BUTTON){const u=new $e(s,this);if(this.activeControl=u,d){u.awake();return}}else if(r.type===l.ControlType.MENSTRUAL_HISTORY){const u=new fr(s,this);this.activeControl=u,u.awake()}this.updateActiveControlValue(),this.preElement=s,s.controlComponent!==l.ControlComponent.POSTFIX&&s.controlComponent!==l.ControlComponent.POSTTEXTFIX&&this.emitControlChange(l.ControlState.ACTIVE)}destroyControl(t={}){if(!this.activeControl)return;const{isEmitEvent:e=!0}=t;(this.activeControl instanceof Mn||this.activeControl instanceof Yn||this.activeControl instanceof Dn||this.activeControl instanceof fr)&&this.activeControl.destroy(),e&&this.preElement?.controlComponent!==l.ControlComponent.POSTFIX&&this.preElement?.controlComponent!==l.ControlComponent.POSTTEXTFIX&&this.emitControlChange(l.ControlState.INACTIVE),this.preElement=null,this.activeControl=null,this.activeControlValue=[]}repaintControl(t={}){const{curIndex:e,isCompute:n=!0,isSubmitHistory:i=!0,isSetCursor:r=!0}=t;e===void 0?(this.range.clearRange(),this.draw.render({isCompute:n,isSubmitHistory:i,isSetCursor:!1})):(this.range.setRange(e,e),this.draw.render({curIndex:e,isCompute:n,isSetCursor:r,isSubmitHistory:i}))}emitControlContentChange(t){const e=this.eventBus.isSubscribe("controlContentChange");if(!e&&!this.listener.controlContentChange)return;const n=t?.controlElement||this.activeControl?.getElement();if(!n)return;const i=t?.context?.elementList||this.getElementList(),{startIndex:r}=t?.context?.range||this.getRange();if(!i[r]?.controlId)return;const s=t?.controlValue||this.getControlElementList(t?.context);let a;if(s?.length?a=Mt(s)[0].control:(a=n.control,a.value=[]),!a)return;const c={control:a,controlId:n.controlId};this.listener.controlContentChange?.(c),e&&this.eventBus.emit("controlContentChange",c)}reAwakeControl(){if(!this.activeControl)return;const t=this.getElementList(),e=this.getRange(),n=t[e.startIndex];this.activeControl.setElement(n),(this.activeControl instanceof Yn||this.activeControl instanceof Mn)&&this.activeControl.getIsPopup()&&(this.activeControl.destroy(),this.activeControl.awake())}selectValue(){const t=this.getElementList(),{startIndex:e}=this.getRange(),n=t[e];if(!n?.controlId||n.controlComponent!==l.ControlComponent.VALUE&&t[e+1]?.controlComponent===l.ControlComponent.VALUE)return!1;let i=e;for(;i>0&&t[i].controlComponent===l.ControlComponent.VALUE;)i--;let r=e+1;for(;r<t.length;){if(t[r].controlComponent!==l.ControlComponent.VALUE){r--;break}r++}if(i!==r){const s=this.range.getRange();return this.range.replaceRange({...s,startIndex:i,endIndex:r}),this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1}),!0}return!1}moveCursor(t){const{index:e,trIndex:n,tdIndex:i,tdValueIndex:r}=t;let s=this.draw.getOriginalElementList(),a;const c=t.isTable?r:e;if(t.isTable?(s=s[e].trList[n].tdList[i].value,a=s[r]):a=s[e],a.hide||a.control?.hide||a.area?.hide){const d=Ge(s,c);return{newIndex:d,newElement:s[d]}}if(a.controlComponent===l.ControlComponent.VALUE)return{newIndex:c,newElement:a};if(a.controlComponent===l.ControlComponent.POSTFIX){let d=c+1;for(;d<s.length;){if(s[d].controlId!==a.controlId)return{newIndex:d-1,newElement:s[d-1]};if(d===s.length-1)return{newIndex:d,newElement:s[d]};d++}}else if(a.controlComponent===l.ControlComponent.PREFIX||a.controlComponent===l.ControlComponent.PRE_TEXT){let d=c+1;for(;d<s.length;){const u=s[d];if(u.controlId!==a.controlId||u.controlComponent!==l.ControlComponent.PREFIX&&u.controlComponent!==l.ControlComponent.PRE_TEXT)return{newIndex:d-1,newElement:s[d-1]};d++}}else if(a.controlComponent===l.ControlComponent.PLACEHOLDER){let d=c-1;for(;d>0;){const u=s[d];if(u.controlId!==a.controlId||u.controlComponent===l.ControlComponent.VALUE||u.controlComponent===l.ControlComponent.PREFIX||u.controlComponent===l.ControlComponent.PRE_TEXT||u.controlComponent===l.ControlComponent.PRETEXTFIX||u.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)return{newIndex:d,newElement:s[d]};d--}}else if(a.controlComponent===l.ControlComponent.POST_TEXT||a.controlComponent===l.ControlComponent.TEXTFIXLABEL||a.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT){let d=c-1;for(;d>0;){const u=s[d];if(u.controlId!==a.controlId||u.controlComponent===l.ControlComponent.VALUE||u.controlComponent===l.ControlComponent.PREFIX||u.controlComponent===l.ControlComponent.PRE_TEXT||u.controlComponent===l.ControlComponent.PRETEXTFIX||u.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)return{newIndex:d,newElement:s[d]};d--}}else if(a.controlComponent===l.ControlComponent.POSTTEXTFIX){let d=c+1;for(;d<s.length;){if(s[d].controlId!==a.controlId)return{newIndex:d-1,newElement:s[d-1]};if(d===s.length-1)return{newIndex:d,newElement:s[d]};d++}}else if(a.controlComponent===l.ControlComponent.PRETEXTFIX||a.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){let d=c+1;for(;d<s.length;){const u=s[d];if(u.controlId!==a.controlId||u.controlComponent!==l.ControlComponent.PRETEXTFIX&&u.controlComponent!==l.ControlComponent.PRETEXTFIX_TEXT)return{newIndex:d-1,newElement:s[d-1]};d++}}return{newIndex:c,newElement:a}}removeControl(t,e={}){const n=e.elementList||this.getElementList(),i=n[t];if(!this.draw.isDesignMode()&&!i?.control?.hide&&!i?.area?.hide){const{deletable:L=!0}=i.control;if(!L)return null;const P=this.draw.getMode();if(P===l.EditorMode.FORM&&this.options.modeRule[P].controlDeletableDisabled)return null}let r=-1,s=-1;const a=!!i.originControlId,c=i.controlId,d=i.originControlId,u=i.control?.type===l.ControlType.BUTTON&&!i.control?.buttonText?`${c}_text`:"";let R=t;for(;R>=0;){const L=n[R];let P=!1;if(a?P=L.controlId===c&&L.originControlId===d:P=L.controlId===c&&!L.originControlId,!P){r=R;break}R--}let h=t;for(;h<n.length;){const L=n[h];let P=!1;if(a?P=L.controlId===c&&L.originControlId===d:P=L.controlId===c&&!L.originControlId,!P){s=h-1;break}h++}if(h===n.length&&(s=h-1),!~r&&!~s)return t;r=~r?r:0;const g=n[r+1],f=g.control,T=f?.type&&[l.ControlType.TEXT,l.ControlType.TEXTFIELD,l.ControlType.DATE,l.ControlType.NUMBER,l.ControlType.SELECT,l.ControlType.BUTTON].includes(f.type);let m=n[0]?.type===l.ElementType.SPLIT_TAG;if(!e.removeNext&&T&&!a&&g.controlComponent!==l.ControlComponent.PREFIX&&g.type!==l.ElementType.SPLIT_TAG)if(e.removePrev)e.removePrev();else{const L=this.draw.getTd();L&&this.createRemoveControlHandler(L,i.controlId,!0)}if(!e.removeNext&&T&&!a&&g.controlComponent!==l.ControlComponent.PRETEXTFIX&&g.type!==l.ElementType.SPLIT_TAG)if(e.removePrev)e.removePrev();else{const L=this.draw.getTd();L&&this.createRemoveControlHandler(L,i.controlId,!0)}if(!e.removePrev&&T&&!a&&n[s].controlComponent!==l.ControlComponent.POSTFIX)if(e.removeNext)e.removeNext();else{const L=this.draw.getTd();m=!!L?.linkTdNextId,L&&this.createRemoveControlHandler(L,i.controlId,!1)}if(!e.removePrev&&T&&!a&&n[s].controlComponent!==l.ControlComponent.POSTTEXTFIX)if(e.removeNext)e.removeNext();else{const L=this.draw.getTd();m=!!L?.linkTdNextId,L&&this.createRemoveControlHandler(L,i.controlId,!1)}this.draw.spliceElementList(n,r+1,s-r);let p=0;if(u)for(let L=n.length-1;L>=0;L--)n[L].controlId===u&&(L<=r&&p++,n.splice(L,1));const I=r-p;return!e.elementList&&m&&r===0?this.draw.fixPosition(!0)??I:I}createRemoveControlHandler(t,e,n){if(n){const i=this.draw.getTdById(t.linkTdPrevId);i&&i.value.splice(-1)[0]?.controlId===e&&this.removeControl(i.value.length-1,{elementList:i.value,removePrev:()=>{this.createRemoveControlHandler(i,e,n)}})}else{const i=this.draw.getTdById(t.linkTdNextId);i&&i.value[1]?.controlId===e&&this.removeControl(1,{elementList:i.value,removeNext:()=>{this.createRemoveControlHandler(i,e,n)}})}}removePlaceholder(t,e={}){const n=e.elementList||this.getElementList(),i=n[t],r=n[t+1];if(i.controlComponent===l.ControlComponent.PLACEHOLDER||i.controlComponent===l.ControlComponent.TEXTFIXLABEL||r?.controlComponent===l.ControlComponent.PLACEHOLDER||r?.controlComponent===l.ControlComponent.TEXTFIXLABEL){let s=!1,a=t;for(;a<n.length;){const c=n[a];if(c.controlId!==i.controlId)break;c.controlComponent===l.ControlComponent.PLACEHOLDER||c.controlComponent===l.ControlComponent.TEXTFIXLABEL?(s||(s=!0,this.draw.getHistoryManager().popUndo(),this.draw.submitHistory(t)),n.splice(a,1)):a++}}}addPlaceholder(t,e={}){const n=e.elementList||this.getElementList(),i=n[t],r=i.control;if(!r.placeholder)return;let s=t;for(;s>=0;){const g=n[s];if(g.controlId!==i.controlId){s++;break}if(g.controlComponent===l.ControlComponent.PREFIX||g.controlComponent===l.ControlComponent.PRE_TEXT||g.controlComponent===l.ControlComponent.PRETEXTFIX||g.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)break;s--}s<0&&(s=0);const a=s+1;if(a<n.length){const g=n[a];if(g.controlId===i.controlId&&(g.controlComponent===l.ControlComponent.PLACEHOLDER||g.controlComponent===l.ControlComponent.VALUE))return}let c=!1,d=s+1;for(;d<n.length;){const g=n[d];if(g.controlId===i.controlId){if(g.controlComponent===l.ControlComponent.POSTFIX||g.controlComponent===l.ControlComponent.POST_TEXT||g.controlComponent===l.ControlComponent.POSTTEXTFIX||g.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT)break}else if(g.controlId!==i.controlId&&(g.controlComponent===l.ControlComponent.VALUE||g.controlComponent===l.ControlComponent.PREFIX||g.controlComponent===l.ControlComponent.PRE_TEXT)){c=!0;break}d++}if(c)return;const u=ct(r.placeholder),R=Dt(i,At),h=s+1;for(let g=0;g<u.length;g++){const f=u[g],T={...R,value:f===`
|
|
185
|
+
`?_:f,controlId:i.controlId,type:l.ElementType.CONTROL,control:i.control,controlComponent:l.ControlComponent.PLACEHOLDER,color:this.controlOptions.placeholderColor};wt(n,[T],s,{editorOptions:this.options}),this.draw.spliceElementList(n,h+g,0,[T])}}setValue(t){if(!this.activeControl)throw new Error("active control is null");return this.activeControl.setValue(t)}setControlProperties(t,e={}){const n=e.elementList||this.getElementList(),{startIndex:i}=e.range||this.getRange(),r=n[i];let s=i;for(;s>0;){const c=n[s];if(c.controlId!==r.controlId)break;c.control={...c.control,...t},s--}let a=i+1;for(;a<n.length;){const c=n[a];if(c.controlId!==r.controlId)break;c.control={...c.control,...t},a++}}keydown(t){if(!this.activeControl)throw new Error("active control is null");return this.activeControl.keydown(t)}cut(){if(!this.activeControl)throw new Error("active control is null");return this.activeControl.cut()}getValueById(t){const{id:e,groupId:n,conceptId:i,areaId:r}=t,s=[];if(!e&&!i&&!n)return s;const a=new Set,c=(u,R)=>{let h=0;for(;h<u.length;){const g=u[h];if(h++,g.type===l.ElementType.TABLE){const P=g.trList;for(let C=0;C<P.length;C++){const S=P[C];for(let F=0;F<S.tdList.length;F++){const N=S.tdList[F],V=N.originalId??N.id;a.has(V)||(a.add(V),N.linkTdNextId?c(this.draw.getSplitTdValues(V),R):c(N.value,R))}}}if(!g.control||n&&g.control.groupId!==n||e&&g.controlId!==e||i&&g.control.conceptId!==i||r&&g.areaId!==r)continue;const{type:f,code:T,valueSets:m}=g.control;let p=h,I="";const L=[];for(;p<u.length;){const P=u[p];if(P.controlId!==g.controlId)break;(f===l.ControlType.TEXT||f===l.ControlType.TEXTFIELD||f===l.ControlType.DATE||f===l.ControlType.NUMBER)&&P.controlComponent===l.ControlComponent.VALUE&&(I+=P.value,L.push(se(P,No))),p++}if(f===l.ControlType.TEXT||f===l.ControlType.TEXTFIELD||f===l.ControlType.DATE||f===l.ControlType.NUMBER)s.push({...g.control,zone:R,value:I||null,innerText:I||null,elementList:Mt(L)});else if(f===l.ControlType.SELECT||f===l.ControlType.CHECKBOX||f===l.ControlType.RADIO){const P=T?.split(",").map(C=>m?.find(S=>S.code===C)?.value).filter(Boolean).join("");s.push({...g.control,zone:R,value:T||null,innerText:P||null})}h=p}},d=[{zone:l.EditorZone.HEADER,elementList:this.draw.getHeaderElementList()},{zone:l.EditorZone.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:l.EditorZone.FOOTER,elementList:this.draw.getFooterElementList()}];for(const{zone:u,elementList:R}of d)c(R,u);return s}setValueListById(t){if(!t.length)return;let e=!1,n=!1;const i=(s,a)=>{let c=0;for(;c<s.length;){const d=s[c];if(c++,d.type===l.ElementType.TABLE){const L=d.trList;for(let P=0;P<L.length;P++){const C=L[P];for(let S=0;S<C.tdList.length;S++){const F=C.tdList[S];i(F.value,F.id)}}}if(!d.control||d.type===l.ElementType.SPLIT_TAG)continue;const u=t.find(L=>(!L.groupId||L.groupId===d.control?.groupId)&&(L.id&&d.controlId===L.id||L.conceptId&&d.control.conceptId===L.conceptId||L.areaId&&d.areaId===L.areaId));if(!u)continue;const{value:R,isSubmitHistory:h=!0}=u;e=!0,h&&(n=!0);const{type:g}=d.control,{range:f,fullRange:T}=this.mergeControl({elementList:s,range:{startIndex:c,endIndex:c},tdId:a}),m={range:T??f,elementList:s,tdId:a},p={isIgnoreDisabledRule:!0,isIgnoreDeletedRule:!0};if(g===l.ControlType.TEXTFIELD){const L=Array.isArray(R)?R:R?[{value:R}]:[];L.length&&bt(L,{isHandleFirstElement:!1,editorOptions:this.options});const P=new gr(d,this);this.activeControl=P,L.length?P.setValue(L,m,p):P.clearValue(m,p)}else if(g===l.ControlType.TEXT){const L=Array.isArray(R)?R:R?[{value:R}]:[];L.length&&bt(L,{isHandleFirstElement:!1,editorOptions:this.options});const P=new Si(d,this);this.activeControl=P,L.length?P.setValue(L,m,p):P.clearValue(m,p)}else if(g===l.ControlType.SELECT){if(Array.isArray(R))continue;const L=new Mn(d,this);this.activeControl=L,R?L.setSelect(R,m,p):L.clearSelect(m,p)}else if(g===l.ControlType.CHECKBOX){if(Array.isArray(R))continue;const L=new _n(d,this);this.activeControl=L;const P=R?R.split(","):[];L.setSelect(P,m,p)}else if(g===l.ControlType.RADIO){if(Array.isArray(R))continue;const L=new Ko(d,this);this.activeControl=L;const P=R?[R]:[];L.setSelect(P,m,p)}else if(g===l.ControlType.DATE){const L=new Yn(d,this);this.activeControl=L,Mo(R)?(R.length&&bt(R,{isHandleFirstElement:!1,editorOptions:this.options}),L.setValue(R,m,p)):$r(R)?L.setSelect(R,m,p):L.clearSelect(m,p)}else if(g===l.ControlType.NUMBER){const L=Array.isArray(R)?R:R?[{value:R}]:[];L.length&&bt(L,{isHandleFirstElement:!1,editorOptions:this.options});const P=new Dn(d,this);this.activeControl=P,L.length?P.setValue(L,m,p):P.clearValue(m,p)}else if(g===l.ControlType.BUTTON){const L=Array.isArray(R)?R:R?[{value:R}]:[];L.length&&bt(L,{isHandleFirstElement:!1,editorOptions:this.options});const P=new $e(d,this);this.activeControl=P,L.length?P.setValue(L,m,p):P.clearSelect(m,p)}this.emitControlContentChange({context:m}),this.activeControl=null;let I=c;for(;I<s.length&&s[I].controlId===d.controlId;)I++;c=I}};this.destroyControl({isEmitEvent:!1});const r=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const s of r)i(s);e&&(n||this.draw.getHistoryManager().recovery(),this.draw.render({isSubmitHistory:n,isSetCursor:!1}))}setExtensionListById(t){if(!t.length)return;const e=i=>{let r=0;for(;r<i.length;){const s=i[r];if(r++,s.type===l.ElementType.TABLE){const u=s.trList;for(let R=0;R<u.length;R++){const h=u[R];for(let g=0;g<h.tdList.length;g++){const f=h.tdList[g];e(f.value)}}}if(!s.control)continue;const a=t.find(u=>u.id&&s.controlId===u.id||u.conceptId&&s.control.conceptId===u.conceptId||u.areaId&&s.areaId===u.areaId);if(!a)continue;const{extension:c}=a;this.setControlProperties({extension:c},{elementList:i,range:{startIndex:r,endIndex:r}});let d=r;for(;d<i.length&&i[d].controlId===s.controlId;)d++;r=d}},n=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const i of n)e(i)}setPropertiesListById(t){if(!t.length)return;let e=!1,n=!1;const i=s=>{let a=0;for(;a<s.length;){const c=s[a];if(a++,c.type===l.ElementType.TABLE){const g=c.trList;for(let f=0;f<g.length;f++){const T=g[f];for(let m=0;m<T.tdList.length;m++){const p=T.tdList[m];i(p.value)}}}if(!c.control)continue;const d=t.find(g=>g.id&&c.controlId===g.id||g.conceptId&&c.control.conceptId===g.conceptId||g.areaId&&c.areaId===g.areaId);if(!d)continue;const{properties:u,isSubmitHistory:R=!0}=d;if(e=!0,R&&(n=!0),this.setControlProperties({...c.control,...u,value:c.control.value},{elementList:s,range:{startIndex:a-1,endIndex:a-1}}),At.forEach(g=>{const f=u[g];f&&Reflect.set(c,g,f)}),c.control?.type===l.ControlType.NUMBER&&u.numberExclusiveOptions){const g={...c.control.numberExclusiveOptions,...u.numberExclusiveOptions},f=g?.minValue,T=g?.maxValue,m=new Dn(c,this),p=m.getValue({elementList:s,range:{startIndex:a-1,endIndex:a-1}});if(p.length>0){const I=p.map(P=>P.value).join(""),L=Number(I);!Number.isNaN(L)&&Number.isFinite(L)&&(f!=null&&L<f||T!=null&&L>T)&&m.clearValue({elementList:s,range:{startIndex:a-1,endIndex:a-1}},{isAddPlaceholder:!0})}}let h=a;for(;h<s.length&&s[h].controlId===c.controlId;)h++;a=h}},r={header:this.draw.getHeaderElementList(),main:this.draw.getOriginalMainElementList(),footer:this.draw.getFooterElementList()};for(const s in r){const a=r[s];i(a)}if(e){for(const s in r){const a=s,c=Mt(r[a],{isClassifyArea:!0,extraPickAttrs:["id","controlId"]});r[a]=c,bt(c,{editorOptions:this.options,isForceCompensation:!0})}this.draw.setEditorData(r),n||this.draw.getHistoryManager().recovery(),this.draw.render({isSubmitHistory:n,isSetCursor:!1})}}getList(){const t=[];function e(i){for(let r=0;r<i.length;r++){const s=i[r];if(s.type===l.ElementType.TABLE){const a=s.trList;for(let c=0;c<a.length;c++){const d=a[c];for(let u=0;u<d.tdList.length;u++){const h=d.tdList[u].value;e(h)}}}if(s.controlId){const a=se(s,[...Xo,...In]);t.push(a)}}}const n=[this.draw.getHeader().getElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooter().getElementList()];for(const i of n)e(i);return Mt(t,{extraPickAttrs:["controlId"]})}recordBorderInfo(t,e,n,i){this.controlBorder.recordBorderInfo(t,e,n,i)}drawBorder(t){this.controlBorder.render(t)}startTextFieldUnderline(t,e,n){this.textFieldUnderline.startTextFieldValue(t,e,n)}recordTextFieldUnderlineWidth(t){this.textFieldUnderline.recordValueWidth(t)}drawTextFieldUnderline(t){this.textFieldUnderline.endTextFieldValue(t)}getPreControlContext(){if(!this.activeControl)return null;const t=this.activeControl.getElement(),e=this.getControlKey(t);if(!e)return null;const n=this.getOrderedNavigableControlContexts(),i=n.findIndex(r=>r.controlKey===e);return i<=0?null:n[i-1]}getNextControlContext(){if(!this.activeControl)return null;const t=this.activeControl.getElement(),e=this.getControlKey(t);if(!e)return null;const n=this.getOrderedNavigableControlContexts(),i=n.findIndex(r=>r.controlKey===e);return i===-1||i>=n.length-1?null:n[i+1]}initNextControl(t={}){const{direction:e=Ut.DOWN}=t;let n=null;if(e===Ut.UP?n=this.getPreControlContext():n=this.getNextControlContext(),!n)return;const{nextIndex:i,positionContext:r}=n,s=this.draw.getPosition();s.setPositionContext(r),this.draw.getRange().replaceRange({startIndex:i,endIndex:i}),this.draw.render({curIndex:i,isCompute:!1,isSetCursor:!0,isSubmitHistory:!1});const a=s.getPositionList();this.draw.getCursor().moveCursorToVisible({cursorPosition:a[i],direction:e})}getControlKey(t){return t?.controlId?`${t.controlId}_${t.originControlId||""}`:null}getControlStartIndex(t,e){const n=this.getControlKey(t[e]);if(!n)return e;let i=e;for(;i>0&&this.getControlKey(t[i-1])===n;)i--;return i}getControlEnterIndex(t,e){const n=this.getControlStartIndex(t,e),i=this.getControlKey(t[n]);if(!i)return e;let r=n,s=n;for(;s<t.length;){const a=t[s];if(this.getControlKey(a)!==i)break;if(a.controlComponent===l.ControlComponent.PREFIX||a.controlComponent===l.ControlComponent.PRE_TEXT||a.controlComponent===l.ControlComponent.PRETEXTFIX||a.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){r=s,s++;continue}return r}return r}isNavigableControlElement(t,e){return!t?.controlId||!t.control?!1:this.options.mode!==l.EditorMode.FORM?!0:!(vt(t)||e?.disabled||t.area?.mode===l.AreaMode.READONLY||t.control.disabled||t.control.readonly||t.control.buttonText||t.control.type===l.ControlType.TEXTFIELD&&!t.originControlId)}getOrderedNavigableControlContexts(){const t=[],e=(n,i,r)=>{let s=0;for(;s<n.length;){const a=n[s];if(a.type===l.ElementType.TABLE){const d=a.trList||[];for(let u=0;u<d.length;u++){const R=d[u],h=R.tdList;for(let g=0;g<h.length;g++){const f=h[g];e(f.value,{isTable:!0,index:s,trIndex:u,tdIndex:g,tdId:f.id,trId:R.id,tableId:a.id},f)}}s++;continue}const c=this.getControlKey(a);c&&this.isNavigableControlElement(a,r)&&t[t.length-1]?.controlKey!==c&&t.push({controlKey:c,positionContext:{...i},nextIndex:this.getControlEnterIndex(n,s)}),s++}};return e(this.draw.getOriginalElementList(),{isTable:!1}),t}setMinWidthControlInfo(t){const{row:e,rowElement:n,controlRealWidth:i,availableWidth:r}=t;if(!n.control?.minWidth)return;const{scale:s}=this.options,a=n.control.minWidth*s;let c=null;if(n.control?.minWidth&&(n.control?.rowFlex===l.RowFlex.CENTER||n.control?.rowFlex===l.RowFlex.RIGHT)){let u=n.metrics.width,R=e.elementList.length-1;for(;R>=0;){const h=e.elementList[R];if(u+=h.metrics.width,e.elementList[R-1]?.controlComponent===l.ControlComponent.PREFIX){c=h;break}R--}c&&u<a&&(n.control.rowFlex===l.RowFlex.CENTER?c.left=(a-u)/2:n.control.rowFlex===l.RowFlex.RIGHT&&(c.left=a-u-n.metrics.width))}const d=a-i;if(d>0){const u=c?.left||0,R=r-e.width-n.metrics.width,h=Math.min(R,d);n.left=h-u,e.width+=h-u}}mergeControl(t={}){const e=t.elementList||this.getElementList(),n=t.range||this.getRange(),{startIndex:i}=n,r=t.tdId??this.draw.getPosition().getPositionContext().tdId,s=r?this.draw.getTdById(r):void 0,a=e[i];if(!a?.controlId)return{range:n,elementList:[],tdId:r};const c={startIndex:i,endIndex:i},d=[];let u=!1,R=i,h=s,g=e;for(;R>=0;){const p=g[R];if(p.controlId!==a.controlId)break;if(p.type!==l.ElementType.SPLIT_TAG&&(d.unshift(p),u&&(g.splice(R,1),e[0].type===l.ElementType.SPLIT_TAG?e.splice(0,1):(n.startIndex++,n.endIndex++),e.unshift(p)),c.startIndex=R),R===0&&p.controlComponent!==l.ControlComponent.PREFIX&&h?.linkTdPrevId&&(h=this.draw.getTdById(h.linkTdPrevId),h)){g=h.value,R=h.value.length-1,u=!0;continue}if(R===0&&p.controlComponent!==l.ControlComponent.PRETEXTFIX&&h?.linkTdPrevId&&(h=this.draw.getTdById(h.linkTdPrevId),h)){g=h.value,R=h.value.length-1,u=!0;continue}R--}u=!1;let f=i+1,T=s,m=e;for(;f<m.length;){const p=m[f];if(p.controlId!==a.controlId)break;if(p.type!==l.ElementType.SPLIT_TAG&&(d.push(p),u&&(m.splice(f,1),e.push(p),f--)),f===m.length-1&&p.controlComponent!==l.ControlComponent.POSTFIX&&T?.linkTdNextId&&(T=this.draw.getTdById(T.linkTdNextId),T)){m=T.value,f=0,u=!0;continue}if(f===m.length-1&&p.controlComponent!==l.ControlComponent.POSTTEXTFIX&&T?.linkTdNextId&&(T=this.draw.getTdById(T.linkTdNextId),T)){m=T.value,f=0,u=!0;continue}f++}return c.endIndex=c.startIndex+d.length,{range:n,elementList:e,tdId:r,fullRange:{startIndex:c.startIndex,endIndex:c.endIndex-2}}}}class Ch{options;currentTextFieldId=null;valueStartX=0;valueWidth=0;valueY=0;constructor(t){this.options=t.getOptions()}startTextFieldValue(t,e,n){this.currentTextFieldId=t,this.valueStartX=e,this.valueY=n,this.valueWidth=0}recordValueWidth(t){this.valueWidth+=t}endTextFieldValue(t){if(!this.currentTextFieldId||this.valueWidth<=0){this.reset();return}const{scale:e}=this.options;t.save(),t.strokeStyle=this.options.defaultColor,t.lineWidth=e,t.beginPath();const n=this.valueY-.5*e;t.moveTo(this.valueStartX,n),t.lineTo(this.valueStartX+this.valueWidth,n),t.stroke(),t.restore(),this.reset()}reset(){this.currentTextFieldId=null,this.valueStartX=0,this.valueWidth=0,this.valueY=0}}function Tr(o,t){const e=n=>{for(let i=0;i<n.length;i++){const r=n[i];if(t(r),r.valueList?.length&&e(r.valueList),r.control?.value?.length&&e(r.control.value),r.type===l.ElementType.TABLE&&r.trList?.length)for(let s=0;s<r.trList.length;s++){const a=r.trList[s];for(let c=0;c<a.tdList.length;c++)e(a.tdList[c].value)}}};e(o)}function Sh(o){const t=o.control;return t?t.type===l.ControlType.TEXT||t.type===l.ControlType.TEXTFIELD||t.type===l.ControlType.DATE||t.type===l.ControlType.NUMBER?xe(t.value||[])||null:(t.type===l.ControlType.SELECT||t.type===l.ControlType.CHECKBOX||t.type===l.ControlType.RADIO)&&t.code?.split(",").map(e=>t.valueSets?.find(n=>n.code===e)?.value).filter(Boolean).join("")||null:null}function Eh(o){const t=new Map,e=new Set,n=new Set,i=(r,s,a)=>{if(!r||s==null)return;const c=t.get(r)||[];c.push({label:r,source:a,value:s}),t.set(r,c)};return Tr(o,r=>{r.control&&r.controlId&&!e.has(r.controlId)&&(e.add(r.controlId),i(r.control.label,Sh(r),"control"));const s=r.id;if(s&&!n.has(s)&&(r.type===l.ElementType.MACRO||r.type===l.ElementType.CUSTOM_MACRO||r.type===l.ElementType.REUSABLE_ITEM)){n.add(s);let a;r.type===l.ElementType.MACRO?a=r.value:r.type===l.ElementType.CUSTOM_MACRO?a=r.macroConfig?.value:r.type===l.ElementType.REUSABLE_ITEM&&(a=r.reusableItemConfig?.value),i(r.label,a,"macro")}}),t}function mr(o,t){const{label:e,regex:n,source:i="all"}=o;if(!e||!n)return!1;const r=t.get(e);if(!r?.length)return!1;let s;try{s=new RegExp(n)}catch(a){return console.warn("子模板匹配正则无效:",n,a),!1}return r.some(a=>i!=="all"&&a.source!==i?!1:s.test(a.value))}function Xh(o,t,e="and"){return o?.length?e==="or"?o.some(n=>mr(n,t)):o.every(n=>mr(n,t)):!0}class Nh{draw;options;constructor(t){this.draw=t,this.options=t.getOptions()}setSelect(t){const{checkbox:e}=t;e?e.value=!e.value:t.checkbox={value:!0},this.draw.render({isCompute:!1,isSetCursor:!1})}render(t){const{ctx:e,x:n,index:i,row:r}=t;let{y:s}=t;const{checkbox:{gap:a,lineWidth:c,fillStyle:d,strokeStyle:u,verticalAlign:R},scale:h}=this.options,{metrics:g,checkbox:f}=r.elementList[i];if(R===l.VerticalAlign.TOP||R===l.VerticalAlign.MIDDLE){let L=i+1,P=null;for(;L<r.elementList.length&&(P=r.elementList[L],!(P.value!==_&&P.value!==To));)L++;if(P){const{metrics:{boundingBoxAscent:C,boundingBoxDescent:S}}=P,F=C+S;F>g.height&&(R===l.VerticalAlign.TOP?s-=C-g.height:R===l.VerticalAlign.MIDDLE&&(s-=(F-g.height)/2))}}const T=Math.round(n+a*h),m=Math.round(s-g.height+c),p=g.width-a*2*h,I=g.height;e.save(),e.beginPath(),e.translate(.5,.5),f?.value?(e.lineWidth=c,e.strokeStyle=d,e.rect(T,m,p,I),e.stroke(),e.beginPath(),e.fillStyle=d,e.fillRect(T,m,p,I),e.beginPath(),e.strokeStyle=u,e.lineWidth=c*2*h,e.moveTo(T+2*h,m+I/2),e.lineTo(T+p/2,m+I-3*h),e.lineTo(T+p-2*h,m+3*h),e.stroke()):(e.lineWidth=c,e.rect(T,m,p,I),e.stroke()),e.closePath(),e.restore()}}class Fh{draw;options;constructor(t){this.draw=t,this.options=t.getOptions()}setSelect(t){const{radio:e}=t;e?e.value=!e.value:t.radio={value:!0},this.draw.render({isCompute:!1,isSetCursor:!1})}render(t){const{ctx:e,x:n,index:i,row:r}=t;let{y:s}=t;const{radio:{gap:a,lineWidth:c,fillStyle:d,strokeStyle:u,verticalAlign:R},scale:h}=this.options,{metrics:g,radio:f}=r.elementList[i];if(R===l.VerticalAlign.TOP||R===l.VerticalAlign.MIDDLE){let L=i+1,P=null;for(;L<r.elementList.length&&(P=r.elementList[L],!(P.value!==_&&P.value!==To));)L++;if(P){const{metrics:{boundingBoxAscent:C,boundingBoxDescent:S}}=P,F=C+S;F>g.height&&(R===l.VerticalAlign.TOP?s-=C-g.height:R===l.VerticalAlign.MIDDLE&&(s-=(F-g.height)/2))}}const T=Math.round(n+a*h),m=Math.round(s-g.height+c),p=g.width-a*2*h,I=g.height;e.save(),e.beginPath(),e.translate(.5,.5),e.strokeStyle=f?.value?d:u,e.lineWidth=c,e.arc(T+p/2,m+I/2,p/2,0,Math.PI*2),e.stroke(),f?.value&&(e.beginPath(),e.fillStyle=d,e.arc(T+p/2,m+I/2,p/3,0,Math.PI*2),e.fill()),e.closePath(),e.restore()}}const go={fontSize:11,smallFontSize:9,lineHeight:12,dividerWidth:40,gap:4,totalHeight:36};class yh{draw;options;inputModal=null;isPopup=!1;constructor(t){this.draw=t,this.options=t.getOptions()}computeSize(t){const e=go,n=this.options.scale,i=e.fontSize*n,r=e.smallFontSize*n,s=e.gap*n,a=e.dividerWidth*n,d=document.createElement("canvas").getContext("2d"),u=t.menstrualData;d.font=`${i}px "Microsoft YaHei", sans-serif`;let R=a;d.font=`${r}px "Microsoft YaHei", sans-serif`;let h=0;if(u){const f=this.getValue(u.menarcheAge);d.font=`${i}px "Microsoft YaHei", sans-serif`,f&&(R+=d.measureText(`${f}岁`).width+s);let T="";if(u.isMenopause){const P=this.getValue(u.menopauseAge);P&&(T=`${P}岁`)}else{const P=this.getValue(u.lastPeriod);P&&(T=P)}T&&(R+=d.measureText(T).width+s),d.font=`${r}px "Microsoft YaHei", sans-serif`;const m=this.getValue(u.periodMin),p=this.getValue(u.periodMax);if(m||p){const P=`${m||""}~${p||""}`;h=Math.max(h,d.measureText(P).width)}const I=this.getValue(u.cycleMin),L=this.getValue(u.cycleMax);if(I||L){const P=`${I||""}~${L||""}`;h=Math.max(h,d.measureText(P).width)}}else d.font=`${i}px "Microsoft YaHei", sans-serif`,h=d.measureText("~").width;return{width:Math.max(R,h),height:e.totalHeight*n}}getValue(t){return!t||t===""||t==="_"||t==="____-__-__"?"":t}render(t){const{ctx:e,x:n,y:i,element:r}=t,s=r.menstrualData,a=this.options.scale;e.save(),e.font=`${go.fontSize*a}px "Microsoft YaHei", sans-serif`,e.fillStyle=this.options.defaultColor,e.textBaseline="bottom",s?this.renderWithData(e,n,i,s,a):this.renderEmpty(e,n,i,a),e.restore()}renderEmpty(t,e,n,i){const r=go,s=r.fontSize*i,a=r.lineHeight*i,c=r.dividerWidth*i,d=n-a*1.5,u=e+c/2;t.font=`${s}px "Microsoft YaHei", sans-serif`;const R=t.measureText("~").width,h=u-R/2;t.fillText("~",h,d+a);const g=d+a*2;this.drawDivider(t,e,g-s/2,c,i),t.fillText("~",h,g+a)}renderWithData(t,e,n,i,r){const s=go,a=s.fontSize*r,c=s.smallFontSize*r,d=s.lineHeight*r,u=s.gap*r,R=s.dividerWidth*r,h=n-d*2,g=h+d*2;t.font=`${a}px "Microsoft YaHei", sans-serif`;const f=this.getValue(i.menarcheAge);let T=e;if(f){const O=`${f}岁`;t.fillText(O,e,g),T=e+t.measureText(O).width+u}const m=T+R/2,p=h+d;t.font=`${c}px "Microsoft YaHei", sans-serif`;const I=this.getValue(i.periodMin),L=this.getValue(i.periodMax);let P="";I||L?P=`${I||""}~${L||""}`:(t.font=`${a}px "Microsoft YaHei", sans-serif`,P="~");const C=t.measureText(P).width,S=m-C/2;t.fillText(P,S,p),this.drawDivider(t,T,g-a/2,R,r),t.font=`${a}px "Microsoft YaHei", sans-serif`;let F="";if(i.isMenopause){const O=this.getValue(i.menopauseAge);O&&(F=`${O}岁`)}else{const O=this.getValue(i.lastPeriod);O&&(F=O)}F&&t.fillText(F,T+R+u,g);const N=g+d;t.font=`${c}px "Microsoft YaHei", sans-serif`;const V=this.getValue(i.cycleMin),Y=this.getValue(i.cycleMax);let E="";V||Y?E=`${V||""}~${Y||""}`:(t.font=`${a}px "Microsoft YaHei", sans-serif`,E="~");const W=t.measureText(E).width,X=m-W/2;t.fillText(E,X,N)}drawDivider(t,e,n,i,r){t.save(),t.beginPath(),t.strokeStyle=this.options.defaultColor,t.lineWidth=.5*r,t.moveTo(e,n),t.lineTo(e+i,n),t.stroke(),t.restore()}clearMenstrualHistoryEditor(){this.inputModal&&(this.inputModal.remove(),this.inputModal=null),this.isPopup=!1}renderMenstrualHistoryEditor(t,e){if(this.options.mode===l.EditorMode.PRINT)return;(this.isPopup||this.inputModal)&&this.clearMenstrualHistoryEditor(),this.isPopup=!0;const n=t.menstrualData;this.inputModal=document.createElement("div"),this.inputModal.className="menstrual-history-edit-modal",this.inputModal.setAttribute("editor-component","menstrual-history-edit-modal"),this.inputModal.innerHTML=`
|
|
186
186
|
<div class="menstrual-history-modal__mask"></div>
|
|
187
187
|
<div class="menstrual-history-modal__container">
|
|
188
188
|
<div class="menstrual-history-modal__header">
|
|
@@ -258,7 +258,7 @@ ${R} `}textToElements(t){const e=[],n=t.split(`
|
|
|
258
258
|
<button class="btn-confirm">确认</button>
|
|
259
259
|
</div>
|
|
260
260
|
</div>
|
|
261
|
-
`,document.body.appendChild(this.inputModal);const i=this.inputModal.querySelector(".menstrual-history-modal__mask"),r=this.inputModal.querySelector(".menstrual-history-modal__container"),s=this.inputModal.querySelector(".menstrual-history-modal__close"),a=this.inputModal.querySelector(".btn-cancel"),c=this.inputModal.querySelector(".btn-confirm"),d=this.inputModal.querySelector("#mh-edit-notMenopause"),u=this.inputModal.querySelector("#mh-edit-isMenopauseForm"),R=this.inputModal.querySelectorAll('input[name="mh-edit-isMenopause"]'),h=()=>{this.clearMenstrualHistoryEditor()};r.addEventListener("click",g=>{g.stopPropagation()}),i.addEventListener("click",h),s.addEventListener("click",h),a.addEventListener("click",h),R.forEach(g=>{g.addEventListener("change",()=>{const f=g.value==="true";d.style.display=f?"none":"block",u.style.display=f?"block":"none"})}),c.addEventListener("click",g=>{g.preventDefault(),g.stopPropagation();const f=this.inputModal;if(!f)return;const T=f.querySelector('input[name="mh-edit-isMenopause"]:checked')?.value==="true";let m;T?m={isMenopause:!0,periodMin:f.querySelector("#mh-edit-periodMin2")?.value||"",periodMax:f.querySelector("#mh-edit-periodMax2")?.value||"",menarcheAge:f.querySelector("#mh-edit-menarcheAge2")?.value||"",menopauseAge:f.querySelector("#mh-edit-menopauseAge")?.value||"",cycleMin:f.querySelector("#mh-edit-cycleMin2")?.value||"",cycleMax:f.querySelector("#mh-edit-cycleMax2")?.value||""}:m={isMenopause:!1,periodMin:f.querySelector("#mh-edit-periodMin")?.value||"",periodMax:f.querySelector("#mh-edit-periodMax")?.value||"",menarcheAge:f.querySelector("#mh-edit-menarcheAge1")?.value||"",lastPeriod:f.querySelector("#mh-edit-lastPeriod")?.value||"",cycleMin:f.querySelector("#mh-edit-cycleMin")?.value||"",cycleMax:f.querySelector("#mh-edit-cycleMax")?.value||""},this.clearMenstrualHistoryEditor();const p=this.draw.getElementList(),I=e.index;this.draw.spliceElementList(p,I,1);const L={type:"menstrualHistory",value:"",menstrualData:m};this.draw.spliceElementList(p,I,0,[L]),this.draw.getControl().destroyControl(),this.draw.getRange().clearRange(),this.draw.render({isSetCursor:!1,isCompute:!0})})}}const
|
|
261
|
+
`,document.body.appendChild(this.inputModal);const i=this.inputModal.querySelector(".menstrual-history-modal__mask"),r=this.inputModal.querySelector(".menstrual-history-modal__container"),s=this.inputModal.querySelector(".menstrual-history-modal__close"),a=this.inputModal.querySelector(".btn-cancel"),c=this.inputModal.querySelector(".btn-confirm"),d=this.inputModal.querySelector("#mh-edit-notMenopause"),u=this.inputModal.querySelector("#mh-edit-isMenopauseForm"),R=this.inputModal.querySelectorAll('input[name="mh-edit-isMenopause"]'),h=()=>{this.clearMenstrualHistoryEditor()};r.addEventListener("click",g=>{g.stopPropagation()}),i.addEventListener("click",h),s.addEventListener("click",h),a.addEventListener("click",h),R.forEach(g=>{g.addEventListener("change",()=>{const f=g.value==="true";d.style.display=f?"none":"block",u.style.display=f?"block":"none"})}),c.addEventListener("click",g=>{g.preventDefault(),g.stopPropagation();const f=this.inputModal;if(!f)return;const T=f.querySelector('input[name="mh-edit-isMenopause"]:checked')?.value==="true";let m;T?m={isMenopause:!0,periodMin:f.querySelector("#mh-edit-periodMin2")?.value||"",periodMax:f.querySelector("#mh-edit-periodMax2")?.value||"",menarcheAge:f.querySelector("#mh-edit-menarcheAge2")?.value||"",menopauseAge:f.querySelector("#mh-edit-menopauseAge")?.value||"",cycleMin:f.querySelector("#mh-edit-cycleMin2")?.value||"",cycleMax:f.querySelector("#mh-edit-cycleMax2")?.value||""}:m={isMenopause:!1,periodMin:f.querySelector("#mh-edit-periodMin")?.value||"",periodMax:f.querySelector("#mh-edit-periodMax")?.value||"",menarcheAge:f.querySelector("#mh-edit-menarcheAge1")?.value||"",lastPeriod:f.querySelector("#mh-edit-lastPeriod")?.value||"",cycleMin:f.querySelector("#mh-edit-cycleMin")?.value||"",cycleMax:f.querySelector("#mh-edit-cycleMax")?.value||""},this.clearMenstrualHistoryEditor();const p=this.draw.getElementList(),I=e.index;this.draw.spliceElementList(p,I,1);const L={type:"menstrualHistory",value:"",menstrualData:m};this.draw.spliceElementList(p,I,0,[L]),this.draw.getControl().destroyControl(),this.draw.getRange().clearRange(),this.draw.render({isSetCursor:!1,isCompute:!0})})}}const pr={fontSize:16,totalWidth:85,totalHeight:75,symbolGap:12,lineGap:20};class bh{draw;options;inputModal=null;isPopup=!1;constructor(t){this.draw=t,this.options=t.getOptions()}computeSize(){const t=pr,e=this.options.scale;return{width:t.totalWidth*e,height:t.totalHeight*e}}render(t){const{ctx:e,x:n,y:i,element:r}=t,s=r.fetalHeartData,a=this.options.scale;e.save();const c=pr,d=c.fontSize*a,u=c.symbolGap*a,R=c.lineGap*a,h=c.totalHeight*a,g=n+c.totalWidth*a/2,T=i-h/2;e.font=`${d}px "Microsoft YaHei", sans-serif`,e.fillStyle=this.options.defaultColor,e.textBaseline="middle",e.textAlign="center";const m=h/4,p=T+m*.7,I=T+m*1.7,L=T+m*2.7,P=T+h-m*.3;this.drawVerticalLine(e,g,T,P-T,a);const C=g-u,S=g+u;this.drawSymbol(e,C,p,s?.a),this.drawSymbol(e,S,p,s?.b);const F=C-R,N=S+R;e.fillText("-",F,I),this.drawSymbol(e,C,I,s?.c),this.drawSymbol(e,S,I,s?.d),e.fillText("-",N,I),this.drawSymbol(e,C,L,s?.e),this.drawSymbol(e,S,L,s?.f),e.restore()}drawSymbol(t,e,n,i){const r=i?"+":"-";t.fillText(r,e,n)}drawVerticalLine(t,e,n,i,r){t.save(),t.beginPath(),t.strokeStyle=this.options.defaultColor,t.lineWidth=.5*r,t.moveTo(e,n),t.lineTo(e,n+i),t.stroke(),t.restore()}clearFetalHeartPositionEditor(){this.inputModal&&(this.inputModal.remove(),this.inputModal=null),this.isPopup=!1}renderFetalHeartPositionEditor(t,e){if(this.options.mode===l.EditorMode.PRINT)return;(this.isPopup||this.inputModal)&&this.clearFetalHeartPositionEditor(),this.isPopup=!0;const n=t.fetalHeartData;this.inputModal=document.createElement("div"),this.inputModal.className="fetal-heart-position-edit-modal",this.inputModal.setAttribute("editor-component","fetal-heart-position-edit-modal"),this.inputModal.innerHTML=`
|
|
262
262
|
<div class="fetal-heart-position-modal__mask"></div>
|
|
263
263
|
<div class="fetal-heart-position-modal__container">
|
|
264
264
|
<div class="fetal-heart-position-modal__header">
|
|
@@ -304,7 +304,7 @@ ${R} `}textToElements(t){const e=[],n=t.split(`
|
|
|
304
304
|
<button class="btn-confirm">确认</button>
|
|
305
305
|
</div>
|
|
306
306
|
</div>
|
|
307
|
-
`,document.body.appendChild(this.inputModal);const i=this.inputModal.querySelector(".fetal-heart-position-modal__mask"),r=this.inputModal.querySelector(".fetal-heart-position-modal__container"),s=this.inputModal.querySelector(".fetal-heart-position-modal__close"),a=this.inputModal.querySelector(".btn-cancel"),c=this.inputModal.querySelector(".btn-confirm"),d=()=>{this.clearFetalHeartPositionEditor()};r.addEventListener("click",u=>{u.stopPropagation()}),i.addEventListener("click",d),s.addEventListener("click",d),a.addEventListener("click",d),c.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation();const R=this.inputModal;if(!R)return;const h={a:R.querySelector("#fh-a")?.checked||!1,b:R.querySelector("#fh-b")?.checked||!1,c:R.querySelector("#fh-c")?.checked||!1,d:R.querySelector("#fh-d")?.checked||!1,e:R.querySelector("#fh-e")?.checked||!1,f:R.querySelector("#fh-f")?.checked||!1};this.clearFetalHeartPositionEditor();const g=this.draw.getElementList(),f=e.index;this.draw.spliceElementList(g,f,1);const T={type:"fetalHeartPosition",value:"",fetalHeartData:h};this.draw.spliceElementList(g,f,0,[T]),this.draw.getControl().destroyControl(),this.draw.getRange().clearRange(),this.draw.render({isSetCursor:!1,isCompute:!0})})}}const We={fontSize:12,deciduousFontSize:10,smallFontSize:9,totalHeight:60,toothGap:2,halfGap:8,minLineHalfWidth:50,maxLineHalfWidth:85},
|
|
307
|
+
`,document.body.appendChild(this.inputModal);const i=this.inputModal.querySelector(".fetal-heart-position-modal__mask"),r=this.inputModal.querySelector(".fetal-heart-position-modal__container"),s=this.inputModal.querySelector(".fetal-heart-position-modal__close"),a=this.inputModal.querySelector(".btn-cancel"),c=this.inputModal.querySelector(".btn-confirm"),d=()=>{this.clearFetalHeartPositionEditor()};r.addEventListener("click",u=>{u.stopPropagation()}),i.addEventListener("click",d),s.addEventListener("click",d),a.addEventListener("click",d),c.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation();const R=this.inputModal;if(!R)return;const h={a:R.querySelector("#fh-a")?.checked||!1,b:R.querySelector("#fh-b")?.checked||!1,c:R.querySelector("#fh-c")?.checked||!1,d:R.querySelector("#fh-d")?.checked||!1,e:R.querySelector("#fh-e")?.checked||!1,f:R.querySelector("#fh-f")?.checked||!1};this.clearFetalHeartPositionEditor();const g=this.draw.getElementList(),f=e.index;this.draw.spliceElementList(g,f,1);const T={type:"fetalHeartPosition",value:"",fetalHeartData:h};this.draw.spliceElementList(g,f,0,[T]),this.draw.getControl().destroyControl(),this.draw.getRange().clearRange(),this.draw.render({isSetCursor:!1,isCompute:!0})})}}const We={fontSize:12,deciduousFontSize:10,smallFontSize:9,totalHeight:60,toothGap:2,halfGap:8,minLineHalfWidth:50,maxLineHalfWidth:85},Lr=["La","B","F","M","I","D","L","P"];class Wh{draw;options;inputModal=null;isPopup=!1;finallyAdd=null;toothSurfaceMap={};supernumeraryToothMap={};constructor(t){this.draw=t,this.options=t.getOptions()}computeSize(t){const e=We,n=this.options.scale,i=t.toothPositionData,s=this.calculateLineHalfWidth(i,n)*2;return{width:Math.min(s,this.draw.getInnerWidth()),height:e.totalHeight*n}}calculateLineHalfWidth(t,e){const{minLineHalfWidth:n,maxLineHalfWidth:i,fontSize:r,deciduousFontSize:s,smallFontSize:a,toothGap:c}=We,d=(T,m,p)=>{let I=0;const L=(P,C)=>`${P}-${C}`;return m.forEach(P=>{const C=L(p,P),S=t?.toothSurfaceMap?.[C]||[],F=t?.supernumeraryToothMap?.[C];I+=s*e*.6,S.length>0&&(I+=a*e*S.length*.5),F&&(I+=s*e*.4),I+=c*e}),T.forEach(P=>{const C=L(p,P),S=t?.toothSurfaceMap?.[C]||[],F=t?.supernumeraryToothMap?.[C];I+=r*e*.6,S.length>0&&(I+=a*e*S.length*.5),F&&(I+=r*e*.4),I+=c*e}),I},u=Math.max(d(t?.upperLeft||[],t?.upperLeftLetter||[],"upperLeft"),d(t?.lowerLeft||[],t?.lowerLeftLetter||[],"lowerLeft")),R=Math.max(d(t?.upperRight||[],t?.upperRightLetter||[],"upperRight"),d(t?.lowerRight||[],t?.lowerRightLetter||[],"lowerRight")),g=Math.max(u,R)/e+We.halfGap;return Math.max(n,Math.min(i,g))*e}render(t){const{ctx:e,x:n,y:i,element:r}=t,s=r.toothPositionData,a=this.options.scale;e.save();const c=We.fontSize*a,d=We.deciduousFontSize*a,u=We.smallFontSize*a,R=We.toothGap*a,h=We.totalHeight*a,g=We.halfGap*a,f=2*a,T=(S,F)=>`${S}-${F}`,m=this.calculateLineHalfWidth(s,a),p=m*2,I=n+m,L=i;e.beginPath(),e.rect(I-m,L-h/2,p,h),e.clip(),e.beginPath(),e.strokeStyle=this.options.defaultColor,e.lineWidth=1*a,e.moveTo(I,L-h/2+10*a),e.lineTo(I,L+h/2-10*a),e.stroke(),e.beginPath(),e.moveTo(I-m,L),e.lineTo(I+m,L),e.stroke();const P=(S,F,N,V,Y)=>{const E=T(S,F),W=s?.toothSurfaceMap?.[E]||[],X=Lr.filter(U=>W.includes(U)),O=s?.supernumeraryToothMap?.[E],M=F.toString(),y=typeof F=="string"?d:c;e.font=`${y}px "Microsoft YaHei", sans-serif`,e.textBaseline="middle";let D=N;if(O){e.font=`${y}px "Microsoft YaHei", sans-serif`;const H=e.measureText("(").width,tt=e.measureText(M).width;e.font=`${u}px "Microsoft YaHei", sans-serif`;const st=e.measureText("S").width;let et=H+tt+H;et+=st+f;let nt=0,q="";return X.length>0&&(e.font=`${u}px "Microsoft YaHei", sans-serif`,q=X.join(","),nt=e.measureText(q).width+f/2),Y==="right"?(D=N-et,X.length>0&&(e.font=`${u}px "Microsoft YaHei", sans-serif`,e.fillText(q,D-nt-f/2,V-y*.4)),e.font=`${y}px "Microsoft YaHei", sans-serif`,e.textAlign="left",e.fillStyle=this.options.defaultColor,e.fillText("(",D,V),D+=H,e.font=`${u}px "Microsoft YaHei", sans-serif`,O==="Si"&&(e.fillText("S",D,V-y*.4),D+=st+f),e.font=`${y}px "Microsoft YaHei", sans-serif`,e.fillText(M,D,V),D+=tt,O==="iS"&&(e.font=`${u}px "Microsoft YaHei", sans-serif`,e.fillText("S",D,V-y*.4),D+=st),e.font=`${y}px "Microsoft YaHei", sans-serif`,e.fillText(")",D,V),N-et-nt-R):(e.font=`${y}px "Microsoft YaHei", sans-serif`,e.textAlign="left",e.fillStyle=this.options.defaultColor,e.fillText("(",D,V),D+=H,e.font=`${u}px "Microsoft YaHei", sans-serif`,O==="Si"&&(e.fillText("S",D,V-y*.4),D+=st+f),e.font=`${y}px "Microsoft YaHei", sans-serif`,e.fillText(M,D,V),D+=tt,O==="iS"&&(e.font=`${u}px "Microsoft YaHei", sans-serif`,e.fillText("S",D,V-y*.4),D+=st),e.font=`${y}px "Microsoft YaHei", sans-serif`,e.fillText(")",D,V),D+=H,X.length>0&&(e.font=`${u}px "Microsoft YaHei", sans-serif`,e.fillText(q,D+f/2,V-y*.4),D+=nt),D+R)}else{e.font=`${y}px "Microsoft YaHei", sans-serif`;const U=e.measureText(M).width;let Q=0,G="";return X.length>0&&(e.font=`${u}px "Microsoft YaHei", sans-serif`,G=X.join(","),Q=e.measureText(G).width+f/2,e.font=`${y}px "Microsoft YaHei", sans-serif`),Y==="right"?(D=N-U,X.length>0&&(e.font=`${u}px "Microsoft YaHei", sans-serif`,e.fillText(G,D-Q-f/2,V-y*.4),e.font=`${y}px "Microsoft YaHei", sans-serif`),e.textAlign="left",e.fillStyle=this.options.defaultColor,e.fillText(M,D,V),N-U-Q-R):(e.textAlign="left",e.fillStyle=this.options.defaultColor,e.fillText(M,D,V),D+=U,X.length>0&&(e.font=`${u}px "Microsoft YaHei", sans-serif`,e.fillText(G,D+f/2,V-y*.4),D+=Q),D+R)}},C=(S,F,N,V,Y,E)=>{let W=V;E==="right"?([...F].reverse().forEach(M=>{W=P(N,M,W,Y,E)}),[...S].reverse().forEach(M=>{W=P(N,M,W,Y,E)})):(F.forEach(X=>{W=P(N,X,W,Y,E)}),S.forEach(X=>{W=P(N,X,W,Y,E)}))};C(s?.upperLeft||[],s?.upperLeftLetter||[],"upperLeft",I-g,L-h/4,"right"),C(s?.upperRight||[],s?.upperRightLetter||[],"upperRight",I+g,L-h/4,"left"),C(s?.lowerLeft||[],s?.lowerLeftLetter||[],"lowerLeft",I-g,L+h/4,"right"),C(s?.lowerRight||[],s?.lowerRightLetter||[],"lowerRight",I+g,L+h/4,"left"),e.restore()}clearToothPositionEditor(){this.inputModal&&(this.inputModal.remove(),this.inputModal=null),this.isPopup=!1}renderToothPositionEditor(t,e){if(this.options.mode===l.EditorMode.PRINT)return;(this.isPopup||this.inputModal)&&this.clearToothPositionEditor(),this.isPopup=!0,this.finallyAdd=null,this.toothSurfaceMap={},this.supernumeraryToothMap={};const n=t.toothPositionData;this.inputModal=document.createElement("div"),this.inputModal.className="tooth-position-edit-modal",this.inputModal.setAttribute("editor-component","tooth-position-edit-modal"),this.inputModal.innerHTML=`
|
|
308
308
|
<div class="tooth-position-modal__mask"></div>
|
|
309
309
|
<div class="tooth-position-modal__container">
|
|
310
310
|
<div class="tooth-position-modal__header">
|
|
@@ -488,7 +488,7 @@ ${R} `}textToElements(t){const e=[],n=t.split(`
|
|
|
488
488
|
<button class="btn-confirm">确认</button>
|
|
489
489
|
</div>
|
|
490
490
|
</div>
|
|
491
|
-
`,document.body.appendChild(this.inputModal),this.drawDividerLines(),this.initSelectedState(n),this.drawPreview(n),this.bindQuickButtons(),this.bindClickEvents(),this.bindExtraPanelEvents();const i=this.inputModal.querySelector(".tooth-position-modal__mask"),r=this.inputModal.querySelector(".tooth-position-modal__container"),s=this.inputModal.querySelector(".tooth-position-modal__close"),a=this.inputModal.querySelector(".btn-cancel"),c=this.inputModal.querySelector(".btn-confirm"),d=()=>{this.clearToothPositionEditor()};r.addEventListener("click",u=>{u.stopPropagation()}),i.addEventListener("click",d),s.addEventListener("click",d),a.addEventListener("click",d),c.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation();const R=this.inputModal;if(!R)return;const h=this.collectData(R);this.clearToothPositionEditor();const g=this.draw.getElementList(),f=e.index;this.draw.spliceElementList(g,f,1);const T={type:"toothPosition",value:"",toothPositionData:h};this.draw.spliceElementList(g,f,0,[T]),this.draw.getControl().destroyControl(),this.draw.getRange().clearRange(),this.draw.render({isSetCursor:!1,isCompute:!0})})}drawDividerLines(){const t=this.inputModal?.querySelector(".tooth-divider-canvas-h");if(t){const n=t.getContext("2d");n&&(n.strokeStyle="#000",n.lineWidth=2,n.beginPath(),n.moveTo(0,1),n.lineTo(900,1),n.stroke())}const e=this.inputModal?.querySelector(".tooth-divider-canvas-v");if(e){const n=e.getContext("2d");n&&(n.strokeStyle="#000",n.lineWidth=2,n.beginPath(),n.moveTo(1,0),n.lineTo(1,110),n.stroke())}}initSelectedState(t){if(!t)return;const e=this.inputModal;if(!e)return;if(["upperLeft","upperRight","lowerLeft","lowerRight"].forEach(r=>{const s=t[r];s&&s.length>0&&s.forEach(a=>{const c=e.querySelector(`.tooth-grid-number-item[data-position="${r}"][data-value="${a}"]`);c&&c.classList.add("selected")})}),["upperLeftLetter","upperRightLetter","lowerLeftLetter","lowerRightLetter"].forEach(r=>{const s=t[r];s&&s.length>0&&s.forEach(a=>{const c=e.querySelector(`.tooth-grid-letter-item[data-position="${r}"][data-value="${a}"]`);c&&c.classList.add("selected")})}),t.toothSurfaceMap&&(this.toothSurfaceMap={...t.toothSurfaceMap}),t.supernumeraryToothMap&&(this.supernumeraryToothMap={...t.supernumeraryToothMap}),t.finallyAdd)this.finallyAdd=t.finallyAdd;else{const r=e.querySelectorAll(".tooth-grid-number-item.selected"),s=e.querySelectorAll(".tooth-grid-letter-item.selected");if(r.length>0){const a=r[r.length-1];this.finallyAdd={position:a.dataset.position||"",value:a.dataset.value||""}}else if(s.length>0){const a=s[s.length-1];this.finallyAdd={position:a.dataset.position||"",value:a.dataset.value||""}}}this.updateExtraPanelSelection()}bindQuickButtons(){const t=this.inputModal;if(!t)return;t.querySelectorAll(".tooth-quick-btn").forEach(n=>{n.addEventListener("click",()=>{const i=n.dataset.action;if(i==="clear"){t.querySelectorAll(".tooth-grid-number-item.selected").forEach(a=>{a.classList.remove("selected")}),t.querySelectorAll(".tooth-grid-letter-item.selected").forEach(a=>{a.classList.remove("selected")}),t.querySelectorAll(".tooth-quick-btn.selected").forEach(a=>{a.classList.remove("selected")}),t.querySelectorAll(".tooth-grid-letter-row").forEach(a=>{a.classList.remove("hidden")}),t.querySelectorAll(".tooth-grid-number-row").forEach(a=>{a.classList.remove("hidden")}),this.finallyAdd=null,this.toothSurfaceMap={},this.supernumeraryToothMap={},t.querySelectorAll(".tooth-surface-item.selected").forEach(a=>{a.classList.remove("selected")}),t.querySelectorAll(".tooth-supernumerary-item.selected").forEach(a=>{a.classList.remove("selected")}),this.updatePreview();return}t.querySelectorAll(".tooth-quick-btn.selected").forEach(a=>{a.dataset.action!=="clear"&&a.classList.remove("selected")}),n.classList.add("selected"),t.querySelectorAll(".tooth-grid-number-item.selected").forEach(a=>{a.classList.remove("selected")}),t.querySelectorAll(".tooth-grid-letter-item.selected").forEach(a=>{a.classList.remove("selected")}),this.selectByAction(i||""),this.updateVisibilityAfterQuickSelect();const r=t.querySelectorAll(".tooth-grid-number-item.selected"),s=t.querySelectorAll(".tooth-grid-letter-item.selected");if(r.length>0){const a=r[r.length-1];this.finallyAdd={position:a.dataset.position||"",value:a.dataset.value||""}}else if(s.length>0){const a=s[s.length-1];this.finallyAdd={position:a.dataset.position||"",value:a.dataset.value||""}}this.updateExtraPanelSelection(),this.updatePreview()})})}selectByAction(t){const e=this.inputModal;if(!e)return;const n=r=>{r.forEach(s=>{for(let a=1;a<=8;a++){const c=e.querySelector(`.tooth-grid-number-item[data-position="${s}"][data-value="${a}"]`);c&&c.classList.add("selected")}})},i=r=>{const s=["A","B","C","D","E"];r.forEach(a=>{s.forEach(c=>{const d=e.querySelector(`.tooth-grid-letter-item[data-position="${a}"][data-value="${c}"]`);d&&d.classList.add("selected")})})};switch(t){case"allPermanent":n(["upperLeft","upperRight","lowerLeft","lowerRight"]);break;case"upperPermanent":n(["upperLeft","upperRight"]);break;case"lowerPermanent":n(["lowerLeft","lowerRight"]);break;case"upperLeftPermanent":n(["upperLeft"]);break;case"lowerLeftPermanent":n(["lowerLeft"]);break;case"upperRightPermanent":n(["upperRight"]);break;case"lowerRightPermanent":n(["lowerRight"]);break;case"allDeciduous":i(["upperLeftLetter","upperRightLetter","lowerLeftLetter","lowerRightLetter"]);break;case"upperDeciduous":i(["upperLeftLetter","upperRightLetter"]);break;case"lowerDeciduous":i(["lowerLeftLetter","lowerRightLetter"]);break;case"upperLeftDeciduous":i(["upperLeftLetter"]);break;case"lowerLeftDeciduous":i(["lowerLeftLetter"]);break;case"upperRightDeciduous":i(["upperRightLetter"]);break;case"lowerRightDeciduous":i(["lowerRightLetter"]);break}}updateVisibilityAfterQuickSelect(){const t=this.inputModal;if(!t)return;const e=t.querySelectorAll(".tooth-grid-number-item.selected"),n=t.querySelectorAll(".tooth-grid-letter-item.selected"),i=t.querySelectorAll(".tooth-grid-letter-row"),r=t.querySelectorAll(".tooth-grid-number-row");e.length>0&&n.length===0?(i.forEach(s=>s.classList.add("hidden")),r.forEach(s=>s.classList.remove("hidden"))):n.length>0&&e.length===0?(r.forEach(s=>s.classList.add("hidden")),i.forEach(s=>s.classList.remove("hidden"))):(i.forEach(s=>s.classList.remove("hidden")),r.forEach(s=>s.classList.remove("hidden")))}bindClickEvents(){const t=this.inputModal;if(!t)return;let e=null;const n=()=>{const a=t.querySelectorAll(".tooth-grid-number-item.selected"),c=t.querySelectorAll(".tooth-grid-letter-item.selected");return a.length>0&&c.length===0?"number":c.length>0&&a.length===0?"letter":a.length>0&&c.length>0?e:null},i=()=>{const a=t.querySelectorAll(".tooth-grid-letter-row"),c=t.querySelectorAll(".tooth-grid-number-row");e==="number"?(a.forEach(d=>d.classList.add("hidden")),c.forEach(d=>d.classList.remove("hidden"))):e==="letter"?(c.forEach(d=>d.classList.add("hidden")),a.forEach(d=>d.classList.remove("hidden"))):(a.forEach(d=>d.classList.remove("hidden")),c.forEach(d=>d.classList.remove("hidden")))};t.querySelectorAll(".tooth-grid-number-item").forEach(a=>{a.addEventListener("click",()=>{const c=a.dataset.position||"",d=a.dataset.value||"";if(a.classList.toggle("selected"),a.classList.contains("selected"))this.finallyAdd={position:c,value:d};else if(this.finallyAdd&&this.finallyAdd.position===c&&this.finallyAdd.value===d){const R=t.querySelectorAll(".tooth-grid-number-item.selected");if(R.length>0){const h=R[R.length-1];this.finallyAdd={position:h.dataset.position||"",value:h.dataset.value||""}}else this.finallyAdd=null}const u=n();u!==null?e=u:e=null,e==="number"&&t.querySelectorAll(".tooth-grid-letter-item.selected").forEach(h=>h.classList.remove("selected")),i(),this.updateExtraPanelSelection(),this.updatePreview()})}),t.querySelectorAll(".tooth-grid-letter-item").forEach(a=>{a.addEventListener("click",()=>{const c=a.dataset.position||"",d=a.dataset.value||"";if(a.classList.toggle("selected"),a.classList.contains("selected"))this.finallyAdd={position:c,value:d};else if(this.finallyAdd&&this.finallyAdd.position===c&&this.finallyAdd.value===d){const R=t.querySelectorAll(".tooth-grid-letter-item.selected");if(R.length>0){const h=R[R.length-1];this.finallyAdd={position:h.dataset.position||"",value:h.dataset.value||""}}else this.finallyAdd=null}const u=n();u!==null?e=u:e=null,e==="letter"&&t.querySelectorAll(".tooth-grid-number-item.selected").forEach(h=>h.classList.remove("selected")),i(),this.updateExtraPanelSelection(),this.updatePreview()})})}updatePreview(){const t=this.inputModal;if(!t)return;const e=this.collectData(t);this.drawPreview(e)}collectData(t){const e={upperLeft:[],upperRight:[],lowerLeft:[],lowerRight:[],upperLeftLetter:[],upperRightLetter:[],lowerLeftLetter:[],lowerRightLetter:[]};return["upperLeft","upperRight","lowerLeft","lowerRight"].forEach(r=>{t.querySelectorAll(`.tooth-grid-number-item[data-position="${r}"].selected`).forEach(a=>{const c=parseInt(a.dataset.value||"0");c>0&&e[r].push(c)})}),["upperLeftLetter","upperRightLetter","lowerLeftLetter","lowerRightLetter"].forEach(r=>{t.querySelectorAll(`.tooth-grid-letter-item[data-position="${r}"].selected`).forEach(a=>{const c=a.dataset.value;c&&e[r].push(c)})}),this.finallyAdd&&(e.finallyAdd=this.finallyAdd),Object.keys(this.toothSurfaceMap).length>0&&(e.toothSurfaceMap={...this.toothSurfaceMap}),Object.keys(this.supernumeraryToothMap).length>0&&(e.supernumeraryToothMap={...this.supernumeraryToothMap}),e}drawPreview(t){const e=this.inputModal?.querySelector(".tooth-preview-grid");if(!e)return;const n=(u,R)=>`${u}-${R}`,i=(u,R)=>{const h=n(u,R),g=this.toothSurfaceMap[h]||[],f=mr.filter(P=>g.includes(P)),T=this.supernumeraryToothMap[h],m=R.toString(),I=typeof R=="string"?"tooth-preview-tooth-value tooth-preview-tooth-value--deciduous":"tooth-preview-tooth-value",L=f.length>0?`<sup class="tooth-preview-surface">${f.join(",")}</sup>`:"";if(T){const P='<sup class="tooth-preview-supernumerary">S</sup>';return T==="Si"?`<span class="tooth-preview-tooth">
|
|
491
|
+
`,document.body.appendChild(this.inputModal),this.drawDividerLines(),this.initSelectedState(n),this.drawPreview(n),this.bindQuickButtons(),this.bindClickEvents(),this.bindExtraPanelEvents();const i=this.inputModal.querySelector(".tooth-position-modal__mask"),r=this.inputModal.querySelector(".tooth-position-modal__container"),s=this.inputModal.querySelector(".tooth-position-modal__close"),a=this.inputModal.querySelector(".btn-cancel"),c=this.inputModal.querySelector(".btn-confirm"),d=()=>{this.clearToothPositionEditor()};r.addEventListener("click",u=>{u.stopPropagation()}),i.addEventListener("click",d),s.addEventListener("click",d),a.addEventListener("click",d),c.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation();const R=this.inputModal;if(!R)return;const h=this.collectData(R);this.clearToothPositionEditor();const g=this.draw.getElementList(),f=e.index;this.draw.spliceElementList(g,f,1);const T={type:"toothPosition",value:"",toothPositionData:h};this.draw.spliceElementList(g,f,0,[T]),this.draw.getControl().destroyControl(),this.draw.getRange().clearRange(),this.draw.render({isSetCursor:!1,isCompute:!0})})}drawDividerLines(){const t=this.inputModal?.querySelector(".tooth-divider-canvas-h");if(t){const n=t.getContext("2d");n&&(n.strokeStyle="#000",n.lineWidth=2,n.beginPath(),n.moveTo(0,1),n.lineTo(900,1),n.stroke())}const e=this.inputModal?.querySelector(".tooth-divider-canvas-v");if(e){const n=e.getContext("2d");n&&(n.strokeStyle="#000",n.lineWidth=2,n.beginPath(),n.moveTo(1,0),n.lineTo(1,110),n.stroke())}}initSelectedState(t){if(!t)return;const e=this.inputModal;if(!e)return;if(["upperLeft","upperRight","lowerLeft","lowerRight"].forEach(r=>{const s=t[r];s&&s.length>0&&s.forEach(a=>{const c=e.querySelector(`.tooth-grid-number-item[data-position="${r}"][data-value="${a}"]`);c&&c.classList.add("selected")})}),["upperLeftLetter","upperRightLetter","lowerLeftLetter","lowerRightLetter"].forEach(r=>{const s=t[r];s&&s.length>0&&s.forEach(a=>{const c=e.querySelector(`.tooth-grid-letter-item[data-position="${r}"][data-value="${a}"]`);c&&c.classList.add("selected")})}),t.toothSurfaceMap&&(this.toothSurfaceMap={...t.toothSurfaceMap}),t.supernumeraryToothMap&&(this.supernumeraryToothMap={...t.supernumeraryToothMap}),t.finallyAdd)this.finallyAdd=t.finallyAdd;else{const r=e.querySelectorAll(".tooth-grid-number-item.selected"),s=e.querySelectorAll(".tooth-grid-letter-item.selected");if(r.length>0){const a=r[r.length-1];this.finallyAdd={position:a.dataset.position||"",value:a.dataset.value||""}}else if(s.length>0){const a=s[s.length-1];this.finallyAdd={position:a.dataset.position||"",value:a.dataset.value||""}}}this.updateExtraPanelSelection()}bindQuickButtons(){const t=this.inputModal;if(!t)return;t.querySelectorAll(".tooth-quick-btn").forEach(n=>{n.addEventListener("click",()=>{const i=n.dataset.action;if(i==="clear"){t.querySelectorAll(".tooth-grid-number-item.selected").forEach(a=>{a.classList.remove("selected")}),t.querySelectorAll(".tooth-grid-letter-item.selected").forEach(a=>{a.classList.remove("selected")}),t.querySelectorAll(".tooth-quick-btn.selected").forEach(a=>{a.classList.remove("selected")}),t.querySelectorAll(".tooth-grid-letter-row").forEach(a=>{a.classList.remove("hidden")}),t.querySelectorAll(".tooth-grid-number-row").forEach(a=>{a.classList.remove("hidden")}),this.finallyAdd=null,this.toothSurfaceMap={},this.supernumeraryToothMap={},t.querySelectorAll(".tooth-surface-item.selected").forEach(a=>{a.classList.remove("selected")}),t.querySelectorAll(".tooth-supernumerary-item.selected").forEach(a=>{a.classList.remove("selected")}),this.updatePreview();return}t.querySelectorAll(".tooth-quick-btn.selected").forEach(a=>{a.dataset.action!=="clear"&&a.classList.remove("selected")}),n.classList.add("selected"),t.querySelectorAll(".tooth-grid-number-item.selected").forEach(a=>{a.classList.remove("selected")}),t.querySelectorAll(".tooth-grid-letter-item.selected").forEach(a=>{a.classList.remove("selected")}),this.selectByAction(i||""),this.updateVisibilityAfterQuickSelect();const r=t.querySelectorAll(".tooth-grid-number-item.selected"),s=t.querySelectorAll(".tooth-grid-letter-item.selected");if(r.length>0){const a=r[r.length-1];this.finallyAdd={position:a.dataset.position||"",value:a.dataset.value||""}}else if(s.length>0){const a=s[s.length-1];this.finallyAdd={position:a.dataset.position||"",value:a.dataset.value||""}}this.updateExtraPanelSelection(),this.updatePreview()})})}selectByAction(t){const e=this.inputModal;if(!e)return;const n=r=>{r.forEach(s=>{for(let a=1;a<=8;a++){const c=e.querySelector(`.tooth-grid-number-item[data-position="${s}"][data-value="${a}"]`);c&&c.classList.add("selected")}})},i=r=>{const s=["A","B","C","D","E"];r.forEach(a=>{s.forEach(c=>{const d=e.querySelector(`.tooth-grid-letter-item[data-position="${a}"][data-value="${c}"]`);d&&d.classList.add("selected")})})};switch(t){case"allPermanent":n(["upperLeft","upperRight","lowerLeft","lowerRight"]);break;case"upperPermanent":n(["upperLeft","upperRight"]);break;case"lowerPermanent":n(["lowerLeft","lowerRight"]);break;case"upperLeftPermanent":n(["upperLeft"]);break;case"lowerLeftPermanent":n(["lowerLeft"]);break;case"upperRightPermanent":n(["upperRight"]);break;case"lowerRightPermanent":n(["lowerRight"]);break;case"allDeciduous":i(["upperLeftLetter","upperRightLetter","lowerLeftLetter","lowerRightLetter"]);break;case"upperDeciduous":i(["upperLeftLetter","upperRightLetter"]);break;case"lowerDeciduous":i(["lowerLeftLetter","lowerRightLetter"]);break;case"upperLeftDeciduous":i(["upperLeftLetter"]);break;case"lowerLeftDeciduous":i(["lowerLeftLetter"]);break;case"upperRightDeciduous":i(["upperRightLetter"]);break;case"lowerRightDeciduous":i(["lowerRightLetter"]);break}}updateVisibilityAfterQuickSelect(){const t=this.inputModal;if(!t)return;const e=t.querySelectorAll(".tooth-grid-number-item.selected"),n=t.querySelectorAll(".tooth-grid-letter-item.selected"),i=t.querySelectorAll(".tooth-grid-letter-row"),r=t.querySelectorAll(".tooth-grid-number-row");e.length>0&&n.length===0?(i.forEach(s=>s.classList.add("hidden")),r.forEach(s=>s.classList.remove("hidden"))):n.length>0&&e.length===0?(r.forEach(s=>s.classList.add("hidden")),i.forEach(s=>s.classList.remove("hidden"))):(i.forEach(s=>s.classList.remove("hidden")),r.forEach(s=>s.classList.remove("hidden")))}bindClickEvents(){const t=this.inputModal;if(!t)return;let e=null;const n=()=>{const a=t.querySelectorAll(".tooth-grid-number-item.selected"),c=t.querySelectorAll(".tooth-grid-letter-item.selected");return a.length>0&&c.length===0?"number":c.length>0&&a.length===0?"letter":a.length>0&&c.length>0?e:null},i=()=>{const a=t.querySelectorAll(".tooth-grid-letter-row"),c=t.querySelectorAll(".tooth-grid-number-row");e==="number"?(a.forEach(d=>d.classList.add("hidden")),c.forEach(d=>d.classList.remove("hidden"))):e==="letter"?(c.forEach(d=>d.classList.add("hidden")),a.forEach(d=>d.classList.remove("hidden"))):(a.forEach(d=>d.classList.remove("hidden")),c.forEach(d=>d.classList.remove("hidden")))};t.querySelectorAll(".tooth-grid-number-item").forEach(a=>{a.addEventListener("click",()=>{const c=a.dataset.position||"",d=a.dataset.value||"";if(a.classList.toggle("selected"),a.classList.contains("selected"))this.finallyAdd={position:c,value:d};else if(this.finallyAdd&&this.finallyAdd.position===c&&this.finallyAdd.value===d){const R=t.querySelectorAll(".tooth-grid-number-item.selected");if(R.length>0){const h=R[R.length-1];this.finallyAdd={position:h.dataset.position||"",value:h.dataset.value||""}}else this.finallyAdd=null}const u=n();u!==null?e=u:e=null,e==="number"&&t.querySelectorAll(".tooth-grid-letter-item.selected").forEach(h=>h.classList.remove("selected")),i(),this.updateExtraPanelSelection(),this.updatePreview()})}),t.querySelectorAll(".tooth-grid-letter-item").forEach(a=>{a.addEventListener("click",()=>{const c=a.dataset.position||"",d=a.dataset.value||"";if(a.classList.toggle("selected"),a.classList.contains("selected"))this.finallyAdd={position:c,value:d};else if(this.finallyAdd&&this.finallyAdd.position===c&&this.finallyAdd.value===d){const R=t.querySelectorAll(".tooth-grid-letter-item.selected");if(R.length>0){const h=R[R.length-1];this.finallyAdd={position:h.dataset.position||"",value:h.dataset.value||""}}else this.finallyAdd=null}const u=n();u!==null?e=u:e=null,e==="letter"&&t.querySelectorAll(".tooth-grid-number-item.selected").forEach(h=>h.classList.remove("selected")),i(),this.updateExtraPanelSelection(),this.updatePreview()})})}updatePreview(){const t=this.inputModal;if(!t)return;const e=this.collectData(t);this.drawPreview(e)}collectData(t){const e={upperLeft:[],upperRight:[],lowerLeft:[],lowerRight:[],upperLeftLetter:[],upperRightLetter:[],lowerLeftLetter:[],lowerRightLetter:[]};return["upperLeft","upperRight","lowerLeft","lowerRight"].forEach(r=>{t.querySelectorAll(`.tooth-grid-number-item[data-position="${r}"].selected`).forEach(a=>{const c=parseInt(a.dataset.value||"0");c>0&&e[r].push(c)})}),["upperLeftLetter","upperRightLetter","lowerLeftLetter","lowerRightLetter"].forEach(r=>{t.querySelectorAll(`.tooth-grid-letter-item[data-position="${r}"].selected`).forEach(a=>{const c=a.dataset.value;c&&e[r].push(c)})}),this.finallyAdd&&(e.finallyAdd=this.finallyAdd),Object.keys(this.toothSurfaceMap).length>0&&(e.toothSurfaceMap={...this.toothSurfaceMap}),Object.keys(this.supernumeraryToothMap).length>0&&(e.supernumeraryToothMap={...this.supernumeraryToothMap}),e}drawPreview(t){const e=this.inputModal?.querySelector(".tooth-preview-grid");if(!e)return;const n=(u,R)=>`${u}-${R}`,i=(u,R)=>{const h=n(u,R),g=this.toothSurfaceMap[h]||[],f=Lr.filter(P=>g.includes(P)),T=this.supernumeraryToothMap[h],m=R.toString(),I=typeof R=="string"?"tooth-preview-tooth-value tooth-preview-tooth-value--deciduous":"tooth-preview-tooth-value",L=f.length>0?`<sup class="tooth-preview-surface">${f.join(",")}</sup>`:"";if(T){const P='<sup class="tooth-preview-supernumerary">S</sup>';return T==="Si"?`<span class="tooth-preview-tooth">
|
|
492
492
|
<span class="tooth-preview-tooth-bracket">(</span>
|
|
493
493
|
${P}
|
|
494
494
|
<span class="${I}">${m}</span>
|
|
@@ -503,9 +503,9 @@ ${R} `}textToElements(t){const e=[],n=t.split(`
|
|
|
503
503
|
</span>`}else return`<span class="tooth-preview-tooth">
|
|
504
504
|
<span class="${I}">${m}</span>
|
|
505
505
|
${L}
|
|
506
|
-
</span>`},r=(u,R,h)=>{const g=[];return R.forEach(f=>{g.push(i(h,f))}),u.forEach(f=>{g.push(i(h,f))}),g.join(" ")},s=e.querySelector(".tooth-preview-upper-left"),a=e.querySelector(".tooth-preview-upper-right"),c=e.querySelector(".tooth-preview-lower-left"),d=e.querySelector(".tooth-preview-lower-right");s&&(s.innerHTML=r(t?.upperLeft||[],t?.upperLeftLetter||[],"upperLeft")),a&&(a.innerHTML=r(t?.upperRight||[],t?.upperRightLetter||[],"upperRight")),c&&(c.innerHTML=r(t?.lowerLeft||[],t?.lowerLeftLetter||[],"lowerLeft")),d&&(d.innerHTML=r(t?.lowerRight||[],t?.lowerRightLetter||[],"lowerRight"))}bindExtraPanelEvents(){const t=this.inputModal;if(!t)return;t.querySelectorAll(".tooth-surface-item").forEach(i=>{i.addEventListener("click",()=>{if(!this.finallyAdd)return;const r=i.dataset.surface;if(!r)return;const s=`${this.finallyAdd.position}-${this.finallyAdd.value}`;this.toothSurfaceMap[s]||(this.toothSurfaceMap[s]=[]);const a=this.toothSurfaceMap[s],c=a.indexOf(r);c>-1?(a.splice(c,1),i.classList.remove("selected")):(a.push(r),i.classList.add("selected")),this.updatePreview()})}),t.querySelectorAll(".tooth-supernumerary-item").forEach(i=>{i.addEventListener("click",()=>{if(!this.finallyAdd)return;const r=i.dataset.supernumerary;if(!r)return;const s=`${this.finallyAdd.position}-${this.finallyAdd.value}`;this.supernumeraryToothMap[s]===r?(delete this.supernumeraryToothMap[s],i.classList.remove("selected")):(t.querySelectorAll(".tooth-supernumerary-item").forEach(a=>a.classList.remove("selected")),this.supernumeraryToothMap[s]=r,i.classList.add("selected")),this.updatePreview()})}),this.updateExtraPanelSelection()}updateExtraPanelSelection(){const t=this.inputModal;if(!t||!this.finallyAdd)return;const e=`${this.finallyAdd.position}-${this.finallyAdd.value}`,n=this.toothSurfaceMap[e]||[];t.querySelectorAll(".tooth-surface-item").forEach(r=>{const s=r.dataset.surface;n.includes(s||"")?r.classList.add("selected"):r.classList.remove("selected")});const i=this.supernumeraryToothMap[e];t.querySelectorAll(".tooth-supernumerary-item").forEach(r=>{r.dataset.supernumerary===i?r.classList.add("selected"):r.classList.remove("selected")})}}const
|
|
507
|
-
`,
|
|
508
|
-
`,Or=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",Mr],{type:"text/javascript;charset=utf-8"});function Wh(o){let t;try{if(t=Or&&(self.URL||self.webkitURL).createObjectURL(Or),!t)throw"";const e=new Worker(t,{name:o?.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),e}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Mr),{name:o?.name})}}const Cr='(function(){"use strict";var F=(e=>(e.HALF="half",e.ONE_THIRD="one-third",e.QUARTER="quarter",e))(F||{}),M=(e=>(e.ARABIC="arabic",e.CHINESE="chinese",e))(M||{});const K="";F.HALF+"",1/2,F.ONE_THIRD+"",1/3,F.QUARTER+"",1/4;function H(e){if(typeof structuredClone=="function")return structuredClone(e);if(!e||typeof e!="object")return e;let I={};return Array.isArray(e)?I=e.map(f=>H(f)):Object.keys(e).forEach(f=>{I[f]=H(e[f])}),I}function D(e,I){const f={};for(const L in e)I.includes(L)&&(f[L]=e[L]);return f}function ee(e,I){return e.length!==I.length?!1:!e.some(f=>!I.includes(f))}var o=(e=>(e.TEXT="text",e.TEXTFIELD="TextField",e.BUTTON="button",e.IMAGE="image",e.TABLE="table",e.HYPERLINK="hyperlink",e.SUPERSCRIPT="superscript",e.SUBSCRIPT="subscript",e.SEPARATOR="separator",e.PAGE_BREAK="pageBreak",e.CONTROL="control",e.AREA="area",e.CHECKBOX="checkbox",e.RADIO="radio",e.LATEX="latex",e.TAB="tab",e.DATE="date",e.BLOCK="block",e.TITLE="title",e.LIST="list",e.SPLIT_TAG="splitTag",e.LABEL="label",e.MENSTRUAL_HISTORY="menstrualHistory",e.FETAL_HEART_POSITION="fetalHeartPosition",e.TOOTH_POSITION="toothPosition",e.SPECIAL_SYMBOLS="specialSymbols",e.MACRO="macro",e.CUSTOM_MACRO="customMacro",e.REUSABLE_ITEM="reusableItem",e.SUB_TEMPLATE="subTemplate",e))(o||{});const y=["rowFlex","rowMargin"],te=["type","font","size","bold","color","italic","highlight","underline","strikeout","rowFlex","rowMargin","dashArray","trList","tdPadding","tableToolDisabled","borderType","borderColor","borderWidth","borderExternalWidth","translateX","width","height","url","colgroup","valueList","control","checkbox","radio","dateFormat","block","level","title","listType","listStyle","listWrap","groupIds","conceptId","imgDisplay","imgFloatPosition","imgToolDisabled","imgPreviewDisabled","imgCrop","imgCaption","textDecoration","extension","externalId","areaId","area","hide","label","labelId","lineWidth","deletePerson","newElEditPerson","deleteTime","newElEditTime","dictCode","macroConfig","menstrualData","menstrualHistoryId","fetalHeartData","fetalHeartPositionId","toothPositionData","toothPositionId","reusableItemConfig","templateId","subTemplateContent","subTemplateRelation","subTemplateConditions","subTemplateExpanded"],oe=["conceptId","extension","externalId","verticalAlign","backgroundColor","borderTypes","slashTypes","disabled","deletable"],w=["font","size","bold","highlight","italic","strikeout","deletePerson","newElEditPerson","deleteTime","color","newElEditTime"];o.TEXT,o.HYPERLINK,o.SUBSCRIPT,o.SUPERSCRIPT,o.CONTROL,o.DATE,o.IMAGE,o.LATEX,o.BLOCK,o.PAGE_BREAK,o.SEPARATOR,o.TABLE,o.TITLE,o.LIST;var Y=(e=>(e.UL="ul",e.OL="ol",e))(Y||{}),k=(e=>(e.DISC="disc",e.CIRCLE="circle",e.SQUARE="square",e.CHECKBOX="checkbox",e))(k||{}),_=(e=>(e.DISC="disc",e.CIRCLE="circle",e.SQUARE="square",e.DECIMAL="decimal",e.CHECKBOX="checkbox",e))(_||{});k.DISC+"",k.CIRCLE+"",k.SQUARE+"",k.CHECKBOX+"",Y.OL+"",Y.UL+"",_.DISC+"",_.CIRCLE+"",_.SQUARE+"",_.DECIMAL+"",_.CHECKBOX+"";var R=(e=>(e.FIRST="first",e.SECOND="second",e.THIRD="third",e.FOURTH="fourth",e.FIFTH="fifth",e.SIXTH="sixth",e))(R||{});R.FIRST+"",R.SECOND+"",R.THIRD+"",R.FOURTH+"",R.FIFTH+"",R.SIXTH+"",R.FIRST+"",R.SECOND+"",R.THIRD+"",R.FOURTH+"",R.FIFTH+"",R.SIXTH+"",R.FIRST,R.SECOND,R.THIRD,R.FOURTH,R.FIFTH,R.SIXTH;var v=(e=>(e.TEXT="text",e.SELECT="select",e.CHECKBOX="checkbox",e.RADIO="radio",e.DATE="date",e.NUMBER="number",e.TEXTFIELD="TextField",e.BUTTON="button",e.MENSTRUAL_HISTORY="menstrualHistory",e))(v||{}),c=(e=>(e.PREFIX="prefix",e.POSTFIX="postfix",e.PRE_TEXT="preText",e.PRETEXTFIX="preTextFix",e.PRETEXTFIX_TEXT="preTextFixText",e.POSTTEXTFIX="postTextFix",e.POSTTEXTFIX_TEXT="postTextFixText",e.POST_TEXT="postText",e.PLACEHOLDER="placeholder",e.TEXTFIXLABEL="textFixLabel",e.VALUE="value",e.DELETEPERSON="deletePerson",e.CHECKBOX="checkbox",e.RADIO="radio",e.UNDERLINE="underline",e))(c||{}),Q=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e.ALIGNMENT="alignment",e.JUSTIFY="justify",e))(Q||{}),q=(e=>(e.CONTAIN="contain",e.COVER="cover",e))(q||{}),W=(e=>(e.REPEAT="repeat",e.NO_REPEAT="no-repeat",e.REPEAT_X="repeat-x",e.REPEAT_Y="repeat-y",e))(W||{});q.COVER,W.NO_REPEAT;var z=(e=>(e.TOP="top",e.MIDDLE="middle",e.BOTTOM="bottom",e))(z||{});z.BOTTOM,F.HALF,F.HALF,Q.CENTER,M.ARABIC,z.BOTTOM;var Z=(e=>(e.TEXT="text",e.IMAGE="image",e))(Z||{});Z.TEXT,M.ARABIC;var j=(e=>(e.PAGE="page",e.CONTINUITY="continuity",e))(j||{});j.CONTINUITY;function ne(e,I){const f=Object.keys(e),L=Object.keys(I);if(f.length!==L.length)return!1;for(let S=0;S<f.length;S++){const C=f[S];if(C!=="value"&&!(C==="groupIds"&&Array.isArray(e[C])&&Array.isArray(I[C])&&ee(e[C],I[C]))&&e[C]!==I[C])return!1}return!0}function N(e,I={}){const{extraPickAttrs:f}=I,L=[...te];f&&L.push(...f);const S={value:e?.value===K?`\n`:e?.value};return e&&L.forEach(C=>{const T=e[C];T!==void 0&&(S[C]=T)}),S}function P(e,I={}){const{extraPickAttrs:f,isClassifyArea:L=!1,isClone:S=!0,editorOptions:C}=I,T=(S?H(e):e).filter(t=>t.type!==o.SPLIT_TAG),B=[];let l=0;for(;l<T.length;){let t=T[l];if(l===0&&t.value===K&&!t.listId&&(!t.type||t.type===o.TEXT)){l++;continue}if(t.areaId){const r=t.areaId,O=t.area,E=[];for(;l<T.length;){const i=T[l];if(r!==i.areaId){l--;break}delete i.area,delete i.areaId,E.push(i),l++}const a=P(E,I);if(L){const i={type:o.AREA,value:"",areaId:r,area:O};i.valueList=a,t=i}else{B.splice(l,0,...a);continue}}else if(t.titleId&&t.level){const r=t.titleId;if(r){const O=t.level,E={type:o.TITLE,title:t.title,titleId:r,value:"",level:O},a=[];for(;l<T.length;){const i=T[l];if(r!==i.titleId){l--;break}delete i.level,delete i.title,a.push(i),l++}E.valueList=P(a,I),t=E}}else if(t.listId&&t.listType){const r=t.listId;if(r){const O=t.listType,E=t.listStyle,a=t?.label,i={type:o.LIST,value:"",label:a||"",listId:r,listType:O,listStyle:E},d=[];for(;l<T.length;){const s=T[l];if(r!==s.listId){l--;break}delete s.listType,delete s.listStyle,d.push(s),l++}i.valueList=P(d,I),t=i}}else if(t.type===o.TABLE){if(t.pagingId){let r=l+1,O=0;for(;r<T.length;){const E=T[r];if(E.pagingId===t.pagingId){t.height+=E.height;const a=E.trList.filter(i=>!i.pagingRepeat).filter(i=>(i.tdList=i.tdList.filter(d=>{if(d.originalId){for(let s=0;s<t.trList.length;s++){const u=t.trList[s].tdList.find(({id:n})=>n===d.originalId);if(u){d.value[0]?.type===o.SPLIT_TAG&&d.value.splice(0,1),u.value.push(...d.value),u.rowspan=u.originalRowspan??u.rowspan;break}}return!1}return!0}),!i.originalId));t.trList.push(...a),t.trList?.forEach(i=>i.minHeight=i.originalMinHeight??i.minHeight),r++,O++}else break}l+=O}if(t.trList)for(let r=0;r<t.trList.length;r++){const O=t.trList[r];delete O.id;for(let E=0;E<O.tdList.length;E++){const a=O.tdList[E],i={colspan:a.colspan,rowspan:a.rowspan,value:P(a.value,{...I,isClassifyArea:!1})};oe.forEach(d=>{const s=a[d];s!==void 0&&(i[d]=s)}),O.tdList[E]=i}}}else if(t.type===o.HYPERLINK){const r=t.hyperlinkId;if(r){const O={type:o.HYPERLINK,value:"",url:t.url},E=[];for(;l<T.length;){const a=T[l];if(r!==a.hyperlinkId){l--;break}delete a.type,delete a.url,E.push(a),l++}O.valueList=P(E,I),t=O}}else if(t.type===o.DATE){const r=t.dateId;if(r){const O={type:o.DATE,value:"",dateFormat:t.dateFormat},E=[];for(;l<T.length;){const a=T[l];if(r!==a.dateId){l--;break}delete a.type,delete a.dateFormat,E.push(a),l++}O.valueList=P(E,I),t=O}}else if(t.type!==o.BUTTON){if(t.controlId){const r=t.controlId;if(!(t.controlComponent===c.PREFIX||t.controlComponent===c.PRETEXTFIX||t.controlComponent===c.PRETEXTFIX_TEXT)&&t.controlComponent===c.VALUE){if(t.type===o.MENSTRUAL_HISTORY||t.type===o.FETAL_HEART_POSITION||t.type===o.TOOTH_POSITION||t.type===o.MACRO||t.type===o.CUSTOM_MACRO||t.type===o.REUSABLE_ITEM||t.type===o.LIST||t.type===o.SPECIAL_SYMBOLS){let d=!1;for(let s=l-1;s>=0;s--){const p=T[s],u=p.controlComponent===c.PREFIX||p.controlComponent===c.PRETEXTFIX||p.controlComponent===c.PRETEXTFIX_TEXT;if(p.controlId===r&&u){d=!0;break}if(p.controlId!==r)break}if(!d){const s=H(t);delete s.controlId,delete s.control,delete s.controlComponent,delete s.originControlId,B.push(s),l++;continue}}l++;continue}if(t.controlComponent===c.PLACEHOLDER||t.controlComponent===c.POSTFIX||t.controlComponent===c.POSTTEXTFIX||t.controlComponent===c.POSTTEXTFIX_TEXT||t.controlComponent===c.POST_TEXT||t.controlComponent===c.PRE_TEXT||t.controlComponent===c.CHECKBOX||t.controlComponent===c.RADIO){l++;continue}const E=(i,d,s,p)=>{if(p===v.CHECKBOX||p===v.RADIO){let n=-1;for(let g=i;g<T.length&&T[g].controlId===d;g++)n=g;return n}const u=s?[c.POSTTEXTFIX,c.POSTTEXTFIX_TEXT]:[c.POSTFIX];for(let n=i;n<T.length;n++){const g=T[n];if(g.controlId===d&&u.includes(g.controlComponent))return n}return-1},a=(i,d,s)=>{const p=[];let u=i;for(;u<=d;){const n=T[u];if(n.controlId&&n.controlId!==s&&n.control){const A=n.control?.type,b=A===v.TEXTFIELD,h=b?c.PRETEXTFIX:c.PREFIX,x=n.controlComponent===h,m=A===v.CHECKBOX||A===v.RADIO;if(x||m&&(n.controlComponent===c.CHECKBOX||n.controlComponent===c.RADIO)){const X=E(u+1,n.controlId,b,A);if(X!==-1){const V=T.slice(u,X+1).map(le=>{const $=H(le);return delete $.originControlId,$}),U=P(V,I);U.length>0&&p.push(U[0]),u=X+1;continue}}}if(!(n.controlId===s&&(n.controlComponent===c.VALUE||!n.controlComponent)&&(!n.originControlId||n.originControlId===s)||n.originControlId===s&&n.controlComponent===c.VALUE||n.controlId===s&&(n.controlComponent===c.CHECKBOX||n.controlComponent===c.RADIO)&&!n.originControlId)){u++;continue}if(n.type===o.MENSTRUAL_HISTORY||n.type===o.FETAL_HEART_POSITION||n.type===o.TOOTH_POSITION||n.type===o.MACRO||n.type===o.CUSTOM_MACRO||n.type===o.REUSABLE_ITEM||n.type===o.LIST||n.type===o.SPECIAL_SYMBOLS){const A=H(n);delete A.controlId,delete A.control,delete A.controlComponent,delete A.originControlId,p.push(A),u++;continue}if(n.controlComponent===c.CHECKBOX||n.controlComponent===c.RADIO){p.push(H(n)),u++;continue}const J=t.control?.type;if(J===v.CHECKBOX||J===v.RADIO){let A=u-1,b=!1;for(;A>=i-1;){const h=T[A];if(h.controlId===s&&!h.originControlId)if(h.controlComponent===c.CHECKBOX){b=h.checkbox?.value===!0;break}else if(h.controlComponent===c.RADIO){b=h.radio?.value===!0;break}else if(h.controlComponent===c.VALUE){A--;continue}else break;A--}if(b){const h={value:n.value||""},x=[...y,"color","bold","italic","underline","strikeout","size","font","highlight","textDecoration"];for(const m of x){const X=n[m];if(X!==void 0){if(m==="color"&&C){const V=C.control?.bracketColor,U=C.control?.placeholderColor;if(X===V||X===U)continue}h[m]=X}}p.push(h)}}else{const A={value:n.value||""},b=[...y,"color","bold","italic","underline","strikeout","size","font","highlight","textDecoration"];for(const h of b){const x=n[h];if(x!==void 0){if(h==="color"&&C){const m=C.control?.bracketColor,X=C.control?.placeholderColor;if(x===m||x===X)continue}A[h]=x}}p.push(A)}u++}return p};if(t.controlComponent===c.PREFIX){const i=t.control?.type===v.TEXTFIELD,d=E(l+1,r,i);if(d!==-1){const s=a(l+1,d-1,r),p=D(t,w),u={...t.control,...p,value:s},n={...D(t,y),type:o.CONTROL,value:"",control:u,controlId:r};t=N(n,{extraPickAttrs:f}),l=d}}if(t.controlComponent===c.PRETEXTFIX){const i=E(l+1,r,!0);if(i!==-1){const d=a(l+1,i-1,r),s=D(t,w),p={...t.control,...s,value:d},u={...D(t,y),type:o.CONTROL,value:"",control:p,controlId:r};t=N(u,{extraPickAttrs:f}),l=i}}if(t.controlComponent===c.PRETEXTFIX_TEXT){const i=E(l+1,r,!0);if(i!==-1){const d=a(l+1,i-1,r),s=D(t,w),p={...t.control,...s,value:d},u={...D(t,y),type:o.CONTROL,value:"",control:p,controlId:r};t=N(u,{extraPickAttrs:f}),l=i}}}}const G=N(t,{extraPickAttrs:f});if(!t.type||t.type===o.TEXT||t.type===o.SUBSCRIPT||t.type===o.SUPERSCRIPT)for(;l<T.length;){const r=T[l+1];if(l++,r&&ne(G,N(r,{extraPickAttrs:f}))){const O=r.value===K?`\n`:r.value;G.value+=O}else break}else l++;B.push(G)}return B}onmessage=e=>{const I=e.data,{options:f,data:L}=I,{extraPickAttrs:S=[]}=f||{},C={header:P(L.header,{extraPickAttrs:S,isClone:!1}),main:P(L.main,{extraPickAttrs:S,isClassifyArea:!0,isClone:!1}),footer:P(L.footer,{extraPickAttrs:S,isClone:!1})};postMessage(C)}})();\n',Sr=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",Cr],{type:"text/javascript;charset=utf-8"});function Vh(o){let t;try{if(t=Sr&&(self.URL||self.webkitURL).createObjectURL(Sr),!t)throw"";const e=new Worker(t,{name:o?.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),e}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Cr),{name:o?.name})}}class Yh{draw;wordCountWorker;catalogWorker;groupWorker;valueWorker;constructor(t){this.draw=t,this.wordCountWorker=new yh,this.catalogWorker=new bh,this.groupWorker=new Wh,this.valueWorker=new Vh}getWordCount(){return new Promise((t,e)=>{this.wordCountWorker.onmessage=i=>{t(i.data)},this.wordCountWorker.onerror=i=>{e(i)};const n=this.draw.getOriginalMainElementList();this.wordCountWorker.postMessage(n)})}getCatalog(){return new Promise((t,e)=>{this.catalogWorker.onmessage=r=>{t(r.data)},this.catalogWorker.onerror=r=>{e(r)};const n=this.draw.getOriginalMainElementList(),i=this.draw.getPosition().getOriginalMainPositionList();this.catalogWorker.postMessage({elementList:n,positionList:i})})}getGroupIds(){return new Promise((t,e)=>{this.groupWorker.onmessage=i=>{t(i.data)},this.groupWorker.onerror=i=>{e(i)};const n=this.draw.getOriginalMainElementList();this.groupWorker.postMessage(n)})}getValue(t){return new Promise((e,n)=>{this.valueWorker.onmessage=i=>{e({version:ve,data:i.data,options:at(this.draw.getOptions())})},this.valueWorker.onerror=i=>{n(i)},this.valueWorker.postMessage({data:this.draw.getOriginValue(t),options:t})})}}class Dh{container;canvas;draw;options;curElement;curElementSrc;previewerDrawOption;curPosition;eventBus;imageList;curShowElement;imageCount;imagePre;imageNext;resizerSelection;resizerHandleList;resizerImageContainer;resizerImage;resizerSize;width;height;mousedownX;mousedownY;curHandleIndex;previewerContainer;previewerImage;constructor(t){this.container=t.getContainer(),this.canvas=t.getPage(),this.draw=t,this.options=t.getOptions(),this.curElement=null,this.curElementSrc="",this.previewerDrawOption={},this.curPosition=null,this.eventBus=t.getEventBus(),this.imageList=[],this.curShowElement=null,this.imageCount=null,this.imagePre=null,this.imageNext=null;const{resizerSelection:e,resizerHandleList:n,resizerImageContainer:i,resizerImage:r,resizerSize:s}=this._createResizerDom();this.resizerSelection=e,this.resizerHandleList=n,this.resizerImageContainer=i,this.resizerImage=r,this.resizerSize=s,this.width=0,this.height=0,this.mousedownX=0,this.mousedownY=0,this.curHandleIndex=0,this.previewerContainer=null,this.previewerImage=null}_getElementPosition(t,e=null){const{scale:n}=this.options;let i=0,r=0;const s=this.draw.getHeight(),a=this.draw.getPageGap(),d=(e?.pageNo??this.draw.getPageNo())*(s+a);if(t.imgFloatPosition)i=t.imgFloatPosition.x*n,r=t.imgFloatPosition.y*n+d;else if(e){const{coordinate:{leftTop:[u,R]},ascent:h}=e;i=u,r=R+d+h}return{x:i,y:r}}_createResizerDom(){const{scale:t}=this.options,e=document.createElement("div");e.classList.add(`${z}-resizer-selection`),e.style.display="none",e.style.borderColor=this.options.resizerColor,e.style.borderWidth=`${t}px`;const n=[];for(let c=0;c<8;c++){const d=document.createElement("div");d.style.background=this.options.resizerColor,d.classList.add("resizer-handle"),d.classList.add(`handle-${c}`),d.setAttribute("data-index",String(c)),d.onmousedown=this._mousedown.bind(this),e.append(d),n.push(d)}this.container.append(e);const i=document.createElement("div");i.classList.add(`${z}-resizer-size-view`);const r=document.createElement("span");i.append(r),e.append(i);const s=document.createElement("div");s.classList.add(`${z}-resizer-image`),s.style.display="none";const a=document.createElement("img");return s.append(a),this.container.append(s),{resizerSelection:e,resizerHandleList:n,resizerImageContainer:s,resizerImage:a,resizerSize:r}}_keydown=()=>{this.resizerSelection.style.display==="block"&&(this.clearResizer(),document.removeEventListener("keydown",this._keydown))};_mousedown(t){if(this.canvas=this.draw.getPage(),!this.curElement)return;const{scale:e}=this.options;this.mousedownX=t.x,this.mousedownY=t.y;const n=t.target;this.curHandleIndex=Number(n.dataset.index);const i=window.getComputedStyle(n).cursor;document.body.style.cursor=i,this.canvas.style.cursor=i,this.resizerImage.src=this.curElementSrc,this.resizerImageContainer.style.display="block";const{x:r,y:s}=this._getElementPosition(this.curElement,this.curPosition);this.resizerImageContainer.style.left=`${r}px`,this.resizerImageContainer.style.top=`${s}px`,this.resizerImage.style.width=`${this.curElement.width*e}px`,this.resizerImage.style.height=`${this.curElement.height*e}px`;const a=this._mousemove.bind(this);document.addEventListener("mousemove",a),document.addEventListener("mouseup",()=>{this.curElement&&!this.previewerDrawOption.dragDisable&&(this.curElement.width=this.width,this.curElement.height=this.height,this.draw.render({isSetCursor:!0,curIndex:this.curPosition?.index})),this.resizerImageContainer.style.display="none",document.removeEventListener("mousemove",a),document.body.style.cursor="",this.canvas.style.cursor="text"},{once:!0}),t.preventDefault()}_mousemove(t){if(!this.curElement||this.previewerDrawOption.dragDisable)return;const{scale:e}=this.options;let n=0,i=0;switch(this.curHandleIndex){case 0:{const d=this.mousedownX-t.x,u=this.mousedownY-t.y;n=Math.cbrt(d**3+u**3),i=this.curElement.height*n/this.curElement.width}break;case 1:i=this.mousedownY-t.y;break;case 2:{const d=t.x-this.mousedownX,u=this.mousedownY-t.y;n=Math.cbrt(d**3+u**3),i=this.curElement.height*n/this.curElement.width}break;case 4:{const d=t.x-this.mousedownX,u=t.y-this.mousedownY;n=Math.cbrt(d**3+u**3),i=this.curElement.height*n/this.curElement.width}break;case 3:n=t.x-this.mousedownX;break;case 5:i=t.y-this.mousedownY;break;case 6:{const d=this.mousedownX-t.x,u=t.y-this.mousedownY;n=Math.cbrt(d**3+u**3),i=this.curElement.height*n/this.curElement.width}break;case 7:n=this.mousedownX-t.x;break}const r=this.curElement.width+n/e,s=this.curElement.height+i/e;if(r<=0||s<=0)return;this.width=r,this.height=s;const a=r*e,c=s*e;this.resizerImage.style.width=`${a}px`,this.resizerImage.style.height=`${c}px`,this._updateResizerRect(a,c),this._updateResizerSizeView(a,c),t.preventDefault(),this.eventBus.isSubscribe("imageSizeChange")&&this.eventBus.emit("imageSizeChange",{element:this.curElement})}_drawPreviewer(){const t=document.createElement("div");t.classList.add(`${z}-image-previewer`);const e=document.createElement("i");e.classList.add("image-close"),e.onclick=()=>{this._clearPreviewer()},t.append(e);const n=document.createElement("div");n.classList.add(`${z}-image-container`);const i=document.createElement("img");i.src=this.curElementSrc,i.draggable=!1,n.append(i),this.previewerImage=i,t.append(n);let r=0,s=0,a=1,c=0;const d=document.createElement("div");d.classList.add(`${z}-image-menu`);const u=document.createElement("div");u.classList.add("image-navigate");const R=document.createElement("i");R.classList.add("image-pre"),R.onclick=()=>{const S=this.imageList.findIndex(F=>F.id===this.curShowElement?.id);S<=0||(this.curShowElement=this.imageList[S-1],i.src=this.curShowElement.value,this._updateImageNavigate())},u.append(R),this.imagePre=R;const h=document.createElement("span");h.classList.add("image-count"),this.imageCount=h,u.append(h);const g=document.createElement("i");g.classList.add("image-next"),g.onclick=()=>{const S=this.imageList.findIndex(F=>F.id===this.curShowElement?.id);S>=this.imageList.length-1||(this.curShowElement=this.imageList[S+1],i.src=this.curShowElement.value,this._updateImageNavigate())},this.imageNext=g,u.append(g),d.append(u);const f=document.createElement("i");f.classList.add("zoom-in"),f.onclick=()=>{a+=.1,this._setPreviewerTransform(a,c,r,s)},d.append(f);const T=document.createElement("i");T.onclick=()=>{a-.1<=.1||(a-=.1,this._setPreviewerTransform(a,c,r,s))},T.classList.add("zoom-out"),d.append(T);const m=document.createElement("i");m.classList.add("rotate"),m.onclick=()=>{c+=1,this._setPreviewerTransform(a,c,r,s)},d.append(m);const p=document.createElement("i");p.classList.add("original-size"),p.onclick=()=>{r=0,s=0,a=1,c=0,this._setPreviewerTransform(a,c,r,s)},d.append(p);const I=document.createElement("i");I.classList.add("image-download"),I.onclick=()=>{const{mime:S}=this.previewerDrawOption;Vi(i.src,`${this.curElement?.id}.${S||"png"}`)},d.append(I),t.append(d),this.previewerContainer=t,document.body.append(t);let L=0,P=0,C=!1;i.onmousedown=S=>{C=!0,L=S.x,P=S.y,t.style.cursor="move"},t.onmousemove=S=>{C&&(r+=S.x-L,s+=S.y-P,L=S.x,P=S.y,this._setPreviewerTransform(a,c,r,s))},t.onmouseup=()=>{C=!1,t.style.cursor="auto"},t.onwheel=S=>{if(S.preventDefault(),S.stopPropagation(),S.deltaY<0)a+=.1;else{if(a-.1<=.1)return;a-=.1}this._setPreviewerTransform(a,c,r,s)},this._updateImageNavigate()}_updateImageNavigate(){const t=this.imageList.findIndex(e=>e.id===this.curShowElement?.id);this.imageCount.innerText=`${t+1} / ${this.imageList.length}`,t<=0?this.imagePre.classList.add("disabled"):this.imagePre.classList.remove("disabled"),t>=this.imageList.length-1?this.imageNext.classList.add("disabled"):this.imageNext.classList.remove("disabled")}_setPreviewerTransform(t,e,n,i){this.previewerImage&&(this.previewerImage.style.left=`${n}px`,this.previewerImage.style.top=`${i}px`,this.previewerImage.style.transform=`scale(${t}) rotate(${e*90}deg)`)}_clearPreviewer(){this.previewerContainer?.remove(),this.previewerContainer=null,document.body.style.overflow="auto"}_updateResizerRect(t,e){const{resizerSize:n,scale:i}=this.options,r=this.draw.isReadonly();this.resizerSelection.style.width=`${t}px`,this.resizerSelection.style.height=`${e}px`;for(let s=0;s<8;s++){const a=s===0||s===6||s===7?-n:s===1||s===5?t/2:t-n,c=s===0||s===1||s===2?-n:s===3||s===7?e/2-n:e-n;this.resizerHandleList[s].style.transform=`scale(${i})`,this.resizerHandleList[s].style.left=`${a}px`,this.resizerHandleList[s].style.top=`${c}px`,this.resizerHandleList[s].style.display=r?"none":"block"}}_updateResizerSizeView(t,e){this.resizerSize.innerText=`${Math.round(t)} × ${Math.round(e)}`}render(){const t=this.draw.getMode();!this.curElement||this.curElement.imgToolDisabled&&!this.draw.isDesignMode()||t===l.EditorMode.PRINT&&this.options.modeRule[l.EditorMode.PRINT]?.imagePreviewerDisabled||t===l.EditorMode.READONLY&&this.options.modeRule[l.EditorMode.READONLY]?.imagePreviewerDisabled||(this.imageList=this.draw.getImageParticle().getOriginalMainImageList(),this.curShowElement=this.curElement,this._drawPreviewer(),document.body.style.overflow="hidden")}drawResizer(t,e=null,n={}){const i=this.draw.getMode();t.imgToolDisabled&&!this.draw.isDesignMode()||i===l.EditorMode.PRINT&&this.options.modeRule[l.EditorMode.PRINT]?.imagePreviewerDisabled||i===l.EditorMode.READONLY&&this.options.modeRule[l.EditorMode.READONLY]?.imagePreviewerDisabled||(this.previewerDrawOption=n,this.curElementSrc=t[n.srcKey||"value"]||"",this.updateResizer(t,e),document.addEventListener("keydown",this._keydown))}updateResizer(t,e=null){const{scale:n}=this.options,i=t.width*n,r=t.height*n;this._updateResizerSizeView(i,r);const{x:s,y:a}=this._getElementPosition(t,e);this.resizerSelection.style.left=`${s}px`,this.resizerSelection.style.top=`${a}px`,this.resizerSelection.style.borderWidth=`${n}px`,this._updateResizerRect(i,r),this.resizerSelection.style.display="block",this.curElement=t,this.curPosition=e,this.width=i,this.height=r}clearResizer(){this.resizerSelection.style.display="none",document.removeEventListener("keydown",this._keydown)}}class Uh{draw;range;datePicker;options;constructor(t){this.draw=t,this.options=t.getOptions(),this.range=t.getRange(),this.datePicker=new ur(t,{onSubmit:this._setValue.bind(this)})}_setValue(t){if(!t)return;const e=this.getDateElementRange();if(!e)return;const[n,i]=e,r=this.draw.getElementList(),s=r[n+1];this.draw.spliceElementList(r,n+1,i-n),this.range.setRange(n,n);const a={type:l.ElementType.DATE,value:"",dateFormat:s.dateFormat,valueList:[{value:t}]};wt(r,[a],n,{editorOptions:this.options}),this.draw.insertElementList([a])}getDateElementRange(){let t=-1,e=-1;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return null;const r=this.draw.getElementList(),s=r[n];if(s.type!==l.ElementType.DATE)return null;let a=n;for(;a>=0;){if(r[a].dateId!==s.dateId){t=a;break}a--}let c=n+1;for(;c<r.length;){if(r[c].dateId!==s.dateId){e=c-1;break}c++}return c===r.length&&(e=c-1),!~t||!~e?null:[t,e]}clearDatePicker(){this.datePicker.dispose()}renderDatePicker(t,e){const n=this.draw.getElementList(),i=this.getDateElementRange(),r=i?n.slice(i[0]+1,i[1]+1).map(s=>s.value).join(""):"";this.datePicker.render({value:r,position:e,dateFormat:t.dateFormat})}}class Er{element;videoCache;constructor(t){this.element=t,this.videoCache=new Map}snapshot(t,e,n){return new Promise((i,r)=>{const s=this.element.block?.videoBlock?.src||"";if(this.videoCache.has(s)){const a=this.videoCache.get(s);t.drawImage(a,e,n,this.element.metrics.width,this.element.metrics.height),i(this.element)}else{const a=document.createElement("video");a.src=s,a.muted=!0,a.crossOrigin="anonymous",a.onloadeddata=()=>{t.drawImage(a,e,n,this.element.metrics.width,this.element.metrics.height),this.videoCache.set(s,a),i(this.element)},a.onerror=c=>{r(c)},a.play().then(()=>{a.pause()})}})}render(t){const e=this.element.block,n=document.createElement("video");n.style.width="100%",n.style.height="100%",n.style.objectFit="contain",n.src=e.videoBlock?.src||"",n.controls=!0,t.append(n)}}class wh{draw;options;element;block;blockContainer;blockItem;blockCache;resizerMask;resizerSelection;resizerHandleList;width;height;mousedownX;mousedownY;curHandleIndex;isAllowResize;constructor(t,e){this.draw=t.getDraw(),this.options=this.draw.getOptions(),this.blockContainer=t.getBlockContainer(),this.element=e,this.block=null;const{blockItem:n,resizerMask:i,resizerSelection:r,resizerHandleList:s}=this._createBlockItem();this.blockItem=n,this.blockContainer.append(this.blockItem),this.blockCache=new Map,this.resizerMask=i,this.resizerSelection=r,this.resizerHandleList=s,this.width=0,this.height=0,this.mousedownX=0,this.mousedownY=0,this.curHandleIndex=0,this.isAllowResize=!1}getBlockElement(){return this.element}getBlockWidth(){return this.element.width||this.element.metrics.width}_createBlockItem(){const{scale:t,resizerColor:e}=this.options,n=document.createElement("div");n.classList.add(`${z}-block-item`);const i=document.createElement("div");i.style.display="none",i.classList.add(`${z}-resizer-selection`),i.style.borderColor=e,i.style.borderWidth=`${t}px`;const r=[];for(let a=0;a<8;a++){const c=document.createElement("div");c.style.background=e,c.classList.add("resizer-handle"),c.classList.add(`handle-${a}`),c.setAttribute("data-index",String(a)),c.onmousedown=this._mousedown.bind(this),i.append(c),r.push(c)}const s=document.createElement("div");return s.classList.add(`${z}-resizer-mask`),s.style.display="none",n.append(s),n.onmouseenter=()=>{if(this.draw.isReadonly())return;const{width:c,height:d}=this.element.metrics;this._updateResizerRect(c,d),i.style.display="block"},n.onmouseleave=()=>{this.isAllowResize||(i.style.display="none")},n.append(i),{blockItem:n,resizerMask:s,resizerSelection:i,resizerHandleList:r}}_updateResizerRect(t,e){const{resizerSize:n,scale:i}=this.options;this.resizerSelection.style.width=`${t}px`,this.resizerSelection.style.height=`${e}px`;for(let r=0;r<8;r++){const s=r===0||r===6||r===7?-n:r===1||r===5?t/2:t-n,a=r===0||r===1||r===2?-n:r===3||r===7?e/2-n:e-n;this.resizerHandleList[r].style.transform=`scale(${i})`,this.resizerHandleList[r].style.left=`${s}px`,this.resizerHandleList[r].style.top=`${a}px`}}_mousedown(t){const e=this.draw.getPage();this.mousedownX=t.x,this.mousedownY=t.y,this.isAllowResize=!0;const n=t.target;this.curHandleIndex=Number(n.dataset.index),this.resizerMask.style.display="block";const i=window.getComputedStyle(n).cursor;document.body.style.cursor=i,e.style.cursor=i;const r=this._mousemove.bind(this);document.addEventListener("mousemove",r),document.addEventListener("mouseup",()=>{this.element.width=Math.min(this.width,this.draw.getInnerWidth()),this.element.height=this.height,this.isAllowResize=!1,this.resizerSelection.style.display="none",this.resizerMask.style.display="none",document.removeEventListener("mousemove",r),document.body.style.cursor="",e.style.cursor="text",this.draw.render()},{once:!0}),t.preventDefault()}_mousemove(t){if(!this.isAllowResize)return;const{scale:e}=this.options;let n=0,i=0;switch(this.curHandleIndex){case 0:{const d=this.mousedownX-t.x,u=this.mousedownY-t.y;n=Math.cbrt(d**3+u**3),i=this.element.height*n/this.getBlockWidth()}break;case 1:i=this.mousedownY-t.y;break;case 2:{const d=t.x-this.mousedownX,u=this.mousedownY-t.y;n=Math.cbrt(d**3+u**3),i=this.element.height*n/this.getBlockWidth()}break;case 4:{const d=t.x-this.mousedownX,u=t.y-this.mousedownY;n=Math.cbrt(d**3+u**3),i=this.element.height*n/this.getBlockWidth()}break;case 3:n=t.x-this.mousedownX;break;case 5:i=t.y-this.mousedownY;break;case 6:{const d=this.mousedownX-t.x,u=t.y-this.mousedownY;n=Math.cbrt(d**3+u**3),i=this.element.height*n/this.getBlockWidth()}break;case 7:n=this.mousedownX-t.x;break}const r=this.getBlockWidth()+n/e,s=this.element.height+i/e;if(r<=0||s<=0)return;this.width=r,this.height=s;const a=r*e,c=s*e;this._updateResizerRect(a,c),this.blockItem.style.width=`${a}px`,this.blockItem.style.height=`${c}px`,t.preventDefault()}snapshot(t,e,n){if(this.element.block.type===l.BlockType.VIDEO)if(this.blockItem.style.display="none",this.blockCache.has(this.element.id))this.blockCache.get(this.element.id).snapshot(t,e,n);else{this.block=new Er(this.element);const r=this.block.snapshot(t,e,n);this.draw.getImageObserver().add(r),this.blockCache.set(this.element.id,this.block)}}render(){const t=this.element.block;t.type===l.BlockType.IFRAME?(this.block=new je(this.element),this.block.render(this.blockItem)):t.type===l.BlockType.VIDEO&&(this.block=new Er(this.element),this.block.render(this.blockItem))}setClientRects(t,e,n){const i=this.draw.getHeight(),r=this.draw.getPageGap(),s=t*(i+r),{metrics:a}=this.element;this.blockItem.style.display="block",this.blockItem.style.width=`${a.width}px`,this.blockItem.style.height=`${a.height}px`,this.blockItem.style.left=`${e}px`,this.blockItem.style.top=`${s+n}px`}remove(){this.blockItem.remove()}}class Zh{draw;container;blockContainer;blockMap;constructor(t){this.draw=t,this.container=t.getContainer(),this.blockMap=new Map,this.blockContainer=this._createBlockContainer(),this.container.append(this.blockContainer)}_createBlockContainer(){const t=document.createElement("div");return t.classList.add(`${z}-block-container`),t}getDraw(){return this.draw}getBlockContainer(){return this.blockContainer}render(t,e,n,i,r){const s=n.id;let a=this.blockMap.get(s);a||(a=new wh(this,n),a.render(),this.blockMap.set(s,a)),this.draw.isPrintMode()?a.snapshot(t,i,r):a.setClientRects(e,i,r)}clear(){if(!this.blockMap.size)return;const t=this.draw.getOriginalMainElementList(),e=[];for(let n=0;n<t.length;n++){const i=t[n];i.type===l.ElementType.BLOCK&&e.push(i.id)}this.blockMap.forEach(n=>{const i=n.getBlockElement().id;e.includes(i)||(n.remove(),this.blockMap.delete(i))})}}const Ei={contextmenu:{global:{cut:"剪切",copy:"复制",paste:"粘贴",selectAll:"全选",print:"打印",cancel:"取消"},control:{delete:"删除控件",editAttribute:"修改元素配置",addExpression:"添加表达式",addMenstrualHistory:"月经史",addFetalHeartPosition:"胎心位置"},hyperlink:{delete:"删除链接",cancel:"取消链接",edit:"编辑链接"},image:{change:"更改图片",saveAs:"另存为图片",textWrap:"文字环绕",textWrapType:{embed:"嵌入型",upDown:"上下型环绕",surround:"四周型环绕",floatTop:"浮于文字上方",floatBottom:"衬于文字下方"}},table:{insertRowCol:"插入行列",insertTopRow:"上方插入1行",insertBottomRow:"下方插入1行",insertLeftCol:"左侧插入1列",insertRightCol:"右侧插入1列",deleteRowCol:"删除行列",deleteRow:"删除1行",deleteCol:"删除1列",deleteTable:"删除整个表格",mergeCell:"合并单元格",mergeCancelCell:"取消合并",verticalAlign:"垂直对齐",verticalAlignTop:"顶端对齐",verticalAlignMiddle:"垂直居中",verticalAlignBottom:"底端对齐",border:"表格边框",borderAll:"所有框线",borderEmpty:"无框线",borderDash:"虚框线",borderExternal:"外侧框线",borderInternal:"内侧框线",borderTd:"单元格边框",borderTdTop:"上边框",borderTdRight:"右边框",borderTdBottom:"下边框",borderTdLeft:"左边框",borderTdForward:"正斜线",borderTdBack:"反斜线",tableProperties:"表格属性"}},datePicker:{now:"此刻",confirm:"确定",return:"返回日期",timeSelect:"时间选择",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},year:"年",month:"月",hour:"时",minute:"分",second:"秒"},frame:{header:"页眉",footer:"页脚"},pageBreak:{displayName:"分页符"},zone:{headerTip:"双击编辑页眉",footerTip:"双击编辑页脚"}},Qh={contextmenu:{global:{cut:"Cut",copy:"Copy",paste:"Paste",selectAll:"Select all",print:"Print",cancel:"Cancel"},control:{delete:"Delete control",editAttribute:"Edit control config",addExpression:"Add expression",addMenstrualHistory:"Menstrual History",addFetalHeartPosition:"Fetal Heart Position"},hyperlink:{delete:"Delete hyperlink",cancel:"Cancel hyperlink",edit:"Edit hyperlink"},image:{change:"Change image",saveAs:"Save as image",textWrap:"Text wrap",textWrapType:{embed:"Embed",upDown:"Up down",surround:"Surround",floatTop:"Float above text",floatBottom:"Float below text"}},table:{insertRowCol:"Insert row col",insertTopRow:"Insert top 1 row",insertBottomRow:"Insert bottom 1 row",insertLeftCol:"Insert left 1 col",insertRightCol:"Insert right 1 col",deleteRowCol:"Delete row col",deleteRow:"Delete 1 row",deleteCol:"Delete 1 col",deleteTable:"Delete table",mergeCell:"Merge cell",mergeCancelCell:"Cancel merge cell",verticalAlign:"Vertical align",verticalAlignTop:"Top",verticalAlignMiddle:"Middle",verticalAlignBottom:"Bottom",border:"Table border",borderAll:"All",borderEmpty:"Empty",borderDash:"Dash",borderExternal:"External",borderInternal:"Internal",borderTd:"Table cell border",borderTdTop:"Top",borderTdRight:"Right",borderTdBottom:"Bottom",borderTdLeft:"Left",borderTdForward:"Forward",borderTdBack:"Back",tableProperties:"Table Properties"}},datePicker:{now:"Now",confirm:"Confirm",return:"Return",timeSelect:"Time select",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},year:" ",month:" ",hour:"Hour",minute:"Minute",second:"Second"},frame:{header:"Header",footer:"Footer"},pageBreak:{displayName:"Page Break"},zone:{headerTip:"Double click to edit header",footerTip:"Double click to edit footer"}};class vh{currentLocale;langMap=new Map([["zhCN",Ei],["en",Qh]]);constructor(t){this.currentLocale=t}registerLangMap(t,e){const n=this.langMap.get(t);this.langMap.set(t,Yi(n||Ei,e))}getLocale(){return this.currentLocale}setLocale(t){this.currentLocale=t}getLang(){return this.langMap.get(this.currentLocale)||Ei}t(t){const e=t.split(".");let n="",i=this.getLang();for(let r=0;r<e.length;r++){const s=e[r],a=Reflect.get(i,s);if(a)n=i=a;else return""}return n}}class Kh{promiseList;constructor(){this.promiseList=[]}add(t){this.promiseList.push(t)}clearAll(){this.promiseList=[]}allSettled(){return Promise.allSettled(this.promiseList)}}class Hh{draw;zone;i18n;container;pageContainer;isDisableMouseMove;tipContainer;tipContent;currentMoveZone;constructor(t,e){this.draw=t,this.zone=e,this.i18n=t.getI18n(),this.container=t.getContainer(),this.pageContainer=t.getPageContainer();const{tipContainer:n,tipContent:i}=this._drawZoneTip();this.tipContainer=n,this.tipContent=i,this.isDisableMouseMove=!0,this.currentMoveZone=l.EditorZone.MAIN;const r=[],{header:s,footer:a}=t.getOptions();s.disabled||r.push(l.EditorZone.HEADER),a.disabled||r.push(l.EditorZone.FOOTER),r.length&&this._watchMouseMoveZoneChange(r)}_watchMouseMoveZoneChange(t){this.pageContainer.addEventListener("mousemove",Gr(e=>{if(!(this.isDisableMouseMove||!this.draw.getIsPagingMode())){if(this.draw.getMode()!==l.EditorMode.EDIT){this._updateZoneTip(!1);return}if(e.offsetY)if(e.target instanceof HTMLCanvasElement){const n=this.zone.getZoneByY(e.offsetY);if(!t.includes(n)){this._updateZoneTip(!1);return}this.currentMoveZone=n,this._updateZoneTip(this.zone.getZone()===l.EditorZone.MAIN&&(n===l.EditorZone.HEADER||n===l.EditorZone.FOOTER),e.x,e.y)}else this._updateZoneTip(!1)}},250)),this.pageContainer.addEventListener("mouseenter",()=>{this.isDisableMouseMove=!1}),this.pageContainer.addEventListener("mouseleave",()=>{this.isDisableMouseMove=!0,this._updateZoneTip(!1)})}_drawZoneTip(){const t=document.createElement("div");t.classList.add(`${z}-zone-tip`);const e=document.createElement("span");return t.append(e),this.container.append(t),{tipContainer:t,tipContent:e}}_updateZoneTip(t,e,n){t?(this.tipContainer.classList.add("show"),this.tipContainer.style.left=`${e}px`,this.tipContainer.style.top=`${n}px`,this.tipContent.innerText=this.i18n.t(`zone.${this.currentMoveZone===l.EditorZone.HEADER?"headerTip":"footerTip"}`)):this.tipContainer.classList.remove("show")}}class _h{INDICATOR_PADDING=2;INDICATOR_TITLE_TRANSLATE=[20,5];draw;options;i18n;container;currentZone;indicatorContainer;constructor(t){this.draw=t,this.i18n=t.getI18n(),this.options=t.getOptions(),this.container=t.getContainer(),this.currentZone=l.EditorZone.MAIN,this.indicatorContainer=null,this.options.zone.tipDisabled||new Hh(t,this)}isHeaderActive(){return this.getZone()===l.EditorZone.HEADER}isMainActive(){return this.getZone()===l.EditorZone.MAIN}isFooterActive(){return this.getZone()===l.EditorZone.FOOTER}getZone(){return this.currentZone}setZone(t){const{header:e,footer:n}=this.options;!e.editable&&t===l.EditorZone.HEADER||!n.editable&&t===l.EditorZone.FOOTER||this.currentZone!==t&&(this.currentZone=t,this.draw.getRange().clearRange(),this.draw.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1}),this.drawZoneIndicator(),Co(()=>{const i=this.draw.getListener();i.zoneChange&&i.zoneChange(t);const r=this.draw.getEventBus();r.isSubscribe("zoneChange")&&r.emit("zoneChange",t)}))}getZoneByY(t){const e=this.draw.getHeader(),n=e.getHeaderTop()+e.getHeight(),i=this.draw.getFooter(),s=this.draw.getHeight()-(i.getFooterBottom()+i.getHeight());return t<n?l.EditorZone.HEADER:t>s?l.EditorZone.FOOTER:l.EditorZone.MAIN}drawZoneIndicator(){if(this._clearZoneIndicator(),!this.isHeaderActive()&&!this.isFooterActive())return;const{scale:t}=this.options,e=this.isHeaderActive(),[n,i]=this.INDICATOR_TITLE_TRANSLATE,r=this.draw.getPageList(),s=this.draw.getMargins(),a=this.draw.getInnerWidth(),c=this.draw.getHeight(),d=this.draw.getPageGap(),u=c+d;this.indicatorContainer=document.createElement("div"),this.indicatorContainer.classList.add(`${z}-zone-indicator`);const R=this.draw.getHeader(),h=this.draw.getFooter(),g=e?R.getHeight():h.getHeight(),f=e?R.getHeaderTop():c-h.getFooterBottom()-g;for(let T=0;T<r.length;T++){const m=u*T+f,p=s[3]-this.INDICATOR_PADDING,I=s[3]+a+this.INDICATOR_PADDING,L=e?m-this.INDICATOR_PADDING:m+g+this.INDICATOR_PADDING,P=e?m+g+this.INDICATOR_PADDING:m-this.INDICATOR_PADDING,C=document.createElement("div");C.innerText=this.i18n.t(`frame.${e?"header":"footer"}`),C.style.top=`${P}px`,C.style.transform=`translate(${n*t}px, ${i*t}px) scale(${t})`,this.indicatorContainer.append(C);const S=document.createElement("span");S.classList.add(`${z}-zone-indicator-border__top`),S.style.top=`${L}px`,S.style.width=`${a}px`,S.style.marginLeft=`${s[3]}px`,this.indicatorContainer.append(S);const F=document.createElement("span");F.classList.add(`${z}-zone-indicator-border__left`),F.style.top=`${m}px`,F.style.height=`${g}px`,F.style.left=`${p}px`,this.indicatorContainer.append(F);const N=document.createElement("span");N.classList.add(`${z}-zone-indicator-border__bottom`),N.style.top=`${P}px`,this.indicatorContainer.append(N);const V=document.createElement("span");V.classList.add(`${z}-zone-indicator-border__right`),V.style.top=`${m}px`,V.style.height=`${g}px`,V.style.left=`${I}px`,this.indicatorContainer.append(V)}this.container.append(this.indicatorContainer)}_clearZoneIndicator(){this.indicatorContainer?.remove(),this.indicatorContainer=null}}class xh{draw;position;zone;options;elementList;rowList;positionList;constructor(t,e){this.draw=t,this.position=t.getPosition(),this.zone=t.getZone(),this.options=t.getOptions(),this.elementList=e||[],this.rowList=[],this.positionList=[]}getRowList(){return this.rowList}setElementList(t){this.elementList=t}getElementList(){return this.elementList}getPositionList(){return this.positionList}compute(){this.recovery(),this._computeRowList(),this._computePositionList()}recovery(){this.rowList=[],this.positionList=[]}_computeRowList(){const t=this.draw.getInnerWidth();this.rowList=this.draw.computeRowList({innerWidth:t,elementList:this.elementList})}_computePositionList(){const t=this.getFooterBottom(),e=this.draw.getInnerWidth(),i=this.draw.getMargins()[3],r=this.draw.getHeight(),s=this.getHeight(),a=r-t-s;this.position.computePageRowPosition({positionList:this.positionList,rowList:this.rowList,pageNo:0,startRowIndex:0,startIndex:0,startX:i,startY:a,innerWidth:e,zone:l.EditorZone.FOOTER})}getFooterBottom(){const{footer:{bottom:t,disabled:e},scale:n}=this.options;return e?0:Math.floor(t*n)}getMaxHeight(){const{footer:{maxHeightRadio:t}}=this.options,e=this.draw.getHeight();return Math.floor(e*bi[t])}getHeight(){if(this.options.footer.disabled)return 0;const t=this.getMaxHeight(),e=this.getRowHeight();return e>t?t:e}getRowHeight(){return this.rowList.reduce((t,e)=>t+e.height,0)}getExtraHeight(){const t=this.draw.getMargins(),e=this.getHeight(),i=this.getFooterBottom()+e-t[2];return i<=0?0:i}render(t,e){t.save(),t.globalAlpha=this.zone.isFooterActive()?1:this.options.footer.inactiveAlpha;const n=this.draw.getInnerWidth(),i=this.getMaxHeight(),r=[];let s=0;for(let a=0;a<this.rowList.length;a++){const c=this.rowList[a];if(s+c.height>i)break;r.push(c),s+=c.height}this.draw.drawRow(t,{elementList:this.elementList,positionList:this.positionList,rowList:r,pageNo:e,startIndex:0,innerWidth:n,zone:l.EditorZone.FOOTER}),t.restore()}}class Gh{draw;range;options;UN_COUNT_STYLE_WIDTH=20;MEASURE_BASE_TEXT="0";LIST_GAP=10;constructor(t){this.draw=t,this.range=t.getRange(),this.options=t.getOptions()}setList(t,e){if(this.draw.isReadonly())return;const{startIndex:i,endIndex:r}=this.range.getRange();if(!~i&&!~r)return;const s=this.range.getRangeParagraphElementList();if(!s||!s.length)return;if(s.find(R=>R.listType===t&&R.listStyle===e)||!t){this.unsetList();return}const c=lt();s.forEach(R=>{R.listId=c,R.listType=t,R.listStyle=e});const d=i===r,u=d?r:i;this.draw.render({curIndex:u,isSetCursor:d})}unsetList(){if(this.draw.isReadonly())return;const{startIndex:e,endIndex:n}=this.range.getRange();if(!~e&&!~n)return;const i=this.range.getRangeParagraphElementList()?.filter(d=>d.listId);if(!i||!i.length)return;const r=this.draw.getElementList(),s=r[n];if(s.listId){let d=n+1;for(;d<r.length;){const u=r[d];if(u.value===_&&!u.listWrap)break;if(u.listId!==s.listId){this.draw.spliceElementList(r,d,0,[{value:_}]);break}d++}}i.forEach(d=>{delete d.listId,delete d.listType,delete d.listStyle,delete d.listWrap});const a=e===n,c=a?n:e;this.draw.render({curIndex:c,isSetCursor:a})}computeListStyle(t,e){const n=new Map;let i=0,r=e[i]?.listId,s=[];const a=e.length;for(;i<a;){const c=e[i];if(r&&r===c.listId)s.push(c);else if(c.listId&&c.listId!==r){if(s.length){const d=this.getListStyleWidth(t,s);n.set(r,d)}r=c.listId,s=r?[c]:[]}i++}if(s.length){const c=this.getListStyleWidth(t,s);n.set(r,c)}return n}findStyledElement(t){let e=t[0];for(let n=1;n<t.length;n++){const i=t[n];if(i.font||i.size||i.bold||i.italic){e=i;break}}return e}getListFontStyle(t,e){if(this.options.list.inheritStyle){const n=this.findStyledElement(t);return this.draw.getElementFont(n,e)}else{const{defaultFont:n,defaultSize:i}=this.options;return`${i*e}px ${n}`}}getListStyleWidth(t,e){const{scale:n,checkbox:i}=this.options,r=e[0];if(r.listStyle&&r.listStyle!==l.ListStyle.DECIMAL)return r.listStyle===l.ListStyle.CHECKBOX?(i.width+this.LIST_GAP)*n:this.UN_COUNT_STYLE_WIDTH*n;const s=e.reduce((d,u)=>(u.value===_&&(d+=1),d),0);if(!s)return 0;t.save(),t.font=this.getListFontStyle(e,n);const a=`${this.MEASURE_BASE_TEXT.repeat(String(s).length)}${l.KeyMap.PERIOD}`,c=t.measureText(a);return t.restore(),Math.ceil((c.width+this.LIST_GAP)*n)}drawListStyle(t,e,n){const{elementList:i,offsetX:r,listIndex:s,ascent:a}=e,c=i[0];if(c.value!==_||c.listWrap)return;let d=0;const{defaultTabWidth:u,scale:R}=this.options;for(let m=1;m<i.length&&i[m]?.type===l.ElementType.TAB;m++)d+=u*R;const{coordinate:{leftTop:[h,g]}}=n,f=h-r+d,T=g+a;if(c.listStyle===l.ListStyle.CHECKBOX){const{width:m,height:p,gap:I}=this.options.checkbox,L={...c,checkbox:{value:!!c.checkbox?.value},metrics:{...c.metrics,width:(m+I*2)*R,height:p*R}};this.draw.getCheckboxParticle().render({ctx:t,x:f-I*R,y:T,index:0,row:{...e,elementList:[L,...e.elementList]}})}else{let m="";if(c.listType===l.ListType.UL?m=Wo[c.listStyle]||Wo[_e.DISC]:m=`${s+1}${l.KeyMap.PERIOD}`,!m)return;t.save(),t.font=this.getListFontStyle(i,R),t.fillText(m,f,T),t.restore()}}}class Un{options;static WIDTH=12;static HEIGHT=9;static GAP=3;constructor(t){this.options=t.getOptions()}render(t,e,n,i){const{scale:r,lineBreak:{color:s,lineWidth:a}}=this.options;t.save(),t.beginPath();const c=i-Un.HEIGHT*r/2,d=n+e.metrics.width;t.translate(d,c),t.scale(r,r),t.strokeStyle=s,t.lineWidth=a,t.lineCap="round",t.lineJoin="round",t.beginPath(),t.moveTo(8,0),t.lineTo(12,0),t.lineTo(12,6),t.lineTo(3,6),t.moveTo(3,6),t.lineTo(6,3),t.moveTo(3,6),t.lineTo(6,9),t.stroke(),t.closePath(),t.restore()}}class Xr{draw;position;options;elementList;rowList;positionList;constructor(t){this.draw=t,this.position=t.getPosition(),this.options=t.getOptions(),this.elementList=[],this.rowList=[],this.positionList=[]}_recovery(){this.elementList=[],this.rowList=[],this.positionList=[]}_compute(t){this._computeRowList(),this._computePositionList(t)}_computeRowList(){const t=this.draw.getInnerWidth();this.rowList=this.draw.computeRowList({innerWidth:t,elementList:this.elementList})}_computePositionList(t){const{lineBreak:e,scale:n}=this.options,i=this.draw.getHeader().getExtraHeight(),r=this.draw.getInnerWidth(),s=this.draw.getMargins();let a=s[3];e.disabled||(a+=(Un.WIDTH+Un.GAP)*n);const c=t?.startY||s[0]+i;this.position.computePageRowPosition({positionList:this.positionList,rowList:this.rowList,pageNo:0,startRowIndex:0,startIndex:0,startX:a,startY:c,innerWidth:r})}render(t,e){const{placeholder:n=this.options.placeholder}=e||{},{data:i,font:r,size:s,color:a,opacity:c}=n;this._recovery(),this.elementList=[{value:i,font:r,size:s,color:a}],bt(this.elementList,{editorOptions:this.options,isForceCompensation:!0}),this._compute(e);const d=this.draw.getInnerWidth();t.save(),t.globalAlpha=c,this.draw.drawRow(t,{elementList:this.elementList,positionList:this.positionList,rowList:this.rowList,pageNo:0,startIndex:0,innerWidth:d,isDrawLineBreak:!1}),t.restore()}}class Ah{draw;options;range;fillRectMap;constructor(t){this.draw=t,this.options=t.getOptions(),this.range=t.getRange(),this.fillRectMap=new Map}setGroup(){if(this.draw.isReadonly()||this.draw.getZone().getZone()!==l.EditorZone.MAIN)return null;const t=this.range.getSelection();if(!t)return null;const e=lt();return t.forEach(n=>{Array.isArray(n.groupIds)||(n.groupIds=[]),n.groupIds.push(e)}),this.draw.render({isSetCursor:!1,isCompute:!1}),e}getElementListByGroupId(t,e){const n=[];for(let i=0;i<t.length;i++){const r=t[i];if(r.type===l.ElementType.TABLE){const s=r.trList;for(let a=0;a<s.length;a++){const c=s[a];for(let d=0;d<c.tdList.length;d++){const u=c.tdList[d],R=this.getElementListByGroupId(u.value,e);if(R.length)return n.push(...R),n}}}if(r?.groupIds?.includes(e)&&(n.push(r),!t[i+1]?.groupIds?.includes(e)))break}return n}deleteGroup(t){if(this.draw.isReadonly())return;const e=this.draw.getOriginalMainElementList(),n=this.getElementListByGroupId(e,t);if(n.length){for(let i=0;i<n.length;i++){const r=n[i],s=r.groupIds,a=s.findIndex(c=>c===t);s.splice(a,1),s.length||delete r.groupIds}this.draw.render({isSetCursor:!1,isCompute:!1})}}getContextByGroupId(t,e){for(let n=0;n<t.length;n++){const i=t[n];if(i.type===l.ElementType.TABLE){const s=i.trList;for(let a=0;a<s.length;a++){const c=s[a];for(let d=0;d<c.tdList.length;d++){const u=c.tdList[d],R=this.getContextByGroupId(u.value,e);if(R)return{...R,isTable:!0,index:n,trIndex:a,tdIndex:d,tdId:u.id,trId:c.id,tableId:i.tableId}}}}const r=t[n+1];if(i.groupIds?.includes(e)&&!r?.groupIds?.includes(e))return{isTable:!1,startIndex:n,endIndex:n}}return null}clearFillInfo(){this.fillRectMap.clear()}recordFillInfo(t,e,n,i,r){const s=t.groupIds;if(s)for(const a of s){const c=this.fillRectMap.get(a);c?c.width+=i:this.fillRectMap.set(a,{x:e,y:n,width:i,height:r})}}render(t){if(!this.fillRectMap.size)return;const e=this.range.getRange(),i=this.draw.getElementList()[e.endIndex]?.groupIds,{group:{backgroundColor:r,opacity:s,activeOpacity:a,activeBackgroundColor:c}}=this.options;t.save(),this.fillRectMap.forEach((d,u)=>{const{x:R,y:h,width:g,height:f}=d;i?.includes(u)?(t.globalAlpha=a,t.fillStyle=c):(t.globalAlpha=s,t.fillStyle=r),t.fillRect(R,h,g,f)}),t.restore(),this.clearFillInfo()}}class kh{options;constructor(t){this.options=t.getOptions()}render(t,e,n,i){const{scale:r,whiteSpace:{color:s,radius:a}}=this.options,c=e.metrics;t.save(),t.fillStyle=s,t.beginPath(),t.arc(n+c.width/2,i,a*r,0,Math.PI*2),t.fill(),t.closePath(),t.restore()}}class Jh{draw;eventBus;pageContainer;constructor(t){this.draw=t,this.eventBus=this.draw.getEventBus(),this.pageContainer=this.draw.getPageContainer(),this.pageContainer.addEventListener("mousemove",this._mousemove.bind(this)),this.pageContainer.addEventListener("mouseenter",this._mouseenter.bind(this)),this.pageContainer.addEventListener("mouseleave",this._mouseleave.bind(this)),this.pageContainer.addEventListener("mousedown",this._mousedown.bind(this)),this.pageContainer.addEventListener("mouseup",this._mouseup.bind(this)),this.pageContainer.addEventListener("click",this._click.bind(this))}_mousemove(t){this.eventBus.isSubscribe("mousemove")&&this.eventBus.emit("mousemove",t)}_mouseenter(t){this.eventBus.isSubscribe("mouseenter")&&this.eventBus.emit("mouseenter",t)}_mouseleave(t){this.eventBus.isSubscribe("mouseleave")&&this.eventBus.emit("mouseleave",t)}_mousedown(t){this.eventBus.isSubscribe("mousedown")&&this.eventBus.emit("mousedown",t)}_mouseup(t){this.eventBus.isSubscribe("mouseup")&&this.eventBus.emit("mouseup",t)}_click(t){this.eventBus.isSubscribe("click")&&this.eventBus.emit("click",t)}}class Bh{draw;options;constructor(t){this.draw=t,this.options=t.getOptions()}render(t,e){const{scale:n,lineNumber:{color:i,size:r,font:s,right:a,type:c}}=this.options,d=this.draw.getTextParticle(),u=this.draw.getMargins(),R=this.draw.getPosition().getOriginalMainPositionList(),g=this.draw.getPageRowList()[e];t.save(),t.fillStyle=i,t.font=`${r*n}px ${s}`;for(let f=0;f<g.length;f++){const T=g[f],{coordinate:{leftBottom:m}}=R[T.startIndex],p=c===l.LineNumberType.PAGE?f+1:T.rowIndex+1,I=d.measureText(t,{value:`${p}`}),L=u[3]-(I.width+a)*n,P=m[1]-I.actualBoundingBoxAscent*n;t.fillText(`${p}`,L,P)}t.restore()}}class $h{draw;header;footer;options;constructor(t){this.draw=t,this.header=t.getHeader(),this.footer=t.getFooter(),this.options=t.getOptions()}render(t){const{scale:e,pageBorder:{color:n,lineWidth:i,padding:r}}=this.options;t.save(),t.translate(.5,.5),t.strokeStyle=n,t.lineWidth=i*e;const s=this.draw.getMargins(),a=s[3]-r[3]*e,c=s[0]+this.header.getExtraHeight()-r[0]*e,d=this.draw.getInnerWidth()+(r[1]+r[3])*e,u=this.draw.getHeight()-c-this.footer.getExtraHeight()-s[2]+r[2]*e;t.rect(a,c,d,u),t.stroke(),t.restore()}}function zh(o,t){const{value:e,oldValue:n}=t;n.isTable&&!e.isTable&&o.getTableTool().dispose()}class jh{draw;eventBus;constructor(t){this.draw=t,this.eventBus=t.getEventBus(),this.execute()}execute(){this.eventBus.on("positionContextChange",t=>{zh(this.draw,t)})}}class qh{draw;range;position;tableTool;tableParticle;options;constructor(t){this.draw=t,this.range=t.getRange(),this.position=t.getPosition(),this.tableTool=t.getTableTool(),this.tableParticle=t.getTableParticle(),this.options=t.getOptions()}insertTable(t,e){const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return;const{defaultTrMinHeight:r}=this.options.table,s=this.draw.getElementList();let a=0;if(s[n]?.listId){const f=this.position.getPositionList(),{rowIndex:T}=f[n];a=this.draw.getRowList()[T]?.offsetX||0}const c=this.draw.getContextInnerWidth()-a,d=[],u=c/e;for(let f=0;f<e;f++)d.push({width:u});const R=[];for(let f=0;f<t;f++){const T=[],m={height:r,tdList:T};for(let p=0;p<e;p++)T.push({colspan:1,rowspan:1,value:[]});R.push(m)}const h={type:l.ElementType.TABLE,value:"",colgroup:d,trList:R};bt([h],{editorOptions:this.options}),wt(s,[h],n,{editorOptions:this.options});const g=n+1;this.draw.spliceElementList(s,g,n===i?0:i-n,[h]),this.range.setRange(g,g),this.draw.render({curIndex:g,isSetCursor:!1})}insertTableTopRow(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,trIndex:n,tableId:i}=t,s=this.draw.getOriginalElementList()[e],a=s.trList,c=a[n];if(c.tdList.length<s.colgroup.length){const R=c.tdList[0].rowIndex;for(let h=0;h<n;h++){const g=a[h];for(let f=0;f<g.tdList.length;f++){const T=g.tdList[f];T.rowspan>1&&T.rowIndex+T.rowspan>=R+1&&(T.rowspan+=1)}}}const d=lt(),u={height:c.height,id:d,tdList:[]};for(let R=0;R<c.tdList.length;R++){const h=c.tdList[R],g=lt();u.tdList.push({id:g,rowspan:1,colspan:h.colspan,value:[{value:_,size:16,tableId:i,trId:d,tdId:g}]})}a.splice(n,0,u),this.position.setPositionContext({isTable:!0,index:e,trIndex:n,tdIndex:0,tdId:u.tdList[0].id,trId:u.id,tableId:i}),this.range.setRange(0,0),this.draw.render({curIndex:0}),this.tableTool.render()}insertTableBottomRow(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,trIndex:n,tableId:i}=t,s=this.draw.getOriginalElementList()[e],a=s.trList,c=a[n],d=a.length-1===n?c:a[n+1];if(d.tdList.length<s.colgroup.length){const h=d.tdList[0].rowIndex;for(let g=0;g<n+1;g++){const f=a[g];for(let T=0;T<f.tdList.length;T++){const m=f.tdList[T];m.rowspan>1&&m.rowIndex+m.rowspan>=h+1&&(m.rowspan+=1)}}}const u=lt(),R={height:d.height,id:u,tdList:[]};for(let h=0;h<d.tdList.length;h++){const g=d.tdList[h],f=lt();R.tdList.push({id:f,rowspan:1,colspan:g.colspan,value:[{value:_,size:16,tableId:i,trId:u,tdId:f}]})}a.splice(n+1,0,R),this.position.setPositionContext({isTable:!0,index:e,trIndex:n+1,tdIndex:0,tdId:R.tdList[0].id,trId:R.id,tableId:s.id}),this.range.setRange(0,0),this.draw.render({curIndex:0})}adjustColWidth(t){if(t.type!==l.ElementType.TABLE)return;const{defaultColMinWidth:e}=this.options.table,n=t.colgroup,i=n.reduce((s,a)=>s+a.width,0),r=this.draw.getOriginalInnerWidth();if(i>r){const s=n.filter(c=>c.width>e),a=(i-r)/s.length;for(let c=0;c<n.length;c++){const d=n[c];d.width-a>=e&&(d.width-=a)}}}insertTableLeftCol(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,tdIndex:n,tableId:i}=t,s=this.draw.getOriginalElementList()[e],a=s.trList,c=n;for(let R=0;R<a.length;R++){const h=a[R],g=lt();h.tdList.splice(c,0,{id:g,rowspan:1,colspan:1,value:[{value:_,size:16,tableId:i,trId:h.id,tdId:g}]})}const{defaultColMinWidth:d}=this.options.table;s.colgroup.splice(c,0,{width:d}),this.adjustColWidth(s),this.position.setPositionContext({isTable:!0,index:e,trIndex:0,tdIndex:c,tdId:a[0].tdList[c].id,trId:a[0].id,tableId:i}),this.range.setRange(0,0),this.draw.render({curIndex:0}),this.tableTool.render()}insertTableRightCol(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,tdIndex:n,tableId:i}=t,s=this.draw.getOriginalElementList()[e],a=s.trList,c=n+1;for(let R=0;R<a.length;R++){const h=a[R],g=lt();h.tdList.splice(c,0,{id:g,rowspan:1,colspan:1,value:[{value:_,size:16,tableId:i,trId:h.id,tdId:g}]})}const{defaultColMinWidth:d}=this.options.table;s.colgroup.splice(c,0,{width:d}),this.adjustColWidth(s),this.position.setPositionContext({isTable:!0,index:e,trIndex:0,tdIndex:c,tdId:a[0].tdList[c].id,trId:a[0].id,tableId:s.id}),this.range.setRange(0,0),this.draw.render({curIndex:0})}deleteTableRow(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,trIndex:n,tdIndex:i}=t,s=this.draw.getOriginalElementList()[e],a=s.trList,c=a[n],d=c.tdList[i].rowIndex;if(a.length<=1&&s.pagingIndex===0){this.deleteTable();return}for(let u=0;u<d;u++){const h=a[u].tdList;for(let g=0;g<h.length;g++){const f=h[g];f.rowIndex+f.rowspan>d&&f.rowspan--}}for(let u=0;u<c.tdList.length;u++){const R=c.tdList[u];if(R.rowspan>1){const h=lt(),g=a[n+1];g.tdList.splice(u,0,{id:h,rowspan:R.rowspan-1,colspan:R.colspan,value:[{value:_,size:16,tableId:s.id,trId:g.id,tdId:h}]})}}a.splice(n,1),this.position.setPositionContext({isTable:!1}),this.range.clearRange(),this.draw.render({curIndex:t.index}),this.tableTool.dispose()}deleteTableCol(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,tdIndex:n,trIndex:i}=t,s=this.draw.getOriginalElementList()[e],a=s.trList,d=a[i].tdList[n].colIndex;if(!a.find(R=>R.tdList.length>1)){this.deleteTable();return}for(let R=0;R<a.length;R++){const h=a[R];for(let g=0;g<h.tdList.length;g++){const f=h.tdList[g];f.colIndex<=d&&f.colIndex+f.colspan>d&&(f.colspan>1?f.colspan--:h.tdList.splice(g,1))}}s.colgroup?.splice(d,1),this.position.setPositionContext({isTable:!1}),this.range.setRange(0,0),this.draw.render({curIndex:t.index}),this.tableTool.dispose()}deleteTable(){const t=this.position.getPositionContext();if(!t.isTable)return;const e=this.draw.getOriginalElementList(),n=e[t.index];let i=1,r=t.index;if(n.pagingId){r=t.index-n.pagingIndex;for(let a=r+1;a<e.length&&e[a].pagingId===n.pagingId;a++)i++}e.splice(r,i);const s=r-1;this.position.setPositionContext({isTable:!1,index:s}),this.range.setRange(s,s),this.draw.render({curIndex:s}),this.tableTool.dispose()}mergeTableCell(){const t=this.position.getPositionContext();if(!t.isTable)return;const{isCrossRowCol:e,startTdIndex:n,endTdIndex:i,startTrIndex:r,endTrIndex:s}=this.range.getRange();if(!e)return;const{index:a}=t,u=this.draw.getOriginalElementList()[a].trList;let R=u[r].tdList[n],h=u[s].tdList[i];(R.x>h.x||R.y>h.y)&&([R,h]=[h,R]);const g=R.colIndex,f=h.colIndex+(h.colspan-1),T=R.rowIndex,m=h.rowIndex+(h.rowspan-1),p=[];for(let X=0;X<u.length;X++){const O=u[X],M=[];for(let b=0;b<O.tdList.length;b++){const y=O.tdList[b],D=y.colIndex,U=y.rowIndex;D>=g&&D<=f&&U>=T&&U<=m&&M.push(y)}M.length&&p.push(M)}if(!p.length)return;const I=p[p.length-1],L=p[0][0],P=I[I.length-1],C=L.x,S=L.y,F=P.x+P.width,N=P.y+P.height;for(let X=0;X<p.length;X++){const O=p[X];for(let M=0;M<O.length;M++){const b=O[M],y=b.x,D=b.y,U=y+b.width,Q=D+b.height;if(C>y||S>D||F<U||N<Q)return}}const V=[],Y=p[0][0],E=Y.value[0];for(let X=0;X<p.length;X++){const O=p[X];for(let M=0;M<O.length;M++){const b=O[M];if(!(X===0&&M===0)){V.push(b.id);const D=b.value.length>1?0:1;for(let U=D;U<b.value.length;U++){const Q=b.value[U];De(ze,E,Q),Y.value.push(Q)}}X===0&&M!==0&&(Y.colspan+=b.colspan),X!==0&&Y.colIndex===b.colIndex&&(Y.rowspan+=b.rowspan)}}for(let X=0;X<u.length;X++){const O=u[X];let M=0;for(;M<O.tdList.length;){const b=O.tdList[M];V.includes(b.id)&&(O.tdList.splice(M,1),M--),M++}}this.position.setPositionContext({...t,trIndex:Y.trIndex,tdIndex:Y.tdIndex});const W=Y.value.length-1;this.range.setRange(W,W),this.draw.render(),this.tableTool.render()}cancelMergeTableCell(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,tdIndex:n,trIndex:i}=t,s=this.draw.getOriginalElementList()[e],a=s.trList,c=a[i],d=c.tdList[n];if(d.rowspan===1&&d.colspan===1)return;const u=d.colspan;if(d.colspan>1){for(let h=1;h<d.colspan;h++){const g=lt();c.tdList.splice(n+h,0,{id:g,rowspan:1,colspan:1,value:[{value:_,size:16,tableId:s.id,trId:c.id,tdId:g}]})}d.colspan=1}if(d.rowspan>1){for(let h=1;h<d.rowspan;h++){const g=a[i+h];for(let f=0;f<u;f++){const T=lt();g.tdList.splice(d.colIndex,0,{id:T,rowspan:1,colspan:1,value:[{value:_,size:16,tableId:s.id,trId:g.id,tdId:T}]})}}d.rowspan=1}const R=d.value.length-1;this.range.setRange(R,R),this.draw.render(),this.tableTool.render()}splitVerticalTableCell(){const t=this.position.getPositionContext();if(!t.isTable||this.range.getRange().isCrossRowCol)return;const{index:n,tdIndex:i,trIndex:r}=t,a=this.draw.getOriginalElementList()[n],c=a.trList,d=c[r],u=d.tdList[i];a.colgroup.splice(i+1,0,{width:this.options.table.defaultColMinWidth});for(let R=0;R<c.length;R++){const h=c[R];let g=0;for(;g<h.tdList.length;){const f=h.tdList[g];if(f.rowIndex!==u.rowIndex)f.colIndex<=u.colIndex&&f.colIndex+f.colspan>u.colIndex&&f.colspan++;else if(f.id===u.id){const T=lt();d.tdList.splice(g+u.colspan,0,{id:T,rowspan:u.rowspan,colspan:1,value:[{value:_,size:16,tableId:a.id,trId:h.id,tdId:T}]}),g++}g++}}this.draw.render(),this.tableTool.render()}splitHorizontalTableCell(){const t=this.position.getPositionContext();if(!t.isTable||this.range.getRange().isCrossRowCol)return;const{index:n,tdIndex:i,trIndex:r}=t,a=this.draw.getOriginalElementList()[n],c=a.trList,u=c[r].tdList[i];let R=-1,h=0;for(;h<c.length;){if(h===R){h++;continue}const g=c[h];let f=0;for(;f<g.tdList.length;){const T=g.tdList[f];if(T.id===u.id){const m=lt(),p=lt();c.splice(h+u.rowspan,0,{id:m,height:this.options.table.defaultTrMinHeight,tdList:[{id:p,rowspan:1,colspan:u.colspan,value:[{value:_,size:16,tableId:a.id,trId:m,tdId:p}]}]}),R=h+u.rowspan}else T.rowIndex>=u.rowIndex&&T.rowIndex<u.rowIndex+u.rowspan&&T.rowIndex+T.rowspan>=u.rowIndex+u.rowspan&&T.rowspan++;f++}h++}this.draw.render(),this.tableTool.render()}tableTdVerticalAlign(t){const e=this.tableParticle.getRangeRowCol();if(!e)return;for(let i=0;i<e.length;i++){const r=e[i];for(let s=0;s<r.length;s++){const a=r[s];!a||a.verticalAlign===t||!a.verticalAlign&&t===l.VerticalAlign.TOP||(a.verticalAlign=t)}}const{endIndex:n}=this.range.getRange();this.draw.render({curIndex:n})}tableBorderType(t){const e=this.position.getPositionContext();if(!e.isTable)return;const{index:n}=e,r=this.draw.getOriginalElementList()[n];if(!r.borderType&&t===l.TableBorder.ALL||r.borderType===t)return;r.borderType=t;const{endIndex:s}=this.range.getRange();this.draw.render({curIndex:s})}tableBorderColor(t){const e=this.position.getPositionContext();if(!e.isTable)return;const{index:n}=e,r=this.draw.getOriginalElementList()[n];if(!r.borderColor&&t===this.options.table.defaultBorderColor||r.borderColor===t)return;r.borderColor=t;const{endIndex:s}=this.range.getRange();this.draw.render({curIndex:s,isCompute:!1})}tableTdBorderType(t){const e=this.tableParticle.getRangeRowCol();if(!e)return;const n=e.flat(),i=n.some(s=>!s.borderTypes?.includes(t));n.forEach(s=>{s.borderTypes||(s.borderTypes=[]);const a=s.borderTypes.findIndex(c=>c===t);i?~a||s.borderTypes.push(t):~a&&s.borderTypes.splice(a,1),s.borderTypes.length||delete s.borderTypes});const{endIndex:r}=this.range.getRange();this.draw.render({curIndex:r})}tableTdSlashType(t){const e=this.tableParticle.getRangeRowCol();if(!e)return;const n=e.flat(),i=n.some(s=>!s.slashTypes?.includes(t));n.forEach(s=>{s.slashTypes||(s.slashTypes=[]);const a=s.slashTypes.findIndex(c=>c===t);i?~a||s.slashTypes.push(t):~a&&s.slashTypes.splice(a,1),s.slashTypes.length||delete s.slashTypes});const{endIndex:r}=this.range.getRange();this.draw.render({curIndex:r})}tableTdBackgroundColor(t){const e=this.tableParticle.getRangeRowCol();if(!e)return;for(let i=0;i<e.length;i++){const r=e[i];for(let s=0;s<r.length;s++){const a=r[s];a.backgroundColor=t}}const{endIndex:n}=this.range.getRange();this.range.setRange(n,n),this.draw.render({isCompute:!1})}tableSelectAll(){const t=this.position.getPositionContext(),{index:e,tableId:n,isTable:i}=t;if(!i||!n)return;const{startIndex:r,endIndex:s}=this.range.getRange(),c=this.draw.getOriginalElementList()[e].trList,d=c.length-1,u=c[d].tdList.length-1;this.range.replaceRange({startIndex:r,endIndex:s,tableId:n,startTdIndex:0,endTdIndex:u,startTrIndex:0,endTrIndex:d}),this.draw.render({isSetCursor:!1,isCompute:!1,isSubmitHistory:!1})}tableProperties(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e}=t,i=this.draw.getOriginalElementList()[e],r=this.draw.getOptions().table.tdPadding,s=i.tdPadding||r,a=document.createElement("div");a.className="table-properties-modal",a.setAttribute("editor-component","table-properties-modal"),a.innerHTML=`
|
|
506
|
+
</span>`},r=(u,R,h)=>{const g=[];return R.forEach(f=>{g.push(i(h,f))}),u.forEach(f=>{g.push(i(h,f))}),g.join(" ")},s=e.querySelector(".tooth-preview-upper-left"),a=e.querySelector(".tooth-preview-upper-right"),c=e.querySelector(".tooth-preview-lower-left"),d=e.querySelector(".tooth-preview-lower-right");s&&(s.innerHTML=r(t?.upperLeft||[],t?.upperLeftLetter||[],"upperLeft")),a&&(a.innerHTML=r(t?.upperRight||[],t?.upperRightLetter||[],"upperRight")),c&&(c.innerHTML=r(t?.lowerLeft||[],t?.lowerLeftLetter||[],"lowerLeft")),d&&(d.innerHTML=r(t?.lowerRight||[],t?.lowerRightLetter||[],"lowerRight"))}bindExtraPanelEvents(){const t=this.inputModal;if(!t)return;t.querySelectorAll(".tooth-surface-item").forEach(i=>{i.addEventListener("click",()=>{if(!this.finallyAdd)return;const r=i.dataset.surface;if(!r)return;const s=`${this.finallyAdd.position}-${this.finallyAdd.value}`;this.toothSurfaceMap[s]||(this.toothSurfaceMap[s]=[]);const a=this.toothSurfaceMap[s],c=a.indexOf(r);c>-1?(a.splice(c,1),i.classList.remove("selected")):(a.push(r),i.classList.add("selected")),this.updatePreview()})}),t.querySelectorAll(".tooth-supernumerary-item").forEach(i=>{i.addEventListener("click",()=>{if(!this.finallyAdd)return;const r=i.dataset.supernumerary;if(!r)return;const s=`${this.finallyAdd.position}-${this.finallyAdd.value}`;this.supernumeraryToothMap[s]===r?(delete this.supernumeraryToothMap[s],i.classList.remove("selected")):(t.querySelectorAll(".tooth-supernumerary-item").forEach(a=>a.classList.remove("selected")),this.supernumeraryToothMap[s]=r,i.classList.add("selected")),this.updatePreview()})}),this.updateExtraPanelSelection()}updateExtraPanelSelection(){const t=this.inputModal;if(!t||!this.finallyAdd)return;const e=`${this.finallyAdd.position}-${this.finallyAdd.value}`,n=this.toothSurfaceMap[e]||[];t.querySelectorAll(".tooth-surface-item").forEach(r=>{const s=r.dataset.surface;n.includes(s||"")?r.classList.add("selected"):r.classList.remove("selected")});const i=this.supernumeraryToothMap[e];t.querySelectorAll(".tooth-supernumerary-item").forEach(r=>{r.dataset.supernumerary===i?r.classList.add("selected"):r.classList.remove("selected")})}}const Ir='(function(){"use strict";function f(i){let s="",n=0;for(;n<i.length;){const t=i[n];if(t.type==="table"){if(t.trList)for(let l=0;l<t.trList.length;l++){const o=t.trList[l];for(let e=0;e<o.tdList.length;e++){const r=o.tdList[e];s+=f(r.value)}}}else if(t.type==="hyperlink"){const l=t.hyperlinkId,o=[];for(;n<i.length;){const e=i[n];if(l!==e.hyperlinkId){n--;break}delete e.type,o.push(e),n++}s+=f(o)}else if(t.controlId){if(!t.control?.hide){const l=t.controlId,o=[];for(;n<i.length;){const e=i[n];if(l!==e.controlId){n--;break}e.controlComponent==="value"&&(delete e.controlId,o.push(e)),n++}s+=f(o)}}else(!t.type||t.type==="text")&&!t.area?.hide&&(s+=t.value);n++}return s}function p(i){const s=[],n=/[0-9]/,t=/[A-Za-z]/,l=/\\s/;let o=!1,e=!1,r="";function a(){r&&(s.push(r),r="")}for(const c of i)t.test(c)?(o||a(),r+=c,o=!0,e=!1):n.test(c)?(e||a(),r+=c,o=!1,e=!0):(a(),o=!1,e=!1,l.test(c)||s.push(c));return a(),s}onmessage=i=>{const s=i.data,t=f(s).replace(new RegExp("^"),"").replace(new RegExp("","g"),`\n`),l=p(t);postMessage(l.length)}})();\n',Pr=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",Ir],{type:"text/javascript;charset=utf-8"});function Vh(o){let t;try{if(t=Pr&&(self.URL||self.webkitURL).createObjectURL(Pr),!t)throw"";const e=new Worker(t,{name:o?.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),e}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Ir),{name:o?.name})}}const Mr=`(function(){"use strict";const v={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6},E=["text","hyperlink","subscript","superscript","control","date","label"],L="";function m(c){return!c.type||E.includes(c.type)}function I(c){const{elementList:r,positionList:d}=c,p=[];let u=0;for(;u<r.length;){const t=r[u],l=(e,n,s)=>{const g=e.titleId,a={type:"title",value:"",level:e.level,titleId:g,pageNo:d[u].pageNo},o=[];for(;s<n.length;){const i=n[s];if(g!==i.titleId){s--;break}o.push(i),s++}return a.value=o.filter(i=>m(i)).map(i=>i.value).join("").replace(new RegExp(L,"g"),""),{position:s,titleElement:a}};if(t.titleId){const{position:e,titleElement:n}=l(t,r,u);u=e,p.push(n)}if(t.type==="table"){const e=t.trList;for(let n=0;n<e.length;n++){const s=e[n];for(let g=0;g<s.tdList.length;g++){const a=s.tdList[g].value;if(a.length>1){let o=1;for(;o<a.length;){if(a[o]?.titleId){const{titleElement:i,position:N}=l(a[o],a,o);p.push(i),o=N}o++}}}}}u++}if(!p.length)return null;const f=(t,l)=>{const e=l.subCatalog[l.subCatalog.length-1],n=v[e?.level],s=v[t.level];e&&s>n?f(t,e):l.subCatalog.push({id:t.titleId,name:t.value,level:t.level,pageNo:t.pageNo,subCatalog:[]})},h=[];for(let t=0;t<p.length;t++){const l=p[t],e=h[h.length-1],n=v[e?.level],s=v[l.level];e&&s>n?f(l,e):h.push({id:l.titleId,name:l.value,level:l.level,pageNo:l.pageNo,subCatalog:[]})}return h}onmessage=c=>{const r=c.data,d=I(r);postMessage(d)}})();
|
|
507
|
+
`,Or=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",Mr],{type:"text/javascript;charset=utf-8"});function Yh(o){let t;try{if(t=Or&&(self.URL||self.webkitURL).createObjectURL(Or),!t)throw"";const e=new Worker(t,{name:o?.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),e}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Mr),{name:o?.name})}}const Cr=`(function(){"use strict";function u(e){const t=[];for(const s of e){if(s.type==="table"){const o=s.trList;for(let n=0;n<o.length;n++){const c=o[n];for(let r=0;r<c.tdList.length;r++){const i=c.tdList[r];t.push(...u(i.value))}}}if(s.groupIds)for(const o of s.groupIds)t.includes(o)||t.push(o)}return t}onmessage=e=>{const t=e.data,s=u(t);postMessage(s)}})();
|
|
508
|
+
`,Sr=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",Cr],{type:"text/javascript;charset=utf-8"});function Dh(o){let t;try{if(t=Sr&&(self.URL||self.webkitURL).createObjectURL(Sr),!t)throw"";const e=new Worker(t,{name:o?.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),e}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Cr),{name:o?.name})}}const Er='(function(){"use strict";var F=(e=>(e.HALF="half",e.ONE_THIRD="one-third",e.QUARTER="quarter",e))(F||{}),M=(e=>(e.ARABIC="arabic",e.CHINESE="chinese",e))(M||{});const K="";F.HALF+"",1/2,F.ONE_THIRD+"",1/3,F.QUARTER+"",1/4;function H(e){if(typeof structuredClone=="function")return structuredClone(e);if(!e||typeof e!="object")return e;let I={};return Array.isArray(e)?I=e.map(f=>H(f)):Object.keys(e).forEach(f=>{I[f]=H(e[f])}),I}function D(e,I){const f={};for(const L in e)I.includes(L)&&(f[L]=e[L]);return f}function ee(e,I){return e.length!==I.length?!1:!e.some(f=>!I.includes(f))}var o=(e=>(e.TEXT="text",e.TEXTFIELD="TextField",e.BUTTON="button",e.IMAGE="image",e.TABLE="table",e.HYPERLINK="hyperlink",e.SUPERSCRIPT="superscript",e.SUBSCRIPT="subscript",e.SEPARATOR="separator",e.PAGE_BREAK="pageBreak",e.CONTROL="control",e.AREA="area",e.CHECKBOX="checkbox",e.RADIO="radio",e.LATEX="latex",e.TAB="tab",e.DATE="date",e.BLOCK="block",e.TITLE="title",e.LIST="list",e.SPLIT_TAG="splitTag",e.LABEL="label",e.MENSTRUAL_HISTORY="menstrualHistory",e.FETAL_HEART_POSITION="fetalHeartPosition",e.TOOTH_POSITION="toothPosition",e.SPECIAL_SYMBOLS="specialSymbols",e.MACRO="macro",e.CUSTOM_MACRO="customMacro",e.REUSABLE_ITEM="reusableItem",e.SUB_TEMPLATE="subTemplate",e))(o||{});const y=["rowFlex","rowMargin"],te=["type","font","size","bold","color","italic","highlight","underline","strikeout","rowFlex","rowMargin","dashArray","trList","tdPadding","tableToolDisabled","borderType","borderColor","borderWidth","borderExternalWidth","translateX","width","height","url","colgroup","valueList","control","checkbox","radio","dateFormat","block","level","title","listType","listStyle","listWrap","groupIds","conceptId","imgDisplay","imgFloatPosition","imgToolDisabled","imgPreviewDisabled","imgCrop","imgCaption","textDecoration","extension","externalId","areaId","area","hide","label","labelId","lineWidth","deletePerson","newElEditPerson","deleteTime","newElEditTime","dictCode","macroConfig","menstrualData","menstrualHistoryId","fetalHeartData","fetalHeartPositionId","toothPositionData","toothPositionId","reusableItemConfig","templateId","subTemplateContent","subTemplateRelation","subTemplateConditions","subTemplateExpanded"],oe=["conceptId","extension","externalId","verticalAlign","backgroundColor","borderTypes","slashTypes","disabled","deletable"],w=["font","size","bold","highlight","italic","strikeout","deletePerson","newElEditPerson","deleteTime","color","newElEditTime"];o.TEXT,o.HYPERLINK,o.SUBSCRIPT,o.SUPERSCRIPT,o.CONTROL,o.DATE,o.IMAGE,o.LATEX,o.BLOCK,o.PAGE_BREAK,o.SEPARATOR,o.TABLE,o.TITLE,o.LIST;var Y=(e=>(e.UL="ul",e.OL="ol",e))(Y||{}),k=(e=>(e.DISC="disc",e.CIRCLE="circle",e.SQUARE="square",e.CHECKBOX="checkbox",e))(k||{}),_=(e=>(e.DISC="disc",e.CIRCLE="circle",e.SQUARE="square",e.DECIMAL="decimal",e.CHECKBOX="checkbox",e))(_||{});k.DISC+"",k.CIRCLE+"",k.SQUARE+"",k.CHECKBOX+"",Y.OL+"",Y.UL+"",_.DISC+"",_.CIRCLE+"",_.SQUARE+"",_.DECIMAL+"",_.CHECKBOX+"";var R=(e=>(e.FIRST="first",e.SECOND="second",e.THIRD="third",e.FOURTH="fourth",e.FIFTH="fifth",e.SIXTH="sixth",e))(R||{});R.FIRST+"",R.SECOND+"",R.THIRD+"",R.FOURTH+"",R.FIFTH+"",R.SIXTH+"",R.FIRST+"",R.SECOND+"",R.THIRD+"",R.FOURTH+"",R.FIFTH+"",R.SIXTH+"",R.FIRST,R.SECOND,R.THIRD,R.FOURTH,R.FIFTH,R.SIXTH;var v=(e=>(e.TEXT="text",e.SELECT="select",e.CHECKBOX="checkbox",e.RADIO="radio",e.DATE="date",e.NUMBER="number",e.TEXTFIELD="TextField",e.BUTTON="button",e.MENSTRUAL_HISTORY="menstrualHistory",e))(v||{}),c=(e=>(e.PREFIX="prefix",e.POSTFIX="postfix",e.PRE_TEXT="preText",e.PRETEXTFIX="preTextFix",e.PRETEXTFIX_TEXT="preTextFixText",e.POSTTEXTFIX="postTextFix",e.POSTTEXTFIX_TEXT="postTextFixText",e.POST_TEXT="postText",e.PLACEHOLDER="placeholder",e.TEXTFIXLABEL="textFixLabel",e.VALUE="value",e.DELETEPERSON="deletePerson",e.CHECKBOX="checkbox",e.RADIO="radio",e.UNDERLINE="underline",e))(c||{}),Q=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e.ALIGNMENT="alignment",e.JUSTIFY="justify",e))(Q||{}),q=(e=>(e.CONTAIN="contain",e.COVER="cover",e))(q||{}),W=(e=>(e.REPEAT="repeat",e.NO_REPEAT="no-repeat",e.REPEAT_X="repeat-x",e.REPEAT_Y="repeat-y",e))(W||{});q.COVER,W.NO_REPEAT;var z=(e=>(e.TOP="top",e.MIDDLE="middle",e.BOTTOM="bottom",e))(z||{});z.BOTTOM,F.HALF,F.HALF,Q.CENTER,M.ARABIC,z.BOTTOM;var Z=(e=>(e.TEXT="text",e.IMAGE="image",e))(Z||{});Z.TEXT,M.ARABIC;var j=(e=>(e.PAGE="page",e.CONTINUITY="continuity",e))(j||{});j.CONTINUITY;function ne(e,I){const f=Object.keys(e),L=Object.keys(I);if(f.length!==L.length)return!1;for(let S=0;S<f.length;S++){const C=f[S];if(C!=="value"&&!(C==="groupIds"&&Array.isArray(e[C])&&Array.isArray(I[C])&&ee(e[C],I[C]))&&e[C]!==I[C])return!1}return!0}function N(e,I={}){const{extraPickAttrs:f}=I,L=[...te];f&&L.push(...f);const S={value:e?.value===K?`\n`:e?.value};return e&&L.forEach(C=>{const T=e[C];T!==void 0&&(S[C]=T)}),S}function P(e,I={}){const{extraPickAttrs:f,isClassifyArea:L=!1,isClone:S=!0,editorOptions:C}=I,T=(S?H(e):e).filter(t=>t.type!==o.SPLIT_TAG),B=[];let l=0;for(;l<T.length;){let t=T[l];if(l===0&&t.value===K&&!t.listId&&(!t.type||t.type===o.TEXT)){l++;continue}if(t.areaId){const r=t.areaId,O=t.area,E=[];for(;l<T.length;){const i=T[l];if(r!==i.areaId){l--;break}delete i.area,delete i.areaId,E.push(i),l++}const a=P(E,I);if(L){const i={type:o.AREA,value:"",areaId:r,area:O};i.valueList=a,t=i}else{B.splice(l,0,...a);continue}}else if(t.titleId&&t.level){const r=t.titleId;if(r){const O=t.level,E={type:o.TITLE,title:t.title,titleId:r,value:"",level:O},a=[];for(;l<T.length;){const i=T[l];if(r!==i.titleId){l--;break}delete i.level,delete i.title,a.push(i),l++}E.valueList=P(a,I),t=E}}else if(t.listId&&t.listType){const r=t.listId;if(r){const O=t.listType,E=t.listStyle,a=t?.label,i={type:o.LIST,value:"",label:a||"",listId:r,listType:O,listStyle:E},d=[];for(;l<T.length;){const s=T[l];if(r!==s.listId){l--;break}delete s.listType,delete s.listStyle,d.push(s),l++}i.valueList=P(d,I),t=i}}else if(t.type===o.TABLE){if(t.pagingId){let r=l+1,O=0;for(;r<T.length;){const E=T[r];if(E.pagingId===t.pagingId){t.height+=E.height;const a=E.trList.filter(i=>!i.pagingRepeat).filter(i=>(i.tdList=i.tdList.filter(d=>{if(d.originalId){for(let s=0;s<t.trList.length;s++){const u=t.trList[s].tdList.find(({id:n})=>n===d.originalId);if(u){d.value[0]?.type===o.SPLIT_TAG&&d.value.splice(0,1),u.value.push(...d.value),u.rowspan=u.originalRowspan??u.rowspan;break}}return!1}return!0}),!i.originalId));t.trList.push(...a),t.trList?.forEach(i=>i.minHeight=i.originalMinHeight??i.minHeight),r++,O++}else break}l+=O}if(t.trList)for(let r=0;r<t.trList.length;r++){const O=t.trList[r];delete O.id;for(let E=0;E<O.tdList.length;E++){const a=O.tdList[E],i={colspan:a.colspan,rowspan:a.rowspan,value:P(a.value,{...I,isClassifyArea:!1})};oe.forEach(d=>{const s=a[d];s!==void 0&&(i[d]=s)}),O.tdList[E]=i}}}else if(t.type===o.HYPERLINK){const r=t.hyperlinkId;if(r){const O={type:o.HYPERLINK,value:"",url:t.url},E=[];for(;l<T.length;){const a=T[l];if(r!==a.hyperlinkId){l--;break}delete a.type,delete a.url,E.push(a),l++}O.valueList=P(E,I),t=O}}else if(t.type===o.DATE){const r=t.dateId;if(r){const O={type:o.DATE,value:"",dateFormat:t.dateFormat},E=[];for(;l<T.length;){const a=T[l];if(r!==a.dateId){l--;break}delete a.type,delete a.dateFormat,E.push(a),l++}O.valueList=P(E,I),t=O}}else if(t.type!==o.BUTTON){if(t.controlId){const r=t.controlId;if(!(t.controlComponent===c.PREFIX||t.controlComponent===c.PRETEXTFIX||t.controlComponent===c.PRETEXTFIX_TEXT)&&t.controlComponent===c.VALUE){if(t.type===o.MENSTRUAL_HISTORY||t.type===o.FETAL_HEART_POSITION||t.type===o.TOOTH_POSITION||t.type===o.MACRO||t.type===o.CUSTOM_MACRO||t.type===o.REUSABLE_ITEM||t.type===o.LIST||t.type===o.SPECIAL_SYMBOLS){let d=!1;for(let s=l-1;s>=0;s--){const p=T[s],u=p.controlComponent===c.PREFIX||p.controlComponent===c.PRETEXTFIX||p.controlComponent===c.PRETEXTFIX_TEXT;if(p.controlId===r&&u){d=!0;break}if(p.controlId!==r)break}if(!d){const s=H(t);delete s.controlId,delete s.control,delete s.controlComponent,delete s.originControlId,B.push(s),l++;continue}}l++;continue}if(t.controlComponent===c.PLACEHOLDER||t.controlComponent===c.POSTFIX||t.controlComponent===c.POSTTEXTFIX||t.controlComponent===c.POSTTEXTFIX_TEXT||t.controlComponent===c.POST_TEXT||t.controlComponent===c.PRE_TEXT||t.controlComponent===c.CHECKBOX||t.controlComponent===c.RADIO){l++;continue}const E=(i,d,s,p)=>{if(p===v.CHECKBOX||p===v.RADIO){let n=-1;for(let g=i;g<T.length&&T[g].controlId===d;g++)n=g;return n}const u=s?[c.POSTTEXTFIX,c.POSTTEXTFIX_TEXT]:[c.POSTFIX];for(let n=i;n<T.length;n++){const g=T[n];if(g.controlId===d&&u.includes(g.controlComponent))return n}return-1},a=(i,d,s)=>{const p=[];let u=i;for(;u<=d;){const n=T[u];if(n.controlId&&n.controlId!==s&&n.control){const A=n.control?.type,b=A===v.TEXTFIELD,h=b?c.PRETEXTFIX:c.PREFIX,x=n.controlComponent===h,m=A===v.CHECKBOX||A===v.RADIO;if(x||m&&(n.controlComponent===c.CHECKBOX||n.controlComponent===c.RADIO)){const X=E(u+1,n.controlId,b,A);if(X!==-1){const V=T.slice(u,X+1).map(le=>{const $=H(le);return delete $.originControlId,$}),U=P(V,I);U.length>0&&p.push(U[0]),u=X+1;continue}}}if(!(n.controlId===s&&(n.controlComponent===c.VALUE||!n.controlComponent)&&(!n.originControlId||n.originControlId===s)||n.originControlId===s&&n.controlComponent===c.VALUE||n.controlId===s&&(n.controlComponent===c.CHECKBOX||n.controlComponent===c.RADIO)&&!n.originControlId)){u++;continue}if(n.type===o.MENSTRUAL_HISTORY||n.type===o.FETAL_HEART_POSITION||n.type===o.TOOTH_POSITION||n.type===o.MACRO||n.type===o.CUSTOM_MACRO||n.type===o.REUSABLE_ITEM||n.type===o.LIST||n.type===o.SPECIAL_SYMBOLS){const A=H(n);delete A.controlId,delete A.control,delete A.controlComponent,delete A.originControlId,p.push(A),u++;continue}if(n.controlComponent===c.CHECKBOX||n.controlComponent===c.RADIO){p.push(H(n)),u++;continue}const J=t.control?.type;if(J===v.CHECKBOX||J===v.RADIO){let A=u-1,b=!1;for(;A>=i-1;){const h=T[A];if(h.controlId===s&&!h.originControlId)if(h.controlComponent===c.CHECKBOX){b=h.checkbox?.value===!0;break}else if(h.controlComponent===c.RADIO){b=h.radio?.value===!0;break}else if(h.controlComponent===c.VALUE){A--;continue}else break;A--}if(b){const h={value:n.value||""},x=[...y,"color","bold","italic","underline","strikeout","size","font","highlight","textDecoration"];for(const m of x){const X=n[m];if(X!==void 0){if(m==="color"&&C){const V=C.control?.bracketColor,U=C.control?.placeholderColor;if(X===V||X===U)continue}h[m]=X}}p.push(h)}}else{const A={value:n.value||""},b=[...y,"color","bold","italic","underline","strikeout","size","font","highlight","textDecoration"];for(const h of b){const x=n[h];if(x!==void 0){if(h==="color"&&C){const m=C.control?.bracketColor,X=C.control?.placeholderColor;if(x===m||x===X)continue}A[h]=x}}p.push(A)}u++}return p};if(t.controlComponent===c.PREFIX){const i=t.control?.type===v.TEXTFIELD,d=E(l+1,r,i);if(d!==-1){const s=a(l+1,d-1,r),p=D(t,w),u={...t.control,...p,value:s},n={...D(t,y),type:o.CONTROL,value:"",control:u,controlId:r};t=N(n,{extraPickAttrs:f}),l=d}}if(t.controlComponent===c.PRETEXTFIX){const i=E(l+1,r,!0);if(i!==-1){const d=a(l+1,i-1,r),s=D(t,w),p={...t.control,...s,value:d},u={...D(t,y),type:o.CONTROL,value:"",control:p,controlId:r};t=N(u,{extraPickAttrs:f}),l=i}}if(t.controlComponent===c.PRETEXTFIX_TEXT){const i=E(l+1,r,!0);if(i!==-1){const d=a(l+1,i-1,r),s=D(t,w),p={...t.control,...s,value:d},u={...D(t,y),type:o.CONTROL,value:"",control:p,controlId:r};t=N(u,{extraPickAttrs:f}),l=i}}}}const G=N(t,{extraPickAttrs:f});if(!t.type||t.type===o.TEXT||t.type===o.SUBSCRIPT||t.type===o.SUPERSCRIPT)for(;l<T.length;){const r=T[l+1];if(l++,r&&ne(G,N(r,{extraPickAttrs:f}))){const O=r.value===K?`\n`:r.value;G.value+=O}else break}else l++;B.push(G)}return B}onmessage=e=>{const I=e.data,{options:f,data:L}=I,{extraPickAttrs:S=[]}=f||{},C={header:P(L.header,{extraPickAttrs:S,isClone:!1}),main:P(L.main,{extraPickAttrs:S,isClassifyArea:!0,isClone:!1}),footer:P(L.footer,{extraPickAttrs:S,isClone:!1})};postMessage(C)}})();\n',Xr=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",Er],{type:"text/javascript;charset=utf-8"});function Uh(o){let t;try{if(t=Xr&&(self.URL||self.webkitURL).createObjectURL(Xr),!t)throw"";const e=new Worker(t,{name:o?.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),e}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Er),{name:o?.name})}}class wh{draw;wordCountWorker;catalogWorker;groupWorker;valueWorker;constructor(t){this.draw=t,this.wordCountWorker=new Vh,this.catalogWorker=new Yh,this.groupWorker=new Dh,this.valueWorker=new Uh}getWordCount(){return new Promise((t,e)=>{this.wordCountWorker.onmessage=i=>{t(i.data)},this.wordCountWorker.onerror=i=>{e(i)};const n=this.draw.getOriginalMainElementList();this.wordCountWorker.postMessage(n)})}getCatalog(){return new Promise((t,e)=>{this.catalogWorker.onmessage=r=>{t(r.data)},this.catalogWorker.onerror=r=>{e(r)};const n=this.draw.getOriginalMainElementList(),i=this.draw.getPosition().getOriginalMainPositionList();this.catalogWorker.postMessage({elementList:n,positionList:i})})}getGroupIds(){return new Promise((t,e)=>{this.groupWorker.onmessage=i=>{t(i.data)},this.groupWorker.onerror=i=>{e(i)};const n=this.draw.getOriginalMainElementList();this.groupWorker.postMessage(n)})}getValue(t){return new Promise((e,n)=>{this.valueWorker.onmessage=i=>{e({version:ve,data:i.data,options:at(this.draw.getOptions())})},this.valueWorker.onerror=i=>{n(i)},this.valueWorker.postMessage({data:this.draw.getOriginValue(t),options:t})})}}class Zh{container;canvas;draw;options;curElement;curElementSrc;previewerDrawOption;curPosition;eventBus;imageList;curShowElement;imageCount;imagePre;imageNext;resizerSelection;resizerHandleList;resizerImageContainer;resizerImage;resizerSize;width;height;mousedownX;mousedownY;curHandleIndex;previewerContainer;previewerImage;constructor(t){this.container=t.getContainer(),this.canvas=t.getPage(),this.draw=t,this.options=t.getOptions(),this.curElement=null,this.curElementSrc="",this.previewerDrawOption={},this.curPosition=null,this.eventBus=t.getEventBus(),this.imageList=[],this.curShowElement=null,this.imageCount=null,this.imagePre=null,this.imageNext=null;const{resizerSelection:e,resizerHandleList:n,resizerImageContainer:i,resizerImage:r,resizerSize:s}=this._createResizerDom();this.resizerSelection=e,this.resizerHandleList=n,this.resizerImageContainer=i,this.resizerImage=r,this.resizerSize=s,this.width=0,this.height=0,this.mousedownX=0,this.mousedownY=0,this.curHandleIndex=0,this.previewerContainer=null,this.previewerImage=null}_getElementPosition(t,e=null){const{scale:n}=this.options;let i=0,r=0;const s=this.draw.getHeight(),a=this.draw.getPageGap(),d=(e?.pageNo??this.draw.getPageNo())*(s+a);if(t.imgFloatPosition)i=t.imgFloatPosition.x*n,r=t.imgFloatPosition.y*n+d;else if(e){const{coordinate:{leftTop:[u,R]},ascent:h}=e;i=u,r=R+d+h}return{x:i,y:r}}_createResizerDom(){const{scale:t}=this.options,e=document.createElement("div");e.classList.add(`${z}-resizer-selection`),e.style.display="none",e.style.borderColor=this.options.resizerColor,e.style.borderWidth=`${t}px`;const n=[];for(let c=0;c<8;c++){const d=document.createElement("div");d.style.background=this.options.resizerColor,d.classList.add("resizer-handle"),d.classList.add(`handle-${c}`),d.setAttribute("data-index",String(c)),d.onmousedown=this._mousedown.bind(this),e.append(d),n.push(d)}this.container.append(e);const i=document.createElement("div");i.classList.add(`${z}-resizer-size-view`);const r=document.createElement("span");i.append(r),e.append(i);const s=document.createElement("div");s.classList.add(`${z}-resizer-image`),s.style.display="none";const a=document.createElement("img");return s.append(a),this.container.append(s),{resizerSelection:e,resizerHandleList:n,resizerImageContainer:s,resizerImage:a,resizerSize:r}}_keydown=()=>{this.resizerSelection.style.display==="block"&&(this.clearResizer(),document.removeEventListener("keydown",this._keydown))};_mousedown(t){if(this.canvas=this.draw.getPage(),!this.curElement)return;const{scale:e}=this.options;this.mousedownX=t.x,this.mousedownY=t.y;const n=t.target;this.curHandleIndex=Number(n.dataset.index);const i=window.getComputedStyle(n).cursor;document.body.style.cursor=i,this.canvas.style.cursor=i,this.resizerImage.src=this.curElementSrc,this.resizerImageContainer.style.display="block";const{x:r,y:s}=this._getElementPosition(this.curElement,this.curPosition);this.resizerImageContainer.style.left=`${r}px`,this.resizerImageContainer.style.top=`${s}px`,this.resizerImage.style.width=`${this.curElement.width*e}px`,this.resizerImage.style.height=`${this.curElement.height*e}px`;const a=this._mousemove.bind(this);document.addEventListener("mousemove",a),document.addEventListener("mouseup",()=>{this.curElement&&!this.previewerDrawOption.dragDisable&&(this.curElement.width=this.width,this.curElement.height=this.height,this.draw.render({isSetCursor:!0,curIndex:this.curPosition?.index})),this.resizerImageContainer.style.display="none",document.removeEventListener("mousemove",a),document.body.style.cursor="",this.canvas.style.cursor="text"},{once:!0}),t.preventDefault()}_mousemove(t){if(!this.curElement||this.previewerDrawOption.dragDisable)return;const{scale:e}=this.options;let n=0,i=0;switch(this.curHandleIndex){case 0:{const d=this.mousedownX-t.x,u=this.mousedownY-t.y;n=Math.cbrt(d**3+u**3),i=this.curElement.height*n/this.curElement.width}break;case 1:i=this.mousedownY-t.y;break;case 2:{const d=t.x-this.mousedownX,u=this.mousedownY-t.y;n=Math.cbrt(d**3+u**3),i=this.curElement.height*n/this.curElement.width}break;case 4:{const d=t.x-this.mousedownX,u=t.y-this.mousedownY;n=Math.cbrt(d**3+u**3),i=this.curElement.height*n/this.curElement.width}break;case 3:n=t.x-this.mousedownX;break;case 5:i=t.y-this.mousedownY;break;case 6:{const d=this.mousedownX-t.x,u=t.y-this.mousedownY;n=Math.cbrt(d**3+u**3),i=this.curElement.height*n/this.curElement.width}break;case 7:n=this.mousedownX-t.x;break}const r=this.curElement.width+n/e,s=this.curElement.height+i/e;if(r<=0||s<=0)return;this.width=r,this.height=s;const a=r*e,c=s*e;this.resizerImage.style.width=`${a}px`,this.resizerImage.style.height=`${c}px`,this._updateResizerRect(a,c),this._updateResizerSizeView(a,c),t.preventDefault(),this.eventBus.isSubscribe("imageSizeChange")&&this.eventBus.emit("imageSizeChange",{element:this.curElement})}_drawPreviewer(){const t=document.createElement("div");t.classList.add(`${z}-image-previewer`);const e=document.createElement("i");e.classList.add("image-close"),e.onclick=()=>{this._clearPreviewer()},t.append(e);const n=document.createElement("div");n.classList.add(`${z}-image-container`);const i=document.createElement("img");i.src=this.curElementSrc,i.draggable=!1,n.append(i),this.previewerImage=i,t.append(n);let r=0,s=0,a=1,c=0;const d=document.createElement("div");d.classList.add(`${z}-image-menu`);const u=document.createElement("div");u.classList.add("image-navigate");const R=document.createElement("i");R.classList.add("image-pre"),R.onclick=()=>{const S=this.imageList.findIndex(F=>F.id===this.curShowElement?.id);S<=0||(this.curShowElement=this.imageList[S-1],i.src=this.curShowElement.value,this._updateImageNavigate())},u.append(R),this.imagePre=R;const h=document.createElement("span");h.classList.add("image-count"),this.imageCount=h,u.append(h);const g=document.createElement("i");g.classList.add("image-next"),g.onclick=()=>{const S=this.imageList.findIndex(F=>F.id===this.curShowElement?.id);S>=this.imageList.length-1||(this.curShowElement=this.imageList[S+1],i.src=this.curShowElement.value,this._updateImageNavigate())},this.imageNext=g,u.append(g),d.append(u);const f=document.createElement("i");f.classList.add("zoom-in"),f.onclick=()=>{a+=.1,this._setPreviewerTransform(a,c,r,s)},d.append(f);const T=document.createElement("i");T.onclick=()=>{a-.1<=.1||(a-=.1,this._setPreviewerTransform(a,c,r,s))},T.classList.add("zoom-out"),d.append(T);const m=document.createElement("i");m.classList.add("rotate"),m.onclick=()=>{c+=1,this._setPreviewerTransform(a,c,r,s)},d.append(m);const p=document.createElement("i");p.classList.add("original-size"),p.onclick=()=>{r=0,s=0,a=1,c=0,this._setPreviewerTransform(a,c,r,s)},d.append(p);const I=document.createElement("i");I.classList.add("image-download"),I.onclick=()=>{const{mime:S}=this.previewerDrawOption;Vi(i.src,`${this.curElement?.id}.${S||"png"}`)},d.append(I),t.append(d),this.previewerContainer=t,document.body.append(t);let L=0,P=0,C=!1;i.onmousedown=S=>{C=!0,L=S.x,P=S.y,t.style.cursor="move"},t.onmousemove=S=>{C&&(r+=S.x-L,s+=S.y-P,L=S.x,P=S.y,this._setPreviewerTransform(a,c,r,s))},t.onmouseup=()=>{C=!1,t.style.cursor="auto"},t.onwheel=S=>{if(S.preventDefault(),S.stopPropagation(),S.deltaY<0)a+=.1;else{if(a-.1<=.1)return;a-=.1}this._setPreviewerTransform(a,c,r,s)},this._updateImageNavigate()}_updateImageNavigate(){const t=this.imageList.findIndex(e=>e.id===this.curShowElement?.id);this.imageCount.innerText=`${t+1} / ${this.imageList.length}`,t<=0?this.imagePre.classList.add("disabled"):this.imagePre.classList.remove("disabled"),t>=this.imageList.length-1?this.imageNext.classList.add("disabled"):this.imageNext.classList.remove("disabled")}_setPreviewerTransform(t,e,n,i){this.previewerImage&&(this.previewerImage.style.left=`${n}px`,this.previewerImage.style.top=`${i}px`,this.previewerImage.style.transform=`scale(${t}) rotate(${e*90}deg)`)}_clearPreviewer(){this.previewerContainer?.remove(),this.previewerContainer=null,document.body.style.overflow="auto"}_updateResizerRect(t,e){const{resizerSize:n,scale:i}=this.options,r=this.draw.isReadonly();this.resizerSelection.style.width=`${t}px`,this.resizerSelection.style.height=`${e}px`;for(let s=0;s<8;s++){const a=s===0||s===6||s===7?-n:s===1||s===5?t/2:t-n,c=s===0||s===1||s===2?-n:s===3||s===7?e/2-n:e-n;this.resizerHandleList[s].style.transform=`scale(${i})`,this.resizerHandleList[s].style.left=`${a}px`,this.resizerHandleList[s].style.top=`${c}px`,this.resizerHandleList[s].style.display=r?"none":"block"}}_updateResizerSizeView(t,e){this.resizerSize.innerText=`${Math.round(t)} × ${Math.round(e)}`}render(){const t=this.draw.getMode();!this.curElement||this.curElement.imgToolDisabled&&!this.draw.isDesignMode()||t===l.EditorMode.PRINT&&this.options.modeRule[l.EditorMode.PRINT]?.imagePreviewerDisabled||t===l.EditorMode.READONLY&&this.options.modeRule[l.EditorMode.READONLY]?.imagePreviewerDisabled||(this.imageList=this.draw.getImageParticle().getOriginalMainImageList(),this.curShowElement=this.curElement,this._drawPreviewer(),document.body.style.overflow="hidden")}drawResizer(t,e=null,n={}){const i=this.draw.getMode();t.imgToolDisabled&&!this.draw.isDesignMode()||i===l.EditorMode.PRINT&&this.options.modeRule[l.EditorMode.PRINT]?.imagePreviewerDisabled||i===l.EditorMode.READONLY&&this.options.modeRule[l.EditorMode.READONLY]?.imagePreviewerDisabled||(this.previewerDrawOption=n,this.curElementSrc=t[n.srcKey||"value"]||"",this.updateResizer(t,e),document.addEventListener("keydown",this._keydown))}updateResizer(t,e=null){const{scale:n}=this.options,i=t.width*n,r=t.height*n;this._updateResizerSizeView(i,r);const{x:s,y:a}=this._getElementPosition(t,e);this.resizerSelection.style.left=`${s}px`,this.resizerSelection.style.top=`${a}px`,this.resizerSelection.style.borderWidth=`${n}px`,this._updateResizerRect(i,r),this.resizerSelection.style.display="block",this.curElement=t,this.curPosition=e,this.width=i,this.height=r}clearResizer(){this.resizerSelection.style.display="none",document.removeEventListener("keydown",this._keydown)}}class Qh{draw;range;datePicker;options;constructor(t){this.draw=t,this.options=t.getOptions(),this.range=t.getRange(),this.datePicker=new hr(t,{onSubmit:this._setValue.bind(this)})}_setValue(t){if(!t)return;const e=this.getDateElementRange();if(!e)return;const[n,i]=e,r=this.draw.getElementList(),s=r[n+1];this.draw.spliceElementList(r,n+1,i-n),this.range.setRange(n,n);const a={type:l.ElementType.DATE,value:"",dateFormat:s.dateFormat,valueList:[{value:t}]};wt(r,[a],n,{editorOptions:this.options}),this.draw.insertElementList([a])}getDateElementRange(){let t=-1,e=-1;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return null;const r=this.draw.getElementList(),s=r[n];if(s.type!==l.ElementType.DATE)return null;let a=n;for(;a>=0;){if(r[a].dateId!==s.dateId){t=a;break}a--}let c=n+1;for(;c<r.length;){if(r[c].dateId!==s.dateId){e=c-1;break}c++}return c===r.length&&(e=c-1),!~t||!~e?null:[t,e]}clearDatePicker(){this.datePicker.dispose()}renderDatePicker(t,e){const n=this.draw.getElementList(),i=this.getDateElementRange(),r=i?n.slice(i[0]+1,i[1]+1).map(s=>s.value).join(""):"";this.datePicker.render({value:r,position:e,dateFormat:t.dateFormat})}}class Nr{element;videoCache;constructor(t){this.element=t,this.videoCache=new Map}snapshot(t,e,n){return new Promise((i,r)=>{const s=this.element.block?.videoBlock?.src||"";if(this.videoCache.has(s)){const a=this.videoCache.get(s);t.drawImage(a,e,n,this.element.metrics.width,this.element.metrics.height),i(this.element)}else{const a=document.createElement("video");a.src=s,a.muted=!0,a.crossOrigin="anonymous",a.onloadeddata=()=>{t.drawImage(a,e,n,this.element.metrics.width,this.element.metrics.height),this.videoCache.set(s,a),i(this.element)},a.onerror=c=>{r(c)},a.play().then(()=>{a.pause()})}})}render(t){const e=this.element.block,n=document.createElement("video");n.style.width="100%",n.style.height="100%",n.style.objectFit="contain",n.src=e.videoBlock?.src||"",n.controls=!0,t.append(n)}}class vh{draw;options;element;block;blockContainer;blockItem;blockCache;resizerMask;resizerSelection;resizerHandleList;width;height;mousedownX;mousedownY;curHandleIndex;isAllowResize;constructor(t,e){this.draw=t.getDraw(),this.options=this.draw.getOptions(),this.blockContainer=t.getBlockContainer(),this.element=e,this.block=null;const{blockItem:n,resizerMask:i,resizerSelection:r,resizerHandleList:s}=this._createBlockItem();this.blockItem=n,this.blockContainer.append(this.blockItem),this.blockCache=new Map,this.resizerMask=i,this.resizerSelection=r,this.resizerHandleList=s,this.width=0,this.height=0,this.mousedownX=0,this.mousedownY=0,this.curHandleIndex=0,this.isAllowResize=!1}getBlockElement(){return this.element}getBlockWidth(){return this.element.width||this.element.metrics.width}_createBlockItem(){const{scale:t,resizerColor:e}=this.options,n=document.createElement("div");n.classList.add(`${z}-block-item`);const i=document.createElement("div");i.style.display="none",i.classList.add(`${z}-resizer-selection`),i.style.borderColor=e,i.style.borderWidth=`${t}px`;const r=[];for(let a=0;a<8;a++){const c=document.createElement("div");c.style.background=e,c.classList.add("resizer-handle"),c.classList.add(`handle-${a}`),c.setAttribute("data-index",String(a)),c.onmousedown=this._mousedown.bind(this),i.append(c),r.push(c)}const s=document.createElement("div");return s.classList.add(`${z}-resizer-mask`),s.style.display="none",n.append(s),n.onmouseenter=()=>{if(this.draw.isReadonly())return;const{width:c,height:d}=this.element.metrics;this._updateResizerRect(c,d),i.style.display="block"},n.onmouseleave=()=>{this.isAllowResize||(i.style.display="none")},n.append(i),{blockItem:n,resizerMask:s,resizerSelection:i,resizerHandleList:r}}_updateResizerRect(t,e){const{resizerSize:n,scale:i}=this.options;this.resizerSelection.style.width=`${t}px`,this.resizerSelection.style.height=`${e}px`;for(let r=0;r<8;r++){const s=r===0||r===6||r===7?-n:r===1||r===5?t/2:t-n,a=r===0||r===1||r===2?-n:r===3||r===7?e/2-n:e-n;this.resizerHandleList[r].style.transform=`scale(${i})`,this.resizerHandleList[r].style.left=`${s}px`,this.resizerHandleList[r].style.top=`${a}px`}}_mousedown(t){const e=this.draw.getPage();this.mousedownX=t.x,this.mousedownY=t.y,this.isAllowResize=!0;const n=t.target;this.curHandleIndex=Number(n.dataset.index),this.resizerMask.style.display="block";const i=window.getComputedStyle(n).cursor;document.body.style.cursor=i,e.style.cursor=i;const r=this._mousemove.bind(this);document.addEventListener("mousemove",r),document.addEventListener("mouseup",()=>{this.element.width=Math.min(this.width,this.draw.getInnerWidth()),this.element.height=this.height,this.isAllowResize=!1,this.resizerSelection.style.display="none",this.resizerMask.style.display="none",document.removeEventListener("mousemove",r),document.body.style.cursor="",e.style.cursor="text",this.draw.render()},{once:!0}),t.preventDefault()}_mousemove(t){if(!this.isAllowResize)return;const{scale:e}=this.options;let n=0,i=0;switch(this.curHandleIndex){case 0:{const d=this.mousedownX-t.x,u=this.mousedownY-t.y;n=Math.cbrt(d**3+u**3),i=this.element.height*n/this.getBlockWidth()}break;case 1:i=this.mousedownY-t.y;break;case 2:{const d=t.x-this.mousedownX,u=this.mousedownY-t.y;n=Math.cbrt(d**3+u**3),i=this.element.height*n/this.getBlockWidth()}break;case 4:{const d=t.x-this.mousedownX,u=t.y-this.mousedownY;n=Math.cbrt(d**3+u**3),i=this.element.height*n/this.getBlockWidth()}break;case 3:n=t.x-this.mousedownX;break;case 5:i=t.y-this.mousedownY;break;case 6:{const d=this.mousedownX-t.x,u=t.y-this.mousedownY;n=Math.cbrt(d**3+u**3),i=this.element.height*n/this.getBlockWidth()}break;case 7:n=this.mousedownX-t.x;break}const r=this.getBlockWidth()+n/e,s=this.element.height+i/e;if(r<=0||s<=0)return;this.width=r,this.height=s;const a=r*e,c=s*e;this._updateResizerRect(a,c),this.blockItem.style.width=`${a}px`,this.blockItem.style.height=`${c}px`,t.preventDefault()}snapshot(t,e,n){if(this.element.block.type===l.BlockType.VIDEO)if(this.blockItem.style.display="none",this.blockCache.has(this.element.id))this.blockCache.get(this.element.id).snapshot(t,e,n);else{this.block=new Nr(this.element);const r=this.block.snapshot(t,e,n);this.draw.getImageObserver().add(r),this.blockCache.set(this.element.id,this.block)}}render(){const t=this.element.block;t.type===l.BlockType.IFRAME?(this.block=new qe(this.element),this.block.render(this.blockItem)):t.type===l.BlockType.VIDEO&&(this.block=new Nr(this.element),this.block.render(this.blockItem))}setClientRects(t,e,n){const i=this.draw.getHeight(),r=this.draw.getPageGap(),s=t*(i+r),{metrics:a}=this.element;this.blockItem.style.display="block",this.blockItem.style.width=`${a.width}px`,this.blockItem.style.height=`${a.height}px`,this.blockItem.style.left=`${e}px`,this.blockItem.style.top=`${s+n}px`}remove(){this.blockItem.remove()}}class Kh{draw;container;blockContainer;blockMap;constructor(t){this.draw=t,this.container=t.getContainer(),this.blockMap=new Map,this.blockContainer=this._createBlockContainer(),this.container.append(this.blockContainer)}_createBlockContainer(){const t=document.createElement("div");return t.classList.add(`${z}-block-container`),t}getDraw(){return this.draw}getBlockContainer(){return this.blockContainer}render(t,e,n,i,r){const s=n.id;let a=this.blockMap.get(s);a||(a=new vh(this,n),a.render(),this.blockMap.set(s,a)),this.draw.isPrintMode()?a.snapshot(t,i,r):a.setClientRects(e,i,r)}clear(){if(!this.blockMap.size)return;const t=this.draw.getOriginalMainElementList(),e=[];for(let n=0;n<t.length;n++){const i=t[n];i.type===l.ElementType.BLOCK&&e.push(i.id)}this.blockMap.forEach(n=>{const i=n.getBlockElement().id;e.includes(i)||(n.remove(),this.blockMap.delete(i))})}}const Ei={contextmenu:{global:{cut:"剪切",copy:"复制",paste:"粘贴",selectAll:"全选",print:"打印",cancel:"取消"},control:{delete:"删除控件",editAttribute:"修改元素配置",addExpression:"添加表达式",addMenstrualHistory:"月经史",addFetalHeartPosition:"胎心位置"},hyperlink:{delete:"删除链接",cancel:"取消链接",edit:"编辑链接"},image:{change:"更改图片",saveAs:"另存为图片",textWrap:"文字环绕",textWrapType:{embed:"嵌入型",upDown:"上下型环绕",surround:"四周型环绕",floatTop:"浮于文字上方",floatBottom:"衬于文字下方"}},table:{insertRowCol:"插入行列",insertTopRow:"上方插入1行",insertBottomRow:"下方插入1行",insertLeftCol:"左侧插入1列",insertRightCol:"右侧插入1列",deleteRowCol:"删除行列",deleteRow:"删除1行",deleteCol:"删除1列",deleteTable:"删除整个表格",mergeCell:"合并单元格",mergeCancelCell:"取消合并",verticalAlign:"垂直对齐",verticalAlignTop:"顶端对齐",verticalAlignMiddle:"垂直居中",verticalAlignBottom:"底端对齐",border:"表格边框",borderAll:"所有框线",borderEmpty:"无框线",borderDash:"虚框线",borderExternal:"外侧框线",borderInternal:"内侧框线",borderTd:"单元格边框",borderTdTop:"上边框",borderTdRight:"右边框",borderTdBottom:"下边框",borderTdLeft:"左边框",borderTdForward:"正斜线",borderTdBack:"反斜线",tableProperties:"表格属性"}},datePicker:{now:"此刻",confirm:"确定",return:"返回日期",timeSelect:"时间选择",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},year:"年",month:"月",hour:"时",minute:"分",second:"秒"},frame:{header:"页眉",footer:"页脚"},pageBreak:{displayName:"分页符"},zone:{headerTip:"双击编辑页眉",footerTip:"双击编辑页脚"}},Hh={contextmenu:{global:{cut:"Cut",copy:"Copy",paste:"Paste",selectAll:"Select all",print:"Print",cancel:"Cancel"},control:{delete:"Delete control",editAttribute:"Edit control config",addExpression:"Add expression",addMenstrualHistory:"Menstrual History",addFetalHeartPosition:"Fetal Heart Position"},hyperlink:{delete:"Delete hyperlink",cancel:"Cancel hyperlink",edit:"Edit hyperlink"},image:{change:"Change image",saveAs:"Save as image",textWrap:"Text wrap",textWrapType:{embed:"Embed",upDown:"Up down",surround:"Surround",floatTop:"Float above text",floatBottom:"Float below text"}},table:{insertRowCol:"Insert row col",insertTopRow:"Insert top 1 row",insertBottomRow:"Insert bottom 1 row",insertLeftCol:"Insert left 1 col",insertRightCol:"Insert right 1 col",deleteRowCol:"Delete row col",deleteRow:"Delete 1 row",deleteCol:"Delete 1 col",deleteTable:"Delete table",mergeCell:"Merge cell",mergeCancelCell:"Cancel merge cell",verticalAlign:"Vertical align",verticalAlignTop:"Top",verticalAlignMiddle:"Middle",verticalAlignBottom:"Bottom",border:"Table border",borderAll:"All",borderEmpty:"Empty",borderDash:"Dash",borderExternal:"External",borderInternal:"Internal",borderTd:"Table cell border",borderTdTop:"Top",borderTdRight:"Right",borderTdBottom:"Bottom",borderTdLeft:"Left",borderTdForward:"Forward",borderTdBack:"Back",tableProperties:"Table Properties"}},datePicker:{now:"Now",confirm:"Confirm",return:"Return",timeSelect:"Time select",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},year:" ",month:" ",hour:"Hour",minute:"Minute",second:"Second"},frame:{header:"Header",footer:"Footer"},pageBreak:{displayName:"Page Break"},zone:{headerTip:"Double click to edit header",footerTip:"Double click to edit footer"}};class _h{currentLocale;langMap=new Map([["zhCN",Ei],["en",Hh]]);constructor(t){this.currentLocale=t}registerLangMap(t,e){const n=this.langMap.get(t);this.langMap.set(t,Yi(n||Ei,e))}getLocale(){return this.currentLocale}setLocale(t){this.currentLocale=t}getLang(){return this.langMap.get(this.currentLocale)||Ei}t(t){const e=t.split(".");let n="",i=this.getLang();for(let r=0;r<e.length;r++){const s=e[r],a=Reflect.get(i,s);if(a)n=i=a;else return""}return n}}class xh{promiseList;constructor(){this.promiseList=[]}add(t){this.promiseList.push(t)}clearAll(){this.promiseList=[]}allSettled(){return Promise.allSettled(this.promiseList)}}class Gh{draw;zone;i18n;container;pageContainer;isDisableMouseMove;tipContainer;tipContent;currentMoveZone;constructor(t,e){this.draw=t,this.zone=e,this.i18n=t.getI18n(),this.container=t.getContainer(),this.pageContainer=t.getPageContainer();const{tipContainer:n,tipContent:i}=this._drawZoneTip();this.tipContainer=n,this.tipContent=i,this.isDisableMouseMove=!0,this.currentMoveZone=l.EditorZone.MAIN;const r=[],{header:s,footer:a}=t.getOptions();s.disabled||r.push(l.EditorZone.HEADER),a.disabled||r.push(l.EditorZone.FOOTER),r.length&&this._watchMouseMoveZoneChange(r)}_watchMouseMoveZoneChange(t){this.pageContainer.addEventListener("mousemove",kr(e=>{if(!(this.isDisableMouseMove||!this.draw.getIsPagingMode())){if(this.draw.getMode()!==l.EditorMode.EDIT){this._updateZoneTip(!1);return}if(e.offsetY)if(e.target instanceof HTMLCanvasElement){const n=this.zone.getZoneByY(e.offsetY);if(!t.includes(n)){this._updateZoneTip(!1);return}this.currentMoveZone=n,this._updateZoneTip(this.zone.getZone()===l.EditorZone.MAIN&&(n===l.EditorZone.HEADER||n===l.EditorZone.FOOTER),e.x,e.y)}else this._updateZoneTip(!1)}},250)),this.pageContainer.addEventListener("mouseenter",()=>{this.isDisableMouseMove=!1}),this.pageContainer.addEventListener("mouseleave",()=>{this.isDisableMouseMove=!0,this._updateZoneTip(!1)})}_drawZoneTip(){const t=document.createElement("div");t.classList.add(`${z}-zone-tip`);const e=document.createElement("span");return t.append(e),this.container.append(t),{tipContainer:t,tipContent:e}}_updateZoneTip(t,e,n){t?(this.tipContainer.classList.add("show"),this.tipContainer.style.left=`${e}px`,this.tipContainer.style.top=`${n}px`,this.tipContent.innerText=this.i18n.t(`zone.${this.currentMoveZone===l.EditorZone.HEADER?"headerTip":"footerTip"}`)):this.tipContainer.classList.remove("show")}}class Ah{INDICATOR_PADDING=2;INDICATOR_TITLE_TRANSLATE=[20,5];draw;options;i18n;container;currentZone;indicatorContainer;constructor(t){this.draw=t,this.i18n=t.getI18n(),this.options=t.getOptions(),this.container=t.getContainer(),this.currentZone=l.EditorZone.MAIN,this.indicatorContainer=null,this.options.zone.tipDisabled||new Gh(t,this)}isHeaderActive(){return this.getZone()===l.EditorZone.HEADER}isMainActive(){return this.getZone()===l.EditorZone.MAIN}isFooterActive(){return this.getZone()===l.EditorZone.FOOTER}getZone(){return this.currentZone}setZone(t){const{header:e,footer:n}=this.options;!e.editable&&t===l.EditorZone.HEADER||!n.editable&&t===l.EditorZone.FOOTER||this.currentZone!==t&&(this.currentZone=t,this.draw.getRange().clearRange(),this.draw.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1}),this.drawZoneIndicator(),Co(()=>{const i=this.draw.getListener();i.zoneChange&&i.zoneChange(t);const r=this.draw.getEventBus();r.isSubscribe("zoneChange")&&r.emit("zoneChange",t)}))}getZoneByY(t){const e=this.draw.getHeader(),n=e.getHeaderTop()+e.getHeight(),i=this.draw.getFooter(),s=this.draw.getHeight()-(i.getFooterBottom()+i.getHeight());return t<n?l.EditorZone.HEADER:t>s?l.EditorZone.FOOTER:l.EditorZone.MAIN}drawZoneIndicator(){if(this._clearZoneIndicator(),!this.isHeaderActive()&&!this.isFooterActive())return;const{scale:t}=this.options,e=this.isHeaderActive(),[n,i]=this.INDICATOR_TITLE_TRANSLATE,r=this.draw.getPageList(),s=this.draw.getMargins(),a=this.draw.getInnerWidth(),c=this.draw.getHeight(),d=this.draw.getPageGap(),u=c+d;this.indicatorContainer=document.createElement("div"),this.indicatorContainer.classList.add(`${z}-zone-indicator`);const R=this.draw.getHeader(),h=this.draw.getFooter(),g=e?R.getHeight():h.getHeight(),f=e?R.getHeaderTop():c-h.getFooterBottom()-g;for(let T=0;T<r.length;T++){const m=u*T+f,p=s[3]-this.INDICATOR_PADDING,I=s[3]+a+this.INDICATOR_PADDING,L=e?m-this.INDICATOR_PADDING:m+g+this.INDICATOR_PADDING,P=e?m+g+this.INDICATOR_PADDING:m-this.INDICATOR_PADDING,C=document.createElement("div");C.innerText=this.i18n.t(`frame.${e?"header":"footer"}`),C.style.top=`${P}px`,C.style.transform=`translate(${n*t}px, ${i*t}px) scale(${t})`,this.indicatorContainer.append(C);const S=document.createElement("span");S.classList.add(`${z}-zone-indicator-border__top`),S.style.top=`${L}px`,S.style.width=`${a}px`,S.style.marginLeft=`${s[3]}px`,this.indicatorContainer.append(S);const F=document.createElement("span");F.classList.add(`${z}-zone-indicator-border__left`),F.style.top=`${m}px`,F.style.height=`${g}px`,F.style.left=`${p}px`,this.indicatorContainer.append(F);const N=document.createElement("span");N.classList.add(`${z}-zone-indicator-border__bottom`),N.style.top=`${P}px`,this.indicatorContainer.append(N);const V=document.createElement("span");V.classList.add(`${z}-zone-indicator-border__right`),V.style.top=`${m}px`,V.style.height=`${g}px`,V.style.left=`${I}px`,this.indicatorContainer.append(V)}this.container.append(this.indicatorContainer)}_clearZoneIndicator(){this.indicatorContainer?.remove(),this.indicatorContainer=null}}class kh{draw;position;zone;options;elementList;rowList;positionList;constructor(t,e){this.draw=t,this.position=t.getPosition(),this.zone=t.getZone(),this.options=t.getOptions(),this.elementList=e||[],this.rowList=[],this.positionList=[]}getRowList(){return this.rowList}setElementList(t){this.elementList=t}getElementList(){return this.elementList}getPositionList(){return this.positionList}compute(){this.recovery(),this._computeRowList(),this._computePositionList()}recovery(){this.rowList=[],this.positionList=[]}_computeRowList(){const t=this.draw.getInnerWidth();this.rowList=this.draw.computeRowList({innerWidth:t,elementList:this.elementList})}_computePositionList(){const t=this.getFooterBottom(),e=this.draw.getInnerWidth(),i=this.draw.getMargins()[3],r=this.draw.getHeight(),s=this.getHeight(),a=r-t-s;this.position.computePageRowPosition({positionList:this.positionList,rowList:this.rowList,pageNo:0,startRowIndex:0,startIndex:0,startX:i,startY:a,innerWidth:e,zone:l.EditorZone.FOOTER})}getFooterBottom(){const{footer:{bottom:t,disabled:e},scale:n}=this.options;return e?0:Math.floor(t*n)}getMaxHeight(){const{footer:{maxHeightRadio:t}}=this.options,e=this.draw.getHeight();return Math.floor(e*bi[t])}getHeight(){if(this.options.footer.disabled)return 0;const t=this.getMaxHeight(),e=this.getRowHeight();return e>t?t:e}getRowHeight(){return this.rowList.reduce((t,e)=>t+e.height,0)}getExtraHeight(){const t=this.draw.getMargins(),e=this.getHeight(),i=this.getFooterBottom()+e-t[2];return i<=0?0:i}render(t,e){t.save(),t.globalAlpha=this.zone.isFooterActive()?1:this.options.footer.inactiveAlpha;const n=this.draw.getInnerWidth(),i=this.getMaxHeight(),r=[];let s=0;for(let a=0;a<this.rowList.length;a++){const c=this.rowList[a];if(s+c.height>i)break;r.push(c),s+=c.height}this.draw.drawRow(t,{elementList:this.elementList,positionList:this.positionList,rowList:r,pageNo:e,startIndex:0,innerWidth:n,zone:l.EditorZone.FOOTER}),t.restore()}}class Jh{draw;range;options;UN_COUNT_STYLE_WIDTH=20;MEASURE_BASE_TEXT="0";LIST_GAP=10;constructor(t){this.draw=t,this.range=t.getRange(),this.options=t.getOptions()}setList(t,e){if(this.draw.isReadonly())return;const{startIndex:i,endIndex:r}=this.range.getRange();if(!~i&&!~r)return;const s=this.range.getRangeParagraphElementList();if(!s||!s.length)return;if(s.find(R=>R.listType===t&&R.listStyle===e)||!t){this.unsetList();return}const c=lt();s.forEach(R=>{R.listId=c,R.listType=t,R.listStyle=e});const d=i===r,u=d?r:i;this.draw.render({curIndex:u,isSetCursor:d})}unsetList(){if(this.draw.isReadonly())return;const{startIndex:e,endIndex:n}=this.range.getRange();if(!~e&&!~n)return;const i=this.range.getRangeParagraphElementList()?.filter(d=>d.listId);if(!i||!i.length)return;const r=this.draw.getElementList(),s=r[n];if(s.listId){let d=n+1;for(;d<r.length;){const u=r[d];if(u.value===_&&!u.listWrap)break;if(u.listId!==s.listId){this.draw.spliceElementList(r,d,0,[{value:_}]);break}d++}}i.forEach(d=>{delete d.listId,delete d.listType,delete d.listStyle,delete d.listWrap});const a=e===n,c=a?n:e;this.draw.render({curIndex:c,isSetCursor:a})}computeListStyle(t,e){const n=new Map;let i=0,r=e[i]?.listId,s=[];const a=e.length;for(;i<a;){const c=e[i];if(r&&r===c.listId)s.push(c);else if(c.listId&&c.listId!==r){if(s.length){const d=this.getListStyleWidth(t,s);n.set(r,d)}r=c.listId,s=r?[c]:[]}i++}if(s.length){const c=this.getListStyleWidth(t,s);n.set(r,c)}return n}findStyledElement(t){let e=t[0];for(let n=1;n<t.length;n++){const i=t[n];if(i.font||i.size||i.bold||i.italic){e=i;break}}return e}getListFontStyle(t,e){if(this.options.list.inheritStyle){const n=this.findStyledElement(t);return this.draw.getElementFont(n,e)}else{const{defaultFont:n,defaultSize:i}=this.options;return`${i*e}px ${n}`}}getListStyleWidth(t,e){const{scale:n,checkbox:i}=this.options,r=e[0];if(r.listStyle&&r.listStyle!==l.ListStyle.DECIMAL)return r.listStyle===l.ListStyle.CHECKBOX?(i.width+this.LIST_GAP)*n:this.UN_COUNT_STYLE_WIDTH*n;const s=e.reduce((d,u)=>(u.value===_&&(d+=1),d),0);if(!s)return 0;t.save(),t.font=this.getListFontStyle(e,n);const a=`${this.MEASURE_BASE_TEXT.repeat(String(s).length)}${l.KeyMap.PERIOD}`,c=t.measureText(a);return t.restore(),Math.ceil((c.width+this.LIST_GAP)*n)}drawListStyle(t,e,n){const{elementList:i,offsetX:r,listIndex:s,ascent:a}=e,c=i[0];if(c.value!==_||c.listWrap)return;let d=0;const{defaultTabWidth:u,scale:R}=this.options;for(let m=1;m<i.length&&i[m]?.type===l.ElementType.TAB;m++)d+=u*R;const{coordinate:{leftTop:[h,g]}}=n,f=h-r+d,T=g+a;if(c.listStyle===l.ListStyle.CHECKBOX){const{width:m,height:p,gap:I}=this.options.checkbox,L={...c,checkbox:{value:!!c.checkbox?.value},metrics:{...c.metrics,width:(m+I*2)*R,height:p*R}};this.draw.getCheckboxParticle().render({ctx:t,x:f-I*R,y:T,index:0,row:{...e,elementList:[L,...e.elementList]}})}else{let m="";if(c.listType===l.ListType.UL?m=Wo[c.listStyle]||Wo[_e.DISC]:m=`${s+1}${l.KeyMap.PERIOD}`,!m)return;t.save(),t.font=this.getListFontStyle(i,R),t.fillText(m,f,T),t.restore()}}}class Un{options;static WIDTH=12;static HEIGHT=9;static GAP=3;constructor(t){this.options=t.getOptions()}render(t,e,n,i){const{scale:r,lineBreak:{color:s,lineWidth:a}}=this.options;t.save(),t.beginPath();const c=i-Un.HEIGHT*r/2,d=n+e.metrics.width;t.translate(d,c),t.scale(r,r),t.strokeStyle=s,t.lineWidth=a,t.lineCap="round",t.lineJoin="round",t.beginPath(),t.moveTo(8,0),t.lineTo(12,0),t.lineTo(12,6),t.lineTo(3,6),t.moveTo(3,6),t.lineTo(6,3),t.moveTo(3,6),t.lineTo(6,9),t.stroke(),t.closePath(),t.restore()}}class Fr{draw;position;options;elementList;rowList;positionList;constructor(t){this.draw=t,this.position=t.getPosition(),this.options=t.getOptions(),this.elementList=[],this.rowList=[],this.positionList=[]}_recovery(){this.elementList=[],this.rowList=[],this.positionList=[]}_compute(t){this._computeRowList(),this._computePositionList(t)}_computeRowList(){const t=this.draw.getInnerWidth();this.rowList=this.draw.computeRowList({innerWidth:t,elementList:this.elementList})}_computePositionList(t){const{lineBreak:e,scale:n}=this.options,i=this.draw.getHeader().getExtraHeight(),r=this.draw.getInnerWidth(),s=this.draw.getMargins();let a=s[3];e.disabled||(a+=(Un.WIDTH+Un.GAP)*n);const c=t?.startY||s[0]+i;this.position.computePageRowPosition({positionList:this.positionList,rowList:this.rowList,pageNo:0,startRowIndex:0,startIndex:0,startX:a,startY:c,innerWidth:r})}render(t,e){const{placeholder:n=this.options.placeholder}=e||{},{data:i,font:r,size:s,color:a,opacity:c}=n;this._recovery(),this.elementList=[{value:i,font:r,size:s,color:a}],bt(this.elementList,{editorOptions:this.options,isForceCompensation:!0}),this._compute(e);const d=this.draw.getInnerWidth();t.save(),t.globalAlpha=c,this.draw.drawRow(t,{elementList:this.elementList,positionList:this.positionList,rowList:this.rowList,pageNo:0,startIndex:0,innerWidth:d,isDrawLineBreak:!1}),t.restore()}}class Bh{draw;options;range;fillRectMap;constructor(t){this.draw=t,this.options=t.getOptions(),this.range=t.getRange(),this.fillRectMap=new Map}setGroup(){if(this.draw.isReadonly()||this.draw.getZone().getZone()!==l.EditorZone.MAIN)return null;const t=this.range.getSelection();if(!t)return null;const e=lt();return t.forEach(n=>{Array.isArray(n.groupIds)||(n.groupIds=[]),n.groupIds.push(e)}),this.draw.render({isSetCursor:!1,isCompute:!1}),e}getElementListByGroupId(t,e){const n=[];for(let i=0;i<t.length;i++){const r=t[i];if(r.type===l.ElementType.TABLE){const s=r.trList;for(let a=0;a<s.length;a++){const c=s[a];for(let d=0;d<c.tdList.length;d++){const u=c.tdList[d],R=this.getElementListByGroupId(u.value,e);if(R.length)return n.push(...R),n}}}if(r?.groupIds?.includes(e)&&(n.push(r),!t[i+1]?.groupIds?.includes(e)))break}return n}deleteGroup(t){if(this.draw.isReadonly())return;const e=this.draw.getOriginalMainElementList(),n=this.getElementListByGroupId(e,t);if(n.length){for(let i=0;i<n.length;i++){const r=n[i],s=r.groupIds,a=s.findIndex(c=>c===t);s.splice(a,1),s.length||delete r.groupIds}this.draw.render({isSetCursor:!1,isCompute:!1})}}getContextByGroupId(t,e){for(let n=0;n<t.length;n++){const i=t[n];if(i.type===l.ElementType.TABLE){const s=i.trList;for(let a=0;a<s.length;a++){const c=s[a];for(let d=0;d<c.tdList.length;d++){const u=c.tdList[d],R=this.getContextByGroupId(u.value,e);if(R)return{...R,isTable:!0,index:n,trIndex:a,tdIndex:d,tdId:u.id,trId:c.id,tableId:i.tableId}}}}const r=t[n+1];if(i.groupIds?.includes(e)&&!r?.groupIds?.includes(e))return{isTable:!1,startIndex:n,endIndex:n}}return null}clearFillInfo(){this.fillRectMap.clear()}recordFillInfo(t,e,n,i,r){const s=t.groupIds;if(s)for(const a of s){const c=this.fillRectMap.get(a);c?c.width+=i:this.fillRectMap.set(a,{x:e,y:n,width:i,height:r})}}render(t){if(!this.fillRectMap.size)return;const e=this.range.getRange(),i=this.draw.getElementList()[e.endIndex]?.groupIds,{group:{backgroundColor:r,opacity:s,activeOpacity:a,activeBackgroundColor:c}}=this.options;t.save(),this.fillRectMap.forEach((d,u)=>{const{x:R,y:h,width:g,height:f}=d;i?.includes(u)?(t.globalAlpha=a,t.fillStyle=c):(t.globalAlpha=s,t.fillStyle=r),t.fillRect(R,h,g,f)}),t.restore(),this.clearFillInfo()}}class $h{options;constructor(t){this.options=t.getOptions()}render(t,e,n,i){const{scale:r,whiteSpace:{color:s,radius:a}}=this.options,c=e.metrics;t.save(),t.fillStyle=s,t.beginPath(),t.arc(n+c.width/2,i,a*r,0,Math.PI*2),t.fill(),t.closePath(),t.restore()}}class zh{draw;eventBus;pageContainer;constructor(t){this.draw=t,this.eventBus=this.draw.getEventBus(),this.pageContainer=this.draw.getPageContainer(),this.pageContainer.addEventListener("mousemove",this._mousemove.bind(this)),this.pageContainer.addEventListener("mouseenter",this._mouseenter.bind(this)),this.pageContainer.addEventListener("mouseleave",this._mouseleave.bind(this)),this.pageContainer.addEventListener("mousedown",this._mousedown.bind(this)),this.pageContainer.addEventListener("mouseup",this._mouseup.bind(this)),this.pageContainer.addEventListener("click",this._click.bind(this))}_mousemove(t){this.eventBus.isSubscribe("mousemove")&&this.eventBus.emit("mousemove",t)}_mouseenter(t){this.eventBus.isSubscribe("mouseenter")&&this.eventBus.emit("mouseenter",t)}_mouseleave(t){this.eventBus.isSubscribe("mouseleave")&&this.eventBus.emit("mouseleave",t)}_mousedown(t){this.eventBus.isSubscribe("mousedown")&&this.eventBus.emit("mousedown",t)}_mouseup(t){this.eventBus.isSubscribe("mouseup")&&this.eventBus.emit("mouseup",t)}_click(t){this.eventBus.isSubscribe("click")&&this.eventBus.emit("click",t)}}class jh{draw;options;constructor(t){this.draw=t,this.options=t.getOptions()}render(t,e){const{scale:n,lineNumber:{color:i,size:r,font:s,right:a,type:c}}=this.options,d=this.draw.getTextParticle(),u=this.draw.getMargins(),R=this.draw.getPosition().getOriginalMainPositionList(),g=this.draw.getPageRowList()[e];t.save(),t.fillStyle=i,t.font=`${r*n}px ${s}`;for(let f=0;f<g.length;f++){const T=g[f],{coordinate:{leftBottom:m}}=R[T.startIndex],p=c===l.LineNumberType.PAGE?f+1:T.rowIndex+1,I=d.measureText(t,{value:`${p}`}),L=u[3]-(I.width+a)*n,P=m[1]-I.actualBoundingBoxAscent*n;t.fillText(`${p}`,L,P)}t.restore()}}class qh{draw;header;footer;options;constructor(t){this.draw=t,this.header=t.getHeader(),this.footer=t.getFooter(),this.options=t.getOptions()}render(t){const{scale:e,pageBorder:{color:n,lineWidth:i,padding:r}}=this.options;t.save(),t.translate(.5,.5),t.strokeStyle=n,t.lineWidth=i*e;const s=this.draw.getMargins(),a=s[3]-r[3]*e,c=s[0]+this.header.getExtraHeight()-r[0]*e,d=this.draw.getInnerWidth()+(r[1]+r[3])*e,u=this.draw.getHeight()-c-this.footer.getExtraHeight()-s[2]+r[2]*e;t.rect(a,c,d,u),t.stroke(),t.restore()}}function tg(o,t){const{value:e,oldValue:n}=t;n.isTable&&!e.isTable&&o.getTableTool().dispose()}class eg{draw;eventBus;constructor(t){this.draw=t,this.eventBus=t.getEventBus(),this.execute()}execute(){this.eventBus.on("positionContextChange",t=>{tg(this.draw,t)})}}class ng{draw;range;position;tableTool;tableParticle;options;constructor(t){this.draw=t,this.range=t.getRange(),this.position=t.getPosition(),this.tableTool=t.getTableTool(),this.tableParticle=t.getTableParticle(),this.options=t.getOptions()}insertTable(t,e){const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return;const{defaultTrMinHeight:r}=this.options.table,s=this.draw.getElementList();let a=0;if(s[n]?.listId){const f=this.position.getPositionList(),{rowIndex:T}=f[n];a=this.draw.getRowList()[T]?.offsetX||0}const c=this.draw.getContextInnerWidth()-a,d=[],u=c/e;for(let f=0;f<e;f++)d.push({width:u});const R=[];for(let f=0;f<t;f++){const T=[],m={height:r,tdList:T};for(let p=0;p<e;p++)T.push({colspan:1,rowspan:1,value:[]});R.push(m)}const h={type:l.ElementType.TABLE,value:"",colgroup:d,trList:R};bt([h],{editorOptions:this.options}),wt(s,[h],n,{editorOptions:this.options});const g=n+1;this.draw.spliceElementList(s,g,n===i?0:i-n,[h]),this.range.setRange(g,g),this.draw.render({curIndex:g,isSetCursor:!1})}insertTableTopRow(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,trIndex:n,tableId:i}=t,s=this.draw.getOriginalElementList()[e],a=s.trList,c=a[n];if(c.tdList.length<s.colgroup.length){const R=c.tdList[0].rowIndex;for(let h=0;h<n;h++){const g=a[h];for(let f=0;f<g.tdList.length;f++){const T=g.tdList[f];T.rowspan>1&&T.rowIndex+T.rowspan>=R+1&&(T.rowspan+=1)}}}const d=lt(),u={height:c.height,id:d,tdList:[]};for(let R=0;R<c.tdList.length;R++){const h=c.tdList[R],g=lt();u.tdList.push({id:g,rowspan:1,colspan:h.colspan,value:[{value:_,size:16,tableId:i,trId:d,tdId:g}]})}a.splice(n,0,u),this.position.setPositionContext({isTable:!0,index:e,trIndex:n,tdIndex:0,tdId:u.tdList[0].id,trId:u.id,tableId:i}),this.range.setRange(0,0),this.draw.render({curIndex:0}),this.tableTool.render()}insertTableBottomRow(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,trIndex:n,tableId:i}=t,s=this.draw.getOriginalElementList()[e],a=s.trList,c=a[n],d=a.length-1===n?c:a[n+1];if(d.tdList.length<s.colgroup.length){const h=d.tdList[0].rowIndex;for(let g=0;g<n+1;g++){const f=a[g];for(let T=0;T<f.tdList.length;T++){const m=f.tdList[T];m.rowspan>1&&m.rowIndex+m.rowspan>=h+1&&(m.rowspan+=1)}}}const u=lt(),R={height:d.height,id:u,tdList:[]};for(let h=0;h<d.tdList.length;h++){const g=d.tdList[h],f=lt();R.tdList.push({id:f,rowspan:1,colspan:g.colspan,value:[{value:_,size:16,tableId:i,trId:u,tdId:f}]})}a.splice(n+1,0,R),this.position.setPositionContext({isTable:!0,index:e,trIndex:n+1,tdIndex:0,tdId:R.tdList[0].id,trId:R.id,tableId:s.id}),this.range.setRange(0,0),this.draw.render({curIndex:0})}adjustColWidth(t){if(t.type!==l.ElementType.TABLE)return;const{defaultColMinWidth:e}=this.options.table,n=t.colgroup,i=n.reduce((s,a)=>s+a.width,0),r=this.draw.getOriginalInnerWidth();if(i>r){const s=n.filter(c=>c.width>e),a=(i-r)/s.length;for(let c=0;c<n.length;c++){const d=n[c];d.width-a>=e&&(d.width-=a)}}}insertTableLeftCol(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,tdIndex:n,tableId:i}=t,s=this.draw.getOriginalElementList()[e],a=s.trList,c=n;for(let R=0;R<a.length;R++){const h=a[R],g=lt();h.tdList.splice(c,0,{id:g,rowspan:1,colspan:1,value:[{value:_,size:16,tableId:i,trId:h.id,tdId:g}]})}const{defaultColMinWidth:d}=this.options.table;s.colgroup.splice(c,0,{width:d}),this.adjustColWidth(s),this.position.setPositionContext({isTable:!0,index:e,trIndex:0,tdIndex:c,tdId:a[0].tdList[c].id,trId:a[0].id,tableId:i}),this.range.setRange(0,0),this.draw.render({curIndex:0}),this.tableTool.render()}insertTableRightCol(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,tdIndex:n,tableId:i}=t,s=this.draw.getOriginalElementList()[e],a=s.trList,c=n+1;for(let R=0;R<a.length;R++){const h=a[R],g=lt();h.tdList.splice(c,0,{id:g,rowspan:1,colspan:1,value:[{value:_,size:16,tableId:i,trId:h.id,tdId:g}]})}const{defaultColMinWidth:d}=this.options.table;s.colgroup.splice(c,0,{width:d}),this.adjustColWidth(s),this.position.setPositionContext({isTable:!0,index:e,trIndex:0,tdIndex:c,tdId:a[0].tdList[c].id,trId:a[0].id,tableId:s.id}),this.range.setRange(0,0),this.draw.render({curIndex:0})}deleteTableRow(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,trIndex:n,tdIndex:i}=t,s=this.draw.getOriginalElementList()[e],a=s.trList,c=a[n],d=c.tdList[i].rowIndex;if(a.length<=1&&s.pagingIndex===0){this.deleteTable();return}for(let u=0;u<d;u++){const h=a[u].tdList;for(let g=0;g<h.length;g++){const f=h[g];f.rowIndex+f.rowspan>d&&f.rowspan--}}for(let u=0;u<c.tdList.length;u++){const R=c.tdList[u];if(R.rowspan>1){const h=lt(),g=a[n+1];g.tdList.splice(u,0,{id:h,rowspan:R.rowspan-1,colspan:R.colspan,value:[{value:_,size:16,tableId:s.id,trId:g.id,tdId:h}]})}}a.splice(n,1),this.position.setPositionContext({isTable:!1}),this.range.clearRange(),this.draw.render({curIndex:t.index}),this.tableTool.dispose()}deleteTableCol(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,tdIndex:n,trIndex:i}=t,s=this.draw.getOriginalElementList()[e],a=s.trList,d=a[i].tdList[n].colIndex;if(!a.find(R=>R.tdList.length>1)){this.deleteTable();return}for(let R=0;R<a.length;R++){const h=a[R];for(let g=0;g<h.tdList.length;g++){const f=h.tdList[g];f.colIndex<=d&&f.colIndex+f.colspan>d&&(f.colspan>1?f.colspan--:h.tdList.splice(g,1))}}s.colgroup?.splice(d,1),this.position.setPositionContext({isTable:!1}),this.range.setRange(0,0),this.draw.render({curIndex:t.index}),this.tableTool.dispose()}deleteTable(){const t=this.position.getPositionContext();if(!t.isTable)return;const e=this.draw.getOriginalElementList(),n=e[t.index];let i=1,r=t.index;if(n.pagingId){r=t.index-n.pagingIndex;for(let a=r+1;a<e.length&&e[a].pagingId===n.pagingId;a++)i++}e.splice(r,i);const s=r-1;this.position.setPositionContext({isTable:!1,index:s}),this.range.setRange(s,s),this.draw.render({curIndex:s}),this.tableTool.dispose()}mergeTableCell(){const t=this.position.getPositionContext();if(!t.isTable)return;const{isCrossRowCol:e,startTdIndex:n,endTdIndex:i,startTrIndex:r,endTrIndex:s}=this.range.getRange();if(!e)return;const{index:a}=t,u=this.draw.getOriginalElementList()[a].trList;let R=u[r].tdList[n],h=u[s].tdList[i];(R.x>h.x||R.y>h.y)&&([R,h]=[h,R]);const g=R.colIndex,f=h.colIndex+(h.colspan-1),T=R.rowIndex,m=h.rowIndex+(h.rowspan-1),p=[];for(let X=0;X<u.length;X++){const O=u[X],M=[];for(let b=0;b<O.tdList.length;b++){const y=O.tdList[b],D=y.colIndex,U=y.rowIndex;D>=g&&D<=f&&U>=T&&U<=m&&M.push(y)}M.length&&p.push(M)}if(!p.length)return;const I=p[p.length-1],L=p[0][0],P=I[I.length-1],C=L.x,S=L.y,F=P.x+P.width,N=P.y+P.height;for(let X=0;X<p.length;X++){const O=p[X];for(let M=0;M<O.length;M++){const b=O[M],y=b.x,D=b.y,U=y+b.width,Q=D+b.height;if(C>y||S>D||F<U||N<Q)return}}const V=[],Y=p[0][0],E=Y.value[0];for(let X=0;X<p.length;X++){const O=p[X];for(let M=0;M<O.length;M++){const b=O[M];if(!(X===0&&M===0)){V.push(b.id);const D=b.value.length>1?0:1;for(let U=D;U<b.value.length;U++){const Q=b.value[U];De(je,E,Q),Y.value.push(Q)}}X===0&&M!==0&&(Y.colspan+=b.colspan),X!==0&&Y.colIndex===b.colIndex&&(Y.rowspan+=b.rowspan)}}for(let X=0;X<u.length;X++){const O=u[X];let M=0;for(;M<O.tdList.length;){const b=O.tdList[M];V.includes(b.id)&&(O.tdList.splice(M,1),M--),M++}}this.position.setPositionContext({...t,trIndex:Y.trIndex,tdIndex:Y.tdIndex});const W=Y.value.length-1;this.range.setRange(W,W),this.draw.render(),this.tableTool.render()}cancelMergeTableCell(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,tdIndex:n,trIndex:i}=t,s=this.draw.getOriginalElementList()[e],a=s.trList,c=a[i],d=c.tdList[n];if(d.rowspan===1&&d.colspan===1)return;const u=d.colspan;if(d.colspan>1){for(let h=1;h<d.colspan;h++){const g=lt();c.tdList.splice(n+h,0,{id:g,rowspan:1,colspan:1,value:[{value:_,size:16,tableId:s.id,trId:c.id,tdId:g}]})}d.colspan=1}if(d.rowspan>1){for(let h=1;h<d.rowspan;h++){const g=a[i+h];for(let f=0;f<u;f++){const T=lt();g.tdList.splice(d.colIndex,0,{id:T,rowspan:1,colspan:1,value:[{value:_,size:16,tableId:s.id,trId:g.id,tdId:T}]})}}d.rowspan=1}const R=d.value.length-1;this.range.setRange(R,R),this.draw.render(),this.tableTool.render()}splitVerticalTableCell(){const t=this.position.getPositionContext();if(!t.isTable||this.range.getRange().isCrossRowCol)return;const{index:n,tdIndex:i,trIndex:r}=t,a=this.draw.getOriginalElementList()[n],c=a.trList,d=c[r],u=d.tdList[i];a.colgroup.splice(i+1,0,{width:this.options.table.defaultColMinWidth});for(let R=0;R<c.length;R++){const h=c[R];let g=0;for(;g<h.tdList.length;){const f=h.tdList[g];if(f.rowIndex!==u.rowIndex)f.colIndex<=u.colIndex&&f.colIndex+f.colspan>u.colIndex&&f.colspan++;else if(f.id===u.id){const T=lt();d.tdList.splice(g+u.colspan,0,{id:T,rowspan:u.rowspan,colspan:1,value:[{value:_,size:16,tableId:a.id,trId:h.id,tdId:T}]}),g++}g++}}this.draw.render(),this.tableTool.render()}splitHorizontalTableCell(){const t=this.position.getPositionContext();if(!t.isTable||this.range.getRange().isCrossRowCol)return;const{index:n,tdIndex:i,trIndex:r}=t,a=this.draw.getOriginalElementList()[n],c=a.trList,u=c[r].tdList[i];let R=-1,h=0;for(;h<c.length;){if(h===R){h++;continue}const g=c[h];let f=0;for(;f<g.tdList.length;){const T=g.tdList[f];if(T.id===u.id){const m=lt(),p=lt();c.splice(h+u.rowspan,0,{id:m,height:this.options.table.defaultTrMinHeight,tdList:[{id:p,rowspan:1,colspan:u.colspan,value:[{value:_,size:16,tableId:a.id,trId:m,tdId:p}]}]}),R=h+u.rowspan}else T.rowIndex>=u.rowIndex&&T.rowIndex<u.rowIndex+u.rowspan&&T.rowIndex+T.rowspan>=u.rowIndex+u.rowspan&&T.rowspan++;f++}h++}this.draw.render(),this.tableTool.render()}tableTdVerticalAlign(t){const e=this.tableParticle.getRangeRowCol();if(!e)return;for(let i=0;i<e.length;i++){const r=e[i];for(let s=0;s<r.length;s++){const a=r[s];!a||a.verticalAlign===t||!a.verticalAlign&&t===l.VerticalAlign.TOP||(a.verticalAlign=t)}}const{endIndex:n}=this.range.getRange();this.draw.render({curIndex:n})}tableBorderType(t){const e=this.position.getPositionContext();if(!e.isTable)return;const{index:n}=e,r=this.draw.getOriginalElementList()[n];if(!r.borderType&&t===l.TableBorder.ALL||r.borderType===t)return;r.borderType=t;const{endIndex:s}=this.range.getRange();this.draw.render({curIndex:s})}tableBorderColor(t){const e=this.position.getPositionContext();if(!e.isTable)return;const{index:n}=e,r=this.draw.getOriginalElementList()[n];if(!r.borderColor&&t===this.options.table.defaultBorderColor||r.borderColor===t)return;r.borderColor=t;const{endIndex:s}=this.range.getRange();this.draw.render({curIndex:s,isCompute:!1})}tableTdBorderType(t){const e=this.tableParticle.getRangeRowCol();if(!e)return;const n=e.flat(),i=n.some(s=>!s.borderTypes?.includes(t));n.forEach(s=>{s.borderTypes||(s.borderTypes=[]);const a=s.borderTypes.findIndex(c=>c===t);i?~a||s.borderTypes.push(t):~a&&s.borderTypes.splice(a,1),s.borderTypes.length||delete s.borderTypes});const{endIndex:r}=this.range.getRange();this.draw.render({curIndex:r})}tableTdSlashType(t){const e=this.tableParticle.getRangeRowCol();if(!e)return;const n=e.flat(),i=n.some(s=>!s.slashTypes?.includes(t));n.forEach(s=>{s.slashTypes||(s.slashTypes=[]);const a=s.slashTypes.findIndex(c=>c===t);i?~a||s.slashTypes.push(t):~a&&s.slashTypes.splice(a,1),s.slashTypes.length||delete s.slashTypes});const{endIndex:r}=this.range.getRange();this.draw.render({curIndex:r})}tableTdBackgroundColor(t){const e=this.tableParticle.getRangeRowCol();if(!e)return;for(let i=0;i<e.length;i++){const r=e[i];for(let s=0;s<r.length;s++){const a=r[s];a.backgroundColor=t}}const{endIndex:n}=this.range.getRange();this.range.setRange(n,n),this.draw.render({isCompute:!1})}tableSelectAll(){const t=this.position.getPositionContext(),{index:e,tableId:n,isTable:i}=t;if(!i||!n)return;const{startIndex:r,endIndex:s}=this.range.getRange(),c=this.draw.getOriginalElementList()[e].trList,d=c.length-1,u=c[d].tdList.length-1;this.range.replaceRange({startIndex:r,endIndex:s,tableId:n,startTdIndex:0,endTdIndex:u,startTrIndex:0,endTrIndex:d}),this.draw.render({isSetCursor:!1,isCompute:!1,isSubmitHistory:!1})}tableProperties(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e}=t,i=this.draw.getOriginalElementList()[e],r=this.draw.getOptions().table.tdPadding,s=i.tdPadding||r,a=document.createElement("div");a.className="table-properties-modal",a.setAttribute("editor-component","table-properties-modal"),a.innerHTML=`
|
|
509
509
|
<div class="table-properties-modal__mask"></div>
|
|
510
510
|
<div class="table-properties-modal__container">
|
|
511
511
|
<div class="table-properties-modal__header">
|
|
@@ -535,7 +535,7 @@ ${R} `}textToElements(t){const e=[],n=t.split(`
|
|
|
535
535
|
<button class="btn-confirm">确定</button>
|
|
536
536
|
</div>
|
|
537
537
|
</div>
|
|
538
|
-
`,document.body.appendChild(a);const c=a.querySelector(".table-properties-modal__mask"),d=a.querySelector(".table-properties-modal__close"),u=a.querySelector(".btn-cancel"),R=a.querySelector(".btn-confirm"),h=()=>{a.remove()};c.addEventListener("click",h),d.addEventListener("click",h),u.addEventListener("click",h),R.addEventListener("click",()=>{const g=parseInt(a.querySelector("#tdPaddingTop").value)||0,f=parseInt(a.querySelector("#tdPaddingRight").value)||0,T=parseInt(a.querySelector("#tdPaddingBottom").value)||0,m=parseInt(a.querySelector("#tdPaddingLeft").value)||0;i.tdPadding=[g,f,T,m],h();const{endIndex:p}=this.range.getRange();this.draw.render({curIndex:p,isCompute:!0})})}}class tg{draw;zone;range;position;options;areaInfoMap=new Map;constructor(t){this.draw=t,this.options=t.getOptions(),this.zone=t.getZone(),this.range=t.getRange(),this.position=t.getPosition()}getAreaInfo(){return this.areaInfoMap}getActiveAreaId(){if(!this.areaInfoMap.size)return null;const{startIndex:t}=this.range.getRange();return this.draw.getElementList()[t]?.areaId||null}getActiveAreaInfo(){const t=this.getActiveAreaId();return t&&this.areaInfoMap.get(t)||null}isReadonly(){const t=this.getActiveAreaInfo();if(!t?.area)return!1;switch(t.area.mode){case l.AreaMode.EDIT:return!1;case l.AreaMode.READONLY:return!0;case l.AreaMode.FORM:return!this.draw.getControl().getIsRangeWithinControl();default:return!1}}insertArea(t){const{id:e,value:n,area:i,position:r,range:s}=t;if(this.zone.getZone()!==l.EditorZone.MAIN&&this.zone.setZone(l.EditorZone.MAIN),this.draw.getPosition().setPositionContext({isTable:!1}),s&&!this.getActiveAreaId()){const{startIndex:c,endIndex:d}=s,u=this.draw.getOriginalMainElementList();if(!u[c]||!u[d])return null;this.range.setRange(s.startIndex,s.endIndex)}else if(r===l.LocationPosition.BEFORE)this.range.setRange(0,0);else{const d=this.draw.getOriginalMainElementList().length-1;this.range.setRange(d,d)}const a=e||lt();return this.draw.insertElementList([{type:l.ElementType.AREA,value:"",areaId:a,valueList:n,area:at(i)}]),a}render(t,e){if(!this.areaInfoMap.size)return;t.save();const n=this.draw.getMargins(),i=this.draw.getInnerWidth();for(const r of this.areaInfoMap){const{area:s,positionList:a}=r[1];if(s?.hide||!s?.backgroundColor&&!s?.borderColor&&!s?.placeholder)continue;const c=a.filter(f=>f.pageNo===e);if(!c.length)continue;t.translate(.5,.5);const d=c[0],u=c[c.length-1],R=n[3],h=Math.ceil(d.coordinate.leftTop[1]),g=Math.ceil(u.coordinate.rightBottom[1]-h);t.textBaseline="middle",s.backgroundColor&&(t.fillStyle=s.backgroundColor,t.fillRect(R,h,i,g)),s.borderColor&&(t.strokeStyle=s.borderColor,t.strokeRect(R,h,i,g)),s.placeholder&&a.length<=1&&new Xr(this.draw).render(t,{placeholder:{...ki,...s.placeholder},startY:d.coordinate.leftTop[1]}),t.translate(-.5,-.5)}t.restore()}compute(){this.areaInfoMap.clear();const t=this.draw.getOriginalMainElementList(),e=this.position.getOriginalMainPositionList();for(let n=0;n<t.length;n++){const i=t[n],r=i.areaId;if(r){const s=this.areaInfoMap.get(r);s?(s.elementList.push(i),s.positionList.push(e[n])):this.areaInfoMap.set(r,{id:r,area:i.area,elementList:[i],positionList:[e[n]]})}}}getAreaValue(t={}){const e=t.id||this.getActiveAreaId();if(!e)return null;const n=this.areaInfoMap.get(e);return n?{area:n.area,id:n.id,startPageNo:n.positionList[0].pageNo,endPageNo:n.positionList[n.positionList.length-1].pageNo,value:Mt(n.elementList)}:null}getContextByAreaId(t,e){const n=this.draw.getOriginalMainElementList();for(let i=0;i<n.length;i++){const r=n[i];if(e?.position===l.LocationPosition.OUTER_BEFORE){if(n[i+1]?.areaId!==t)continue}else if(e?.position===l.LocationPosition.AFTER){if(!(r.areaId===t&&n[i+1]?.areaId!==t))continue}else if(e?.position===l.LocationPosition.OUTER_AFTER){if(!(r.areaId!==t&&n[i-1]?.areaId===t))continue}else if(r.areaId!==t)continue;const s=this.position.getOriginalMainPositionList();return{range:{startIndex:i,endIndex:i},elementPosition:s[i]}}return null}setAreaProperties(t){const e=t.id||this.getActiveAreaId();if(!e)return;const n=this.areaInfoMap.get(e);if(!n)return;n.area||(n.area={});let i=!1;const r=["top","hide"];Object.entries(t.properties).forEach(([s,a])=>{if(wi(a))return;const c=s;n.area[c]=a,r.includes(c)&&(i=!0)}),this.draw.render({isCompute:i,isSetCursor:!1})}setAreaValue(t){const e=t.id||this.getActiveAreaId();if(!e)return;const n=this.areaInfoMap.get(e);if(!n)return;const{positionList:i}=n,r=this.draw.getOriginalMainElementList(),s=t.value;bt([{type:l.ElementType.AREA,value:"",valueList:s,areaId:n.id,area:n.area}],{editorOptions:this.options}),this.draw.spliceElementList(r,i[0].index,i.length,s,{isIgnoreDeletedRule:!0}),this.draw.render({isSetCursor:!1})}}class eg{draw;options;imageCache;mainBadge;areaBadgeMap;constructor(t){this.draw=t,this.options=t.getOptions(),this.imageCache=new Map,this.mainBadge=null,this.areaBadgeMap=new Map}setMainBadge(t){this.mainBadge=t}setAreaBadgeMap(t){this.areaBadgeMap.clear(),t.forEach(e=>{this.areaBadgeMap.set(e.areaId,e.badge)})}_drawImage(t,e,n,i,r,s){if(this.imageCache.has(s)){const a=this.imageCache.get(s);t.drawImage(a,e,n,i,r)}else{const a=new Image;a.setAttribute("crossOrigin","Anonymous"),a.src=s,a.onload=()=>{this.imageCache.set(s,a),t.drawImage(a,e,n,i,r)}}}render(t,e){if(e===0&&this.mainBadge){const{scale:n,badge:i}=this.options,{left:r,top:s,width:a,height:c,value:d}=this.mainBadge,u=this.draw.getMargins()[0]+this.draw.getHeader().getExtraHeight(),R=(r||i.left)*n,h=(s||i.top)*n+u;this._drawImage(t,R,h,a*n,c*n,d)}if(this.areaBadgeMap.size){const n=this.draw.getArea().getAreaInfo();if(n.size){const{scale:i,badge:r}=this.options;for(const s of n){const{positionList:a}=s[1],c=a[0];if(c.pageNo!==e)continue;const d=this.areaBadgeMap.get(s[0]);if(!d)continue;const{left:u,top:R,width:h,height:g,value:f}=d,T=(u||r.left)*i,m=(R||r.top)*i+c.coordinate.leftTop[1];this._drawImage(t,T,m,h*i,g*i,f)}}}}}class ng{draw;options;data;pageContainer;isDrawing=!1;startStroke=null;constructor(t,e){this.draw=t,this.options=t.getOptions(),this.data=e||[],this.pageContainer=t.getPageContainer(),this.register()}register(){this.pageContainer.addEventListener("mousedown",this.start.bind(this)),this.pageContainer.addEventListener("mouseup",this.stop.bind(this)),this.pageContainer.addEventListener("mouseleave",this.stop.bind(this)),this.pageContainer.addEventListener("mousemove",this.drawing.bind(this))}start(t){if(!this.draw.isGraffitiMode())return;this.isDrawing=!0;const{scale:e}=this.options;this.startStroke={lineColor:this.options.graffiti.defaultLineColor,lineWidth:this.options.graffiti.defaultLineWidth,points:[t.offsetX/e,t.offsetY/e]}}stop(){this.isDrawing=!1}drawing(t){if(!this.isDrawing||!this.draw.isGraffitiMode())return;const{offsetX:e,offsetY:n}=t,i=2;if(this.startStroke&&Math.abs(this.startStroke.points[0]-e)<i&&Math.abs(this.startStroke.points[1]-n)<i)return;const r=this.draw.getPageNo();let s=this.data.find(d=>d.pageNo===r);if(this.startStroke&&(s||(s={pageNo:r,strokes:[]},this.data.push(s)),s.strokes.push(this.startStroke),this.startStroke=null),!s?.strokes?.length)return;const{scale:a}=this.options;s.strokes[s.strokes.length-1].points.push(e/a,n/a),this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1})}getValue(){return this.data}compute(){const t=this.draw.getPageRowList().length;for(let e=this.data.length-1;e>=0;e--)this.data[e].pageNo>t-1&&this.data.splice(e,1)}clear(){this.data=[]}render(t,e){const n=this.data.find(a=>a.pageNo===e)?.strokes;if(!n?.length)return;const{graffiti:{defaultLineColor:i,defaultLineWidth:r},scale:s}=this.options;t.save();for(let a=0;a<n.length;a++){const c=n[a];t.beginPath(),t.strokeStyle=c.lineColor||i,t.lineWidth=(c.lineWidth||r)*s,t.moveTo(c.points[0]*s,c.points[1]*s);for(let d=2;d<c.points.length;d+=2)t.lineTo(c.points[d]*s,c.points[d+1]*s);t.stroke()}t.restore()}}const Nr=1024,og=['[aria-modal="true"]','[role="dialog"]','[data-overlay-active="true"]',".ant-modal-root",".ant-modal-wrap",".ant-modal",".ant-drawer",".ant-select-dropdown",".ant-picker-dropdown",".ant-dropdown",".ant-popover",".ant-tooltip",".ant-cascader-dropdown",".ant-mentions-dropdown"].join(", ");function Fr(o,t,e){for(let n=0;n<e.length;n+=Nr){const i=e.slice(n,n+Nr);o.splice(t+n,0,...i)}}class ig{container;pageContainer;pageList;ctxList;pageNo;renderCount;pagePixelRatio;mode;options;position;zone;elementList;listener;eventBus;override;i18n;canvasEvent;globalEvent;cursor;range;margin;background;badge;search;group;area;underline;strikeout;highlight;historyManager;previewer;imageParticle;laTexParticle;textParticle;tableParticle;tableTool;tableOperate;pageNumber;lineNumber;waterMark;placeholder;header;footer;hyperlinkParticle;labelParticle;macroParticle;dateParticle;separatorParticle;pageBreakParticle;superscriptParticle;subscriptParticle;checkboxParticle;radioParticle;menstrualHistoryParticle;fetalHeartPositionParticle;toothPositionParticle;blockParticle;listParticle;lineBreakParticle;whiteSpaceParticle;control;pageBorder;workerManager;scrollObserver;selectionObserver;imageObserver;graffiti;command;interactionPaused;overlayActiveCount;globalShortcutSuspended;LETTER_REG;WORD_LIKE_REG;rowList;pageRowList;painterStyle;painterOptions;visiblePageNoList;intersectionPageNo;lazyRenderIntersectionObserver;printModeData;splitTdValueMap=new Map;tdMap=new Map;constructor(t,e,n,i,r,s){this.container=this._wrapContainer(t),this.pageList=[],this.ctxList=[],this.pageNo=0,this.renderCount=0,this.pagePixelRatio=null,this.mode=e.mode,this.options=e,this.elementList=n.main,this.listener=i,this.eventBus=r,this.override=s,this._formatContainer(),this.pageContainer=this._createPageContainer(),this._createPage(0),this.i18n=new vh(e.locale),this.historyManager=new Aa(this),this.position=new ka(this),this.zone=new _h(this),this.range=new Ja(this),this.margin=new za(this),this.background=new Ba(this),this.badge=new eg(this),this.search=new ja(this),this.group=new Ah(this),this.area=new tg(this),this.underline=new tc(this),this.strikeout=new qa(this),this.highlight=new $a(this),this.previewer=new Dh(this),this.imageParticle=new vi(this),this.laTexParticle=new _i(this),this.textParticle=new ec(this),this.tableParticle=new ic(this),this.tableTool=new sc(this),this.tableOperate=new qh(this),this.pageNumber=new an(this),this.lineNumber=new Bh(this),this.waterMark=new gc(this),this.placeholder=new Xr(this),this.header=new cc(this,n.header),this.footer=new xh(this,n.footer),this.hyperlinkParticle=new rc(this),this.labelParticle=new lc(this),this.macroParticle=new ac(this),this.dateParticle=new Uh(this),this.separatorParticle=new Rc(this),this.pageBreakParticle=new hc(this),this.superscriptParticle=new dc,this.subscriptParticle=new uc,this.checkboxParticle=new Sh(this),this.radioParticle=new Eh(this),this.menstrualHistoryParticle=new Xh(this),this.fetalHeartPositionParticle=new Nh(this),this.toothPositionParticle=new Fh(this),this.blockParticle=new Zh(this),this.listParticle=new Gh(this),this.lineBreakParticle=new Un(this),this.whiteSpaceParticle=new kh(this),this.control=new Ih(this),this.pageBorder=new $h(this),this.graffiti=new ng(this,n.graffiti),this.scrollObserver=new nc(this),this.selectionObserver=new oc(this),this.imageObserver=new Kh,new Jh(this),this.canvasEvent=new xa(this),this.cursor=new da(this,this.canvasEvent),this.canvasEvent.register(),this.globalEvent=new Ga(this,this.canvasEvent),this.globalEvent.register(),this.workerManager=new Yh(this),new jh(this);const{letterClass:a}=e;this.LETTER_REG=new RegExp(`[${a.join("")}]`),this.WORD_LIKE_REG=new RegExp(`${a.map(c=>`[^${c}][${c}]`).join("|")}`),this.rowList=[],this.pageRowList=[],this.painterStyle=null,this.painterOptions=null,this.visiblePageNoList=[],this.intersectionPageNo=0,this.lazyRenderIntersectionObserver=null,this.printModeData=null,this.interactionPaused=!1,this.overlayActiveCount=0,this.globalShortcutSuspended=!1,this.mode===l.EditorMode.PRINT&&this.setPrintData(),this.mode,l.EditorMode.FORM,this.render({isInit:!0,isSetCursor:!1,isFirstRender:!0})}setPrintData(){this.printModeData={header:this.header.getElementList(),main:this.elementList,footer:this.footer.getElementList()};const t=at(this.printModeData);["header","main","footer"].forEach(r=>{t[r]=this.control.filterAssistElement(t[r])});const n=t,i=this.removeStrikeout(n);t.main=i.main.filter(r=>!r.strikeout),this.setEditorData(i)}removeStrikeout(t){if(Array.isArray(t))return t.map(e=>this.removeStrikeout(e)).filter(e=>!(e&&typeof e=="object"&&"strikeout"in e&&e.strikeout===!0));if(t&&typeof t=="object"){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=this.removeStrikeout(t[n]));return e}return t}clearPrintData(){this.printModeData&&(this.setEditorData(this.printModeData),this.printModeData=null)}getLetterReg(){return this.LETTER_REG}getMode(){return this.mode}setMode(t){if(this.mode===t)return;this.macroParticle.clearInlineEditor({isSubmitHistory:!1}),this.mode=t,this.options.mode=t;const e=new Map,n=r=>{r.forEach(s=>{s.controlId&&(s.controlComponent==="value"&&e.set(s.controlId,!0),s.checked&&e.set(s.controlId,!0))})};n(this.elementList),this.elementList.forEach(r=>{r.type==="table"&&r.trList?.forEach(s=>{s.tdList?.forEach(a=>{n(a.value)})})});const i=r=>{r.forEach(s=>{if(!(!s.control&&!s.controlId)&&(s.controlComponent==="value"&&s.strikeout&&(t===l.EditorMode.PRINT?s.hide=!0:s.hide=!1),!!s.control&&!(s.type!=="control"&&s.control.type!=="button"))){if(s.control.type==="TextField"&&(s.controlComponent==="placeholder"||s.controlComponent==="preTextFix"||s.controlComponent==="preTextFixText"||s.controlComponent==="postTextFix"||s.controlComponent==="postTextFixText"||s.controlComponent==="textFixLabel")&&(t===l.EditorMode.EDIT?s.hide=!1:s.hide=!0),s.control.type==="text"&&(s.controlComponent==="placeholder"||s.controlComponent==="prefix"||s.controlComponent==="postfix")&&(t===l.EditorMode.EDIT||t===l.EditorMode.FORM?s.hide=!1:s.hide=!0),s.control.type==="number"||s.control.type==="select"||s.control.type==="date"||s.control.type==="checkbox"||s.control.type==="radio"){if(s.controlComponent==="placeholder"||s.controlComponent==="prefix"||s.controlComponent==="postfix"){const c=e.get(s.controlId);s.control.type==="select"&&t===l.EditorMode.PRINT||t===l.EditorMode.PRINT&&!c?s.hide=!0:s.hide=!1}s.control.type==="number"&&s.controlComponent==="value"&&(t===l.EditorMode.PRINT&&s.strikeout?s.hide=!0:t!==l.EditorMode.PRINT&&s.strikeout&&(s.hide=!1))}s.control.type==="button"&&(s.hide=!1,s.control.hide=!1),s.control.type==="menstrualHistory"&&(s.controlComponent==="prefix"||s.controlComponent==="postfix")&&(t===l.EditorMode.PRINT?s.hide=!0:s.hide=!1)}})};i(this.elementList),this.elementList.forEach(r=>{r.type==="table"&&r.trList.forEach(s=>{s.tdList.forEach(a=>{i(a.value)})})}),t===l.EditorMode.FORM?(this.elementList.filter(r=>r.type==="control").map(r=>{r.control?.type==="button"&&r.control.buttonText&&(r.color="#1677FF",r.highlight="transparent")}),this.hideTextFieldWhitespace(this.elementList,!0),this.updateTextFieldPlaceholderVisibility(this.elementList,!0,!1)):t===l.EditorMode.EDIT?(this.hideTextFieldWhitespace(this.elementList,!1),this.updateTextFieldPlaceholderVisibility(this.elementList,!0,!1)):(this.hideTextFieldWhitespace(this.elementList,!1),this.updateTextFieldPlaceholderVisibility(this.elementList,!1,!0)),t===l.EditorMode.PRINT?(this.elementList.filter(r=>r?.control?.type==="button").map(r=>{(r?.controlComponent==="prefix"||r?.controlComponent==="postfix")&&(r.color="transparent",r.highlight="transparent"),r?.controlComponent==="value"&&!r.control.buttonText&&(r.color="transparent",r.highlight="transparent")}),this.setPrintData()):(this.clearPrintData(),this.elementList.filter(r=>r?.control?.type==="button").map(r=>{(r?.controlComponent==="prefix"||r?.controlComponent==="postfix")&&!r.control.buttonText&&r.type==="control"&&(r.color="transparent",r.highlight="#1677FF"),r?.controlComponent==="value"&&!r.control.buttonText&&(r.color="#fff",r.highlight="#1677FF"),r?.type==="text"&&r.control.buttonText&&(r.color="#000"),r?.type==="control"&&r?.controlComponent==="value"&&r.control.buttonText&&(r.color="#000",r.highlight="transparent")})),this.mode===l.EditorMode.PRINT&&this.clearPrintData(),this.clearSideEffect(),this.control.destroyControl(),this.range.clearRange(),this.render({isSetCursor:!1,isSubmitHistory:!1})}hideTextFieldWhitespace(t,e){const n=r=>r?/^[\s\u00A0\u2000-\u200B\u3000\n\r\t]+$/.test(r):!1;(r=>{for(let s=0;s<r.length;s++){const a=r[s];if(a.type===l.ElementType.TABLE&&a.trList)for(const c of a.trList)for(const d of c.tdList)this.hideTextFieldWhitespace(d.value,e);a.control?.type===l.ControlType.TEXTFIELD&&a.controlComponent===l.ControlComponent.VALUE&&n(a.value)&&(a.hide=e)}})(t)}getSubTemplateRuntimeEndIndex(t,e,n){let i=e+1;for(;i<t.length&&t[i].subTemplateParentId===n;)i++;return i}syncSubTemplateExpandedState(t,e,n,i,r){let s=!1;const a=this.getSubTemplateRuntimeEndIndex(t,e,n.id);if(i&&!n.subTemplateContent?.length&&(i=!1),n.subTemplateExpanded!==i&&(n.subTemplateExpanded=i,s=!0),!!n.hide!==r&&(n.hide=r,s=!0),!i)return a>e+1&&(t.splice(e+1,a-e-1),s=!0),s;if(a===e+1){const c=at(n.subTemplateContent||[]);bt(c,{isHandleFirstElement:!1,editorOptions:this.options});for(let d=0;d<c.length;d++)c[d].subTemplateParentId=n.id;c.length&&(t.splice(e+1,0,...c),s=!0)}return s}applySubTemplateRuntimeState(t,e){const n=i=>{let r=!1,s=0;for(;s<i.length;){const a=i[s];if(a.type===l.ElementType.SUB_TEMPLATE){const c=!!a.subTemplateConditions?.length;if(this.mode===l.EditorMode.EDIT&&c)r=this.syncSubTemplateExpandedState(i,s,a,!0,!0)||r;else if((this.mode===l.EditorMode.FORM||this.mode===l.EditorMode.PRINT)&&c){const d=e?Ch(a.subTemplateConditions,e,a.subTemplateRelation):!1;r=this.syncSubTemplateExpandedState(i,s,a,d,!0)||r}else this.mode!==l.EditorMode.FORM&&this.mode!==l.EditorMode.PRINT&&(r=this.syncSubTemplateExpandedState(i,s,a,!1,!1)||r)}if(a.valueList?.length&&(r=n(a.valueList)||r),a.control?.value?.length&&(r=n(a.control.value)||r),a.type===l.ElementType.TABLE&&a.trList?.length)for(let c=0;c<a.trList.length;c++){const d=a.trList[c];for(let u=0;u<d.tdList.length;u++)r=n(d.tdList[u].value)||r}s++}return r};return n(t)}updateTextFieldPlaceholderVisibility(t,e,n){const i=[l.ControlType.TEXT,l.ControlType.TEXTFIELD,l.ControlType.SELECT,l.ControlType.DATE,l.ControlType.CHECKBOX,l.ControlType.RADIO,l.ControlType.NUMBER];(s=>{let a=0;for(;a<s.length;){const c=s[a];if(c.type===l.ElementType.TABLE&&c.trList)for(const d of c.trList)for(const u of d.tdList)this.updateTextFieldPlaceholderVisibility(u.value,e,n);if(c.control?.type&&i.includes(c.control.type)&&(c.controlComponent===l.ControlComponent.PREFIX||c.controlComponent===l.ControlComponent.PRETEXTFIX||c.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||c.controlComponent===l.ControlComponent.PRE_TEXT)){const d=c.controlId,u=c.control.type;let R=!1,h=!1,g=!1;const f=[],T=[],m=[];let p=-1,I=a;for(;I<s.length;){const L=s[I];if(L.controlId!==d)break;if((L.controlComponent===l.ControlComponent.PREFIX||L.controlComponent===l.ControlComponent.PRETEXTFIX||L.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)&&T.push(I),L.controlComponent===l.ControlComponent.VALUE&&L.value&&L.value.trim()&&(R=!0),L.controlComponent===l.ControlComponent.VALUE&&(L.type===l.ElementType.MENSTRUAL_HISTORY||L.type===l.ElementType.FETAL_HEART_POSITION||L.type===l.ElementType.TOOTH_POSITION||L.type===l.ElementType.MACRO||L.type===l.ElementType.CUSTOM_MACRO)&&(R=!0),L.controlComponent===l.ControlComponent.VALUE&&L.control&&L.control.type!==u&&(h=!0),L.controlComponent===l.ControlComponent.PLACEHOLDER&&(g=!0,f.push(I)),L.controlComponent===l.ControlComponent.POSTFIX||L.controlComponent===l.ControlComponent.POSTTEXTFIX||L.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT){m.push(I),p=I;break}I++}if(!R&&!h)if(g&&f.length>0)for(const L of f)s[L].hide=!e;else e&&c.control?.placeholder&&(p>0?this.control.addPlaceholder(p-1):this.control.addPlaceholder(a));if(n)if(e&&R){for(const L of T)s[L].hide=!0;for(const L of m)s[L].hide=!0}else if(e){for(const L of T)s[L].hide=!1;for(const L of m)s[L].hide=!1}else{for(const L of T)s[L].hide=!0;for(const L of m)s[L].hide=!0}else{for(const L of T)s[L].hide=!1;for(const L of m)s[L].hide=!1}a=I}a++}})(t)}isReadonly(){if(this.area.getActiveAreaInfo()?.area?.mode)return this.area.isReadonly();switch(this.mode){case l.EditorMode.DESIGN:return!1;case l.EditorMode.READONLY:case l.EditorMode.PRINT:case l.EditorMode.GRAFFITI:return!0;case l.EditorMode.FORM:if(this.control.getIsRangeWithinControl()){const t=this.getElementList(),{startIndex:e}=this.range.getRange();if(t[e]?.control?.type===l.ControlType.TEXTFIELD)return!0}return!this.control.getIsRangeWithinControl();default:return!1}}isDisabled(){if(this.mode===l.EditorMode.DESIGN)return!1;const{startIndex:t,endIndex:e}=this.range.getRange(),n=this.getElementList();if(this.getTd()?.disabled)return!0;if(t===e){const r=n[t],s=n[t+1];return!!(r?.title?.disabled&&s?.title?.disabled&&r.titleId===s.titleId||r?.control?.disabled&&s?.control?.disabled&&r.controlId===s.controlId)}return n.slice(t+1,e+1).some(r=>r.title?.disabled||r.control?.disabled)}isDesignMode(){return this.mode===l.EditorMode.DESIGN}isPrintMode(){return this.mode===l.EditorMode.PRINT}isGraffitiMode(){return this.mode===l.EditorMode.GRAFFITI}getOriginalWidth(){const{paperDirection:t,width:e,height:n}=this.options;return t===l.PaperDirection.VERTICAL?e:n}getOriginalHeight(){const{paperDirection:t,width:e,height:n}=this.options;return t===l.PaperDirection.VERTICAL?n:e}getWidth(){return Math.floor(this.getOriginalWidth()*this.options.scale)}getHeight(){return Math.floor(this.getOriginalHeight()*this.options.scale)}getMainHeight(){return this.getHeight()-this.getMainOuterHeight()}getMainOuterHeight(){const t=this.getMargins(),e=this.header.getExtraHeight(),n=this.footer.getExtraHeight();return t[0]+t[2]+e+n}getCanvasWidth(t=-1){return this.getPage(t).width}getCanvasHeight(t=-1){return this.getPage(t).height}getInnerWidth(){const t=this.getWidth(),e=this.getMargins();return t-e[1]-e[3]}getOriginalInnerWidth(){const t=this.getOriginalWidth(),e=this.getOriginalMargins();return t-e[1]-e[3]}getContextInnerWidth(){const t=this.position.getPositionContext();if(t.isTable){const{index:e,trIndex:n,tdIndex:i}=t,s=this.getOriginalElementList()[e],a=s.trList[n].tdList[i],c=this.getTdPadding(s);return a.width-c[1]-c[3]}return this.getOriginalInnerWidth()}getMargins(){return this.getOriginalMargins().map(t=>t*this.options.scale)}getOriginalMargins(){const{margins:t,paperDirection:e}=this.options;return e===l.PaperDirection.VERTICAL?t:[t[1],t[2],t[3],t[0]]}getPageGap(){return this.options.pageGap*this.options.scale}getOriginalPageGap(){return this.options.pageGap}getPageNumberBottom(){const{pageNumber:{bottom:t},scale:e}=this.options;return t*e}getMarginIndicatorSize(){return this.options.marginIndicatorSize*this.options.scale}getDefaultBasicRowMarginHeight(){return this.options.defaultBasicRowMarginHeight*this.options.scale}getHighlightMarginHeight(){return this.options.highlightMarginHeight*this.options.scale}getTdPadding(t){const{table:{tdPadding:e},scale:n}=this.options;return(t?.tdPadding||e).map(r=>r*n)}getContainer(){return this.container}getPageContainer(){return this.pageContainer}getEventTarget(t){return t instanceof Element?t:t instanceof Node?t.parentElement:null}isTargetInsideEditor(t){const e=this.getEventTarget(t);return e?this.container.contains(e)?!0:!!Wi(e,n=>!!n&&n.nodeType===1&&!!n.getAttribute(ue)):!1}isTargetInsideExternalOverlay(t){const e=this.getEventTarget(t);return!e||this.isTargetInsideEditor(e)?!1:!!e.closest(og)}pauseInteraction(){this.interactionPaused=!0,this.cursor?.getAgentDom().blur(),this.globalEvent?.resetSideEffect()}resumeInteraction(){this.interactionPaused=!1}setOverlayActive(t){this.overlayActiveCount=t?1:0,t&&(this.cursor?.getAgentDom().blur(),this.globalEvent?.resetSideEffect())}suspendGlobalShortcut(t){this.globalShortcutSuspended=t}isInteractionSuspended(){return this.interactionPaused||this.overlayActiveCount>0}isGlobalShortcutActive(){return!this.globalShortcutSuspended&&!this.isInteractionSuspended()}getVisiblePageNoList(){return this.visiblePageNoList}setVisiblePageNoList(t){this.visiblePageNoList=t,this.listener.visiblePageNoListChange&&this.listener.visiblePageNoListChange(this.visiblePageNoList),this.eventBus.isSubscribe("visiblePageNoListChange")&&this.eventBus.emit("visiblePageNoListChange",this.visiblePageNoList)}getIntersectionPageNo(){return this.intersectionPageNo}setIntersectionPageNo(t){this.intersectionPageNo=t,this.listener.intersectionPageNoChange&&this.listener.intersectionPageNoChange(this.intersectionPageNo),this.eventBus.isSubscribe("intersectionPageNoChange")&&this.eventBus.emit("intersectionPageNoChange",this.intersectionPageNo)}getPageNo(){return this.pageNo}setPageNo(t){this.pageNo=t}getRenderCount(){return this.renderCount}getPage(t=-1){return this.pageList[~t?t:this.pageNo]}getPageList(){return this.pageList}getPageCount(){return this.pageList.length}getTableRowList(t){const e=this.position.getPositionContext(),{index:n,trIndex:i,tdIndex:r}=e;return t[n].trList[i].tdList[r].rowList}getOriginalRowList(){const t=this.getZone();return t.isHeaderActive()?this.header.getRowList():t.isFooterActive()?this.footer.getRowList():this.rowList}getRowList(){return this.position.getPositionContext().isTable?this.getTableRowList(this.getOriginalElementList()):this.getOriginalRowList()}getPageRowList(){return this.pageRowList}getCtx(){return this.ctxList[this.pageNo]}getOptions(){return this.options}getSearch(){return this.search}getGroup(){return this.group}getArea(){return this.area}getBadge(){return this.badge}getHistoryManager(){return this.historyManager}getPosition(){return this.position}getZone(){return this.zone}getRange(){return this.range}getLineBreakParticle(){return this.lineBreakParticle}getTextParticle(){return this.textParticle}getHeaderElementList(){return this.header.getElementList()}getTableElementList(t){const e=this.position.getPositionContext(),{index:n,trIndex:i,tdIndex:r}=e;return t[n]?.trList?.[i].tdList[r].value||[]}getElementList(){const t=this.position.getPositionContext(),e=this.getOriginalElementList();return t.isTable?this.getTableElementList(e):e}getMainElementList(){return this.position.getPositionContext().isTable?this.getTableElementList(this.elementList):this.elementList}getOriginalElementList(){const t=this.getZone();return t.isHeaderActive()?this.getHeaderElementList():t.isFooterActive()?this.getFooterElementList():this.elementList}getOriginalMainElementList(){return this.elementList}getFooterElementList(){return this.footer.getElementList()}getTd(){const t=this.position.getPositionContext(),{index:e,trIndex:n,tdIndex:i,isTable:r}=t;return r?this.getOriginalElementList()[e].trList[n].tdList[i]:null}getTdByPosition(t){const{index:e,trIndex:n,tdIndex:i,isTable:r}=t;return r?this.getOriginalElementList()[e].trList[n].tdList[i]:null}insertElementTextField(t,e={}){if(!t.length||!this.range.getIsCanInput())return;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return;const r=this.getElementList(),{isSubmitHistory:s=!0}=e;bt(t,{isHandleFirstElement:!1,editorOptions:this.options});let a=-1,c=this.control.getActiveControl();if(!c&&this.control.getIsRangeWithinControl()&&(this.control.initControl(),c=this.control.getActiveControl()),c&&this.control.getIsRangeWithinControl()){const d=n===i,u=n+1;d||this.newSpliceElementList(r,u,i-n),this.newSpliceElementList(r,u,0,t),a=n+t.length}else{const d=n===i,u=n+1;d||this.newSpliceElementList(r,u,i-n),this.newSpliceElementList(r,u,0,t),a=n+t.length;const R=r[u-1];t[0].listId&&R&&!R.listId&&R?.value===_&&(!R.type||R.type===l.ElementType.TEXTFIELD)&&(r.splice(n,1),a-=1)}this.control.destroyControl(),~a&&(this.range.setRange(a,a),this.render({curIndex:a,isSubmitHistory:s}))}insertElementList(t,e={}){if(!t.length||!this.range.getIsCanInput())return;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return;const{isSubmitHistory:r=!0}=e;bt(t,{isHandleFirstElement:!1,editorOptions:this.options});let s=-1,a=this.control.getActiveControl();if(!a&&this.control.getIsRangeWithinControl()&&(this.control.initControl(),a=this.control.getActiveControl()),a&&this.control.getIsRangeWithinControl()){const c=this.getElementList(),d=n===i,u=n+1,R=c[n];if(R?.controlComponent===l.ControlComponent.PRE_TEXT||R?.controlComponent===l.ControlComponent.POST_TEXT||R?.controlComponent===l.ControlComponent.PREFIX||R?.controlComponent===l.ControlComponent.POSTFIX)for(let f=0;f<t.length;f++)t[f].control||(t[f].color=this.options.defaultColor);d&&(c[n]?.control?.type===l.ControlType.TEXTFIELD||c[n]?.control?.type===l.ControlType.TEXT)&&this.control.removePlaceholder(n),d||this.newSpliceElementList(c,u,i-n);const g=c[n]?.controlId||c[n-1]?.controlId||c[n+1]?.controlId;for(let f=0;f<t.length;f++){if(t[f]?.control?.type=="button"&&!t[f]?.control?.buttonText&&(t[f]?.controlComponent==="prefix"||t[f]?.controlComponent==="postfix"?(t[f].color="transparent",t[f].highlight="#1677FF"):(t[f].color="#fff",t[f].highlight="#1677FF")),t[f]?.type===l.ElementType.MENSTRUAL_HISTORY||t[f]?.type===l.ElementType.FETAL_HEART_POSITION||t[f]?.type===l.ElementType.TOOTH_POSITION||t[f]?.type===l.ElementType.MACRO||t[f]?.type===l.ElementType.CUSTOM_MACRO||t[f]?.type===l.ElementType.REUSABLE_ITEM||t[f]?.type===l.ElementType.SUB_TEMPLATE||t[f]?.type===l.ElementType.SPECIAL_SYMBOLS){t[f].controlComponent=l.ControlComponent.VALUE;let T=c[n]?.controlId;T||(T=c[n-1]?.controlId),T||(T=c[n+1]?.controlId),!t[f].controlId&&T&&(t[f].controlId=T)}g&&t[f]?.control&&t[f].controlId&&t[f].controlId!==g&&(t[f].originControlId=g)}this.newSpliceElementList(c,u,0,t),s=n+t.length}else{const c=this.getElementList(),d=n===i,u=n+1;if(c[u]?.control?.type=="TextField"||c[n]?.control?.type=="TextField"){d||this.newSpliceElementList(c,u,i-n);for(let R=0;R<t.length;R++)if(t[R]?.type===l.ElementType.MENSTRUAL_HISTORY||t[R]?.type===l.ElementType.FETAL_HEART_POSITION||t[R]?.type===l.ElementType.TOOTH_POSITION||t[R]?.type===l.ElementType.MACRO||t[R]?.type===l.ElementType.CUSTOM_MACRO||t[R]?.type===l.ElementType.REUSABLE_ITEM||t[R]?.type===l.ElementType.SUB_TEMPLATE||t[R]?.type===l.ElementType.SPECIAL_SYMBOLS){t[R].controlComponent=l.ControlComponent.VALUE;const h=c[n]?.controlId||c[u]?.controlId;!t[R].controlId&&h&&(t[R].controlId=h)}this.newSpliceElementList(c,u,0,t),s=n+t.length}else{d||this.spliceElementList(c,u,i-n);for(let h=0;h<t.length;h++)t[h]?.control?.type=="button"&&!t[h]?.control?.buttonText&&(t[h]?.controlComponent==="prefix"||t[h]?.controlComponent==="postfix"?(t[h].color="transparent",t[h].highlight="#1677FF"):(t[h].color="#fff",t[h].highlight="#1677FF"));this.spliceElementList(c,u,0,t),s=n+t.length;const R=c[u-1];t[0].listId&&R&&!R.listId&&R?.value===_&&(!R.type||R.type===l.ElementType.TEXT)&&(c.splice(n,1),s-=1)}}~s&&(this.range.setRange(s,s),this.render({curIndex:s,isSubmitHistory:r}))}appendElementList(t,e={}){if(!t.length)return;bt(t,{isHandleFirstElement:!1,editorOptions:this.options});let n;const{isPrepend:i,isSubmitHistory:r=!0}=e;i?(this.elementList.splice(1,0,...t),n=t.length):(this.elementList.push(...t),n=this.elementList.length-1),this.range.setRange(n,n),this.render({curIndex:n,isSubmitHistory:r})}spliceElementList(t,e,n,i,r){const{isIgnoreDeletedRule:s=!1}=r||{},{group:a,modeRule:c}=this.options;if(n>0){const d=e+n,R=t[d]?.listId;if(R&&t[e-1]?.listId!==R){let h=d;for(;h<t.length;){const g=t[h];if(g.listId!==R||g.value===_)break;delete g.listId,delete g.listType,delete g.listStyle,h++}}if(!s&&!this.isDesignMode()&&!this.control.getIsRangeWithinControl()){const h=this.getTd()?.deletable;let g=d-1;for(;g>=e;){const f=t[g];(_t(f)||h!==!1&&f?.control?.deletable!==!1&&(!f.controlId||this.mode!==l.EditorMode.FORM||!c[this.mode].controlDeletableDisabled)&&f?.title?.deletable!==!1&&(a.deletable!==!1||!f.groupIds?.length)&&(f?.area?.deletable!==!1||f?.areaIndex!==0))&&t.splice(g,1),g--}}else t.splice(e,n)}if(i?.length){let d=t[e];for(let u=0;u<i.length;u++)!i[u].controlComponent&&d?.controlComponent&&(i[u].controlId=d.controlId,i[u].control=d.control,i[u].controlComponent=d.controlComponent),d=i[u];Fr(t,e,i)}}newSpliceElementList(t,e,n,i,r){const{isIgnoreDeletedRule:s=!1}=r||{},{group:a,modeRule:c}=this.options;if(n>0){const u=e+n,h=t[u]?.listId;if(h&&t[e-1]?.listId!==h){let g=u;for(;g<t.length;){const f=t[g];if(f.listId!==h||f.value===_)break;delete f.listId,delete f.listType,delete f.listStyle,g++}}if(!s&&!this.isDesignMode()&&!this.control.getIsRangeWithinControl()){const g=this.getTd()?.deletable;let f=u-1;for(;f>=e;){const T=t[f];(_t(T)||g!==!1&&T?.control?.deletable!==!1&&(!T.controlId||this.mode!==l.EditorMode.FORM||!c[this.mode].controlDeletableDisabled)&&T?.title?.deletable!==!1&&(a.deletable!==!1||!T.groupIds?.length)&&(T?.area?.deletable!==!1||T?.areaIndex!==0))&&t.splice(f,1),f--}}else t.splice(e,n)}const d=t[e]?.controlId;if(i?.length){for(let u=0;u<i.length;u++)d&&(i[u].originControlId=d);Fr(t,e,i)}}getCanvasEvent(){return this.canvasEvent}getGlobalEvent(){return this.globalEvent}getListener(){return this.listener}getEventBus(){return this.eventBus}getOverride(){return this.override}getCursor(){return this.cursor}getPreviewer(){return this.previewer}getImageParticle(){return this.imageParticle}getTableTool(){return this.tableTool}getTableOperate(){return this.tableOperate}getTableParticle(){return this.tableParticle}getHeader(){return this.header}getFooter(){return this.footer}getHyperlinkParticle(){return this.hyperlinkParticle}getMacroParticle(){return this.macroParticle}getDateParticle(){return this.dateParticle}getListParticle(){return this.listParticle}getCheckboxParticle(){return this.checkboxParticle}getRadioParticle(){return this.radioParticle}getMenstrualHistoryParticle(){return this.menstrualHistoryParticle}getFetalHeartPositionParticle(){return this.fetalHeartPositionParticle}getToothPositionParticle(){return this.toothPositionParticle}getControl(){return this.control}getWorkerManager(){return this.workerManager}getImageObserver(){return this.imageObserver}getI18n(){return this.i18n}getGraffiti(){return this.graffiti}setCommand(t){this.command=t}getCommand(){return this.command}getRowCount(){return this.getRowList().length}async getDataURL(t={}){const{pixelRatio:e,mode:n}=t;e&&this.setPagePixelRatio(e);const i=this.mode,r=!!n&&i!==n;r&&this.setMode(n),this.render({isLazy:!1,isCompute:!1,isSetCursor:!1,isSubmitHistory:!1}),await this.imageObserver.allSettled();const s=this.pageList.map(a=>a.toDataURL());return e&&this.setPagePixelRatio(null),r&&this.setMode(i),s}getPainterStyle(){return this.painterStyle&&Object.keys(this.painterStyle).length?this.painterStyle:null}getPainterOptions(){return this.painterOptions}setPainterStyle(t,e){this.painterStyle=t,this.painterOptions=e||null,this.getPainterStyle()&&this.pageList.forEach(n=>n.style.cursor="copy")}setDefaultRange(){this.elementList.length&&setTimeout(()=>{const t=this.elementList.length-1;this.range.setRange(t,t),this.range.setRangeStyle()})}getIsPagingMode(){return this.options.pageMode===l.PageMode.PAGING}setPageMode(t){if(!t||this.options.pageMode===t)return;if(this.options.pageMode=t,t===l.PageMode.PAGING){const{height:i}=this.options,r=this.getPagePixelRatio(),s=this.pageList[0];s.style.height=`${i}px`,s.height=i*r,this._initPageContext(this.ctxList[0])}else this._disconnectLazyRender(),this.header.recovery(),this.footer.recovery(),this.zone.setZone(l.EditorZone.MAIN);const{startIndex:e}=this.range.getRange(),n=this.range.getIsCollapsed();this.render({isSetCursor:!0,curIndex:e,isSubmitHistory:!1}),n||this.cursor.drawCursor({isShow:!1}),setTimeout(()=>{this.listener.pageModeChange&&this.listener.pageModeChange(t),this.eventBus.isSubscribe("pageModeChange")&&this.eventBus.emit("pageModeChange",t)})}setPageScale(t){const e=this.getPagePixelRatio();this.options.scale=t;const n=this.getWidth(),i=this.getHeight();this.container.style.width=`${n}px`,this.pageList.forEach((s,a)=>{s.width=n*e,s.height=i*e,s.style.width=`${n}px`,s.style.height=`${i}px`,s.style.marginBottom=`${this.getPageGap()}px`,this._initPageContext(this.ctxList[a])});const r=this.position.getCursorPosition();this.render({isSubmitHistory:!1,isSetCursor:!!r,curIndex:r?.index}),this.listener.pageScaleChange&&this.listener.pageScaleChange(t),this.eventBus.isSubscribe("pageScaleChange")&&this.eventBus.emit("pageScaleChange",t)}getPagePixelRatio(){return this.pagePixelRatio||window.devicePixelRatio}setPagePixelRatio(t){!this.pagePixelRatio&&t===window.devicePixelRatio||t===this.pagePixelRatio||(this.pagePixelRatio=t,this.setPageDevicePixel())}setPageDevicePixel(){const t=this.getPagePixelRatio(),e=this.getWidth(),n=this.getHeight();this.pageList.forEach((i,r)=>{i.width=e*t,i.height=n*t,this._initPageContext(this.ctxList[r])}),this.render({isSubmitHistory:!1,isSetCursor:!1})}setPaperSize(t,e){this.options.width=t,this.options.height=e;const n=this.getPagePixelRatio(),i=this.getWidth(),r=this.getHeight();this.container.style.width=`${i}px`,this.pageList.forEach((s,a)=>{s.width=i*n,s.height=r*n,s.style.width=`${i}px`,s.style.height=`${r}px`,this._initPageContext(this.ctxList[a])}),this.render({isSubmitHistory:!1,isSetCursor:!1})}setPaperDirection(t){const e=this.getPagePixelRatio();this.options.paperDirection=t;const n=this.getWidth(),i=this.getHeight();this.container.style.width=`${n}px`,this.pageList.forEach((r,s)=>{r.width=n*e,r.height=i*e,r.style.width=`${n}px`,r.style.height=`${i}px`,this._initPageContext(this.ctxList[s])}),this.render({isSubmitHistory:!1,isSetCursor:!1})}setPaperMargin(t){this.options.margins=t,this.render({isSubmitHistory:!1,isSetCursor:!1})}getOriginValue(t={}){const{pageNo:e}=t;let n=this.elementList;return Number.isInteger(e)&&e>=0&&e<this.pageRowList.length&&(n=this.pageRowList[e].flatMap(r=>r.elementList)),{header:this.getHeaderElementList(),main:n,footer:this.getFooterElementList(),graffiti:this.graffiti.getValue()}}getValue(t={}){const e=this.getOriginValue(t);console.log(this.elementList,"所有元素");const{extraPickAttrs:n}=t,i={header:Mt(e.header,{extraPickAttrs:n,editorOptions:this.options}),main:Mt(e.main,{extraPickAttrs:n,isClassifyArea:!0,editorOptions:this.options}),footer:Mt(e.footer,{extraPickAttrs:n,editorOptions:this.options}),graffiti:e.graffiti};return{version:ve,data:i,options:at(this.options)}}setValue(t,e){const{header:n,main:i,footer:r}=at(t);if(!n&&!i&&!r)return;const{isSetCursor:s=!1}=e||{};[n,i,r].forEach(d=>{d&&bt(d,{editorOptions:this.options,isForceCompensation:!0})}),this.setEditorData({header:n,main:i,footer:r}),this.historyManager.recovery();const c=s?i?.length?i.length-1:0:void 0;c!==void 0&&this.range.setRange(c,c),this.render({curIndex:c,isSetCursor:s,isFirstRender:!0})}setEditorData(t){const{header:e,main:n,footer:i}=t;e&&this.header.setElementList(e),n&&(this.elementList=n),i&&this.footer.setElementList(i)}_wrapContainer(t){const e=document.createElement("div");return t.append(e),e}_formatContainer(){this.container.style.position="relative",this.container.style.width=`${this.getWidth()}px`,this.container.setAttribute(ue,l.EditorComponent.MAIN)}_createPageContainer(){const t=document.createElement("div");return t.classList.add(`${z}-page-container`),this.container.append(t),t}_createPage(t){const e=this.getWidth(),n=this.getHeight(),i=document.createElement("canvas");i.style.width=`${e}px`,i.style.height=`${n}px`,i.style.display="block",i.style.backgroundColor="#ffffff",i.style.marginBottom=`${this.getPageGap()}px`,i.setAttribute("data-index",String(t)),this.pageContainer.append(i);const r=this.getPagePixelRatio();i.width=e*r,i.height=n*r,i.style.cursor="text";const s=i.getContext("2d");this._initPageContext(s),this.pageList.push(i),this.ctxList.push(s)}_initPageContext(t){const e=this.getPagePixelRatio();t.scale(e,e),t.letterSpacing="0px",t.wordSpacing="0px",t.direction="ltr"}getElementFont(t,e=1){const{defaultSize:n,defaultFont:i}=this.options,r=t.font||i,s=t.actualSize||t.size||n;return`${t.italic?"italic ":""}${t.bold?"bold ":""}${s*e}px ${r}`}getElementSize(t){return t.actualSize||t.size||this.options.defaultSize}getElementRowMargin(t){const{defaultSize:e,defaultBasicRowMarginHeight:n,defaultRowMargin:i,scale:r}=this.options,s=t.size||e;let a=1;return s<12?a=s/12:s>30&&(a=1+(s-30)/30),n*a*(t.rowMargin??i)*r}computeRowList(t){const{innerWidth:e,elementList:n,isPagingMode:i=!1,isFromTable:r=!1,startX:s=0,startY:a=0,pageHeight:c=0,mainOuterHeight:d=0,surroundElementList:u=[]}=t,{defaultSize:R,scale:h,imgCaption:g,table:{tdPadding:f,defaultTrMinHeight:T},defaultTabWidth:m}=this.options,p=this.getDefaultBasicRowMarginHeight(),L=document.createElement("canvas").getContext("2d"),P=this.listParticle.computeListStyle(L,n),C=[],S=this._collectTextControlValueSet(n);n.length&&C.push({width:0,height:0,ascent:0,elementList:[],startIndex:0,rowIndex:0,rowFlex:n?.[0]?.rowFlex||n?.[1]?.rowFlex});let F=s,N=a,V=0,Y,E=0,W=0;for(let X=0;X<n.length;X++){const O=C[C.length-1],M=n[X];this.clearElementEffect(M);const b=this.getElementRowMargin(M),y={width:0,height:0,boundingBoxAscent:0,boundingBoxDescent:0},D=O.offsetX||M.listId&&P.get(M.listId)||0,U=e-D,Q=O.elementList.length===1;if(F+=Q?D:0,N+=Q&&O.offsetY||0,(M.control?.type===l.ControlType.TEXTFIELD||M.control?.type===l.ControlType.TEXT)&&!this.isDesignMode()&&(M.controlComponent===l.ControlComponent.PRETEXTFIX||M.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||M.controlComponent===l.ControlComponent.POSTTEXTFIX||M.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||M.controlComponent===l.ControlComponent.TEXTFIXLABEL||M.controlComponent===l.ControlComponent.PLACEHOLDER||M.controlComponent===l.ControlComponent.PREFIX||M.controlComponent===l.ControlComponent.POSTFIX)){const K=M.control?.type===l.ControlType.TEXTFIELD,v=M.controlId,w=!!v&&!!S?.has(v);K?this.mode===l.EditorMode.EDIT?M.hide=!1:M.hide=!0:this.mode===l.EditorMode.EDIT?M.hide=!1:this.mode===l.EditorMode.FORM?M.controlComponent===l.ControlComponent.PLACEHOLDER||M.controlComponent===l.ControlComponent.TEXTFIXLABEL?M.hide=w:M.hide=!1:M.hide=!0}if(_t(M)&&!this.isDesignMode()){const K=O.elementList[O.elementList.length-1];y.height=K?.metrics.height||this.options.defaultSize*h,y.boundingBoxAscent=K?.metrics.boundingBoxAscent||0,y.boundingBoxDescent=K?.metrics.boundingBoxDescent||0}else if(M.type===l.ElementType.IMAGE||M.type===l.ElementType.LATEX)if(M.imgDisplay===l.ImageDisplay.SURROUND||M.imgDisplay===l.ImageDisplay.FLOAT_TOP||M.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM)y.width=0,y.height=0,y.boundingBoxDescent=0;else{const K=M.width*h,v=M.height*h;if(K>U){const w=v*U/K;M.width=U/h,M.height=w/h,y.width=U,y.height=w,y.boundingBoxDescent=w}else y.width=K,y.height=v,y.boundingBoxDescent=v;if(M.imgCaption?.value){const w=M.imgCaption.size||g.size,Z=M.imgCaption.top??g.top,J=(w+Z)*h;y.boundingBoxAscent+=J}}else if(M.type===l.ElementType.TABLE){const K=M.tdPadding||f;if(M.pagingId){let x=X+1,A=0;for(;x<n.length;){const $=n[x];if($.pagingId===M.pagingId){const B=$.trList.filter(pt=>!pt.pagingRepeat).filter(pt=>(pt.tdList=pt.tdList.filter(Xt=>{if(Xt.originalId){for(let Lt=0;Lt<M.trList.length;Lt++){const yt=M.trList[Lt],Yt=yt.tdList.find(({id:St})=>St===Xt.originalId);if(Yt){Xt.value[0]?.type===l.ElementType.SPLIT_TAG&&Xt.value.splice(0,1),Yt.value.push(...Xt.value.map(St=>this.updateElementTableInfo(St,M,yt,Yt))),Yt.rowspan=Yt.originalRowspan??Yt.rowspan;break}}return!1}return!0}),!pt.originalId));M.trList.push(...B),M.height+=$.height,x++,A++}else break}A&&n.splice(X+1,A)}M.pagingIndex=M.pagingIndex??0,this.tableParticle.computeTrHeight(M,x=>this.computeRowList({innerWidth:(x.width-(K[1]+K[3]))*h,elementList:x.value,isFromTable:!0,isPagingMode:i})),M.trList?.forEach(x=>{x.tdList.forEach(A=>{this.tdMap.set(A.id,A)})});const v=this.tableParticle.getTableHeight(M),w=this.tableParticle.getTableWidth(M);M.width=w,M.height=v;const Z=w*h,J=v*h;if(y.width=Z,y.height=J,y.boundingBoxDescent=J,y.boundingBoxAscent=-b,n[X+1]?.type===l.ElementType.TABLE&&(y.boundingBoxAscent-=b),i){const x=this.getHeight(),A=this.getMainOuterHeight();let $=A;for(let Lt=0;Lt<C.length;Lt++){const yt=C[Lt],Yt=yt.offsetY||0;yt.height+$+Yt>x||C[Lt-1]?.isPageBreak?$=A+yt.height+Yt:$+=yt.height+Yt}const B=b*2,pt=M.trList[0].height*h;($+pt+B>x||M.pagingIndex!==0&&M.trList[0].pagingRepeat||n[X-1]?.type===l.ElementType.PAGE_BREAK)&&($=A);let Xt=x-($+B);if(J>Xt){const Lt=M.trList;let yt=0,Yt=0,St=0;for(let Tt=0;Tt<Lt.length;Tt++){const Pt=Lt[Tt],Kt=Pt.height*h;if($+B+St+Kt>x){const Qt=Pt;let Ve=0;const qt={...at(Qt),id:lt(),originalId:Qt.originalId??Qt.id,minHeight:void 0,tdList:M.colgroup.map((mt,ie)=>{if(Ve--,Ve>0)return;const Ht=Qt.tdList.find(Ye=>Ye.colIndex===ie),Bt=Ht??this.tableParticle.findPreRowSpanTd(Lt,Tt,ie);Ht&&(Ve=Ht.colspan);const $e=lt();return Bt.originalRowspan=Bt.rowspan,Ht?{...Ht,id:$e,originalId:Ht.originalId??Ht.id,linkTdPrevId:Ht.id,tdIndex:ie,original:Bt}:{id:$e,originalId:Bt.originalId??Bt.id,linkTdPrevId:Bt.id,tdIndex:ie,colIndex:ie,colspan:1,rowspan:1,value:[],rowList:[],original:Bt}}).filter(mt=>!!mt)},de=qt.tdList,xt=de.map(mt=>mt.original);xt.forEach((mt,ie)=>{const Ht=[];let Bt=Xt;if(mt.rowspan>1){const Ye=Lt.slice(mt.trIndex,mt.trIndex+Tt-mt.trIndex);Bt+=Ye.reduce((Pf,Mf)=>Mf.height*h+Pf,0)}for(;mt.mainHeight*h>Bt&&mt.rowList?.length;){const Ye=mt.rowList.pop();mt.value.splice(mt.value.length-Ye.elementList.length),Ht.unshift(Ye),mt.mainHeight-=Ye.height}const $e=de[ie];$e.rowList=Ht,$e.value=Ht.map(Ye=>Ye.elementList).flat()});let Me=!0;const Xi=Qt.tdList.some(mt=>mt.rowList?.length),Dr=qt.tdList.some(mt=>mt.rowList?.length),Ni=Qt.minHeight>Xt;if(Dr||Ni){(Xi||!Dr&&Ni)&&(Ni&&(Qt.originalMinHeight=Qt.minHeight,Qt.minHeight=Xt,qt.minHeight=Math.max(Qt.originalMinHeight-Xt,T)),qt.tdList.forEach(mt=>{mt.original.linkTdNextId=mt.id,mt.value.length&&mt.value[0].value!==_&&mt.value.unshift({...mt.original.value.slice(-1).pop(),value:_,type:l.ElementType.SPLIT_TAG})}),Lt.splice(yt+1,0,qt),yt+=1,Yt=Lt.length-yt,Me=!1),xt.forEach(mt=>{if(mt.rowspan>1){const ie=mt.rowspan-(Tt-mt.trIndex);mt.rowspan=Tt-mt.trIndex+(Xi?1:0);const Ht=qt.tdList.find(Bt=>Bt.colIndex===mt.colIndex);Xi?Ht.rowspan=ie:(Ht.original.linkTdNextId=Ht.id,Qt.tdList.push({...mt,...Ht,rowspan:ie}),Qt.tdList.sort((Bt,$e)=>Bt.colIndex-$e.colIndex),Ht.value=[])}}),Me&&xt.forEach((mt,ie)=>{mt.value.push(...de[ie].value)});break}}yt=Tt+1,Yt=Lt.length-yt,St+=Kt,Xt-=Kt}if(Yt){const Tt=Lt.splice(yt,Yt),Pt=M.pagingId||lt();M.pagingId=Pt;const Kt=at(M);Kt.originalId=M.originalId??M.id,Kt.pagingId=Pt,Kt.pagingIndex=M.pagingIndex+1;const Qt=Lt.filter(de=>de.pagingRepeat);if(Qt.length){const de=at(Qt);de.forEach(xt=>xt.id=lt()),Tt.unshift(...de)}Kt.trList=Tt,Kt.id=lt(),Kt.trList?.forEach(de=>{de.tdList.forEach(xt=>{if(delete xt.valueStartIndex,xt.linkTdPrevId){const Me=this.getTdById(xt.linkTdPrevId);xt.valueStartIndex=Me?(Me.valueStartIndex??0)+Me.value.length:0,this.splitTdValueMap.has(xt.originalId)?this.splitTdValueMap.get(xt.originalId).push(...xt.value):Me&&this.splitTdValueMap.set(xt.originalId,[...Me.value,...xt.value])}xt.value.forEach(Me=>this.updateElementTableInfo(Me,Kt,de,xt))})}),this.spliceElementList(n,X+1,0,[Kt]),this.tableParticle.computeTrHeight(M);const Ve=this.tableParticle.getTableHeight(M),qt=Ve*h;M.height=Ve,y.height=qt,y.boundingBoxDescent=qt}}if(M.pagingId){const Lt=this.position.getPositionContext();if(Lt.isTable){let yt=-1,Yt=-1,St=X;for(;St<n.length;){const Tt=n[St];if(Tt.pagingId!==M.pagingId)break;const Pt=Tt.trList.findIndex(Kt=>Kt.id===Lt.trId);if(~Pt){yt=St,Yt=Pt;break}St++}~yt&&(Lt.index=yt,Lt.trIndex=Yt,this.position.setPositionContext(Lt))}}}this.initTableElementIndex(M,X)}else if(M.type===l.ElementType.SEPARATOR){const{separator:{lineWidth:K}}=this.options,v=M.lineWidth||K;M.width=U/h,y.width=U,y.height=v*h,y.boundingBoxAscent=-b,y.boundingBoxDescent=-b+y.height}else if(M.type===l.ElementType.PAGE_BREAK)M.width=U/h,y.width=U,y.height=R;else if(M.type===l.ElementType.RADIO||M.controlComponent===l.ControlComponent.RADIO){const{width:K,height:v,gap:w}=this.options.radio,Z=K+w*2;M.width=Z,y.width=Z*h,y.height=v*h}else if(M.type===l.ElementType.CHECKBOX||M.controlComponent===l.ControlComponent.CHECKBOX){const{width:K,height:v,gap:w}=this.options.checkbox,Z=K+w*2;M.width=Z,y.width=Z*h,y.height=v*h}else if(M.type===l.ElementType.MENSTRUAL_HISTORY){const K=this.menstrualHistoryParticle.computeSize(M);M.width=K.width/h,y.width=K.width,y.height=K.height,y.boundingBoxAscent=K.height,y.boundingBoxDescent=0}else if(M.type===l.ElementType.FETAL_HEART_POSITION){const K=this.fetalHeartPositionParticle.computeSize();M.width=K.width/h,y.width=K.width,y.height=K.height,y.boundingBoxAscent=K.height/2,y.boundingBoxDescent=K.height/2}else if(M.type===l.ElementType.TOOTH_POSITION){const K=this.toothPositionParticle.computeSize(M);M.width=K.width/h,y.width=K.width,y.height=K.height,y.boundingBoxAscent=K.height/2,y.boundingBoxDescent=K.height/2}else if(M.type===l.ElementType.TAB)y.width=m*h,y.height=R*h,y.boundingBoxDescent=0,y.boundingBoxAscent=this.textParticle.getBasisWordBoundingBoxAscent(L,L.font);else if(M.type===l.ElementType.BLOCK){if(!M.width)y.width=U;else{const K=M.width*h;y.width=Math.min(K,U)}y.height=M.height*h,y.boundingBoxDescent=y.height,y.boundingBoxAscent=0}else if(M.type===l.ElementType.LABEL){const{defaultSize:K,label:{defaultPadding:v}}=this.options;L.font=this.getElementFont(M);const w=this.textParticle.measureText(L,M);y.width=(w.width+v[1]+v[3])*h,y.height=(M.size||K)*h,y.boundingBoxDescent=0,y.boundingBoxAscent=(v[0]+w.actualBoundingBoxAscent)*h}else if(M.type===l.ElementType.MACRO||M.type===l.ElementType.CUSTOM_MACRO||M.type===l.ElementType.REUSABLE_ITEM||M.type===l.ElementType.SUB_TEMPLATE){const{defaultSize:K}=this.options;L.font=this.getElementFont(M);const v=this.getMode(),w=v===l.EditorMode.EDIT,Z=v===l.EditorMode.FORM;if(w){const J=M.label||M.value||"";L.font=this.getElementFont(M);const x=L.measureText(J),A=8*h,$=4*h;y.width=x.width+A*2;const B=x.actualBoundingBoxAscent+x.actualBoundingBoxDescent;y.height=B+$*2;const pt=this.textParticle.measureBasisWord(L,this.getElementFont(M));y.boundingBoxAscent=pt.actualBoundingBoxAscent*h,y.boundingBoxDescent=pt.actualBoundingBoxDescent*h}else if(M.type===l.ElementType.CUSTOM_MACRO){const J=M.macroConfig,x=J?.value||"";if(Z){const A=J?.type||"text",$=this.textParticle.measureText(L,M),B=M.label||"";if(A==="select"){const pt=x||`请选择${B}`,Xt=L.measureText(pt),Lt=L.measureText("[").width,yt=6*h+2*h;y.width=Lt+Xt.width+yt+Lt}else{const pt=x||`请输入${B}`,Xt=L.measureText(pt),Lt=L.measureText("[").width;y.width=Lt+Xt.width+Lt}y.height=(M.size||K)*h,y.boundingBoxDescent=$.actualBoundingBoxDescent*h,y.boundingBoxAscent=$.actualBoundingBoxAscent*h}else{const A=M.label||"",$=x||`请输入${A}`,B=L.measureText($);y.width=B.width,y.height=(M.size||K)*h,y.boundingBoxDescent=B.actualBoundingBoxDescent,y.boundingBoxAscent=B.actualBoundingBoxAscent}}else if(M.type===l.ElementType.REUSABLE_ITEM){const x=M.reusableItemConfig?.value||"",A=M.label||"";if(Z){const $=this.textParticle.measureText(L,M),B=x||`获取 ${A}`,pt=L.measureText(B),Xt=L.measureText("[").width;y.width=Xt+pt.width+Xt,y.height=(M.size||K)*h,y.boundingBoxDescent=$.actualBoundingBoxDescent*h,y.boundingBoxAscent=$.actualBoundingBoxAscent*h}else{const $=x||`获取 ${A}`,B=L.measureText($);y.width=B.width,y.height=(M.size||K)*h,y.boundingBoxDescent=B.actualBoundingBoxDescent,y.boundingBoxAscent=B.actualBoundingBoxAscent}}else if(M.type===l.ElementType.SUB_TEMPLATE){const J=M.label||"子模板";if(Z){const x=L.measureText(J),A=8*h,$=4*h,B=x.actualBoundingBoxAscent+x.actualBoundingBoxDescent;y.width=x.width+A*2,y.height=B+$*2;const pt=this.textParticle.measureBasisWord(L,this.getElementFont(M));y.boundingBoxAscent=pt.actualBoundingBoxAscent*h,y.boundingBoxDescent=pt.actualBoundingBoxDescent*h}else{const x=L.measureText(J);y.width=x.width,y.height=(M.size||K)*h,y.boundingBoxDescent=x.actualBoundingBoxDescent,y.boundingBoxAscent=x.actualBoundingBoxAscent}}else{const J=M.label||"",x=M.value||`获取 ${J}`,A=L.measureText(x);y.width=A.width,y.height=(M.size||K)*h,y.boundingBoxDescent=A.actualBoundingBoxDescent,y.boundingBoxAscent=A.actualBoundingBoxAscent}}else{const K=M.size||R;(M.type===l.ElementType.SUPERSCRIPT||M.type===l.ElementType.SUBSCRIPT)&&(M.actualSize=Math.ceil(K*.6)),y.height=(M.actualSize||K)*h,L.font=this.getElementFont(M);const v=this.textParticle.measureText(L,M);y.width=v.width*h,M.letterSpacing&&(y.width+=M.letterSpacing*h);const w=this.textParticle.measureBasisWord(L,M.font);y.boundingBoxAscent=w.actualBoundingBoxAscent*h,y.boundingBoxDescent=w.actualBoundingBoxDescent*h,M.type===l.ElementType.SUPERSCRIPT?y.boundingBoxAscent+=y.height/2:M.type===l.ElementType.SUBSCRIPT&&(y.boundingBoxDescent+=y.height/2)}const G=!_t(M)&&(M.imgDisplay!==l.ImageDisplay.INLINE&&M.type===l.ElementType.IMAGE||M.type===l.ElementType.LATEX)?y.height+b:y.boundingBoxAscent+b,H=b+y.boundingBoxAscent+y.boundingBoxDescent+b,tt=Object.assign(M,{metrics:y,left:0,style:this.getElementFont(M,h)});tt.control?.minWidth&&(tt.controlComponent&&(W+=y.width),tt.controlComponent===l.ControlComponent.POSTFIX&&(this.control.setMinWidthControlInfo({row:O,rowElement:tt,availableWidth:U,controlRealWidth:W}),W=0));const st=n[X-1];let et=n[X+1],nt=O.width+y.width;if(this.options.wordBreak===l.WordBreak.BREAK_WORD&&(!st?.type||st?.type===l.ElementType.TEXT)&&(!M.type||M.type===l.ElementType.TEXT)){const K=`${st?.value||""}${M.value}`;if(this.WORD_LIKE_REG.test(K)){const{width:w,endElement:Z}=this.textParticle.measureWord(L,n,X),J=w*h;Z&&J<=U?(nt+=J,et=Z):st&&(nt+=J)}const v=this.textParticle.measurePunctuationWidth(L,et);nt+=v*h}M.listId&&(M.listId!==Y?E=0:M.value===_&&!M.listWrap&&E++),Y=M.listId;const q=this.position.setSurroundPosition({pageNo:V,rowElement:tt,row:O,rowElementRect:{x:F,y:N,height:H,width:y.width},availableWidth:U,surroundElementList:u});F=q.x,nt+=q.rowIncreaseWidth,F+=y.width;let dt=!1;if(this.mode===l.EditorMode.FORM&&M.control?.type===l.ControlType.BUTTON&&M.controlComponent===l.ControlComponent.PREFIX&&O.elementList.filter(K=>K.controlId!==M.controlId).length>0){const K=M.controlId;if(n.some(w=>w.controlId===`${K}_text`&&w.control?.type===l.ControlType.BUTTON)){let w=0;for(let Z=X;Z<n.length;Z++){const J=n[Z];if(J.controlId!==K)break;L.font=this.getElementFont(J);const x=this.textParticle.measureText(L,J);if(w+=x.width*h,J.controlComponent===l.ControlComponent.POSTFIX)break}for(let Z=0;Z<n.length;Z++){const J=n[Z];if(J.controlId===`${K}_text`){L.font=this.getElementFont(J);const x=this.textParticle.measureText(L,J);w+=x.width*h}}dt=O.width+w>U}}const ot=M.type===l.ElementType.SEPARATOR||M.type===l.ElementType.TABLE||st?.type===l.ElementType.TABLE||st?.type===l.ElementType.BLOCK||M.type===l.ElementType.BLOCK||st?.imgDisplay===l.ImageDisplay.INLINE||M.imgDisplay===l.ImageDisplay.INLINE||st?.listId!==M.listId||st?.areaId!==M.areaId&&!M.area?.hide||M.control?.flexDirection===l.FlexDirection.COLUMN&&(M.controlComponent===l.ControlComponent.CHECKBOX||M.controlComponent===l.ControlComponent.RADIO)&&st?.controlComponent===l.ControlComponent.VALUE||X!==0&&M.value===_&&!M.area?.hide||dt,ut=nt>U,ht=ot||ut;if(ht){const K={width:y.width,height:H,startIndex:X,elementList:[tt],ascent:G,rowIndex:O.rowIndex+1,rowFlex:n[X]?.rowFlex||n[X+1]?.rowFlex,isPageBreak:M.type===l.ElementType.PAGE_BREAK};if(tt.controlComponent!==l.ControlComponent.PREFIX&&tt.control?.indentation===l.ControlIndentation.VALUE_START){const v=O.elementList.findIndex(w=>w.controlId===tt.controlId&&w.controlComponent!==l.ControlComponent.PREFIX);if(~v){const Z=this.position.computeRowPosition({row:O,innerWidth:this.getInnerWidth()})[v];Z&&(K.offsetX=Z.coordinate.leftTop[0])}}M.listId&&(K.isList=!0,K.offsetX=P.get(M.listId),K.listIndex=E),K.offsetY=!r&&M.area?.top&&M.areaId!==n[X-1]?.areaId?M.area.top*h:0,C.push(K)}else O.width+=y.width,X===0&&(on(n[1])||n[1]?.areaId)?(O.height=p,O.ascent=p):O.height<H&&(O.height=H,O.ascent=G),O.elementList.push(tt);if((ht||X===n.length-1)&&(O.isWidthNotEnough=ut&&!ot,!O.isSurround&&(st?.rowFlex===l.RowFlex.JUSTIFY||st?.rowFlex===l.RowFlex.ALIGNMENT&&O.isWidthNotEnough))){const K=O.elementList[0]?.value===_?O.elementList.slice(1):O.elementList,v=(U-O.width)/(K.length-1);for(let w=0;w<K.length-1;w++){const Z=K[w];Z.metrics.width+=v}O.width=U}if(ht){F=s,N+=O.height,i&&!r&&c&&(N-a+d+H>c||M.type===l.ElementType.PAGE_BREAK)&&(N=a,ea(u,V),V+=1),tt.left=0;const K=C[C.length-1];F=this.position.setSurroundPosition({pageNo:V,rowElement:tt,row:K,rowElementRect:{x:F,y:N,height:H,width:y.width},availableWidth:U,surroundElementList:u}).x,F+=y.width}}return C}_collectTextControlValueSet(t){if(this.isDesignMode()||this.mode===l.EditorMode.EDIT)return null;const e=new Set;for(let i=0;i<t.length;i++){const r=t[i];r.controlId&&(r.control?.type===l.ControlType.TEXT||r.control?.type===l.ControlType.TEXTFIELD)&&e.add(r.controlId)}const n=new Set;for(let i=0;i<t.length;i++){const r=t[i];r.controlId&&r.controlComponent===l.ControlComponent.VALUE&&e.has(r.controlId)&&n.add(r.controlId)}return n}_computePageList(){const t=[[]],{pageMode:e,pageNumber:{maxPageNo:n}}=this.options,i=this.getHeight(),r=this.getMainOuterHeight();let s=r,a=0;if(e===l.PageMode.CONTINUITY){t[0]=this.rowList,s+=this.rowList.reduce((R,h)=>R+h.height+(h.offsetY||0),0);const c=this.getPagePixelRatio(),d=this.pageList[0],u=Number(d.style.height.replace("px",""));if(s>u)d.style.height=`${s}px`,d.height=s*c;else{const R=s<i?i:s;d.style.height=`${R}px`,d.height=R*c}this._initPageContext(this.ctxList[0])}else for(let c=0;c<this.rowList.length;c++){const d=this.rowList[c],u=d.offsetY||0;if(d.height+u+s>i||this.rowList[c-1]?.isPageBreak){if(Number.isInteger(n)&&a>=n){this.elementList=this.elementList.slice(0,d.startIndex);break}s=r+d.height+u,t.push([d]),a++}else s+=d.height+u,t[a].push(d)}return t}_drawHighlight(t,e){const{rowList:n,positionList:i,elementList:r}=e,s=this.getDefaultBasicRowMarginHeight(),a=this.getHighlightMarginHeight();for(let c=0;c<n.length;c++){const d=n[c];for(let u=0;u<d.elementList.length;u++){const R=d.elementList[u],h=d.elementList[u-1],g=R.highlight||this.control.getControlHighlight(r,d.startIndex+u);if(g){h&&h.highlight&&h.highlight!==R.highlight&&this.highlight.render(t);const{coordinate:{leftTop:[f,T]}}=i[d.startIndex+u],m=R.left||0;this.highlight.recordFillInfo(t,f-m,T+s-a,R.metrics.width+m,d.height-2*s+2*a,g)}else h?.highlight&&this.highlight.render(t)}this.highlight.render(t)}}validateNumber(t){return/^\d+$/.test(t)}drawRow(t,e){this._drawHighlight(t,e);const{scale:n,table:{tdPadding:i},group:r,lineBreak:s,whiteSpace:a}=this.options,{rowList:c,pageNo:d,elementList:u,positionList:R,startIndex:h,zone:g,isDrawLineBreak:f=!s.disabled,td:T,isDrawWhiteSpace:m=!a.disabled}=e,p=this.isPrintMode(),I=this.isGraffitiMode(),{isCrossRowCol:L,tableId:P}=this.range.getRange();let C=h;for(let S=0;S<c.length;S++){const F=c[S],N={x:0,y:0,width:0,height:0};let V=null;for(let Y=0;Y<F.elementList.length;Y++){const E=F.elementList[Y],W=E.metrics,{ascent:X,coordinate:{leftTop:[O,M]}}=R[F.startIndex+Y],b=F.elementList[Y-1];if(_t(E)&&!this.isDesignMode())this.textParticle.complete();else if(E.type===l.ElementType.IMAGE)this.textParticle.complete(),E.imgDisplay!==l.ImageDisplay.SURROUND&&E.imgDisplay!==l.ImageDisplay.FLOAT_TOP&&E.imgDisplay!==l.ImageDisplay.FLOAT_BOTTOM&&this.imageParticle.render(t,E,O,M+X);else if(E.type===l.ElementType.LATEX)this.textParticle.complete(),this.laTexParticle.render(t,E,O,M+X);else if(E.type===l.ElementType.TABLE)L&&(N.x=O,N.y=M,V=E),this.tableParticle.render(t,E,O,M);else if(E.type===l.ElementType.HYPERLINK)this.textParticle.complete(),this.hyperlinkParticle.render(t,E,O,M+X);else if(E.type===l.ElementType.LABEL)this.textParticle.complete(),this.labelParticle.render(t,E,O,M+X);else if(E.type===l.ElementType.MACRO||E.type===l.ElementType.CUSTOM_MACRO||E.type===l.ElementType.REUSABLE_ITEM||E.type===l.ElementType.SUB_TEMPLATE)this.textParticle.complete(),this.macroParticle.render(t,E,O,M+X);else if(E.type===l.ElementType.DATE){const H=F.elementList[Y+1];(!b||b.dateId!==E.dateId)&&this.textParticle.complete(),this.textParticle.record(t,E,O,M+X),(!H||H.dateId!==E.dateId)&&this.textParticle.complete()}else E.type===l.ElementType.SUPERSCRIPT?(this.textParticle.complete(),this.superscriptParticle.render(t,E,O,M+X)):E.type===l.ElementType.SUBSCRIPT?(this.underline.render(t),this.textParticle.complete(),this.subscriptParticle.render(t,E,O,M+X)):E.type===l.ElementType.SEPARATOR?this.separatorParticle.render(t,E,O,M):E.type===l.ElementType.PAGE_BREAK?this.mode!==l.EditorMode.CLEAN&&!p&&this.pageBreakParticle.render(t,E,O,M):E.type===l.ElementType.CHECKBOX||E.controlComponent===l.ControlComponent.CHECKBOX?(this.textParticle.complete(),this.checkboxParticle.render({ctx:t,x:O,y:M+X,index:Y,row:F})):E.type===l.ElementType.RADIO||E.controlComponent===l.ControlComponent.RADIO?(this.textParticle.complete(),this.radioParticle.render({ctx:t,x:O,y:M+X,index:Y,row:F})):E.type===l.ElementType.MENSTRUAL_HISTORY?(this.textParticle.complete(),this.menstrualHistoryParticle.render({ctx:t,x:O,y:M+X,index:Y,row:F,element:E})):E.type===l.ElementType.FETAL_HEART_POSITION?(this.textParticle.complete(),this.fetalHeartPositionParticle.render({ctx:t,x:O,y:M+X,index:Y,row:F,element:E})):E.type===l.ElementType.TOOTH_POSITION?(this.textParticle.complete(),this.toothPositionParticle.render({ctx:t,x:O,y:M+X,index:Y,row:F,element:E})):E.type===l.ElementType.TAB?this.textParticle.complete():E.rowFlex===l.RowFlex.ALIGNMENT||E.rowFlex===l.RowFlex.JUSTIFY?(this.textParticle.record(t,E,O,M+X),this.textParticle.complete()):E.type===l.ElementType.BLOCK?(this.textParticle.complete(),this.blockParticle.render(t,d,E,O,M+X)):(E.left&&this.textParticle.complete(),this.textParticle.record(t,E,O,M+X),(E.width||E.letterSpacing||Kr.test(E.value))&&this.textParticle.complete());if(f&&!p&&this.mode!==l.EditorMode.CLEAN&&!F.isWidthNotEnough&&Y===F.elementList.length-1&&this.lineBreakParticle.render(t,E,O,M+F.height/2),m&&_r.test(E.value)&&this.whiteSpaceParticle.render(t,E,O,M+F.height/2),E.control?.border){b?.control?.border&&b.controlId!==E.controlId&&this.control.drawBorder(t);const H=this.getElementRowMargin(E);this.control.recordBorderInfo(O,M+H,E.metrics.width,F.height-2*H)}else b?.control?.border&&this.control.drawBorder(t);if(E.control?.type===l.ControlType.TEXT){const H=E.controlComponent===l.ControlComponent.VALUE,tt=E.controlComponent===l.ControlComponent.POSTFIX||E.controlComponent===l.ControlComponent.POST_TEXT;H&&E.control?.underline&&((!b||b.controlId!==E.controlId||b.controlComponent!==l.ControlComponent.VALUE&&b.controlComponent!==l.ControlComponent.PLACEHOLDER)&&this.control.startTextFieldUnderline(E.controlId,O,M+F.height),this.control.recordTextFieldUnderlineWidth(E.metrics.width)),tt&&this.control.drawTextFieldUnderline(t)}else b?.control?.type===l.ControlType.TEXT&&this.control.drawTextFieldUnderline(t);if((E.underline||E.control?.underline)&&E.controlComponent!==l.ControlComponent.PLACEHOLDER&&!(E.control?.type===l.ControlType.TEXT&&E.control?.underline)){b?.type===l.ElementType.SUBSCRIPT&&E.type!==l.ElementType.SUBSCRIPT&&this.underline.render(t);const H=this.getElementRowMargin(E),tt=E.left||0;let st=0;E.type===l.ElementType.SUBSCRIPT&&(st=this.subscriptParticle.getOffsetY(E));const et=E.control?.underline?this.options.underlineColor:E.color;this.underline.recordFillInfo(t,O-tt,M+F.height-H+st,W.width+tt,0,et,E.textDecoration?.style)}else(b?.underline||b?.control?.underline)&&(b?.control?.type===l.ControlType.TEXT&&b?.control?.underline||this.underline.render(t));if(E.strikeout){if(!E.type||zt.includes(E.type)){b&&(b.type===l.ElementType.SUBSCRIPT&&E.type!==l.ElementType.SUBSCRIPT||b.type===l.ElementType.SUPERSCRIPT&&E.type!==l.ElementType.SUPERSCRIPT||this.getElementSize(b)!==this.getElementSize(E))&&this.strikeout.render(t);const H=this.textParticle.measureBasisWord(t,this.getElementFont(E));let tt=M+X+H.actualBoundingBoxDescent*n-W.height/2;E.type===l.ElementType.SUBSCRIPT?tt+=this.subscriptParticle.getOffsetY(E):E.type===l.ElementType.SUPERSCRIPT&&(tt+=this.superscriptParticle.getOffsetY(E)),this.strikeout.recordFillInfo(t,O,tt,W.width)}}else b?.strikeout&&this.strikeout.render(t);const{zone:y,splitTdRange:D}=this.range.getRange();let{startIndex:U,endIndex:Q}=this.range.getRange(),G=!1;if(T&&D&&[T.originalId,T.id].includes(D.originalId)&&(G=!0,U=D.startIndex-(T.valueStartIndex??0),Q=D.endIndex-(T.valueStartIndex??0)),y===g&&U!==Q&&U<=C&&C<=Q){const H=this.position.getPositionContext();if(!H.isTable&&!E.tdId||H.tdId===E.tdId||G)if(U===C){const tt=u[U+1];tt&&tt.value===_&&(N.x=O+W.width,N.y=M,N.height=F.height,N.width+=this.options.rangeMinWidth)}else{let tt=W.width;tt===0&&F.elementList.length===1&&(tt=this.options.rangeMinWidth),N.width||(N.x=O,N.y=M,N.height=F.height),N.width+=tt}}if(!r.disabled&&E.groupIds&&this.group.recordFillInfo(E,O,M,W.width,F.height),C++,E.type===l.ElementType.TABLE&&!_t(E)){const H=E.tdPadding||i,tt=H[1]+H[3];for(let st=0;st<E.trList.length;st++){const et=E.trList[st];for(let nt=0;nt<et.tdList.length;nt++){const q=et.tdList[nt];this.drawRow(t,{elementList:q.value,positionList:q.positionList,rowList:q.rowList,pageNo:d,startIndex:0,innerWidth:(q.width-tt)*n,zone:g,isDrawLineBreak:f,td:q})}}}}if(F.isList&&this.listParticle.drawListStyle(t,F,R[F.startIndex]),this.textParticle.complete(),this.control.drawBorder(t),this.underline.render(t),this.strikeout.render(t),this.group.render(t),!p&&!I){if(N.width&&N.height){const{x:Y,y:E,width:W,height:X}=N;this.range.render(t,Y,E,W,X)}if(L&&V&&V.id===P){const{coordinate:{leftTop:[Y,E]}}=R[F.startIndex];this.tableParticle.drawRange(t,V,Y,E)}}}}_drawFloat(t,e){const{scale:n}=this.options,i=this.position.getFloatPositionList(),{imgDisplays:r,pageNo:s}=e;for(let a=0;a<i.length;a++){const c=i[a],d=c.element;if((s===c.pageNo||c.zone===l.EditorZone.HEADER||c.zone==l.EditorZone.FOOTER)&&d.imgDisplay&&r.includes(d.imgDisplay)&&d.type===l.ElementType.IMAGE){const u=d.imgFloatPosition;this.imageParticle.render(t,d,u.x*n,u.y*n)}}}_clearPage(t){const e=this.ctxList[t],n=this.pageList[t];e.clearRect(0,0,Math.max(n.width,this.getWidth()),Math.max(n.height,this.getHeight())),this.blockParticle.clear()}_drawPage(t){const{elementList:e,positionList:n,rowList:i,pageNo:r}=t,{inactiveAlpha:s,pageMode:a,header:c,footer:d,pageNumber:u,lineNumber:R,pageBorder:h}=this.options,g=this.mode===l.EditorMode.PRINT,f=this.getInnerWidth(),T=this.ctxList[r];T.globalAlpha=this.zone.isMainActive()?1:s,this._clearPage(r),(!g||!this.options.modeRule[l.EditorMode.PRINT]?.backgroundDisabled)&&this.background.render(T,r),g||this.area.render(T,r),a!==l.PageMode.CONTINUITY&&this.options.watermark.data&&this.waterMark.render(T,r),g||this.margin.render(T,r),this._drawFloat(T,{pageNo:r,imgDisplays:[l.ImageDisplay.FLOAT_BOTTOM]}),g||this.control.renderHighlightList(T,r);const m=i[0]?.startIndex;this.drawRow(T,{elementList:e,positionList:n,rowList:i,pageNo:r,startIndex:m,innerWidth:f,zone:l.EditorZone.MAIN}),this.getIsPagingMode()&&(c.disabled||this.header.render(T,r),u.disabled||this.pageNumber.render(T,r),d.disabled||this.footer.render(T,r)),this._drawFloat(T,{pageNo:r,imgDisplays:[l.ImageDisplay.FLOAT_TOP,l.ImageDisplay.SURROUND]}),!g&&this.search.getSearchKeyword()&&this.search.render(T,r),this.elementList.length<=1&&!this.elementList[0]?.listId&&this.placeholder.render(T),R.disabled||this.lineNumber.render(T,r),h.disabled||this.pageBorder.render(T),this.badge.render(T,r),this.isGraffitiMode()&&this.graffiti.render(T,r)}_disconnectLazyRender(){this.lazyRenderIntersectionObserver?.disconnect()}_lazyRender(){const t=this.position.getOriginalMainPositionList(),e=this.getOriginalMainElementList();this._disconnectLazyRender(),this.lazyRenderIntersectionObserver=new IntersectionObserver(n=>{n.forEach(i=>{if(i.isIntersecting){const r=Number(i.target.dataset.index);this._drawPage({elementList:e,positionList:t,rowList:this.pageRowList[r],pageNo:r})}})}),this.pageList.forEach(n=>{this.lazyRenderIntersectionObserver.observe(n)})}_immediateRender(){const t=this.position.getOriginalMainPositionList(),e=this.getOriginalMainElementList();for(let n=0;n<this.pageRowList.length;n++)this._drawPage({elementList:e,positionList:t,rowList:this.pageRowList[n],pageNo:n})}render(t){const e=Vt(),n=[],i=(O,M)=>{n.push({label:O,duration:Vt()-M})};this.renderCount++;const r=this.mode===l.EditorMode.EDIT||this.mode===l.EditorMode.FORM||this.mode===l.EditorMode.PRINT?Oh([...this.getHeaderElementList(),...this.elementList,...this.getFooterElementList()]):null,s=this.applySubTemplateRuntimeState(this.getHeaderElementList(),r)||this.applySubTemplateRuntimeState(this.elementList,r)||this.applySubTemplateRuntimeState(this.getFooterElementList(),r);let{endIndex:a}=this.range.getRange();const{isCrossRowCol:c}=this.range.getRange();if(!c&&~a){const O=this.getElementList(),M=sn(O,a);M!==a&&!_t(O[M])&&(this.range.setRange(M,M),a=M)}let d;const u=this.position.getPositionContext();if(c)d=this.getOriginalElementList()[u.index];else{const O=~a?a:0,M=this.getElementList();d=tn(M,O)}const{header:R,footer:h}=this.options,{isSubmitHistory:g=!0,isSetCursor:f=!0,isLazy:T=!0,isInit:m=!1,isSourceHistory:p=!1,isFirstRender:I=!1,isDel:L=!1}=t||{};let{isCompute:P=!0}=t||{};s&&(P=!0);let{curIndex:C}=t||{};const{traceLabel:S}=t||{},F=this.getInnerWidth(),N=this.getIsPagingMode(),V=this.pageRowList.length;if(P){if(this.splitTdValueMap.clear(),this.tdMap.clear(),this.position.setFloatPositionList([]),N){if(!R.disabled){const et=Vt();this.header.compute(),i("header.compute",et)}if(!h.disabled){const et=Vt();this.footer.compute(),i("footer.compute",et)}}const O=this.getMargins(),M=this.getHeight(),b=this.header.getExtraHeight(),y=this.getMainOuterHeight(),D=O[3],U=O[0]+b,Q=Zo(this.elementList),G=Vt();this.rowList=this.computeRowList({startX:D,startY:U,pageHeight:M,mainOuterHeight:y,isPagingMode:N,innerWidth:F,surroundElementList:Q,elementList:this.elementList}),i("computeRowList",G);const H=Vt();this.pageRowList=this._computePageList(),i("computePageList",H);const tt=Vt();this.position.computePositionList(),i("computePositionList",tt);const st=Vt();if(this.area.compute(),i("area.compute",st),!this.isPrintMode()){const et=this.search.getSearchKeyword();if(et){const q=Vt();this.search.compute(et),i("search.compute",q)}const nt=Vt();this.control.computeHighlightList(),i("control.computeHighlightList",nt)}if(this.isGraffitiMode()){const et=Vt();this.graffiti.compute(),i("graffiti.compute",et)}}this.imageObserver.clearAll(),this.cursor.recoveryCursor();for(let O=0;O<this.pageRowList.length;O++)this.pageList[O]||this._createPage(O);const Y=this.pageRowList.length,E=this.pageList.length;if(E>Y){const O=E-Y;this.ctxList.splice(Y,O),this.pageList.splice(Y,O).forEach(M=>M.remove())}const W=Vt();if(T&&N?this._lazyRender():this._immediateRender(),i(T&&N?"lazyRender":"immediateRender",W),f){if(P&&d?.tableId){const{index:O}=u,b=this.getOriginalElementList()[O];if(d.tableId!==b?.id){const D=this.findTableChildrenElement(!0,d.tableId,d);D&&u.index!==D.originalIndex&&(u.index=D.originalIndex,u.tableId=D.table.id,u.trIndex=D.trIndex,u.trId=D.tr.id,u.tdIndex=D.tdIndex,u.tdId=D.td.id,C=D.elementIndex,this.position.setPositionContext(u),this.range.setRange(C,C),this.updateTableTool())}const y=this.getElementList();y[a]!==d&&(C=y.findIndex(D=>D===d))}C=this.setCursor(C)}else this.range.getIsSelection()&&this.cursor.focus();if(L){let O;const M=this.position.getPositionContext();O=this.range.getRange().startIndex-1,M.index=O}(g&&!I||C!==void 0&&this.historyManager.isStackEmpty())&&this.submitHistory(C);const X=Vt();Co(()=>{const O=Vt();this.range.setRangeStyle(),P&&this.control.getActiveControl()&&this.control.reAwakeControl(),P&&!this.isReadonly()&&this.getMode()!==l.EditorMode.FORM&&u.isTable&&this.getOriginalElementList()[u.index].type===l.ElementType.TABLE&&this.tableTool.render(),P&&!this.zone.isMainActive()&&this.zone.drawZoneIndicator(),V!==this.pageRowList.length&&(this.listener.pageSizeChange&&this.listener.pageSizeChange(this.pageRowList.length),this.eventBus.isSubscribe("pageSizeChange")&&this.eventBus.emit("pageSizeChange",this.pageRowList.length)),(g||p)&&!m&&(this.listener.contentChange&&this.listener.contentChange(),this.eventBus.isSubscribe("contentChange")&&this.eventBus.emit("contentChange"));const M=Vt();So(this.options,S||"render",M-e,[...n,{label:"nextTick.wait",duration:O-X},{label:"nextTick.callback",duration:M-O}],{isCompute:P,pageCount:this.pageRowList.length})}),f&&this.fixPosition()}fixPosition(t=!1){let e;const n=this.position.getPositionContext();if(n.isTable){const i=this.getElementList(),r=this.range.getRange().startIndex;if(t||r>=i.length){const s=this.getTd(),a=n.index+(t?-1:1),d=this.getOriginalElementList()[a];if(!d?.trList)return;e=r-i.length;for(let u=0;u<d.trList.length;u++){const R=d.trList[u],h=R.tdList.find(g=>t?s?.linkTdPrevId===g.id:s?.id===g.linkTdPrevId);if(h){n.index=a,n.trIndex=u,n.tableId=d.id,n.trId=R.id,n.tdId=h?.id,e=t?h.value.length-1:e+(h.value[0]?.type===l.ElementType.SPLIT_TAG?1:0);break}}if(this.position.setPositionContext(n),this.range.setRange(e,e),this.setCursor(e),e===0)return this.fixPosition(t);this.updateTableTool()}}return e}setCursor(t){const e=this.position.getPositionContext(),n=this.position.getPositionList(),i=this.getElementList();if(e.isTable){const{index:s,trIndex:a,tdIndex:c}=e,u=this.getOriginalElementList()[s].trList?.[a].tdList[c].positionList;t===void 0&&u&&(t=u.length-1);const R=u?.[t];this.position.setCursorPosition(R||null)}else t!==void 0&&t>=n.length&&(t=n.length-1),this.position.setCursorPosition(t!==void 0&&t>=0?n[t]:null);let r=!0;if(t!==void 0&&e.isImage&&e.isDirectHit){const s=i[t];if(s&&cl.includes(s.type)){r=!1;const a=this.position.getCursorPosition();this.previewer.updateResizer(s,a)}}return this.cursor.drawCursor({isShow:r}),t}submitHistory(t){const e=this.position.getPositionContext(),n=wo(this.elementList),i=wo(this.header.getElementList()),r=wo(this.footer.getElementList()),s=at(this.range.getRange()),a=this.pageNo,c=at(e),d=this.zone.getZone();this.historyManager.execute(()=>{this.zone.setZone(d),this.setPageNo(a),this.position.setPositionContext(at(c)),this.header.setElementList(at(i)),this.footer.setElementList(at(r)),this.elementList=at(n),this.range.replaceRange(at(s)),this.render({curIndex:t,isSubmitHistory:!1,isSourceHistory:!0})})}destroy(){this.macroParticle.clearInlineEditor({isSubmitHistory:!1}),this.container.remove(),this.globalEvent.removeEvent(),this.scrollObserver.removeEvent(),this.selectionObserver.removeEvent()}clearSideEffect(){this.getMacroParticle().clearInlineEditor({isSubmitHistory:!1}),this.getPreviewer().clearResizer(),this.getTableTool().dispose(),this.getHyperlinkParticle().clearHyperlinkPopup(),this.getDateParticle().clearDatePicker()}updateTableTool(){if(this.getMode()===l.EditorMode.FORM){this.getTableTool().dispose();return}if(this.position.getPositionContext().isTable){const t=this.position.getPositionList();t.length&&(this.setPageNo(t[0].pageNo),this.getTableTool().render())}}initTableElementIndex(t,e){t.trList?.forEach((n,i)=>{n.tdList.forEach((r,s)=>{r.tableIndex=e,r.tableId=t.id,r.trIndex=i,r.trId=n.id,r.tdIndex=s,this.tdMap.set(r.id,r)})})}clearElementEffect(t){t.trList?.forEach(e=>{e.minHeight=e.originalMinHeight??e.minHeight,delete e.originalMinHeight,e.tdList.forEach(n=>{delete n.linkTdNextId})})}updateElementTableInfo(t,e,n,i){return t.tableId=e.id,t.trId=n.id,t.tdId=i.id,t}findTableChildrenElement(t,e,n){const i=this.position.getPositionContext(),{index:r}=i,s=this.getOriginalElementList();let a=r;t&&(a=r>s.length?s.length-1:r);for(let c=a;t?c>=0:c<s.length;t?c--:c++){const d=s[c];if(d&&[d.originalId,d.id].includes(e))for(const[u,R]of d.trList.entries())for(const[h,g]of R.tdList.entries()){const f=g.value.findIndex(typeof n=="function"?n:T=>T===n);if(f>=0)return{originalIndex:c,table:d,tr:R,trIndex:u,td:g,tdIndex:h,elementIndex:f}}}}getTdById(t){return this.tdMap.get(t)}getLinkTdPrevHasValue(t){const e=this.getTdById(t);if(e)return e.value.length?e:this.getLinkTdPrevHasValue(e.linkTdPrevId)}getFirstLinkTd(t){const e=this.getTdById(t);return e?.linkTdPrevId?this.getLastLinkTd(e.linkTdPrevId):e}getLastLinkTd(t){const e=this.getTdById(t);return e?.linkTdNextId?this.getLastLinkTd(e.linkTdNextId):e}removeLinkTd(t,e){const n=this.getTdById(e);if(n){if(n.linkTdPrevId){const i=this.getTdById(n.linkTdPrevId);i&&(delete i.linkTdNextId,this.removeLinkTd(t,n.linkTdPrevId))}if(n.linkTdNextId){const i=this.getTdById(n.linkTdNextId);i&&(delete i.linkTdPrevId,this.removeLinkTd(t,n.linkTdNextId))}t[n.tableIndex].trList[n.trIndex].tdList.splice(n.tdIndex,1),this.initTableElementIndex(t[n.tableIndex],n.tableIndex)}}removeLinkTdControl(t,e){const n=this.getTdById(t);if(n){for(let i=0;i<n.value.length;i++)n.value[i].control===e&&(n.value.splice(i,1),i--);n.linkTdNextId&&this.removeLinkTdControl(n.linkTdNextId,e)}}isSplitTd(t,e){return(!!t?.originalId||!!e?.originalId)&&(t?.originalId===e?.originalId||t?.id===e?.originalId||t?.originalId===e?.id)}getSplitTdValues(t){return this.splitTdValueMap.get(t)}removeSplitTdOtherRangeElements(){const{splitTdRange:t}=this.range.getRange();if(!t)return;const{startIndex:e,endIndex:n}=t;let i=this.getTd();if(i)if((i.valueStartIndex??0)>=e){let r=-1;for(;r<0;){const s=this.getTdById(i.linkTdPrevId);if(s){r=e-(s.valueStartIndex??0);const a=Math.max(0,r);this.spliceElementList(s.value,a+1,s.value.length-a-1),i=s}else r=0}}else{let r=1;for(;r>0;){const s=this.getTdById(i.linkTdNextId);if(s){const a=s.valueStartIndex??0;r=n-(a+s.value.length);const c=Math.min(s.value.length,n-a+1);this.spliceElementList(s.value,0,c),i=s}else r=0}}}getTablesByPagingId(t,e,n){const i=[],r=[];if(t[n].pagingId===e){i.push(n),r.push(t[n]);for(let s=n-1;s>=0&&t[s].pagingId===e;s--)r.unshift(t[s]),i.push(s);for(let s=n+1;s<t.length&&t[s].pagingId===e;s++)r.push(t[s]),i.push(s)}return{list:r,startIndex:i.sort()[0]}}}class yr{executeMode;executeCut;executeCopy;executePaste;executeSelectAll;executeBackspace;executeSetRange;executeReplaceRange;executeSetPositionContext;executeForceUpdate;executeBlur;executeHideCursor;executeUndo;executeRedo;executePainter;executeApplyPainterStyle;executeFormat;executeFont;executeButton;executeEditElementAttribute;executeTriggerControlEditAttribute;executeCopyControl;executePasteControl;executeSize;executeSizeAdd;executeSizeMinus;executeBold;executeItalic;executeUnderline;executeStrikeout;executeSuperscript;executeSubscript;executeColor;executeHighlight;executeTitle;executeList;executeRowFlex;executeVertical;executeRowMargin;executeInsertTable;executeInsertTableTopRow;executeInsertTableBottomRow;executeInsertTableLeftCol;executeInsertTableRightCol;executeDeleteTableRow;executeDeleteTableCol;executeDeleteTable;executeMergeTableCell;executeCancelMergeTableCell;executeSplitVerticalTableCell;executeSplitHorizontalTableCell;executeTableTdVerticalAlign;executeTableBorderType;executeTableBorderColor;executeTableTdBorderType;executeTableTdSlashType;executeTableTdBackgroundColor;executeTableSelectAll;executeTableProperties;executeImage;executeHyperlink;executeDeleteHyperlink;executeCancelHyperlink;executeEditHyperlink;executeSeparator;executePageBreak;executeAddWatermark;executeDeleteWatermark;executeSearch;executeSearchNavigatePre;executeSearchNavigateNext;executeReplace;executePrint;executeReplaceImageElement;executeSaveAsImageElement;executeSetImageCrop;executeSetImageCaption;executeChangeImageDisplay;executePageMode;executePageScale;executePageScaleRecovery;executePageScaleMinus;executePageScaleAdd;executePaperSize;executePaperDirection;executeSetPaperMargin;executeSetMainBadge;executeSetAreaBadge;executeInsertElementList;executeInsertArea;executeSetAreaValue;executeSetAreaProperties;executeLocationArea;executeClearGraffiti;executeAppendElementList;executeUpdateElementById;executeDeleteElementById;executeSetValue;executeRemoveControl;executeTranslate;executeSetLocale;executeLocationCatalog;executeWordTool;executeSetHTML;executeSetGroup;executeDeleteGroup;executeLocationGroup;executeSetZone;executeSetControlValue;executeSetControlValueList;executeSetControlExtension;executeSetControlExtensionList;executeSetControlProperties;executeSetControlPropertiesList;executeSetControlHighlight;executeLocationControl;executeInsertControl;executeInsertTextField;executeJumpControl;executeUpdateOptions;executeSetFormModeTrace;executeInsertTitle;executeFocus;executeComputeElementListHeight;getCatalog;getImage;getPageMode;getOptions;getValue;getValueAsync;getAreaValue;getHTML;getText;getWordCount;getCursorPosition;getRemainingContentHeight;getRange;getRangeText;getRangeContext;getRangeRow;getRangeParagraph;getKeywordRangeList;getKeywordContext;getPaperMargin;getSearchNavigateInfo;getLocale;getGroupIds;getControlValue;getControlList;getContainer;getTitleValue;getPositionContextByEvent;getElementById;getMacroValue;getMacroList;setMacroValue;setMacroValueList;updateMacroProperties;locationMacro;insertSubTemplate;updateSubTemplate;expandSubTemplate;collapseSubTemplate;toggleSubTemplate;constructor(t){this.executeMode=t.mode.bind(t),this.executeCut=t.cut.bind(t),this.executeCopy=t.copy.bind(t),this.executePaste=t.paste.bind(t),this.executeSelectAll=t.selectAll.bind(t),this.executeBackspace=t.backspace.bind(t),this.executeSetRange=t.setRange.bind(t),this.executeReplaceRange=t.replaceRange.bind(t),this.executeSetPositionContext=t.setPositionContext.bind(t),this.executeForceUpdate=t.forceUpdate.bind(t),this.executeBlur=t.blur.bind(t),this.executeHideCursor=t.hideCursor.bind(t),this.executeUndo=t.undo.bind(t),this.executeRedo=t.redo.bind(t),this.executePainter=t.painter.bind(t),this.executeApplyPainterStyle=t.applyPainterStyle.bind(t),this.executeFormat=t.format.bind(t),this.executeFont=t.font.bind(t),this.executeButton=t.buttonText.bind(t),this.executeEditElementAttribute=t.editElementAttribute.bind(t),this.executeTriggerControlEditAttribute=t.triggerControlEditAttribute.bind(t),this.executeCopyControl=t.copyControl.bind(t),this.executePasteControl=t.pasteControl.bind(t),this.executeSize=t.size.bind(t),this.executeSizeAdd=t.sizeAdd.bind(t),this.executeSizeMinus=t.sizeMinus.bind(t),this.executeBold=t.bold.bind(t),this.executeItalic=t.italic.bind(t),this.executeUnderline=t.underline.bind(t),this.executeStrikeout=t.strikeout.bind(t),this.executeSuperscript=t.superscript.bind(t),this.executeSubscript=t.subscript.bind(t),this.executeColor=t.color.bind(t),this.executeHighlight=t.highlight.bind(t),this.executeTitle=t.title.bind(t),this.executeList=t.list.bind(t),this.executeRowFlex=t.rowFlex.bind(t),this.executeVertical=t.vertical.bind(t),this.executeRowMargin=t.rowMargin.bind(t),this.executeInsertTable=t.insertTable.bind(t),this.executeInsertTableTopRow=t.insertTableTopRow.bind(t),this.executeInsertTableBottomRow=t.insertTableBottomRow.bind(t),this.executeInsertTableLeftCol=t.insertTableLeftCol.bind(t),this.executeInsertTableRightCol=t.insertTableRightCol.bind(t),this.executeDeleteTableRow=t.deleteTableRow.bind(t),this.executeDeleteTableCol=t.deleteTableCol.bind(t),this.executeDeleteTable=t.deleteTable.bind(t),this.executeMergeTableCell=t.mergeTableCell.bind(t),this.executeCancelMergeTableCell=t.cancelMergeTableCell.bind(t),this.executeSplitVerticalTableCell=t.splitVerticalTableCell.bind(t),this.executeSplitHorizontalTableCell=t.splitHorizontalTableCell.bind(t),this.executeTableTdVerticalAlign=t.tableTdVerticalAlign.bind(t),this.executeTableBorderType=t.tableBorderType.bind(t),this.executeTableBorderColor=t.tableBorderColor.bind(t),this.executeTableTdBorderType=t.tableTdBorderType.bind(t),this.executeTableTdSlashType=t.tableTdSlashType.bind(t),this.executeTableTdBackgroundColor=t.tableTdBackgroundColor.bind(t),this.executeTableSelectAll=t.tableSelectAll.bind(t),this.executeTableProperties=t.tableProperties.bind(t),this.executeImage=t.image.bind(t),this.executeHyperlink=t.hyperlink.bind(t),this.executeDeleteHyperlink=t.deleteHyperlink.bind(t),this.executeCancelHyperlink=t.cancelHyperlink.bind(t),this.executeEditHyperlink=t.editHyperlink.bind(t),this.executeSeparator=t.separator.bind(t),this.executePageBreak=t.pageBreak.bind(t),this.executeAddWatermark=t.addWatermark.bind(t),this.executeDeleteWatermark=t.deleteWatermark.bind(t),this.executeSearch=t.search.bind(t),this.executeSearchNavigatePre=t.searchNavigatePre.bind(t),this.executeSearchNavigateNext=t.searchNavigateNext.bind(t),this.executeReplace=t.replace.bind(t),this.executePrint=t.print.bind(t),this.executeReplaceImageElement=t.replaceImageElement.bind(t),this.executeSaveAsImageElement=t.saveAsImageElement.bind(t),this.executeSetImageCrop=t.setImageCrop.bind(t),this.executeSetImageCaption=t.setImageCaption.bind(t),this.executeChangeImageDisplay=t.changeImageDisplay.bind(t),this.executePageMode=t.pageMode.bind(t),this.executePageScale=t.pageScale.bind(t),this.executePageScaleRecovery=t.pageScaleRecovery.bind(t),this.executePageScaleMinus=t.pageScaleMinus.bind(t),this.executePageScaleAdd=t.pageScaleAdd.bind(t),this.executePaperSize=t.paperSize.bind(t),this.executePaperDirection=t.paperDirection.bind(t),this.executeSetPaperMargin=t.setPaperMargin.bind(t),this.executeSetMainBadge=t.setMainBadge.bind(t),this.executeSetAreaBadge=t.setAreaBadge.bind(t),this.getAreaValue=t.getAreaValue.bind(t),this.executeInsertArea=t.insertArea.bind(t),this.executeSetAreaValue=t.setAreaValue.bind(t),this.executeSetAreaProperties=t.setAreaProperties.bind(t),this.executeLocationArea=t.locationArea.bind(t),this.executeClearGraffiti=t.clearGraffiti.bind(t),this.executeInsertElementList=t.insertElementList.bind(t),this.executeAppendElementList=t.appendElementList.bind(t),this.executeUpdateElementById=t.updateElementById.bind(t),this.executeDeleteElementById=t.deleteElementById.bind(t),this.executeSetValue=t.setValue.bind(t),this.executeRemoveControl=t.removeControl.bind(t),this.executeTranslate=t.translate.bind(t),this.executeSetLocale=t.setLocale.bind(t),this.executeLocationCatalog=t.locationCatalog.bind(t),this.executeWordTool=t.wordTool.bind(t),this.executeSetHTML=t.setHTML.bind(t),this.executeSetGroup=t.setGroup.bind(t),this.executeDeleteGroup=t.deleteGroup.bind(t),this.executeLocationGroup=t.locationGroup.bind(t),this.executeSetZone=t.setZone.bind(t),this.executeUpdateOptions=t.updateOptions.bind(t),this.executeSetFormModeTrace=t.setFormModeTrace.bind(t),this.executeInsertTitle=t.insertTitle.bind(t),this.executeFocus=t.focus.bind(t),this.executeComputeElementListHeight=t.computeElementListHeight.bind(t),this.getImage=t.getImage.bind(t),this.getPageMode=t.getPageMode.bind(t),this.getOptions=t.getOptions.bind(t),this.getValue=t.getValue.bind(t),this.getValueAsync=t.getValueAsync.bind(t),this.getHTML=t.getHTML.bind(t),this.getText=t.getText.bind(t),this.getWordCount=t.getWordCount.bind(t),this.getCursorPosition=t.getCursorPosition.bind(t),this.getRemainingContentHeight=t.getRemainingContentHeight.bind(t),this.getRange=t.getRange.bind(t),this.getRangeText=t.getRangeText.bind(t),this.getRangeContext=t.getRangeContext.bind(t),this.getRangeRow=t.getRangeRow.bind(t),this.getRangeParagraph=t.getRangeParagraph.bind(t),this.getKeywordRangeList=t.getKeywordRangeList.bind(t),this.getKeywordContext=t.getKeywordContext.bind(t),this.getCatalog=t.getCatalog.bind(t),this.getPaperMargin=t.getPaperMargin.bind(t),this.getSearchNavigateInfo=t.getSearchNavigateInfo.bind(t),this.getLocale=t.getLocale.bind(t),this.getGroupIds=t.getGroupIds.bind(t),this.getContainer=t.getContainer.bind(t),this.getTitleValue=t.getTitleValue.bind(t),this.getPositionContextByEvent=t.getPositionContextByEvent.bind(t),this.getElementById=t.getElementById.bind(t),this.executeSetControlValue=t.setControlValue.bind(t),this.executeSetControlValueList=t.setControlValueList.bind(t),this.executeSetControlExtension=t.setControlExtension.bind(t),this.executeSetControlExtensionList=t.setControlExtensionList.bind(t),this.executeSetControlProperties=t.setControlProperties.bind(t),this.executeSetControlPropertiesList=t.setControlPropertiesList.bind(t),this.executeSetControlHighlight=t.setControlHighlight.bind(t),this.getControlValue=t.getControlValue.bind(t),this.getControlList=t.getControlList.bind(t),this.executeLocationControl=t.locationControl.bind(t),this.executeInsertControl=t.insertControl.bind(t),this.executeInsertTextField=t.insertTextField.bind(t),this.executeJumpControl=t.jumpControl.bind(t),this.getMacroValue=t.getMacroValue.bind(t),this.getMacroList=t.getMacroList.bind(t),this.setMacroValue=t.setMacroValue.bind(t),this.setMacroValueList=t.setMacroValueList.bind(t),this.updateMacroProperties=t.updateMacroProperties.bind(t),this.locationMacro=t.locationMacro.bind(t),this.insertSubTemplate=t.insertSubTemplate.bind(t),this.updateSubTemplate=t.updateSubTemplate.bind(t),this.expandSubTemplate=t.expandSubTemplate.bind(t),this.collapseSubTemplate=t.collapseSubTemplate.bind(t),this.toggleSubTemplate=t.toggleSubTemplate.bind(t)}}function sg(o,t){return o===1125&&t===1593?{size:"a3",width:"297mm",height:"420mm"}:o===794&&t===1123?{size:"a4",width:"210mm",height:"297mm"}:o===565&&t===796?{size:"a5",width:"148mm",height:"210mm"}:{size:"",width:`${o}px`,height:`${t}px`}}function rg(o,t){const{width:e,height:n,direction:i=l.PaperDirection.VERTICAL}=t,r=document.createElement("iframe");r.style.visibility="hidden",r.style.position="absolute",r.style.left="0",r.style.top="0",r.style.width="0",r.style.height="0",r.style.border="none",document.body.append(r);const s=r.contentWindow,a=s.document;a.open();const c=document.createElement("div"),d=sg(e,n);o.forEach(h=>{const g=document.createElement("img");g.style.width=i===l.PaperDirection.HORIZONTAL?d.height:d.width,g.style.height=i===l.PaperDirection.HORIZONTAL?d.width:d.height,g.src=h,c.append(g)});const u=document.createElement("style"),R=`
|
|
538
|
+
`,document.body.appendChild(a);const c=a.querySelector(".table-properties-modal__mask"),d=a.querySelector(".table-properties-modal__close"),u=a.querySelector(".btn-cancel"),R=a.querySelector(".btn-confirm"),h=()=>{a.remove()};c.addEventListener("click",h),d.addEventListener("click",h),u.addEventListener("click",h),R.addEventListener("click",()=>{const g=parseInt(a.querySelector("#tdPaddingTop").value)||0,f=parseInt(a.querySelector("#tdPaddingRight").value)||0,T=parseInt(a.querySelector("#tdPaddingBottom").value)||0,m=parseInt(a.querySelector("#tdPaddingLeft").value)||0;i.tdPadding=[g,f,T,m],h();const{endIndex:p}=this.range.getRange();this.draw.render({curIndex:p,isCompute:!0})})}}class og{draw;zone;range;position;options;areaInfoMap=new Map;constructor(t){this.draw=t,this.options=t.getOptions(),this.zone=t.getZone(),this.range=t.getRange(),this.position=t.getPosition()}getAreaInfo(){return this.areaInfoMap}getActiveAreaId(){if(!this.areaInfoMap.size)return null;const{startIndex:t}=this.range.getRange();return this.draw.getElementList()[t]?.areaId||null}getActiveAreaInfo(){const t=this.getActiveAreaId();return t&&this.areaInfoMap.get(t)||null}isReadonly(){const t=this.getActiveAreaInfo();if(!t?.area)return!1;switch(t.area.mode){case l.AreaMode.EDIT:return!1;case l.AreaMode.READONLY:return!0;case l.AreaMode.FORM:return!this.draw.getControl().getIsRangeWithinControl();default:return!1}}insertArea(t){const{id:e,value:n,area:i,position:r,range:s}=t;if(this.zone.getZone()!==l.EditorZone.MAIN&&this.zone.setZone(l.EditorZone.MAIN),this.draw.getPosition().setPositionContext({isTable:!1}),s&&!this.getActiveAreaId()){const{startIndex:c,endIndex:d}=s,u=this.draw.getOriginalMainElementList();if(!u[c]||!u[d])return null;this.range.setRange(s.startIndex,s.endIndex)}else if(r===l.LocationPosition.BEFORE)this.range.setRange(0,0);else{const d=this.draw.getOriginalMainElementList().length-1;this.range.setRange(d,d)}const a=e||lt();return this.draw.insertElementList([{type:l.ElementType.AREA,value:"",areaId:a,valueList:n,area:at(i)}]),a}render(t,e){if(!this.areaInfoMap.size)return;t.save();const n=this.draw.getMargins(),i=this.draw.getInnerWidth();for(const r of this.areaInfoMap){const{area:s,positionList:a}=r[1];if(s?.hide||!s?.backgroundColor&&!s?.borderColor&&!s?.placeholder)continue;const c=a.filter(f=>f.pageNo===e);if(!c.length)continue;t.translate(.5,.5);const d=c[0],u=c[c.length-1],R=n[3],h=Math.ceil(d.coordinate.leftTop[1]),g=Math.ceil(u.coordinate.rightBottom[1]-h);t.textBaseline="middle",s.backgroundColor&&(t.fillStyle=s.backgroundColor,t.fillRect(R,h,i,g)),s.borderColor&&(t.strokeStyle=s.borderColor,t.strokeRect(R,h,i,g)),s.placeholder&&a.length<=1&&new Fr(this.draw).render(t,{placeholder:{...ki,...s.placeholder},startY:d.coordinate.leftTop[1]}),t.translate(-.5,-.5)}t.restore()}compute(){this.areaInfoMap.clear();const t=this.draw.getOriginalMainElementList(),e=this.position.getOriginalMainPositionList();for(let n=0;n<t.length;n++){const i=t[n],r=i.areaId;if(r){const s=this.areaInfoMap.get(r);s?(s.elementList.push(i),s.positionList.push(e[n])):this.areaInfoMap.set(r,{id:r,area:i.area,elementList:[i],positionList:[e[n]]})}}}getAreaValue(t={}){const e=t.id||this.getActiveAreaId();if(!e)return null;const n=this.areaInfoMap.get(e);return n?{area:n.area,id:n.id,startPageNo:n.positionList[0].pageNo,endPageNo:n.positionList[n.positionList.length-1].pageNo,value:Mt(n.elementList)}:null}getContextByAreaId(t,e){const n=this.draw.getOriginalMainElementList();for(let i=0;i<n.length;i++){const r=n[i];if(e?.position===l.LocationPosition.OUTER_BEFORE){if(n[i+1]?.areaId!==t)continue}else if(e?.position===l.LocationPosition.AFTER){if(!(r.areaId===t&&n[i+1]?.areaId!==t))continue}else if(e?.position===l.LocationPosition.OUTER_AFTER){if(!(r.areaId!==t&&n[i-1]?.areaId===t))continue}else if(r.areaId!==t)continue;const s=this.position.getOriginalMainPositionList();return{range:{startIndex:i,endIndex:i},elementPosition:s[i]}}return null}setAreaProperties(t){const e=t.id||this.getActiveAreaId();if(!e)return;const n=this.areaInfoMap.get(e);if(!n)return;n.area||(n.area={});let i=!1;const r=["top","hide"];Object.entries(t.properties).forEach(([s,a])=>{if(wi(a))return;const c=s;n.area[c]=a,r.includes(c)&&(i=!0)}),this.draw.render({isCompute:i,isSetCursor:!1})}setAreaValue(t){const e=t.id||this.getActiveAreaId();if(!e)return;const n=this.areaInfoMap.get(e);if(!n)return;const{positionList:i}=n,r=this.draw.getOriginalMainElementList(),s=t.value;bt([{type:l.ElementType.AREA,value:"",valueList:s,areaId:n.id,area:n.area}],{editorOptions:this.options}),this.draw.spliceElementList(r,i[0].index,i.length,s,{isIgnoreDeletedRule:!0}),this.draw.render({isSetCursor:!1})}}class ig{draw;options;imageCache;mainBadge;areaBadgeMap;constructor(t){this.draw=t,this.options=t.getOptions(),this.imageCache=new Map,this.mainBadge=null,this.areaBadgeMap=new Map}setMainBadge(t){this.mainBadge=t}setAreaBadgeMap(t){this.areaBadgeMap.clear(),t.forEach(e=>{this.areaBadgeMap.set(e.areaId,e.badge)})}_drawImage(t,e,n,i,r,s){if(this.imageCache.has(s)){const a=this.imageCache.get(s);t.drawImage(a,e,n,i,r)}else{const a=new Image;a.setAttribute("crossOrigin","Anonymous"),a.src=s,a.onload=()=>{this.imageCache.set(s,a),t.drawImage(a,e,n,i,r)}}}render(t,e){if(e===0&&this.mainBadge){const{scale:n,badge:i}=this.options,{left:r,top:s,width:a,height:c,value:d}=this.mainBadge,u=this.draw.getMargins()[0]+this.draw.getHeader().getExtraHeight(),R=(r||i.left)*n,h=(s||i.top)*n+u;this._drawImage(t,R,h,a*n,c*n,d)}if(this.areaBadgeMap.size){const n=this.draw.getArea().getAreaInfo();if(n.size){const{scale:i,badge:r}=this.options;for(const s of n){const{positionList:a}=s[1],c=a[0];if(c.pageNo!==e)continue;const d=this.areaBadgeMap.get(s[0]);if(!d)continue;const{left:u,top:R,width:h,height:g,value:f}=d,T=(u||r.left)*i,m=(R||r.top)*i+c.coordinate.leftTop[1];this._drawImage(t,T,m,h*i,g*i,f)}}}}}class sg{draw;options;data;pageContainer;isDrawing=!1;startStroke=null;constructor(t,e){this.draw=t,this.options=t.getOptions(),this.data=e||[],this.pageContainer=t.getPageContainer(),this.register()}register(){this.pageContainer.addEventListener("mousedown",this.start.bind(this)),this.pageContainer.addEventListener("mouseup",this.stop.bind(this)),this.pageContainer.addEventListener("mouseleave",this.stop.bind(this)),this.pageContainer.addEventListener("mousemove",this.drawing.bind(this))}start(t){if(!this.draw.isGraffitiMode())return;this.isDrawing=!0;const{scale:e}=this.options;this.startStroke={lineColor:this.options.graffiti.defaultLineColor,lineWidth:this.options.graffiti.defaultLineWidth,points:[t.offsetX/e,t.offsetY/e]}}stop(){this.isDrawing=!1}drawing(t){if(!this.isDrawing||!this.draw.isGraffitiMode())return;const{offsetX:e,offsetY:n}=t,i=2;if(this.startStroke&&Math.abs(this.startStroke.points[0]-e)<i&&Math.abs(this.startStroke.points[1]-n)<i)return;const r=this.draw.getPageNo();let s=this.data.find(d=>d.pageNo===r);if(this.startStroke&&(s||(s={pageNo:r,strokes:[]},this.data.push(s)),s.strokes.push(this.startStroke),this.startStroke=null),!s?.strokes?.length)return;const{scale:a}=this.options;s.strokes[s.strokes.length-1].points.push(e/a,n/a),this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1})}getValue(){return this.data}compute(){const t=this.draw.getPageRowList().length;for(let e=this.data.length-1;e>=0;e--)this.data[e].pageNo>t-1&&this.data.splice(e,1)}clear(){this.data=[]}render(t,e){const n=this.data.find(a=>a.pageNo===e)?.strokes;if(!n?.length)return;const{graffiti:{defaultLineColor:i,defaultLineWidth:r},scale:s}=this.options;t.save();for(let a=0;a<n.length;a++){const c=n[a];t.beginPath(),t.strokeStyle=c.lineColor||i,t.lineWidth=(c.lineWidth||r)*s,t.moveTo(c.points[0]*s,c.points[1]*s);for(let d=2;d<c.points.length;d+=2)t.lineTo(c.points[d]*s,c.points[d+1]*s);t.stroke()}t.restore()}}const yr=1024,rg=['[aria-modal="true"]','[role="dialog"]','[data-overlay-active="true"]',".ant-modal-root",".ant-modal-wrap",".ant-modal",".ant-drawer",".ant-select-dropdown",".ant-picker-dropdown",".ant-dropdown",".ant-popover",".ant-tooltip",".ant-cascader-dropdown",".ant-mentions-dropdown"].join(", ");function br(o,t,e){for(let n=0;n<e.length;n+=yr){const i=e.slice(n,n+yr);o.splice(t+n,0,...i)}}class lg{container;pageContainer;pageList;ctxList;pageNo;renderCount;pagePixelRatio;mode;options;position;zone;elementList;listener;eventBus;override;i18n;canvasEvent;globalEvent;cursor;range;margin;background;badge;search;group;area;underline;strikeout;highlight;historyManager;previewer;imageParticle;laTexParticle;textParticle;tableParticle;tableTool;tableOperate;pageNumber;lineNumber;waterMark;placeholder;header;footer;hyperlinkParticle;labelParticle;macroParticle;dateParticle;separatorParticle;pageBreakParticle;superscriptParticle;subscriptParticle;checkboxParticle;radioParticle;menstrualHistoryParticle;fetalHeartPositionParticle;toothPositionParticle;blockParticle;listParticle;lineBreakParticle;whiteSpaceParticle;control;pageBorder;workerManager;scrollObserver;selectionObserver;imageObserver;graffiti;command;interactionPaused;overlayActiveCount;globalShortcutSuspended;LETTER_REG;WORD_LIKE_REG;rowList;pageRowList;painterStyle;painterOptions;visiblePageNoList;intersectionPageNo;lazyRenderIntersectionObserver;printModeData;splitTdValueMap=new Map;tdMap=new Map;constructor(t,e,n,i,r,s){this.container=this._wrapContainer(t),this.pageList=[],this.ctxList=[],this.pageNo=0,this.renderCount=0,this.pagePixelRatio=null,this.mode=e.mode,this.options=e,this.elementList=n.main,this.listener=i,this.eventBus=r,this.override=s,this._formatContainer(),this.pageContainer=this._createPageContainer(),this._createPage(0),this.i18n=new _h(e.locale),this.historyManager=new Ba(this),this.position=new $a(this),this.zone=new Ah(this),this.range=new za(this),this.margin=new tc(this),this.background=new ja(this),this.badge=new ig(this),this.search=new ec(this),this.group=new Bh(this),this.area=new og(this),this.underline=new oc(this),this.strikeout=new nc(this),this.highlight=new qa(this),this.previewer=new Zh(this),this.imageParticle=new vi(this),this.laTexParticle=new _i(this),this.textParticle=new ic(this),this.tableParticle=new lc(this),this.tableTool=new ac(this),this.tableOperate=new ng(this),this.pageNumber=new an(this),this.lineNumber=new jh(this),this.waterMark=new mc(this),this.placeholder=new Fr(this),this.header=new Rc(this,n.header),this.footer=new kh(this,n.footer),this.hyperlinkParticle=new cc(this),this.labelParticle=new dc(this),this.macroParticle=new uc(this),this.dateParticle=new Qh(this),this.separatorParticle=new fc(this),this.pageBreakParticle=new Tc(this),this.superscriptParticle=new hc,this.subscriptParticle=new gc,this.checkboxParticle=new Nh(this),this.radioParticle=new Fh(this),this.menstrualHistoryParticle=new yh(this),this.fetalHeartPositionParticle=new bh(this),this.toothPositionParticle=new Wh(this),this.blockParticle=new Kh(this),this.listParticle=new Jh(this),this.lineBreakParticle=new Un(this),this.whiteSpaceParticle=new $h(this),this.control=new Oh(this),this.pageBorder=new qh(this),this.graffiti=new sg(this,n.graffiti),this.scrollObserver=new sc(this),this.selectionObserver=new rc(this),this.imageObserver=new xh,new zh(this),this.canvasEvent=new ka(this),this.cursor=new Ra(this,this.canvasEvent),this.canvasEvent.register(),this.globalEvent=new Ja(this,this.canvasEvent),this.globalEvent.register(),this.workerManager=new wh(this),new eg(this);const{letterClass:a}=e;this.LETTER_REG=new RegExp(`[${a.join("")}]`),this.WORD_LIKE_REG=new RegExp(`${a.map(c=>`[^${c}][${c}]`).join("|")}`),this.rowList=[],this.pageRowList=[],this.painterStyle=null,this.painterOptions=null,this.visiblePageNoList=[],this.intersectionPageNo=0,this.lazyRenderIntersectionObserver=null,this.printModeData=null,this.interactionPaused=!1,this.overlayActiveCount=0,this.globalShortcutSuspended=!1,this.mode===l.EditorMode.PRINT&&this.setPrintData(),this.mode,l.EditorMode.FORM,this.render({isInit:!0,isSetCursor:!1,isFirstRender:!0})}setPrintData(){this.printModeData={header:this.header.getElementList(),main:this.elementList,footer:this.footer.getElementList()};const t=at(this.printModeData);["header","main","footer"].forEach(r=>{t[r]=this.control.filterAssistElement(t[r])});const n=t,i=this.removeStrikeout(n);t.main=i.main.filter(r=>!r.strikeout),this.setEditorData(i)}removeStrikeout(t){if(Array.isArray(t))return t.map(e=>this.removeStrikeout(e)).filter(e=>!(e&&typeof e=="object"&&"strikeout"in e&&e.strikeout===!0));if(t&&typeof t=="object"){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=this.removeStrikeout(t[n]));return e}return t}clearPrintData(){this.printModeData&&(this.setEditorData(this.printModeData),this.printModeData=null)}getLetterReg(){return this.LETTER_REG}getMode(){return this.mode}setMode(t){if(this.mode===t)return;this.macroParticle.clearInlineEditor({isSubmitHistory:!1}),this.mode=t,this.options.mode=t;const e=new Map,n=r=>{r.forEach(s=>{s.controlId&&(s.controlComponent==="value"&&e.set(s.controlId,!0),s.checked&&e.set(s.controlId,!0))})};n(this.elementList),this.elementList.forEach(r=>{r.type==="table"&&r.trList?.forEach(s=>{s.tdList?.forEach(a=>{n(a.value)})})});const i=r=>{r.forEach(s=>{if(!(!s.control&&!s.controlId)&&(s.controlComponent==="value"&&s.strikeout&&(t===l.EditorMode.PRINT?s.hide=!0:s.hide=!1),!!s.control&&!(s.type!=="control"&&s.control.type!=="button"))){if(s.control.type==="TextField"&&(s.controlComponent==="placeholder"||s.controlComponent==="preTextFix"||s.controlComponent==="preTextFixText"||s.controlComponent==="postTextFix"||s.controlComponent==="postTextFixText"||s.controlComponent==="textFixLabel")&&(t===l.EditorMode.EDIT?s.hide=!1:s.hide=!0),s.control.type==="text"&&(s.controlComponent==="placeholder"||s.controlComponent==="prefix"||s.controlComponent==="postfix")&&(t===l.EditorMode.EDIT||t===l.EditorMode.FORM?s.hide=!1:s.hide=!0),s.control.type==="number"||s.control.type==="select"||s.control.type==="date"||s.control.type==="checkbox"||s.control.type==="radio"){if(s.controlComponent==="placeholder"||s.controlComponent==="prefix"||s.controlComponent==="postfix"){const c=e.get(s.controlId);s.control.type==="select"&&t===l.EditorMode.PRINT||t===l.EditorMode.PRINT&&!c?s.hide=!0:s.hide=!1}s.control.type==="number"&&s.controlComponent==="value"&&(t===l.EditorMode.PRINT&&s.strikeout?s.hide=!0:t!==l.EditorMode.PRINT&&s.strikeout&&(s.hide=!1))}s.control.type==="button"&&(s.hide=!1,s.control.hide=!1),s.control.type==="menstrualHistory"&&(s.controlComponent==="prefix"||s.controlComponent==="postfix")&&(t===l.EditorMode.PRINT?s.hide=!0:s.hide=!1)}})};i(this.elementList),this.elementList.forEach(r=>{r.type==="table"&&r.trList.forEach(s=>{s.tdList.forEach(a=>{i(a.value)})})}),t===l.EditorMode.FORM?(this.elementList.filter(r=>r.type==="control").map(r=>{r.control?.type==="button"&&r.control.buttonText&&(r.color="#1677FF",r.highlight="transparent")}),this.hideTextFieldWhitespace(this.elementList,!0),this.updateTextFieldPlaceholderVisibility(this.elementList,!0,!1)):t===l.EditorMode.EDIT?(this.hideTextFieldWhitespace(this.elementList,!1),this.updateTextFieldPlaceholderVisibility(this.elementList,!0,!1)):(this.hideTextFieldWhitespace(this.elementList,!1),this.updateTextFieldPlaceholderVisibility(this.elementList,!1,!0)),t===l.EditorMode.PRINT?(this.elementList.filter(r=>r?.control?.type==="button").map(r=>{(r?.controlComponent==="prefix"||r?.controlComponent==="postfix")&&(r.color="transparent",r.highlight="transparent"),r?.controlComponent==="value"&&!r.control.buttonText&&(r.color="transparent",r.highlight="transparent")}),this.setPrintData()):(this.clearPrintData(),this.elementList.filter(r=>r?.control?.type==="button").map(r=>{(r?.controlComponent==="prefix"||r?.controlComponent==="postfix")&&!r.control.buttonText&&r.type==="control"&&(r.color="transparent",r.highlight="#1677FF"),r?.controlComponent==="value"&&!r.control.buttonText&&(r.color="#fff",r.highlight="#1677FF"),r?.type==="text"&&r.control.buttonText&&(r.color="#000"),r?.type==="control"&&r?.controlComponent==="value"&&r.control.buttonText&&(r.color="#000",r.highlight="transparent")})),this.mode===l.EditorMode.PRINT&&this.clearPrintData(),this.clearSideEffect(),this.control.destroyControl(),this.range.clearRange(),this.render({isSetCursor:!1,isSubmitHistory:!1})}hideTextFieldWhitespace(t,e){const n=r=>r?/^[\s\u00A0\u2000-\u200B\u3000\n\r\t]+$/.test(r):!1;(r=>{for(let s=0;s<r.length;s++){const a=r[s];if(a.type===l.ElementType.TABLE&&a.trList)for(const c of a.trList)for(const d of c.tdList)this.hideTextFieldWhitespace(d.value,e);a.control?.type===l.ControlType.TEXTFIELD&&a.controlComponent===l.ControlComponent.VALUE&&n(a.value)&&(a.hide=e)}})(t)}getSubTemplateRuntimeEndIndex(t,e,n){let i=e+1;for(;i<t.length&&t[i].subTemplateParentId===n;)i++;return i}syncSubTemplateExpandedState(t,e,n,i,r){let s=!1;const a=this.getSubTemplateRuntimeEndIndex(t,e,n.id);if(i&&!n.subTemplateContent?.length&&(i=!1),n.subTemplateExpanded!==i&&(n.subTemplateExpanded=i,s=!0),!!n.hide!==r&&(n.hide=r,s=!0),!i)return a>e+1&&(t.splice(e+1,a-e-1),s=!0),s;if(a===e+1){const c=at(n.subTemplateContent||[]);bt(c,{isHandleFirstElement:!1,editorOptions:this.options});for(let d=0;d<c.length;d++)c[d].subTemplateParentId=n.id;c.length&&(t.splice(e+1,0,...c),s=!0)}return s}applySubTemplateRuntimeState(t,e){const n=i=>{let r=!1,s=0;for(;s<i.length;){const a=i[s];if(a.type===l.ElementType.SUB_TEMPLATE){const c=!!a.subTemplateConditions?.length;if(this.mode===l.EditorMode.EDIT&&c)r=this.syncSubTemplateExpandedState(i,s,a,!0,!0)||r;else if((this.mode===l.EditorMode.FORM||this.mode===l.EditorMode.PRINT)&&c){const d=e?Xh(a.subTemplateConditions,e,a.subTemplateRelation):!1;r=this.syncSubTemplateExpandedState(i,s,a,d,!0)||r}else this.mode!==l.EditorMode.FORM&&this.mode!==l.EditorMode.PRINT&&(r=this.syncSubTemplateExpandedState(i,s,a,!1,!1)||r)}if(a.valueList?.length&&(r=n(a.valueList)||r),a.control?.value?.length&&(r=n(a.control.value)||r),a.type===l.ElementType.TABLE&&a.trList?.length)for(let c=0;c<a.trList.length;c++){const d=a.trList[c];for(let u=0;u<d.tdList.length;u++)r=n(d.tdList[u].value)||r}s++}return r};return n(t)}updateTextFieldPlaceholderVisibility(t,e,n){const i=[l.ControlType.TEXT,l.ControlType.TEXTFIELD,l.ControlType.SELECT,l.ControlType.DATE,l.ControlType.CHECKBOX,l.ControlType.RADIO,l.ControlType.NUMBER];(s=>{let a=0;for(;a<s.length;){const c=s[a];if(c.type===l.ElementType.TABLE&&c.trList)for(const d of c.trList)for(const u of d.tdList)this.updateTextFieldPlaceholderVisibility(u.value,e,n);if(c.control?.type&&i.includes(c.control.type)&&(c.controlComponent===l.ControlComponent.PREFIX||c.controlComponent===l.ControlComponent.PRETEXTFIX||c.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||c.controlComponent===l.ControlComponent.PRE_TEXT)){const d=c.controlId,u=c.control.type;let R=!1,h=!1,g=!1;const f=[],T=[],m=[];let p=-1,I=a;for(;I<s.length;){const L=s[I];if(L.controlId!==d)break;if((L.controlComponent===l.ControlComponent.PREFIX||L.controlComponent===l.ControlComponent.PRETEXTFIX||L.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT)&&T.push(I),L.controlComponent===l.ControlComponent.VALUE&&L.value&&L.value.trim()&&(R=!0),L.controlComponent===l.ControlComponent.VALUE&&(L.type===l.ElementType.MENSTRUAL_HISTORY||L.type===l.ElementType.FETAL_HEART_POSITION||L.type===l.ElementType.TOOTH_POSITION||L.type===l.ElementType.MACRO||L.type===l.ElementType.CUSTOM_MACRO)&&(R=!0),L.controlComponent===l.ControlComponent.VALUE&&L.control&&L.control.type!==u&&(h=!0),L.controlComponent===l.ControlComponent.PLACEHOLDER&&(g=!0,f.push(I)),L.controlComponent===l.ControlComponent.POSTFIX||L.controlComponent===l.ControlComponent.POSTTEXTFIX||L.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT){m.push(I),p=I;break}I++}if(!R&&!h)if(g&&f.length>0)for(const L of f)s[L].hide=!e;else e&&c.control?.placeholder&&(p>0?this.control.addPlaceholder(p-1):this.control.addPlaceholder(a));if(n)if(e&&R){for(const L of T)s[L].hide=!0;for(const L of m)s[L].hide=!0}else if(e){for(const L of T)s[L].hide=!1;for(const L of m)s[L].hide=!1}else{for(const L of T)s[L].hide=!0;for(const L of m)s[L].hide=!0}else{for(const L of T)s[L].hide=!1;for(const L of m)s[L].hide=!1}a=I}a++}})(t)}isReadonly(){if(this.area.getActiveAreaInfo()?.area?.mode)return this.area.isReadonly();switch(this.mode){case l.EditorMode.DESIGN:return!1;case l.EditorMode.READONLY:case l.EditorMode.PRINT:case l.EditorMode.GRAFFITI:return!0;case l.EditorMode.FORM:if(this.control.getIsRangeWithinControl()){const t=this.getElementList(),{startIndex:e}=this.range.getRange();if(t[e]?.control?.type===l.ControlType.TEXTFIELD)return!0}return!this.control.getIsRangeWithinControl();default:return!1}}isDisabled(){if(this.mode===l.EditorMode.DESIGN)return!1;const{startIndex:t,endIndex:e}=this.range.getRange(),n=this.getElementList();if(this.getTd()?.disabled)return!0;if(t===e){const r=n[t],s=n[t+1];return!!(r?.title?.disabled&&s?.title?.disabled&&r.titleId===s.titleId||r?.control?.disabled&&s?.control?.disabled&&r.controlId===s.controlId)}return n.slice(t+1,e+1).some(r=>r.title?.disabled||r.control?.disabled)}isDesignMode(){return this.mode===l.EditorMode.DESIGN}isPrintMode(){return this.mode===l.EditorMode.PRINT}isGraffitiMode(){return this.mode===l.EditorMode.GRAFFITI}getOriginalWidth(){const{paperDirection:t,width:e,height:n}=this.options;return t===l.PaperDirection.VERTICAL?e:n}getOriginalHeight(){const{paperDirection:t,width:e,height:n}=this.options;return t===l.PaperDirection.VERTICAL?n:e}getWidth(){return Math.floor(this.getOriginalWidth()*this.options.scale)}getHeight(){return Math.floor(this.getOriginalHeight()*this.options.scale)}getMainHeight(){return this.getHeight()-this.getMainOuterHeight()}getMainOuterHeight(){const t=this.getMargins(),e=this.header.getExtraHeight(),n=this.footer.getExtraHeight();return t[0]+t[2]+e+n}getCanvasWidth(t=-1){return this.getPage(t).width}getCanvasHeight(t=-1){return this.getPage(t).height}getInnerWidth(){const t=this.getWidth(),e=this.getMargins();return t-e[1]-e[3]}getOriginalInnerWidth(){const t=this.getOriginalWidth(),e=this.getOriginalMargins();return t-e[1]-e[3]}getContextInnerWidth(){const t=this.position.getPositionContext();if(t.isTable){const{index:e,trIndex:n,tdIndex:i}=t,s=this.getOriginalElementList()[e],a=s.trList[n].tdList[i],c=this.getTdPadding(s);return a.width-c[1]-c[3]}return this.getOriginalInnerWidth()}getMargins(){return this.getOriginalMargins().map(t=>t*this.options.scale)}getOriginalMargins(){const{margins:t,paperDirection:e}=this.options;return e===l.PaperDirection.VERTICAL?t:[t[1],t[2],t[3],t[0]]}getPageGap(){return this.options.pageGap*this.options.scale}getOriginalPageGap(){return this.options.pageGap}getPageNumberBottom(){const{pageNumber:{bottom:t},scale:e}=this.options;return t*e}getMarginIndicatorSize(){return this.options.marginIndicatorSize*this.options.scale}getDefaultBasicRowMarginHeight(){return this.options.defaultBasicRowMarginHeight*this.options.scale}getHighlightMarginHeight(){return this.options.highlightMarginHeight*this.options.scale}getTdPadding(t){const{table:{tdPadding:e},scale:n}=this.options;return(t?.tdPadding||e).map(r=>r*n)}getContainer(){return this.container}getPageContainer(){return this.pageContainer}getEventTarget(t){return t instanceof Element?t:t instanceof Node?t.parentElement:null}isTargetInsideEditor(t){const e=this.getEventTarget(t);return e?this.container.contains(e)?!0:!!Wi(e,n=>!!n&&n.nodeType===1&&!!n.getAttribute(ue)):!1}isTargetInsideExternalOverlay(t){const e=this.getEventTarget(t);return!e||this.isTargetInsideEditor(e)?!1:!!e.closest(rg)}pauseInteraction(){this.interactionPaused=!0,this.cursor?.getAgentDom().blur(),this.globalEvent?.resetSideEffect()}resumeInteraction(){this.interactionPaused=!1}setOverlayActive(t){this.overlayActiveCount=t?1:0,t&&(this.cursor?.getAgentDom().blur(),this.globalEvent?.resetSideEffect())}suspendGlobalShortcut(t){this.globalShortcutSuspended=t}isInteractionSuspended(){return this.interactionPaused||this.overlayActiveCount>0}isGlobalShortcutActive(){return!this.globalShortcutSuspended&&!this.isInteractionSuspended()}getVisiblePageNoList(){return this.visiblePageNoList}setVisiblePageNoList(t){this.visiblePageNoList=t,this.listener.visiblePageNoListChange&&this.listener.visiblePageNoListChange(this.visiblePageNoList),this.eventBus.isSubscribe("visiblePageNoListChange")&&this.eventBus.emit("visiblePageNoListChange",this.visiblePageNoList)}getIntersectionPageNo(){return this.intersectionPageNo}setIntersectionPageNo(t){this.intersectionPageNo=t,this.listener.intersectionPageNoChange&&this.listener.intersectionPageNoChange(this.intersectionPageNo),this.eventBus.isSubscribe("intersectionPageNoChange")&&this.eventBus.emit("intersectionPageNoChange",this.intersectionPageNo)}getPageNo(){return this.pageNo}setPageNo(t){this.pageNo=t}getRenderCount(){return this.renderCount}getPage(t=-1){return this.pageList[~t?t:this.pageNo]}getPageList(){return this.pageList}getPageCount(){return this.pageList.length}getTableRowList(t){const e=this.position.getPositionContext(),{index:n,trIndex:i,tdIndex:r}=e;return t[n].trList[i].tdList[r].rowList}getOriginalRowList(){const t=this.getZone();return t.isHeaderActive()?this.header.getRowList():t.isFooterActive()?this.footer.getRowList():this.rowList}getRowList(){return this.position.getPositionContext().isTable?this.getTableRowList(this.getOriginalElementList()):this.getOriginalRowList()}getPageRowList(){return this.pageRowList}getCtx(){return this.ctxList[this.pageNo]}getOptions(){return this.options}getSearch(){return this.search}getGroup(){return this.group}getArea(){return this.area}getBadge(){return this.badge}getHistoryManager(){return this.historyManager}getPosition(){return this.position}getZone(){return this.zone}getRange(){return this.range}getLineBreakParticle(){return this.lineBreakParticle}getTextParticle(){return this.textParticle}getHeaderElementList(){return this.header.getElementList()}getTableElementList(t){const e=this.position.getPositionContext(),{index:n,trIndex:i,tdIndex:r}=e;return t[n]?.trList?.[i].tdList[r].value||[]}getElementList(){const t=this.position.getPositionContext(),e=this.getOriginalElementList();return t.isTable?this.getTableElementList(e):e}getMainElementList(){return this.position.getPositionContext().isTable?this.getTableElementList(this.elementList):this.elementList}getOriginalElementList(){const t=this.getZone();return t.isHeaderActive()?this.getHeaderElementList():t.isFooterActive()?this.getFooterElementList():this.elementList}getOriginalMainElementList(){return this.elementList}getFooterElementList(){return this.footer.getElementList()}getTd(){const t=this.position.getPositionContext(),{index:e,trIndex:n,tdIndex:i,isTable:r}=t;return r?this.getOriginalElementList()[e].trList[n].tdList[i]:null}getTdByPosition(t){const{index:e,trIndex:n,tdIndex:i,isTable:r}=t;return r?this.getOriginalElementList()[e].trList[n].tdList[i]:null}insertElementTextField(t,e={}){if(!t.length||!this.range.getIsCanInput())return;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return;const r=this.getElementList(),{isSubmitHistory:s=!0}=e;bt(t,{isHandleFirstElement:!1,editorOptions:this.options});let a=-1,c=this.control.getActiveControl();if(!c&&this.control.getIsRangeWithinControl()&&(this.control.initControl(),c=this.control.getActiveControl()),c&&this.control.getIsRangeWithinControl()){const d=n===i,u=n+1;d||this.newSpliceElementList(r,u,i-n),this.newSpliceElementList(r,u,0,t),a=n+t.length}else{const d=n===i,u=n+1;d||this.newSpliceElementList(r,u,i-n),this.newSpliceElementList(r,u,0,t),a=n+t.length;const R=r[u-1];t[0].listId&&R&&!R.listId&&R?.value===_&&(!R.type||R.type===l.ElementType.TEXTFIELD)&&(r.splice(n,1),a-=1)}this.control.destroyControl(),~a&&(this.range.setRange(a,a),this.render({curIndex:a,isSubmitHistory:s}))}insertElementList(t,e={}){if(!t.length||!this.range.getIsCanInput())return;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return;const{isSubmitHistory:r=!0}=e;bt(t,{isHandleFirstElement:!1,editorOptions:this.options});let s=-1,a=this.control.getActiveControl();if(!a&&this.control.getIsRangeWithinControl()&&(this.control.initControl(),a=this.control.getActiveControl()),a&&this.control.getIsRangeWithinControl()){const c=this.getElementList(),d=n===i,u=n+1,R=c[n];if(R?.controlComponent===l.ControlComponent.PRE_TEXT||R?.controlComponent===l.ControlComponent.POST_TEXT||R?.controlComponent===l.ControlComponent.PREFIX||R?.controlComponent===l.ControlComponent.POSTFIX)for(let f=0;f<t.length;f++)t[f].control||(t[f].color=this.options.defaultColor);d&&(c[n]?.control?.type===l.ControlType.TEXTFIELD||c[n]?.control?.type===l.ControlType.TEXT)&&this.control.removePlaceholder(n),d||this.newSpliceElementList(c,u,i-n);const g=c[n]?.controlId||c[n-1]?.controlId||c[n+1]?.controlId;for(let f=0;f<t.length;f++){if(t[f]?.control?.type=="button"&&!t[f]?.control?.buttonText&&(t[f]?.controlComponent==="prefix"||t[f]?.controlComponent==="postfix"?(t[f].color="transparent",t[f].highlight="#1677FF"):(t[f].color="#fff",t[f].highlight="#1677FF")),t[f]?.type===l.ElementType.MENSTRUAL_HISTORY||t[f]?.type===l.ElementType.FETAL_HEART_POSITION||t[f]?.type===l.ElementType.TOOTH_POSITION||t[f]?.type===l.ElementType.MACRO||t[f]?.type===l.ElementType.CUSTOM_MACRO||t[f]?.type===l.ElementType.REUSABLE_ITEM||t[f]?.type===l.ElementType.SUB_TEMPLATE||t[f]?.type===l.ElementType.SPECIAL_SYMBOLS){t[f].controlComponent=l.ControlComponent.VALUE;let T=c[n]?.controlId;T||(T=c[n-1]?.controlId),T||(T=c[n+1]?.controlId),!t[f].controlId&&T&&(t[f].controlId=T)}g&&t[f]?.control&&t[f].controlId&&t[f].controlId!==g&&(t[f].originControlId=g)}this.newSpliceElementList(c,u,0,t),s=n+t.length}else{const c=this.getElementList(),d=n===i,u=n+1;if(c[u]?.control?.type=="TextField"||c[n]?.control?.type=="TextField"){d||this.newSpliceElementList(c,u,i-n);for(let R=0;R<t.length;R++)if(t[R]?.type===l.ElementType.MENSTRUAL_HISTORY||t[R]?.type===l.ElementType.FETAL_HEART_POSITION||t[R]?.type===l.ElementType.TOOTH_POSITION||t[R]?.type===l.ElementType.MACRO||t[R]?.type===l.ElementType.CUSTOM_MACRO||t[R]?.type===l.ElementType.REUSABLE_ITEM||t[R]?.type===l.ElementType.SUB_TEMPLATE||t[R]?.type===l.ElementType.SPECIAL_SYMBOLS){t[R].controlComponent=l.ControlComponent.VALUE;const h=c[n]?.controlId||c[u]?.controlId;!t[R].controlId&&h&&(t[R].controlId=h)}this.newSpliceElementList(c,u,0,t),s=n+t.length}else{d||this.spliceElementList(c,u,i-n);for(let h=0;h<t.length;h++)t[h]?.control?.type=="button"&&!t[h]?.control?.buttonText&&(t[h]?.controlComponent==="prefix"||t[h]?.controlComponent==="postfix"?(t[h].color="transparent",t[h].highlight="#1677FF"):(t[h].color="#fff",t[h].highlight="#1677FF"));this.spliceElementList(c,u,0,t),s=n+t.length;const R=c[u-1];t[0].listId&&R&&!R.listId&&R?.value===_&&(!R.type||R.type===l.ElementType.TEXT)&&(c.splice(n,1),s-=1)}}~s&&(this.range.setRange(s,s),this.render({curIndex:s,isSubmitHistory:r}))}appendElementList(t,e={}){if(!t.length)return;bt(t,{isHandleFirstElement:!1,editorOptions:this.options});let n;const{isPrepend:i,isSubmitHistory:r=!0}=e;i?(this.elementList.splice(1,0,...t),n=t.length):(this.elementList.push(...t),n=this.elementList.length-1),this.range.setRange(n,n),this.render({curIndex:n,isSubmitHistory:r})}spliceElementList(t,e,n,i,r){const{isIgnoreDeletedRule:s=!1}=r||{},{group:a,modeRule:c}=this.options;if(n>0){const d=e+n,R=t[d]?.listId;if(R&&t[e-1]?.listId!==R){let h=d;for(;h<t.length;){const g=t[h];if(g.listId!==R||g.value===_)break;delete g.listId,delete g.listType,delete g.listStyle,h++}}if(!s&&!this.isDesignMode()&&!this.control.getIsRangeWithinControl()){const h=this.getTd()?.deletable;let g=d-1;for(;g>=e;){const f=t[g];(vt(f)||h!==!1&&f?.control?.deletable!==!1&&(!f.controlId||this.mode!==l.EditorMode.FORM||!c[this.mode].controlDeletableDisabled)&&f?.title?.deletable!==!1&&(a.deletable!==!1||!f.groupIds?.length)&&(f?.area?.deletable!==!1||f?.areaIndex!==0))&&t.splice(g,1),g--}}else t.splice(e,n)}if(i?.length){let d=t[e];for(let u=0;u<i.length;u++)!i[u].controlComponent&&d?.controlComponent&&(i[u].controlId=d.controlId,i[u].control=d.control,i[u].controlComponent=d.controlComponent),d=i[u];br(t,e,i)}}newSpliceElementList(t,e,n,i,r){const{isIgnoreDeletedRule:s=!1}=r||{},{group:a,modeRule:c}=this.options;if(n>0){const u=e+n,h=t[u]?.listId;if(h&&t[e-1]?.listId!==h){let g=u;for(;g<t.length;){const f=t[g];if(f.listId!==h||f.value===_)break;delete f.listId,delete f.listType,delete f.listStyle,g++}}if(!s&&!this.isDesignMode()&&!this.control.getIsRangeWithinControl()){const g=this.getTd()?.deletable;let f=u-1;for(;f>=e;){const T=t[f];(vt(T)||g!==!1&&T?.control?.deletable!==!1&&(!T.controlId||this.mode!==l.EditorMode.FORM||!c[this.mode].controlDeletableDisabled)&&T?.title?.deletable!==!1&&(a.deletable!==!1||!T.groupIds?.length)&&(T?.area?.deletable!==!1||T?.areaIndex!==0))&&t.splice(f,1),f--}}else t.splice(e,n)}const d=t[e]?.controlId;if(i?.length){for(let u=0;u<i.length;u++)d&&(i[u].originControlId=d);br(t,e,i)}}getCanvasEvent(){return this.canvasEvent}getGlobalEvent(){return this.globalEvent}getListener(){return this.listener}getEventBus(){return this.eventBus}getOverride(){return this.override}getCursor(){return this.cursor}getPreviewer(){return this.previewer}getImageParticle(){return this.imageParticle}getTableTool(){return this.tableTool}getTableOperate(){return this.tableOperate}getTableParticle(){return this.tableParticle}getHeader(){return this.header}getFooter(){return this.footer}getHyperlinkParticle(){return this.hyperlinkParticle}getMacroParticle(){return this.macroParticle}getDateParticle(){return this.dateParticle}getListParticle(){return this.listParticle}getCheckboxParticle(){return this.checkboxParticle}getRadioParticle(){return this.radioParticle}getMenstrualHistoryParticle(){return this.menstrualHistoryParticle}getFetalHeartPositionParticle(){return this.fetalHeartPositionParticle}getToothPositionParticle(){return this.toothPositionParticle}getControl(){return this.control}getWorkerManager(){return this.workerManager}getImageObserver(){return this.imageObserver}getI18n(){return this.i18n}getGraffiti(){return this.graffiti}setCommand(t){this.command=t}getCommand(){return this.command}getRowCount(){return this.getRowList().length}async getDataURL(t={}){const{pixelRatio:e,mode:n}=t;e&&this.setPagePixelRatio(e);const i=this.mode,r=!!n&&i!==n;r&&this.setMode(n),this.render({isLazy:!1,isCompute:!1,isSetCursor:!1,isSubmitHistory:!1}),await this.imageObserver.allSettled();const s=this.pageList.map(a=>a.toDataURL());return e&&this.setPagePixelRatio(null),r&&this.setMode(i),s}getPainterStyle(){return this.painterStyle&&Object.keys(this.painterStyle).length?this.painterStyle:null}getPainterOptions(){return this.painterOptions}setPainterStyle(t,e){this.painterStyle=t,this.painterOptions=e||null,this.getPainterStyle()&&this.pageList.forEach(n=>n.style.cursor="copy")}setDefaultRange(){this.elementList.length&&setTimeout(()=>{const t=this.elementList.length-1;this.range.setRange(t,t),this.range.setRangeStyle()})}getIsPagingMode(){return this.options.pageMode===l.PageMode.PAGING}setPageMode(t){if(!t||this.options.pageMode===t)return;if(this.options.pageMode=t,t===l.PageMode.PAGING){const{height:i}=this.options,r=this.getPagePixelRatio(),s=this.pageList[0];s.style.height=`${i}px`,s.height=i*r,this._initPageContext(this.ctxList[0])}else this._disconnectLazyRender(),this.header.recovery(),this.footer.recovery(),this.zone.setZone(l.EditorZone.MAIN);const{startIndex:e}=this.range.getRange(),n=this.range.getIsCollapsed();this.render({isSetCursor:!0,curIndex:e,isSubmitHistory:!1}),n||this.cursor.drawCursor({isShow:!1}),setTimeout(()=>{this.listener.pageModeChange&&this.listener.pageModeChange(t),this.eventBus.isSubscribe("pageModeChange")&&this.eventBus.emit("pageModeChange",t)})}setPageScale(t){const e=this.getPagePixelRatio();this.options.scale=t;const n=this.getWidth(),i=this.getHeight();this.container.style.width=`${n}px`,this.pageList.forEach((s,a)=>{s.width=n*e,s.height=i*e,s.style.width=`${n}px`,s.style.height=`${i}px`,s.style.marginBottom=`${this.getPageGap()}px`,this._initPageContext(this.ctxList[a])});const r=this.position.getCursorPosition();this.render({isSubmitHistory:!1,isSetCursor:!!r,curIndex:r?.index}),this.listener.pageScaleChange&&this.listener.pageScaleChange(t),this.eventBus.isSubscribe("pageScaleChange")&&this.eventBus.emit("pageScaleChange",t)}getPagePixelRatio(){return this.pagePixelRatio||window.devicePixelRatio}setPagePixelRatio(t){!this.pagePixelRatio&&t===window.devicePixelRatio||t===this.pagePixelRatio||(this.pagePixelRatio=t,this.setPageDevicePixel())}setPageDevicePixel(){const t=this.getPagePixelRatio(),e=this.getWidth(),n=this.getHeight();this.pageList.forEach((i,r)=>{i.width=e*t,i.height=n*t,this._initPageContext(this.ctxList[r])}),this.render({isSubmitHistory:!1,isSetCursor:!1})}setPaperSize(t,e){this.options.width=t,this.options.height=e;const n=this.getPagePixelRatio(),i=this.getWidth(),r=this.getHeight();this.container.style.width=`${i}px`,this.pageList.forEach((s,a)=>{s.width=i*n,s.height=r*n,s.style.width=`${i}px`,s.style.height=`${r}px`,this._initPageContext(this.ctxList[a])}),this.render({isSubmitHistory:!1,isSetCursor:!1})}setPaperDirection(t){const e=this.getPagePixelRatio();this.options.paperDirection=t;const n=this.getWidth(),i=this.getHeight();this.container.style.width=`${n}px`,this.pageList.forEach((r,s)=>{r.width=n*e,r.height=i*e,r.style.width=`${n}px`,r.style.height=`${i}px`,this._initPageContext(this.ctxList[s])}),this.render({isSubmitHistory:!1,isSetCursor:!1})}setPaperMargin(t){this.options.margins=t,this.render({isSubmitHistory:!1,isSetCursor:!1})}getOriginValue(t={}){const{pageNo:e}=t;let n=this.elementList;return Number.isInteger(e)&&e>=0&&e<this.pageRowList.length&&(n=this.pageRowList[e].flatMap(r=>r.elementList)),{header:this.getHeaderElementList(),main:n,footer:this.getFooterElementList(),graffiti:this.graffiti.getValue()}}getValue(t={}){const e=this.getOriginValue(t);console.log(this.elementList,"所有元素");const{extraPickAttrs:n}=t,i={header:Mt(e.header,{extraPickAttrs:n,editorOptions:this.options}),main:Mt(e.main,{extraPickAttrs:n,isClassifyArea:!0,editorOptions:this.options}),footer:Mt(e.footer,{extraPickAttrs:n,editorOptions:this.options}),graffiti:e.graffiti};return{version:ve,data:i,options:at(this.options)}}setValue(t,e){const{header:n,main:i,footer:r}=at(t);if(!n&&!i&&!r)return;const{isSetCursor:s=!1}=e||{};[n,i,r].forEach(d=>{d&&bt(d,{editorOptions:this.options,isForceCompensation:!0})}),this.setEditorData({header:n,main:i,footer:r}),this.historyManager.recovery();const c=s?i?.length?i.length-1:0:void 0;c!==void 0&&this.range.setRange(c,c),this.render({curIndex:c,isSetCursor:s,isFirstRender:!0})}setEditorData(t){const{header:e,main:n,footer:i}=t;e&&this.header.setElementList(e),n&&(this.elementList=n),i&&this.footer.setElementList(i)}_wrapContainer(t){const e=document.createElement("div");return t.append(e),e}_formatContainer(){this.container.style.position="relative",this.container.style.width=`${this.getWidth()}px`,this.container.setAttribute(ue,l.EditorComponent.MAIN)}_createPageContainer(){const t=document.createElement("div");return t.classList.add(`${z}-page-container`),this.container.append(t),t}_createPage(t){const e=this.getWidth(),n=this.getHeight(),i=document.createElement("canvas");i.style.width=`${e}px`,i.style.height=`${n}px`,i.style.display="block",i.style.backgroundColor="#ffffff",i.style.marginBottom=`${this.getPageGap()}px`,i.setAttribute("data-index",String(t)),this.pageContainer.append(i);const r=this.getPagePixelRatio();i.width=e*r,i.height=n*r,i.style.cursor="text";const s=i.getContext("2d");this._initPageContext(s),this.pageList.push(i),this.ctxList.push(s)}_initPageContext(t){const e=this.getPagePixelRatio();t.scale(e,e),t.letterSpacing="0px",t.wordSpacing="0px",t.direction="ltr"}getElementFont(t,e=1){const{defaultSize:n,defaultFont:i}=this.options,r=t.font||i,s=t.actualSize||t.size||n;return`${t.italic?"italic ":""}${t.bold?"bold ":""}${s*e}px ${r}`}getElementSize(t){return t.actualSize||t.size||this.options.defaultSize}getElementRowMargin(t){const{defaultSize:e,defaultBasicRowMarginHeight:n,defaultRowMargin:i,scale:r}=this.options,s=t.size||e;let a=1;return s<12?a=s/12:s>30&&(a=1+(s-30)/30),n*a*(t.rowMargin??i)*r}computeRowList(t){const{innerWidth:e,elementList:n,isPagingMode:i=!1,isFromTable:r=!1,startX:s=0,startY:a=0,pageHeight:c=0,mainOuterHeight:d=0,surroundElementList:u=[]}=t,{defaultSize:R,scale:h,imgCaption:g,table:{tdPadding:f,defaultTrMinHeight:T},defaultTabWidth:m}=this.options,p=this.getDefaultBasicRowMarginHeight(),L=document.createElement("canvas").getContext("2d"),P=this.listParticle.computeListStyle(L,n),C=[],S=this._collectTextControlValueSet(n);n.length&&C.push({width:0,height:0,ascent:0,elementList:[],startIndex:0,rowIndex:0,rowFlex:n?.[0]?.rowFlex||n?.[1]?.rowFlex});let F=s,N=a,V=0,Y,E=0,W=0;for(let X=0;X<n.length;X++){const O=C[C.length-1],M=n[X];this.clearElementEffect(M);const b=this.getElementRowMargin(M),y={width:0,height:0,boundingBoxAscent:0,boundingBoxDescent:0},D=O.offsetX||M.listId&&P.get(M.listId)||0,U=e-D,Q=O.elementList.length===1;if(F+=Q?D:0,N+=Q&&O.offsetY||0,(M.control?.type===l.ControlType.TEXTFIELD||M.control?.type===l.ControlType.TEXT)&&!this.isDesignMode()&&(M.controlComponent===l.ControlComponent.PRETEXTFIX||M.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||M.controlComponent===l.ControlComponent.POSTTEXTFIX||M.controlComponent===l.ControlComponent.POSTTEXTFIX_TEXT||M.controlComponent===l.ControlComponent.TEXTFIXLABEL||M.controlComponent===l.ControlComponent.PLACEHOLDER||M.controlComponent===l.ControlComponent.PREFIX||M.controlComponent===l.ControlComponent.POSTFIX)){const K=M.control?.type===l.ControlType.TEXTFIELD,v=M.controlId,w=!!v&&!!S?.has(v);K?this.mode===l.EditorMode.EDIT?M.hide=!1:M.hide=!0:this.mode===l.EditorMode.EDIT?M.hide=!1:this.mode===l.EditorMode.FORM?M.controlComponent===l.ControlComponent.PLACEHOLDER||M.controlComponent===l.ControlComponent.TEXTFIXLABEL?M.hide=w:M.hide=!1:M.hide=!0}if(vt(M)&&!this.isDesignMode()){const K=O.elementList[O.elementList.length-1];y.height=K?.metrics.height||this.options.defaultSize*h,y.boundingBoxAscent=K?.metrics.boundingBoxAscent||0,y.boundingBoxDescent=K?.metrics.boundingBoxDescent||0}else if(M.type===l.ElementType.IMAGE||M.type===l.ElementType.LATEX)if(M.imgDisplay===l.ImageDisplay.SURROUND||M.imgDisplay===l.ImageDisplay.FLOAT_TOP||M.imgDisplay===l.ImageDisplay.FLOAT_BOTTOM)y.width=0,y.height=0,y.boundingBoxDescent=0;else{const K=M.width*h,v=M.height*h;if(K>U){const w=v*U/K;M.width=U/h,M.height=w/h,y.width=U,y.height=w,y.boundingBoxDescent=w}else y.width=K,y.height=v,y.boundingBoxDescent=v;if(M.imgCaption?.value){const w=M.imgCaption.size||g.size,Z=M.imgCaption.top??g.top,J=(w+Z)*h;y.boundingBoxAscent+=J}}else if(M.type===l.ElementType.TABLE){const K=M.tdPadding||f;if(M.pagingId){let x=X+1,A=0;for(;x<n.length;){const $=n[x];if($.pagingId===M.pagingId){const B=$.trList.filter(pt=>!pt.pagingRepeat).filter(pt=>(pt.tdList=pt.tdList.filter(Xt=>{if(Xt.originalId){for(let Lt=0;Lt<M.trList.length;Lt++){const yt=M.trList[Lt],Yt=yt.tdList.find(({id:St})=>St===Xt.originalId);if(Yt){Xt.value[0]?.type===l.ElementType.SPLIT_TAG&&Xt.value.splice(0,1),Yt.value.push(...Xt.value.map(St=>this.updateElementTableInfo(St,M,yt,Yt))),Yt.rowspan=Yt.originalRowspan??Yt.rowspan;break}}return!1}return!0}),!pt.originalId));M.trList.push(...B),M.height+=$.height,x++,A++}else break}A&&n.splice(X+1,A)}M.pagingIndex=M.pagingIndex??0,this.tableParticle.computeTrHeight(M,x=>this.computeRowList({innerWidth:(x.width-(K[1]+K[3]))*h,elementList:x.value,isFromTable:!0,isPagingMode:i})),M.trList?.forEach(x=>{x.tdList.forEach(A=>{this.tdMap.set(A.id,A)})});const v=this.tableParticle.getTableHeight(M),w=this.tableParticle.getTableWidth(M);M.width=w,M.height=v;const Z=w*h,J=v*h;if(y.width=Z,y.height=J,y.boundingBoxDescent=J,y.boundingBoxAscent=-b,n[X+1]?.type===l.ElementType.TABLE&&(y.boundingBoxAscent-=b),i){const x=this.getHeight(),A=this.getMainOuterHeight();let $=A;for(let Lt=0;Lt<C.length;Lt++){const yt=C[Lt],Yt=yt.offsetY||0;yt.height+$+Yt>x||C[Lt-1]?.isPageBreak?$=A+yt.height+Yt:$+=yt.height+Yt}const B=b*2,pt=M.trList[0].height*h;($+pt+B>x||M.pagingIndex!==0&&M.trList[0].pagingRepeat||n[X-1]?.type===l.ElementType.PAGE_BREAK)&&($=A);let Xt=x-($+B);if(J>Xt){const Lt=M.trList;let yt=0,Yt=0,St=0;for(let Tt=0;Tt<Lt.length;Tt++){const Pt=Lt[Tt],Ht=Pt.height*h;if($+B+St+Ht>x){const Qt=Pt;let Ve=0;const qt={...at(Qt),id:lt(),originalId:Qt.originalId??Qt.id,minHeight:void 0,tdList:M.colgroup.map((mt,ie)=>{if(Ve--,Ve>0)return;const _t=Qt.tdList.find(Ye=>Ye.colIndex===ie),Bt=_t??this.tableParticle.findPreRowSpanTd(Lt,Tt,ie);_t&&(Ve=_t.colspan);const ze=lt();return Bt.originalRowspan=Bt.rowspan,_t?{..._t,id:ze,originalId:_t.originalId??_t.id,linkTdPrevId:_t.id,tdIndex:ie,original:Bt}:{id:ze,originalId:Bt.originalId??Bt.id,linkTdPrevId:Bt.id,tdIndex:ie,colIndex:ie,colspan:1,rowspan:1,value:[],rowList:[],original:Bt}}).filter(mt=>!!mt)},de=qt.tdList,xt=de.map(mt=>mt.original);xt.forEach((mt,ie)=>{const _t=[];let Bt=Xt;if(mt.rowspan>1){const Ye=Lt.slice(mt.trIndex,mt.trIndex+Tt-mt.trIndex);Bt+=Ye.reduce((Cf,Sf)=>Sf.height*h+Cf,0)}for(;mt.mainHeight*h>Bt&&mt.rowList?.length;){const Ye=mt.rowList.pop();mt.value.splice(mt.value.length-Ye.elementList.length),_t.unshift(Ye),mt.mainHeight-=Ye.height}const ze=de[ie];ze.rowList=_t,ze.value=_t.map(Ye=>Ye.elementList).flat()});let Me=!0;const Xi=Qt.tdList.some(mt=>mt.rowList?.length),wr=qt.tdList.some(mt=>mt.rowList?.length),Ni=Qt.minHeight>Xt;if(wr||Ni){(Xi||!wr&&Ni)&&(Ni&&(Qt.originalMinHeight=Qt.minHeight,Qt.minHeight=Xt,qt.minHeight=Math.max(Qt.originalMinHeight-Xt,T)),qt.tdList.forEach(mt=>{mt.original.linkTdNextId=mt.id,mt.value.length&&mt.value[0].value!==_&&mt.value.unshift({...mt.original.value.slice(-1).pop(),value:_,type:l.ElementType.SPLIT_TAG})}),Lt.splice(yt+1,0,qt),yt+=1,Yt=Lt.length-yt,Me=!1),xt.forEach(mt=>{if(mt.rowspan>1){const ie=mt.rowspan-(Tt-mt.trIndex);mt.rowspan=Tt-mt.trIndex+(Xi?1:0);const _t=qt.tdList.find(Bt=>Bt.colIndex===mt.colIndex);Xi?_t.rowspan=ie:(_t.original.linkTdNextId=_t.id,Qt.tdList.push({...mt,..._t,rowspan:ie}),Qt.tdList.sort((Bt,ze)=>Bt.colIndex-ze.colIndex),_t.value=[])}}),Me&&xt.forEach((mt,ie)=>{mt.value.push(...de[ie].value)});break}}yt=Tt+1,Yt=Lt.length-yt,St+=Ht,Xt-=Ht}if(Yt){const Tt=Lt.splice(yt,Yt),Pt=M.pagingId||lt();M.pagingId=Pt;const Ht=at(M);Ht.originalId=M.originalId??M.id,Ht.pagingId=Pt,Ht.pagingIndex=M.pagingIndex+1;const Qt=Lt.filter(de=>de.pagingRepeat);if(Qt.length){const de=at(Qt);de.forEach(xt=>xt.id=lt()),Tt.unshift(...de)}Ht.trList=Tt,Ht.id=lt(),Ht.trList?.forEach(de=>{de.tdList.forEach(xt=>{if(delete xt.valueStartIndex,xt.linkTdPrevId){const Me=this.getTdById(xt.linkTdPrevId);xt.valueStartIndex=Me?(Me.valueStartIndex??0)+Me.value.length:0,this.splitTdValueMap.has(xt.originalId)?this.splitTdValueMap.get(xt.originalId).push(...xt.value):Me&&this.splitTdValueMap.set(xt.originalId,[...Me.value,...xt.value])}xt.value.forEach(Me=>this.updateElementTableInfo(Me,Ht,de,xt))})}),this.spliceElementList(n,X+1,0,[Ht]),this.tableParticle.computeTrHeight(M);const Ve=this.tableParticle.getTableHeight(M),qt=Ve*h;M.height=Ve,y.height=qt,y.boundingBoxDescent=qt}}if(M.pagingId){const Lt=this.position.getPositionContext();if(Lt.isTable){let yt=-1,Yt=-1,St=X;for(;St<n.length;){const Tt=n[St];if(Tt.pagingId!==M.pagingId)break;const Pt=Tt.trList.findIndex(Ht=>Ht.id===Lt.trId);if(~Pt){yt=St,Yt=Pt;break}St++}~yt&&(Lt.index=yt,Lt.trIndex=Yt,this.position.setPositionContext(Lt))}}}this.initTableElementIndex(M,X)}else if(M.type===l.ElementType.SEPARATOR){const{separator:{lineWidth:K}}=this.options,v=M.lineWidth||K;M.width=U/h,y.width=U,y.height=v*h,y.boundingBoxAscent=-b,y.boundingBoxDescent=-b+y.height}else if(M.type===l.ElementType.PAGE_BREAK)M.width=U/h,y.width=U,y.height=R;else if(M.type===l.ElementType.RADIO||M.controlComponent===l.ControlComponent.RADIO){const{width:K,height:v,gap:w}=this.options.radio,Z=K+w*2;M.width=Z,y.width=Z*h,y.height=v*h}else if(M.type===l.ElementType.CHECKBOX||M.controlComponent===l.ControlComponent.CHECKBOX){const{width:K,height:v,gap:w}=this.options.checkbox,Z=K+w*2;M.width=Z,y.width=Z*h,y.height=v*h}else if(M.type===l.ElementType.MENSTRUAL_HISTORY){const K=this.menstrualHistoryParticle.computeSize(M);M.width=K.width/h,y.width=K.width,y.height=K.height,y.boundingBoxAscent=K.height,y.boundingBoxDescent=0}else if(M.type===l.ElementType.FETAL_HEART_POSITION){const K=this.fetalHeartPositionParticle.computeSize();M.width=K.width/h,y.width=K.width,y.height=K.height,y.boundingBoxAscent=K.height/2,y.boundingBoxDescent=K.height/2}else if(M.type===l.ElementType.TOOTH_POSITION){const K=this.toothPositionParticle.computeSize(M);M.width=K.width/h,y.width=K.width,y.height=K.height,y.boundingBoxAscent=K.height/2,y.boundingBoxDescent=K.height/2}else if(M.type===l.ElementType.TAB)y.width=m*h,y.height=R*h,y.boundingBoxDescent=0,y.boundingBoxAscent=this.textParticle.getBasisWordBoundingBoxAscent(L,L.font);else if(M.type===l.ElementType.BLOCK){if(!M.width)y.width=U;else{const K=M.width*h;y.width=Math.min(K,U)}y.height=M.height*h,y.boundingBoxDescent=y.height,y.boundingBoxAscent=0}else if(M.type===l.ElementType.LABEL){const{defaultSize:K,label:{defaultPadding:v}}=this.options;L.font=this.getElementFont(M);const w=this.textParticle.measureText(L,M);y.width=(w.width+v[1]+v[3])*h,y.height=(M.size||K)*h,y.boundingBoxDescent=0,y.boundingBoxAscent=(v[0]+w.actualBoundingBoxAscent)*h}else if(M.type===l.ElementType.MACRO||M.type===l.ElementType.CUSTOM_MACRO||M.type===l.ElementType.REUSABLE_ITEM||M.type===l.ElementType.SUB_TEMPLATE){const{defaultSize:K}=this.options;L.font=this.getElementFont(M);const v=this.getMode(),w=v===l.EditorMode.EDIT,Z=v===l.EditorMode.FORM;if(w){const J=M.label||M.value||"";L.font=this.getElementFont(M);const x=L.measureText(J),A=8*h,$=4*h;y.width=x.width+A*2;const B=x.actualBoundingBoxAscent+x.actualBoundingBoxDescent;y.height=B+$*2;const pt=this.textParticle.measureBasisWord(L,this.getElementFont(M));y.boundingBoxAscent=pt.actualBoundingBoxAscent*h,y.boundingBoxDescent=pt.actualBoundingBoxDescent*h}else if(M.type===l.ElementType.CUSTOM_MACRO){const J=M.macroConfig,x=J?.value||"";if(Z){const A=J?.type||"text",$=this.textParticle.measureText(L,M),B=M.label||"";if(A==="select"){const pt=x||`请选择${B}`,Xt=L.measureText(pt),Lt=L.measureText("[").width,yt=6*h+2*h;y.width=Lt+Xt.width+yt+Lt}else{const pt=x||`请输入${B}`,Xt=L.measureText(pt),Lt=L.measureText("[").width;y.width=Lt+Xt.width+Lt}y.height=(M.size||K)*h,y.boundingBoxDescent=$.actualBoundingBoxDescent*h,y.boundingBoxAscent=$.actualBoundingBoxAscent*h}else{const A=M.label||"",$=x||`请输入${A}`,B=L.measureText($);y.width=B.width,y.height=(M.size||K)*h,y.boundingBoxDescent=B.actualBoundingBoxDescent,y.boundingBoxAscent=B.actualBoundingBoxAscent}}else if(M.type===l.ElementType.REUSABLE_ITEM){const x=M.reusableItemConfig?.value||"",A=M.label||"";if(Z){const $=this.textParticle.measureText(L,M),B=x||`获取 ${A}`,pt=L.measureText(B),Xt=L.measureText("[").width;y.width=Xt+pt.width+Xt,y.height=(M.size||K)*h,y.boundingBoxDescent=$.actualBoundingBoxDescent*h,y.boundingBoxAscent=$.actualBoundingBoxAscent*h}else{const $=x||`获取 ${A}`,B=L.measureText($);y.width=B.width,y.height=(M.size||K)*h,y.boundingBoxDescent=B.actualBoundingBoxDescent,y.boundingBoxAscent=B.actualBoundingBoxAscent}}else if(M.type===l.ElementType.SUB_TEMPLATE){const J=M.label||"子模板";if(Z){const x=L.measureText(J),A=8*h,$=4*h,B=x.actualBoundingBoxAscent+x.actualBoundingBoxDescent;y.width=x.width+A*2,y.height=B+$*2;const pt=this.textParticle.measureBasisWord(L,this.getElementFont(M));y.boundingBoxAscent=pt.actualBoundingBoxAscent*h,y.boundingBoxDescent=pt.actualBoundingBoxDescent*h}else{const x=L.measureText(J);y.width=x.width,y.height=(M.size||K)*h,y.boundingBoxDescent=x.actualBoundingBoxDescent,y.boundingBoxAscent=x.actualBoundingBoxAscent}}else{const J=M.label||"",x=M.value||`获取 ${J}`,A=L.measureText(x);y.width=A.width,y.height=(M.size||K)*h,y.boundingBoxDescent=A.actualBoundingBoxDescent,y.boundingBoxAscent=A.actualBoundingBoxAscent}}else{const K=M.size||R;(M.type===l.ElementType.SUPERSCRIPT||M.type===l.ElementType.SUBSCRIPT)&&(M.actualSize=Math.ceil(K*.6)),y.height=(M.actualSize||K)*h,L.font=this.getElementFont(M);const v=this.textParticle.measureText(L,M);y.width=v.width*h,M.letterSpacing&&(y.width+=M.letterSpacing*h);const w=this.textParticle.measureBasisWord(L,M.font);y.boundingBoxAscent=w.actualBoundingBoxAscent*h,y.boundingBoxDescent=w.actualBoundingBoxDescent*h,M.type===l.ElementType.SUPERSCRIPT?y.boundingBoxAscent+=y.height/2:M.type===l.ElementType.SUBSCRIPT&&(y.boundingBoxDescent+=y.height/2)}const G=!vt(M)&&(M.imgDisplay!==l.ImageDisplay.INLINE&&M.type===l.ElementType.IMAGE||M.type===l.ElementType.LATEX)?y.height+b:y.boundingBoxAscent+b,H=b+y.boundingBoxAscent+y.boundingBoxDescent+b,tt=Object.assign(M,{metrics:y,left:0,style:this.getElementFont(M,h)});tt.control?.minWidth&&(tt.controlComponent&&(W+=y.width),tt.controlComponent===l.ControlComponent.POSTFIX&&(this.control.setMinWidthControlInfo({row:O,rowElement:tt,availableWidth:U,controlRealWidth:W}),W=0));const st=n[X-1];let et=n[X+1],nt=O.width+y.width;if(this.options.wordBreak===l.WordBreak.BREAK_WORD&&(!st?.type||st?.type===l.ElementType.TEXT)&&(!M.type||M.type===l.ElementType.TEXT)){const K=`${st?.value||""}${M.value}`;if(this.WORD_LIKE_REG.test(K)){const{width:w,endElement:Z}=this.textParticle.measureWord(L,n,X),J=w*h;Z&&J<=U?(nt+=J,et=Z):st&&(nt+=J)}const v=this.textParticle.measurePunctuationWidth(L,et);nt+=v*h}M.listId&&(M.listId!==Y?E=0:M.value===_&&!M.listWrap&&E++),Y=M.listId;const q=this.position.setSurroundPosition({pageNo:V,rowElement:tt,row:O,rowElementRect:{x:F,y:N,height:H,width:y.width},availableWidth:U,surroundElementList:u});F=q.x,nt+=q.rowIncreaseWidth,F+=y.width;let dt=!1;if(this.mode===l.EditorMode.FORM&&M.control?.type===l.ControlType.BUTTON&&M.controlComponent===l.ControlComponent.PREFIX&&O.elementList.filter(K=>K.controlId!==M.controlId).length>0){const K=M.controlId;if(n.some(w=>w.controlId===`${K}_text`&&w.control?.type===l.ControlType.BUTTON)){let w=0;for(let Z=X;Z<n.length;Z++){const J=n[Z];if(J.controlId!==K)break;L.font=this.getElementFont(J);const x=this.textParticle.measureText(L,J);if(w+=x.width*h,J.controlComponent===l.ControlComponent.POSTFIX)break}for(let Z=0;Z<n.length;Z++){const J=n[Z];if(J.controlId===`${K}_text`){L.font=this.getElementFont(J);const x=this.textParticle.measureText(L,J);w+=x.width*h}}dt=O.width+w>U}}const ot=M.type===l.ElementType.SEPARATOR||M.type===l.ElementType.TABLE||st?.type===l.ElementType.TABLE||st?.type===l.ElementType.BLOCK||M.type===l.ElementType.BLOCK||st?.imgDisplay===l.ImageDisplay.INLINE||M.imgDisplay===l.ImageDisplay.INLINE||st?.listId!==M.listId||st?.areaId!==M.areaId&&!M.area?.hide||M.control?.flexDirection===l.FlexDirection.COLUMN&&(M.controlComponent===l.ControlComponent.CHECKBOX||M.controlComponent===l.ControlComponent.RADIO)&&st?.controlComponent===l.ControlComponent.VALUE||X!==0&&M.value===_&&!M.area?.hide||dt,ut=nt>U,ht=ot||ut;if(ht){const K={width:y.width,height:H,startIndex:X,elementList:[tt],ascent:G,rowIndex:O.rowIndex+1,rowFlex:n[X]?.rowFlex||n[X+1]?.rowFlex,isPageBreak:M.type===l.ElementType.PAGE_BREAK};if(tt.controlComponent!==l.ControlComponent.PREFIX&&tt.control?.indentation===l.ControlIndentation.VALUE_START){const v=O.elementList.findIndex(w=>w.controlId===tt.controlId&&w.controlComponent!==l.ControlComponent.PREFIX);if(~v){const Z=this.position.computeRowPosition({row:O,innerWidth:this.getInnerWidth()})[v];Z&&(K.offsetX=Z.coordinate.leftTop[0])}}M.listId&&(K.isList=!0,K.offsetX=P.get(M.listId),K.listIndex=E),K.offsetY=!r&&M.area?.top&&M.areaId!==n[X-1]?.areaId?M.area.top*h:0,C.push(K)}else O.width+=y.width,X===0&&(sn(n[1])||n[1]?.areaId)?(O.height=p,O.ascent=p):O.height<H&&(O.height=H,O.ascent=G),O.elementList.push(tt);if((ht||X===n.length-1)&&(O.isWidthNotEnough=ut&&!ot,!O.isSurround&&(st?.rowFlex===l.RowFlex.JUSTIFY||st?.rowFlex===l.RowFlex.ALIGNMENT&&O.isWidthNotEnough))){const K=O.elementList[0]?.value===_?O.elementList.slice(1):O.elementList,v=(U-O.width)/(K.length-1);for(let w=0;w<K.length-1;w++){const Z=K[w];Z.metrics.width+=v}O.width=U}if(ht){F=s,N+=O.height,i&&!r&&c&&(N-a+d+H>c||M.type===l.ElementType.PAGE_BREAK)&&(N=a,oa(u,V),V+=1),tt.left=0;const K=C[C.length-1];F=this.position.setSurroundPosition({pageNo:V,rowElement:tt,row:K,rowElementRect:{x:F,y:N,height:H,width:y.width},availableWidth:U,surroundElementList:u}).x,F+=y.width}}return C}_collectTextControlValueSet(t){if(this.isDesignMode()||this.mode===l.EditorMode.EDIT)return null;const e=new Set;for(let i=0;i<t.length;i++){const r=t[i];r.controlId&&(r.control?.type===l.ControlType.TEXT||r.control?.type===l.ControlType.TEXTFIELD)&&e.add(r.controlId)}const n=new Set;for(let i=0;i<t.length;i++){const r=t[i];r.controlId&&r.controlComponent===l.ControlComponent.VALUE&&e.has(r.controlId)&&n.add(r.controlId)}return n}_computePageList(){const t=[[]],{pageMode:e,pageNumber:{maxPageNo:n}}=this.options,i=this.getHeight(),r=this.getMainOuterHeight();let s=r,a=0;if(e===l.PageMode.CONTINUITY){t[0]=this.rowList,s+=this.rowList.reduce((R,h)=>R+h.height+(h.offsetY||0),0);const c=this.getPagePixelRatio(),d=this.pageList[0],u=Number(d.style.height.replace("px",""));if(s>u)d.style.height=`${s}px`,d.height=s*c;else{const R=s<i?i:s;d.style.height=`${R}px`,d.height=R*c}this._initPageContext(this.ctxList[0])}else for(let c=0;c<this.rowList.length;c++){const d=this.rowList[c],u=d.offsetY||0;if(d.height+u+s>i||this.rowList[c-1]?.isPageBreak){if(Number.isInteger(n)&&a>=n){this.elementList=this.elementList.slice(0,d.startIndex);break}s=r+d.height+u,t.push([d]),a++}else s+=d.height+u,t[a].push(d)}return t}_drawHighlight(t,e){const{rowList:n,positionList:i,elementList:r}=e,s=this.getDefaultBasicRowMarginHeight(),a=this.getHighlightMarginHeight();for(let c=0;c<n.length;c++){const d=n[c];for(let u=0;u<d.elementList.length;u++){const R=d.elementList[u],h=d.elementList[u-1],g=R.highlight||this.control.getControlHighlight(r,d.startIndex+u);if(g){h&&h.highlight&&h.highlight!==R.highlight&&this.highlight.render(t);const{coordinate:{leftTop:[f,T]}}=i[d.startIndex+u],m=R.left||0;this.highlight.recordFillInfo(t,f-m,T+s-a,R.metrics.width+m,d.height-2*s+2*a,g)}else h?.highlight&&this.highlight.render(t)}this.highlight.render(t)}}validateNumber(t){return/^\d+$/.test(t)}drawRow(t,e){this._drawHighlight(t,e);const{scale:n,table:{tdPadding:i},group:r,lineBreak:s,whiteSpace:a}=this.options,{rowList:c,pageNo:d,elementList:u,positionList:R,startIndex:h,zone:g,isDrawLineBreak:f=!s.disabled,td:T,isDrawWhiteSpace:m=!a.disabled}=e,p=this.isPrintMode(),I=this.isGraffitiMode(),{isCrossRowCol:L,tableId:P}=this.range.getRange();let C=h;for(let S=0;S<c.length;S++){const F=c[S],N={x:0,y:0,width:0,height:0};let V=null;for(let Y=0;Y<F.elementList.length;Y++){const E=F.elementList[Y],W=E.metrics,{ascent:X,coordinate:{leftTop:[O,M]}}=R[F.startIndex+Y],b=F.elementList[Y-1];if(vt(E)&&!this.isDesignMode())this.textParticle.complete();else if(E.type===l.ElementType.IMAGE)this.textParticle.complete(),E.imgDisplay!==l.ImageDisplay.SURROUND&&E.imgDisplay!==l.ImageDisplay.FLOAT_TOP&&E.imgDisplay!==l.ImageDisplay.FLOAT_BOTTOM&&this.imageParticle.render(t,E,O,M+X);else if(E.type===l.ElementType.LATEX)this.textParticle.complete(),this.laTexParticle.render(t,E,O,M+X);else if(E.type===l.ElementType.TABLE)L&&(N.x=O,N.y=M,V=E),this.tableParticle.render(t,E,O,M);else if(E.type===l.ElementType.HYPERLINK)this.textParticle.complete(),this.hyperlinkParticle.render(t,E,O,M+X);else if(E.type===l.ElementType.LABEL)this.textParticle.complete(),this.labelParticle.render(t,E,O,M+X);else if(E.type===l.ElementType.MACRO||E.type===l.ElementType.CUSTOM_MACRO||E.type===l.ElementType.REUSABLE_ITEM||E.type===l.ElementType.SUB_TEMPLATE)this.textParticle.complete(),this.macroParticle.render(t,E,O,M+X);else if(E.type===l.ElementType.DATE){const H=F.elementList[Y+1];(!b||b.dateId!==E.dateId)&&this.textParticle.complete(),this.textParticle.record(t,E,O,M+X),(!H||H.dateId!==E.dateId)&&this.textParticle.complete()}else E.type===l.ElementType.SUPERSCRIPT?(this.textParticle.complete(),this.superscriptParticle.render(t,E,O,M+X)):E.type===l.ElementType.SUBSCRIPT?(this.underline.render(t),this.textParticle.complete(),this.subscriptParticle.render(t,E,O,M+X)):E.type===l.ElementType.SEPARATOR?this.separatorParticle.render(t,E,O,M):E.type===l.ElementType.PAGE_BREAK?this.mode!==l.EditorMode.CLEAN&&!p&&this.pageBreakParticle.render(t,E,O,M):E.type===l.ElementType.CHECKBOX||E.controlComponent===l.ControlComponent.CHECKBOX?(this.textParticle.complete(),this.checkboxParticle.render({ctx:t,x:O,y:M+X,index:Y,row:F})):E.type===l.ElementType.RADIO||E.controlComponent===l.ControlComponent.RADIO?(this.textParticle.complete(),this.radioParticle.render({ctx:t,x:O,y:M+X,index:Y,row:F})):E.type===l.ElementType.MENSTRUAL_HISTORY?(this.textParticle.complete(),this.menstrualHistoryParticle.render({ctx:t,x:O,y:M+X,index:Y,row:F,element:E})):E.type===l.ElementType.FETAL_HEART_POSITION?(this.textParticle.complete(),this.fetalHeartPositionParticle.render({ctx:t,x:O,y:M+X,index:Y,row:F,element:E})):E.type===l.ElementType.TOOTH_POSITION?(this.textParticle.complete(),this.toothPositionParticle.render({ctx:t,x:O,y:M+X,index:Y,row:F,element:E})):E.type===l.ElementType.TAB?this.textParticle.complete():E.rowFlex===l.RowFlex.ALIGNMENT||E.rowFlex===l.RowFlex.JUSTIFY?(this.textParticle.record(t,E,O,M+X),this.textParticle.complete()):E.type===l.ElementType.BLOCK?(this.textParticle.complete(),this.blockParticle.render(t,d,E,O,M+X)):(E.left&&this.textParticle.complete(),this.textParticle.record(t,E,O,M+X),(E.width||E.letterSpacing||_r.test(E.value))&&this.textParticle.complete());if(f&&!p&&this.mode!==l.EditorMode.CLEAN&&!F.isWidthNotEnough&&Y===F.elementList.length-1&&this.lineBreakParticle.render(t,E,O,M+F.height/2),m&&Gr.test(E.value)&&this.whiteSpaceParticle.render(t,E,O,M+F.height/2),E.control?.border){b?.control?.border&&b.controlId!==E.controlId&&this.control.drawBorder(t);const H=this.getElementRowMargin(E);this.control.recordBorderInfo(O,M+H,E.metrics.width,F.height-2*H)}else b?.control?.border&&this.control.drawBorder(t);if(E.control?.type===l.ControlType.TEXT){const H=E.controlComponent===l.ControlComponent.VALUE,tt=E.controlComponent===l.ControlComponent.POSTFIX||E.controlComponent===l.ControlComponent.POST_TEXT;H&&E.control?.underline&&((!b||b.controlId!==E.controlId||b.controlComponent!==l.ControlComponent.VALUE&&b.controlComponent!==l.ControlComponent.PLACEHOLDER)&&this.control.startTextFieldUnderline(E.controlId,O,M+F.height),this.control.recordTextFieldUnderlineWidth(E.metrics.width)),tt&&this.control.drawTextFieldUnderline(t)}else b?.control?.type===l.ControlType.TEXT&&this.control.drawTextFieldUnderline(t);if((E.underline||E.control?.underline)&&E.controlComponent!==l.ControlComponent.PLACEHOLDER&&!(E.control?.type===l.ControlType.TEXT&&E.control?.underline)){b?.type===l.ElementType.SUBSCRIPT&&E.type!==l.ElementType.SUBSCRIPT&&this.underline.render(t);const H=this.getElementRowMargin(E),tt=E.left||0;let st=0;E.type===l.ElementType.SUBSCRIPT&&(st=this.subscriptParticle.getOffsetY(E));const et=E.control?.underline?this.options.underlineColor:E.color;this.underline.recordFillInfo(t,O-tt,M+F.height-H+st,W.width+tt,0,et,E.textDecoration?.style)}else(b?.underline||b?.control?.underline)&&(b?.control?.type===l.ControlType.TEXT&&b?.control?.underline||this.underline.render(t));if(E.strikeout){if(!E.type||zt.includes(E.type)){b&&(b.type===l.ElementType.SUBSCRIPT&&E.type!==l.ElementType.SUBSCRIPT||b.type===l.ElementType.SUPERSCRIPT&&E.type!==l.ElementType.SUPERSCRIPT||this.getElementSize(b)!==this.getElementSize(E))&&this.strikeout.render(t);const H=this.textParticle.measureBasisWord(t,this.getElementFont(E));let tt=M+X+H.actualBoundingBoxDescent*n-W.height/2;E.type===l.ElementType.SUBSCRIPT?tt+=this.subscriptParticle.getOffsetY(E):E.type===l.ElementType.SUPERSCRIPT&&(tt+=this.superscriptParticle.getOffsetY(E)),this.strikeout.recordFillInfo(t,O,tt,W.width)}}else b?.strikeout&&this.strikeout.render(t);const{zone:y,splitTdRange:D}=this.range.getRange();let{startIndex:U,endIndex:Q}=this.range.getRange(),G=!1;if(T&&D&&[T.originalId,T.id].includes(D.originalId)&&(G=!0,U=D.startIndex-(T.valueStartIndex??0),Q=D.endIndex-(T.valueStartIndex??0)),y===g&&U!==Q&&U<=C&&C<=Q){const H=this.position.getPositionContext();if(!H.isTable&&!E.tdId||H.tdId===E.tdId||G)if(U===C){const tt=u[U+1];tt&&tt.value===_&&(N.x=O+W.width,N.y=M,N.height=F.height,N.width+=this.options.rangeMinWidth)}else{let tt=W.width;tt===0&&F.elementList.length===1&&(tt=this.options.rangeMinWidth),N.width||(N.x=O,N.y=M,N.height=F.height),N.width+=tt}}if(!r.disabled&&E.groupIds&&this.group.recordFillInfo(E,O,M,W.width,F.height),C++,E.type===l.ElementType.TABLE&&!vt(E)){const H=E.tdPadding||i,tt=H[1]+H[3];for(let st=0;st<E.trList.length;st++){const et=E.trList[st];for(let nt=0;nt<et.tdList.length;nt++){const q=et.tdList[nt];this.drawRow(t,{elementList:q.value,positionList:q.positionList,rowList:q.rowList,pageNo:d,startIndex:0,innerWidth:(q.width-tt)*n,zone:g,isDrawLineBreak:f,td:q})}}}}if(F.isList&&this.listParticle.drawListStyle(t,F,R[F.startIndex]),this.textParticle.complete(),this.control.drawBorder(t),this.underline.render(t),this.strikeout.render(t),this.group.render(t),!p&&!I){if(N.width&&N.height){const{x:Y,y:E,width:W,height:X}=N;this.range.render(t,Y,E,W,X)}if(L&&V&&V.id===P){const{coordinate:{leftTop:[Y,E]}}=R[F.startIndex];this.tableParticle.drawRange(t,V,Y,E)}}}}_drawFloat(t,e){const{scale:n}=this.options,i=this.position.getFloatPositionList(),{imgDisplays:r,pageNo:s}=e;for(let a=0;a<i.length;a++){const c=i[a],d=c.element;if((s===c.pageNo||c.zone===l.EditorZone.HEADER||c.zone==l.EditorZone.FOOTER)&&d.imgDisplay&&r.includes(d.imgDisplay)&&d.type===l.ElementType.IMAGE){const u=d.imgFloatPosition;this.imageParticle.render(t,d,u.x*n,u.y*n)}}}_clearPage(t){const e=this.ctxList[t],n=this.pageList[t];e.clearRect(0,0,Math.max(n.width,this.getWidth()),Math.max(n.height,this.getHeight())),this.blockParticle.clear()}_drawPage(t){const{elementList:e,positionList:n,rowList:i,pageNo:r}=t,{inactiveAlpha:s,pageMode:a,header:c,footer:d,pageNumber:u,lineNumber:R,pageBorder:h}=this.options,g=this.mode===l.EditorMode.PRINT,f=this.getInnerWidth(),T=this.ctxList[r];T.globalAlpha=this.zone.isMainActive()?1:s,this._clearPage(r),(!g||!this.options.modeRule[l.EditorMode.PRINT]?.backgroundDisabled)&&this.background.render(T,r),g||this.area.render(T,r),a!==l.PageMode.CONTINUITY&&this.options.watermark.data&&this.waterMark.render(T,r),g||this.margin.render(T,r),this._drawFloat(T,{pageNo:r,imgDisplays:[l.ImageDisplay.FLOAT_BOTTOM]}),g||this.control.renderHighlightList(T,r);const m=i[0]?.startIndex;this.drawRow(T,{elementList:e,positionList:n,rowList:i,pageNo:r,startIndex:m,innerWidth:f,zone:l.EditorZone.MAIN}),this.getIsPagingMode()&&(c.disabled||this.header.render(T,r),u.disabled||this.pageNumber.render(T,r),d.disabled||this.footer.render(T,r)),this._drawFloat(T,{pageNo:r,imgDisplays:[l.ImageDisplay.FLOAT_TOP,l.ImageDisplay.SURROUND]}),!g&&this.search.getSearchKeyword()&&this.search.render(T,r),this.elementList.length<=1&&!this.elementList[0]?.listId&&this.placeholder.render(T),R.disabled||this.lineNumber.render(T,r),h.disabled||this.pageBorder.render(T),this.badge.render(T,r),this.isGraffitiMode()&&this.graffiti.render(T,r)}_disconnectLazyRender(){this.lazyRenderIntersectionObserver?.disconnect()}_lazyRender(){const t=this.position.getOriginalMainPositionList(),e=this.getOriginalMainElementList();this._disconnectLazyRender(),this.lazyRenderIntersectionObserver=new IntersectionObserver(n=>{n.forEach(i=>{if(i.isIntersecting){const r=Number(i.target.dataset.index);this._drawPage({elementList:e,positionList:t,rowList:this.pageRowList[r],pageNo:r})}})}),this.pageList.forEach(n=>{this.lazyRenderIntersectionObserver.observe(n)})}_immediateRender(){const t=this.position.getOriginalMainPositionList(),e=this.getOriginalMainElementList();for(let n=0;n<this.pageRowList.length;n++)this._drawPage({elementList:e,positionList:t,rowList:this.pageRowList[n],pageNo:n})}render(t){const e=Vt(),n=[],i=(O,M)=>{n.push({label:O,duration:Vt()-M})};this.renderCount++;const r=this.mode===l.EditorMode.EDIT||this.mode===l.EditorMode.FORM||this.mode===l.EditorMode.PRINT?Eh([...this.getHeaderElementList(),...this.elementList,...this.getFooterElementList()]):null,s=this.applySubTemplateRuntimeState(this.getHeaderElementList(),r)||this.applySubTemplateRuntimeState(this.elementList,r)||this.applySubTemplateRuntimeState(this.getFooterElementList(),r);let{endIndex:a}=this.range.getRange();const{isCrossRowCol:c}=this.range.getRange();if(!c&&~a){const O=this.getElementList(),M=O[a],y=M?.type===l.ElementType.SUB_TEMPLATE&&M.subTemplateExpanded?l.LocationPosition.AFTER:l.LocationPosition.BEFORE,D=Ge(O,a,y);D!==a&&!vt(O[D])&&(this.range.setRange(D,D),a=D)}let d;const u=this.position.getPositionContext();if(c)d=this.getOriginalElementList()[u.index];else{const O=~a?a:0,M=this.getElementList();d=en(M,O)}const{header:R,footer:h}=this.options,{isSubmitHistory:g=!0,isSetCursor:f=!0,isLazy:T=!0,isInit:m=!1,isSourceHistory:p=!1,isFirstRender:I=!1,isDel:L=!1}=t||{};let{isCompute:P=!0}=t||{};s&&(P=!0);let{curIndex:C}=t||{};const{traceLabel:S}=t||{},F=this.getInnerWidth(),N=this.getIsPagingMode(),V=this.pageRowList.length;if(P){if(this.splitTdValueMap.clear(),this.tdMap.clear(),this.position.setFloatPositionList([]),N){if(!R.disabled){const et=Vt();this.header.compute(),i("header.compute",et)}if(!h.disabled){const et=Vt();this.footer.compute(),i("footer.compute",et)}}const O=this.getMargins(),M=this.getHeight(),b=this.header.getExtraHeight(),y=this.getMainOuterHeight(),D=O[3],U=O[0]+b,Q=Zo(this.elementList),G=Vt();this.rowList=this.computeRowList({startX:D,startY:U,pageHeight:M,mainOuterHeight:y,isPagingMode:N,innerWidth:F,surroundElementList:Q,elementList:this.elementList}),i("computeRowList",G);const H=Vt();this.pageRowList=this._computePageList(),i("computePageList",H);const tt=Vt();this.position.computePositionList(),i("computePositionList",tt);const st=Vt();if(this.area.compute(),i("area.compute",st),!this.isPrintMode()){const et=this.search.getSearchKeyword();if(et){const q=Vt();this.search.compute(et),i("search.compute",q)}const nt=Vt();this.control.computeHighlightList(),i("control.computeHighlightList",nt)}if(this.isGraffitiMode()){const et=Vt();this.graffiti.compute(),i("graffiti.compute",et)}}this.imageObserver.clearAll(),this.cursor.recoveryCursor();for(let O=0;O<this.pageRowList.length;O++)this.pageList[O]||this._createPage(O);const Y=this.pageRowList.length,E=this.pageList.length;if(E>Y){const O=E-Y;this.ctxList.splice(Y,O),this.pageList.splice(Y,O).forEach(M=>M.remove())}const W=Vt();if(T&&N?this._lazyRender():this._immediateRender(),i(T&&N?"lazyRender":"immediateRender",W),f){if(P&&d?.tableId){const{index:O}=u,b=this.getOriginalElementList()[O];if(d.tableId!==b?.id){const D=this.findTableChildrenElement(!0,d.tableId,d);D&&u.index!==D.originalIndex&&(u.index=D.originalIndex,u.tableId=D.table.id,u.trIndex=D.trIndex,u.trId=D.tr.id,u.tdIndex=D.tdIndex,u.tdId=D.td.id,C=D.elementIndex,this.position.setPositionContext(u),this.range.setRange(C,C),this.updateTableTool())}const y=this.getElementList();y[a]!==d&&(C=y.findIndex(D=>D===d))}C=this.setCursor(C)}else this.range.getIsSelection()&&this.cursor.focus();if(L){let O;const M=this.position.getPositionContext();O=this.range.getRange().startIndex-1,M.index=O}(g&&!I||C!==void 0&&this.historyManager.isStackEmpty())&&this.submitHistory(C);const X=Vt();Co(()=>{const O=Vt();this.range.setRangeStyle(),P&&this.control.getActiveControl()&&this.control.reAwakeControl(),P&&!this.isReadonly()&&this.getMode()!==l.EditorMode.FORM&&u.isTable&&this.getOriginalElementList()[u.index].type===l.ElementType.TABLE&&this.tableTool.render(),P&&!this.zone.isMainActive()&&this.zone.drawZoneIndicator(),V!==this.pageRowList.length&&(this.listener.pageSizeChange&&this.listener.pageSizeChange(this.pageRowList.length),this.eventBus.isSubscribe("pageSizeChange")&&this.eventBus.emit("pageSizeChange",this.pageRowList.length)),(g||p)&&!m&&(this.listener.contentChange&&this.listener.contentChange(),this.eventBus.isSubscribe("contentChange")&&this.eventBus.emit("contentChange"));const M=Vt();So(this.options,S||"render",M-e,[...n,{label:"nextTick.wait",duration:O-X},{label:"nextTick.callback",duration:M-O}],{isCompute:P,pageCount:this.pageRowList.length})}),f&&this.fixPosition()}fixPosition(t=!1){let e;const n=this.position.getPositionContext();if(n.isTable){const i=this.getElementList(),r=this.range.getRange().startIndex;if(t||r>=i.length){const s=this.getTd(),a=n.index+(t?-1:1),d=this.getOriginalElementList()[a];if(!d?.trList)return;e=r-i.length;for(let u=0;u<d.trList.length;u++){const R=d.trList[u],h=R.tdList.find(g=>t?s?.linkTdPrevId===g.id:s?.id===g.linkTdPrevId);if(h){n.index=a,n.trIndex=u,n.tableId=d.id,n.trId=R.id,n.tdId=h?.id,e=t?h.value.length-1:e+(h.value[0]?.type===l.ElementType.SPLIT_TAG?1:0);break}}if(this.position.setPositionContext(n),this.range.setRange(e,e),this.setCursor(e),e===0)return this.fixPosition(t);this.updateTableTool()}}return e}setCursor(t){const e=this.position.getPositionContext(),n=this.position.getPositionList(),i=this.getElementList();if(e.isTable){const{index:s,trIndex:a,tdIndex:c}=e,u=this.getOriginalElementList()[s].trList?.[a].tdList[c].positionList;t===void 0&&u&&(t=u.length-1);const R=u?.[t];this.position.setCursorPosition(R||null)}else t!==void 0&&t>=n.length&&(t=n.length-1),this.position.setCursorPosition(t!==void 0&&t>=0?n[t]:null);let r=!0;if(t!==void 0&&e.isImage&&e.isDirectHit){const s=i[t];if(s&&ul.includes(s.type)){r=!1;const a=this.position.getCursorPosition();this.previewer.updateResizer(s,a)}}return this.cursor.drawCursor({isShow:r}),t}submitHistory(t){const e=this.position.getPositionContext(),n=wo(this.elementList),i=wo(this.header.getElementList()),r=wo(this.footer.getElementList()),s=at(this.range.getRange()),a=this.pageNo,c=at(e),d=this.zone.getZone();this.historyManager.execute(()=>{this.zone.setZone(d),this.setPageNo(a),this.position.setPositionContext(at(c)),this.header.setElementList(at(i)),this.footer.setElementList(at(r)),this.elementList=at(n),this.range.replaceRange(at(s)),this.render({curIndex:t,isSubmitHistory:!1,isSourceHistory:!0})})}destroy(){this.macroParticle.clearInlineEditor({isSubmitHistory:!1}),this.container.remove(),this.globalEvent.removeEvent(),this.scrollObserver.removeEvent(),this.selectionObserver.removeEvent()}clearSideEffect(){this.getMacroParticle().clearInlineEditor({isSubmitHistory:!1}),this.getPreviewer().clearResizer(),this.getTableTool().dispose(),this.getHyperlinkParticle().clearHyperlinkPopup(),this.getDateParticle().clearDatePicker()}updateTableTool(){if(this.getMode()===l.EditorMode.FORM){this.getTableTool().dispose();return}if(this.position.getPositionContext().isTable){const t=this.position.getPositionList();t.length&&(this.setPageNo(t[0].pageNo),this.getTableTool().render())}}initTableElementIndex(t,e){t.trList?.forEach((n,i)=>{n.tdList.forEach((r,s)=>{r.tableIndex=e,r.tableId=t.id,r.trIndex=i,r.trId=n.id,r.tdIndex=s,this.tdMap.set(r.id,r)})})}clearElementEffect(t){t.trList?.forEach(e=>{e.minHeight=e.originalMinHeight??e.minHeight,delete e.originalMinHeight,e.tdList.forEach(n=>{delete n.linkTdNextId})})}updateElementTableInfo(t,e,n,i){return t.tableId=e.id,t.trId=n.id,t.tdId=i.id,t}findTableChildrenElement(t,e,n){const i=this.position.getPositionContext(),{index:r}=i,s=this.getOriginalElementList();let a=r;t&&(a=r>s.length?s.length-1:r);for(let c=a;t?c>=0:c<s.length;t?c--:c++){const d=s[c];if(d&&[d.originalId,d.id].includes(e))for(const[u,R]of d.trList.entries())for(const[h,g]of R.tdList.entries()){const f=g.value.findIndex(typeof n=="function"?n:T=>T===n);if(f>=0)return{originalIndex:c,table:d,tr:R,trIndex:u,td:g,tdIndex:h,elementIndex:f}}}}getTdById(t){return this.tdMap.get(t)}getLinkTdPrevHasValue(t){const e=this.getTdById(t);if(e)return e.value.length?e:this.getLinkTdPrevHasValue(e.linkTdPrevId)}getFirstLinkTd(t){const e=this.getTdById(t);return e?.linkTdPrevId?this.getLastLinkTd(e.linkTdPrevId):e}getLastLinkTd(t){const e=this.getTdById(t);return e?.linkTdNextId?this.getLastLinkTd(e.linkTdNextId):e}removeLinkTd(t,e){const n=this.getTdById(e);if(n){if(n.linkTdPrevId){const i=this.getTdById(n.linkTdPrevId);i&&(delete i.linkTdNextId,this.removeLinkTd(t,n.linkTdPrevId))}if(n.linkTdNextId){const i=this.getTdById(n.linkTdNextId);i&&(delete i.linkTdPrevId,this.removeLinkTd(t,n.linkTdNextId))}t[n.tableIndex].trList[n.trIndex].tdList.splice(n.tdIndex,1),this.initTableElementIndex(t[n.tableIndex],n.tableIndex)}}removeLinkTdControl(t,e){const n=this.getTdById(t);if(n){for(let i=0;i<n.value.length;i++)n.value[i].control===e&&(n.value.splice(i,1),i--);n.linkTdNextId&&this.removeLinkTdControl(n.linkTdNextId,e)}}isSplitTd(t,e){return(!!t?.originalId||!!e?.originalId)&&(t?.originalId===e?.originalId||t?.id===e?.originalId||t?.originalId===e?.id)}getSplitTdValues(t){return this.splitTdValueMap.get(t)}removeSplitTdOtherRangeElements(){const{splitTdRange:t}=this.range.getRange();if(!t)return;const{startIndex:e,endIndex:n}=t;let i=this.getTd();if(i)if((i.valueStartIndex??0)>=e){let r=-1;for(;r<0;){const s=this.getTdById(i.linkTdPrevId);if(s){r=e-(s.valueStartIndex??0);const a=Math.max(0,r);this.spliceElementList(s.value,a+1,s.value.length-a-1),i=s}else r=0}}else{let r=1;for(;r>0;){const s=this.getTdById(i.linkTdNextId);if(s){const a=s.valueStartIndex??0;r=n-(a+s.value.length);const c=Math.min(s.value.length,n-a+1);this.spliceElementList(s.value,0,c),i=s}else r=0}}}getTablesByPagingId(t,e,n){const i=[],r=[];if(t[n].pagingId===e){i.push(n),r.push(t[n]);for(let s=n-1;s>=0&&t[s].pagingId===e;s--)r.unshift(t[s]),i.push(s);for(let s=n+1;s<t.length&&t[s].pagingId===e;s++)r.push(t[s]),i.push(s)}return{list:r,startIndex:i.sort()[0]}}}class Wr{executeMode;executeCut;executeCopy;executePaste;executeSelectAll;executeBackspace;executeSetRange;executeReplaceRange;executeSetPositionContext;executeForceUpdate;executeBlur;executeHideCursor;executeUndo;executeRedo;executePainter;executeApplyPainterStyle;executeFormat;executeFont;executeButton;executeEditElementAttribute;executeTriggerControlEditAttribute;executeCopyControl;executePasteControl;executeSize;executeSizeAdd;executeSizeMinus;executeBold;executeItalic;executeUnderline;executeStrikeout;executeSuperscript;executeSubscript;executeColor;executeHighlight;executeTitle;executeList;executeRowFlex;executeVertical;executeRowMargin;executeInsertTable;executeInsertTableTopRow;executeInsertTableBottomRow;executeInsertTableLeftCol;executeInsertTableRightCol;executeDeleteTableRow;executeDeleteTableCol;executeDeleteTable;executeMergeTableCell;executeCancelMergeTableCell;executeSplitVerticalTableCell;executeSplitHorizontalTableCell;executeTableTdVerticalAlign;executeTableBorderType;executeTableBorderColor;executeTableTdBorderType;executeTableTdSlashType;executeTableTdBackgroundColor;executeTableSelectAll;executeTableProperties;executeImage;executeHyperlink;executeDeleteHyperlink;executeCancelHyperlink;executeEditHyperlink;executeSeparator;executePageBreak;executeAddWatermark;executeDeleteWatermark;executeSearch;executeSearchNavigatePre;executeSearchNavigateNext;executeReplace;executePrint;executeReplaceImageElement;executeSaveAsImageElement;executeSetImageCrop;executeSetImageCaption;executeChangeImageDisplay;executePageMode;executePageScale;executePageScaleRecovery;executePageScaleMinus;executePageScaleAdd;executePaperSize;executePaperDirection;executeSetPaperMargin;executeSetMainBadge;executeSetAreaBadge;executeInsertElementList;executeInsertArea;executeSetAreaValue;executeSetAreaProperties;executeLocationArea;executeClearGraffiti;executeAppendElementList;executeUpdateElementById;executeDeleteElementById;executeSetValue;executeRemoveControl;executeTranslate;executeSetLocale;executeLocationCatalog;executeWordTool;executeSetHTML;executeSetGroup;executeDeleteGroup;executeLocationGroup;executeSetZone;executeSetControlValue;executeSetControlValueList;executeSetControlExtension;executeSetControlExtensionList;executeSetControlProperties;executeSetControlPropertiesList;executeSetControlHighlight;executeLocationControl;executeInsertControl;executeInsertTextField;executeJumpControl;executeUpdateOptions;executeSetFormModeTrace;executeInsertTitle;executeFocus;executeComputeElementListHeight;getCatalog;getImage;getPageMode;getOptions;getValue;getValueAsync;getAreaValue;getHTML;getText;getWordCount;getCursorPosition;getRemainingContentHeight;getRange;getRangeText;getRangeContext;getRangeRow;getRangeParagraph;getKeywordRangeList;getKeywordContext;getPaperMargin;getSearchNavigateInfo;getLocale;getGroupIds;getControlValue;getControlList;getContainer;getTitleValue;getPositionContextByEvent;getElementById;getMacroValue;getMacroList;setMacroValue;setMacroValueList;updateMacroProperties;locationMacro;insertSubTemplate;updateSubTemplate;expandSubTemplate;collapseSubTemplate;toggleSubTemplate;constructor(t){this.executeMode=t.mode.bind(t),this.executeCut=t.cut.bind(t),this.executeCopy=t.copy.bind(t),this.executePaste=t.paste.bind(t),this.executeSelectAll=t.selectAll.bind(t),this.executeBackspace=t.backspace.bind(t),this.executeSetRange=t.setRange.bind(t),this.executeReplaceRange=t.replaceRange.bind(t),this.executeSetPositionContext=t.setPositionContext.bind(t),this.executeForceUpdate=t.forceUpdate.bind(t),this.executeBlur=t.blur.bind(t),this.executeHideCursor=t.hideCursor.bind(t),this.executeUndo=t.undo.bind(t),this.executeRedo=t.redo.bind(t),this.executePainter=t.painter.bind(t),this.executeApplyPainterStyle=t.applyPainterStyle.bind(t),this.executeFormat=t.format.bind(t),this.executeFont=t.font.bind(t),this.executeButton=t.buttonText.bind(t),this.executeEditElementAttribute=t.editElementAttribute.bind(t),this.executeTriggerControlEditAttribute=t.triggerControlEditAttribute.bind(t),this.executeCopyControl=t.copyControl.bind(t),this.executePasteControl=t.pasteControl.bind(t),this.executeSize=t.size.bind(t),this.executeSizeAdd=t.sizeAdd.bind(t),this.executeSizeMinus=t.sizeMinus.bind(t),this.executeBold=t.bold.bind(t),this.executeItalic=t.italic.bind(t),this.executeUnderline=t.underline.bind(t),this.executeStrikeout=t.strikeout.bind(t),this.executeSuperscript=t.superscript.bind(t),this.executeSubscript=t.subscript.bind(t),this.executeColor=t.color.bind(t),this.executeHighlight=t.highlight.bind(t),this.executeTitle=t.title.bind(t),this.executeList=t.list.bind(t),this.executeRowFlex=t.rowFlex.bind(t),this.executeVertical=t.vertical.bind(t),this.executeRowMargin=t.rowMargin.bind(t),this.executeInsertTable=t.insertTable.bind(t),this.executeInsertTableTopRow=t.insertTableTopRow.bind(t),this.executeInsertTableBottomRow=t.insertTableBottomRow.bind(t),this.executeInsertTableLeftCol=t.insertTableLeftCol.bind(t),this.executeInsertTableRightCol=t.insertTableRightCol.bind(t),this.executeDeleteTableRow=t.deleteTableRow.bind(t),this.executeDeleteTableCol=t.deleteTableCol.bind(t),this.executeDeleteTable=t.deleteTable.bind(t),this.executeMergeTableCell=t.mergeTableCell.bind(t),this.executeCancelMergeTableCell=t.cancelMergeTableCell.bind(t),this.executeSplitVerticalTableCell=t.splitVerticalTableCell.bind(t),this.executeSplitHorizontalTableCell=t.splitHorizontalTableCell.bind(t),this.executeTableTdVerticalAlign=t.tableTdVerticalAlign.bind(t),this.executeTableBorderType=t.tableBorderType.bind(t),this.executeTableBorderColor=t.tableBorderColor.bind(t),this.executeTableTdBorderType=t.tableTdBorderType.bind(t),this.executeTableTdSlashType=t.tableTdSlashType.bind(t),this.executeTableTdBackgroundColor=t.tableTdBackgroundColor.bind(t),this.executeTableSelectAll=t.tableSelectAll.bind(t),this.executeTableProperties=t.tableProperties.bind(t),this.executeImage=t.image.bind(t),this.executeHyperlink=t.hyperlink.bind(t),this.executeDeleteHyperlink=t.deleteHyperlink.bind(t),this.executeCancelHyperlink=t.cancelHyperlink.bind(t),this.executeEditHyperlink=t.editHyperlink.bind(t),this.executeSeparator=t.separator.bind(t),this.executePageBreak=t.pageBreak.bind(t),this.executeAddWatermark=t.addWatermark.bind(t),this.executeDeleteWatermark=t.deleteWatermark.bind(t),this.executeSearch=t.search.bind(t),this.executeSearchNavigatePre=t.searchNavigatePre.bind(t),this.executeSearchNavigateNext=t.searchNavigateNext.bind(t),this.executeReplace=t.replace.bind(t),this.executePrint=t.print.bind(t),this.executeReplaceImageElement=t.replaceImageElement.bind(t),this.executeSaveAsImageElement=t.saveAsImageElement.bind(t),this.executeSetImageCrop=t.setImageCrop.bind(t),this.executeSetImageCaption=t.setImageCaption.bind(t),this.executeChangeImageDisplay=t.changeImageDisplay.bind(t),this.executePageMode=t.pageMode.bind(t),this.executePageScale=t.pageScale.bind(t),this.executePageScaleRecovery=t.pageScaleRecovery.bind(t),this.executePageScaleMinus=t.pageScaleMinus.bind(t),this.executePageScaleAdd=t.pageScaleAdd.bind(t),this.executePaperSize=t.paperSize.bind(t),this.executePaperDirection=t.paperDirection.bind(t),this.executeSetPaperMargin=t.setPaperMargin.bind(t),this.executeSetMainBadge=t.setMainBadge.bind(t),this.executeSetAreaBadge=t.setAreaBadge.bind(t),this.getAreaValue=t.getAreaValue.bind(t),this.executeInsertArea=t.insertArea.bind(t),this.executeSetAreaValue=t.setAreaValue.bind(t),this.executeSetAreaProperties=t.setAreaProperties.bind(t),this.executeLocationArea=t.locationArea.bind(t),this.executeClearGraffiti=t.clearGraffiti.bind(t),this.executeInsertElementList=t.insertElementList.bind(t),this.executeAppendElementList=t.appendElementList.bind(t),this.executeUpdateElementById=t.updateElementById.bind(t),this.executeDeleteElementById=t.deleteElementById.bind(t),this.executeSetValue=t.setValue.bind(t),this.executeRemoveControl=t.removeControl.bind(t),this.executeTranslate=t.translate.bind(t),this.executeSetLocale=t.setLocale.bind(t),this.executeLocationCatalog=t.locationCatalog.bind(t),this.executeWordTool=t.wordTool.bind(t),this.executeSetHTML=t.setHTML.bind(t),this.executeSetGroup=t.setGroup.bind(t),this.executeDeleteGroup=t.deleteGroup.bind(t),this.executeLocationGroup=t.locationGroup.bind(t),this.executeSetZone=t.setZone.bind(t),this.executeUpdateOptions=t.updateOptions.bind(t),this.executeSetFormModeTrace=t.setFormModeTrace.bind(t),this.executeInsertTitle=t.insertTitle.bind(t),this.executeFocus=t.focus.bind(t),this.executeComputeElementListHeight=t.computeElementListHeight.bind(t),this.getImage=t.getImage.bind(t),this.getPageMode=t.getPageMode.bind(t),this.getOptions=t.getOptions.bind(t),this.getValue=t.getValue.bind(t),this.getValueAsync=t.getValueAsync.bind(t),this.getHTML=t.getHTML.bind(t),this.getText=t.getText.bind(t),this.getWordCount=t.getWordCount.bind(t),this.getCursorPosition=t.getCursorPosition.bind(t),this.getRemainingContentHeight=t.getRemainingContentHeight.bind(t),this.getRange=t.getRange.bind(t),this.getRangeText=t.getRangeText.bind(t),this.getRangeContext=t.getRangeContext.bind(t),this.getRangeRow=t.getRangeRow.bind(t),this.getRangeParagraph=t.getRangeParagraph.bind(t),this.getKeywordRangeList=t.getKeywordRangeList.bind(t),this.getKeywordContext=t.getKeywordContext.bind(t),this.getCatalog=t.getCatalog.bind(t),this.getPaperMargin=t.getPaperMargin.bind(t),this.getSearchNavigateInfo=t.getSearchNavigateInfo.bind(t),this.getLocale=t.getLocale.bind(t),this.getGroupIds=t.getGroupIds.bind(t),this.getContainer=t.getContainer.bind(t),this.getTitleValue=t.getTitleValue.bind(t),this.getPositionContextByEvent=t.getPositionContextByEvent.bind(t),this.getElementById=t.getElementById.bind(t),this.executeSetControlValue=t.setControlValue.bind(t),this.executeSetControlValueList=t.setControlValueList.bind(t),this.executeSetControlExtension=t.setControlExtension.bind(t),this.executeSetControlExtensionList=t.setControlExtensionList.bind(t),this.executeSetControlProperties=t.setControlProperties.bind(t),this.executeSetControlPropertiesList=t.setControlPropertiesList.bind(t),this.executeSetControlHighlight=t.setControlHighlight.bind(t),this.getControlValue=t.getControlValue.bind(t),this.getControlList=t.getControlList.bind(t),this.executeLocationControl=t.locationControl.bind(t),this.executeInsertControl=t.insertControl.bind(t),this.executeInsertTextField=t.insertTextField.bind(t),this.executeJumpControl=t.jumpControl.bind(t),this.getMacroValue=t.getMacroValue.bind(t),this.getMacroList=t.getMacroList.bind(t),this.setMacroValue=t.setMacroValue.bind(t),this.setMacroValueList=t.setMacroValueList.bind(t),this.updateMacroProperties=t.updateMacroProperties.bind(t),this.locationMacro=t.locationMacro.bind(t),this.insertSubTemplate=t.insertSubTemplate.bind(t),this.updateSubTemplate=t.updateSubTemplate.bind(t),this.expandSubTemplate=t.expandSubTemplate.bind(t),this.collapseSubTemplate=t.collapseSubTemplate.bind(t),this.toggleSubTemplate=t.toggleSubTemplate.bind(t)}}function ag(o,t){return o===1125&&t===1593?{size:"a3",width:"297mm",height:"420mm"}:o===794&&t===1123?{size:"a4",width:"210mm",height:"297mm"}:o===565&&t===796?{size:"a5",width:"148mm",height:"210mm"}:{size:"",width:`${o}px`,height:`${t}px`}}function cg(o,t){const{width:e,height:n,direction:i=l.PaperDirection.VERTICAL}=t,r=document.createElement("iframe");r.style.visibility="hidden",r.style.position="absolute",r.style.left="0",r.style.top="0",r.style.width="0",r.style.height="0",r.style.border="none",document.body.append(r);const s=r.contentWindow,a=s.document;a.open();const c=document.createElement("div"),d=ag(e,n);o.forEach(h=>{const g=document.createElement("img");g.style.width=i===l.PaperDirection.HORIZONTAL?d.height:d.width,g.style.height=i===l.PaperDirection.HORIZONTAL?d.width:d.height,g.src=h,c.append(g)});const u=document.createElement("style"),R=`
|
|
539
539
|
* {
|
|
540
540
|
margin: 0;
|
|
541
541
|
padding: 0;
|
|
@@ -543,7 +543,7 @@ ${R} `}textToElements(t){const e=[],n=t.split(`
|
|
|
543
543
|
@page {
|
|
544
544
|
margin: 0;
|
|
545
545
|
size: ${d.size} ${i===l.PaperDirection.HORIZONTAL?"landscape":"portrait"};
|
|
546
|
-
}`;u.append(document.createTextNode(R)),setTimeout(()=>{a.write(`${u.outerHTML}${c.innerHTML}`),s.print(),a.close(),window.addEventListener("mouseover",()=>{r?.remove()},{once:!0})})}const
|
|
546
|
+
}`;u.append(document.createTextNode(R)),setTimeout(()=>{a.write(`${u.outerHTML}${c.innerHTML}`),s.print(),a.close(),window.addEventListener("mouseover",()=>{r?.remove()},{once:!0})})}const dg=[l.ControlType.TEXT,l.ControlType.TEXTFIELD],Vr=["id","titleId","listId","areaId","hyperlinkId","dateId","labelId","tableId","trId","tdId","pagingId","menstrualHistoryId","fetalHeartPositionId","toothPositionId"];function fo(o,t){for(let e=0;e<o.length;e++){const n=o[e];if(n.type===l.ElementType.CONTROL&&n.controlId===t&&n.control)return at(n);if(n.control?.value?.length){const i=fo(n.control.value,t);if(i)return i}if(n.valueList?.length){const i=fo(n.valueList,t);if(i)return i}if(n.type===l.ElementType.TABLE&&n.trList?.length)for(let i=0;i<n.trList.length;i++){const r=n.trList[i];for(let s=0;s<r.tdList.length;s++){const a=r.tdList[s],c=fo(a.value,t);if(c)return c}}}return null}function ug(o){const t=new Map,e=new Map,n=a=>a&&(t.has(a)||t.set(a,lt()),t.get(a)),i=a=>a&&(e.has(a)||e.set(a,lt()),e.get(a)),r=a=>{a.controlId&&(a.controlId=n(a.controlId)),a.originControlId&&(a.originControlId=n(a.originControlId));for(let c=0;c<Vr.length;c++){const d=Vr[c],u=a[d];if(typeof u=="string"){const R=a;R[d]=i(u)}}a.groupIds?.length&&(a.groupIds=a.groupIds.map(c=>i(c))),a.valueList?.length&&a.valueList.forEach(r),a.control?.value?.length&&a.control.value.forEach(r),a.trList?.length&&a.trList.forEach(c=>{const d=c;typeof d.id=="string"&&(d.id=i(d.id)),c.tdList.forEach(u=>{const R=u;typeof R.id=="string"&&(R.id=i(R.id)),u.value.forEach(r)})})},s=at(o);return r(s),s}function Rg(o,t,e){let n=-1;const i=!!e;for(let r=0;r<o.length;r++){const s=o[r];if(i?s.controlId===t&&s.originControlId===e:s.controlId===t&&!s.originControlId)n=r;else if(~n)break}return n}class hg{draw;range;position;historyManager;canvasEvent;options;control;workerManager;searchManager;i18n;zone;tableOperate;constructor(t){this.draw=t,this.range=t.getRange(),this.position=t.getPosition(),this.historyManager=t.getHistoryManager(),this.canvasEvent=t.getCanvasEvent(),this.options=t.getOptions(),this.control=t.getControl(),this.workerManager=t.getWorkerManager(),this.searchManager=t.getSearch(),this.i18n=t.getI18n(),this.zone=t.getZone(),this.tableOperate=t.getTableOperate()}getIsRangeInTextField(){const{startIndex:t}=this.range.getRange(),e=this.draw.getElementList(),n=e[t];if(!n)return!1;let i=null;const r=s=>{if(!s)return null;for(let a=t;a>=0;a--){const c=e[a];if(c.controlId===s&&c.control?.type===l.ControlType.TEXTFIELD&&(c.controlComponent===l.ControlComponent.PRETEXTFIX||c.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT||c.controlComponent===l.ControlComponent.PREFIX||c.controlComponent===l.ControlComponent.PRE_TEXT))return s}return null};return i=r(n.controlId)||r(n.originControlId),!!i}mode(t){this.draw.setMode(t)}async cut(){this.draw.isReadonly()||this.draw.isDisabled()||await this.canvasEvent.cut()}async copy(t){await this.canvasEvent.copy(t)}paste(t){this.draw.isReadonly()||this.draw.isDisabled()||da(this.canvasEvent,t)}copyControl(t){if(!t)return;const e=Mt(this.draw.getElementList(),{editorOptions:this.options}),n=fo(e,t);n&&sa({element:n})}pasteControl(){if(this.draw.isReadonly()||this.draw.isDisabled())return;const e=ns();if(!e?.element)return;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return;const r=this.draw.getElementList(),s=ug(e.element),a=s.controlId;if(!a)return;const c=Uo([s]);if(!c.length)return;bt(c,{isHandleFirstElement:!1,editorOptions:this.options});let d=n,u=n,R=i,h=!1,g;const f=n===i;let T=this.control.getActiveControl();!T&&this.control.getIsRangeWithinControl()&&(this.control.initControl(),T=this.control.getActiveControl());const m=T?.getElement();if(m?.control?.type&&dg.includes(m.control.type)&&this.control.getIsRangeWithinControl()){h=!0,g=m.controlId;const L=r[n];f&&(L?.control?.type===l.ControlType.TEXTFIELD||L?.control?.type===l.ControlType.TEXT)&&this.control.removePlaceholder(n)}else if(m?.controlId){const L=Rg(r,m.controlId,m.originControlId);~L&&(d=L,u=L,R=L)}wt(r,c,d,{isBreakWhenWrap:!0,editorOptions:this.options}),g&&c.forEach(L=>{L.controlId===a&&!L.originControlId&&(L.originControlId=g)});const p=d+1;u!==R&&this.draw.spliceElementList(r,u+1,R-u),this.draw.spliceElementList(r,p,0,c);const I=d+c.length;this.range.setRange(I,I),this.draw.render({curIndex:I}),h&&this.control.emitControlContentChange()}selectAll(){this.canvasEvent.selectAll()}backspace(){if(this.draw.isReadonly()||this.draw.isDisabled())return;const e=this.draw.getElementList(),{startIndex:n,endIndex:i}=this.range.getRange(),r=n===i;if(r&&e[n].value===_&&n===0)return;r?this.draw.spliceElementList(e,n,1):this.draw.spliceElementList(e,n+1,i-n);const s=r?n-1:n;this.range.setRange(s,s),this.draw.render({curIndex:s})}setRange(t,e,n,i,r,s,a){if(t<0||e<0||e<t)return;this.range.setRange(t,e,n,i,r,s,a);const c=t===e;this.draw.render({curIndex:c?t:void 0,isCompute:!1,isSubmitHistory:!1,isSetCursor:c})}replaceRange(t){this.setRange(t.startIndex,t.endIndex,t.tableId,t.startTdIndex,t.endTdIndex,t.startTrIndex,t.endTrIndex)}setPositionContext(t){const{tableId:e,startTrIndex:n,startTdIndex:i}=t,r=this.draw.getOriginalElementList();if(e){const s=r.findIndex(u=>u.id===e);if(!~s)return;const c=r[s].trList[n],d=c.tdList[i];this.position.setPositionContext({isTable:!0,index:s,trIndex:n,tdIndex:i,tdId:d.id,trId:c.id,tableId:e})}else this.position.setPositionContext({isTable:!1})}forceUpdate(t){const{isSubmitHistory:e=!1}=t||{};this.range.clearRange(),this.draw.render({isSubmitHistory:e,isSetCursor:!1})}blur(){this.range.clearRange(),this.draw.getCursor().recoveryCursor()}hideCursor(){this.draw.getCursor().recoveryCursor()}undo(){this.draw.isReadonly()||this.historyManager.undo()}redo(){this.draw.isReadonly()||this.historyManager.redo()}painter(t){if(!t.isDblclick&&this.draw.getPainterStyle()){this.canvasEvent.clearPainterStyle();return}const e=this.range.getSelection();if(!e)return;const n={};e.forEach(i=>{Re.forEach(s=>{const a=s;n[a]===void 0&&Reflect.set(n,a,i[a])})}),this.draw.setPainterStyle(n,t)}applyPainterStyle(){this.draw.isReadonly()||this.draw.isDisabled()||this.canvasEvent.applyPainterStyle()}format(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const i=this.range.getSelectionElementList();let r={},s=[];if(i?.length)s=i,r={isSetCursor:!1};else{const{endIndex:a}=this.range.getRange(),d=this.draw.getElementList()[a];d?.value===_&&(s.push(d),r={curIndex:a})}s.length&&(s.forEach(a=>{Re.forEach(c=>{delete a[c]})}),this.draw.render(r))}buttonText(t){if(t)if([...t.element].filter(i=>i.newButtonValue&&i.newButtonValue.length>0).length){const i=t.controlId;this.removeButtonElementsByControlId(i+"_text").then(()=>{setTimeout(()=>{this.insertButtonValue(t)},500)})}else{const i=t.controlId;i&&this.removeButtonElementsByControlId(i+"_text")}}triggerControlEditAttribute(t){const n=this.draw.getElementList().filter(r=>r.controlId===t);this.draw.getEventBus().emit("controlEditAttribute",{controlId:t,element:n})}editElementAttribute(t){const e=this.draw.getElementList();if(t.controlId&&t.type==="button"){const n=[];e.forEach((h,g)=>{h.controlId===t.controlId&&h.control?.type==="button"&&n.push(g)});const i=[];let r=null;n.forEach(h=>{const g=e[h];g.controlComponent===l.ControlComponent.VALUE&&(i.push(h),r||(r=g))}),i.sort((h,g)=>g-h).forEach(h=>{e.splice(h,1)});let s=-1;for(let h=0;h<e.length;h++){const g=e[h];if(g.controlId===t.controlId&&g.control?.type==="button"){if(g.controlComponent===l.ControlComponent.PREFIX||g.controlComponent===l.ControlComponent.PRE_TEXT){s=h+1;break}s===-1&&(s=h+1)}}if(s===-1&&n.length>0){const h=[];e.forEach((g,f)=>{g.controlId===t.controlId&&g.control?.type==="button"&&h.push(f)}),h.length>0&&(s=h[0]+1)}const a=t.label||"";for(let h=0;h<a.length;h++){const g={value:a[h],controlId:t.controlId,type:l.ElementType.CONTROL,control:{type:"button",buttonLabel:a,code:t.code,value:[{value:a}],label:a,hide:!1},controlComponent:l.ControlComponent.VALUE,color:r?.color||"#fff",highlight:r?.highlight||"#1677FF",style:r?.style||"16px Microsoft YaHei",hide:!1};e.splice(s+h,0,g)}e.filter(h=>h.controlId===t.controlId&&h.control?.type==="button").forEach(h=>{h.control&&(h.control.buttonLabel=t.label,h.control.label=t.label,h.control.code=t.code,h.control.hide=!1,h.control.value=[{value:t.label}]),h.hide=!1});const{startIndex:c,endIndex:d}=this.range.getRange(),u=!0,R=d;this.draw.render({curIndex:R,isSetCursor:u})}else if(t.controlId){const n=t.controlId;if(e.forEach(r=>{r.controlId===n&&r.control&&(t.label!==void 0&&(r.control.label=t.label),t.placeholder!==void 0&&(r.control.placeholder=t.placeholder),t.code!==void 0&&(r.control.code=t.code),t.value!==void 0&&(r.control.value=t.value?[{value:t.value}]:null),t.valueSets!==void 0&&(r.control.valueSets=t.valueSets),t.dateFormat!==void 0&&(r.control.dateFormat=t.dateFormat),t.numberExclusiveOptions!==void 0&&(r.control.numberExclusiveOptions=t.numberExclusiveOptions),t.underline!==void 0&&(r.control.underline=t.underline))}),t.placeholder!==void 0){const r=t.placeholder,s=[];if(e.forEach((a,c)=>{a.controlId===n&&a.controlComponent==="placeholder"&&s.push({element:a,index:c})}),s.length===r.length)s.forEach((a,c)=>{a.element.value=r[c]===`
|
|
547
547
|
`?_:r[c]});else if(s.length>0){const a={...s[0].element};s.sort((d,u)=>u.index-d.index).forEach(d=>{e.splice(d.index,1)});const c=Math.min(...s.map(d=>d.index));for(let d=0;d<r.length;d++){const u=r[d]===`
|
|
548
|
-
`?_:r[d];e.splice(c+d,0,{...a,value:u})}}}const{endIndex:i}=this.range.getRange();this.draw.render({curIndex:i,isSetCursor:!0})}}delButton(t,e){return new Promise(n=>{for(let i=t.length-1;i>=0;i--)e.some(s=>s.controlId===t[i].controlId&&s.type===t[i].type)&&t.splice(i,1);n(!0)})}editButton(t,e,n){const i=this.draw.getElementList();n=n+1;for(let d=0;d<e.label.length;d++){const u={value:e.label[d],controlId:e.controlId,type:l.ElementType.CONTROL,control:{type:"button",buttonLabel:e.label,code:e.code,value:[{value:e.label}],label:e.label,hide:!1},controlComponent:"value",color:"#fff",highlight:"#1677FF",style:"16px Microsoft YaHei",hide:!1};i.splice(n+d,0,u)}const{startIndex:r,endIndex:s}=this.range.getRange(),a=!0,c=s;this.draw.render({curIndex:c,isSetCursor:a})}removeButtonElementsByControlId(t){return new Promise(e=>{const n=this.draw.getElementList();for(let c=n.length-1;c>=0;c--)n[c].controlId===t&&n.splice(c,1);const{startIndex:i,endIndex:r}=this.range.getRange(),s=!0,a=r;this.draw.render({curIndex:a,isSetCursor:s}),e(!0)})}removeByValue(t,e){return new Promise(n=>{for(let c=t.length-1;c>=0;c--)(t[c].type=="control"||t[c].type=="text"||t[c].type=="buttonText")&&t[c].control?.buttonLabel===e&&t[c].control?.buttonText&&t.splice(c,1);const{startIndex:i,endIndex:r}=this.range.getRange(),s=!0,a=r;this.draw.render({curIndex:a,isSetCursor:s}),n(!0)})}insertButtonValue(t){const e=this.draw.getElementList(),n=t.controlId,i=t.element[0].newButtonValue,r=t.element[0].control.buttonLabel,s=t.element[0].control.code;if(!i||!i.length)return;let a=-1;for(let m=0;m<e.length;m++)if(e[m].controlId===n&&e[m].control?.type==="button"){a=m;break}if(a===-1)return;const c=n+"_text",d=[];for(let m=0;m<i.length;m++){const p=i[m];d.push({value:p.value,code:p.code})}const u={type:"button",buttonLabel:r,buttonText:!0,label:r,code:s,value:d,hide:!1},R=[];R.push({value:"[",controlId:c,type:l.ElementType.CONTROL,control:u,controlComponent:l.ControlComponent.PREFIX,color:"#1677FF",hide:!1});for(let m=0;m<i.length;m++){const p=i[m],I=i.length>1?`${m+1}.${p.value}`:p.value,L=ct(I);for(let P=0;P<L.length;P++)R.push({value:L[P],controlId:c,type:l.ElementType.CONTROL,control:u,controlComponent:l.ControlComponent.VALUE,color:"#000",hide:!1});i.length>1&&m<i.length-1&&R.push({value:_,controlId:c,type:l.ElementType.CONTROL,control:u,controlComponent:l.ControlComponent.VALUE,color:"#000",hide:!1})}R.push({value:"]",controlId:c,type:l.ElementType.CONTROL,control:u,controlComponent:l.ControlComponent.POSTFIX,color:"#1677FF",hide:!1});for(let m=0;m<R.length;m++)e.splice(a+m,0,R[m]);const{startIndex:h,endIndex:g}=this.range.getRange(),f=!0,T=g;this.draw.render({curIndex:T,isSetCursor:f})}font(t,e){const{isIgnoreDisabledRule:n=!1}=e||{};if(!n&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const r=this.range.getSelectionElementList();if(r?.length)r.forEach(s=>{s.font=t}),this.draw.render({isSetCursor:!1});else{let s=!0;const{endIndex:a}=this.range.getRange(),d=this.draw.getElementList()[a];this.range.setDefaultStyle({font:t}),d?.value===_?d.font=t:s=!1,this.draw.render({isSubmitHistory:s,curIndex:a,isCompute:!1})}}size(t,e){const{isIgnoreDisabledRule:n=!1}=e||{};if(!n&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const{minSize:r,maxSize:s,defaultSize:a}=this.options;if(t<r||t>s)return;let c={},d=[];const u=this.range.getTextLikeSelectionElementList();if(u?.length)d=u,c={isSetCursor:!1};else{const{endIndex:h}=this.range.getRange(),f=this.draw.getElementList()[h];this.range.setDefaultStyle({size:t}),f?.value===_?(d.push(f),c={curIndex:h}):this.draw.render({curIndex:h,isCompute:!1,isSubmitHistory:!1})}if(!d.length)return;let R=!1;d.forEach(h=>{!h.size&&t===a||h.size&&h.size===t||(h.size=t,R=!0)}),R&&this.draw.render(c)}sizeAdd(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const{defaultSize:i,maxSize:r}=this.options,s=this.range.getTextLikeSelectionElementList();let a={},c=[];if(s?.length)c=s,a={isSetCursor:!1};else{const{endIndex:u}=this.range.getRange(),h=this.draw.getElementList()[u],f=this.range.getDefaultStyle()?.size||h.size||i;this.range.setDefaultStyle({size:f+2>r?r:f+2}),h?.value===_?(c.push(h),a={curIndex:u}):this.draw.render({curIndex:u,isCompute:!1,isSubmitHistory:!1})}if(!c.length)return;let d=!1;c.forEach(u=>{u.size||(u.size=i),!(u.size>=r)&&(u.size+2>r?u.size=r:u.size+=2,d=!0)}),d&&this.draw.render(a)}sizeMinus(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const{defaultSize:i,minSize:r}=this.options,s=this.range.getTextLikeSelectionElementList();let a={},c=[];if(s?.length)c=s,a={isSetCursor:!1};else{const{endIndex:u}=this.range.getRange(),h=this.draw.getElementList()[u],f=this.range.getDefaultStyle()?.size||h.size||i;this.range.setDefaultStyle({size:f-2<r?r:f-2}),h?.value===_?(c.push(h),a={curIndex:u}):this.draw.render({curIndex:u,isCompute:!1,isSubmitHistory:!1})}if(!c.length)return;let d=!1;c.forEach(u=>{u.size||(u.size=i),!(u.size<=r)&&(u.size-2<r?u.size=r:u.size-=2,d=!0)}),d&&this.draw.render(a)}bold(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const i=this.range.getSelectionElementList();if(i?.length){const r=i.findIndex(s=>!s.bold);i.forEach(s=>{s.bold=!!~r}),this.draw.render({isSetCursor:!1})}else{let r=!0;const{endIndex:s}=this.range.getRange(),c=this.draw.getElementList()[s];this.range.setDefaultStyle({bold:c.bold?!1:!this.range.getDefaultStyle()?.bold}),c?.value===_?c.bold=!c.bold:r=!1,this.draw.render({isSubmitHistory:r,curIndex:s,isCompute:!1})}}italic(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const i=this.range.getSelectionElementList();if(i?.length){const r=i.findIndex(s=>!s.italic);i.forEach(s=>{s.italic=!!~r}),this.draw.render({isSetCursor:!1})}else{let r=!0;const{endIndex:s}=this.range.getRange(),c=this.draw.getElementList()[s];this.range.setDefaultStyle({italic:c.italic?!1:!this.range.getDefaultStyle()?.italic}),c?.value===_?c.italic=!c.italic:r=!1,this.draw.render({isSubmitHistory:r,curIndex:s,isCompute:!1})}}underline(t,e){const{isIgnoreDisabledRule:n=!1}=e||{};if(!n&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const r=this.range.getSelectionElementList();if(r?.length){const s=r.some(a=>!a.underline||!t&&a.textDecoration||t&&!a.textDecoration||t&&a.textDecoration&&!jr(a.textDecoration,t));r.forEach(a=>{a.underline=s,s&&t?a.textDecoration=t:delete a.textDecoration}),this.draw.render({isSetCursor:!1,isCompute:!1})}else{let s=!0;const{endIndex:a}=this.range.getRange(),d=this.draw.getElementList()[a];this.range.setDefaultStyle({underline:d?.underline?!1:!this.range.getDefaultStyle()?.underline}),d?.value===_?d.underline=!d.underline:s=!1,this.draw.render({isSubmitHistory:s,curIndex:a,isCompute:!1})}}strikeout(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const i=this.range.getSelectionElementList();if(i?.length){const r=i.findIndex(s=>!s.strikeout);i.forEach(s=>{s.strikeout=!!~r}),this.draw.render({isSetCursor:!1,isCompute:!1})}else{let r=!0;const{endIndex:s}=this.range.getRange(),c=this.draw.getElementList()[s];this.range.setDefaultStyle({strikeout:c.strikeout?!1:!this.range.getDefaultStyle()?.strikeout}),c?.value===_?c.strikeout=!c.strikeout:r=!1,this.draw.render({isSubmitHistory:r,curIndex:s,isCompute:!1})}}superscript(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const i=this.range.getSelectionElementList();if(!i)return;const r=i.findIndex(s=>s.type===l.ElementType.SUPERSCRIPT);i.forEach(s=>{~r?s.type===l.ElementType.SUPERSCRIPT&&(s.type=l.ElementType.TEXT,delete s.actualSize):(!s.type||s.type===l.ElementType.TEXT||s.type===l.ElementType.SUBSCRIPT)&&(s.type=l.ElementType.SUPERSCRIPT)}),this.draw.render({isSetCursor:!1})}subscript(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const i=this.range.getSelectionElementList();if(!i)return;const r=i.findIndex(s=>s.type===l.ElementType.SUBSCRIPT);i.forEach(s=>{~r?s.type===l.ElementType.SUBSCRIPT&&(s.type=l.ElementType.TEXT,delete s.actualSize):(!s.type||s.type===l.ElementType.TEXT||s.type===l.ElementType.SUPERSCRIPT)&&(s.type=l.ElementType.SUBSCRIPT)}),this.draw.render({isSetCursor:!1})}color(t,e){const{isIgnoreDisabledRule:n=!1}=e||{};if(!n&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const r=this.range.getSelectionElementList();if(r?.length)r.forEach(s=>{t?s.color=t:delete s.color}),this.draw.render({isSetCursor:!1,isCompute:!1});else{let s=!0;const{endIndex:a}=this.range.getRange(),d=this.draw.getElementList()[a];this.range.setDefaultStyle({color:t||void 0}),d?.value===_?t?d.color=t:delete d.color:s=!1,this.draw.render({isSubmitHistory:s,curIndex:a,isCompute:!1})}}highlight(t,e){const{isIgnoreDisabledRule:n=!1}=e||{};if(!n&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const r=this.range.getSelectionElementList();if(r?.length)r.forEach(s=>{t?s.highlight=t:delete s.highlight}),this.draw.render({isSetCursor:!1,isCompute:!1});else{let s=!0;const{endIndex:a}=this.range.getRange(),d=this.draw.getElementList()[a];this.range.setDefaultStyle({highlight:t||void 0}),d?.value===_?t?d.highlight=t:delete d.highlight:s=!1,this.draw.render({isSubmitHistory:s,curIndex:a,isCompute:!1})}}title(t){if(this.draw.isReadonly()||this.draw.isDisabled())return;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return;const r=this.draw.getElementList(),s=n===i?this.range.getRangeParagraphElementList():r.slice(n+1,i+1);if(!s||!s.length)return;const a=lt(),c=this.draw.getOptions().title;s.forEach(R=>{!R.type&&R.value===_||(t?(R.level=t,R.titleId=a,Hn(R)&&(R.size=c[Gi[t]],R.bold=!0)):R.titleId&&(delete R.titleId,delete R.title,delete R.level,delete R.size,delete R.bold))});const d=n===i,u=d?i:n;this.draw.render({curIndex:u,isSetCursor:d})}list(t,e){this.draw.isReadonly()||this.draw.getListParticle().setList(t,e)}rowFlex(t){if(this.draw.isReadonly())return;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return;const r=this.range.getRangeRowElementList();if(!r)return;r.forEach(c=>{c.rowFlex=t});const s=n===i,a=s?i:n;this.draw.render({curIndex:a,isSetCursor:s})}vertical(t){if(this.draw.isReadonly())return;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return;const r=this.range.getRangeRowElementList();if(!r)return;r.forEach(c=>{c.vertical=t});const s=n===i,a=s?i:n;this.draw.render({curIndex:a,isSetCursor:s})}rowMargin(t){if(this.draw.isReadonly())return;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return;const r=this.range.getRangeRowElementList();if(!r)return;r.forEach(c=>{c.rowMargin=t});const s=n===i,a=s?i:n;this.draw.render({curIndex:a,isSetCursor:s})}insertTable(t,e){this.draw.isReadonly()||this.draw.isDisabled()||this.getIsRangeInTextField()||this.control.getActiveControl()||this.tableOperate.insertTable(t,e)}insertTableTopRow(){this.draw.isReadonly()||this.tableOperate.insertTableTopRow()}insertTableBottomRow(){this.draw.isReadonly()||this.tableOperate.insertTableBottomRow()}insertTableLeftCol(){this.draw.isReadonly()||this.tableOperate.insertTableLeftCol()}insertTableRightCol(){this.draw.isReadonly()||this.tableOperate.insertTableRightCol()}deleteTableRow(){this.draw.isReadonly()||this.tableOperate.deleteTableRow()}deleteTableCol(){this.draw.isReadonly()||this.tableOperate.deleteTableCol()}deleteTable(){this.draw.isReadonly()||this.tableOperate.deleteTable()}mergeTableCell(){this.draw.isReadonly()||this.tableOperate.mergeTableCell()}cancelMergeTableCell(){this.draw.isReadonly()||this.tableOperate.cancelMergeTableCell()}splitVerticalTableCell(){this.draw.isReadonly()||this.tableOperate.splitVerticalTableCell()}splitHorizontalTableCell(){this.draw.isReadonly()||this.tableOperate.splitHorizontalTableCell()}tableTdVerticalAlign(t){this.draw.isReadonly()||this.tableOperate.tableTdVerticalAlign(t)}tableBorderType(t){this.draw.isReadonly()||this.tableOperate.tableBorderType(t)}tableBorderColor(t){this.draw.isReadonly()||this.tableOperate.tableBorderColor(t)}tableTdBorderType(t){this.draw.isReadonly()||this.tableOperate.tableTdBorderType(t)}tableTdSlashType(t){this.draw.isReadonly()||this.tableOperate.tableTdSlashType(t)}tableTdBackgroundColor(t){this.draw.isReadonly()||this.tableOperate.tableTdBackgroundColor(t)}tableSelectAll(){this.tableOperate.tableSelectAll()}tableProperties(){this.draw.isReadonly()||this.tableOperate.tableProperties()}hyperlink(t){const{valueList:e,url:n,hyperlinkId:i}=t;if(!n||!e?.length||this.draw.isReadonly()||this.draw.isDisabled()||this.control.getActiveControl())return;const{startIndex:a,endIndex:c}=this.range.getRange();!~a&&!~c||this.insertElementList([{type:l.ElementType.HYPERLINK,value:"",valueList:e,url:n,hyperlinkId:i||lt()}])}getHyperlinkRange(){let t=-1,e=-1;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return null;const r=this.draw.getElementList(),s=r[n];if(s.type!==l.ElementType.HYPERLINK)return null;let a=n;for(;a>0;){if(r[a].hyperlinkId!==s.hyperlinkId){t=a+1;break}a--}let c=n+1;for(;c<r.length;){if(r[c].hyperlinkId!==s.hyperlinkId){e=c-1;break}c++}return c===r.length&&(e=c-1),!~t||!~e?null:[t,e]}deleteHyperlink(){if(this.draw.isReadonly()||this.draw.isDisabled())return;const e=this.getHyperlinkRange();if(!e)return;const n=this.draw.getElementList(),[i,r]=e;this.draw.spliceElementList(n,i,r-i+1),this.draw.getHyperlinkParticle().clearHyperlinkPopup();const s=i-1;this.range.setRange(s,s),this.draw.render({curIndex:s})}cancelHyperlink(){if(this.draw.isReadonly()||this.draw.isDisabled())return;const e=this.getHyperlinkRange();if(!e)return;const n=this.draw.getElementList(),[i,r]=e;for(let a=i;a<=r;a++){const c=n[a];delete c.type,delete c.url,delete c.hyperlinkId,delete c.underline}this.draw.getHyperlinkParticle().clearHyperlinkPopup();const{endIndex:s}=this.range.getRange();this.draw.render({curIndex:s,isCompute:!1})}editHyperlink(t){if(this.draw.isReadonly()||this.draw.isDisabled())return;const n=this.getHyperlinkRange();if(!n)return;const i=this.draw.getElementList(),[r,s]=n;for(let c=r;c<=s;c++){const d=i[c];d.url=t}this.draw.getHyperlinkParticle().clearHyperlinkPopup();const{endIndex:a}=this.range.getRange();this.draw.render({curIndex:a,isCompute:!1})}separator(t,e){if(this.draw.isReadonly()||this.draw.isDisabled()||this.getIsRangeInTextField()||this.control.getActiveControl())return;const{startIndex:r,endIndex:s}=this.range.getRange();if(!~r&&!~s)return;const a=this.draw.getElementList();let c=-1;const d=a[s+1];if(d&&d.type===l.ElementType.SEPARATOR){if(d.dashArray&&d.dashArray.join()===t.join())return;c=s,Object.assign(d,{dashArray:t,...e})}else{const u={value:Fi,type:l.ElementType.SEPARATOR,dashArray:t,...e};wt(a,[u],r,{editorOptions:this.options}),r!==0&&a[r].value===_?(this.draw.spliceElementList(a,r,1,[u]),c=r-1):(this.draw.spliceElementList(a,r+1,0,[u]),c=r)}this.range.setRange(c,c),this.draw.render({curIndex:c})}pageBreak(){this.draw.isReadonly()||this.draw.isDisabled()||this.control.getActiveControl()||this.insertElementList([{type:l.ElementType.PAGE_BREAK,value:Fi}])}addWatermark(t){if(this.draw.isReadonly())return;const n=this.draw.getOptions(),{color:i,size:r,opacity:s,font:a,gap:c}=Yo;n.watermark.data=t.data,n.watermark.type=t.type||l.WatermarkType.TEXT,t.width&&(n.watermark.width=t.width),t.height&&(n.watermark.height=t.height),n.watermark.color=t.color||i,n.watermark.opacity=t.opacity||s,n.watermark.size=t.size||r,n.watermark.font=t.font||a,n.watermark.repeat=!!t.repeat,t.numberType&&(n.watermark.numberType=t.numberType),n.watermark.gap=t.gap||c,this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1})}deleteWatermark(){if(this.draw.isReadonly())return;const e=this.draw.getOptions();e.watermark&&e.watermark.data&&(e.watermark={...Yo},this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1}))}image(t){if(this.draw.isReadonly()||this.draw.isDisabled())return null;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return null;const r=t.id||lt();return this.insertElementList([{...t,id:r,type:l.ElementType.IMAGE}]),r}search(t,e){this.searchManager.setSearchKeyword(t,e),this.draw.render({isSubmitHistory:!1})}searchNavigatePre(){this.searchManager.searchNavigatePre()!==null&&this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1,isLazy:!1})}searchNavigateNext(){this.searchManager.searchNavigateNext()!==null&&this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1,isLazy:!1})}getSearchNavigateInfo(){return this.searchManager.getSearchNavigateInfo()}replace(t,e){this.draw.getSearch().replace(t,e)}async print(){const{scale:t,printPixelRatio:e,paperDirection:n,width:i,height:r}=this.options;t!==1&&this.draw.setPageScale(1);const s=await this.draw.getDataURL({pixelRatio:e,mode:l.EditorMode.PRINT});rg(s,{width:i,height:r,direction:n}),t!==1&&this.draw.setPageScale(t)}replaceImageElement(t){const{startIndex:e}=this.range.getRange(),i=this.draw.getElementList()[e];!i||i.type!==l.ElementType.IMAGE||(i.value=t,this.draw.render({isSetCursor:!1}))}saveAsImageElement(){const{startIndex:t}=this.range.getRange(),n=this.draw.getElementList()[t];!n||n.type!==l.ElementType.IMAGE||Vi(n.value,`${n.id}.png`)}setImageCrop(t){const{startIndex:e}=this.range.getRange(),i=this.draw.getElementList()[e];!i||i.type!==l.ElementType.IMAGE||(i.imgCrop=t,this.draw.render({isSetCursor:!1,isCompute:!1}))}setImageCaption(t){const{startIndex:e}=this.range.getRange(),i=this.draw.getElementList()[e];i?.type===l.ElementType.IMAGE&&(i.imgCaption=t,this.draw.render({isSetCursor:!1}))}changeImageDisplay(t,e){if(t.imgDisplay===e)return;t.imgDisplay=e;const{startIndex:n,endIndex:i}=this.range.getRange();if(e===l.ImageDisplay.SURROUND||e===l.ImageDisplay.FLOAT_TOP||e===l.ImageDisplay.FLOAT_BOTTOM){const r=this.position.getPositionList(),{pageNo:s,coordinate:{leftTop:a}}=r[n];t.imgFloatPosition={pageNo:s,x:a[0],y:a[1]}}else delete t.imgFloatPosition;this.draw.getPreviewer().clearResizer(),this.draw.render({isSetCursor:!0,curIndex:i})}getImage(t){return this.draw.getDataURL(t)}getPageMode(){return this.options}getOptions(){return this.options}getValue(t){return this.draw.getValue(t)}getValueAsync(t){return this.draw.getWorkerManager().getValue(t)}getAreaValue(t){return this.draw.getArea().getAreaValue(t)}getHTML(){const t=this.options,e=this.draw.getHeaderElementList(),n=this.draw.getOriginalMainElementList(),i=this.draw.getFooterElementList();return{header:en(e,t).innerHTML,main:en(n,t).innerHTML,footer:en(i,t).innerHTML}}getText(){const t=this.draw.getHeaderElementList(),e=this.draw.getOriginalMainElementList(),n=this.draw.getFooterElementList();return{header:xe(t),main:xe(e),footer:xe(n)}}getWordCount(){return this.workerManager.getWordCount()}getCursorPosition(){return this.position.getCursorPosition()}getRemainingContentHeight(){if(!this.draw.getIsPagingMode())return 0;const t=this.draw.getPageRowList(),e=t.length-1,i=(t[e]||[]).reduce((c,d)=>c+d.height+(d.offsetY||0),0),r=this.draw.getHeight(),s=this.draw.getMainOuterHeight(),a=r-(s+i);return a>0?a:0}computeElementListHeight(t){if(!t.length)return 0;const e=this.draw.getInnerWidth();if(e<=0)return 0;const n=at(t);bt(n,{isHandleFirstElement:!1,editorOptions:this.options});const i=Zo(n);return this.draw.computeRowList({innerWidth:e,elementList:n,surroundElementList:i}).reduce((s,a)=>s+a.height+(a.offsetY||0),0)}getRange(){return at(this.range.getRange())}getRangeText(){return this.range.toString()}getRangeContext(){const t=this.range.getRange(),{startIndex:e,endIndex:n}=t;if(!~e&&!~n)return null;const i=e===n,r=this.range.toString(),s=Mt(this.range.getSelectionElementList()||[]),a=this.draw.getElementList(),c=Ue(a[i?e:e+1],{extraPickAttrs:["id","controlComponent"]}),d=Ue(a[n],{extraPickAttrs:["id","controlComponent"]}),u=this.draw.getRowList(),R=this.position.getPositionList(),h=R[e],g=R[n],f=h?.pageNo,T=g?.pageNo,m=h?.rowIndex,p=g?.rowIndex,I=u[m],L=u[p];let P=0,C=0;this.draw.getCursor().getHitLineStartIndex()||(P=I?.elementList[0]?.value===_?h?.index-I?.startIndex:h?.index-I?.startIndex+1),h===g?C=P:C=L.elementList[0]?.value===_?g.index-L.startIndex:g.index-L.startIndex+1;const S=[],F=this.draw.getOriginalHeight(),N=this.draw.getOriginalPageGap(),V=this.position.getSelectionPositionList();if(V){let U=null,Q=0,G=null;for(let H=0;H<V.length;H++){const{rowNo:tt,pageNo:st,coordinate:{leftTop:et,rightTop:nt},lineHeight:q}=V[H];U===null||U!==tt?(G&&S.push(G),G={x:et[0],y:et[1]+st*(F+N),width:nt[0]-et[0],height:q},U=tt,Q=et[0]):G.width=nt[0]-Q,H===V.length-1&&G&&S.push(G)}}else{const Q=this.position.getPositionList()[n],{coordinate:{rightTop:G},pageNo:H,lineHeight:tt}=Q;S.push({x:G[0],y:G[1]+H*(F+N),width:0,height:tt})}const Y=this.draw.getZone().getZone(),{isTable:E,trIndex:W,tdIndex:X,index:O}=this.position.getPositionContext();let M=null;if(E){const Q=this.draw.getOriginalElementList()[O]||null;Q&&(M=Mt([Q])[0])}let b=null,y=null,D=e-1;for(;D>0;){const U=a[D],Q=a[D-1];if(U.titleId&&U.titleId!==Q?.titleId){b=U.titleId,y=R[D].pageNo;break}D--}return at({isCollapsed:i,startElement:c,endElement:d,startPageNo:f,endPageNo:T,startRowNo:m,endRowNo:p,startColNo:P,endColNo:C,rangeRects:S,zone:Y,isTable:E,trIndex:W??null,tdIndex:X??null,tableElement:M,selectionText:r,selectionElementList:s,titleId:b,titleStartPageNo:y})}getRangeRow(){const t=this.range.getRangeRowElementList();return t?Mt(t):null}getRangeParagraph(){const t=this.range.getRangeParagraphElementList();return t?Mt(t):null}getKeywordRangeList(t){return this.range.getKeywordRangeList(t)}getKeywordContext(t){const e=this.getKeywordRangeList(t);if(!e.length)return null;const n=[],i=this.position.getOriginalMainPositionList(),r=this.draw.getOriginalMainElementList();for(let s=0;s<e.length;s++){const a=e[s],{startIndex:c,endIndex:d,tableId:u,startTrIndex:R,startTdIndex:h}=a;let g=i;if(a.tableId){const m=r.find(p=>p.id===u);m&&(g=m.trList?.[R]?.tdList?.[h]?.positionList||[])}const f=at(g[c]),T=at(g[d]);n.push({range:a,startPosition:f,endPosition:T})}return n}pageMode(t){this.draw.setPageMode(t)}pageScale(t){t!==this.options.scale&&this.draw.setPageScale(t)}pageScaleRecovery(){const{scale:t}=this.options;t!==1&&this.draw.setPageScale(1)}pageScaleMinus(){const{scale:t}=this.options,e=t*10-1;e>=5&&this.draw.setPageScale(e/10)}pageScaleAdd(){const{scale:t}=this.options,e=t*10+1;e<=30&&this.draw.setPageScale(e/10)}paperSize(t,e){this.draw.setPaperSize(t,e)}paperDirection(t){this.draw.setPaperDirection(t)}getPaperMargin(){return this.options.margins}setPaperMargin(t){return this.draw.setPaperMargin(t)}setMainBadge(t){this.draw.getBadge().setMainBadge(t),this.draw.render({isCompute:!1,isSubmitHistory:!1})}setAreaBadge(t){this.draw.getBadge().setAreaBadgeMap(t),this.draw.render({isCompute:!1,isSubmitHistory:!1})}insertElementList(t,e={}){if(!t.length||this.draw.isReadonly()||this.draw.isDisabled())return;const{isReplace:i=!0,ignoreContextKeys:r}=e;i||this.range.shrinkRange(),console.log(t,"payload");const s=at(t),{startIndex:a}=this.range.getRange(),c=this.draw.getElementList();wt(c,s,a,{ignoreContextKeys:r,isBreakWhenWrap:!0,editorOptions:this.options}),console.log(s,"cloneElementList"),this.draw.insertElementList(s,e),setTimeout(()=>{console.log(c,"elementList")},500)}appendElementList(t,e){!t.length||this.draw.isReadonly()||this.draw.appendElementList(at(t),e)}updateElementById(t){const{id:e,conceptId:n}=t;if(!e&&!n)return;const i=[];function r(a,c=!1){let d=0;for(;d<a.length;){const u=a[d];if(d++,u.type===l.ElementType.TABLE){const R=u.trList;for(let h=0;h<R.length;h++){const g=R[h];for(let f=0;f<g.tdList.length;f++){const T=g.tdList[f];r(T.value,c)}}}u.type===l.ElementType.CONTROL&&u.control?.value&&r(u.control.value,!0),(e&&u.id===e||n&&u.conceptId===n)&&i.push({elementList:a,index:d-1,isInsideControl:c})}}const s=[this.draw.getOriginalMainElementList(),this.draw.getHeaderElementList(),this.draw.getFooterElementList()];for(const a of s)r(a);if(i.length){for(let a=0;a<i.length;a++){const{elementList:c,index:d,isInsideControl:u}=i[a],R=c[d],h=R.controlId&&R.controlComponent===l.ControlComponent.VALUE;if(u||h){if(Object.assign(R,t.properties),R.id){const g=kl(R.id);g&&Object.assign(g,t.properties)}}else{const g=Mt([{...R,...t.properties}],{extraPickAttrs:["id"]});g.length>0&&g[0]?(De(He,R,g[0]),bt(g,{isHandleFirstElement:!1,editorOptions:this.options}),c[d]=g[0]):Object.assign(R,t.properties)}}this.draw.render({isSetCursor:!1})}}deleteElementById(t){const{id:e,conceptId:n}=t;if(!e&&!n)return;let i=!1;function r(a){let c=0;for(;c<a.length;){const d=a[c];if(d.type===l.ElementType.TABLE){const u=d.trList;for(let R=0;R<u.length;R++){const h=u[R];for(let g=0;g<h.tdList.length;g++){const f=h.tdList[g];r(f.value)}}}d.type===l.ElementType.CONTROL&&d.control?.value&&r(d.control.value),(e&&d.id===e||n&&d.conceptId===n)&&(i=!0,a.splice(c,1),c--),c++}}const s=[this.draw.getOriginalMainElementList(),this.draw.getHeaderElementList(),this.draw.getFooterElementList()];for(const a of s)r(a);i&&this.draw.render({isSetCursor:!1})}getElementById(t){const{id:e,conceptId:n}=t,i=[];if(!e&&!n)return i;const r=a=>{let c=0;for(;c<a.length;){const d=a[c];if(c++,d.type===l.ElementType.TABLE){const u=d.trList;for(let R=0;R<u.length;R++){const h=u[R];for(let g=0;g<h.tdList.length;g++){const f=h.tdList[g];r(f.value)}}}e&&d.id!==e||n&&d.conceptId!==n||i.push(d)}},s=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const a of s)r(a);return Mt(i,{extraPickAttrs:["id"]})}setValue(t,e){this.draw.setValue(t,e)}removeControl(t){if(t?.id||t?.conceptId){const{id:e,conceptId:n}=t;let i=!1;const r=a=>{let c=a.length-1;for(;c>=0;){const d=a[c];if(d.type===l.ElementType.TABLE){const u=d.trList;for(let R=0;R<u.length;R++){const h=u[R];for(let g=0;g<h.tdList.length;g++){const f=h.tdList[g];r(f.value)}}}c--,!(!d.control||e&&d.controlId!==e||n&&d.control.conceptId!==n)&&(i=!0,a.splice(c+1,1))}},s=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const a of s)r(a);i&&this.draw.render({isSetCursor:!1})}else{const{startIndex:e,endIndex:n}=this.range.getRange();if(e!==n||!this.draw.getElementList()[e].controlId)return;const a=this.draw.getControl().removeControl(e);if(a===null)return;this.range.setRange(a,a),this.draw.render({curIndex:a})}}translate(t){return this.i18n.t(t)}setLocale(t){this.i18n.setLocale(t)}getLocale(){return this.i18n.getLocale()}getCatalog(){return this.workerManager.getCatalog()}locationCatalog(t){const e=this.draw.getOriginalElementList();function n(p,I){for(let L=0;L<p.length;L++){const P=p[L];if(P.type===l.ElementType.TABLE){const C=P.trList;for(let S=0;S<C.length;S++){const F=C[S];for(let N=0;N<F.tdList.length;N++){const V=F.tdList[N],Y=n(V.value,I);if(Y)return{...Y,isTable:!0,index:L,trIndex:S,tdIndex:N,tdId:V.id,trId:F.id,tableId:P.id}}}}if(P.titleId===I){let C=L;for(;C<p.length;){if(p[C+1]?.titleId!==I)return{isTable:!1,startIndex:C,endIndex:C};C++}}}return null}const i=n(e,t);if(!i)return;const{isTable:r,index:s,startTdIndex:a,endTdIndex:c,startTrIndex:d,endTrIndex:u,trIndex:R,tdIndex:h,tdId:g,trId:f,tableId:T,endIndex:m}=i;this.position.setPositionContext({isTable:r,index:s,trIndex:R,tdIndex:h,tdId:g,trId:f,tableId:T}),this.range.setRange(m,m,T,a,c,d,u),this.draw.render({curIndex:m,isCompute:!1,isSubmitHistory:!1})}wordTool(){const t=this.draw.getMainElementList();let e=!1;for(let n=0;n<t.length;n++)if(t[n].value===_)for(;n+1<t.length;){const r=t[n+1];if(r.value!==_&&r.value!==To)break;t.splice(n+1,1),e=!0}if(e)this.draw.render({isSetCursor:!1});else{const n=this.range.getIsCollapsed();this.draw.getCursor().drawCursor({isShow:n})}}setHTML(t){const{header:e,main:n,footer:i}=t,r=this.draw.getOriginalInnerWidth(),s=a=>a!==void 0?nn(a,{innerWidth:r}):void 0;this.setValue({header:s(e),main:s(n),footer:s(i)})}setGroup(){return this.draw.isReadonly()?null:this.draw.getGroup().setGroup()}deleteGroup(t){this.draw.isReadonly()||this.draw.getGroup().deleteGroup(t)}getGroupIds(){return this.draw.getWorkerManager().getGroupIds()}locationGroup(t){const e=this.draw.getOriginalMainElementList(),n=this.draw.getGroup().getContextByGroupId(e,t);if(!n)return;const{isTable:i,index:r,trIndex:s,tdIndex:a,tdId:c,trId:d,tableId:u,endIndex:R}=n;this.position.setPositionContext({isTable:i,index:r,trIndex:s,tdIndex:a,tdId:c,trId:d,tableId:u}),this.range.setRange(R,R),this.draw.render({curIndex:R,isCompute:!1,isSubmitHistory:!1})}setZone(t){this.draw.getZone().setZone(t)}getControlValue(t){return this.draw.getControl().getValueById(t)}setControlValue(t){this.draw.getControl().setValueListById([t])}setControlValueList(t){this.draw.getControl().setValueListById(t)}setControlExtension(t){this.draw.getControl().setExtensionListById([t])}setControlExtensionList(t){this.draw.getControl().setExtensionListById(t)}setControlProperties(t){this.draw.getControl().setPropertiesListById([t])}setControlPropertiesList(t){this.draw.getControl().setPropertiesListById(t)}setControlHighlight(t){this.draw.getControl().setHighlightList(t),this.draw.render({isSubmitHistory:!1})}updateOptions(t){const e=Do(t);Object.entries(e).forEach(([n,i])=>{Reflect.set(this.options,n,i)}),this.forceUpdate()}setFormModeTrace(t){Object.assign(this.options.modeRule.form,t),this.forceUpdate()}getControlList(){return this.draw.getControl().getList()}locationControl(t,e){function n(r,s){let a=0;for(;a<r.length;){const c=r[a];if(a++,c.type===l.ElementType.TABLE){const u=c.trList;for(let R=0;R<u.length;R++){const h=u[R];for(let g=0;g<h.tdList.length;g++){const f=h.tdList[g],T=n(f.value,s);if(T)return{...T,positionContext:{isTable:!0,index:a-1,trIndex:R,tdIndex:g,tdId:c.tdId,trId:c.trId,tableId:c.tableId}}}}}if(c?.controlId!==t)continue;let d=a-1;if(e?.position===l.LocationPosition.OUTER_AFTER){if(!(c.controlComponent===l.ControlComponent.POSTFIX&&r[a+1]?.controlComponent!==l.ControlComponent.POST_TEXT))continue}else if(e?.position===l.LocationPosition.OUTER_BEFORE)d-=1;else if(e?.position===l.LocationPosition.AFTER){if(d-=1,c.controlComponent!==l.ControlComponent.PLACEHOLDER&&c.controlComponent!==l.ControlComponent.POSTFIX&&c.controlComponent!==l.ControlComponent.POST_TEXT)continue}else if(c.controlComponent!==l.ControlComponent.PREFIX&&c.controlComponent!==l.ControlComponent.PRE_TEXT||r[a]?.controlComponent===l.ControlComponent.PREFIX||r[a]?.controlComponent===l.ControlComponent.PRE_TEXT)continue;return{zone:s,range:{startIndex:d,endIndex:d},positionContext:{isTable:!1}}}return null}const i=[{zone:l.EditorZone.HEADER,elementList:this.draw.getHeaderElementList()},{zone:l.EditorZone.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:l.EditorZone.FOOTER,elementList:this.draw.getFooterElementList()}];for(const r of i){const s=n(r.elementList,r.zone);if(s){this.setZone(s.zone),this.position.setPositionContext(s.positionContext),this.range.replaceRange(s.range),this.draw.render({curIndex:s.range.startIndex,isCompute:!1,isSubmitHistory:!1});break}}}insertTextField(t){if(this.draw.isReadonly()||this.draw.isDisabled()||!t)return;const n=at(t),{startIndex:i}=this.range.getRange(),r=this.draw.getElementList(),s=tn(r,i);if(!s)return;const a=[...ze,...$t,...In,...He];De(a,s,n),this.draw.insertElementTextField([n])}insertControl(t){if(this.draw.isReadonly()||this.draw.isDisabled())return;const n=at(t),{startIndex:i}=this.range.getRange(),r=this.draw.getElementList(),s=tn(r,i);if(!s)return;const a=r[i],c=a?.controlComponent===l.ControlComponent.POSTFIX||a?.controlComponent===l.ControlComponent.POSTTEXTFIX;let d=!1;if(a?.controlId&&!c)for(let R=i;R>=0;R--){const h=r[R];if(h.controlId!==a.controlId)break;if(h.controlComponent===l.ControlComponent.PRETEXTFIX||h.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){h.control?.type===l.ControlType.TEXTFIELD&&(d=!0);break}}if(!d&&!c){const R=r[i-1];if(R?.controlId)for(let h=i-1;h>=0;h--){const g=r[h];if(g.controlId!==R.controlId)break;if(g.controlComponent===l.ControlComponent.PRETEXTFIX||g.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){g.control?.type===l.ControlType.TEXTFIELD&&(d=!0);break}}}if(d&&t.control?.type===l.ControlType.TEXTFIELD)return;const u=[...ze,...$t,...In,...He];De(u,s,n),this.draw.insertElementList([n])}jumpControl(t){this.draw.getControl().initNextControl({direction:t?.direction})}getContainer(){return this.draw.getContainer()}getTitleValue(t){const{conceptId:e}=t,n=[],i=(s,a)=>{let c=0;for(;c<s.length;){const d=s[c];if(c++,d.type===l.ElementType.TABLE){const h=d.trList;for(let g=0;g<h.length;g++){const f=h[g];for(let T=0;T<f.tdList.length;T++){const m=f.tdList[T];i(m.value,a)}}}if(d?.title?.conceptId!==e)continue;const u=[];let R=c;for(;R<s.length;){const h=s[R];if(R++,d.titleId!==h.titleId){if(h.level&&Vo[h.level]<=Vo[d.level])break;u.push(h)}}n.push({...d.title,value:xe(u),elementList:Mt(u),zone:a}),c=R}},r=[{zone:l.EditorZone.HEADER,elementList:this.draw.getHeaderElementList()},{zone:l.EditorZone.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:l.EditorZone.FOOTER,elementList:this.draw.getFooterElementList()}];for(const{zone:s,elementList:a}of r)i(a,s);return n}getPositionContextByEvent(t,e={}){const n=t.target?.dataset.index;if(!n)return null;const{isMustDirectHit:i=!0}=e,r=Number(n),s=this.position.getPositionByXY({x:t.offsetX,y:t.offsetY,pageNo:r}),{isDirectHit:a,isTable:c,index:d,trIndex:u,tdIndex:R,tdValueIndex:h,zone:g}=s;if(i&&!a||g&&g!==this.zone.getZone())return null;let f=null,T=null;const m=this.draw.getOriginalElementList();let p=null;const I=this.position.getOriginalPositionList();if(c){const P=m[d].trList?.[u].tdList[R];T=P?.value[h]||null,p=P?.positionList?.[h]||null,f={element:m[d],trIndex:u,tdIndex:R}}else T=m[d]||null,p=I[d]||null;let L=null;if(p){const{pageNo:P,coordinate:{leftTop:C,rightTop:S},lineHeight:F}=p,N=this.draw.getOriginalHeight(),V=this.draw.getOriginalPageGap();L={x:C[0],y:C[1]+P*(N+V),width:S[0]-C[0],height:F}}return{pageNo:r,element:T,rangeRect:L,tableInfo:f}}insertTitle(t){if(this.draw.isReadonly()||this.draw.isDisabled())return;const n=at(t),{startIndex:i}=this.range.getRange(),r=this.draw.getElementList(),s=tn(r,i);if(!s)return;const a=[...ze,...$t,...In,...He];n.valueList?.forEach(c=>{De(a,s,c)}),this.draw.insertElementList([n])}focus(t){const{position:e=l.LocationPosition.AFTER,isMoveCursorToVisible:n=!0,rowNo:i,range:r}=t||{};let s=-1;if(r)this.range.replaceRange(r),s=e===l.LocationPosition.BEFORE?r.startIndex:r.endIndex;else if(Oo(i)){const c=this.draw.getOriginalRowList();if(s=e===l.LocationPosition.BEFORE?c[i]?.startIndex:c[i+1]?.startIndex-1,!Oo(s))return;this.range.setRange(s,s)}else s=e===l.LocationPosition.BEFORE?0:this.draw.getOriginalMainElementList().length-1,this.range.setRange(s,s);const a={isCompute:!1,isSetCursor:!1,isSubmitHistory:!1};n&&~s&&this.range.getIsCollapsed()&&(a.curIndex=s,a.isSetCursor=!0),this.draw.render(a)}insertArea(t){return this.draw.getArea().insertArea(t)}setAreaValue(t){return this.draw.getArea().setAreaValue(t)}setAreaProperties(t){this.draw.getArea().setAreaProperties(t)}locationArea(t,e){if(e?.isAppendLastLineBreak&&e?.position===l.LocationPosition.OUTER_AFTER){const r=this.draw.getOriginalMainElementList();r[r.length-1].areaId===t&&this.draw.appendElementList([{value:_}],{isSubmitHistory:!1})}const n=this.draw.getArea().getContextByAreaId(t,e);if(!n)return;const{range:{endIndex:i}}=n;this.position.setPositionContext({isTable:!1}),this.range.setRange(i,i),this.draw.render({curIndex:i,isSetCursor:!0,isCompute:!1,isSubmitHistory:!1})}clearGraffiti(){this.draw.getGraffiti().clear(),this.draw.isGraffitiMode()&&this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1})}getMacroValue(t){const{id:e,dictCode:n,label:i,areaId:r}=t,s=[],a=(d,u)=>{for(const R of d){if(R.type===l.ElementType.TABLE){const g=R.trList;for(const f of g)for(const T of f.tdList)a(T.value,u);continue}if(R.type!==l.ElementType.MACRO&&R.type!==l.ElementType.CUSTOM_MACRO&&R.type!==l.ElementType.REUSABLE_ITEM||e&&R.id!==e||n&&R.dictCode!==n||i&&R.label!==i||r&&R.areaId!==r)continue;const h={id:R.id,type:R.type,label:R.label,dictCode:R.dictCode,zone:u};R.type===l.ElementType.MACRO?h.value=R.value:R.type===l.ElementType.CUSTOM_MACRO?(h.macroConfig=R.macroConfig,h.value=R.macroConfig?.value):R.type===l.ElementType.REUSABLE_ITEM&&(h.reusableItemConfig=R.reusableItemConfig,h.value=R.reusableItemConfig?.value),s.push(h)}},c=[{zone:l.EditorZone.HEADER,elementList:this.draw.getHeaderElementList()},{zone:l.EditorZone.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:l.EditorZone.FOOTER,elementList:this.draw.getFooterElementList()}];for(const{zone:d,elementList:u}of c)a(u,d);return s}getMacroList(){const t=[],e=i=>{for(const r of i){if(r.type===l.ElementType.TABLE){const s=r.trList;for(const a of s)for(const c of a.tdList)e(c.value);continue}(r.type===l.ElementType.MACRO||r.type===l.ElementType.CUSTOM_MACRO||r.type===l.ElementType.REUSABLE_ITEM)&&t.push(r)}},n=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const i of n)e(i);return t}setMacroValue(t){const{id:e,dictCode:n,label:i,areaId:r,value:s,code:a,isSubmitHistory:c=!0}=t;let d=!1;const u=h=>{for(let g=0;g<h.length;g++){const f=h[g];if(f.type===l.ElementType.TABLE){const T=f.trList;for(const m of T)for(const p of m.tdList)u(p.value);continue}f.type!==l.ElementType.MACRO&&f.type!==l.ElementType.CUSTOM_MACRO&&f.type!==l.ElementType.REUSABLE_ITEM||e&&f.id!==e||n&&f.dictCode!==n||i&&f.label!==i||r&&f.areaId!==r||(d=!0,f.type===l.ElementType.MACRO?f.value=s:f.type===l.ElementType.CUSTOM_MACRO?f.macroConfig?(f.macroConfig.value=s,a!==void 0&&(f.macroConfig.code=a)):f.macroConfig={type:"text",value:s}:f.type===l.ElementType.REUSABLE_ITEM&&(f.reusableItemConfig?f.reusableItemConfig.value=s:f.reusableItemConfig={value:s}))}},R=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const h of R)u(h);d&&this.draw.render({isSubmitHistory:c,isSetCursor:!1})}setMacroValueList(t){if(!t.length)return;let e=!1,n=!1;const i=s=>{for(let a=0;a<s.length;a++){const c=s[a];if(c.type===l.ElementType.TABLE){const g=c.trList;for(const f of g)for(const T of f.tdList)i(T.value);continue}if(c.type!==l.ElementType.MACRO&&c.type!==l.ElementType.CUSTOM_MACRO&&c.type!==l.ElementType.REUSABLE_ITEM)continue;const d=t.find(g=>g.id&&c.id===g.id||g.dictCode&&c.dictCode===g.dictCode||g.label&&c.label===g.label||g.areaId&&c.areaId===g.areaId);if(!d)continue;const{value:u,code:R,isSubmitHistory:h=!0}=d;e=!0,h&&(n=!0),c.type===l.ElementType.MACRO?c.value=u:c.type===l.ElementType.CUSTOM_MACRO?c.macroConfig?(c.macroConfig.value=u,R!==void 0&&(c.macroConfig.code=R)):c.macroConfig={type:"text",value:u}:c.type===l.ElementType.REUSABLE_ITEM&&(c.reusableItemConfig?c.reusableItemConfig.value=u:c.reusableItemConfig={value:u})}},r=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const s of r)i(s);e&&(n||this.draw.getHistoryManager().recovery(),this.draw.render({isSubmitHistory:n,isSetCursor:!1}))}updateMacroProperties(t){const{id:e,dictCode:n,label:i,areaId:r,properties:s,isSubmitHistory:a=!0}=t;let c=!1;const d=R=>{for(let h=0;h<R.length;h++){const g=R[h];if(g.type===l.ElementType.TABLE){const f=g.trList;for(const T of f)for(const m of T.tdList)d(m.value);continue}g.type!==l.ElementType.MACRO&&g.type!==l.ElementType.CUSTOM_MACRO&&g.type!==l.ElementType.REUSABLE_ITEM||e&&g.id!==e||n&&g.dictCode!==n||i&&g.label!==i||r&&g.areaId!==r||(c=!0,Object.assign(g,s))}},u=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const R of u)d(R);c&&this.draw.render({isSubmitHistory:a,isSetCursor:!1})}locationMacro(t){const{id:e,dictCode:n,label:i,areaId:r}=t,s=(c,d)=>{for(let u=0;u<c.length;u++){const R=c[u];if(R.type===l.ElementType.TABLE){const h=R.trList;for(let g=0;g<h.length;g++){const f=h[g];for(let T=0;T<f.tdList.length;T++){const m=f.tdList[T],p=s(m.value,d);if(p)return{...p,isTable:!0,index:u,trIndex:g,tdIndex:T,tableId:R.tableId,trId:f.id,tdId:m.id}}}}if(!(R.type!==l.ElementType.MACRO&&R.type!==l.ElementType.CUSTOM_MACRO&&R.type!==l.ElementType.REUSABLE_ITEM)&&!(e&&R.id!==e)&&!(n&&R.dictCode!==n)&&!(i&&R.label!==i)&&!(r&&R.areaId!==r))return{zone:d,index:u}}return null},a=[{zone:l.EditorZone.HEADER,elementList:this.draw.getHeaderElementList()},{zone:l.EditorZone.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:l.EditorZone.FOOTER,elementList:this.draw.getFooterElementList()}];for(const{zone:c,elementList:d}of a){const u=s(d,c);if(u){this.setZone(u.zone),this.position.setPositionContext({isTable:u.isTable||!1,index:u.index,trIndex:u.trIndex,tdIndex:u.tdIndex,tableId:u.tableId,trId:u.trId,tdId:u.tdId}),this.range.replaceRange({startIndex:u.index,endIndex:u.index}),this.draw.render({curIndex:u.index,isCompute:!1,isSubmitHistory:!1});break}}}insertSubTemplate(t){const{label:e,templateId:n,content:i,conditions:r,relation:s="and",isSubmitHistory:a=!0}=t,c={id:lt(),value:e,type:l.ElementType.SUB_TEMPLATE,label:e,templateId:n,subTemplateContent:i?.map(d=>at(d)),subTemplateRelation:s,subTemplateConditions:r?.map(d=>({...d})),subTemplateExpanded:!1};this.insertElementList([c],{isSubmitHistory:a})}updateSubTemplate(t){const{id:e,properties:n,isSubmitHistory:i=!0}=t;if(!e)return;const r=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];let s=!1;for(let a=0;a<r.length;a++)gr(r[a],c=>{c.id!==e||c.type!==l.ElementType.SUB_TEMPLATE||(Object.assign(c,{...n,value:n.label??c.value,subTemplateContent:n.subTemplateContent?n.subTemplateContent.map(d=>at(d)):c.subTemplateContent?.map(d=>at(d)),subTemplateConditions:n.subTemplateConditions?n.subTemplateConditions.map(d=>({...d})):c.subTemplateConditions?.map(d=>({...d}))}),s=!0)});s&&this.draw.render({isSubmitHistory:i,isCompute:!0})}expandSubTemplate(t){const{id:e,content:n,isSubmitHistory:i=!0}=t,r=this.draw.getOriginalMainElementList();for(let s=0;s<r.length;s++){const a=r[s];if(a.type===l.ElementType.SUB_TEMPLATE&&(!e||a.id===e)){const c=n||a.subTemplateContent;if(!c?.length){console.warn("子模板内容为空,无法展开");return}a.subTemplateExpanded=!0,a.hide=!0;const d=at(c);bt(d,{isHandleFirstElement:!1,editorOptions:this.options});for(let u=0;u<d.length;u++)d[u].subTemplateParentId=a.id;r.splice(s+1,0,...d),this.draw.render({isSubmitHistory:i,isCompute:!0});return}}}collapseSubTemplate(t){const{id:e,isSubmitHistory:n=!0}=t,i=this.draw.getOriginalMainElementList();for(let r=0;r<i.length;r++){const s=i[r];if(s.type===l.ElementType.SUB_TEMPLATE&&(!e||s.id===e)){s.subTemplateExpanded=!1,s.hide=!1;let a=r+1;for(;a<i.length&&i[a].subTemplateParentId===s.id;)a++;a>r+1&&i.splice(r+1,a-r-1),this.draw.render({isSubmitHistory:n,isCompute:!0});return}}}toggleSubTemplate(t){const{id:e,content:n,isSubmitHistory:i=!0}=t,r=this.draw.getOriginalMainElementList();for(let s=0;s<r.length;s++){const a=r[s];if(a.type===l.ElementType.SUB_TEMPLATE&&(!e||a.id===e)){a.subTemplateExpanded?this.collapseSubTemplate({id:e,isSubmitHistory:i}):this.expandSubTemplate({id:e,content:n,isSubmitHistory:i});return}}}}class ug{rangeStyleChange;visiblePageNoListChange;intersectionPageNoChange;pageSizeChange;pageScaleChange;saved;contentChange;controlChange;controlContentChange;pageModeChange;zoneChange;constructor(){this.rangeStyleChange=null,this.visiblePageNoListChange=null,this.intersectionPageNoChange=null,this.pageSizeChange=null,this.pageScaleChange=null,this.saved=null,this.contentChange=null,this.controlChange=null,this.controlContentChange=null,this.pageModeChange=null,this.zoneChange=null}}class Rg{contextMenu;contextMenuList;getContextMenuList;shortcutList;langMap;constructor(t){const{contextMenu:e,shortcut:n,i18n:i}=t;this.contextMenu=e,this.contextMenuList=e.registerContextMenuList.bind(e),this.getContextMenuList=e.getContextMenuList.bind(e),this.shortcutList=n.registerShortcutList.bind(n),this.langMap=i.registerLangMap.bind(i)}disposeContextMenu(){this.contextMenu.dispose()}}const Wr={SELECTED_TEXT:"%s"},pn={GLOBAL:{CUT:"globalCut",COPY:"globalCopy",PASTE:"globalPaste",SELECT_ALL:"globalSelectAll",PRINT:"globalPrint"},CONTROL:{DELETE:"controlDelete",EDIT_ATTRIBUTE:"controlEditAttribute",COPY:"controlCopy",PASTE:"controlPaste"},HYPERLINK:{DELETE:"hyperlinkDelete",CANCEL:"hyperlinkCancel",EDIT:"hyperlinkEdit"},IMAGE:{CHANGE:"imageChange",SAVE_AS:"imageSaveAs",TEXT_WRAP:"imageTextWrap",TEXT_WRAP_EMBED:"imageTextWrapEmbed",TEXT_WRAP_UP_DOWN:"imageTextWrapUpDown",TEXT_WRAP_SURROUND:"imageTextWrapSurround",TEXT_WRAP_FLOAT_TOP:"imageTextWrapFloatTop",TEXT_WRAP_FLOAT_BOTTOM:"imageTextWrapFloatBottom"},TABLE:{BORDER:"border",BORDER_ALL:"tableBorderAll",BORDER_EMPTY:"tableBorderEmpty",BORDER_DASH:"tableBorderDash",BORDER_EXTERNAL:"tableBorderExternal",BORDER_INTERNAL:"tableBorderInternal",BORDER_TD:"tableBorderTd",BORDER_TD_TOP:"tableBorderTdTop",BORDER_TD_RIGHT:"tableBorderTdRight",BORDER_TD_BOTTOM:"tableBorderTdBottom",BORDER_TD_LEFT:"tableBorderTdLeft",BORDER_TD_FORWARD:"tableBorderTdForward",BORDER_TD_BACK:"tableBorderTdBack",VERTICAL_ALIGN:"tableVerticalAlign",VERTICAL_ALIGN_TOP:"tableVerticalAlignTop",VERTICAL_ALIGN_MIDDLE:"tableVerticalAlignMiddle",VERTICAL_ALIGN_BOTTOM:"tableVerticalAlignBottom",INSERT_ROW_COL:"tableInsertRowCol",INSERT_TOP_ROW:"tableInsertTopRow",INSERT_BOTTOM_ROW:"tableInsertBottomRow",INSERT_LEFT_COL:"tableInsertLeftCol",INSERT_RIGHT_COL:"tableInsertRightCol",DELETE_ROW_COL:"tableDeleteRowCol",DELETE_ROW:"tableDeleteRow",DELETE_COL:"tableDeleteCol",DELETE_TABLE:"tableDeleteTable",MERGE_CELL:"tableMergeCell",CANCEL_MERGE_CELL:"tableCancelMergeCell",TABLE_PROPERTIES:"tableProperties"}},{CONTROL:{DELETE:hg,EDIT_ATTRIBUTE:gg,COPY:fg,PASTE:Tg}}=pn;function Vr(o,t){if(t!==l.EditorMode.EDIT)return!1;const n=o?.control?.type,i=o?.controlComponent,r=n===l.ControlType.TEXT||n===l.ControlType.TEXTFIELD||n===l.ControlType.NUMBER||n===l.ControlType.SELECT||n===l.ControlType.DATE||n===l.ControlType.CHECKBOX||n===l.ControlType.RADIO||n===l.ControlType.BUTTON,s=i==="prefix"||i==="preText"||i==="preTextFix"||i==="textFixLabel"||n===l.ControlType.BUTTON&&i==="value";return r&&s}const mg=[{key:fg,name:"复制控件",when:o=>!o.isReadonly&&!o.editorHasSelection&&!!o.startElement?.controlId&&Vr(o.startElement,o.options.mode),callback:(o,t)=>{const e=t.startElement?.controlId;e&&o.executeCopyControl(e)}},{key:Tg,name:"粘贴控件",when:o=>!o.isReadonly&&!o.editorHasSelection&&o.editorTextFocus&&o.options.mode===l.EditorMode.EDIT&&ia(),callback:o=>{o.executePasteControl()}},{key:hg,i18nPath:"contextmenu.control.delete",when:o=>!o.isReadonly&&!o.editorHasSelection&&!!o.startElement?.controlId&&o.options.mode!==l.EditorMode.FORM,callback:o=>{o.executeRemoveControl()}},{key:gg,i18nPath:"contextmenu.control.editAttribute",when:o=>!o.isReadonly&&!o.editorHasSelection&&!!o.startElement?.controlId&&Vr(o.startElement,o.options.mode),callback:(o,t)=>{const e=t.startElement?.controlId;e&&o.executeTriggerControlEditAttribute(e)}}],{GLOBAL:{CUT:pg,COPY:Lg,PASTE:Ig,SELECT_ALL:Pg,PRINT:Mg}}=pn,Og=[{key:pg,i18nPath:"contextmenu.global.cut",shortCut:`${Ke?"⌘":"Ctrl"} + X`,when:o=>!o.isReadonly,callback:o=>{o.executeCut()}},{key:Lg,i18nPath:"contextmenu.global.copy",shortCut:`${Ke?"⌘":"Ctrl"} + C`,when:o=>o.editorHasSelection||o.isCrossRowCol,callback:o=>{o.executeCopy()}},{key:Ig,i18nPath:"contextmenu.global.paste",shortCut:`${Ke?"⌘":"Ctrl"} + V`,when:o=>!o.isReadonly&&o.editorTextFocus,callback:o=>{o.executePaste()}},{key:Pg,i18nPath:"contextmenu.global.selectAll",shortCut:`${Ke?"⌘":"Ctrl"} + A`,when:o=>o.editorTextFocus,callback:o=>{o.executeSelectAll()}},{isDivider:!0},{key:Mg,i18nPath:"contextmenu.global.print",icon:"print",when:()=>!0,callback:o=>{o.executePrint()}}],{HYPERLINK:{DELETE:Cg,CANCEL:Sg,EDIT:Eg}}=pn,Xg=[{key:Cg,i18nPath:"contextmenu.hyperlink.delete",when:o=>!o.isReadonly&&o.startElement?.type===l.ElementType.HYPERLINK,callback:o=>{o.executeDeleteHyperlink()}},{key:Sg,i18nPath:"contextmenu.hyperlink.cancel",when:o=>!o.isReadonly&&o.startElement?.type===l.ElementType.HYPERLINK,callback:o=>{o.executeCancelHyperlink()}},{key:Eg,i18nPath:"contextmenu.hyperlink.edit",when:o=>!o.isReadonly&&o.startElement?.type===l.ElementType.HYPERLINK,callback:(o,t)=>{const e=window.prompt(o.executeTranslate("contextmenu.hyperlink.edit"),t.startElement?.url);e&&o.executeEditHyperlink(e)}}],{IMAGE:{CHANGE:Ng,SAVE_AS:Fg,TEXT_WRAP:yg,TEXT_WRAP_EMBED:bg,TEXT_WRAP_UP_DOWN:Wg,TEXT_WRAP_SURROUND:Vg,TEXT_WRAP_FLOAT_TOP:Yg,TEXT_WRAP_FLOAT_BOTTOM:Dg}}=pn,Ug=[{key:Ng,i18nPath:"contextmenu.image.change",icon:"image-change",when:o=>!o.isReadonly&&!o.editorHasSelection&&o.startElement?.type===l.ElementType.IMAGE,callback:o=>{const t=document.createElement("input");t.type="file",t.accept=".png, .jpg, .jpeg",t.onchange=()=>{const e=t.files[0],n=new FileReader;n.readAsDataURL(e),n.onload=()=>{const i=n.result;o.executeReplaceImageElement(i)}},t.click()}},{key:Fg,i18nPath:"contextmenu.image.saveAs",icon:"image",when:o=>!o.editorHasSelection&&o.startElement?.type===l.ElementType.IMAGE,callback:o=>{o.executeSaveAsImageElement()}},{key:yg,i18nPath:"contextmenu.image.textWrap",when:o=>!o.isReadonly&&!o.editorHasSelection&&o.startElement?.type===l.ElementType.IMAGE,childMenus:[{key:bg,i18nPath:"contextmenu.image.textWrapType.embed",when:()=>!0,callback:(o,t)=>{o.executeChangeImageDisplay(t.startElement,l.ImageDisplay.BLOCK)}},{key:Wg,i18nPath:"contextmenu.image.textWrapType.upDown",when:()=>!0,callback:(o,t)=>{o.executeChangeImageDisplay(t.startElement,l.ImageDisplay.INLINE)}},{key:Vg,i18nPath:"contextmenu.image.textWrapType.surround",when:()=>!0,callback:(o,t)=>{o.executeChangeImageDisplay(t.startElement,l.ImageDisplay.SURROUND)}},{key:Yg,i18nPath:"contextmenu.image.textWrapType.floatTop",when:()=>!0,callback:(o,t)=>{o.executeChangeImageDisplay(t.startElement,l.ImageDisplay.FLOAT_TOP)}},{key:Dg,i18nPath:"contextmenu.image.textWrapType.floatBottom",when:()=>!0,callback:(o,t)=>{o.executeChangeImageDisplay(t.startElement,l.ImageDisplay.FLOAT_BOTTOM)}}]}],{TABLE:{BORDER:wg,BORDER_ALL:Zg,BORDER_EMPTY:Qg,BORDER_DASH:vg,BORDER_EXTERNAL:Kg,BORDER_INTERNAL:Hg,BORDER_TD:_g,BORDER_TD_TOP:xg,BORDER_TD_LEFT:Gg,BORDER_TD_BOTTOM:Ag,BORDER_TD_RIGHT:kg,BORDER_TD_BACK:Jg,BORDER_TD_FORWARD:Bg,VERTICAL_ALIGN:$g,VERTICAL_ALIGN_TOP:zg,VERTICAL_ALIGN_MIDDLE:jg,VERTICAL_ALIGN_BOTTOM:qg,INSERT_ROW_COL:tf,INSERT_TOP_ROW:ef,INSERT_BOTTOM_ROW:nf,INSERT_LEFT_COL:of,INSERT_RIGHT_COL:sf,DELETE_ROW_COL:rf,DELETE_ROW:lf,DELETE_COL:af,DELETE_TABLE:cf,MERGE_CELL:df,CANCEL_MERGE_CELL:uf}}=pn,Rf=[{isDivider:!0},{key:wg,i18nPath:"contextmenu.table.border",icon:"border-all",when:o=>!o.isReadonly&&o.isInTable&&o.options.mode!==l.EditorMode.FORM,childMenus:[{key:Zg,i18nPath:"contextmenu.table.borderAll",icon:"border-all",when:()=>!0,callback:o=>{o.executeTableBorderType(l.TableBorder.ALL)}},{key:Qg,i18nPath:"contextmenu.table.borderEmpty",icon:"border-empty",when:()=>!0,callback:o=>{o.executeTableBorderType(l.TableBorder.EMPTY)}},{key:vg,i18nPath:"contextmenu.table.borderDash",icon:"border-dash",when:()=>!0,callback:o=>{o.executeTableBorderType(l.TableBorder.DASH)}},{key:Kg,i18nPath:"contextmenu.table.borderExternal",icon:"border-external",when:()=>!0,callback:o=>{o.executeTableBorderType(l.TableBorder.EXTERNAL)}},{key:Hg,i18nPath:"contextmenu.table.borderInternal",icon:"border-internal",when:()=>!0,callback:o=>{o.executeTableBorderType(l.TableBorder.INTERNAL)}},{key:_g,i18nPath:"contextmenu.table.borderTd",icon:"border-td",when:()=>!0,childMenus:[{key:xg,i18nPath:"contextmenu.table.borderTdTop",icon:"border-td-top",when:()=>!0,callback:o=>{o.executeTableTdBorderType(l.TdBorder.TOP)}},{key:kg,i18nPath:"contextmenu.table.borderTdRight",icon:"border-td-right",when:()=>!0,callback:o=>{o.executeTableTdBorderType(l.TdBorder.RIGHT)}},{key:Ag,i18nPath:"contextmenu.table.borderTdBottom",icon:"border-td-bottom",when:()=>!0,callback:o=>{o.executeTableTdBorderType(l.TdBorder.BOTTOM)}},{key:Gg,i18nPath:"contextmenu.table.borderTdLeft",icon:"border-td-left",when:()=>!0,callback:o=>{o.executeTableTdBorderType(l.TdBorder.LEFT)}},{key:Bg,i18nPath:"contextmenu.table.borderTdForward",icon:"border-td-forward",when:()=>!0,callback:o=>{o.executeTableTdSlashType(l.TdSlash.FORWARD)}},{key:Jg,i18nPath:"contextmenu.table.borderTdBack",icon:"border-td-back",when:()=>!0,callback:o=>{o.executeTableTdSlashType(l.TdSlash.BACK)}}]}]},{key:$g,i18nPath:"contextmenu.table.verticalAlign",icon:"vertical-align",when:o=>!o.isReadonly&&o.isInTable&&o.options.mode!==l.EditorMode.FORM,childMenus:[{key:zg,i18nPath:"contextmenu.table.verticalAlignTop",icon:"vertical-align-top",when:()=>!0,callback:o=>{o.executeTableTdVerticalAlign(l.VerticalAlign.TOP)}},{key:jg,i18nPath:"contextmenu.table.verticalAlignMiddle",icon:"vertical-align-middle",when:()=>!0,callback:o=>{o.executeTableTdVerticalAlign(l.VerticalAlign.MIDDLE)}},{key:qg,i18nPath:"contextmenu.table.verticalAlignBottom",icon:"vertical-align-bottom",when:()=>!0,callback:o=>{o.executeTableTdVerticalAlign(l.VerticalAlign.BOTTOM)}}]},{key:tf,i18nPath:"contextmenu.table.insertRowCol",icon:"insert-row-col",when:o=>!o.isReadonly&&o.isInTable&&o.options.mode!==l.EditorMode.FORM,childMenus:[{key:ef,i18nPath:"contextmenu.table.insertTopRow",icon:"insert-top-row",when:()=>!0,callback:o=>{o.executeInsertTableTopRow()}},{key:nf,i18nPath:"contextmenu.table.insertBottomRow",icon:"insert-bottom-row",when:()=>!0,callback:o=>{o.executeInsertTableBottomRow()}},{key:of,i18nPath:"contextmenu.table.insertLeftCol",icon:"insert-left-col",when:()=>!0,callback:o=>{o.executeInsertTableLeftCol()}},{key:sf,i18nPath:"contextmenu.table.insertRightCol",icon:"insert-right-col",when:()=>!0,callback:o=>{o.executeInsertTableRightCol()}}]},{key:rf,i18nPath:"contextmenu.table.deleteRowCol",icon:"delete-row-col",when:o=>!o.isReadonly&&o.isInTable&&o.options.mode!==l.EditorMode.FORM,childMenus:[{key:lf,i18nPath:"contextmenu.table.deleteRow",icon:"delete-row",when:()=>!0,callback:o=>{o.executeDeleteTableRow()}},{key:af,i18nPath:"contextmenu.table.deleteCol",icon:"delete-col",when:()=>!0,callback:o=>{o.executeDeleteTableCol()}},{key:cf,i18nPath:"contextmenu.table.deleteTable",icon:"delete-table",when:()=>!0,callback:o=>{o.executeDeleteTable()}}]},{key:df,i18nPath:"contextmenu.table.mergeCell",icon:"merge-cell",when:o=>!o.isReadonly&&o.isCrossRowCol&&o.options.mode!==l.EditorMode.FORM,callback:o=>{o.executeMergeTableCell()}},{key:uf,i18nPath:"contextmenu.table.mergeCancelCell",icon:"merge-cancel-cell",when:o=>!o.isReadonly&&o.isInTable&&o.options.mode!==l.EditorMode.FORM,callback:o=>{o.executeCancelMergeTableCell()}}];class hf{options;draw;command;range;position;i18n;container;contextMenuList;contextMenuContainerList;contextMenuRelationShip;context;constructor(t,e){this.options=t.getOptions(),this.draw=t,this.command=e,this.range=t.getRange(),this.position=t.getPosition(),this.i18n=t.getI18n(),this.container=t.getContainer(),this.context=null,this.contextMenuList=[...Og,...Rf,...Ug,...mg,...Xg],this.contextMenuContainerList=[],this.contextMenuRelationShip=new Map,this._addEvent()}getContextMenuList(){return this.contextMenuList}_addEvent(){this.container.addEventListener("contextmenu",this._proxyContextMenuEvent),document.addEventListener("mousedown",this._handleSideEffect)}removeEvent(){this.container.removeEventListener("contextmenu",this._proxyContextMenuEvent),document.removeEventListener("mousedown",this._handleSideEffect)}_filterMenuList(t){const{contextMenuDisableKeys:e}=this.options,n=[];for(let i=0;i<t.length;i++){const r=t[i];r.disable||r.key&&e.includes(r.key)||(r.isDivider||r.when?.(this.context))&&n.push(r)}return n}_proxyContextMenuEvent=t=>{this.context=this._getContext(t);const e=this._filterMenuList(this.contextMenuList);e.some(i=>!i.isDivider)&&(this.dispose(),this._render({contextMenuList:e,left:t.x,top:t.y})),t.preventDefault()};_handleSideEffect=t=>{const e=t.target;this.contextMenuContainerList.some(i=>i.contains(e))||this.dispose()};_getContext(t){const e=this.draw.isReadonly(),{isCrossRowCol:n,startIndex:i,endIndex:r}=this.range.getRange(),s=!!(~i||~r),a=s&&i!==r,{isTable:c,trIndex:d,tdIndex:u,index:R}=this.position.getPositionContext(),h=t?this.command.getPositionContextByEvent(t,{isMustDirectHit:!0}):null;let g=null;if(c){const P=this.draw.getOriginalElementList()[R]||null;P&&(g=Mt([P],{extraPickAttrs:["id"]})[0])}const f=c&&!!n,T=this.draw.getElementList();let m=T[i]||null,p=T[r]||null;h?.element&&(m=h.element,p=h.element),h?.tableInfo?.element&&(g=h.tableInfo.element);const I=this.draw.getZone().getZone();return{startElement:m,endElement:p,isReadonly:e,editorHasSelection:a,editorTextFocus:s,isCrossRowCol:f,zone:I,isInTable:c,trIndex:d??null,tdIndex:u??null,tableElement:g,options:this.options}}_createContextMenuContainer(){const t=document.createElement("div");return t.classList.add(`${z}-contextmenu-container`),t.setAttribute(ue,l.EditorComponent.CONTEXTMENU),this.container.append(t),t}_render(t){const{contextMenuList:e,left:n,top:i,parentMenuContainer:r}=t,s=this._createContextMenuContainer(),a=document.createElement("div");a.classList.add(`${z}-contextmenu-content`);let c=null;r&&this.contextMenuRelationShip.set(r,s);for(let P=0;P<e.length;P++){const C=e[P];if(C.isDivider){if(P!==0&&P!==e.length-1&&!e[P-1]?.isDivider){const S=document.createElement("div");S.classList.add(`${z}-contextmenu-divider`),a.append(S)}}else{const S=document.createElement("div");if(S.classList.add(`${z}-contextmenu-item`),C.childMenus){const Y=this._filterMenuList(C.childMenus);Y.some(W=>!W.isDivider)&&(S.classList.add(`${z}-contextmenu-sub-item`),S.onmouseenter=()=>{this._setHoverStatus(S,!0),this._removeSubMenu(s);const W=S.getBoundingClientRect(),X=W.left+W.width,O=W.top;c=this._render({contextMenuList:Y,left:X,top:O,parentMenuContainer:s})},S.onmouseleave=W=>{(!c||!c.contains(W.relatedTarget))&&this._setHoverStatus(S,!1)})}else S.onmouseenter=()=>{this._setHoverStatus(S,!0),this._removeSubMenu(s)},S.onmouseleave=()=>{this._setHoverStatus(S,!1)},S.onclick=()=>{C.callback&&this.context&&C.callback(this.command,this.context),this.dispose()};const F=document.createElement("i");S.append(F),C.icon&&F.classList.add(`${z}-contextmenu-${C.icon}`);const N=document.createElement("span"),V=C.i18nPath?this._formatName(this.i18n.t(C.i18nPath)):this._formatName(C.name||"");if(N.append(document.createTextNode(V)),S.append(N),C.shortCut){const Y=document.createElement("span");Y.classList.add(`${z}-shortcut`),Y.append(document.createTextNode(C.shortCut)),S.append(Y)}a.append(S)}}const d=document.createElement("div");d.classList.add(`${z}-contextmenu-divider`),a.append(d);const u=document.createElement("div");u.classList.add(`${z}-contextmenu-item`),u.onmouseenter=()=>{this._setHoverStatus(u,!0),this._removeSubMenu(s)},u.onmouseleave=()=>{this._setHoverStatus(u,!1)},u.onclick=()=>{this.dispose()};const R=document.createElement("i");u.append(R);const h=document.createElement("span");h.append(document.createTextNode(this.i18n.t("contextmenu.global.cancel"))),u.append(h),a.append(u),s.append(a),s.style.display="block";const g=window.innerWidth,f=s.getBoundingClientRect(),T=f.width,m=n+T>g?n-T:n;s.style.left=`${m}px`;const p=window.innerHeight,I=f.height,L=i+I>p?i-I:i;return s.style.top=`${L}px`,this.contextMenuContainerList.push(s),s}_removeSubMenu(t){const e=this.contextMenuRelationShip.get(t);e&&(this._removeSubMenu(e),e.remove(),this.contextMenuRelationShip.delete(t))}_setHoverStatus(t,e){e?(t.parentNode?.querySelectorAll(`${z}-contextmenu-item`).forEach(n=>n.classList.remove("hover")),t.classList.add("hover")):t.classList.remove("hover")}_formatName(t){const e=Object.values(Wr),n=new RegExp(`${e.join("|")}`);let i=t;if(n.test(i)){const r=new RegExp(Wr.SELECTED_TEXT,"g");if(r.test(i)){const s=this.range.toString();i=i.replace(r,s)}}return i}registerContextMenuList(t){this.contextMenuList.push(...t)}dispose(){this.contextMenuContainerList.forEach(t=>t.remove()),this.contextMenuContainerList=[],this.contextMenuRelationShip.clear()}}const gf=[{key:l.KeyMap.X,ctrl:!0,shift:!0,callback:o=>{o.executeStrikeout()}},{key:l.KeyMap.LEFT_BRACKET,mod:!0,callback:o=>{o.executeSizeAdd()}},{key:l.KeyMap.RIGHT_BRACKET,mod:!0,callback:o=>{o.executeSizeMinus()}},{key:l.KeyMap.B,mod:!0,callback:o=>{o.executeBold()}},{key:l.KeyMap.I,mod:!0,callback:o=>{o.executeItalic()}},{key:l.KeyMap.U,mod:!0,callback:o=>{o.executeUnderline()}},{key:Ke?l.KeyMap.COMMA:l.KeyMap.RIGHT_ANGLE_BRACKET,mod:!0,shift:!0,callback:o=>{o.executeSuperscript()}},{key:Ke?l.KeyMap.PERIOD:l.KeyMap.LEFT_ANGLE_BRACKET,mod:!0,shift:!0,callback:o=>{o.executeSubscript()}},{key:l.KeyMap.L,mod:!0,callback:o=>{o.executeRowFlex(l.RowFlex.LEFT)}},{key:l.KeyMap.E,mod:!0,callback:o=>{o.executeRowFlex(l.RowFlex.CENTER)}},{key:l.KeyMap.R,mod:!0,callback:o=>{o.executeRowFlex(l.RowFlex.RIGHT)}},{key:l.KeyMap.J,mod:!0,callback:o=>{o.executeRowFlex(l.RowFlex.ALIGNMENT)}},{key:l.KeyMap.J,mod:!0,shift:!0,callback:o=>{o.executeRowFlex(l.RowFlex.JUSTIFY)}}],ff=[{key:l.KeyMap.ZERO,alt:!0,ctrl:!0,callback:o=>{o.executeTitle(null)}},{key:l.KeyMap.ONE,alt:!0,ctrl:!0,callback:o=>{o.executeTitle(l.TitleLevel.FIRST)}},{key:l.KeyMap.TWO,alt:!0,ctrl:!0,callback:o=>{o.executeTitle(l.TitleLevel.SECOND)}},{key:l.KeyMap.THREE,alt:!0,ctrl:!0,callback:o=>{o.executeTitle(l.TitleLevel.THIRD)}},{key:l.KeyMap.FOUR,alt:!0,ctrl:!0,callback:o=>{o.executeTitle(l.TitleLevel.FOURTH)}},{key:l.KeyMap.FIVE,alt:!0,ctrl:!0,callback:o=>{o.executeTitle(l.TitleLevel.FIFTH)}},{key:l.KeyMap.SIX,alt:!0,ctrl:!0,callback:o=>{o.executeTitle(l.TitleLevel.SIXTH)}}],Tf=[{key:l.KeyMap.I,shift:!0,mod:!0,callback:o=>{o.executeList(l.ListType.UL,l.ListStyle.DISC)}},{key:l.KeyMap.U,shift:!0,mod:!0,callback:o=>{o.executeList(l.ListType.OL)}}];class mf{draw;command;globalShortcutList;agentShortcutList;constructor(t,e){this.draw=t,this.command=e,this.globalShortcutList=[],this.agentShortcutList=[],this._addShortcutList([...gf,...ff,...Tf]),this._addEvent(),t.getCursor().getAgentDom().addEventListener("keydown",this._agentKeydown.bind(this))}_addEvent(){document.addEventListener("keydown",this._globalKeydown)}removeEvent(){document.removeEventListener("keydown",this._globalKeydown)}_addShortcutList(t){for(let e=t.length-1;e>=0;e--){const n=t[e];n.isGlobal?this.globalShortcutList.unshift(n):this.agentShortcutList.unshift(n)}}registerShortcutList(t){this._addShortcutList(t)}_globalKeydown=t=>{this.globalShortcutList.length&&this.draw.isGlobalShortcutActive()&&this.draw.isTargetInsideEditor(t.target)&&this._execute(t,this.globalShortcutList)};_agentKeydown(t){this.agentShortcutList.length&&(this.draw.isInteractionSuspended()||this._execute(t,this.agentShortcutList))}_execute(t,e){for(let n=0;n<e.length;n++){const i=e[n];if((i.mod?Te(t)===!!i.mod:t.ctrlKey===!!i.ctrl&&t.metaKey===!!i.meta)&&t.shiftKey===!!i.shift&&t.altKey===!!i.alt&&t.key.toLowerCase()===i.key.toLowerCase()){i.disable||(i?.callback?.(this.command),t.preventDefault());break}}}}class pf{editor;constructor(t){this.editor=t}use(t,e){t(this.editor,e)}}class Lf{eventHub;constructor(){this.eventHub=new Map}on(t,e){if(!t||typeof e!="function")return;const n=this.eventHub.get(t)||new Set;n.add(e),this.eventHub.set(t,n)}emit(t,e){if(!t)return;const n=this.eventHub.get(t);if(n){if(n.size===1)return[...n][0](e);n.forEach(i=>i(e))}}off(t,e){if(!t||typeof e!="function")return;const n=this.eventHub.get(t);n&&n.delete(e)}isSubscribe(t){const e=this.eventHub.get(t);return!!e&&e.size>0}dangerouslyClearAll(){this.eventHub.clear()}}class If{paste;copy;drop}class Yr{command;version;listener;eventBus;override;register;destroy;use;draw;constructor(t,e,n={}){const i=Do(n);e=at(e);let r=[],s=[],a=[],c=[];Array.isArray(e)?s=e:(r=e.header||[],s=e.main,a=e.footer||[],c=e.graffiti||[]),[r,s,a].forEach(f=>{bt(f,{editorOptions:i,isForceCompensation:!0})}),this.version=ve,this.listener=new ug,this.eventBus=new Lf,this.override=new If,this.draw=new ig(t,i,{header:r,main:s,footer:a,graffiti:c},this.listener,this.eventBus,this.override);const u=this.draw;this.command=new yr(new dg(u)),u.setCommand(this.command);const R=new hf(u,this.command),h=new mf(u,this.command);this.register=new Rg({contextMenu:R,shortcut:h,i18n:u.getI18n()}),this.destroy=()=>{u.destroy(),h.removeEvent(),R.removeEvent(),this.eventBus.dangerouslyClearAll()};const g=new pf(this);this.use=g.use.bind(g)}setFormModeTrace(t){this.command.executeSetFormModeTrace(t)}pauseInteraction(){this.draw.pauseInteraction()}resumeInteraction(){this.draw.resumeInteraction()}setOverlayActive(t){this.draw.setOverlayActive(t)}suspendGlobalShortcut(t){this.draw.suspendGlobalShortcut(t)}}l.Command=yr,l.EDITOR_CLIPBOARD=Ln,l.EDITOR_COMPONENT=ue,l.Editor=Yr,l.INTERNAL_CONTEXT_MENU_KEY=pn,l.INTERNAL_SHORTCUT_KEY=hs,l.LETTER_CLASS=mo,l.createDomFromElementList=en,l.default=Yr,l.getElementListByHTML=nn,l.getTextFromElementList=xe,l.splitText=ct,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
548
|
+
`?_:r[d];e.splice(c+d,0,{...a,value:u})}}}const{endIndex:i}=this.range.getRange();this.draw.render({curIndex:i,isSetCursor:!0})}}delButton(t,e){return new Promise(n=>{for(let i=t.length-1;i>=0;i--)e.some(s=>s.controlId===t[i].controlId&&s.type===t[i].type)&&t.splice(i,1);n(!0)})}editButton(t,e,n){const i=this.draw.getElementList();n=n+1;for(let d=0;d<e.label.length;d++){const u={value:e.label[d],controlId:e.controlId,type:l.ElementType.CONTROL,control:{type:"button",buttonLabel:e.label,code:e.code,value:[{value:e.label}],label:e.label,hide:!1},controlComponent:"value",color:"#fff",highlight:"#1677FF",style:"16px Microsoft YaHei",hide:!1};i.splice(n+d,0,u)}const{startIndex:r,endIndex:s}=this.range.getRange(),a=!0,c=s;this.draw.render({curIndex:c,isSetCursor:a})}removeButtonElementsByControlId(t){return new Promise(e=>{const n=this.draw.getElementList();for(let c=n.length-1;c>=0;c--)n[c].controlId===t&&n.splice(c,1);const{startIndex:i,endIndex:r}=this.range.getRange(),s=!0,a=r;this.draw.render({curIndex:a,isSetCursor:s}),e(!0)})}removeByValue(t,e){return new Promise(n=>{for(let c=t.length-1;c>=0;c--)(t[c].type=="control"||t[c].type=="text"||t[c].type=="buttonText")&&t[c].control?.buttonLabel===e&&t[c].control?.buttonText&&t.splice(c,1);const{startIndex:i,endIndex:r}=this.range.getRange(),s=!0,a=r;this.draw.render({curIndex:a,isSetCursor:s}),n(!0)})}insertButtonValue(t){const e=this.draw.getElementList(),n=t.controlId,i=t.element[0].newButtonValue,r=t.element[0].control.buttonLabel,s=t.element[0].control.code;if(!i||!i.length)return;let a=-1;for(let m=0;m<e.length;m++)if(e[m].controlId===n&&e[m].control?.type==="button"){a=m;break}if(a===-1)return;const c=n+"_text",d=[];for(let m=0;m<i.length;m++){const p=i[m];d.push({value:p.value,code:p.code})}const u={type:"button",buttonLabel:r,buttonText:!0,label:r,code:s,value:d,hide:!1},R=[];R.push({value:"[",controlId:c,type:l.ElementType.CONTROL,control:u,controlComponent:l.ControlComponent.PREFIX,color:"#1677FF",hide:!1});for(let m=0;m<i.length;m++){const p=i[m],I=i.length>1?`${m+1}.${p.value}`:p.value,L=ct(I);for(let P=0;P<L.length;P++)R.push({value:L[P],controlId:c,type:l.ElementType.CONTROL,control:u,controlComponent:l.ControlComponent.VALUE,color:"#000",hide:!1});i.length>1&&m<i.length-1&&R.push({value:_,controlId:c,type:l.ElementType.CONTROL,control:u,controlComponent:l.ControlComponent.VALUE,color:"#000",hide:!1})}R.push({value:"]",controlId:c,type:l.ElementType.CONTROL,control:u,controlComponent:l.ControlComponent.POSTFIX,color:"#1677FF",hide:!1});for(let m=0;m<R.length;m++)e.splice(a+m,0,R[m]);const{startIndex:h,endIndex:g}=this.range.getRange(),f=!0,T=g;this.draw.render({curIndex:T,isSetCursor:f})}font(t,e){const{isIgnoreDisabledRule:n=!1}=e||{};if(!n&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const r=this.range.getSelectionElementList();if(r?.length)r.forEach(s=>{s.font=t}),this.draw.render({isSetCursor:!1});else{let s=!0;const{endIndex:a}=this.range.getRange(),d=this.draw.getElementList()[a];this.range.setDefaultStyle({font:t}),d?.value===_?d.font=t:s=!1,this.draw.render({isSubmitHistory:s,curIndex:a,isCompute:!1})}}size(t,e){const{isIgnoreDisabledRule:n=!1}=e||{};if(!n&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const{minSize:r,maxSize:s,defaultSize:a}=this.options;if(t<r||t>s)return;let c={},d=[];const u=this.range.getTextLikeSelectionElementList();if(u?.length)d=u,c={isSetCursor:!1};else{const{endIndex:h}=this.range.getRange(),f=this.draw.getElementList()[h];this.range.setDefaultStyle({size:t}),f?.value===_?(d.push(f),c={curIndex:h}):this.draw.render({curIndex:h,isCompute:!1,isSubmitHistory:!1})}if(!d.length)return;let R=!1;d.forEach(h=>{!h.size&&t===a||h.size&&h.size===t||(h.size=t,R=!0)}),R&&this.draw.render(c)}sizeAdd(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const{defaultSize:i,maxSize:r}=this.options,s=this.range.getTextLikeSelectionElementList();let a={},c=[];if(s?.length)c=s,a={isSetCursor:!1};else{const{endIndex:u}=this.range.getRange(),h=this.draw.getElementList()[u],f=this.range.getDefaultStyle()?.size||h.size||i;this.range.setDefaultStyle({size:f+2>r?r:f+2}),h?.value===_?(c.push(h),a={curIndex:u}):this.draw.render({curIndex:u,isCompute:!1,isSubmitHistory:!1})}if(!c.length)return;let d=!1;c.forEach(u=>{u.size||(u.size=i),!(u.size>=r)&&(u.size+2>r?u.size=r:u.size+=2,d=!0)}),d&&this.draw.render(a)}sizeMinus(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const{defaultSize:i,minSize:r}=this.options,s=this.range.getTextLikeSelectionElementList();let a={},c=[];if(s?.length)c=s,a={isSetCursor:!1};else{const{endIndex:u}=this.range.getRange(),h=this.draw.getElementList()[u],f=this.range.getDefaultStyle()?.size||h.size||i;this.range.setDefaultStyle({size:f-2<r?r:f-2}),h?.value===_?(c.push(h),a={curIndex:u}):this.draw.render({curIndex:u,isCompute:!1,isSubmitHistory:!1})}if(!c.length)return;let d=!1;c.forEach(u=>{u.size||(u.size=i),!(u.size<=r)&&(u.size-2<r?u.size=r:u.size-=2,d=!0)}),d&&this.draw.render(a)}bold(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const i=this.range.getSelectionElementList();if(i?.length){const r=i.findIndex(s=>!s.bold);i.forEach(s=>{s.bold=!!~r}),this.draw.render({isSetCursor:!1})}else{let r=!0;const{endIndex:s}=this.range.getRange(),c=this.draw.getElementList()[s];this.range.setDefaultStyle({bold:c.bold?!1:!this.range.getDefaultStyle()?.bold}),c?.value===_?c.bold=!c.bold:r=!1,this.draw.render({isSubmitHistory:r,curIndex:s,isCompute:!1})}}italic(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const i=this.range.getSelectionElementList();if(i?.length){const r=i.findIndex(s=>!s.italic);i.forEach(s=>{s.italic=!!~r}),this.draw.render({isSetCursor:!1})}else{let r=!0;const{endIndex:s}=this.range.getRange(),c=this.draw.getElementList()[s];this.range.setDefaultStyle({italic:c.italic?!1:!this.range.getDefaultStyle()?.italic}),c?.value===_?c.italic=!c.italic:r=!1,this.draw.render({isSubmitHistory:r,curIndex:s,isCompute:!1})}}underline(t,e){const{isIgnoreDisabledRule:n=!1}=e||{};if(!n&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const r=this.range.getSelectionElementList();if(r?.length){const s=r.some(a=>!a.underline||!t&&a.textDecoration||t&&!a.textDecoration||t&&a.textDecoration&&!tl(a.textDecoration,t));r.forEach(a=>{a.underline=s,s&&t?a.textDecoration=t:delete a.textDecoration}),this.draw.render({isSetCursor:!1,isCompute:!1})}else{let s=!0;const{endIndex:a}=this.range.getRange(),d=this.draw.getElementList()[a];this.range.setDefaultStyle({underline:d?.underline?!1:!this.range.getDefaultStyle()?.underline}),d?.value===_?d.underline=!d.underline:s=!1,this.draw.render({isSubmitHistory:s,curIndex:a,isCompute:!1})}}strikeout(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const i=this.range.getSelectionElementList();if(i?.length){const r=i.findIndex(s=>!s.strikeout);i.forEach(s=>{s.strikeout=!!~r}),this.draw.render({isSetCursor:!1,isCompute:!1})}else{let r=!0;const{endIndex:s}=this.range.getRange(),c=this.draw.getElementList()[s];this.range.setDefaultStyle({strikeout:c.strikeout?!1:!this.range.getDefaultStyle()?.strikeout}),c?.value===_?c.strikeout=!c.strikeout:r=!1,this.draw.render({isSubmitHistory:r,curIndex:s,isCompute:!1})}}superscript(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const i=this.range.getSelectionElementList();if(!i)return;const r=i.findIndex(s=>s.type===l.ElementType.SUPERSCRIPT);i.forEach(s=>{~r?s.type===l.ElementType.SUPERSCRIPT&&(s.type=l.ElementType.TEXT,delete s.actualSize):(!s.type||s.type===l.ElementType.TEXT||s.type===l.ElementType.SUBSCRIPT)&&(s.type=l.ElementType.SUPERSCRIPT)}),this.draw.render({isSetCursor:!1})}subscript(t){const{isIgnoreDisabledRule:e=!1}=t||{};if(!e&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const i=this.range.getSelectionElementList();if(!i)return;const r=i.findIndex(s=>s.type===l.ElementType.SUBSCRIPT);i.forEach(s=>{~r?s.type===l.ElementType.SUBSCRIPT&&(s.type=l.ElementType.TEXT,delete s.actualSize):(!s.type||s.type===l.ElementType.TEXT||s.type===l.ElementType.SUPERSCRIPT)&&(s.type=l.ElementType.SUBSCRIPT)}),this.draw.render({isSetCursor:!1})}color(t,e){const{isIgnoreDisabledRule:n=!1}=e||{};if(!n&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const r=this.range.getSelectionElementList();if(r?.length)r.forEach(s=>{t?s.color=t:delete s.color}),this.draw.render({isSetCursor:!1,isCompute:!1});else{let s=!0;const{endIndex:a}=this.range.getRange(),d=this.draw.getElementList()[a];this.range.setDefaultStyle({color:t||void 0}),d?.value===_?t?d.color=t:delete d.color:s=!1,this.draw.render({isSubmitHistory:s,curIndex:a,isCompute:!1})}}highlight(t,e){const{isIgnoreDisabledRule:n=!1}=e||{};if(!n&&(this.draw.isReadonly()||this.draw.isDisabled()))return;const r=this.range.getSelectionElementList();if(r?.length)r.forEach(s=>{t?s.highlight=t:delete s.highlight}),this.draw.render({isSetCursor:!1,isCompute:!1});else{let s=!0;const{endIndex:a}=this.range.getRange(),d=this.draw.getElementList()[a];this.range.setDefaultStyle({highlight:t||void 0}),d?.value===_?t?d.highlight=t:delete d.highlight:s=!1,this.draw.render({isSubmitHistory:s,curIndex:a,isCompute:!1})}}title(t){if(this.draw.isReadonly()||this.draw.isDisabled())return;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return;const r=this.draw.getElementList(),s=n===i?this.range.getRangeParagraphElementList():r.slice(n+1,i+1);if(!s||!s.length)return;const a=lt(),c=this.draw.getOptions().title;s.forEach(R=>{!R.type&&R.value===_||(t?(R.level=t,R.titleId=a,Hn(R)&&(R.size=c[Gi[t]],R.bold=!0)):R.titleId&&(delete R.titleId,delete R.title,delete R.level,delete R.size,delete R.bold))});const d=n===i,u=d?i:n;this.draw.render({curIndex:u,isSetCursor:d})}list(t,e){this.draw.isReadonly()||this.draw.getListParticle().setList(t,e)}rowFlex(t){if(this.draw.isReadonly())return;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return;const r=this.range.getRangeRowElementList();if(!r)return;r.forEach(c=>{c.rowFlex=t});const s=n===i,a=s?i:n;this.draw.render({curIndex:a,isSetCursor:s})}vertical(t){if(this.draw.isReadonly())return;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return;const r=this.range.getRangeRowElementList();if(!r)return;r.forEach(c=>{c.vertical=t});const s=n===i,a=s?i:n;this.draw.render({curIndex:a,isSetCursor:s})}rowMargin(t){if(this.draw.isReadonly())return;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return;const r=this.range.getRangeRowElementList();if(!r)return;r.forEach(c=>{c.rowMargin=t});const s=n===i,a=s?i:n;this.draw.render({curIndex:a,isSetCursor:s})}insertTable(t,e){this.draw.isReadonly()||this.draw.isDisabled()||this.getIsRangeInTextField()||this.control.getActiveControl()||this.tableOperate.insertTable(t,e)}insertTableTopRow(){this.draw.isReadonly()||this.tableOperate.insertTableTopRow()}insertTableBottomRow(){this.draw.isReadonly()||this.tableOperate.insertTableBottomRow()}insertTableLeftCol(){this.draw.isReadonly()||this.tableOperate.insertTableLeftCol()}insertTableRightCol(){this.draw.isReadonly()||this.tableOperate.insertTableRightCol()}deleteTableRow(){this.draw.isReadonly()||this.tableOperate.deleteTableRow()}deleteTableCol(){this.draw.isReadonly()||this.tableOperate.deleteTableCol()}deleteTable(){this.draw.isReadonly()||this.tableOperate.deleteTable()}mergeTableCell(){this.draw.isReadonly()||this.tableOperate.mergeTableCell()}cancelMergeTableCell(){this.draw.isReadonly()||this.tableOperate.cancelMergeTableCell()}splitVerticalTableCell(){this.draw.isReadonly()||this.tableOperate.splitVerticalTableCell()}splitHorizontalTableCell(){this.draw.isReadonly()||this.tableOperate.splitHorizontalTableCell()}tableTdVerticalAlign(t){this.draw.isReadonly()||this.tableOperate.tableTdVerticalAlign(t)}tableBorderType(t){this.draw.isReadonly()||this.tableOperate.tableBorderType(t)}tableBorderColor(t){this.draw.isReadonly()||this.tableOperate.tableBorderColor(t)}tableTdBorderType(t){this.draw.isReadonly()||this.tableOperate.tableTdBorderType(t)}tableTdSlashType(t){this.draw.isReadonly()||this.tableOperate.tableTdSlashType(t)}tableTdBackgroundColor(t){this.draw.isReadonly()||this.tableOperate.tableTdBackgroundColor(t)}tableSelectAll(){this.tableOperate.tableSelectAll()}tableProperties(){this.draw.isReadonly()||this.tableOperate.tableProperties()}hyperlink(t){const{valueList:e,url:n,hyperlinkId:i}=t;if(!n||!e?.length||this.draw.isReadonly()||this.draw.isDisabled()||this.control.getActiveControl())return;const{startIndex:a,endIndex:c}=this.range.getRange();!~a&&!~c||this.insertElementList([{type:l.ElementType.HYPERLINK,value:"",valueList:e,url:n,hyperlinkId:i||lt()}])}getHyperlinkRange(){let t=-1,e=-1;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return null;const r=this.draw.getElementList(),s=r[n];if(s.type!==l.ElementType.HYPERLINK)return null;let a=n;for(;a>0;){if(r[a].hyperlinkId!==s.hyperlinkId){t=a+1;break}a--}let c=n+1;for(;c<r.length;){if(r[c].hyperlinkId!==s.hyperlinkId){e=c-1;break}c++}return c===r.length&&(e=c-1),!~t||!~e?null:[t,e]}deleteHyperlink(){if(this.draw.isReadonly()||this.draw.isDisabled())return;const e=this.getHyperlinkRange();if(!e)return;const n=this.draw.getElementList(),[i,r]=e;this.draw.spliceElementList(n,i,r-i+1),this.draw.getHyperlinkParticle().clearHyperlinkPopup();const s=i-1;this.range.setRange(s,s),this.draw.render({curIndex:s})}cancelHyperlink(){if(this.draw.isReadonly()||this.draw.isDisabled())return;const e=this.getHyperlinkRange();if(!e)return;const n=this.draw.getElementList(),[i,r]=e;for(let a=i;a<=r;a++){const c=n[a];delete c.type,delete c.url,delete c.hyperlinkId,delete c.underline}this.draw.getHyperlinkParticle().clearHyperlinkPopup();const{endIndex:s}=this.range.getRange();this.draw.render({curIndex:s,isCompute:!1})}editHyperlink(t){if(this.draw.isReadonly()||this.draw.isDisabled())return;const n=this.getHyperlinkRange();if(!n)return;const i=this.draw.getElementList(),[r,s]=n;for(let c=r;c<=s;c++){const d=i[c];d.url=t}this.draw.getHyperlinkParticle().clearHyperlinkPopup();const{endIndex:a}=this.range.getRange();this.draw.render({curIndex:a,isCompute:!1})}separator(t,e){if(this.draw.isReadonly()||this.draw.isDisabled()||this.getIsRangeInTextField()||this.control.getActiveControl())return;const{startIndex:r,endIndex:s}=this.range.getRange();if(!~r&&!~s)return;const a=this.draw.getElementList();let c=-1;const d=a[s+1];if(d&&d.type===l.ElementType.SEPARATOR){if(d.dashArray&&d.dashArray.join()===t.join())return;c=s,Object.assign(d,{dashArray:t,...e})}else{const u={value:Fi,type:l.ElementType.SEPARATOR,dashArray:t,...e};wt(a,[u],r,{editorOptions:this.options}),r!==0&&a[r].value===_?(this.draw.spliceElementList(a,r,1,[u]),c=r-1):(this.draw.spliceElementList(a,r+1,0,[u]),c=r)}this.range.setRange(c,c),this.draw.render({curIndex:c})}pageBreak(){this.draw.isReadonly()||this.draw.isDisabled()||this.control.getActiveControl()||this.insertElementList([{type:l.ElementType.PAGE_BREAK,value:Fi}])}addWatermark(t){if(this.draw.isReadonly())return;const n=this.draw.getOptions(),{color:i,size:r,opacity:s,font:a,gap:c}=Yo;n.watermark.data=t.data,n.watermark.type=t.type||l.WatermarkType.TEXT,t.width&&(n.watermark.width=t.width),t.height&&(n.watermark.height=t.height),n.watermark.color=t.color||i,n.watermark.opacity=t.opacity||s,n.watermark.size=t.size||r,n.watermark.font=t.font||a,n.watermark.repeat=!!t.repeat,t.numberType&&(n.watermark.numberType=t.numberType),n.watermark.gap=t.gap||c,this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1})}deleteWatermark(){if(this.draw.isReadonly())return;const e=this.draw.getOptions();e.watermark&&e.watermark.data&&(e.watermark={...Yo},this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1}))}image(t){if(this.draw.isReadonly()||this.draw.isDisabled())return null;const{startIndex:n,endIndex:i}=this.range.getRange();if(!~n&&!~i)return null;const r=t.id||lt();return this.insertElementList([{...t,id:r,type:l.ElementType.IMAGE}]),r}search(t,e){this.searchManager.setSearchKeyword(t,e),this.draw.render({isSubmitHistory:!1})}searchNavigatePre(){this.searchManager.searchNavigatePre()!==null&&this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1,isLazy:!1})}searchNavigateNext(){this.searchManager.searchNavigateNext()!==null&&this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1,isLazy:!1})}getSearchNavigateInfo(){return this.searchManager.getSearchNavigateInfo()}replace(t,e){this.draw.getSearch().replace(t,e)}async print(){const{scale:t,printPixelRatio:e,paperDirection:n,width:i,height:r}=this.options;t!==1&&this.draw.setPageScale(1);const s=await this.draw.getDataURL({pixelRatio:e,mode:l.EditorMode.PRINT});cg(s,{width:i,height:r,direction:n}),t!==1&&this.draw.setPageScale(t)}replaceImageElement(t){const{startIndex:e}=this.range.getRange(),i=this.draw.getElementList()[e];!i||i.type!==l.ElementType.IMAGE||(i.value=t,this.draw.render({isSetCursor:!1}))}saveAsImageElement(){const{startIndex:t}=this.range.getRange(),n=this.draw.getElementList()[t];!n||n.type!==l.ElementType.IMAGE||Vi(n.value,`${n.id}.png`)}setImageCrop(t){const{startIndex:e}=this.range.getRange(),i=this.draw.getElementList()[e];!i||i.type!==l.ElementType.IMAGE||(i.imgCrop=t,this.draw.render({isSetCursor:!1,isCompute:!1}))}setImageCaption(t){const{startIndex:e}=this.range.getRange(),i=this.draw.getElementList()[e];i?.type===l.ElementType.IMAGE&&(i.imgCaption=t,this.draw.render({isSetCursor:!1}))}changeImageDisplay(t,e){if(t.imgDisplay===e)return;t.imgDisplay=e;const{startIndex:n,endIndex:i}=this.range.getRange();if(e===l.ImageDisplay.SURROUND||e===l.ImageDisplay.FLOAT_TOP||e===l.ImageDisplay.FLOAT_BOTTOM){const r=this.position.getPositionList(),{pageNo:s,coordinate:{leftTop:a}}=r[n];t.imgFloatPosition={pageNo:s,x:a[0],y:a[1]}}else delete t.imgFloatPosition;this.draw.getPreviewer().clearResizer(),this.draw.render({isSetCursor:!0,curIndex:i})}getImage(t){return this.draw.getDataURL(t)}getPageMode(){return this.options}getOptions(){return this.options}getValue(t){return this.draw.getValue(t)}getValueAsync(t){return this.draw.getWorkerManager().getValue(t)}getAreaValue(t){return this.draw.getArea().getAreaValue(t)}getHTML(){const t=this.options,e=this.draw.getHeaderElementList(),n=this.draw.getOriginalMainElementList(),i=this.draw.getFooterElementList();return{header:nn(e,t).innerHTML,main:nn(n,t).innerHTML,footer:nn(i,t).innerHTML}}getText(){const t=this.draw.getHeaderElementList(),e=this.draw.getOriginalMainElementList(),n=this.draw.getFooterElementList();return{header:xe(t),main:xe(e),footer:xe(n)}}getWordCount(){return this.workerManager.getWordCount()}getCursorPosition(){return this.position.getCursorPosition()}getRemainingContentHeight(){if(!this.draw.getIsPagingMode())return 0;const t=this.draw.getPageRowList(),e=t.length-1,i=(t[e]||[]).reduce((c,d)=>c+d.height+(d.offsetY||0),0),r=this.draw.getHeight(),s=this.draw.getMainOuterHeight(),a=r-(s+i);return a>0?a:0}computeElementListHeight(t){if(!t.length)return 0;const e=this.draw.getInnerWidth();if(e<=0)return 0;const n=at(t);bt(n,{isHandleFirstElement:!1,editorOptions:this.options});const i=Zo(n);return this.draw.computeRowList({innerWidth:e,elementList:n,surroundElementList:i}).reduce((s,a)=>s+a.height+(a.offsetY||0),0)}getRange(){return at(this.range.getRange())}getRangeText(){return this.range.toString()}getRangeContext(){const t=this.range.getRange(),{startIndex:e,endIndex:n}=t;if(!~e&&!~n)return null;const i=e===n,r=this.range.toString(),s=Mt(this.range.getSelectionElementList()||[]),a=this.draw.getElementList(),c=Ue(a[i?e:e+1],{extraPickAttrs:["id","controlComponent"]}),d=Ue(a[n],{extraPickAttrs:["id","controlComponent"]}),u=this.draw.getRowList(),R=this.position.getPositionList(),h=R[e],g=R[n],f=h?.pageNo,T=g?.pageNo,m=h?.rowIndex,p=g?.rowIndex,I=u[m],L=u[p];let P=0,C=0;this.draw.getCursor().getHitLineStartIndex()||(P=I?.elementList[0]?.value===_?h?.index-I?.startIndex:h?.index-I?.startIndex+1),h===g?C=P:C=L.elementList[0]?.value===_?g.index-L.startIndex:g.index-L.startIndex+1;const S=[],F=this.draw.getOriginalHeight(),N=this.draw.getOriginalPageGap(),V=this.position.getSelectionPositionList();if(V){let U=null,Q=0,G=null;for(let H=0;H<V.length;H++){const{rowNo:tt,pageNo:st,coordinate:{leftTop:et,rightTop:nt},lineHeight:q}=V[H];U===null||U!==tt?(G&&S.push(G),G={x:et[0],y:et[1]+st*(F+N),width:nt[0]-et[0],height:q},U=tt,Q=et[0]):G.width=nt[0]-Q,H===V.length-1&&G&&S.push(G)}}else{const Q=this.position.getPositionList()[n],{coordinate:{rightTop:G},pageNo:H,lineHeight:tt}=Q;S.push({x:G[0],y:G[1]+H*(F+N),width:0,height:tt})}const Y=this.draw.getZone().getZone(),{isTable:E,trIndex:W,tdIndex:X,index:O}=this.position.getPositionContext();let M=null;if(E){const Q=this.draw.getOriginalElementList()[O]||null;Q&&(M=Mt([Q])[0])}let b=null,y=null,D=e-1;for(;D>0;){const U=a[D],Q=a[D-1];if(U.titleId&&U.titleId!==Q?.titleId){b=U.titleId,y=R[D].pageNo;break}D--}return at({isCollapsed:i,startElement:c,endElement:d,startPageNo:f,endPageNo:T,startRowNo:m,endRowNo:p,startColNo:P,endColNo:C,rangeRects:S,zone:Y,isTable:E,trIndex:W??null,tdIndex:X??null,tableElement:M,selectionText:r,selectionElementList:s,titleId:b,titleStartPageNo:y})}getRangeRow(){const t=this.range.getRangeRowElementList();return t?Mt(t):null}getRangeParagraph(){const t=this.range.getRangeParagraphElementList();return t?Mt(t):null}getKeywordRangeList(t){return this.range.getKeywordRangeList(t)}getKeywordContext(t){const e=this.getKeywordRangeList(t);if(!e.length)return null;const n=[],i=this.position.getOriginalMainPositionList(),r=this.draw.getOriginalMainElementList();for(let s=0;s<e.length;s++){const a=e[s],{startIndex:c,endIndex:d,tableId:u,startTrIndex:R,startTdIndex:h}=a;let g=i;if(a.tableId){const m=r.find(p=>p.id===u);m&&(g=m.trList?.[R]?.tdList?.[h]?.positionList||[])}const f=at(g[c]),T=at(g[d]);n.push({range:a,startPosition:f,endPosition:T})}return n}pageMode(t){this.draw.setPageMode(t)}pageScale(t){t!==this.options.scale&&this.draw.setPageScale(t)}pageScaleRecovery(){const{scale:t}=this.options;t!==1&&this.draw.setPageScale(1)}pageScaleMinus(){const{scale:t}=this.options,e=t*10-1;e>=5&&this.draw.setPageScale(e/10)}pageScaleAdd(){const{scale:t}=this.options,e=t*10+1;e<=30&&this.draw.setPageScale(e/10)}paperSize(t,e){this.draw.setPaperSize(t,e)}paperDirection(t){this.draw.setPaperDirection(t)}getPaperMargin(){return this.options.margins}setPaperMargin(t){return this.draw.setPaperMargin(t)}setMainBadge(t){this.draw.getBadge().setMainBadge(t),this.draw.render({isCompute:!1,isSubmitHistory:!1})}setAreaBadge(t){this.draw.getBadge().setAreaBadgeMap(t),this.draw.render({isCompute:!1,isSubmitHistory:!1})}insertElementList(t,e={}){if(!t.length||this.draw.isReadonly()||this.draw.isDisabled())return;const{isReplace:i=!0,ignoreContextKeys:r}=e;i||this.range.shrinkRange(),console.log(t,"payload");const s=at(t),{startIndex:a}=this.range.getRange(),c=this.draw.getElementList();wt(c,s,a,{ignoreContextKeys:r,isBreakWhenWrap:!0,editorOptions:this.options}),console.log(s,"cloneElementList"),this.draw.insertElementList(s,e),setTimeout(()=>{console.log(c,"elementList")},500)}appendElementList(t,e){!t.length||this.draw.isReadonly()||this.draw.appendElementList(at(t),e)}updateElementById(t){const{id:e,conceptId:n}=t;if(!e&&!n)return;const i=[];function r(a,c=!1){let d=0;for(;d<a.length;){const u=a[d];if(d++,u.type===l.ElementType.TABLE){const R=u.trList;for(let h=0;h<R.length;h++){const g=R[h];for(let f=0;f<g.tdList.length;f++){const T=g.tdList[f];r(T.value,c)}}}u.type===l.ElementType.CONTROL&&u.control?.value&&r(u.control.value,!0),(e&&u.id===e||n&&u.conceptId===n)&&i.push({elementList:a,index:d-1,isInsideControl:c})}}const s=[this.draw.getOriginalMainElementList(),this.draw.getHeaderElementList(),this.draw.getFooterElementList()];for(const a of s)r(a);if(i.length){for(let a=0;a<i.length;a++){const{elementList:c,index:d,isInsideControl:u}=i[a],R=c[d],h=R.controlId&&R.controlComponent===l.ControlComponent.VALUE;if(u||h){if(Object.assign(R,t.properties),R.id){const g=Bl(R.id);g&&Object.assign(g,t.properties)}}else{const g=Mt([{...R,...t.properties}],{extraPickAttrs:["id"]});g.length>0&&g[0]?(De(He,R,g[0]),bt(g,{isHandleFirstElement:!1,editorOptions:this.options}),c[d]=g[0]):Object.assign(R,t.properties)}}this.draw.render({isSetCursor:!1})}}deleteElementById(t){const{id:e,conceptId:n}=t;if(!e&&!n)return;let i=!1;function r(a){let c=0;for(;c<a.length;){const d=a[c];if(d.type===l.ElementType.TABLE){const u=d.trList;for(let R=0;R<u.length;R++){const h=u[R];for(let g=0;g<h.tdList.length;g++){const f=h.tdList[g];r(f.value)}}}d.type===l.ElementType.CONTROL&&d.control?.value&&r(d.control.value),(e&&d.id===e||n&&d.conceptId===n)&&(i=!0,a.splice(c,1),c--),c++}}const s=[this.draw.getOriginalMainElementList(),this.draw.getHeaderElementList(),this.draw.getFooterElementList()];for(const a of s)r(a);i&&this.draw.render({isSetCursor:!1})}getElementById(t){const{id:e,conceptId:n}=t,i=[];if(!e&&!n)return i;const r=a=>{let c=0;for(;c<a.length;){const d=a[c];if(c++,d.type===l.ElementType.TABLE){const u=d.trList;for(let R=0;R<u.length;R++){const h=u[R];for(let g=0;g<h.tdList.length;g++){const f=h.tdList[g];r(f.value)}}}e&&d.id!==e||n&&d.conceptId!==n||i.push(d)}},s=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const a of s)r(a);return Mt(i,{extraPickAttrs:["id"]})}setValue(t,e){this.draw.setValue(t,e)}removeControl(t){if(t?.id||t?.conceptId){const{id:e,conceptId:n}=t;let i=!1;const r=a=>{let c=a.length-1;for(;c>=0;){const d=a[c];if(d.type===l.ElementType.TABLE){const u=d.trList;for(let R=0;R<u.length;R++){const h=u[R];for(let g=0;g<h.tdList.length;g++){const f=h.tdList[g];r(f.value)}}}c--,!(!d.control||e&&d.controlId!==e||n&&d.control.conceptId!==n)&&(i=!0,a.splice(c+1,1))}},s=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const a of s)r(a);i&&this.draw.render({isSetCursor:!1})}else{const{startIndex:e,endIndex:n}=this.range.getRange();if(e!==n||!this.draw.getElementList()[e].controlId)return;const a=this.draw.getControl().removeControl(e);if(a===null)return;this.range.setRange(a,a),this.draw.render({curIndex:a})}}translate(t){return this.i18n.t(t)}setLocale(t){this.i18n.setLocale(t)}getLocale(){return this.i18n.getLocale()}getCatalog(){return this.workerManager.getCatalog()}locationCatalog(t){const e=this.draw.getOriginalElementList();function n(p,I){for(let L=0;L<p.length;L++){const P=p[L];if(P.type===l.ElementType.TABLE){const C=P.trList;for(let S=0;S<C.length;S++){const F=C[S];for(let N=0;N<F.tdList.length;N++){const V=F.tdList[N],Y=n(V.value,I);if(Y)return{...Y,isTable:!0,index:L,trIndex:S,tdIndex:N,tdId:V.id,trId:F.id,tableId:P.id}}}}if(P.titleId===I){let C=L;for(;C<p.length;){if(p[C+1]?.titleId!==I)return{isTable:!1,startIndex:C,endIndex:C};C++}}}return null}const i=n(e,t);if(!i)return;const{isTable:r,index:s,startTdIndex:a,endTdIndex:c,startTrIndex:d,endTrIndex:u,trIndex:R,tdIndex:h,tdId:g,trId:f,tableId:T,endIndex:m}=i;this.position.setPositionContext({isTable:r,index:s,trIndex:R,tdIndex:h,tdId:g,trId:f,tableId:T}),this.range.setRange(m,m,T,a,c,d,u),this.draw.render({curIndex:m,isCompute:!1,isSubmitHistory:!1})}wordTool(){const t=this.draw.getMainElementList();let e=!1;for(let n=0;n<t.length;n++)if(t[n].value===_)for(;n+1<t.length;){const r=t[n+1];if(r.value!==_&&r.value!==To)break;t.splice(n+1,1),e=!0}if(e)this.draw.render({isSetCursor:!1});else{const n=this.range.getIsCollapsed();this.draw.getCursor().drawCursor({isShow:n})}}setHTML(t){const{header:e,main:n,footer:i}=t,r=this.draw.getOriginalInnerWidth(),s=a=>a!==void 0?on(a,{innerWidth:r}):void 0;this.setValue({header:s(e),main:s(n),footer:s(i)})}setGroup(){return this.draw.isReadonly()?null:this.draw.getGroup().setGroup()}deleteGroup(t){this.draw.isReadonly()||this.draw.getGroup().deleteGroup(t)}getGroupIds(){return this.draw.getWorkerManager().getGroupIds()}locationGroup(t){const e=this.draw.getOriginalMainElementList(),n=this.draw.getGroup().getContextByGroupId(e,t);if(!n)return;const{isTable:i,index:r,trIndex:s,tdIndex:a,tdId:c,trId:d,tableId:u,endIndex:R}=n;this.position.setPositionContext({isTable:i,index:r,trIndex:s,tdIndex:a,tdId:c,trId:d,tableId:u}),this.range.setRange(R,R),this.draw.render({curIndex:R,isCompute:!1,isSubmitHistory:!1})}setZone(t){this.draw.getZone().setZone(t)}getControlValue(t){return this.draw.getControl().getValueById(t)}setControlValue(t){this.draw.getControl().setValueListById([t])}setControlValueList(t){this.draw.getControl().setValueListById(t)}setControlExtension(t){this.draw.getControl().setExtensionListById([t])}setControlExtensionList(t){this.draw.getControl().setExtensionListById(t)}setControlProperties(t){this.draw.getControl().setPropertiesListById([t])}setControlPropertiesList(t){this.draw.getControl().setPropertiesListById(t)}setControlHighlight(t){this.draw.getControl().setHighlightList(t),this.draw.render({isSubmitHistory:!1})}updateOptions(t){const e=Do(t);Object.entries(e).forEach(([n,i])=>{Reflect.set(this.options,n,i)}),this.forceUpdate()}setFormModeTrace(t){Object.assign(this.options.modeRule.form,t),this.forceUpdate()}getControlList(){return this.draw.getControl().getList()}locationControl(t,e){function n(r,s){let a=0;for(;a<r.length;){const c=r[a];if(a++,c.type===l.ElementType.TABLE){const u=c.trList;for(let R=0;R<u.length;R++){const h=u[R];for(let g=0;g<h.tdList.length;g++){const f=h.tdList[g],T=n(f.value,s);if(T)return{...T,positionContext:{isTable:!0,index:a-1,trIndex:R,tdIndex:g,tdId:c.tdId,trId:c.trId,tableId:c.tableId}}}}}if(c?.controlId!==t)continue;let d=a-1;if(e?.position===l.LocationPosition.OUTER_AFTER){if(!(c.controlComponent===l.ControlComponent.POSTFIX&&r[a+1]?.controlComponent!==l.ControlComponent.POST_TEXT))continue}else if(e?.position===l.LocationPosition.OUTER_BEFORE)d-=1;else if(e?.position===l.LocationPosition.AFTER){if(d-=1,c.controlComponent!==l.ControlComponent.PLACEHOLDER&&c.controlComponent!==l.ControlComponent.POSTFIX&&c.controlComponent!==l.ControlComponent.POST_TEXT)continue}else if(c.controlComponent!==l.ControlComponent.PREFIX&&c.controlComponent!==l.ControlComponent.PRE_TEXT||r[a]?.controlComponent===l.ControlComponent.PREFIX||r[a]?.controlComponent===l.ControlComponent.PRE_TEXT)continue;return{zone:s,range:{startIndex:d,endIndex:d},positionContext:{isTable:!1}}}return null}const i=[{zone:l.EditorZone.HEADER,elementList:this.draw.getHeaderElementList()},{zone:l.EditorZone.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:l.EditorZone.FOOTER,elementList:this.draw.getFooterElementList()}];for(const r of i){const s=n(r.elementList,r.zone);if(s){this.setZone(s.zone),this.position.setPositionContext(s.positionContext),this.range.replaceRange(s.range),this.draw.render({curIndex:s.range.startIndex,isCompute:!1,isSubmitHistory:!1});break}}}insertTextField(t){if(this.draw.isReadonly()||this.draw.isDisabled()||!t)return;const n=at(t),{startIndex:i}=this.range.getRange(),r=this.draw.getElementList(),s=en(r,i);if(!s)return;const a=[...je,...$t,...In,...He];De(a,s,n),this.draw.insertElementTextField([n])}insertControl(t){if(this.draw.isReadonly()||this.draw.isDisabled())return;const n=at(t),{startIndex:i}=this.range.getRange(),r=this.draw.getElementList(),s=en(r,i);if(!s)return;const a=r[i],c=a?.controlComponent===l.ControlComponent.POSTFIX||a?.controlComponent===l.ControlComponent.POSTTEXTFIX;let d=!1;if(a?.controlId&&!c)for(let R=i;R>=0;R--){const h=r[R];if(h.controlId!==a.controlId)break;if(h.controlComponent===l.ControlComponent.PRETEXTFIX||h.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){h.control?.type===l.ControlType.TEXTFIELD&&(d=!0);break}}if(!d&&!c){const R=r[i-1];if(R?.controlId)for(let h=i-1;h>=0;h--){const g=r[h];if(g.controlId!==R.controlId)break;if(g.controlComponent===l.ControlComponent.PRETEXTFIX||g.controlComponent===l.ControlComponent.PRETEXTFIX_TEXT){g.control?.type===l.ControlType.TEXTFIELD&&(d=!0);break}}}if(d&&t.control?.type===l.ControlType.TEXTFIELD)return;const u=[...je,...$t,...In,...He];De(u,s,n),this.draw.insertElementList([n])}jumpControl(t){this.draw.getControl().initNextControl({direction:t?.direction})}getContainer(){return this.draw.getContainer()}getTitleValue(t){const{conceptId:e}=t,n=[],i=(s,a)=>{let c=0;for(;c<s.length;){const d=s[c];if(c++,d.type===l.ElementType.TABLE){const h=d.trList;for(let g=0;g<h.length;g++){const f=h[g];for(let T=0;T<f.tdList.length;T++){const m=f.tdList[T];i(m.value,a)}}}if(d?.title?.conceptId!==e)continue;const u=[];let R=c;for(;R<s.length;){const h=s[R];if(R++,d.titleId!==h.titleId){if(h.level&&Vo[h.level]<=Vo[d.level])break;u.push(h)}}n.push({...d.title,value:xe(u),elementList:Mt(u),zone:a}),c=R}},r=[{zone:l.EditorZone.HEADER,elementList:this.draw.getHeaderElementList()},{zone:l.EditorZone.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:l.EditorZone.FOOTER,elementList:this.draw.getFooterElementList()}];for(const{zone:s,elementList:a}of r)i(a,s);return n}getPositionContextByEvent(t,e={}){const n=t.target?.dataset.index;if(!n)return null;const{isMustDirectHit:i=!0}=e,r=Number(n),s=this.position.getPositionByXY({x:t.offsetX,y:t.offsetY,pageNo:r}),{isDirectHit:a,isTable:c,index:d,trIndex:u,tdIndex:R,tdValueIndex:h,zone:g}=s;if(i&&!a||g&&g!==this.zone.getZone())return null;let f=null,T=null;const m=this.draw.getOriginalElementList();let p=null;const I=this.position.getOriginalPositionList();if(c){const P=m[d].trList?.[u].tdList[R];T=P?.value[h]||null,p=P?.positionList?.[h]||null,f={element:m[d],trIndex:u,tdIndex:R}}else T=m[d]||null,p=I[d]||null;let L=null;if(p){const{pageNo:P,coordinate:{leftTop:C,rightTop:S},lineHeight:F}=p,N=this.draw.getOriginalHeight(),V=this.draw.getOriginalPageGap();L={x:C[0],y:C[1]+P*(N+V),width:S[0]-C[0],height:F}}return{pageNo:r,element:T,rangeRect:L,tableInfo:f}}insertTitle(t){if(this.draw.isReadonly()||this.draw.isDisabled())return;const n=at(t),{startIndex:i}=this.range.getRange(),r=this.draw.getElementList(),s=en(r,i);if(!s)return;const a=[...je,...$t,...In,...He];n.valueList?.forEach(c=>{De(a,s,c)}),this.draw.insertElementList([n])}focus(t){const{position:e=l.LocationPosition.AFTER,isMoveCursorToVisible:n=!0,rowNo:i,range:r}=t||{};let s=-1;if(r)this.range.replaceRange(r),s=e===l.LocationPosition.BEFORE?r.startIndex:r.endIndex;else if(Oo(i)){const c=this.draw.getOriginalRowList();if(s=e===l.LocationPosition.BEFORE?c[i]?.startIndex:c[i+1]?.startIndex-1,!Oo(s))return;this.range.setRange(s,s)}else s=e===l.LocationPosition.BEFORE?0:this.draw.getOriginalMainElementList().length-1,this.range.setRange(s,s);const a={isCompute:!1,isSetCursor:!1,isSubmitHistory:!1};n&&~s&&this.range.getIsCollapsed()&&(a.curIndex=s,a.isSetCursor=!0),this.draw.render(a)}insertArea(t){return this.draw.getArea().insertArea(t)}setAreaValue(t){return this.draw.getArea().setAreaValue(t)}setAreaProperties(t){this.draw.getArea().setAreaProperties(t)}locationArea(t,e){if(e?.isAppendLastLineBreak&&e?.position===l.LocationPosition.OUTER_AFTER){const r=this.draw.getOriginalMainElementList();r[r.length-1].areaId===t&&this.draw.appendElementList([{value:_}],{isSubmitHistory:!1})}const n=this.draw.getArea().getContextByAreaId(t,e);if(!n)return;const{range:{endIndex:i}}=n;this.position.setPositionContext({isTable:!1}),this.range.setRange(i,i),this.draw.render({curIndex:i,isSetCursor:!0,isCompute:!1,isSubmitHistory:!1})}clearGraffiti(){this.draw.getGraffiti().clear(),this.draw.isGraffitiMode()&&this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1})}getMacroValue(t){const{id:e,dictCode:n,label:i,areaId:r}=t,s=[],a=(d,u)=>{for(const R of d){if(R.type===l.ElementType.TABLE){const g=R.trList;for(const f of g)for(const T of f.tdList)a(T.value,u);continue}if(R.type!==l.ElementType.MACRO&&R.type!==l.ElementType.CUSTOM_MACRO&&R.type!==l.ElementType.REUSABLE_ITEM||e&&R.id!==e||n&&R.dictCode!==n||i&&R.label!==i||r&&R.areaId!==r)continue;const h={id:R.id,type:R.type,label:R.label,dictCode:R.dictCode,zone:u};R.type===l.ElementType.MACRO?h.value=R.value:R.type===l.ElementType.CUSTOM_MACRO?(h.macroConfig=R.macroConfig,h.value=R.macroConfig?.value):R.type===l.ElementType.REUSABLE_ITEM&&(h.reusableItemConfig=R.reusableItemConfig,h.value=R.reusableItemConfig?.value),s.push(h)}},c=[{zone:l.EditorZone.HEADER,elementList:this.draw.getHeaderElementList()},{zone:l.EditorZone.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:l.EditorZone.FOOTER,elementList:this.draw.getFooterElementList()}];for(const{zone:d,elementList:u}of c)a(u,d);return s}getMacroList(){const t=[],e=i=>{for(const r of i){if(r.type===l.ElementType.TABLE){const s=r.trList;for(const a of s)for(const c of a.tdList)e(c.value);continue}(r.type===l.ElementType.MACRO||r.type===l.ElementType.CUSTOM_MACRO||r.type===l.ElementType.REUSABLE_ITEM)&&t.push(r)}},n=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const i of n)e(i);return t}setMacroValue(t){const{id:e,dictCode:n,label:i,areaId:r,value:s,code:a,isSubmitHistory:c=!0}=t;let d=!1;const u=h=>{for(let g=0;g<h.length;g++){const f=h[g];if(f.type===l.ElementType.TABLE){const T=f.trList;for(const m of T)for(const p of m.tdList)u(p.value);continue}f.type!==l.ElementType.MACRO&&f.type!==l.ElementType.CUSTOM_MACRO&&f.type!==l.ElementType.REUSABLE_ITEM||e&&f.id!==e||n&&f.dictCode!==n||i&&f.label!==i||r&&f.areaId!==r||(d=!0,f.type===l.ElementType.MACRO?f.value=s:f.type===l.ElementType.CUSTOM_MACRO?f.macroConfig?(f.macroConfig.value=s,a!==void 0&&(f.macroConfig.code=a)):f.macroConfig={type:"text",value:s}:f.type===l.ElementType.REUSABLE_ITEM&&(f.reusableItemConfig?f.reusableItemConfig.value=s:f.reusableItemConfig={value:s}))}},R=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const h of R)u(h);d&&this.draw.render({isSubmitHistory:c,isSetCursor:!1})}setMacroValueList(t){if(!t.length)return;let e=!1,n=!1;const i=s=>{for(let a=0;a<s.length;a++){const c=s[a];if(c.type===l.ElementType.TABLE){const g=c.trList;for(const f of g)for(const T of f.tdList)i(T.value);continue}if(c.type!==l.ElementType.MACRO&&c.type!==l.ElementType.CUSTOM_MACRO&&c.type!==l.ElementType.REUSABLE_ITEM)continue;const d=t.find(g=>g.id&&c.id===g.id||g.dictCode&&c.dictCode===g.dictCode||g.label&&c.label===g.label||g.areaId&&c.areaId===g.areaId);if(!d)continue;const{value:u,code:R,isSubmitHistory:h=!0}=d;e=!0,h&&(n=!0),c.type===l.ElementType.MACRO?c.value=u:c.type===l.ElementType.CUSTOM_MACRO?c.macroConfig?(c.macroConfig.value=u,R!==void 0&&(c.macroConfig.code=R)):c.macroConfig={type:"text",value:u}:c.type===l.ElementType.REUSABLE_ITEM&&(c.reusableItemConfig?c.reusableItemConfig.value=u:c.reusableItemConfig={value:u})}},r=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const s of r)i(s);e&&(n||this.draw.getHistoryManager().recovery(),this.draw.render({isSubmitHistory:n,isSetCursor:!1}))}updateMacroProperties(t){const{id:e,dictCode:n,label:i,areaId:r,properties:s,isSubmitHistory:a=!0}=t;let c=!1;const d=R=>{for(let h=0;h<R.length;h++){const g=R[h];if(g.type===l.ElementType.TABLE){const f=g.trList;for(const T of f)for(const m of T.tdList)d(m.value);continue}g.type!==l.ElementType.MACRO&&g.type!==l.ElementType.CUSTOM_MACRO&&g.type!==l.ElementType.REUSABLE_ITEM||e&&g.id!==e||n&&g.dictCode!==n||i&&g.label!==i||r&&g.areaId!==r||(c=!0,Object.assign(g,s))}},u=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(const R of u)d(R);c&&this.draw.render({isSubmitHistory:a,isSetCursor:!1})}locationMacro(t){const{id:e,dictCode:n,label:i,areaId:r}=t,s=(c,d)=>{for(let u=0;u<c.length;u++){const R=c[u];if(R.type===l.ElementType.TABLE){const h=R.trList;for(let g=0;g<h.length;g++){const f=h[g];for(let T=0;T<f.tdList.length;T++){const m=f.tdList[T],p=s(m.value,d);if(p)return{...p,isTable:!0,index:u,trIndex:g,tdIndex:T,tableId:R.tableId,trId:f.id,tdId:m.id}}}}if(!(R.type!==l.ElementType.MACRO&&R.type!==l.ElementType.CUSTOM_MACRO&&R.type!==l.ElementType.REUSABLE_ITEM)&&!(e&&R.id!==e)&&!(n&&R.dictCode!==n)&&!(i&&R.label!==i)&&!(r&&R.areaId!==r))return{zone:d,index:u}}return null},a=[{zone:l.EditorZone.HEADER,elementList:this.draw.getHeaderElementList()},{zone:l.EditorZone.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:l.EditorZone.FOOTER,elementList:this.draw.getFooterElementList()}];for(const{zone:c,elementList:d}of a){const u=s(d,c);if(u){this.setZone(u.zone),this.position.setPositionContext({isTable:u.isTable||!1,index:u.index,trIndex:u.trIndex,tdIndex:u.tdIndex,tableId:u.tableId,trId:u.trId,tdId:u.tdId}),this.range.replaceRange({startIndex:u.index,endIndex:u.index}),this.draw.render({curIndex:u.index,isCompute:!1,isSubmitHistory:!1});break}}}insertSubTemplate(t){const{label:e,templateId:n,content:i,conditions:r,relation:s="and",isSubmitHistory:a=!0}=t,c={id:lt(),value:e,type:l.ElementType.SUB_TEMPLATE,label:e,templateId:n,subTemplateContent:i?.map(d=>at(d)),subTemplateRelation:s,subTemplateConditions:r?.map(d=>({...d})),subTemplateExpanded:!1};this.insertElementList([c],{isSubmitHistory:a})}updateSubTemplate(t){const{id:e,properties:n,isSubmitHistory:i=!0}=t;if(!e)return;const r=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];let s=!1;for(let a=0;a<r.length;a++)Tr(r[a],c=>{c.id!==e||c.type!==l.ElementType.SUB_TEMPLATE||(Object.assign(c,{...n,value:n.label??c.value,subTemplateContent:n.subTemplateContent?n.subTemplateContent.map(d=>at(d)):c.subTemplateContent?.map(d=>at(d)),subTemplateConditions:n.subTemplateConditions?n.subTemplateConditions.map(d=>({...d})):c.subTemplateConditions?.map(d=>({...d}))}),s=!0)});s&&this.draw.render({isSubmitHistory:i,isCompute:!0})}expandSubTemplate(t){const{id:e,content:n,isSubmitHistory:i=!0}=t,r=this.draw.getOriginalMainElementList();for(let s=0;s<r.length;s++){const a=r[s];if(a.type===l.ElementType.SUB_TEMPLATE&&(!e||a.id===e)){const c=n||a.subTemplateContent;if(!c?.length){console.warn("子模板内容为空,无法展开");return}a.subTemplateExpanded=!0,a.hide=!0;const d=at(c);bt(d,{isHandleFirstElement:!1,editorOptions:this.options});for(let u=0;u<d.length;u++)d[u].subTemplateParentId=a.id;r.splice(s+1,0,...d),this.draw.render({isSubmitHistory:i,isCompute:!0});return}}}collapseSubTemplate(t){const{id:e,isSubmitHistory:n=!0}=t,i=this.draw.getOriginalMainElementList();for(let r=0;r<i.length;r++){const s=i[r];if(s.type===l.ElementType.SUB_TEMPLATE&&(!e||s.id===e)){s.subTemplateExpanded=!1,s.hide=!1;let a=r+1;for(;a<i.length&&i[a].subTemplateParentId===s.id;)a++;a>r+1&&i.splice(r+1,a-r-1),this.draw.render({isSubmitHistory:n,isCompute:!0});return}}}toggleSubTemplate(t){const{id:e,content:n,isSubmitHistory:i=!0}=t,r=this.draw.getOriginalMainElementList();for(let s=0;s<r.length;s++){const a=r[s];if(a.type===l.ElementType.SUB_TEMPLATE&&(!e||a.id===e)){a.subTemplateExpanded?this.collapseSubTemplate({id:e,isSubmitHistory:i}):this.expandSubTemplate({id:e,content:n,isSubmitHistory:i});return}}}}class gg{rangeStyleChange;visiblePageNoListChange;intersectionPageNoChange;pageSizeChange;pageScaleChange;saved;contentChange;controlChange;controlContentChange;pageModeChange;zoneChange;constructor(){this.rangeStyleChange=null,this.visiblePageNoListChange=null,this.intersectionPageNoChange=null,this.pageSizeChange=null,this.pageScaleChange=null,this.saved=null,this.contentChange=null,this.controlChange=null,this.controlContentChange=null,this.pageModeChange=null,this.zoneChange=null}}class fg{contextMenu;contextMenuList;getContextMenuList;shortcutList;langMap;constructor(t){const{contextMenu:e,shortcut:n,i18n:i}=t;this.contextMenu=e,this.contextMenuList=e.registerContextMenuList.bind(e),this.getContextMenuList=e.getContextMenuList.bind(e),this.shortcutList=n.registerShortcutList.bind(n),this.langMap=i.registerLangMap.bind(i)}disposeContextMenu(){this.contextMenu.dispose()}}const Yr={SELECTED_TEXT:"%s"},pn={GLOBAL:{CUT:"globalCut",COPY:"globalCopy",PASTE:"globalPaste",SELECT_ALL:"globalSelectAll",PRINT:"globalPrint"},CONTROL:{DELETE:"controlDelete",EDIT_ATTRIBUTE:"controlEditAttribute",COPY:"controlCopy",PASTE:"controlPaste"},HYPERLINK:{DELETE:"hyperlinkDelete",CANCEL:"hyperlinkCancel",EDIT:"hyperlinkEdit"},IMAGE:{CHANGE:"imageChange",SAVE_AS:"imageSaveAs",TEXT_WRAP:"imageTextWrap",TEXT_WRAP_EMBED:"imageTextWrapEmbed",TEXT_WRAP_UP_DOWN:"imageTextWrapUpDown",TEXT_WRAP_SURROUND:"imageTextWrapSurround",TEXT_WRAP_FLOAT_TOP:"imageTextWrapFloatTop",TEXT_WRAP_FLOAT_BOTTOM:"imageTextWrapFloatBottom"},TABLE:{BORDER:"border",BORDER_ALL:"tableBorderAll",BORDER_EMPTY:"tableBorderEmpty",BORDER_DASH:"tableBorderDash",BORDER_EXTERNAL:"tableBorderExternal",BORDER_INTERNAL:"tableBorderInternal",BORDER_TD:"tableBorderTd",BORDER_TD_TOP:"tableBorderTdTop",BORDER_TD_RIGHT:"tableBorderTdRight",BORDER_TD_BOTTOM:"tableBorderTdBottom",BORDER_TD_LEFT:"tableBorderTdLeft",BORDER_TD_FORWARD:"tableBorderTdForward",BORDER_TD_BACK:"tableBorderTdBack",VERTICAL_ALIGN:"tableVerticalAlign",VERTICAL_ALIGN_TOP:"tableVerticalAlignTop",VERTICAL_ALIGN_MIDDLE:"tableVerticalAlignMiddle",VERTICAL_ALIGN_BOTTOM:"tableVerticalAlignBottom",INSERT_ROW_COL:"tableInsertRowCol",INSERT_TOP_ROW:"tableInsertTopRow",INSERT_BOTTOM_ROW:"tableInsertBottomRow",INSERT_LEFT_COL:"tableInsertLeftCol",INSERT_RIGHT_COL:"tableInsertRightCol",DELETE_ROW_COL:"tableDeleteRowCol",DELETE_ROW:"tableDeleteRow",DELETE_COL:"tableDeleteCol",DELETE_TABLE:"tableDeleteTable",MERGE_CELL:"tableMergeCell",CANCEL_MERGE_CELL:"tableCancelMergeCell",TABLE_PROPERTIES:"tableProperties"}},{CONTROL:{DELETE:Tg,EDIT_ATTRIBUTE:mg,COPY:pg,PASTE:Lg}}=pn;function Dr(o,t){if(t!==l.EditorMode.EDIT)return!1;const n=o?.control?.type,i=o?.controlComponent,r=n===l.ControlType.TEXT||n===l.ControlType.TEXTFIELD||n===l.ControlType.NUMBER||n===l.ControlType.SELECT||n===l.ControlType.DATE||n===l.ControlType.CHECKBOX||n===l.ControlType.RADIO||n===l.ControlType.BUTTON,s=i==="prefix"||i==="preText"||i==="preTextFix"||i==="textFixLabel"||n===l.ControlType.BUTTON&&i==="value";return r&&s}const Ig=[{key:pg,name:"复制控件",when:o=>!o.isReadonly&&!o.editorHasSelection&&!!o.startElement?.controlId&&Dr(o.startElement,o.options.mode),callback:(o,t)=>{const e=t.startElement?.controlId;e&&o.executeCopyControl(e)}},{key:Lg,name:"粘贴控件",when:o=>!o.isReadonly&&!o.editorHasSelection&&o.editorTextFocus&&o.options.mode===l.EditorMode.EDIT&&ra(),callback:o=>{o.executePasteControl()}},{key:Tg,i18nPath:"contextmenu.control.delete",when:o=>!o.isReadonly&&!o.editorHasSelection&&!!o.startElement?.controlId&&o.options.mode!==l.EditorMode.FORM,callback:o=>{o.executeRemoveControl()}},{key:mg,i18nPath:"contextmenu.control.editAttribute",when:o=>!o.isReadonly&&!o.editorHasSelection&&!!o.startElement?.controlId&&Dr(o.startElement,o.options.mode),callback:(o,t)=>{const e=t.startElement?.controlId;e&&o.executeTriggerControlEditAttribute(e)}}],{GLOBAL:{CUT:Pg,COPY:Mg,PASTE:Og,SELECT_ALL:Cg,PRINT:Sg}}=pn,Eg=[{key:Pg,i18nPath:"contextmenu.global.cut",shortCut:`${Ke?"⌘":"Ctrl"} + X`,when:o=>!o.isReadonly,callback:o=>{o.executeCut()}},{key:Mg,i18nPath:"contextmenu.global.copy",shortCut:`${Ke?"⌘":"Ctrl"} + C`,when:o=>o.editorHasSelection||o.isCrossRowCol,callback:o=>{o.executeCopy()}},{key:Og,i18nPath:"contextmenu.global.paste",shortCut:`${Ke?"⌘":"Ctrl"} + V`,when:o=>!o.isReadonly&&o.editorTextFocus,callback:o=>{o.executePaste()}},{key:Cg,i18nPath:"contextmenu.global.selectAll",shortCut:`${Ke?"⌘":"Ctrl"} + A`,when:o=>o.editorTextFocus,callback:o=>{o.executeSelectAll()}},{isDivider:!0},{key:Sg,i18nPath:"contextmenu.global.print",icon:"print",when:()=>!0,callback:o=>{o.executePrint()}}],{HYPERLINK:{DELETE:Xg,CANCEL:Ng,EDIT:Fg}}=pn,yg=[{key:Xg,i18nPath:"contextmenu.hyperlink.delete",when:o=>!o.isReadonly&&o.startElement?.type===l.ElementType.HYPERLINK,callback:o=>{o.executeDeleteHyperlink()}},{key:Ng,i18nPath:"contextmenu.hyperlink.cancel",when:o=>!o.isReadonly&&o.startElement?.type===l.ElementType.HYPERLINK,callback:o=>{o.executeCancelHyperlink()}},{key:Fg,i18nPath:"contextmenu.hyperlink.edit",when:o=>!o.isReadonly&&o.startElement?.type===l.ElementType.HYPERLINK,callback:(o,t)=>{const e=window.prompt(o.executeTranslate("contextmenu.hyperlink.edit"),t.startElement?.url);e&&o.executeEditHyperlink(e)}}],{IMAGE:{CHANGE:bg,SAVE_AS:Wg,TEXT_WRAP:Vg,TEXT_WRAP_EMBED:Yg,TEXT_WRAP_UP_DOWN:Dg,TEXT_WRAP_SURROUND:Ug,TEXT_WRAP_FLOAT_TOP:wg,TEXT_WRAP_FLOAT_BOTTOM:Zg}}=pn,Qg=[{key:bg,i18nPath:"contextmenu.image.change",icon:"image-change",when:o=>!o.isReadonly&&!o.editorHasSelection&&o.startElement?.type===l.ElementType.IMAGE,callback:o=>{const t=document.createElement("input");t.type="file",t.accept=".png, .jpg, .jpeg",t.onchange=()=>{const e=t.files[0],n=new FileReader;n.readAsDataURL(e),n.onload=()=>{const i=n.result;o.executeReplaceImageElement(i)}},t.click()}},{key:Wg,i18nPath:"contextmenu.image.saveAs",icon:"image",when:o=>!o.editorHasSelection&&o.startElement?.type===l.ElementType.IMAGE,callback:o=>{o.executeSaveAsImageElement()}},{key:Vg,i18nPath:"contextmenu.image.textWrap",when:o=>!o.isReadonly&&!o.editorHasSelection&&o.startElement?.type===l.ElementType.IMAGE,childMenus:[{key:Yg,i18nPath:"contextmenu.image.textWrapType.embed",when:()=>!0,callback:(o,t)=>{o.executeChangeImageDisplay(t.startElement,l.ImageDisplay.BLOCK)}},{key:Dg,i18nPath:"contextmenu.image.textWrapType.upDown",when:()=>!0,callback:(o,t)=>{o.executeChangeImageDisplay(t.startElement,l.ImageDisplay.INLINE)}},{key:Ug,i18nPath:"contextmenu.image.textWrapType.surround",when:()=>!0,callback:(o,t)=>{o.executeChangeImageDisplay(t.startElement,l.ImageDisplay.SURROUND)}},{key:wg,i18nPath:"contextmenu.image.textWrapType.floatTop",when:()=>!0,callback:(o,t)=>{o.executeChangeImageDisplay(t.startElement,l.ImageDisplay.FLOAT_TOP)}},{key:Zg,i18nPath:"contextmenu.image.textWrapType.floatBottom",when:()=>!0,callback:(o,t)=>{o.executeChangeImageDisplay(t.startElement,l.ImageDisplay.FLOAT_BOTTOM)}}]}],{TABLE:{BORDER:vg,BORDER_ALL:Kg,BORDER_EMPTY:Hg,BORDER_DASH:_g,BORDER_EXTERNAL:xg,BORDER_INTERNAL:Gg,BORDER_TD:Ag,BORDER_TD_TOP:kg,BORDER_TD_LEFT:Jg,BORDER_TD_BOTTOM:Bg,BORDER_TD_RIGHT:$g,BORDER_TD_BACK:zg,BORDER_TD_FORWARD:jg,VERTICAL_ALIGN:qg,VERTICAL_ALIGN_TOP:tf,VERTICAL_ALIGN_MIDDLE:ef,VERTICAL_ALIGN_BOTTOM:nf,INSERT_ROW_COL:of,INSERT_TOP_ROW:sf,INSERT_BOTTOM_ROW:rf,INSERT_LEFT_COL:lf,INSERT_RIGHT_COL:af,DELETE_ROW_COL:cf,DELETE_ROW:df,DELETE_COL:uf,DELETE_TABLE:Rf,MERGE_CELL:hf,CANCEL_MERGE_CELL:gf}}=pn,ff=[{isDivider:!0},{key:vg,i18nPath:"contextmenu.table.border",icon:"border-all",when:o=>!o.isReadonly&&o.isInTable&&o.options.mode!==l.EditorMode.FORM,childMenus:[{key:Kg,i18nPath:"contextmenu.table.borderAll",icon:"border-all",when:()=>!0,callback:o=>{o.executeTableBorderType(l.TableBorder.ALL)}},{key:Hg,i18nPath:"contextmenu.table.borderEmpty",icon:"border-empty",when:()=>!0,callback:o=>{o.executeTableBorderType(l.TableBorder.EMPTY)}},{key:_g,i18nPath:"contextmenu.table.borderDash",icon:"border-dash",when:()=>!0,callback:o=>{o.executeTableBorderType(l.TableBorder.DASH)}},{key:xg,i18nPath:"contextmenu.table.borderExternal",icon:"border-external",when:()=>!0,callback:o=>{o.executeTableBorderType(l.TableBorder.EXTERNAL)}},{key:Gg,i18nPath:"contextmenu.table.borderInternal",icon:"border-internal",when:()=>!0,callback:o=>{o.executeTableBorderType(l.TableBorder.INTERNAL)}},{key:Ag,i18nPath:"contextmenu.table.borderTd",icon:"border-td",when:()=>!0,childMenus:[{key:kg,i18nPath:"contextmenu.table.borderTdTop",icon:"border-td-top",when:()=>!0,callback:o=>{o.executeTableTdBorderType(l.TdBorder.TOP)}},{key:$g,i18nPath:"contextmenu.table.borderTdRight",icon:"border-td-right",when:()=>!0,callback:o=>{o.executeTableTdBorderType(l.TdBorder.RIGHT)}},{key:Bg,i18nPath:"contextmenu.table.borderTdBottom",icon:"border-td-bottom",when:()=>!0,callback:o=>{o.executeTableTdBorderType(l.TdBorder.BOTTOM)}},{key:Jg,i18nPath:"contextmenu.table.borderTdLeft",icon:"border-td-left",when:()=>!0,callback:o=>{o.executeTableTdBorderType(l.TdBorder.LEFT)}},{key:jg,i18nPath:"contextmenu.table.borderTdForward",icon:"border-td-forward",when:()=>!0,callback:o=>{o.executeTableTdSlashType(l.TdSlash.FORWARD)}},{key:zg,i18nPath:"contextmenu.table.borderTdBack",icon:"border-td-back",when:()=>!0,callback:o=>{o.executeTableTdSlashType(l.TdSlash.BACK)}}]}]},{key:qg,i18nPath:"contextmenu.table.verticalAlign",icon:"vertical-align",when:o=>!o.isReadonly&&o.isInTable&&o.options.mode!==l.EditorMode.FORM,childMenus:[{key:tf,i18nPath:"contextmenu.table.verticalAlignTop",icon:"vertical-align-top",when:()=>!0,callback:o=>{o.executeTableTdVerticalAlign(l.VerticalAlign.TOP)}},{key:ef,i18nPath:"contextmenu.table.verticalAlignMiddle",icon:"vertical-align-middle",when:()=>!0,callback:o=>{o.executeTableTdVerticalAlign(l.VerticalAlign.MIDDLE)}},{key:nf,i18nPath:"contextmenu.table.verticalAlignBottom",icon:"vertical-align-bottom",when:()=>!0,callback:o=>{o.executeTableTdVerticalAlign(l.VerticalAlign.BOTTOM)}}]},{key:of,i18nPath:"contextmenu.table.insertRowCol",icon:"insert-row-col",when:o=>!o.isReadonly&&o.isInTable&&o.options.mode!==l.EditorMode.FORM,childMenus:[{key:sf,i18nPath:"contextmenu.table.insertTopRow",icon:"insert-top-row",when:()=>!0,callback:o=>{o.executeInsertTableTopRow()}},{key:rf,i18nPath:"contextmenu.table.insertBottomRow",icon:"insert-bottom-row",when:()=>!0,callback:o=>{o.executeInsertTableBottomRow()}},{key:lf,i18nPath:"contextmenu.table.insertLeftCol",icon:"insert-left-col",when:()=>!0,callback:o=>{o.executeInsertTableLeftCol()}},{key:af,i18nPath:"contextmenu.table.insertRightCol",icon:"insert-right-col",when:()=>!0,callback:o=>{o.executeInsertTableRightCol()}}]},{key:cf,i18nPath:"contextmenu.table.deleteRowCol",icon:"delete-row-col",when:o=>!o.isReadonly&&o.isInTable&&o.options.mode!==l.EditorMode.FORM,childMenus:[{key:df,i18nPath:"contextmenu.table.deleteRow",icon:"delete-row",when:()=>!0,callback:o=>{o.executeDeleteTableRow()}},{key:uf,i18nPath:"contextmenu.table.deleteCol",icon:"delete-col",when:()=>!0,callback:o=>{o.executeDeleteTableCol()}},{key:Rf,i18nPath:"contextmenu.table.deleteTable",icon:"delete-table",when:()=>!0,callback:o=>{o.executeDeleteTable()}}]},{key:hf,i18nPath:"contextmenu.table.mergeCell",icon:"merge-cell",when:o=>!o.isReadonly&&o.isCrossRowCol&&o.options.mode!==l.EditorMode.FORM,callback:o=>{o.executeMergeTableCell()}},{key:gf,i18nPath:"contextmenu.table.mergeCancelCell",icon:"merge-cancel-cell",when:o=>!o.isReadonly&&o.isInTable&&o.options.mode!==l.EditorMode.FORM,callback:o=>{o.executeCancelMergeTableCell()}}];class Tf{options;draw;command;range;position;i18n;container;contextMenuList;contextMenuContainerList;contextMenuRelationShip;context;constructor(t,e){this.options=t.getOptions(),this.draw=t,this.command=e,this.range=t.getRange(),this.position=t.getPosition(),this.i18n=t.getI18n(),this.container=t.getContainer(),this.context=null,this.contextMenuList=[...Eg,...ff,...Qg,...Ig,...yg],this.contextMenuContainerList=[],this.contextMenuRelationShip=new Map,this._addEvent()}getContextMenuList(){return this.contextMenuList}_addEvent(){this.container.addEventListener("contextmenu",this._proxyContextMenuEvent),document.addEventListener("mousedown",this._handleSideEffect)}removeEvent(){this.container.removeEventListener("contextmenu",this._proxyContextMenuEvent),document.removeEventListener("mousedown",this._handleSideEffect)}_filterMenuList(t){const{contextMenuDisableKeys:e}=this.options,n=[];for(let i=0;i<t.length;i++){const r=t[i];r.disable||r.key&&e.includes(r.key)||(r.isDivider||r.when?.(this.context))&&n.push(r)}return n}_proxyContextMenuEvent=t=>{this.context=this._getContext(t);const e=this._filterMenuList(this.contextMenuList);e.some(i=>!i.isDivider)&&(this.dispose(),this._render({contextMenuList:e,left:t.x,top:t.y})),t.preventDefault()};_handleSideEffect=t=>{const e=t.target;this.contextMenuContainerList.some(i=>i.contains(e))||this.dispose()};_getContext(t){const e=this.draw.isReadonly(),{isCrossRowCol:n,startIndex:i,endIndex:r}=this.range.getRange(),s=!!(~i||~r),a=s&&i!==r,{isTable:c,trIndex:d,tdIndex:u,index:R}=this.position.getPositionContext(),h=t?this.command.getPositionContextByEvent(t,{isMustDirectHit:!0}):null;let g=null;if(c){const P=this.draw.getOriginalElementList()[R]||null;P&&(g=Mt([P],{extraPickAttrs:["id"]})[0])}const f=c&&!!n,T=this.draw.getElementList();let m=T[i]||null,p=T[r]||null;h?.element&&(m=h.element,p=h.element),h?.tableInfo?.element&&(g=h.tableInfo.element);const I=this.draw.getZone().getZone();return{startElement:m,endElement:p,isReadonly:e,editorHasSelection:a,editorTextFocus:s,isCrossRowCol:f,zone:I,isInTable:c,trIndex:d??null,tdIndex:u??null,tableElement:g,options:this.options}}_createContextMenuContainer(){const t=document.createElement("div");return t.classList.add(`${z}-contextmenu-container`),t.setAttribute(ue,l.EditorComponent.CONTEXTMENU),this.container.append(t),t}_render(t){const{contextMenuList:e,left:n,top:i,parentMenuContainer:r}=t,s=this._createContextMenuContainer(),a=document.createElement("div");a.classList.add(`${z}-contextmenu-content`);let c=null;r&&this.contextMenuRelationShip.set(r,s);for(let P=0;P<e.length;P++){const C=e[P];if(C.isDivider){if(P!==0&&P!==e.length-1&&!e[P-1]?.isDivider){const S=document.createElement("div");S.classList.add(`${z}-contextmenu-divider`),a.append(S)}}else{const S=document.createElement("div");if(S.classList.add(`${z}-contextmenu-item`),C.childMenus){const Y=this._filterMenuList(C.childMenus);Y.some(W=>!W.isDivider)&&(S.classList.add(`${z}-contextmenu-sub-item`),S.onmouseenter=()=>{this._setHoverStatus(S,!0),this._removeSubMenu(s);const W=S.getBoundingClientRect(),X=W.left+W.width,O=W.top;c=this._render({contextMenuList:Y,left:X,top:O,parentMenuContainer:s})},S.onmouseleave=W=>{(!c||!c.contains(W.relatedTarget))&&this._setHoverStatus(S,!1)})}else S.onmouseenter=()=>{this._setHoverStatus(S,!0),this._removeSubMenu(s)},S.onmouseleave=()=>{this._setHoverStatus(S,!1)},S.onclick=()=>{C.callback&&this.context&&C.callback(this.command,this.context),this.dispose()};const F=document.createElement("i");S.append(F),C.icon&&F.classList.add(`${z}-contextmenu-${C.icon}`);const N=document.createElement("span"),V=C.i18nPath?this._formatName(this.i18n.t(C.i18nPath)):this._formatName(C.name||"");if(N.append(document.createTextNode(V)),S.append(N),C.shortCut){const Y=document.createElement("span");Y.classList.add(`${z}-shortcut`),Y.append(document.createTextNode(C.shortCut)),S.append(Y)}a.append(S)}}const d=document.createElement("div");d.classList.add(`${z}-contextmenu-divider`),a.append(d);const u=document.createElement("div");u.classList.add(`${z}-contextmenu-item`),u.onmouseenter=()=>{this._setHoverStatus(u,!0),this._removeSubMenu(s)},u.onmouseleave=()=>{this._setHoverStatus(u,!1)},u.onclick=()=>{this.dispose()};const R=document.createElement("i");u.append(R);const h=document.createElement("span");h.append(document.createTextNode(this.i18n.t("contextmenu.global.cancel"))),u.append(h),a.append(u),s.append(a),s.style.display="block";const g=window.innerWidth,f=s.getBoundingClientRect(),T=f.width,m=n+T>g?n-T:n;s.style.left=`${m}px`;const p=window.innerHeight,I=f.height,L=i+I>p?i-I:i;return s.style.top=`${L}px`,this.contextMenuContainerList.push(s),s}_removeSubMenu(t){const e=this.contextMenuRelationShip.get(t);e&&(this._removeSubMenu(e),e.remove(),this.contextMenuRelationShip.delete(t))}_setHoverStatus(t,e){e?(t.parentNode?.querySelectorAll(`${z}-contextmenu-item`).forEach(n=>n.classList.remove("hover")),t.classList.add("hover")):t.classList.remove("hover")}_formatName(t){const e=Object.values(Yr),n=new RegExp(`${e.join("|")}`);let i=t;if(n.test(i)){const r=new RegExp(Yr.SELECTED_TEXT,"g");if(r.test(i)){const s=this.range.toString();i=i.replace(r,s)}}return i}registerContextMenuList(t){this.contextMenuList.push(...t)}dispose(){this.contextMenuContainerList.forEach(t=>t.remove()),this.contextMenuContainerList=[],this.contextMenuRelationShip.clear()}}const mf=[{key:l.KeyMap.X,ctrl:!0,shift:!0,callback:o=>{o.executeStrikeout()}},{key:l.KeyMap.LEFT_BRACKET,mod:!0,callback:o=>{o.executeSizeAdd()}},{key:l.KeyMap.RIGHT_BRACKET,mod:!0,callback:o=>{o.executeSizeMinus()}},{key:l.KeyMap.B,mod:!0,callback:o=>{o.executeBold()}},{key:l.KeyMap.I,mod:!0,callback:o=>{o.executeItalic()}},{key:l.KeyMap.U,mod:!0,callback:o=>{o.executeUnderline()}},{key:Ke?l.KeyMap.COMMA:l.KeyMap.RIGHT_ANGLE_BRACKET,mod:!0,shift:!0,callback:o=>{o.executeSuperscript()}},{key:Ke?l.KeyMap.PERIOD:l.KeyMap.LEFT_ANGLE_BRACKET,mod:!0,shift:!0,callback:o=>{o.executeSubscript()}},{key:l.KeyMap.L,mod:!0,callback:o=>{o.executeRowFlex(l.RowFlex.LEFT)}},{key:l.KeyMap.E,mod:!0,callback:o=>{o.executeRowFlex(l.RowFlex.CENTER)}},{key:l.KeyMap.R,mod:!0,callback:o=>{o.executeRowFlex(l.RowFlex.RIGHT)}},{key:l.KeyMap.J,mod:!0,callback:o=>{o.executeRowFlex(l.RowFlex.ALIGNMENT)}},{key:l.KeyMap.J,mod:!0,shift:!0,callback:o=>{o.executeRowFlex(l.RowFlex.JUSTIFY)}}],pf=[{key:l.KeyMap.ZERO,alt:!0,ctrl:!0,callback:o=>{o.executeTitle(null)}},{key:l.KeyMap.ONE,alt:!0,ctrl:!0,callback:o=>{o.executeTitle(l.TitleLevel.FIRST)}},{key:l.KeyMap.TWO,alt:!0,ctrl:!0,callback:o=>{o.executeTitle(l.TitleLevel.SECOND)}},{key:l.KeyMap.THREE,alt:!0,ctrl:!0,callback:o=>{o.executeTitle(l.TitleLevel.THIRD)}},{key:l.KeyMap.FOUR,alt:!0,ctrl:!0,callback:o=>{o.executeTitle(l.TitleLevel.FOURTH)}},{key:l.KeyMap.FIVE,alt:!0,ctrl:!0,callback:o=>{o.executeTitle(l.TitleLevel.FIFTH)}},{key:l.KeyMap.SIX,alt:!0,ctrl:!0,callback:o=>{o.executeTitle(l.TitleLevel.SIXTH)}}],Lf=[{key:l.KeyMap.I,shift:!0,mod:!0,callback:o=>{o.executeList(l.ListType.UL,l.ListStyle.DISC)}},{key:l.KeyMap.U,shift:!0,mod:!0,callback:o=>{o.executeList(l.ListType.OL)}}];class If{draw;command;globalShortcutList;agentShortcutList;constructor(t,e){this.draw=t,this.command=e,this.globalShortcutList=[],this.agentShortcutList=[],this._addShortcutList([...mf,...pf,...Lf]),this._addEvent(),t.getCursor().getAgentDom().addEventListener("keydown",this._agentKeydown.bind(this))}_addEvent(){document.addEventListener("keydown",this._globalKeydown)}removeEvent(){document.removeEventListener("keydown",this._globalKeydown)}_addShortcutList(t){for(let e=t.length-1;e>=0;e--){const n=t[e];n.isGlobal?this.globalShortcutList.unshift(n):this.agentShortcutList.unshift(n)}}registerShortcutList(t){this._addShortcutList(t)}_globalKeydown=t=>{this.globalShortcutList.length&&this.draw.isGlobalShortcutActive()&&this.draw.isTargetInsideEditor(t.target)&&this._execute(t,this.globalShortcutList)};_agentKeydown(t){this.agentShortcutList.length&&(this.draw.isInteractionSuspended()||this._execute(t,this.agentShortcutList))}_execute(t,e){for(let n=0;n<e.length;n++){const i=e[n];if((i.mod?Te(t)===!!i.mod:t.ctrlKey===!!i.ctrl&&t.metaKey===!!i.meta)&&t.shiftKey===!!i.shift&&t.altKey===!!i.alt&&t.key.toLowerCase()===i.key.toLowerCase()){i.disable||(i?.callback?.(this.command),t.preventDefault());break}}}}class Pf{editor;constructor(t){this.editor=t}use(t,e){t(this.editor,e)}}class Mf{eventHub;constructor(){this.eventHub=new Map}on(t,e){if(!t||typeof e!="function")return;const n=this.eventHub.get(t)||new Set;n.add(e),this.eventHub.set(t,n)}emit(t,e){if(!t)return;const n=this.eventHub.get(t);if(n){if(n.size===1)return[...n][0](e);n.forEach(i=>i(e))}}off(t,e){if(!t||typeof e!="function")return;const n=this.eventHub.get(t);n&&n.delete(e)}isSubscribe(t){const e=this.eventHub.get(t);return!!e&&e.size>0}dangerouslyClearAll(){this.eventHub.clear()}}class Of{paste;copy;drop}class Ur{command;version;listener;eventBus;override;register;destroy;use;draw;constructor(t,e,n={}){const i=Do(n);e=at(e);let r=[],s=[],a=[],c=[];Array.isArray(e)?s=e:(r=e.header||[],s=e.main,a=e.footer||[],c=e.graffiti||[]),[r,s,a].forEach(f=>{bt(f,{editorOptions:i,isForceCompensation:!0})}),this.version=ve,this.listener=new gg,this.eventBus=new Mf,this.override=new Of,this.draw=new lg(t,i,{header:r,main:s,footer:a,graffiti:c},this.listener,this.eventBus,this.override);const u=this.draw;this.command=new Wr(new hg(u)),u.setCommand(this.command);const R=new Tf(u,this.command),h=new If(u,this.command);this.register=new fg({contextMenu:R,shortcut:h,i18n:u.getI18n()}),this.destroy=()=>{u.destroy(),h.removeEvent(),R.removeEvent(),this.eventBus.dangerouslyClearAll()};const g=new Pf(this);this.use=g.use.bind(g)}setFormModeTrace(t){this.command.executeSetFormModeTrace(t)}pauseInteraction(){this.draw.pauseInteraction()}resumeInteraction(){this.draw.resumeInteraction()}setOverlayActive(t){this.draw.setOverlayActive(t)}suspendGlobalShortcut(t){this.draw.suspendGlobalShortcut(t)}}l.Command=Wr,l.EDITOR_CLIPBOARD=Ln,l.EDITOR_COMPONENT=ue,l.Editor=Ur,l.INTERNAL_CONTEXT_MENU_KEY=pn,l.INTERNAL_SHORTCUT_KEY=fs,l.LETTER_CLASS=mo,l.createDomFromElementList=nn,l.default=Ur,l.getElementListByHTML=on,l.getTextFromElementList=xe,l.splitText=ct,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
549
549
|
//# sourceMappingURL=canvas-editor.umd.cjs.map
|