ht-emr 0.7.17 → 0.7.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
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:2000}.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:2000}.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
- const fs = "0.7.17";
2
+ const fs = "0.7.18";
3
3
  var vn;
4
4
  (function(o) {
5
5
  o.HALF = "half", o.ONE_THIRD = "one-third", o.QUARTER = "quarter";
@@ -350,10 +350,10 @@ var oe;
350
350
  o.UP = "top", o.DOWN = "down", o.LEFT = "left", o.RIGHT = "right";
351
351
  })(oe || (oe = {}));
352
352
  const Un = typeof navigator < "u" && /Mac OS X/.test(navigator.userAgent), Qa = typeof navigator < "u" && /iPad|iPhone/.test(navigator.userAgent), va = /Mobile|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), Ka = typeof navigator < "u" && /Firefox/.test(navigator.userAgent);
353
- var O;
353
+ var P;
354
354
  (function(o) {
355
355
  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";
356
- })(O || (O = {}));
356
+ })(P || (P = {}));
357
357
  const Ae = [
358
358
  "bold",
359
359
  "color",
@@ -515,23 +515,23 @@ const Ae = [
515
515
  ...mo,
516
516
  ...wn
517
517
  ], ye = [
518
- O.TEXT,
519
- O.HYPERLINK,
520
- O.SUBSCRIPT,
521
- O.SUPERSCRIPT,
522
- O.CONTROL,
523
- O.DATE
518
+ P.TEXT,
519
+ P.HYPERLINK,
520
+ P.SUBSCRIPT,
521
+ P.SUPERSCRIPT,
522
+ P.CONTROL,
523
+ P.DATE
524
524
  ], Ga = [
525
- O.IMAGE,
526
- O.LATEX
525
+ P.IMAGE,
526
+ P.LATEX
527
527
  ], ka = [
528
- O.BLOCK,
529
- O.PAGE_BREAK,
530
- O.SEPARATOR,
531
- O.TABLE
528
+ P.BLOCK,
529
+ P.PAGE_BREAK,
530
+ P.SEPARATOR,
531
+ P.TABLE
532
532
  ], Ja = ["HR", "TABLE", "UL", "OL"], Ba = [
533
- O.TITLE,
534
- O.LIST
533
+ P.TITLE,
534
+ P.LIST
535
535
  ];
536
536
  class oo {
537
537
  static sandbox = ["allow-scripts", "allow-same-origin"];
@@ -570,7 +570,7 @@ class jr {
570
570
  getOriginalMainImageList() {
571
571
  const t = [], e = (n) => {
572
572
  for (const i of n)
573
- if (i.type === O.TABLE) {
573
+ if (i.type === P.TABLE) {
574
574
  const r = i.trList;
575
575
  for (let s = 0; s < r.length; s++) {
576
576
  const l = r[s];
@@ -579,7 +579,7 @@ class jr {
579
579
  e(c.value);
580
580
  }
581
581
  }
582
- } else i.type === O.IMAGE && t.push(i);
582
+ } else i.type === P.IMAGE && t.push(i);
583
583
  };
584
584
  return e(this.draw.getOriginalMainElementList()), t;
585
585
  }
@@ -588,12 +588,12 @@ class jr {
588
588
  for (const i of t) {
589
589
  if (i === e)
590
590
  break;
591
- if (i.type === O.TABLE) {
591
+ if (i.type === P.TABLE) {
592
592
  const r = i.trList;
593
593
  for (const s of r)
594
594
  for (const l of s.tdList)
595
595
  n += this._countImagesBeforeTarget(l.value, e);
596
- } else i.type === O.IMAGE && n++;
596
+ } else i.type === P.IMAGE && n++;
597
597
  }
598
598
  return n;
599
599
  }
@@ -652,8 +652,8 @@ class jr {
652
652
  if (f.width > r) {
653
653
  let L = 0, m = c.length;
654
654
  for (; L < m; ) {
655
- const P = Math.ceil((L + m) / 2), S = c.substring(0, P);
656
- t.measureText(S + "...").width <= r ? L = P : m = P - 1;
655
+ const O = Math.ceil((L + m) / 2), S = c.substring(0, O);
656
+ t.measureText(S + "...").width <= r ? L = O : m = O - 1;
657
657
  }
658
658
  g = c.substring(0, L) + "...";
659
659
  }
@@ -3635,7 +3635,7 @@ function gi(o = {}) {
3635
3635
  }, m = {
3636
3636
  ...Xc,
3637
3637
  ...o.lineNumber
3638
- }, P = {
3638
+ }, O = {
3639
3639
  ...Ec,
3640
3640
  ...o.pageBorder
3641
3641
  }, S = {
@@ -3732,7 +3732,7 @@ function gi(o = {}) {
3732
3732
  whiteSpace: p,
3733
3733
  separator: L,
3734
3734
  lineNumber: m,
3735
- pageBorder: P,
3735
+ pageBorder: O,
3736
3736
  badge: S,
3737
3737
  modeRule: V,
3738
3738
  graffiti: E,
@@ -3829,7 +3829,7 @@ function ns(o, t) {
3829
3829
  ]) : {};
3830
3830
  return Qt(e).map((i) => ({
3831
3831
  ...n,
3832
- type: O.TEXT,
3832
+ type: P.TEXT,
3833
3833
  value: i === `
3834
3834
  ` ? A : i
3835
3835
  }));
@@ -3842,11 +3842,11 @@ function oi(o) {
3842
3842
  return t.map((n) => o.valueSets?.find((i) => i.code === n)?.value).filter((n) => !!n).join(e);
3843
3843
  }
3844
3844
  function rl(o) {
3845
- return o.type === O.REUSABLE_ITEM ? sn(o.reusableItemConfig?.value || "", [
3845
+ return o.type === P.REUSABLE_ITEM ? sn(o.reusableItemConfig?.value || "", [
3846
3846
  o.label || ""
3847
- ]) : o.type === O.CUSTOM_MACRO ? sn(o.macroConfig?.value || o.value || "", [
3847
+ ]) : o.type === P.CUSTOM_MACRO ? sn(o.macroConfig?.value || o.value || "", [
3848
3848
  o.label || ""
3849
- ]) : o.type === O.MACRO ? sn(o.value || "", [o.label || ""]) : "";
3849
+ ]) : o.type === P.MACRO ? sn(o.value || "", [o.label || ""]) : "";
3850
3850
  }
3851
3851
  function yc(o) {
3852
3852
  const t = o.control;
@@ -3874,8 +3874,8 @@ function Dc(o) {
3874
3874
  return n || (o.type === D.SELECT ? sn(oi(o), t) : "");
3875
3875
  }
3876
3876
  function Ps(o) {
3877
- return Pe(o) || o.controlComponent && sl.has(o.controlComponent) ? "" : o.type === O.CONTROL ? Dc(o.control) : o.type === O.MACRO || o.type === O.CUSTOM_MACRO || o.type === O.REUSABLE_ITEM ? rl(o) : o.type === O.TABLE ? o.trList?.map((t) => t.tdList.map((e) => ii(e.value || [])).join(" ")).join(`
3878
- `) || "" : o.type === O.TAB ? " " : o.valueList?.length ? ii(o.valueList) : o.value || "";
3877
+ return Pe(o) || o.controlComponent && sl.has(o.controlComponent) ? "" : o.type === P.CONTROL ? Dc(o.control) : o.type === P.MACRO || o.type === P.CUSTOM_MACRO || o.type === P.REUSABLE_ITEM ? rl(o) : o.type === P.TABLE ? o.trList?.map((t) => t.tdList.map((e) => ii(e.value || [])).join(" ")).join(`
3878
+ `) || "" : o.type === P.TAB ? " " : o.valueList?.length ? ii(o.valueList) : o.value || "";
3879
3879
  }
3880
3880
  function ii(o) {
3881
3881
  return o.map((t) => Ps(t)).join("");
@@ -3885,7 +3885,7 @@ function so(o = []) {
3885
3885
  return o.forEach((e) => {
3886
3886
  if (Pe(e) || e.controlComponent && sl.has(e.controlComponent))
3887
3887
  return;
3888
- if (e.type === O.TABLE) {
3888
+ if (e.type === P.TABLE) {
3889
3889
  const i = pt(e);
3890
3890
  i.trList?.forEach((r) => {
3891
3891
  r.tdList.forEach((s) => {
@@ -3894,11 +3894,11 @@ function so(o = []) {
3894
3894
  }), t.push(i);
3895
3895
  return;
3896
3896
  }
3897
- if (e.type === O.CONTROL && e.control) {
3897
+ if (e.type === P.CONTROL && e.control) {
3898
3898
  t.push(...yc(e));
3899
3899
  return;
3900
3900
  }
3901
- if (e.type === O.MACRO || e.type === O.CUSTOM_MACRO || e.type === O.REUSABLE_ITEM) {
3901
+ if (e.type === P.MACRO || e.type === P.CUSTOM_MACRO || e.type === P.REUSABLE_ITEM) {
3902
3902
  t.push(...ns(rl(e), e));
3903
3903
  return;
3904
3904
  }
@@ -3908,20 +3908,20 @@ function so(o = []) {
3908
3908
  return;
3909
3909
  }
3910
3910
  const n = pt(e);
3911
- delete n.control, delete n.controlId, delete n.originControlId, delete n.controlComponent, n.type === O.CONTROL && (n.type = O.TEXT), (n.value === `
3911
+ delete n.control, delete n.controlId, delete n.originControlId, delete n.controlComponent, n.type === P.CONTROL && (n.type = P.TEXT), (n.value === `
3912
3912
  ` || n.value === `\r
3913
3913
  `) && (n.value = A), t.push(n);
3914
3914
  }), t;
3915
3915
  }
3916
3916
  function re(o, t) {
3917
3917
  const { isHandleFirstElement: e = !0, isForceCompensation: n = !1, editorOptions: i } = t, r = o[0];
3918
- (n || e && r?.type !== O.LIST && (r?.type && r.type !== O.TEXT || !ps.test(r?.value))) && o.unshift({
3918
+ (n || e && r?.type !== P.LIST && (r?.type && r.type !== P.TEXT || !ps.test(r?.value))) && o.unshift({
3919
3919
  value: A
3920
3920
  });
3921
3921
  let s = 0;
3922
3922
  for (; s < o.length; ) {
3923
3923
  let l = o[s];
3924
- if (l.type === O.TITLE) {
3924
+ if (l.type === P.TITLE) {
3925
3925
  o.splice(s, 1);
3926
3926
  const a = l.valueList || [];
3927
3927
  if (re(a, {
@@ -3936,7 +3936,7 @@ function re(o, t) {
3936
3936
  }
3937
3937
  }
3938
3938
  s--;
3939
- } else if (l.type === O.LIST) {
3939
+ } else if (l.type === P.LIST) {
3940
3940
  o.splice(s, 1);
3941
3941
  const a = l.valueList || [];
3942
3942
  if (re(a, {
@@ -3951,7 +3951,7 @@ function re(o, t) {
3951
3951
  }
3952
3952
  }
3953
3953
  s--;
3954
- } else if (l.type === O.AREA) {
3954
+ } else if (l.type === P.AREA) {
3955
3955
  o.splice(s, 1);
3956
3956
  const a = l?.valueList || [];
3957
3957
  if (re(a, {
@@ -3962,7 +3962,7 @@ function re(o, t) {
3962
3962
  const c = mt();
3963
3963
  for (let d = 0; d < a.length; d++) {
3964
3964
  const u = a[d];
3965
- if (u.areaId = l.areaId || c, u.area = l.area, u.areaIndex = d, u.type === O.TABLE) {
3965
+ if (u.areaId = l.areaId || c, u.area = l.area, u.areaIndex = d, u.type === P.TABLE) {
3966
3966
  const R = u.trList;
3967
3967
  for (let g = 0; g < R.length; g++) {
3968
3968
  const f = R[g];
@@ -3979,7 +3979,7 @@ function re(o, t) {
3979
3979
  }
3980
3980
  }
3981
3981
  s--;
3982
- } else if (l.type === O.TABLE) {
3982
+ } else if (l.type === P.TABLE) {
3983
3983
  const a = l.id || mt();
3984
3984
  if (l.id = a, l.trList) {
3985
3985
  const { defaultTrMinHeight: c } = i.table;
@@ -4000,7 +4000,7 @@ function re(o, t) {
4000
4000
  }
4001
4001
  }
4002
4002
  }
4003
- } else if (l.type === O.HYPERLINK) {
4003
+ } else if (l.type === P.HYPERLINK) {
4004
4004
  o.splice(s, 1);
4005
4005
  const a = es(l.valueList || []);
4006
4006
  if (a.length) {
@@ -4011,7 +4011,7 @@ function re(o, t) {
4011
4011
  }
4012
4012
  }
4013
4013
  s--;
4014
- } else if (l.type === O.DATE) {
4014
+ } else if (l.type === P.DATE) {
4015
4015
  o.splice(s, 1);
4016
4016
  const a = es(l.valueList || []);
4017
4017
  if (a.length) {
@@ -4022,7 +4022,7 @@ function re(o, t) {
4022
4022
  }
4023
4023
  }
4024
4024
  s--;
4025
- } else if (l.type === O.CONTROL) {
4025
+ } else if (l.type === P.CONTROL) {
4026
4026
  if (!l.control) {
4027
4027
  s++;
4028
4028
  continue;
@@ -4043,7 +4043,7 @@ function re(o, t) {
4043
4043
  code: f,
4044
4044
  type: T,
4045
4045
  valueSets: I
4046
- } = l.control, p = T, { editorOptions: { control: L, checkbox: m, radio: P } } = t, S = l.controlId || mt();
4046
+ } = l.control, p = T, { editorOptions: { control: L, checkbox: m, radio: O } } = t, S = l.controlId || mt();
4047
4047
  o.splice(s, 1);
4048
4048
  const E = he(l, [
4049
4049
  ...Ji,
@@ -4151,7 +4151,7 @@ function re(o, t) {
4151
4151
  controlId: S,
4152
4152
  value: w === `
4153
4153
  ` ? A : w,
4154
- letterSpacing: v ? P.gap : 0,
4154
+ letterSpacing: v ? O.gap : 0,
4155
4155
  control: l.control,
4156
4156
  controlComponent: h.VALUE
4157
4157
  }), X++, s++;
@@ -4181,11 +4181,11 @@ function re(o, t) {
4181
4181
  }
4182
4182
  for (let x = 0; x < Y.length; x++) {
4183
4183
  const X = Y[x];
4184
- if (X.type === O.CONTROL && X.control) {
4184
+ if (X.type === P.CONTROL && X.control) {
4185
4185
  const N = X, M = N.controlId || mt(), U = N.control?.value || [], C = N.control?.placeholder || "", w = N.control?.type, v = w === D.TEXTFIELD, H = w === D.TEXT, Z = w === D.CHECKBOX, $ = w === D.RADIO, at = w === D.BUTTON, k = v ? h.PRETEXTFIX : h.PREFIX, B = v ? h.POSTTEXTFIX : h.POSTFIX, rt = {
4186
4186
  ...E,
4187
4187
  controlId: M,
4188
- type: O.CONTROL,
4188
+ type: P.CONTROL,
4189
4189
  control: N.control
4190
4190
  }, lt = v ? i.control.textFixColor : H ? "#87d068" : at ? "transparent" : i.control.bracketColor, wt = at ? "#1677FF" : void 0, Gt = v ? N.control?.preTextFix || L.preTextFix : N.control?.prefix || L.prefix, ce = ze(w, Gt);
4191
4191
  for (let j = 0; j < ce.length; j++)
@@ -4262,7 +4262,7 @@ function re(o, t) {
4262
4262
  originControlId: S,
4263
4263
  value: Ot === `
4264
4264
  ` ? A : Ot,
4265
- letterSpacing: Ct ? P.gap : 0,
4265
+ letterSpacing: Ct ? O.gap : 0,
4266
4266
  controlComponent: h.VALUE
4267
4267
  }), s++;
4268
4268
  }
@@ -4270,7 +4270,7 @@ function re(o, t) {
4270
4270
  } else if (U.length > 0)
4271
4271
  for (let j = 0; j < U.length; j++) {
4272
4272
  const G = U[j];
4273
- if (G.type === O.CONTROL && G.control) {
4273
+ if (G.type === P.CONTROL && G.control) {
4274
4274
  const ot = G, Rt = ot.controlId || mt(), st = ot.control?.value || [], ft = ot.control?.type, Ot = ft === D.TEXTFIELD, Ct = ft === D.TEXT, Kt = {
4275
4275
  ...rt,
4276
4276
  controlId: Rt,
@@ -4286,7 +4286,7 @@ function re(o, t) {
4286
4286
  }), s++;
4287
4287
  for (let xt = 0; xt < st.length; xt++) {
4288
4288
  const Nt = st[xt];
4289
- if (Nt.type === O.MENSTRUAL_HISTORY || Nt.type === O.FETAL_HEART_POSITION || Nt.type === O.TOOTH_POSITION || Nt.type === O.MACRO || Nt.type === O.CUSTOM_MACRO || Nt.type === O.REUSABLE_ITEM || Nt.type === O.LIST || Nt.type === O.SPECIAL_SYMBOLS) {
4289
+ if (Nt.type === P.MENSTRUAL_HISTORY || Nt.type === P.FETAL_HEART_POSITION || Nt.type === P.TOOTH_POSITION || Nt.type === P.MACRO || Nt.type === P.CUSTOM_MACRO || Nt.type === P.REUSABLE_ITEM || Nt.type === P.LIST || Nt.type === P.SPECIAL_SYMBOLS) {
4290
4290
  const Ft = Nt.id || mt();
4291
4291
  Nt.id || (Nt.id = Ft);
4292
4292
  const kt = ot.control?.value?.find((Xt) => Xt.id === Ft || Xt.type === Nt.type && Xt.value === Nt.value);
@@ -4336,7 +4336,7 @@ function re(o, t) {
4336
4336
  controlComponent: Ot ? h.POSTTEXTFIX : h.POSTFIX
4337
4337
  }), s++;
4338
4338
  } else {
4339
- if (G.type === O.MENSTRUAL_HISTORY || G.type === O.FETAL_HEART_POSITION || G.type === O.TOOTH_POSITION || G.type === O.MACRO || G.type === O.CUSTOM_MACRO || G.type === O.REUSABLE_ITEM || G.type === O.LIST || G.type === O.SPECIAL_SYMBOLS) {
4339
+ if (G.type === P.MENSTRUAL_HISTORY || G.type === P.FETAL_HEART_POSITION || G.type === P.TOOTH_POSITION || G.type === P.MACRO || G.type === P.CUSTOM_MACRO || G.type === P.REUSABLE_ITEM || G.type === P.LIST || G.type === P.SPECIAL_SYMBOLS) {
4340
4340
  const Rt = G.id || mt();
4341
4341
  G.id || (G.id = Rt);
4342
4342
  const st = N.control?.value?.find((ft) => ft.id === Rt || ft.type === G.type && ft.value === G.value);
@@ -4396,7 +4396,7 @@ function re(o, t) {
4396
4396
  }), s++;
4397
4397
  } else if (
4398
4398
  // 处理特殊元素类型(月经史、牙位图、胎心位置等)
4399
- X.type === O.MENSTRUAL_HISTORY || X.type === O.FETAL_HEART_POSITION || X.type === O.TOOTH_POSITION || X.type === O.MACRO || X.type === O.CUSTOM_MACRO || X.type === O.REUSABLE_ITEM || X.type === O.LIST || X.type === O.SPECIAL_SYMBOLS
4399
+ X.type === P.MENSTRUAL_HISTORY || X.type === P.FETAL_HEART_POSITION || X.type === P.TOOTH_POSITION || X.type === P.MACRO || X.type === P.CUSTOM_MACRO || X.type === P.REUSABLE_ITEM || X.type === P.LIST || X.type === P.SPECIAL_SYMBOLS
4400
4400
  ) {
4401
4401
  const N = X.id || mt();
4402
4402
  X.id || (X.id = N);
@@ -4423,7 +4423,7 @@ function re(o, t) {
4423
4423
  controlId: S,
4424
4424
  value: U === `
4425
4425
  ` ? A : U,
4426
- type: X.type || O.TEXT,
4426
+ type: X.type || P.TEXT,
4427
4427
  control: l.control,
4428
4428
  controlComponent: h.VALUE
4429
4429
  }), s++;
@@ -4480,7 +4480,7 @@ function re(o, t) {
4480
4480
  }
4481
4481
  s--;
4482
4482
  } else {
4483
- const { prefix: a, postfix: c, preText: d, postText: u, value: R, placeholder: g, code: f, type: T, valueSets: I } = l.control, { editorOptions: { control: p, checkbox: L, radio: m } } = t, P = l.controlId || mt();
4483
+ const { prefix: a, postfix: c, preText: d, postText: u, value: R, placeholder: g, code: f, type: T, valueSets: I } = l.control, { editorOptions: { control: p, checkbox: L, radio: m } } = t, O = l.controlId || mt();
4484
4484
  o.splice(s, 1);
4485
4485
  const S = he(l, [
4486
4486
  ...Ji,
@@ -4498,7 +4498,7 @@ function re(o, t) {
4498
4498
  o.splice(s, 0, {
4499
4499
  ...S,
4500
4500
  ...b,
4501
- controlId: P,
4501
+ controlId: O,
4502
4502
  value: Y === `
4503
4503
  ` ? A : Y,
4504
4504
  type: l.type,
@@ -4513,7 +4513,7 @@ function re(o, t) {
4513
4513
  o.splice(s, 0, {
4514
4514
  ...S,
4515
4515
  ...E,
4516
- controlId: P,
4516
+ controlId: O,
4517
4517
  value: x,
4518
4518
  type: l.type,
4519
4519
  control: l.control,
@@ -4533,7 +4533,7 @@ function re(o, t) {
4533
4533
  o.splice(s, 0, {
4534
4534
  ...S,
4535
4535
  ...E,
4536
- controlId: P,
4536
+ controlId: O,
4537
4537
  value: "",
4538
4538
  type: l.type,
4539
4539
  control: l.control,
@@ -4550,7 +4550,7 @@ function re(o, t) {
4550
4550
  ...S,
4551
4551
  ...y,
4552
4552
  ...x[X],
4553
- controlId: P,
4553
+ controlId: O,
4554
4554
  value: w === `
4555
4555
  ` ? A : w,
4556
4556
  letterSpacing: v ? L.gap : 0,
@@ -4569,7 +4569,7 @@ function re(o, t) {
4569
4569
  o.splice(s, 0, {
4570
4570
  ...S,
4571
4571
  ...E,
4572
- controlId: P,
4572
+ controlId: O,
4573
4573
  value: "",
4574
4574
  type: l.type,
4575
4575
  control: l.control,
@@ -4586,7 +4586,7 @@ function re(o, t) {
4586
4586
  ...S,
4587
4587
  ...y,
4588
4588
  ...Y[x],
4589
- controlId: P,
4589
+ controlId: O,
4590
4590
  value: C === `
4591
4591
  ` ? A : C,
4592
4592
  letterSpacing: w ? m.gap : 0,
@@ -4604,9 +4604,9 @@ function re(o, t) {
4604
4604
  o.splice(s, 0, {
4605
4605
  ...S,
4606
4606
  ...E,
4607
- controlId: P,
4607
+ controlId: O,
4608
4608
  value: N,
4609
- type: O.CONTROL,
4609
+ type: P.CONTROL,
4610
4610
  control: l.control,
4611
4611
  controlComponent: h.VALUE,
4612
4612
  // 按钮控件的值颜色固定为 #fff,背景色为 #1677FF
@@ -4637,11 +4637,11 @@ function re(o, t) {
4637
4637
  if (T !== D.BUTTON)
4638
4638
  for (let Y = 0; Y < F.length; Y++) {
4639
4639
  const x = F[Y];
4640
- if (x.type === O.CONTROL && x.control) {
4640
+ if (x.type === P.CONTROL && x.control) {
4641
4641
  const X = x, N = X.controlId || mt(), M = X.control?.value || [], U = X.control?.placeholder || "", C = X.control?.type, w = C === D.TEXTFIELD, v = C === D.TEXT, H = C === D.CHECKBOX, Z = C === D.RADIO, $ = C === D.BUTTON, at = w ? h.PRETEXTFIX : h.PREFIX, k = w ? h.POSTTEXTFIX : h.POSTFIX, B = {
4642
4642
  ...S,
4643
4643
  controlId: N,
4644
- type: O.CONTROL,
4644
+ type: P.CONTROL,
4645
4645
  control: X.control
4646
4646
  }, rt = w ? i.control.textFixColor : v ? "#87d068" : $ ? "transparent" : i.control.bracketColor, lt = $ ? "#1677FF" : void 0, wt = w ? X.control?.preTextFix || p.preTextFix : X.control?.prefix || p.prefix, Gt = ze(C, wt);
4647
4647
  for (let _ = 0; _ < Gt.length; _++)
@@ -4649,7 +4649,7 @@ function re(o, t) {
4649
4649
  ...B,
4650
4650
  color: rt,
4651
4651
  highlight: lt,
4652
- originControlId: P,
4652
+ originControlId: O,
4653
4653
  value: Gt[_],
4654
4654
  controlComponent: at
4655
4655
  }), s++;
@@ -4659,7 +4659,7 @@ function re(o, t) {
4659
4659
  const ot = j[G];
4660
4660
  o.splice(s, 0, {
4661
4661
  ...B,
4662
- originControlId: P,
4662
+ originControlId: O,
4663
4663
  value: ot,
4664
4664
  controlComponent: h.VALUE,
4665
4665
  // 按钮控件的值颜色固定为 #fff,背景色为 #1677FF
@@ -4674,7 +4674,7 @@ function re(o, t) {
4674
4674
  o.splice(s, 0, {
4675
4675
  ...B,
4676
4676
  ...E,
4677
- originControlId: P,
4677
+ originControlId: O,
4678
4678
  value: "",
4679
4679
  controlComponent: h.CHECKBOX,
4680
4680
  checkbox: {
@@ -4688,7 +4688,7 @@ function re(o, t) {
4688
4688
  o.splice(s, 0, {
4689
4689
  ...B,
4690
4690
  ...y,
4691
- originControlId: P,
4691
+ originControlId: O,
4692
4692
  value: Ot === `
4693
4693
  ` ? A : Ot,
4694
4694
  letterSpacing: Ct ? L.gap : 0,
@@ -4703,7 +4703,7 @@ function re(o, t) {
4703
4703
  o.splice(s, 0, {
4704
4704
  ...B,
4705
4705
  ...E,
4706
- originControlId: P,
4706
+ originControlId: O,
4707
4707
  value: "",
4708
4708
  controlComponent: h.RADIO,
4709
4709
  radio: {
@@ -4717,7 +4717,7 @@ function re(o, t) {
4717
4717
  o.splice(s, 0, {
4718
4718
  ...B,
4719
4719
  ...y,
4720
- originControlId: P,
4720
+ originControlId: O,
4721
4721
  value: ft === `
4722
4722
  ` ? A : ft,
4723
4723
  letterSpacing: Ot ? m.gap : 0,
@@ -4728,7 +4728,7 @@ function re(o, t) {
4728
4728
  } else if (M.length > 0)
4729
4729
  for (let _ = 0; _ < M.length; _++) {
4730
4730
  const j = M[_];
4731
- if (j.type === O.CONTROL && j.control) {
4731
+ if (j.type === P.CONTROL && j.control) {
4732
4732
  const G = j, ot = G.controlId || mt(), Rt = G.control?.value || [], st = G.control?.type, ft = st === D.TEXTFIELD, Ot = st === D.TEXT, Ct = {
4733
4733
  ...B,
4734
4734
  controlId: ot,
@@ -4782,7 +4782,7 @@ function re(o, t) {
4782
4782
  ...B,
4783
4783
  ...y,
4784
4784
  ...j,
4785
- originControlId: P,
4785
+ originControlId: O,
4786
4786
  value: j.value === `
4787
4787
  ` ? A : j.value,
4788
4788
  controlComponent: h.VALUE
@@ -4794,7 +4794,7 @@ function re(o, t) {
4794
4794
  o.splice(s, 0, {
4795
4795
  ...B,
4796
4796
  color: i.control.placeholderColor,
4797
- originControlId: P,
4797
+ originControlId: O,
4798
4798
  value: _[j],
4799
4799
  controlComponent: h.PLACEHOLDER
4800
4800
  }), s++;
@@ -4804,7 +4804,7 @@ function re(o, t) {
4804
4804
  o.splice(s, 0, {
4805
4805
  ...B,
4806
4806
  color: i.control.placeholderColor,
4807
- originControlId: P,
4807
+ originControlId: O,
4808
4808
  value: j[G],
4809
4809
  controlComponent: h.PLACEHOLDER
4810
4810
  }), s++;
@@ -4815,13 +4815,13 @@ function re(o, t) {
4815
4815
  ...B,
4816
4816
  color: rt,
4817
4817
  highlight: lt,
4818
- originControlId: P,
4818
+ originControlId: O,
4819
4819
  value: pe[_],
4820
4820
  controlComponent: k
4821
4821
  }), s++;
4822
4822
  } else if (
4823
4823
  // 处理特殊元素类型(月经史、牙位图、胎心位置等)
4824
- x.type === O.MENSTRUAL_HISTORY || x.type === O.FETAL_HEART_POSITION || x.type === O.TOOTH_POSITION || x.type === O.MACRO || x.type === O.CUSTOM_MACRO || x.type === O.REUSABLE_ITEM || x.type === O.LIST || x.type === O.SPECIAL_SYMBOLS
4824
+ x.type === P.MENSTRUAL_HISTORY || x.type === P.FETAL_HEART_POSITION || x.type === P.TOOTH_POSITION || x.type === P.MACRO || x.type === P.CUSTOM_MACRO || x.type === P.REUSABLE_ITEM || x.type === P.LIST || x.type === P.SPECIAL_SYMBOLS
4825
4825
  ) {
4826
4826
  const X = x.id || mt();
4827
4827
  x.id || (x.id = X);
@@ -4834,7 +4834,7 @@ function re(o, t) {
4834
4834
  ...S,
4835
4835
  ...x,
4836
4836
  id: X,
4837
- controlId: P,
4837
+ controlId: O,
4838
4838
  control: l.control,
4839
4839
  controlComponent: h.VALUE,
4840
4840
  // 确保 type 属性不被覆盖,特殊元素必须保留其原始类型
@@ -4849,10 +4849,10 @@ function re(o, t) {
4849
4849
  ...S,
4850
4850
  ...y,
4851
4851
  ...x,
4852
- controlId: P,
4852
+ controlId: O,
4853
4853
  value: M === `
4854
4854
  ` ? A : M,
4855
- type: x.type || O.TEXT,
4855
+ type: x.type || P.TEXT,
4856
4856
  control: l.control,
4857
4857
  controlComponent: h.VALUE
4858
4858
  }), s++;
@@ -4870,7 +4870,7 @@ function re(o, t) {
4870
4870
  o.splice(s, 0, {
4871
4871
  ...S,
4872
4872
  ...F,
4873
- controlId: P,
4873
+ controlId: O,
4874
4874
  value: X === `
4875
4875
  ` ? A : X,
4876
4876
  type: l.type,
@@ -4886,7 +4886,7 @@ function re(o, t) {
4886
4886
  o.splice(s, 0, {
4887
4887
  ...S,
4888
4888
  ...E,
4889
- controlId: P,
4889
+ controlId: O,
4890
4890
  value: x,
4891
4891
  type: l.type,
4892
4892
  control: l.control,
@@ -4900,7 +4900,7 @@ function re(o, t) {
4900
4900
  o.splice(s, 0, {
4901
4901
  ...S,
4902
4902
  ...b,
4903
- controlId: P,
4903
+ controlId: O,
4904
4904
  value: Y === `
4905
4905
  ` ? A : Y,
4906
4906
  type: l.type,
@@ -4910,7 +4910,7 @@ function re(o, t) {
4910
4910
  }
4911
4911
  s--;
4912
4912
  }
4913
- } else if ((!l.type || ye.includes(l.type)) && l.type !== O.SPECIAL_SYMBOLS && l.value?.length > 1) {
4913
+ } else if ((!l.type || ye.includes(l.type)) && l.type !== P.SPECIAL_SYMBOLS && l.value?.length > 1) {
4914
4914
  o.splice(s, 1);
4915
4915
  const a = Qt(l.value);
4916
4916
  for (let c = 0; c < a.length; c++)
@@ -4919,11 +4919,11 @@ function re(o, t) {
4919
4919
  }
4920
4920
  if ((l.value === `
4921
4921
  ` || l.value == `\r
4922
- `) && (l.value = A), (l.type === O.IMAGE || l.type === O.BLOCK) && (l.id = l.id || mt()), l.type === O.LATEX) {
4922
+ `) && (l.value = A), (l.type === P.IMAGE || l.type === P.BLOCK) && (l.id = l.id || mt()), l.type === P.LATEX) {
4923
4923
  const { svg: a, width: c, height: d } = el.convertLaTextToSVG(l.value);
4924
4924
  l.width = l.width || c, l.height = l.height || d, l.laTexSVG = a, l.id = l.id || mt();
4925
4925
  }
4926
- (l.type === O.MACRO || l.type === O.CUSTOM_MACRO || l.type === O.REUSABLE_ITEM) && (l.id = l.id || mt()), (l.type === O.MENSTRUAL_HISTORY || l.type === O.TOOTH_POSITION || l.type === O.FETAL_HEART_POSITION || l.type === O.SPECIAL_SYMBOLS) && (l.id = l.id || mt()), s++;
4926
+ (l.type === P.MACRO || l.type === P.CUSTOM_MACRO || l.type === P.REUSABLE_ITEM) && (l.id = l.id || mt()), (l.type === P.MENSTRUAL_HISTORY || l.type === P.TOOTH_POSITION || l.type === P.FETAL_HEART_POSITION || l.type === P.SPECIAL_SYMBOLS) && (l.id = l.id || mt()), s++;
4927
4927
  }
4928
4928
  }
4929
4929
  function Yc(o, t) {
@@ -4950,11 +4950,11 @@ function Nn(o, t = {}) {
4950
4950
  }), i;
4951
4951
  }
4952
4952
  function vt(o, t = {}) {
4953
- const { extraPickAttrs: e, isClassifyArea: n = !1, isClone: i = !0, editorOptions: r } = t, s = (i ? pt(o) : o).filter((c) => c.type !== O.SPLIT_TAG), l = [];
4953
+ const { extraPickAttrs: e, isClassifyArea: n = !1, isClone: i = !0, editorOptions: r } = t, s = (i ? pt(o) : o).filter((c) => c.type !== P.SPLIT_TAG), l = [];
4954
4954
  let a = 0;
4955
4955
  for (; a < s.length; ) {
4956
4956
  let c = s[a];
4957
- if (a === 0 && c.value === A && !c.listId && (!c.type || c.type === O.TEXT)) {
4957
+ if (a === 0 && c.value === A && !c.listId && (!c.type || c.type === P.TEXT)) {
4958
4958
  a++;
4959
4959
  continue;
4960
4960
  }
@@ -4971,7 +4971,7 @@ function vt(o, t = {}) {
4971
4971
  const f = vt(g, t);
4972
4972
  if (n) {
4973
4973
  const T = {
4974
- type: O.AREA,
4974
+ type: P.AREA,
4975
4975
  value: "",
4976
4976
  areaId: u,
4977
4977
  area: R
@@ -4985,7 +4985,7 @@ function vt(o, t = {}) {
4985
4985
  const u = c.titleId;
4986
4986
  if (u) {
4987
4987
  const R = c.level, g = {
4988
- type: O.TITLE,
4988
+ type: P.TITLE,
4989
4989
  title: c.title,
4990
4990
  titleId: u,
4991
4991
  value: "",
@@ -5005,7 +5005,7 @@ function vt(o, t = {}) {
5005
5005
  const u = c.listId;
5006
5006
  if (u) {
5007
5007
  const R = c.listType, g = c.listStyle, f = c?.label, T = {
5008
- type: O.LIST,
5008
+ type: P.LIST,
5009
5009
  value: "",
5010
5010
  label: f || "",
5011
5011
  listId: u,
@@ -5022,7 +5022,7 @@ function vt(o, t = {}) {
5022
5022
  }
5023
5023
  T.valueList = vt(I, t), c = T;
5024
5024
  }
5025
- } else if (c.type === O.TABLE) {
5025
+ } else if (c.type === P.TABLE) {
5026
5026
  if (c.pagingId) {
5027
5027
  let u = a + 1, R = 0;
5028
5028
  for (; u < s.length; ) {
@@ -5032,9 +5032,9 @@ function vt(o, t = {}) {
5032
5032
  const f = g.trList.filter((T) => !T.pagingRepeat).filter((T) => (T.tdList = T.tdList.filter((I) => {
5033
5033
  if (I.originalId) {
5034
5034
  for (let p = 0; p < c.trList.length; p++) {
5035
- const m = c.trList[p].tdList.find(({ id: P }) => P === I.originalId);
5035
+ const m = c.trList[p].tdList.find(({ id: O }) => O === I.originalId);
5036
5036
  if (m) {
5037
- I.value[0]?.type === O.SPLIT_TAG && I.value.splice(0, 1), m.value.push(...I.value), m.rowspan = m.originalRowspan ?? m.rowspan;
5037
+ I.value[0]?.type === P.SPLIT_TAG && I.value.splice(0, 1), m.value.push(...I.value), m.rowspan = m.originalRowspan ?? m.rowspan;
5038
5038
  break;
5039
5039
  }
5040
5040
  }
@@ -5067,11 +5067,11 @@ function vt(o, t = {}) {
5067
5067
  }), R.tdList[g] = T;
5068
5068
  }
5069
5069
  }
5070
- } else if (c.type === O.HYPERLINK) {
5070
+ } else if (c.type === P.HYPERLINK) {
5071
5071
  const u = c.hyperlinkId;
5072
5072
  if (u) {
5073
5073
  const R = {
5074
- type: O.HYPERLINK,
5074
+ type: P.HYPERLINK,
5075
5075
  value: "",
5076
5076
  url: c.url
5077
5077
  }, g = [];
@@ -5085,11 +5085,11 @@ function vt(o, t = {}) {
5085
5085
  }
5086
5086
  R.valueList = vt(g, t), c = R;
5087
5087
  }
5088
- } else if (c.type === O.DATE) {
5088
+ } else if (c.type === P.DATE) {
5089
5089
  const u = c.dateId;
5090
5090
  if (u) {
5091
5091
  const R = {
5092
- type: O.DATE,
5092
+ type: P.DATE,
5093
5093
  value: "",
5094
5094
  dateFormat: c.dateFormat
5095
5095
  }, g = [];
@@ -5103,11 +5103,11 @@ function vt(o, t = {}) {
5103
5103
  }
5104
5104
  R.valueList = vt(g, t), c = R;
5105
5105
  }
5106
- } else if (c.type !== O.BUTTON) {
5106
+ } else if (c.type !== P.BUTTON) {
5107
5107
  if (c.controlId) {
5108
5108
  const u = c.controlId;
5109
5109
  if (!(c.controlComponent === h.PREFIX || c.controlComponent === h.PRETEXTFIX || c.controlComponent === h.PRETEXTFIX_TEXT) && c.controlComponent === h.VALUE) {
5110
- if (c.type === O.MENSTRUAL_HISTORY || c.type === O.FETAL_HEART_POSITION || c.type === O.TOOTH_POSITION || c.type === O.MACRO || c.type === O.CUSTOM_MACRO || c.type === O.REUSABLE_ITEM || c.type === O.LIST || c.type === O.SPECIAL_SYMBOLS) {
5110
+ if (c.type === P.MENSTRUAL_HISTORY || c.type === P.FETAL_HEART_POSITION || c.type === P.TOOTH_POSITION || c.type === P.MACRO || c.type === P.CUSTOM_MACRO || c.type === P.REUSABLE_ITEM || c.type === P.LIST || c.type === P.SPECIAL_SYMBOLS) {
5111
5111
  let I = !1;
5112
5112
  for (let p = a - 1; p >= 0; p--) {
5113
5113
  const L = s[p], m = L.controlComponent === h.PREFIX || L.controlComponent === h.PRETEXTFIX || L.controlComponent === h.PRETEXTFIX_TEXT;
@@ -5133,27 +5133,27 @@ function vt(o, t = {}) {
5133
5133
  }
5134
5134
  const g = (T, I, p, L) => {
5135
5135
  if (L === D.CHECKBOX || L === D.RADIO) {
5136
- let P = -1;
5136
+ let O = -1;
5137
5137
  for (let S = T; S < s.length && s[S].controlId === I; S++)
5138
- P = S;
5139
- return P;
5138
+ O = S;
5139
+ return O;
5140
5140
  }
5141
5141
  const m = p ? [h.POSTTEXTFIX, h.POSTTEXTFIX_TEXT] : [h.POSTFIX];
5142
- for (let P = T; P < s.length; P++) {
5143
- const S = s[P];
5142
+ for (let O = T; O < s.length; O++) {
5143
+ const S = s[O];
5144
5144
  if (S.controlId === I && m.includes(S.controlComponent))
5145
- return P;
5145
+ return O;
5146
5146
  }
5147
5147
  return -1;
5148
5148
  }, f = (T, I, p) => {
5149
5149
  const L = [];
5150
5150
  let m = T;
5151
5151
  for (; m <= I; ) {
5152
- const P = s[m];
5153
- if (P.controlId && P.controlId !== p && P.control) {
5154
- const W = P.control?.type, V = W === D.TEXTFIELD, F = V ? h.PRETEXTFIX : h.PREFIX, Y = P.controlComponent === F, x = W === D.CHECKBOX || W === D.RADIO;
5155
- if (Y || x && (P.controlComponent === h.CHECKBOX || P.controlComponent === h.RADIO)) {
5156
- const X = g(m + 1, P.controlId, V, W);
5152
+ const O = s[m];
5153
+ if (O.controlId && O.controlId !== p && O.control) {
5154
+ const W = O.control?.type, V = W === D.TEXTFIELD, F = V ? h.PRETEXTFIX : h.PREFIX, Y = O.controlComponent === F, x = W === D.CHECKBOX || W === D.RADIO;
5155
+ if (Y || x && (O.controlComponent === h.CHECKBOX || O.controlComponent === h.RADIO)) {
5156
+ const X = g(m + 1, O.controlId, V, W);
5157
5157
  if (X !== -1) {
5158
5158
  const N = s.slice(m, X + 1).map((U) => {
5159
5159
  const C = pt(U);
@@ -5164,18 +5164,18 @@ function vt(o, t = {}) {
5164
5164
  }
5165
5165
  }
5166
5166
  }
5167
- if (!(P.controlId === p && (P.controlComponent === h.VALUE || !P.controlComponent) && (!P.originControlId || P.originControlId === p) || P.originControlId === p && P.controlComponent === h.VALUE || // checkbox/radio 元素也在当前控件范围内
5168
- P.controlId === p && (P.controlComponent === h.CHECKBOX || P.controlComponent === h.RADIO) && !P.originControlId)) {
5167
+ if (!(O.controlId === p && (O.controlComponent === h.VALUE || !O.controlComponent) && (!O.originControlId || O.originControlId === p) || O.originControlId === p && O.controlComponent === h.VALUE || // checkbox/radio 元素也在当前控件范围内
5168
+ O.controlId === p && (O.controlComponent === h.CHECKBOX || O.controlComponent === h.RADIO) && !O.originControlId)) {
5169
5169
  m++;
5170
5170
  continue;
5171
5171
  }
5172
- if (P.type === O.MENSTRUAL_HISTORY || P.type === O.FETAL_HEART_POSITION || P.type === O.TOOTH_POSITION || P.type === O.MACRO || P.type === O.CUSTOM_MACRO || P.type === O.REUSABLE_ITEM || P.type === O.LIST || P.type === O.SPECIAL_SYMBOLS) {
5173
- const W = pt(P);
5172
+ if (O.type === P.MENSTRUAL_HISTORY || O.type === P.FETAL_HEART_POSITION || O.type === P.TOOTH_POSITION || O.type === P.MACRO || O.type === P.CUSTOM_MACRO || O.type === P.REUSABLE_ITEM || O.type === P.LIST || O.type === P.SPECIAL_SYMBOLS) {
5173
+ const W = pt(O);
5174
5174
  delete W.controlId, delete W.control, delete W.controlComponent, delete W.originControlId, L.push(W), m++;
5175
5175
  continue;
5176
5176
  }
5177
- if (P.controlComponent === h.CHECKBOX || P.controlComponent === h.RADIO) {
5178
- L.push(pt(P)), m++;
5177
+ if (O.controlComponent === h.CHECKBOX || O.controlComponent === h.RADIO) {
5178
+ L.push(pt(O)), m++;
5179
5179
  continue;
5180
5180
  }
5181
5181
  const b = c.control?.type;
@@ -5198,7 +5198,7 @@ function vt(o, t = {}) {
5198
5198
  W--;
5199
5199
  }
5200
5200
  if (V) {
5201
- const F = { value: P.value || "" }, Y = [
5201
+ const F = { value: O.value || "" }, Y = [
5202
5202
  ...be,
5203
5203
  "color",
5204
5204
  "bold",
@@ -5211,7 +5211,7 @@ function vt(o, t = {}) {
5211
5211
  "textDecoration"
5212
5212
  ];
5213
5213
  for (const x of Y) {
5214
- const X = P[x];
5214
+ const X = O[x];
5215
5215
  if (X !== void 0) {
5216
5216
  if (x === "color" && r) {
5217
5217
  const N = r.control?.bracketColor, M = r.control?.placeholderColor;
@@ -5224,7 +5224,7 @@ function vt(o, t = {}) {
5224
5224
  L.push(F);
5225
5225
  }
5226
5226
  } else {
5227
- const W = { value: P.value || "" }, V = [
5227
+ const W = { value: O.value || "" }, V = [
5228
5228
  ...be,
5229
5229
  "color",
5230
5230
  "bold",
@@ -5237,7 +5237,7 @@ function vt(o, t = {}) {
5237
5237
  "textDecoration"
5238
5238
  ];
5239
5239
  for (const F of V) {
5240
- const Y = P[F];
5240
+ const Y = O[F];
5241
5241
  if (Y !== void 0) {
5242
5242
  if (F === "color" && r) {
5243
5243
  const x = r.control?.bracketColor, X = r.control?.placeholderColor;
@@ -5260,14 +5260,14 @@ function vt(o, t = {}) {
5260
5260
  ...c.control,
5261
5261
  ...L,
5262
5262
  value: p
5263
- }, P = {
5263
+ }, O = {
5264
5264
  ...he(c, be),
5265
- type: O.CONTROL,
5265
+ type: P.CONTROL,
5266
5266
  value: "",
5267
5267
  control: m,
5268
5268
  controlId: u
5269
5269
  };
5270
- c = Nn(P, { extraPickAttrs: e }), a = I;
5270
+ c = Nn(O, { extraPickAttrs: e }), a = I;
5271
5271
  }
5272
5272
  }
5273
5273
  if (c.controlComponent === h.PRETEXTFIX) {
@@ -5279,7 +5279,7 @@ function vt(o, t = {}) {
5279
5279
  value: I
5280
5280
  }, m = {
5281
5281
  ...he(c, be),
5282
- type: O.CONTROL,
5282
+ type: P.CONTROL,
5283
5283
  value: "",
5284
5284
  control: L,
5285
5285
  controlId: u
@@ -5296,7 +5296,7 @@ function vt(o, t = {}) {
5296
5296
  value: I
5297
5297
  }, m = {
5298
5298
  ...he(c, be),
5299
- type: O.CONTROL,
5299
+ type: P.CONTROL,
5300
5300
  value: "",
5301
5301
  control: L,
5302
5302
  controlId: u
@@ -5307,7 +5307,7 @@ function vt(o, t = {}) {
5307
5307
  }
5308
5308
  }
5309
5309
  const d = Nn(c, { extraPickAttrs: e });
5310
- if (!c.type || c.type === O.TEXT || c.type === O.SUBSCRIPT || c.type === O.SUPERSCRIPT)
5310
+ if (!c.type || c.type === P.TEXT || c.type === P.SUBSCRIPT || c.type === P.SUPERSCRIPT)
5311
5311
  for (; a < s.length; ) {
5312
5312
  const u = s[a + 1];
5313
5313
  if (a++, u && Yc(d, Nn(u, { extraPickAttrs: e }))) {
@@ -5363,7 +5363,7 @@ function si(o) {
5363
5363
  return !o.type || ye.includes(o.type);
5364
5364
  }
5365
5365
  function wc(o) {
5366
- return !o.type || o.type === O.TEXT;
5366
+ return !o.type || o.type === P.TEXT;
5367
5367
  }
5368
5368
  function gr(o) {
5369
5369
  return o.filter((t) => si(t)).map((t) => t.value).join("").replace(new RegExp(A, "g"), "");
@@ -5384,7 +5384,7 @@ function ge(o, t, e, n) {
5384
5384
  let c = !1;
5385
5385
  for (let d = 0; d < t.length; d++) {
5386
5386
  const u = t[d];
5387
- if (r && !i.listId && ps.test(u.value) && (c = !0), c || !i.listId && u.type === O.LIST) {
5387
+ if (r && !i.listId && ps.test(u.value) && (c = !0), c || !i.listId && u.type === P.LIST) {
5388
5388
  const g = [
5389
5389
  ...jn,
5390
5390
  ...be,
@@ -5402,7 +5402,7 @@ function ge(o, t, e, n) {
5402
5402
  }
5403
5403
  function Zc(o, t) {
5404
5404
  let e = "span";
5405
- o.type === O.SUPERSCRIPT ? e = "sup" : o.type === O.SUBSCRIPT && (e = "sub");
5405
+ o.type === P.SUPERSCRIPT ? e = "sup" : o.type === P.SUBSCRIPT && (e = "sub");
5406
5406
  const n = document.createElement(e);
5407
5407
  return n.style.fontFamily = o.font || t.defaultFont, o.rowFlex && (n.style.textAlign = al(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(`${A}`, "g"), `
5408
5408
  `), n;
@@ -5463,7 +5463,7 @@ function Lo(o, t) {
5463
5463
  const a = document.createElement("div");
5464
5464
  for (let c = 0; c < l.length; c++) {
5465
5465
  const d = l[c];
5466
- if (d.type === O.TABLE) {
5466
+ if (d.type === P.TABLE) {
5467
5467
  const u = document.createElement("table");
5468
5468
  u.setAttribute("cellSpacing", "0"), u.setAttribute("cellpadding", "0"), u.setAttribute("border", "0");
5469
5469
  const R = "1px solid #000000";
@@ -5481,21 +5481,21 @@ function Lo(o, t) {
5481
5481
  for (let L = 0; L < p.tdList.length; L++) {
5482
5482
  const m = document.createElement("td");
5483
5483
  (!d.borderType || d.borderType === Ee.ALL) && (m.style.borderBottom = m.style.borderRight = "1px solid");
5484
- const P = p.tdList[L];
5485
- m.colSpan = P.colspan, m.rowSpan = P.rowspan, m.style.verticalAlign = P.verticalAlign || "top", P.borderTypes?.includes(xe.TOP) && (m.style.borderTop = R), P.borderTypes?.includes(xe.RIGHT) && (m.style.borderRight = R), P.borderTypes?.includes(xe.BOTTOM) && (m.style.borderBottom = R), P.borderTypes?.includes(xe.LEFT) && (m.style.borderLeft = R);
5486
- const S = Lo(P.value, t);
5487
- m.innerHTML = S.innerHTML, P.backgroundColor && (m.style.backgroundColor = P.backgroundColor), I.append(m);
5484
+ const O = p.tdList[L];
5485
+ m.colSpan = O.colspan, m.rowSpan = O.rowspan, m.style.verticalAlign = O.verticalAlign || "top", O.borderTypes?.includes(xe.TOP) && (m.style.borderTop = R), O.borderTypes?.includes(xe.RIGHT) && (m.style.borderRight = R), O.borderTypes?.includes(xe.BOTTOM) && (m.style.borderBottom = R), O.borderTypes?.includes(xe.LEFT) && (m.style.borderLeft = R);
5486
+ const S = Lo(O.value, t);
5487
+ m.innerHTML = S.innerHTML, O.backgroundColor && (m.style.backgroundColor = O.backgroundColor), I.append(m);
5488
5488
  }
5489
5489
  u.append(I);
5490
5490
  }
5491
5491
  a.append(u);
5492
- } else if (d.type === O.HYPERLINK) {
5492
+ } else if (d.type === P.HYPERLINK) {
5493
5493
  const u = document.createElement("a");
5494
5494
  u.innerText = d.valueList.map((R) => R.value).join(""), d.url && (u.href = d.url), a.append(u);
5495
- } else if (d.type === O.TITLE) {
5495
+ } else if (d.type === P.TITLE) {
5496
5496
  const u = document.createElement(`h${ji[d.level]}`), R = i(d.valueList);
5497
5497
  u.innerHTML = R.innerHTML, a.append(u);
5498
- } else if (d.type === O.LIST) {
5498
+ } else if (d.type === P.LIST) {
5499
5499
  const u = document.createElement(rc[d.listType]);
5500
5500
  d.listStyle && (u.style.listStyleType = lc[d.listStyle]);
5501
5501
  const R = vt(d.valueList);
@@ -5503,10 +5503,10 @@ function Lo(o, t) {
5503
5503
  const T = document.createElement("li"), I = i(f);
5504
5504
  T.innerHTML = I.innerHTML, u.append(T);
5505
5505
  }), a.append(u);
5506
- } else if (d.type === O.IMAGE) {
5506
+ } else if (d.type === P.IMAGE) {
5507
5507
  const u = document.createElement("img");
5508
5508
  d.value && (u.src = d.value, u.width = d.width, u.height = d.height), a.append(u);
5509
- } else if (d.type === O.BLOCK) {
5509
+ } else if (d.type === P.BLOCK) {
5510
5510
  if (d.block?.type === In.VIDEO) {
5511
5511
  const u = d.block.videoBlock?.src;
5512
5512
  if (u) {
@@ -5520,30 +5520,30 @@ function Lo(o, t) {
5520
5520
  T.sandbox.add(...g || oo.sandbox), T.setAttribute("allow", [f || oo.allow].join(" ")), T.style.display = "block", T.style.border = "none", u ? T.src = u : R && (T.srcdoc = R), T.width = `${d.width || t?.width || window.innerWidth}`, T.height = `${d.height}`, a.append(T);
5521
5521
  }
5522
5522
  }
5523
- } else if (d.type === O.SEPARATOR) {
5523
+ } else if (d.type === P.SEPARATOR) {
5524
5524
  const u = document.createElement("hr");
5525
5525
  d.dashArray?.length && u.setAttribute("data-dash-array", d.dashArray.join(",")), a.append(u);
5526
- } else if (d.type === O.CHECKBOX) {
5526
+ } else if (d.type === P.CHECKBOX) {
5527
5527
  const u = document.createElement("input");
5528
5528
  u.type = "checkbox", d.checkbox?.value && u.setAttribute("checked", "true"), a.append(u);
5529
- } else if (d.type === O.RADIO) {
5529
+ } else if (d.type === P.RADIO) {
5530
5530
  const u = document.createElement("input");
5531
5531
  u.type = "radio", d.radio?.value && u.setAttribute("checked", "true"), a.append(u);
5532
- } else if (d.type === O.TAB) {
5532
+ } else if (d.type === P.TAB) {
5533
5533
  const u = document.createElement("span");
5534
5534
  u.innerHTML = `${ar}${ar}`, a.append(u);
5535
- } else if (d.type === O.CONTROL) {
5535
+ } else if (d.type === P.CONTROL) {
5536
5536
  const u = document.createElement("span"), R = i(d.control?.value || []);
5537
5537
  u.innerHTML = R.innerHTML, a.append(u);
5538
- } else if (d.type === O.PAGE_BREAK) {
5538
+ } else if (d.type === P.PAGE_BREAK) {
5539
5539
  const u = document.createElement("div");
5540
5540
  u.style.breakAfter = "page", a.append(u);
5541
- } else if (!d.type || d.type === O.LATEX || ye.includes(d.type)) {
5541
+ } else if (!d.type || d.type === P.LATEX || ye.includes(d.type)) {
5542
5542
  let u = "";
5543
- if (d.type === O.DATE ? u = d.valueList?.map((g) => g.value).join("") || "" : u = d.value, !u)
5543
+ if (d.type === P.DATE ? u = d.valueList?.map((g) => g.value).join("") || "" : u = d.value, !u)
5544
5544
  continue;
5545
5545
  const R = Zc(d, e);
5546
- l[c - 1]?.type === O.TITLE && (u = u.replace(/^\n/, "")), R.innerText = u.replace(new RegExp(`${A}`, "g"), `
5546
+ l[c - 1]?.type === P.TITLE && (u = u.replace(/^\n/, "")), R.innerText = u.replace(new RegExp(`${A}`, "g"), `
5547
5547
  `), a.append(R);
5548
5548
  }
5549
5549
  }
@@ -5575,7 +5575,7 @@ function vc(o) {
5575
5575
  italic: r.fontStyle.includes("italic"),
5576
5576
  size: Math.floor(parseFloat(r.fontSize))
5577
5577
  };
5578
- return e.nodeName === "SUB" || r.verticalAlign === "sub" ? s.type = O.SUBSCRIPT : (e.nodeName === "SUP" || r.verticalAlign === "super") && (s.type = O.SUPERSCRIPT), n !== Ht.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;
5578
+ return e.nodeName === "SUB" || r.verticalAlign === "sub" ? s.type = P.SUBSCRIPT : (e.nodeName === "SUP" || r.verticalAlign === "super") && (s.type = P.SUPERSCRIPT), n !== Ht.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;
5579
5579
  }
5580
5580
  function Po(o, t) {
5581
5581
  const e = [];
@@ -5595,7 +5595,7 @@ function Po(o, t) {
5595
5595
  else if (u.nodeName === "A") {
5596
5596
  const R = u, g = R.innerText;
5597
5597
  g && e.push({
5598
- type: O.HYPERLINK,
5598
+ type: P.HYPERLINK,
5599
5599
  value: "",
5600
5600
  valueList: [
5601
5601
  {
@@ -5608,7 +5608,7 @@ function Po(o, t) {
5608
5608
  const g = Po(Kc(u, "div").outerHTML, t);
5609
5609
  e.push({
5610
5610
  value: "",
5611
- type: O.TITLE,
5611
+ type: P.TITLE,
5612
5612
  level: cc[u.nodeName],
5613
5613
  valueList: g
5614
5614
  }), u.nextSibling && !Ja.includes(u.nextSibling.nodeName) && e.push({
@@ -5618,7 +5618,7 @@ function Po(o, t) {
5618
5618
  } else if (u.nodeName === "UL" || u.nodeName === "OL") {
5619
5619
  const R = u, g = {
5620
5620
  value: "",
5621
- type: O.LIST,
5621
+ type: P.LIST,
5622
5622
  valueList: []
5623
5623
  };
5624
5624
  u.nodeName === "OL" ? g.listType = rn.OL : (g.listType = rn.UL, g.listStyle = R.style.listStyleType), R.querySelectorAll("li").forEach((f) => {
@@ -5635,7 +5635,7 @@ function Po(o, t) {
5635
5635
  e.push({
5636
5636
  value: `
5637
5637
  `,
5638
- type: O.SEPARATOR
5638
+ type: P.SEPARATOR
5639
5639
  });
5640
5640
  else if (u.nodeName === "IMG") {
5641
5641
  const { src: R, width: g, height: f } = u;
@@ -5643,14 +5643,14 @@ function Po(o, t) {
5643
5643
  width: g,
5644
5644
  height: f,
5645
5645
  value: R,
5646
- type: O.IMAGE,
5646
+ type: P.IMAGE,
5647
5647
  rowFlex: ll(u.parentElement)
5648
5648
  });
5649
5649
  } else if (u.nodeName === "VIDEO") {
5650
5650
  const { src: R, width: g, height: f } = u;
5651
5651
  R && g && f && e.push({
5652
5652
  value: "",
5653
- type: O.BLOCK,
5653
+ type: P.BLOCK,
5654
5654
  block: {
5655
5655
  type: In.VIDEO,
5656
5656
  videoBlock: {
@@ -5664,7 +5664,7 @@ function Po(o, t) {
5664
5664
  const { src: R, srcdoc: g, width: f, height: T } = u;
5665
5665
  (R || g) && f && T && e.push({
5666
5666
  value: "",
5667
- type: O.BLOCK,
5667
+ type: P.BLOCK,
5668
5668
  block: {
5669
5669
  type: In.IFRAME,
5670
5670
  iframeBlock: {
@@ -5677,7 +5677,7 @@ function Po(o, t) {
5677
5677
  });
5678
5678
  } else if (u.nodeName === "TABLE") {
5679
5679
  const R = u, g = {
5680
- type: O.TABLE,
5680
+ type: P.TABLE,
5681
5681
  value: `
5682
5682
  `,
5683
5683
  colgroup: [],
@@ -5690,10 +5690,10 @@ function Po(o, t) {
5690
5690
  tdList: []
5691
5691
  };
5692
5692
  T.querySelectorAll("th,td").forEach((L) => {
5693
- const m = L, P = Po(m.innerHTML, t), S = {
5693
+ const m = L, O = Po(m.innerHTML, t), S = {
5694
5694
  colspan: m.colSpan,
5695
5695
  rowspan: m.rowSpan,
5696
- value: P,
5696
+ value: O,
5697
5697
  verticalAlign: window.getComputedStyle(L).verticalAlign,
5698
5698
  width: parseFloat(window.getComputedStyle(L).width)
5699
5699
  };
@@ -5711,7 +5711,7 @@ function Po(o, t) {
5711
5711
  }
5712
5712
  } else if (u.nodeName === "INPUT" && u.type === h.CHECKBOX)
5713
5713
  e.push({
5714
- type: O.CHECKBOX,
5714
+ type: P.CHECKBOX,
5715
5715
  value: "",
5716
5716
  checkbox: {
5717
5717
  value: u.checked
@@ -5719,7 +5719,7 @@ function Po(o, t) {
5719
5719
  });
5720
5720
  else if (u.nodeName === "INPUT" && u.type === h.RADIO)
5721
5721
  e.push({
5722
- type: O.RADIO,
5722
+ type: P.RADIO,
5723
5723
  value: "",
5724
5724
  radio: {
5725
5725
  value: u.checked
@@ -5750,7 +5750,7 @@ function Bn(o, t) {
5750
5750
  let s = "";
5751
5751
  for (let l = 0; l < r.length; l++) {
5752
5752
  const a = r[l];
5753
- if (a.type === O.TABLE) {
5753
+ if (a.type === P.TABLE) {
5754
5754
  s += `
5755
5755
  `;
5756
5756
  const c = a.trList;
@@ -5762,13 +5762,13 @@ function Bn(o, t) {
5762
5762
  ` : ""}`;
5763
5763
  }
5764
5764
  }
5765
- } else if (a.type === O.TAB)
5765
+ } else if (a.type === P.TAB)
5766
5766
  s += " ";
5767
- else if (a.type === O.HYPERLINK)
5767
+ else if (a.type === P.HYPERLINK)
5768
5768
  s += a.valueList.map((c) => c.value).join("");
5769
- else if (a.type === O.TITLE)
5769
+ else if (a.type === P.TITLE)
5770
5770
  s += `${i(vt(a.valueList))}`;
5771
- else if (a.type === O.LIST) {
5771
+ else if (a.type === P.LIST) {
5772
5772
  const c = vt(a.valueList), d = cl(c);
5773
5773
  let u = "";
5774
5774
  a.listType === rn.UL && (u = zi[a.listStyle]), d.forEach((R, g) => {
@@ -5777,16 +5777,16 @@ function Bn(o, t) {
5777
5777
  ${u || `${g + 1}.`}${i(R)}${f ? `
5778
5778
  ` : ""}`;
5779
5779
  });
5780
- } else if (a.type === O.CHECKBOX)
5780
+ } else if (a.type === P.CHECKBOX)
5781
5781
  s += a.checkbox?.value ? "☑" : "□";
5782
- else if (a.type === O.RADIO)
5782
+ else if (a.type === P.RADIO)
5783
5783
  s += a.radio?.value ? "☉" : "○";
5784
- else if (!a.type || a.type === O.LATEX || ye.includes(a.type)) {
5784
+ else if (!a.type || a.type === P.LATEX || ye.includes(a.type)) {
5785
5785
  let c = "";
5786
- if (a.type === O.CONTROL) {
5786
+ if (a.type === P.CONTROL) {
5787
5787
  const d = a.control.value?.[0]?.value || "";
5788
5788
  c = d ? `${a.control?.preText || ""}${d}${a.control?.postText || ""}` : "";
5789
- } else a.type === O.DATE ? c = a.valueList?.map((d) => d.value).join("") || "" : c = a.value;
5789
+ } else a.type === P.DATE ? c = a.valueList?.map((d) => d.value).join("") || "" : c = a.value;
5790
5790
  s += c.replace(new RegExp(`${A}`, "g"), `
5791
5791
  `);
5792
5792
  }
@@ -5956,7 +5956,7 @@ function Ss(o, t) {
5956
5956
  l.src = a, l.onload = () => {
5957
5957
  const c = {
5958
5958
  value: a,
5959
- type: O.IMAGE,
5959
+ type: P.IMAGE,
5960
5960
  width: l.width,
5961
5961
  height: l.height
5962
5962
  };
@@ -6286,11 +6286,11 @@ class jc {
6286
6286
  return;
6287
6287
  const { scale: n, cursor: i } = this.options, { color: r, width: s, isShow: l = !0, isBlink: a = !0, isFocus: c = !0, hitLineStartIndex: d } = { ...i, ...t }, u = this.draw.getHeight(), R = this.draw.getPageGap();
6288
6288
  this.hitLineStartIndex = d, d && (e = this.position.getPositionList()[d]);
6289
- const { metrics: g, coordinate: { leftTop: f, rightTop: T }, ascent: I, pageNo: p } = e, P = (this.draw.getZone().isMainActive() ? p : this.draw.getPageNo()) * (u + R), S = wa * n, E = Math.min(g.height / 4, S), b = g.height + E * 2, y = this.cursorAgent.getAgentCursorDom();
6289
+ const { metrics: g, coordinate: { leftTop: f, rightTop: T }, ascent: I, pageNo: p } = e, O = (this.draw.getZone().isMainActive() ? p : this.draw.getPageNo()) * (u + R), S = wa * n, E = Math.min(g.height / 4, S), b = g.height + E * 2, y = this.cursorAgent.getAgentCursorDom();
6290
6290
  c && setTimeout(() => {
6291
6291
  this.focus();
6292
6292
  });
6293
- const W = g.boundingBoxDescent < 0 ? 0 : g.boundingBoxDescent, V = f[1] + I + W - (b - E) + P, F = d ? f[0] : T[0];
6293
+ const W = g.boundingBoxDescent < 0 ? 0 : g.boundingBoxDescent, V = f[1] + I + W - (b - E) + O, F = d ? f[0] : T[0];
6294
6294
  if (y.style.left = `${F}px`, y.style.top = `${V + b - S}px`, !l) {
6295
6295
  this.recoveryCursor();
6296
6296
  return;
@@ -6523,18 +6523,18 @@ function qc(o, t) {
6523
6523
  });
6524
6524
  if (!u)
6525
6525
  return;
6526
- const { index: R, isDirectHit: g, isCheckbox: f, isRadio: T, isControl: I, isImage: p, isLabel: L, isMacro: m, isTable: P, tdValueIndex: S, hitLineStartIndex: E } = u;
6526
+ const { index: R, isDirectHit: g, isCheckbox: f, isRadio: T, isControl: I, isImage: p, isLabel: L, isMacro: m, isTable: O, tdValueIndex: S, hitLineStartIndex: E } = u;
6527
6527
  t.mouseDownStartPosition = {
6528
6528
  ...u,
6529
- index: P ? S : R,
6529
+ index: O ? S : R,
6530
6530
  originalIndex: R,
6531
6531
  x: o.offsetX,
6532
6532
  y: o.offsetY
6533
6533
  };
6534
- const b = e.getElementList(), y = r.getPositionList(), W = P ? S : R;
6534
+ const b = e.getElementList(), y = r.getPositionList(), W = O ? S : R;
6535
6535
  let V;
6536
- P ? V = e.getTd().value[S] : V = b[W];
6537
- const F = P && e.getTd()?.value || b, Y = P && e.getTd()?.positionList || y, x = !!(g && p), X = !!(g && f), N = !!(g && T), M = !!(g && L), U = !!(g && m), C = (Q) => Q && (Q.type === O.MACRO || Q.type === O.CUSTOM_MACRO || Q.type === O.REUSABLE_ITEM || Q.type === O.SUB_TEMPLATE || Q.type === O.MENSTRUAL_HISTORY || Q.type === O.FETAL_HEART_POSITION || Q.type === O.TOOTH_POSITION || Q.type === O.LIST || Q.type === O.SPECIAL_SYMBOLS), w = (Q) => Q && !!Q.originControlId && !!Q.controlId, v = (Q) => !!(Q && Q.originControlId && Q.controlId && (Q.controlComponent === h.POSTFIX || Q.controlComponent === h.POSTTEXTFIX || Q.controlComponent === h.POST_TEXT || Q.controlComponent === h.PLACEHOLDER)), H = (Q) => !!(Q && Q.originControlId && Q.controlId && (Q.controlComponent === h.PREFIX || Q.controlComponent === h.PRE_TEXT || Q.controlComponent === h.PRETEXTFIX || Q.controlComponent === h.PRETEXTFIX_TEXT || Q.controlComponent === h.PLACEHOLDER)), Z = (Q) => {
6536
+ O ? V = e.getTd().value[S] : V = b[W];
6537
+ const F = O && e.getTd()?.value || b, Y = O && e.getTd()?.positionList || y, x = !!(g && p), X = !!(g && f), N = !!(g && T), M = !!(g && L), U = !!(g && m), C = (Q) => Q && (Q.type === P.MACRO || Q.type === P.CUSTOM_MACRO || Q.type === P.REUSABLE_ITEM || Q.type === P.SUB_TEMPLATE || Q.type === P.MENSTRUAL_HISTORY || Q.type === P.FETAL_HEART_POSITION || Q.type === P.TOOTH_POSITION || Q.type === P.LIST || Q.type === P.SPECIAL_SYMBOLS), w = (Q) => Q && !!Q.originControlId && !!Q.controlId, v = (Q) => !!(Q && Q.originControlId && Q.controlId && (Q.controlComponent === h.POSTFIX || Q.controlComponent === h.POSTTEXTFIX || Q.controlComponent === h.POST_TEXT || Q.controlComponent === h.PLACEHOLDER)), H = (Q) => !!(Q && Q.originControlId && Q.controlId && (Q.controlComponent === h.PREFIX || Q.controlComponent === h.PRE_TEXT || Q.controlComponent === h.PRETEXTFIX || Q.controlComponent === h.PRETEXTFIX_TEXT || Q.controlComponent === h.PLACEHOLDER)), Z = (Q) => {
6538
6538
  if (!Q)
6539
6539
  return null;
6540
6540
  const J = /* @__PURE__ */ new Set();
@@ -6673,7 +6673,7 @@ function qc(o, t) {
6673
6673
  for (let Tt = Q + 1; Tt < F.length && ot(J, F[Tt]); Tt++)
6674
6674
  tt = Tt;
6675
6675
  return tt;
6676
- }, de = ee().some((Q) => st(F[Q], Q)), Ft = Zt(), kt = xt(), Xt = (Q) => (Q?.control?.type === D.TEXTFIELD || Q?.control?.type === D.TEXT) && (Q.controlComponent === h.POSTFIX || Q.controlComponent === h.POST_TEXT || Q.controlComponent === h.POSTTEXTFIX || Q.controlComponent === h.POSTTEXTFIX_TEXT), Wt = (Q) => Q?.type === O.CONTROL && (Q.controlComponent === h.POSTFIX || Q.controlComponent === h.POST_TEXT || Q.controlComponent === h.POSTTEXTFIX || Q.controlComponent === h.POSTTEXTFIX_TEXT), yt = (Q) => Q?.type === O.CONTROL && (Q.controlComponent === h.PREFIX || Q.controlComponent === h.PRE_TEXT || Q.controlComponent === h.PRETEXTFIX || Q.controlComponent === h.PRETEXTFIX_TEXT), Ce = (Q, J) => !!(e.getMode() === K.EDIT && Q?.originControlId && Xt(Q) && J?.controlId === Q.originControlId && !J.originControlId && J.control?.type === D.TEXTFIELD && Xt(J)), Et = (Q, J) => !!(e.getMode() === K.EDIT && Q?.originControlId && Xt(Q) && J?.controlId === Q.originControlId && !J.originControlId && J.control?.type === D.TEXTFIELD && J.controlComponent === h.VALUE), et = (Q, J, tt) => !!(e.getMode() === K.EDIT && Q?.originControlId && tt?.originControlId === Q.originControlId && Q.controlId && tt.controlId && Q.controlId !== tt.controlId && Wt(Q) && yt(tt) && lt(F, J, Q.originControlId) === D.TEXTFIELD), Yt = Ce(V, _), ut = Et(V, _), qt = et(V, W, _), z = et(pe, W - 1, V), it = !!(e.getMode() === K.EDIT && I && g && Xt(V) && !Yt && !ut && !qt && pe?.controlId === V.controlId && (pe.originControlId || null) === (V.originControlId || null) && (pe.controlComponent === h.VALUE || pe.controlComponent === h.PLACEHOLDER)), Lt = (Q, J, tt) => !!($ && v(Q) && lt(F, J, Q?.originControlId) === tt && (tt === D.TEXTFIELD ? wt(F[J + 1], J + 1) : Gt(F[J + 1], J + 1))), dt = (Q, J, tt) => !!($ && H(Q) && lt(F, J, Q?.originControlId) === tt && (tt === D.TEXTFIELD ? wt(F[J - 1], J - 1) : Gt(F[J - 1], J - 1))), Ie = Lt(V, W, D.TEXTFIELD), te = !!($ && ce && wt(V, W) && Lt(pe, W - 1, D.TEXTFIELD) && o.offsetX <= ce.coordinate.leftTop[0] + j), ie = !!($ && ce && wt(V, W) && dt(_, W + 1, D.TEXTFIELD) && o.offsetX >= ce.coordinate.rightTop[0] - j), An = !!($ && ce && Ie && o.offsetX > ce.coordinate.rightTop[0]), Xn = !!($ && ce && H(V) && lt(F, W, V.originControlId) === D.TEXTFIELD && wt(pe, W - 1) && o.offsetX < ce.coordinate.leftTop[0]), Ve = wt(V, W) || Ie || te || ie || An || Xn, ve = Lt(V, W, D.TEXT), Js = (Q) => {
6676
+ }, de = ee().some((Q) => st(F[Q], Q)), Ft = Zt(), kt = xt(), Xt = (Q) => (Q?.control?.type === D.TEXTFIELD || Q?.control?.type === D.TEXT) && (Q.controlComponent === h.POSTFIX || Q.controlComponent === h.POST_TEXT || Q.controlComponent === h.POSTTEXTFIX || Q.controlComponent === h.POSTTEXTFIX_TEXT), Wt = (Q) => Q?.type === P.CONTROL && (Q.controlComponent === h.POSTFIX || Q.controlComponent === h.POST_TEXT || Q.controlComponent === h.POSTTEXTFIX || Q.controlComponent === h.POSTTEXTFIX_TEXT), yt = (Q) => Q?.type === P.CONTROL && (Q.controlComponent === h.PREFIX || Q.controlComponent === h.PRE_TEXT || Q.controlComponent === h.PRETEXTFIX || Q.controlComponent === h.PRETEXTFIX_TEXT), Ce = (Q, J) => !!(e.getMode() === K.EDIT && Q?.originControlId && Xt(Q) && J?.controlId === Q.originControlId && !J.originControlId && J.control?.type === D.TEXTFIELD && Xt(J)), Et = (Q, J) => !!(e.getMode() === K.EDIT && Q?.originControlId && Xt(Q) && J?.controlId === Q.originControlId && !J.originControlId && J.control?.type === D.TEXTFIELD && J.controlComponent === h.VALUE), et = (Q, J, tt) => !!(e.getMode() === K.EDIT && Q?.originControlId && tt?.originControlId === Q.originControlId && Q.controlId && tt.controlId && Q.controlId !== tt.controlId && Wt(Q) && yt(tt) && lt(F, J, Q.originControlId) === D.TEXTFIELD), Yt = Ce(V, _), ut = Et(V, _), qt = et(V, W, _), z = et(pe, W - 1, V), it = !!(e.getMode() === K.EDIT && I && g && Xt(V) && !Yt && !ut && !qt && pe?.controlId === V.controlId && (pe.originControlId || null) === (V.originControlId || null) && (pe.controlComponent === h.VALUE || pe.controlComponent === h.PLACEHOLDER)), Lt = (Q, J, tt) => !!($ && v(Q) && lt(F, J, Q?.originControlId) === tt && (tt === D.TEXTFIELD ? wt(F[J + 1], J + 1) : Gt(F[J + 1], J + 1))), dt = (Q, J, tt) => !!($ && H(Q) && lt(F, J, Q?.originControlId) === tt && (tt === D.TEXTFIELD ? wt(F[J - 1], J - 1) : Gt(F[J - 1], J - 1))), Ie = Lt(V, W, D.TEXTFIELD), te = !!($ && ce && wt(V, W) && Lt(pe, W - 1, D.TEXTFIELD) && o.offsetX <= ce.coordinate.leftTop[0] + j), ie = !!($ && ce && wt(V, W) && dt(_, W + 1, D.TEXTFIELD) && o.offsetX >= ce.coordinate.rightTop[0] - j), An = !!($ && ce && Ie && o.offsetX > ce.coordinate.rightTop[0]), Xn = !!($ && ce && H(V) && lt(F, W, V.originControlId) === D.TEXTFIELD && wt(pe, W - 1) && o.offsetX < ce.coordinate.leftTop[0]), Ve = wt(V, W) || Ie || te || ie || An || Xn, ve = Lt(V, W, D.TEXT), Js = (Q) => {
6677
6677
  const J = F[Q], tt = y[Q];
6678
6678
  if (!tt || !Gt(J, Q))
6679
6679
  return -1;
@@ -6860,22 +6860,22 @@ function qc(o, t) {
6860
6860
  if (M && Be.isSubscribe("labelMousedown") && Be.emit("labelMousedown", {
6861
6861
  evt: o,
6862
6862
  element: V
6863
- }), U && (V.type === O.MACRO || V.type === O.CUSTOM_MACRO || V.type === O.REUSABLE_ITEM)) {
6863
+ }), U && (V.type === P.MACRO || V.type === P.CUSTOM_MACRO || V.type === P.REUSABLE_ITEM)) {
6864
6864
  const Q = e.getMode();
6865
- if (Q === K.EDIT && V.type === O.CUSTOM_MACRO)
6865
+ if (Q === K.EDIT && V.type === P.CUSTOM_MACRO)
6866
6866
  Be.isSubscribe("macroClick") && Be.emit("macroClick", {
6867
6867
  evt: o,
6868
6868
  element: V
6869
6869
  });
6870
6870
  else if (Q === K.FORM) {
6871
6871
  let J = !1;
6872
- V.type === O.CUSTOM_MACRO && o.button === Yn.LEFT && !n && (J = e.getMacroParticle().activateInlineEditor(V, W)), !J && Be.isSubscribe("macroValueChange") && Be.emit("macroValueChange", {
6872
+ V.type === P.CUSTOM_MACRO && o.button === Yn.LEFT && !n && (J = e.getMacroParticle().activateInlineEditor(V, W)), !J && Be.isSubscribe("macroValueChange") && Be.emit("macroValueChange", {
6873
6873
  evt: o,
6874
6874
  element: V
6875
6875
  });
6876
6876
  }
6877
6877
  }
6878
- o.button === Yn.LEFT && U && V.type === O.SUB_TEMPLATE && e.getMode() === K.FORM && Be.isSubscribe("subTemplateClick") && Be.emit("subTemplateClick", {
6878
+ o.button === Yn.LEFT && U && V.type === P.SUB_TEMPLATE && e.getMode() === K.FORM && Be.isSubscribe("subTemplateClick") && Be.emit("subTemplateClick", {
6879
6879
  evt: o,
6880
6880
  element: V
6881
6881
  });
@@ -6885,7 +6885,7 @@ function qc(o, t) {
6885
6885
  // 只读或控件外表单模式禁用拖拽
6886
6886
  dragDisable: n || !V.controlId && e.getMode() === K.FORM
6887
6887
  };
6888
- V.type === O.LATEX && (Q.mime = "svg", Q.srcKey = "laTexSVG"), tr.drawResizer(V, y[W], Q), e.getCursor().drawCursor({
6888
+ V.type === P.LATEX && (Q.mime = "svg", Q.srcKey = "laTexSVG"), tr.drawResizer(V, y[W], Q), e.getCursor().drawCursor({
6889
6889
  isShow: !1
6890
6890
  }), fr(t), (V.imgDisplay === Pt.SURROUND || V.imgDisplay === Pt.FLOAT_TOP || V.imgDisplay === Pt.FLOAT_BOTTOM) && e.getImageParticle().createFloatImage(V), Be.isSubscribe("imageMousedown") && Be.emit("imageMousedown", {
6891
6891
  evt: o,
@@ -6893,17 +6893,17 @@ function qc(o, t) {
6893
6893
  });
6894
6894
  }
6895
6895
  const er = e.getTableTool();
6896
- er.dispose(), P && !n && e.getMode() !== K.FORM && er.render();
6896
+ er.dispose(), O && !n && e.getMode() !== K.FORM && er.render();
6897
6897
  const Ci = e.getHyperlinkParticle();
6898
- Ci.clearHyperlinkPopup(), V.type === O.HYPERLINK && (en(o) ? Ci.openHyperlink(V) : Ci.drawHyperlinkPopup(V, y[W]));
6898
+ Ci.clearHyperlinkPopup(), V.type === P.HYPERLINK && (en(o) ? Ci.openHyperlink(V) : Ci.drawHyperlinkPopup(V, y[W]));
6899
6899
  const nr = e.getDateParticle();
6900
- nr.clearDatePicker(), V.type === O.DATE && !n && nr.renderDatePicker(V, y[W]);
6900
+ nr.clearDatePicker(), V.type === P.DATE && !n && nr.renderDatePicker(V, y[W]);
6901
6901
  const or = e.getMenstrualHistoryParticle();
6902
- or.clearMenstrualHistoryEditor(), V.type === O.MENSTRUAL_HISTORY && g && (e.getMode() === K.FORM || e.getMode() === K.EDIT) && or.renderMenstrualHistoryEditor(V, y[W]);
6902
+ or.clearMenstrualHistoryEditor(), V.type === P.MENSTRUAL_HISTORY && g && (e.getMode() === K.FORM || e.getMode() === K.EDIT) && or.renderMenstrualHistoryEditor(V, y[W]);
6903
6903
  const ir = e.getFetalHeartPositionParticle();
6904
- ir.clearFetalHeartPositionEditor(), V.type === O.FETAL_HEART_POSITION && g && (e.getMode() === K.FORM || e.getMode() === K.EDIT) && ir.renderFetalHeartPositionEditor(V, y[W]);
6904
+ ir.clearFetalHeartPositionEditor(), V.type === P.FETAL_HEART_POSITION && g && (e.getMode() === K.FORM || e.getMode() === K.EDIT) && ir.renderFetalHeartPositionEditor(V, y[W]);
6905
6905
  const sr = e.getToothPositionParticle();
6906
- sr.clearToothPositionEditor(), V.type === O.TOOTH_POSITION && g && (e.getMode() === K.FORM || e.getMode() === K.EDIT) && sr.renderToothPositionEditor(V, y[W]);
6906
+ sr.clearToothPositionEditor(), V.type === P.TOOTH_POSITION && g && (e.getMode() === K.FORM || e.getMode() === K.EDIT) && sr.renderToothPositionEditor(V, y[W]);
6907
6907
  }
6908
6908
  function Zo(o) {
6909
6909
  const t = mt();
@@ -6937,7 +6937,7 @@ function td(o, t) {
6937
6937
  let k = !1, B = !1;
6938
6938
  if (R) {
6939
6939
  const rt = a[f];
6940
- if (rt.type === O.IMAGE || rt.type === O.LATEX) {
6940
+ if (rt.type === P.IMAGE || rt.type === P.LATEX) {
6941
6941
  if (Ir(rt, o, t), rt.imgDisplay === Pt.SURROUND || rt.imgDisplay === Pt.FLOAT_TOP || rt.imgDisplay === Pt.FLOAT_BOTTOM)
6942
6942
  e.getPreviewer().drawResizer(rt), k = !0;
6943
6943
  else {
@@ -6968,8 +6968,8 @@ function td(o, t) {
6968
6968
  return;
6969
6969
  }
6970
6970
  }
6971
- const p = e.getControl(), L = e.getElementList(), m = !I || !!L[u.startIndex].controlId || !p.getIsElementListContainFullControl(T), P = e.getOptions(), S = T.map((k) => {
6972
- if (!k.type || k.type === O.TEXT) {
6971
+ const p = e.getControl(), L = e.getElementList(), m = !I || !!L[u.startIndex].controlId || !p.getIsElementListContainFullControl(T), O = e.getOptions(), S = T.map((k) => {
6972
+ if (!k.type || k.type === P.TEXT) {
6973
6973
  const B = {
6974
6974
  value: k.value
6975
6975
  }, rt = Ae;
@@ -6981,7 +6981,7 @@ function td(o, t) {
6981
6981
  let B = pt(k);
6982
6982
  return m && (B = We(B, ki)), re([B], {
6983
6983
  isHandleFirstElement: !1,
6984
- editorOptions: P
6984
+ editorOptions: O
6985
6985
  }), B;
6986
6986
  }
6987
6987
  });
@@ -7023,7 +7023,7 @@ function td(o, t) {
7023
7023
  let at = null;
7024
7024
  if (R) {
7025
7025
  const B = e.getElementList()[$];
7026
- (B.type === O.IMAGE || B.type === O.LATEX) && (Ir(B, o, t), at = B);
7026
+ (B.type === P.IMAGE || B.type === P.LATEX) && (Ir(B, o, t), at = B);
7027
7027
  }
7028
7028
  if (e.render({
7029
7029
  isSetCursor: !1
@@ -7091,7 +7091,7 @@ function nd(o, t) {
7091
7091
  const v = t.cacheRange?.startIndex;
7092
7092
  if (v) {
7093
7093
  const H = t.cacheElementList[v];
7094
- H?.type === O.IMAGE && (H.imgDisplay === Pt.SURROUND || H.imgDisplay === Pt.FLOAT_TOP || H.imgDisplay === Pt.FLOAT_BOTTOM) && (e.getPreviewer().clearResizer(), e.getImageParticle().dragFloatImage(o.movementX, o.movementY));
7094
+ H?.type === P.IMAGE && (H.imgDisplay === Pt.SURROUND || H.imgDisplay === Pt.FLOAT_TOP || H.imgDisplay === Pt.FLOAT_BOTTOM) && (e.getPreviewer().clearResizer(), e.getImageParticle().dragFloatImage(o.movementX, o.movementY));
7095
7095
  }
7096
7096
  t.dragover(o), t.isAllowDrop = !0;
7097
7097
  return;
@@ -7106,7 +7106,7 @@ function nd(o, t) {
7106
7106
  });
7107
7107
  if (!~R.index)
7108
7108
  return;
7109
- const { index: g, isTable: f, tdValueIndex: T, tdIndex: I, trIndex: p, tableId: L, trId: m, tdId: P } = R;
7109
+ const { index: g, isTable: f, tdValueIndex: T, tdIndex: I, trIndex: p, tableId: L, trId: m, tdId: O } = R;
7110
7110
  let S = f ? T : g;
7111
7111
  if (R.isControl && e.getMode() !== K.READONLY) {
7112
7112
  const { newIndex: N } = n.moveCursor({
@@ -7120,7 +7120,7 @@ function nd(o, t) {
7120
7120
  }
7121
7121
  const { index: E, isTable: b, tdIndex: y, tdId: W, trIndex: V, tableId: F } = t.mouseDownStartPosition, Y = S, x = e.getRange();
7122
7122
  let X;
7123
- if (P !== W && P && W) {
7123
+ if (O !== W && O && W) {
7124
7124
  const N = e.getTdByPosition({
7125
7125
  ...t.mouseDownStartPosition,
7126
7126
  isTable: !!t.mouseDownStartPosition.tableId,
@@ -7152,14 +7152,14 @@ function nd(o, t) {
7152
7152
  ];
7153
7153
  }
7154
7154
  }
7155
- if (f && b && P !== W && !X)
7155
+ if (f && b && O !== W && !X)
7156
7156
  x.setRange(Y, Y, L, y, I, V, p), u.setPositionContext({
7157
7157
  // isTable,
7158
7158
  isTable: !!f,
7159
7159
  index: g,
7160
7160
  trIndex: p,
7161
7161
  tdIndex: I,
7162
- tdId: P,
7162
+ tdId: O,
7163
7163
  trId: m,
7164
7164
  tableId: L
7165
7165
  });
@@ -7172,7 +7172,7 @@ function nd(o, t) {
7172
7172
  index: g,
7173
7173
  trIndex: p,
7174
7174
  tdIndex: I,
7175
- tdId: P,
7175
+ tdId: O,
7176
7176
  trId: m,
7177
7177
  tableId: L
7178
7178
  });
@@ -7261,9 +7261,9 @@ function od(o, t) {
7261
7261
  const n = e.subTemplateParentId;
7262
7262
  for (let i = t - 1; i >= 0; i--) {
7263
7263
  const r = o[i];
7264
- if (r.type === O.SUB_TEMPLATE && r.id === n)
7264
+ if (r.type === P.SUB_TEMPLATE && r.id === n)
7265
7265
  return { labelIndex: i, labelElement: r };
7266
- if (r.type === O.SUB_TEMPLATE && r.id !== n)
7266
+ if (r.type === P.SUB_TEMPLATE && r.id !== n)
7267
7267
  break;
7268
7268
  }
7269
7269
  return null;
@@ -7284,7 +7284,7 @@ function id(o) {
7284
7284
  let s = n.startIndex;
7285
7285
  for (; s > 0; ) {
7286
7286
  const l = i[s];
7287
- if (l.type === O.SUB_TEMPLATE && l.subTemplateExpanded) {
7287
+ if (l.type === P.SUB_TEMPLATE && l.subTemplateExpanded) {
7288
7288
  const d = Tl(i, s, t);
7289
7289
  n.startIndex = d, n.endIndex = d, e.replaceRange(n);
7290
7290
  const u = t.getPosition(), R = u.getPositionList();
@@ -7367,11 +7367,11 @@ function rd(o, t) {
7367
7367
  return;
7368
7368
  }
7369
7369
  }
7370
- const T = e.getPosition().getPositionList(), I = T[r], p = T[r - 1], L = I && p && I.rowIndex === p.rowIndex, m = u?.controlComponent === h.PREFIX || u?.controlComponent === h.PRETEXTFIX || u?.controlComponent === h.PRE_TEXT || u?.controlComponent === h.PRETEXTFIX_TEXT, P = u?.controlComponent === h.POSTFIX || u?.controlComponent === h.POSTTEXTFIX || u?.controlComponent === h.POSTTEXTFIX_TEXT || u?.controlComponent === h.POST_TEXT, S = !!u?.controlId, E = R?.controlComponent === h.PLACEHOLDER, b = R?.controlComponent === h.POSTFIX || R?.controlComponent === h.POSTTEXTFIX || R?.controlComponent === h.POSTTEXTFIX_TEXT || R?.controlComponent === h.POST_TEXT, y = R?.control?.type === D.TEXT && (R.controlComponent === h.PREFIX || R.controlComponent === h.PRE_TEXT), W = b && u?.controlId === R?.controlId && u?.originControlId === R?.originControlId && u?.controlComponent === h.VALUE, V = !!R && !R.controlId && !R.control;
7370
+ const T = e.getPosition().getPositionList(), I = T[r], p = T[r - 1], L = I && p && I.rowIndex === p.rowIndex, m = u?.controlComponent === h.PREFIX || u?.controlComponent === h.PRETEXTFIX || u?.controlComponent === h.PRE_TEXT || u?.controlComponent === h.PRETEXTFIX_TEXT, O = u?.controlComponent === h.POSTFIX || u?.controlComponent === h.POSTTEXTFIX || u?.controlComponent === h.POSTTEXTFIX_TEXT || u?.controlComponent === h.POST_TEXT, S = !!u?.controlId, E = R?.controlComponent === h.PLACEHOLDER, b = R?.controlComponent === h.POSTFIX || R?.controlComponent === h.POSTTEXTFIX || R?.controlComponent === h.POSTTEXTFIX_TEXT || R?.controlComponent === h.POST_TEXT, y = R?.control?.type === D.TEXT && (R.controlComponent === h.PREFIX || R.controlComponent === h.PRE_TEXT), W = b && u?.controlId === R?.controlId && u?.originControlId === R?.originControlId && u?.controlComponent === h.VALUE, V = !!R && !R.controlId && !R.control;
7371
7371
  if (E && m && S && L)
7372
7372
  return;
7373
7373
  const { isInParent: F, parentControlId: Y } = sd(c, r, u);
7374
- if (P && S && L && F && !(R?.controlId === Y && !R?.originControlId && (R?.controlComponent === h.VALUE || R?.controlComponent === h.PLACEHOLDER))) {
7374
+ if (O && S && L && F && !(R?.controlId === Y && !R?.originControlId && (R?.controlComponent === h.VALUE || R?.controlComponent === h.PLACEHOLDER))) {
7375
7375
  if (u.originControlId && Y)
7376
7376
  for (let X = r; X < c.length; X++) {
7377
7377
  const N = c[X];
@@ -7390,7 +7390,7 @@ function rd(o, t) {
7390
7390
  }
7391
7391
  return;
7392
7392
  }
7393
- if (P && S && L && !F && !(V && !E && !b)) {
7393
+ if (O && S && L && !F && !(V && !E && !b)) {
7394
7394
  if (y)
7395
7395
  return;
7396
7396
  if (g)
@@ -7504,17 +7504,17 @@ function rd(o, t) {
7504
7504
  const L = n.getRangeRowElementList();
7505
7505
  if (L) {
7506
7506
  const m = f[r - 1];
7507
- L.forEach((P) => {
7508
- P.rowFlex = m?.rowFlex;
7507
+ L.forEach((O) => {
7508
+ O.rowFlex = m?.rowFlex;
7509
7509
  });
7510
7510
  }
7511
7511
  }
7512
7512
  const I = T.value === A ? f[r - 1] : T, p = f[s + 1];
7513
7513
  if (I?.titleId && p?.titleId && I.level === p.level && I.titleId !== p.titleId) {
7514
7514
  const L = I.titleId, m = p.titleId;
7515
- let P = s + 1;
7516
- for (; P < f.length && f[P]?.titleId === m; )
7517
- f[P].titleId = L, P++;
7515
+ let O = s + 1;
7516
+ for (; O < f.length && f[O]?.titleId === m; )
7517
+ f[O].titleId = L, O++;
7518
7518
  }
7519
7519
  g ? e.spliceElementList(f, R, 1) : e.spliceElementList(f, r + 1, s - r), a = g ? R - 1 : r;
7520
7520
  }
@@ -7541,7 +7541,7 @@ function ld(o) {
7541
7541
  const s = n.startIndex + 1;
7542
7542
  for (; s < i.length; ) {
7543
7543
  const l = i[s];
7544
- if (l.type === O.SUB_TEMPLATE && l.subTemplateExpanded) {
7544
+ if (l.type === P.SUB_TEMPLATE && l.subTemplateExpanded) {
7545
7545
  pl(i, s, t);
7546
7546
  return;
7547
7547
  }
@@ -7584,7 +7584,7 @@ function ad(o, t) {
7584
7584
  let R = -1;
7585
7585
  for (let g = r; g >= 0; g--) {
7586
7586
  const f = a[g];
7587
- if (f.type === O.SUB_TEMPLATE && f.id === u) {
7587
+ if (f.type === P.SUB_TEMPLATE && f.id === u) {
7588
7588
  R = g;
7589
7589
  break;
7590
7590
  }
@@ -7648,9 +7648,9 @@ function cd(o, t) {
7648
7648
  const I = n.getRangeAnchorStyle(l, r);
7649
7649
  if (I) {
7650
7650
  const p = [...be], L = I.controlComponent === h.POSTFIX || I.controlComponent === h.POSTTEXTFIX || I.controlComponent === h.POSTTEXTFIX_TEXT || I.controlComponent === h.POST_TEXT, m = I.control?.type === D.BUTTON && !I.control?.buttonText;
7651
- !L && !m && p.push(...Ae), p.forEach((P) => {
7652
- const S = I[P];
7653
- S !== void 0 && (d[P] = S);
7651
+ !L && !m && p.push(...Ae), p.forEach((O) => {
7652
+ const S = I[O];
7653
+ S !== void 0 && (d[O] = S);
7654
7654
  });
7655
7655
  }
7656
7656
  }
@@ -7673,9 +7673,9 @@ function cd(o, t) {
7673
7673
  if (s) {
7674
7674
  if (e.spliceElementList(l, L + 1, 0, [d]), c.titleId && l[L + 2]?.titleId === c.titleId) {
7675
7675
  const m = mt();
7676
- let P = L + 2;
7677
- for (; P < l.length && l[P]?.titleId === c.titleId; )
7678
- l[P].titleId = m, P++;
7676
+ let O = L + 2;
7677
+ for (; O < l.length && l[O]?.titleId === c.titleId; )
7678
+ l[O].titleId = m, O++;
7679
7679
  }
7680
7680
  } else
7681
7681
  e.spliceElementList(l, i + 1, r - i, [d]);
@@ -7684,7 +7684,7 @@ function cd(o, t) {
7684
7684
  ~g && (n.setRange(g, g), e.render({ curIndex: g })), o.preventDefault();
7685
7685
  }
7686
7686
  function mr(o) {
7687
- return o && (o.type === O.MACRO || o.type === O.CUSTOM_MACRO || o.type === O.REUSABLE_ITEM || o.type === O.SUB_TEMPLATE || o.type === O.MENSTRUAL_HISTORY || o.type === O.FETAL_HEART_POSITION || o.type === O.TOOTH_POSITION || o.type === O.LIST || o.type === O.SPECIAL_SYMBOLS);
7687
+ return o && (o.type === P.MACRO || o.type === P.CUSTOM_MACRO || o.type === P.REUSABLE_ITEM || o.type === P.SUB_TEMPLATE || o.type === P.MENSTRUAL_HISTORY || o.type === P.FETAL_HEART_POSITION || o.type === P.TOOTH_POSITION || o.type === P.LIST || o.type === P.SPECIAL_SYMBOLS);
7688
7688
  }
7689
7689
  function dd(o, t) {
7690
7690
  const e = t.getDraw();
@@ -7697,20 +7697,20 @@ function dd(o, t) {
7697
7697
  if (l <= 0 && !s.isTable)
7698
7698
  return;
7699
7699
  const a = e.getRange(), { startIndex: c, endIndex: d } = a.getRange(), u = a.getIsCollapsed(), R = e.getElementList(), g = e.getControl(), f = e.getMode() === K.FORM, T = g.getActiveControl()?.getElement()?.control?.type, I = f && T === D.TEXT, p = f && !I ? g.getActiveTextControlLimit() : null, L = R[l], m = L?.controlComponent === h.PREFIX || L?.controlComponent === h.PRETEXTFIX || L?.controlComponent === h.PRE_TEXT;
7700
- let P = !1;
7700
+ let O = !1;
7701
7701
  if (m && L?.originControlId) {
7702
7702
  const F = L.originControlId;
7703
7703
  for (let Y = l - 1; Y >= 0; Y--) {
7704
7704
  const x = R[Y];
7705
7705
  if (x.controlId === F && !x.originControlId) {
7706
- P = !0;
7706
+ O = !0;
7707
7707
  break;
7708
7708
  }
7709
7709
  if (x.controlId && x.controlId !== F && x.originControlId !== F)
7710
7710
  break;
7711
7711
  }
7712
7712
  }
7713
- if (f && !I && g.getActiveControl() && m && !p && !P) {
7713
+ if (f && !I && g.getActiveControl() && m && !p && !O) {
7714
7714
  g.initNextControl({
7715
7715
  direction: oe.UP
7716
7716
  });
@@ -7758,7 +7758,7 @@ function dd(o, t) {
7758
7758
  let b = E, y = E;
7759
7759
  if (o.shiftKey && r && (c !== d ? c === r.index ? (b = c, y = d - S) : (b = E, y = d) : y = d), !o.shiftKey) {
7760
7760
  const F = R[c];
7761
- if (F.type === O.TABLE) {
7761
+ if (F.type === P.TABLE) {
7762
7762
  const Y = F.trList, x = Y.length - 1, X = Y[x], N = X.tdList.length - 1, M = X.tdList[N];
7763
7763
  i.setPositionContext({
7764
7764
  isTable: !0,
@@ -7828,7 +7828,7 @@ function dd(o, t) {
7828
7828
  }), o.preventDefault();
7829
7829
  }
7830
7830
  function Lr(o) {
7831
- return o && (o.type === O.MACRO || o.type === O.CUSTOM_MACRO || o.type === O.REUSABLE_ITEM || o.type === O.SUB_TEMPLATE || o.type === O.MENSTRUAL_HISTORY || o.type === O.FETAL_HEART_POSITION || o.type === O.TOOTH_POSITION || o.type === O.LIST || o.type === O.SPECIAL_SYMBOLS);
7831
+ return o && (o.type === P.MACRO || o.type === P.CUSTOM_MACRO || o.type === P.REUSABLE_ITEM || o.type === P.SUB_TEMPLATE || o.type === P.MENSTRUAL_HISTORY || o.type === P.FETAL_HEART_POSITION || o.type === P.TOOTH_POSITION || o.type === P.LIST || o.type === P.SPECIAL_SYMBOLS);
7832
7832
  }
7833
7833
  function ud(o, t) {
7834
7834
  const e = t.getDraw();
@@ -7842,9 +7842,9 @@ function ud(o, t) {
7842
7842
  return;
7843
7843
  const c = e.getRange(), { startIndex: d, endIndex: u } = c.getRange(), R = c.getIsCollapsed();
7844
7844
  let g = e.getElementList();
7845
- const f = e.getControl(), T = e.getMode() === K.FORM, I = f.getActiveControl()?.getElement()?.control?.type, p = T && I === D.TEXT, L = T && !p ? f.getActiveTextControlLimit() : null, m = g[s], P = m?.controlComponent === h.POSTFIX || m?.controlComponent === h.POSTTEXTFIX || m?.controlComponent === h.POST_TEXT;
7845
+ const f = e.getControl(), T = e.getMode() === K.FORM, I = f.getActiveControl()?.getElement()?.control?.type, p = T && I === D.TEXT, L = T && !p ? f.getActiveTextControlLimit() : null, m = g[s], O = m?.controlComponent === h.POSTFIX || m?.controlComponent === h.POSTTEXTFIX || m?.controlComponent === h.POST_TEXT;
7846
7846
  let S = !1;
7847
- if (P && m?.originControlId) {
7847
+ if (O && m?.originControlId) {
7848
7848
  const x = m.originControlId;
7849
7849
  for (let X = s + 1; X < g.length; X++) {
7850
7850
  const N = g[X];
@@ -7856,7 +7856,7 @@ function ud(o, t) {
7856
7856
  break;
7857
7857
  }
7858
7858
  }
7859
- if (T && !p && f.getActiveControl() && P && !L && !S) {
7859
+ if (T && !p && f.getActiveControl() && O && !L && !S) {
7860
7860
  f.initNextControl({
7861
7861
  direction: oe.DOWN
7862
7862
  });
@@ -7904,7 +7904,7 @@ function ud(o, t) {
7904
7904
  let y = b, W = b;
7905
7905
  if (o.shiftKey && r && (d !== u ? d === r.index ? (y = d, W = b) : (y = d + E, W = u) : y = d), !o.shiftKey) {
7906
7906
  const x = g[u], X = g[u + 1];
7907
- if (X?.type === O.TABLE) {
7907
+ if (X?.type === P.TABLE) {
7908
7908
  const M = X.trList[0], U = M.tdList[0];
7909
7909
  i.setPositionContext({
7910
7910
  isTable: !0,
@@ -7991,7 +7991,7 @@ function Rd(o, t) {
7991
7991
  o.preventDefault();
7992
7992
  const T = s.getRangeAnchorStyle(l, c), p = {
7993
7993
  ...T ? he(T, Ae) : null,
7994
- type: O.TAB,
7994
+ type: P.TAB,
7995
7995
  value: ""
7996
7996
  };
7997
7997
  ge(l, [p], a, {
@@ -8070,25 +8070,25 @@ function hd(o, t) {
8070
8070
  isTable: !1
8071
8071
  }), u = T - 1, R = u, e.getTableTool().dispose();
8072
8072
  else {
8073
- let P = -1, S = -1;
8073
+ let O = -1, S = -1;
8074
8074
  const E = m[T].trList, b = E[I].tdList[p].colIndex;
8075
8075
  t: for (let V = I - 1; V >= 0; V--) {
8076
8076
  const Y = E[V].tdList;
8077
8077
  for (let x = 0; x < Y.length; x++) {
8078
8078
  const X = Y[x];
8079
8079
  if (X.colIndex === b || X.colIndex + X.colspan - 1 >= b && X.colIndex <= b) {
8080
- P = V, S = x;
8080
+ O = V, S = x;
8081
8081
  break t;
8082
8082
  }
8083
8083
  }
8084
8084
  }
8085
- if (!~P || !~S)
8085
+ if (!~O || !~S)
8086
8086
  return;
8087
- const y = E[P], W = y.tdList[S];
8087
+ const y = E[O], W = y.tdList[S];
8088
8088
  i.setPositionContext({
8089
8089
  isTable: !0,
8090
8090
  index: T,
8091
- trIndex: P,
8091
+ trIndex: O,
8092
8092
  tdIndex: S,
8093
8093
  tdId: W.id,
8094
8094
  trId: y.id,
@@ -8096,10 +8096,10 @@ function hd(o, t) {
8096
8096
  }), u = W.value.length - 1, R = u;
8097
8097
  }
8098
8098
  } else {
8099
- const m = e.getOriginalElementList(), P = m[T], S = P.trList;
8099
+ const m = e.getOriginalElementList(), O = m[T], S = O.trList;
8100
8100
  if (I === S.length - 1) {
8101
8101
  const E = T + 1, b = m[E];
8102
- if (b && [P.id, P.originalId].includes(b.originalId)) {
8102
+ if (b && [O.id, O.originalId].includes(b.originalId)) {
8103
8103
  for (let W = p; W >= 0; W--)
8104
8104
  if (b.trList[0].tdList[W].value.length) {
8105
8105
  i.setPositionContext({
@@ -8148,18 +8148,18 @@ function hd(o, t) {
8148
8148
  const { index: I, rowNo: p, rowIndex: L, coordinate: { rightTop: [m] } } = T;
8149
8149
  if (d && L === 0 || !d && L === e.getRowCount() - 1)
8150
8150
  return;
8151
- const P = Wi({
8151
+ const O = Wi({
8152
8152
  positionList: c,
8153
8153
  index: I,
8154
8154
  rowNo: p,
8155
8155
  isUp: d,
8156
8156
  cursorX: m
8157
8157
  });
8158
- if (P < 0)
8158
+ if (O < 0)
8159
8159
  return;
8160
- u = P, R = P, o.shiftKey && (l !== a ? l === r.index ? u = l : R = a : d ? R = a : u = l);
8161
- const E = e.getElementList()[P];
8162
- if (E.type === O.TABLE) {
8160
+ u = O, R = O, o.shiftKey && (l !== a ? l === r.index ? u = l : R = a : d ? R = a : u = l);
8161
+ const E = e.getElementList()[O];
8162
+ if (E.type === P.TABLE) {
8163
8163
  const { scale: b } = e.getOptions(), y = e.getMargins(), W = E.trList;
8164
8164
  let V = -1, F = -1, Y = -1;
8165
8165
  if (d)
@@ -8202,7 +8202,7 @@ function hd(o, t) {
8202
8202
  const x = W[V], X = x.tdList[F];
8203
8203
  i.setPositionContext({
8204
8204
  isTable: !0,
8205
- index: P,
8205
+ index: O,
8206
8206
  trIndex: V,
8207
8207
  tdIndex: F,
8208
8208
  tdId: X.id,
@@ -8304,10 +8304,10 @@ function md(o, t) {
8304
8304
  return pd(o) ? t : Id(o) ? "Times New Roman" : t;
8305
8305
  }
8306
8306
  function li(o) {
8307
- return o?.type === O.CONTROL && (o.controlComponent === h.PREFIX || o.controlComponent === h.PRE_TEXT || o.controlComponent === h.PRETEXTFIX || o.controlComponent === h.PRETEXTFIX_TEXT);
8307
+ return o?.type === P.CONTROL && (o.controlComponent === h.PREFIX || o.controlComponent === h.PRE_TEXT || o.controlComponent === h.PRETEXTFIX || o.controlComponent === h.PRETEXTFIX_TEXT);
8308
8308
  }
8309
8309
  function He(o) {
8310
- return o?.type === O.CONTROL && (o.controlComponent === h.POSTFIX || o.controlComponent === h.POST_TEXT || o.controlComponent === h.POSTTEXTFIX || o.controlComponent === h.POSTTEXTFIX_TEXT);
8310
+ return o?.type === P.CONTROL && (o.controlComponent === h.POSTFIX || o.controlComponent === h.POST_TEXT || o.controlComponent === h.POSTTEXTFIX || o.controlComponent === h.POSTTEXTFIX_TEXT);
8311
8311
  }
8312
8312
  function yi(o) {
8313
8313
  return !!o?.originControlId && li(o);
@@ -8390,13 +8390,13 @@ function ss(o, t, e = "input") {
8390
8390
  });
8391
8391
  };
8392
8392
  let L = r.getActiveControl();
8393
- const m = i.getElementList()[f.getRange().endIndex], P = m?.control?.type === D.TEXT && !!m?.originControlId && (m.controlComponent === h.PREFIX || m.controlComponent === h.PRE_TEXT || m.controlComponent === h.PRETEXTFIX || m.controlComponent === h.PRETEXTFIX_TEXT || m.controlComponent === h.POSTFIX || m.controlComponent === h.POST_TEXT || m.controlComponent === h.POSTTEXTFIX || m.controlComponent === h.POSTTEXTFIX_TEXT || m.controlComponent === h.PLACEHOLDER);
8394
- if (!L && (r.getIsRangeWithinControl() || P) && (I(), L = r.getActiveControl()), L) {
8393
+ const m = i.getElementList()[f.getRange().endIndex], O = m?.control?.type === D.TEXT && !!m?.originControlId && (m.controlComponent === h.PREFIX || m.controlComponent === h.PRE_TEXT || m.controlComponent === h.PRETEXTFIX || m.controlComponent === h.PRETEXTFIX_TEXT || m.controlComponent === h.POSTFIX || m.controlComponent === h.POST_TEXT || m.controlComponent === h.POSTTEXTFIX || m.controlComponent === h.POSTTEXTFIX_TEXT || m.controlComponent === h.PLACEHOLDER);
8394
+ if (!L && (r.getIsRangeWithinControl() || O) && (I(), L = r.getActiveControl()), L) {
8395
8395
  const Et = L.getElement(), et = i.getElementList()[f.getRange().endIndex], Yt = Et?.controlId === et?.controlId && (Et?.originControlId || null) === (et?.originControlId || null), ut = !!et && et.controlComponent === h.VALUE && !!et.controlId && !et.originControlId && f.getRange().endIndex > 0 && i.getElementList()[f.getRange().endIndex - 1]?.originControlId === et.controlId;
8396
8396
  (!Yt || ut) && (I(), L = r.getActiveControl());
8397
8397
  }
8398
8398
  const { endIndex: S } = f.getRange(), E = i.getElementList(), b = E[S], y = E[S + 1];
8399
- if (b?.type === O.SUB_TEMPLATE && y?.type === O.SUB_TEMPLATE)
8399
+ if (b?.type === P.SUB_TEMPLATE && y?.type === P.SUB_TEMPLATE)
8400
8400
  return;
8401
8401
  const W = i.getMode() === K.FORM;
8402
8402
  if (W) {
@@ -8439,7 +8439,7 @@ function ss(o, t, e = "input") {
8439
8439
  }
8440
8440
  const V = f.getDefaultStyle() || t.compositionInfo?.defaultStyle || null, F = t.compositionInfo?.perfStartTime, Y = Od(t, i.getElementList());
8441
8441
  g || i.getCursor().clearAgentDomValue();
8442
- const { TEXT: x, HYPERLINK: X, SUBSCRIPT: N, SUPERSCRIPT: M, DATE: U, TAB: C } = O, w = o.replaceAll(`
8442
+ const { TEXT: x, HYPERLINK: X, SUBSCRIPT: N, SUPERSCRIPT: M, DATE: U, TAB: C } = P, w = o.replaceAll(`
8443
8443
  `, A), { startIndex: v, endIndex: H } = f.getRange(), Z = f.getRangeAnchorStyle(Y, v);
8444
8444
  if (!Z)
8445
8445
  return;
@@ -8449,7 +8449,7 @@ function ss(o, t, e = "input") {
8449
8449
  }, rt = i.isDesignMode(), lt = Y[H + 1], wt = En(Y, Z.originControlId, i.getMode()), Gt = En(Y, lt?.originControlId, i.getMode()), ce = !Z.originControlId && !lt?.originControlId && He(Z) && li(lt) && !!Z.controlId && !!lt.controlId && Z.controlId !== lt.controlId, pe = ho(Z) && yi(lt) && !wt && !Gt, _ = i.getMode() === K.EDIT ? Pr(Y, Z, lt) : void 0, j = !!Z.originControlId && He(Z) && lt?.controlId === Z.originControlId && !lt.originControlId && lt.control?.type === D.TEXTFIELD && He(lt), G = !!Z.originControlId && He(Z) && lt?.controlId === Z.originControlId && !lt.originControlId && lt.control?.type === D.TEXTFIELD && lt.controlComponent === h.VALUE, Rt = !!wt && wt === Gt && !!Z.controlId && !!lt?.controlId && Z.controlId !== lt.controlId && (ho(Z) || yi(lt)) ? wt : null;
8450
8450
  if (W && (ce || pe))
8451
8451
  return;
8452
- const st = li(lt) && !lt?.originControlId, ft = He(Z) && !Z.originControlId || Z.type === O.CONTROL && Z.controlComponent === h.VALUE && lt?.type !== O.CONTROL && !Z.originControlId, Ot = [
8452
+ const st = li(lt) && !lt?.originControlId, ft = He(Z) && !Z.originControlId || Z.type === P.CONTROL && Z.controlComponent === h.VALUE && lt?.type !== P.CONTROL && !Z.originControlId, Ot = [
8453
8453
  D.SELECT,
8454
8454
  D.DATE,
8455
8455
  D.NUMBER,
@@ -8829,7 +8829,7 @@ async function Sd(o, t) {
8829
8829
  if (!a)
8830
8830
  return;
8831
8831
  const c = {
8832
- type: O.TABLE,
8832
+ type: P.TABLE,
8833
8833
  value: "",
8834
8834
  colgroup: [],
8835
8835
  trList: []
@@ -8882,7 +8882,7 @@ function ml(o) {
8882
8882
  const i = t.getRange().getRangeParagraphInfo();
8883
8883
  if (!i)
8884
8884
  return null;
8885
- const r = i?.elementList?.map((R) => !R.type || R.type !== O.CONTROL && ye.includes(R.type) ? R.value : A).join("") || "";
8885
+ const r = i?.elementList?.map((R) => !R.type || R.type !== P.CONTROL && ye.includes(R.type) ? R.value : A).join("") || "";
8886
8886
  if (!r)
8887
8887
  return null;
8888
8888
  const s = e.isFirstLetter || t.getCursor().getHitLineStartIndex() ? e.index + 1 : e.index, l = i.startIndex, c = new Intl.Segmenter(void 0, { granularity: "word" }).segment(r);
@@ -9051,7 +9051,7 @@ function Vd(o, t) {
9051
9051
  const T = e.getCursor(), { cursor: { dragColor: I, dragWidth: p, dragFloatImageDisabled: L } } = e.getOptions();
9052
9052
  if (L) {
9053
9053
  const m = t.cacheElementList?.[t.cacheRange.startIndex];
9054
- if (m?.type === O.IMAGE && (m.imgDisplay === Pt.FLOAT_TOP || m.imgDisplay === Pt.FLOAT_BOTTOM || m.imgDisplay === Pt.SURROUND))
9054
+ if (m?.type === P.IMAGE && (m.imgDisplay === Pt.FLOAT_TOP || m.imgDisplay === Pt.FLOAT_BOTTOM || m.imgDisplay === Pt.SURROUND))
9055
9055
  return;
9056
9056
  }
9057
9057
  T.drawCursor({
@@ -9528,13 +9528,13 @@ class wd {
9528
9528
  for (let I = 0; I < n.length; I++) {
9529
9529
  const p = n[I];
9530
9530
  if (!p.isSurround) {
9531
- const P = p.width + (p.offsetX || 0);
9532
- p.rowFlex === Ht.CENTER ? g += (c - P) / 2 : p.rowFlex === Ht.RIGHT && (g += c - P);
9531
+ const O = p.width + (p.offsetX || 0);
9532
+ p.rowFlex === Ht.CENTER ? g += (c - O) / 2 : p.rowFlex === Ht.RIGHT && (g += c - O);
9533
9533
  }
9534
9534
  g += p.offsetX || 0, f += p.offsetY || 0;
9535
9535
  const L = g, m = f;
9536
- for (let P = 0; P < p.elementList.length; P++) {
9537
- const S = p.elementList[P], E = S.metrics, b = !Pe(S) && (S.imgDisplay !== Pt.INLINE && S.type === O.IMAGE || S.type === O.LATEX) ? p.ascent - E.height : p.ascent;
9536
+ for (let O = 0; O < p.elementList.length; O++) {
9537
+ const S = p.elementList[O], E = S.metrics, b = !Pe(S) && (S.imgDisplay !== Pt.INLINE && S.type === P.IMAGE || S.type === P.LATEX) ? p.ascent - E.height : p.ascent;
9538
9538
  S.left && (g += S.left), S.translateX && (g += S.translateX * u);
9539
9539
  const y = {
9540
9540
  pageNo: i,
@@ -9546,8 +9546,8 @@ class wd {
9546
9546
  left: S.left || 0,
9547
9547
  ascent: b,
9548
9548
  lineHeight: p.height,
9549
- isFirstLetter: P === 0,
9550
- isLastLetter: P === p.elementList.length - 1,
9549
+ isFirstLetter: O === 0,
9550
+ isLastLetter: O === p.elementList.length - 1,
9551
9551
  coordinate: {
9552
9552
  leftTop: [g, f],
9553
9553
  leftBottom: [g, f + p.height],
@@ -9573,7 +9573,7 @@ class wd {
9573
9573
  zone: d
9574
9574
  });
9575
9575
  }
9576
- if (e.push(y), T++, g += E.width, S.type === O.TABLE && !Pe(S)) {
9576
+ if (e.push(y), T++, g += E.width, S.type === P.TABLE && !Pe(S)) {
9577
9577
  const W = S.tdPadding || R, V = W[1] + W[3], F = W[0] + W[2];
9578
9578
  for (let Y = 0; Y < S.trList.length; Y++) {
9579
9579
  const x = S.trList[Y];
@@ -9713,14 +9713,14 @@ class wd {
9713
9713
  return T;
9714
9714
  }
9715
9715
  for (let T = 0; T < s.length; T++) {
9716
- const { index: I, pageNo: p, left: L, isFirstLetter: m, coordinate: { leftTop: P, rightTop: S, leftBottom: E } } = s[T];
9716
+ const { index: I, pageNo: p, left: L, isFirstLetter: m, coordinate: { leftTop: O, rightTop: S, leftBottom: E } } = s[T];
9717
9717
  if (d === p) {
9718
9718
  if (p > d)
9719
9719
  break;
9720
- if (P[0] - L <= e && S[0] >= e && P[1] <= n && E[1] >= n) {
9720
+ if (O[0] - L <= e && S[0] >= e && O[1] <= n && E[1] >= n) {
9721
9721
  let b = T;
9722
9722
  const y = r[T];
9723
- if (y.type === O.TABLE)
9723
+ if (y.type === P.TABLE)
9724
9724
  for (let V = 0; V < y.trList.length; V++) {
9725
9725
  const F = y.trList[V];
9726
9726
  for (let Y = 0; Y < F.tdList.length; Y++) {
@@ -9738,8 +9738,8 @@ class wd {
9738
9738
  const { index: N, hitLineStartIndex: M } = X, U = x.value[N];
9739
9739
  return {
9740
9740
  index: I,
9741
- isCheckbox: X.isCheckbox || U.type === O.CHECKBOX || U.controlComponent === h.CHECKBOX,
9742
- isRadio: U.type === O.RADIO || U.controlComponent === h.RADIO,
9741
+ isCheckbox: X.isCheckbox || U.type === P.CHECKBOX || U.controlComponent === h.CHECKBOX,
9742
+ isRadio: U.type === P.RADIO || U.controlComponent === h.RADIO,
9743
9743
  isControl: !!U.controlId,
9744
9744
  isImage: X.isImage,
9745
9745
  isLabel: X.isLabel,
@@ -9757,50 +9757,50 @@ class wd {
9757
9757
  }
9758
9758
  }
9759
9759
  }
9760
- if (y.type === O.IMAGE || y.type === O.LATEX)
9760
+ if (y.type === P.IMAGE || y.type === P.LATEX)
9761
9761
  return {
9762
9762
  index: b,
9763
9763
  isDirectHit: !0,
9764
9764
  isImage: !0
9765
9765
  };
9766
- if (y.type === O.MENSTRUAL_HISTORY)
9766
+ if (y.type === P.MENSTRUAL_HISTORY)
9767
9767
  return {
9768
9768
  index: b,
9769
9769
  isDirectHit: !0
9770
9770
  };
9771
- if (y.type === O.FETAL_HEART_POSITION)
9771
+ if (y.type === P.FETAL_HEART_POSITION)
9772
9772
  return {
9773
9773
  index: b,
9774
9774
  isDirectHit: !0
9775
9775
  };
9776
- if (y.type === O.TOOTH_POSITION) {
9776
+ if (y.type === P.TOOTH_POSITION) {
9777
9777
  const { scale: V } = this.options, F = y.width * V;
9778
- return e >= P[0] && e <= P[0] + F ? {
9778
+ return e >= O[0] && e <= O[0] + F ? {
9779
9779
  index: b,
9780
9780
  isDirectHit: !0
9781
9781
  } : {
9782
9782
  index: b
9783
9783
  };
9784
9784
  }
9785
- if (y.type === O.CHECKBOX || y.controlComponent === h.CHECKBOX)
9785
+ if (y.type === P.CHECKBOX || y.controlComponent === h.CHECKBOX)
9786
9786
  return {
9787
9787
  index: b,
9788
9788
  isDirectHit: !0,
9789
9789
  isCheckbox: !0
9790
9790
  };
9791
- if (y.type === O.LABEL)
9791
+ if (y.type === P.LABEL)
9792
9792
  return {
9793
9793
  index: b,
9794
9794
  isDirectHit: !0,
9795
9795
  isLabel: !0
9796
9796
  };
9797
- if (y.type === O.MACRO || y.type === O.CUSTOM_MACRO || y.type === O.REUSABLE_ITEM || y.type === O.SUB_TEMPLATE)
9797
+ if (y.type === P.MACRO || y.type === P.CUSTOM_MACRO || y.type === P.REUSABLE_ITEM || y.type === P.SUB_TEMPLATE)
9798
9798
  return {
9799
9799
  index: b,
9800
9800
  isDirectHit: !0,
9801
9801
  isMacro: !0
9802
9802
  };
9803
- if (y.type === O.TAB && y.listStyle === Xe.CHECKBOX) {
9803
+ if (y.type === P.TAB && y.listStyle === Xe.CHECKBOX) {
9804
9804
  let V = b - 1;
9805
9805
  for (; V > 0; ) {
9806
9806
  const F = r[V];
@@ -9814,7 +9814,7 @@ class wd {
9814
9814
  isCheckbox: !0
9815
9815
  };
9816
9816
  }
9817
- if (y.type === O.RADIO || y.controlComponent === h.RADIO)
9817
+ if (y.type === P.RADIO || y.controlComponent === h.RADIO)
9818
9818
  return {
9819
9819
  index: b,
9820
9820
  isDirectHit: !0,
@@ -9822,8 +9822,8 @@ class wd {
9822
9822
  };
9823
9823
  let W;
9824
9824
  if (r[I].value !== A) {
9825
- const V = S[0] - P[0];
9826
- e < P[0] + V / 2 && (b = T - 1, m && (W = T));
9825
+ const V = S[0] - O[0];
9826
+ e < O[0] + V / 2 && (b = T - 1, m && (W = T));
9827
9827
  }
9828
9828
  return {
9829
9829
  isDirectHit: !0,
@@ -9846,8 +9846,8 @@ class wd {
9846
9846
  if (i) {
9847
9847
  const { scale: T } = this.options, { td: I, tablePosition: p } = t;
9848
9848
  if (I && p) {
9849
- const { leftTop: L } = p.coordinate, m = I.x * T + L[0], P = I.y * T + L[1], S = I.width * T, E = I.height * T;
9850
- if (!(m < e && e < m + S && P < n && n < P + E))
9849
+ const { leftTop: L } = p.coordinate, m = I.x * T + L[0], O = I.y * T + L[1], S = I.width * T, E = I.height * T;
9850
+ if (!(m < e && e < m + S && O < n && n < O + E))
9851
9851
  return {
9852
9852
  index: R
9853
9853
  };
@@ -9857,13 +9857,13 @@ class wd {
9857
9857
  for (let T = 0; T < f.length; T++) {
9858
9858
  const { index: I, rowNo: p, coordinate: { leftTop: L, leftBottom: m } } = f[T];
9859
9859
  if (n > L[1] && n <= m[1]) {
9860
- const P = s.findIndex((y) => y.pageNo === d && y.rowNo === p), S = r[P], E = s[P], b = S.listStyle === Xe.CHECKBOX ? this.draw.getMargins()[3] : E.coordinate.leftTop[0];
9860
+ const O = s.findIndex((y) => y.pageNo === d && y.rowNo === p), S = r[O], E = s[O], b = S.listStyle === Xe.CHECKBOX ? this.draw.getMargins()[3] : E.coordinate.leftTop[0];
9861
9861
  if (e < b)
9862
- ~P ? E.value === A ? R = P : (R = P - 1, g = P) : R = I;
9862
+ ~O ? E.value === A ? R = O : (R = O - 1, g = O) : R = I;
9863
9863
  else {
9864
9864
  if (S.listStyle === Xe.CHECKBOX && e < L[0])
9865
9865
  return {
9866
- index: P,
9866
+ index: O,
9867
9867
  isDirectHit: !0,
9868
9868
  isCheckbox: !0
9869
9869
  };
@@ -9913,8 +9913,8 @@ class wd {
9913
9913
  const m = s[L];
9914
9914
  if (m.pageNo !== d || m.rowNo !== p)
9915
9915
  continue;
9916
- const { leftTop: P, rightTop: S } = m.coordinate;
9917
- if (e <= T[3] || e >= P[0] && e <= S[0] || s[L + 1]?.rowNo !== p)
9916
+ const { leftTop: O, rightTop: S } = m.coordinate;
9917
+ if (e <= T[3] || e >= O[0] && e <= S[0] || s[L + 1]?.rowNo !== p)
9918
9918
  return {
9919
9919
  index: m.index
9920
9920
  };
@@ -9943,9 +9943,9 @@ class wd {
9943
9943
  const { x: e, y: n } = t, i = t.pageNo ?? this.draw.getPageNo(), r = this.draw.getZone().getZone(), { scale: s } = this.options;
9944
9944
  for (let l = 0; l < this.floatPositionList.length; l++) {
9945
9945
  const { position: a, element: c, isTable: d, index: u, trIndex: R, tdIndex: g, tdValueIndex: f, zone: T, pageNo: I } = this.floatPositionList[l];
9946
- if (i === I && c.type === O.IMAGE && c.imgDisplay && t.imgDisplays.includes(c.imgDisplay) && (!T || T === r)) {
9947
- const p = c.imgFloatPosition, L = p.x * s, m = p.y * s, P = c.width * s, S = c.height * s;
9948
- if (e >= L && e <= L + P && n >= m && n <= m + S)
9946
+ if (i === I && c.type === P.IMAGE && c.imgDisplay && t.imgDisplays.includes(c.imgDisplay) && (!T || T === r)) {
9947
+ const p = c.imgFloatPosition, L = p.x * s, m = p.y * s, O = c.width * s, S = c.height * s;
9948
+ if (e >= L && e <= L + O && n >= m && n <= m + S)
9949
9949
  return d ? {
9950
9950
  index: u,
9951
9951
  isDirectHit: !0,
@@ -9979,12 +9979,12 @@ class wd {
9979
9979
  if (!~e.index)
9980
9980
  return null;
9981
9981
  if (e.isControl && this.draw.getMode() !== K.READONLY) {
9982
- const { index: I, isTable: p, trIndex: L, tdIndex: m, tdValueIndex: P } = e, S = this.draw.getControl(), { newIndex: E } = S.moveCursor({
9982
+ const { index: I, isTable: p, trIndex: L, tdIndex: m, tdValueIndex: O } = e, S = this.draw.getControl(), { newIndex: E } = S.moveCursor({
9983
9983
  index: I,
9984
9984
  isTable: p,
9985
9985
  trIndex: L,
9986
9986
  tdIndex: m,
9987
- tdValueIndex: P
9987
+ tdValueIndex: O
9988
9988
  });
9989
9989
  p ? e.tdValueIndex = E : e.index = E;
9990
9990
  }
@@ -10556,7 +10556,7 @@ class Zd {
10556
10556
  }
10557
10557
  if (!s)
10558
10558
  return;
10559
- const l = this.getSelection() || [s], a = s.type || O.TEXT, c = s.font || this.options.defaultFont, d = s.size || this.options.defaultSize, u = !~l.findIndex((M) => !M.bold), R = !~l.findIndex((M) => !M.italic), g = !~l.findIndex((M) => !M.underline && !M.control?.underline), f = !~l.findIndex((M) => !M.strikeout), T = s.color || null, I = s.highlight || null, p = s.rowFlex || null, L = s.vertical || null, m = s.rowMargin ?? this.options.defaultRowMargin, P = s.dashArray || [], S = s.level || null, E = s.listType || null, b = s.listStyle || null, y = g && s.textDecoration || null, W = !!this.draw.getPainterStyle(), V = this.historyManager.isCanUndo(), F = this.historyManager.isCanRedo(), Y = s.groupIds || null, x = s.extension ?? null, X = s.deletePerson ?? "", N = {
10559
+ const l = this.getSelection() || [s], a = s.type || P.TEXT, c = s.font || this.options.defaultFont, d = s.size || this.options.defaultSize, u = !~l.findIndex((M) => !M.bold), R = !~l.findIndex((M) => !M.italic), g = !~l.findIndex((M) => !M.underline && !M.control?.underline), f = !~l.findIndex((M) => !M.strikeout), T = s.color || null, I = s.highlight || null, p = s.rowFlex || null, L = s.vertical || null, m = s.rowMargin ?? this.options.defaultRowMargin, O = s.dashArray || [], S = s.level || null, E = s.listType || null, b = s.listStyle || null, y = g && s.textDecoration || null, W = !!this.draw.getPainterStyle(), V = this.historyManager.isCanUndo(), F = this.historyManager.isCanRedo(), Y = s.groupIds || null, x = s.extension ?? null, X = s.deletePerson ?? "", N = {
10560
10560
  type: a,
10561
10561
  undo: V,
10562
10562
  redo: F,
@@ -10573,7 +10573,7 @@ class Zd {
10573
10573
  rowFlex: p,
10574
10574
  vertical: L,
10575
10575
  rowMargin: m,
10576
- dashArray: P,
10576
+ dashArray: O,
10577
10577
  level: S,
10578
10578
  listType: E,
10579
10579
  listStyle: b,
@@ -10945,7 +10945,7 @@ class Hd {
10945
10945
  getMatchList(t, e) {
10946
10946
  const { isRegEnable: n = !1, isIgnoreCase: i = !0 } = this.searchOptions || {}, r = i ? t.toLocaleLowerCase() : t, s = [], l = [], a = e.length, c = [];
10947
10947
  for (let g = 0; g < a; g++)
10948
- e[g].type === O.TABLE && c.push(g);
10948
+ e[g].type === P.TABLE && c.push(g);
10949
10949
  let d = 0, u = 0;
10950
10950
  for (; u < a - 1; ) {
10951
10951
  const g = c.length ? c[d] : a, f = e.slice(u, g);
@@ -10967,14 +10967,14 @@ class Hd {
10967
10967
  let p = T.map((E) => !E.type || ye.includes(E.type) && E.controlComponent !== h.CHECKBOX && E.controlComponent !== h.RADIO && !E.hide && !E.control?.hide && !E.area?.hide ? E.value : A).filter(Boolean).join("");
10968
10968
  i && (p = p.toLocaleLowerCase());
10969
10969
  const L = [], m = n ? new RegExp(g) : g;
10970
- let { index: P, length: S } = ur(p, m);
10971
- for (; P !== -1 && S !== 0; ) {
10970
+ let { index: O, length: S } = ur(p, m);
10971
+ for (; O !== -1 && S !== 0; ) {
10972
10972
  L.push({
10973
- index: P,
10973
+ index: O,
10974
10974
  length: S
10975
10975
  });
10976
- const E = ur(p, m, P + S);
10977
- P = E.index, S = E.length;
10976
+ const E = ur(p, m, O + S);
10977
+ O = E.index, S = E.length;
10978
10978
  }
10979
10979
  for (let E = 0; E < L.length; E++) {
10980
10980
  const { index: b, length: y } = L[E], W = mt();
@@ -10996,14 +10996,14 @@ class Hd {
10996
10996
  for (let I = 0; I < T.trList.length; I++) {
10997
10997
  const p = T.trList[I];
10998
10998
  for (let L = 0; L < p.tdList.length; L++) {
10999
- const m = p.tdList[L], P = {
10999
+ const m = p.tdList[L], O = {
11000
11000
  tableId: T.id,
11001
11001
  tableIndex: f.index,
11002
11002
  trIndex: I,
11003
11003
  tdIndex: L,
11004
11004
  tdId: m.id
11005
11005
  };
11006
- R(r, f.type, m.value, P);
11006
+ R(r, f.type, m.value, O);
11007
11007
  }
11008
11008
  }
11009
11009
  } else
@@ -11030,8 +11030,8 @@ class Hd {
11030
11030
  const c = this.searchMatchList[a];
11031
11031
  let d = null;
11032
11032
  if (c.type === tn.TABLE) {
11033
- const { tableIndex: P, trIndex: S, tdIndex: E, index: b } = c;
11034
- d = l[P]?.trList[S].tdList[E]?.positionList[b];
11033
+ const { tableIndex: O, trIndex: S, tdIndex: E, index: b } = c;
11034
+ d = l[O]?.trList[S].tdList[E]?.positionList[b];
11035
11035
  } else
11036
11036
  d = s[c.index];
11037
11037
  if (!d)
@@ -11041,8 +11041,8 @@ class Hd {
11041
11041
  continue;
11042
11042
  if (this.getSearchNavigateIndexList().includes(a)) {
11043
11043
  t.fillStyle = r;
11044
- const P = this.searchMatchList[a - 1];
11045
- (!P || P.groupId !== c.groupId) && this.searchNavigateScrollIntoView(d);
11044
+ const O = this.searchMatchList[a - 1];
11045
+ (!O || O.groupId !== c.groupId) && this.searchNavigateScrollIntoView(d);
11046
11046
  } else
11047
11047
  t.fillStyle = i;
11048
11048
  const I = u[0], p = u[1], L = g[0] - u[0], m = R[1] - u[1];
@@ -11070,9 +11070,9 @@ class Hd {
11070
11070
  for (let T = 0; T < i.length; T++) {
11071
11071
  const I = i[T];
11072
11072
  if (I.type === tn.TABLE) {
11073
- const { tableIndex: p, trIndex: L, tdIndex: m, index: P, tdId: S } = I;
11073
+ const { tableIndex: p, trIndex: L, tdIndex: m, index: O, tdId: S } = I;
11074
11074
  d && S !== d && (a = 0), d = S;
11075
- const E = p + l, b = R[E].trList[L].tdList[m].value, y = P + a, W = b[y];
11075
+ const E = p + l, b = R[E].trList[L].tdList[m].value, y = O + a, W = b[y];
11076
11076
  if (!s && (W?.control?.deletable === !1 || W?.title?.deletable === !1))
11077
11077
  continue;
11078
11078
  if (t === "") {
@@ -11095,7 +11095,7 @@ class Hd {
11095
11095
  }
11096
11096
  } else {
11097
11097
  const p = I.index + l, L = R[p];
11098
- if (!s && (L?.control?.deletable === !1 || L?.title?.deletable === !1) || L.type === O.CONTROL && L.controlComponent !== h.VALUE)
11098
+ if (!s && (L?.control?.deletable === !1 || L?.title?.deletable === !1) || L.type === P.CONTROL && L.controlComponent !== h.VALUE)
11099
11099
  continue;
11100
11100
  if (t === "") {
11101
11101
  this.draw.spliceElementList(R, p, 1), l--, ~u || (u = T);
@@ -11106,11 +11106,11 @@ class Hd {
11106
11106
  continue;
11107
11107
  }
11108
11108
  for (let m = 0; m < t.length; m++) {
11109
- const P = t[m];
11110
- m === 0 ? L.value = P : (this.draw.spliceElementList(R, p + m, 0, [
11109
+ const O = t[m];
11110
+ m === 0 ? L.value = O : (this.draw.spliceElementList(R, p + m, 0, [
11111
11111
  {
11112
11112
  ...L,
11113
- value: P
11113
+ value: O
11114
11114
  }
11115
11115
  ]), l++);
11116
11116
  }
@@ -11246,7 +11246,7 @@ class Gd {
11246
11246
  let r = 0, s = null, l = n;
11247
11247
  for (; l < e.length; ) {
11248
11248
  const a = e[l];
11249
- if (a.type && a.type !== O.TEXT || !i.test(a.value)) {
11249
+ if (a.type && a.type !== P.TEXT || !i.test(a.value)) {
11250
11250
  s = a;
11251
11251
  break;
11252
11252
  }
@@ -11262,7 +11262,7 @@ class Gd {
11262
11262
  let r = 0, s = null, l = n;
11263
11263
  for (; l < e.length; ) {
11264
11264
  const a = e[l];
11265
- if (a.type && a.type !== O.TEXT || !i.test(a.value)) {
11265
+ if (a.type && a.type !== P.TEXT || !i.test(a.value)) {
11266
11266
  s = a;
11267
11267
  break;
11268
11268
  }
@@ -11337,8 +11337,8 @@ class ao {
11337
11337
  const T = this.draw.getWidth(), I = this.draw.getHeight(), p = this.draw.getPageNumberBottom(), L = I - p;
11338
11338
  t.save(), t.fillStyle = s, t.font = `${i * n}px ${r}`;
11339
11339
  let m = 0;
11340
- const P = this.draw.getMargins(), { width: S } = t.measureText(R);
11341
- l === Ht.CENTER ? m = (T - S) / 2 : l === Ht.RIGHT ? m = T - S - P[1] : m = P[3], t.fillText(R, m, L), t.restore();
11340
+ const O = this.draw.getMargins(), { width: S } = t.measureText(R);
11341
+ l === Ht.CENTER ? m = (T - S) / 2 : l === Ht.RIGHT ? m = T - S - O[1] : m = O[3], t.fillText(R, m, L), t.restore();
11342
11342
  }
11343
11343
  }
11344
11344
  class kd {
@@ -11476,8 +11476,8 @@ class Bd {
11476
11476
  let g = R[a].tdList[s], f = R[c].tdList[l];
11477
11477
  (g.x > f.x || g.y > f.y) && ([g, f] = [f, g]);
11478
11478
  const T = g.colIndex, I = f.colIndex + (f.colspan - 1), p = g.rowIndex, L = f.rowIndex + (f.rowspan - 1), m = [];
11479
- for (let P = 0; P < R.length; P++) {
11480
- const S = R[P], E = [];
11479
+ for (let O = 0; O < R.length; O++) {
11480
+ const S = R[O], E = [];
11481
11481
  for (let b = 0; b < S.tdList.length; b++) {
11482
11482
  const y = S.tdList[b], W = y.colIndex, V = y.rowIndex;
11483
11483
  W >= T && W <= I && V >= p && V <= L && E.push(y);
@@ -11544,9 +11544,9 @@ class Bd {
11544
11544
  skipTopBorderRanges: T
11545
11545
  });
11546
11546
  for (let m = 0; m < s.length; m++) {
11547
- const P = s[m];
11548
- for (let S = 0; S < P.tdList.length; S++) {
11549
- const E = P.tdList[S];
11547
+ const O = s[m];
11548
+ for (let S = 0; S < O.tdList.length; S++) {
11549
+ const E = O.tdList[S];
11550
11550
  if (E.slashTypes?.length && this._drawSlash(t, E, n, i), !E.borderTypes?.length && (I || p))
11551
11551
  continue;
11552
11552
  const b = E.width * u, y = E.height * u, W = Math.round(E.x * u + n + b), V = Math.round(E.y * u + i), F = !!E.linkTdPrevId, Y = !!E.linkTdNextId;
@@ -11663,9 +11663,9 @@ class Bd {
11663
11663
  for (let p = 0; p < r; p++) {
11664
11664
  const L = n[p].tdList;
11665
11665
  for (let m = 0; m < L.length; m++) {
11666
- const P = L[m];
11667
- if (d >= P.colIndex && d < P.colIndex + P.colspan) {
11668
- I += P.height;
11666
+ const O = L[m];
11667
+ if (d >= O.colIndex && d < O.colIndex + O.colspan) {
11668
+ I += O.height;
11669
11669
  break;
11670
11670
  }
11671
11671
  }
@@ -11676,20 +11676,20 @@ class Bd {
11676
11676
  }
11677
11677
  drawRange(t, e, n, i) {
11678
11678
  const { scale: r, rangeAlpha: s, rangeColor: l } = this.options, { type: a, trList: c } = e;
11679
- if (!c || a !== O.TABLE)
11679
+ if (!c || a !== P.TABLE)
11680
11680
  return;
11681
11681
  const { isCrossRowCol: d, startTdIndex: u, endTdIndex: R, startTrIndex: g, endTrIndex: f } = this.range.getRange();
11682
11682
  if (!d)
11683
11683
  return;
11684
11684
  let T = c[g].tdList[u], I = c[f].tdList[R];
11685
11685
  (T.x > I.x || T.y > I.y) && ([T, I] = [I, T]);
11686
- const p = T.colIndex, L = I.colIndex + (I.colspan - 1), m = T.rowIndex, P = I.rowIndex + (I.rowspan - 1);
11686
+ const p = T.colIndex, L = I.colIndex + (I.colspan - 1), m = T.rowIndex, O = I.rowIndex + (I.rowspan - 1);
11687
11687
  t.save();
11688
11688
  for (let S = 0; S < c.length; S++) {
11689
11689
  const E = c[S];
11690
11690
  for (let b = 0; b < E.tdList.length; b++) {
11691
11691
  const y = E.tdList[b], W = y.colIndex, V = y.rowIndex;
11692
- if (W >= p && W <= L && V >= m && V <= P) {
11692
+ if (W >= p && W <= L && V >= m && V <= O) {
11693
11693
  const F = y.x * r, Y = y.y * r, x = y.width * r, X = y.height * r;
11694
11694
  t.globalAlpha = s, t.fillStyle = l, t.fillRect(F + n, Y + i, x, X);
11695
11695
  }
@@ -11728,14 +11728,14 @@ class Bd {
11728
11728
  if (p) {
11729
11729
  const L = e ? e(p) : p.rowList, m = L.reduce((S, E) => S + E.height, 0);
11730
11730
  p.rowList = L;
11731
- const P = m / n + l;
11732
- p.mainHeight = P, p.rowspan > 1 ? (d[p.colIndex] = p.id, c[p.id] = {
11731
+ const O = m / n + l;
11732
+ p.mainHeight = O, p.rowspan > 1 ? (d[p.colIndex] = p.id, c[p.id] = {
11733
11733
  td: p,
11734
11734
  rowSpan: [u, u + p.rowspan - 1],
11735
11735
  preHeight: 0,
11736
11736
  preMinHeight: 0,
11737
- extraHeight: P
11738
- }, f.push(P)) : p.height < P ? (p.height = P, p.realHeight = P, g.push(P)) : g.push(p.height);
11737
+ extraHeight: O
11738
+ }, f.push(O)) : p.height < O ? (p.height = O, p.realHeight = O, g.push(O)) : g.push(p.height);
11739
11739
  } else {
11740
11740
  const L = c[d[I]];
11741
11741
  L?.rowSpan[1] == u && g.push(L.extraHeight);
@@ -11808,7 +11808,7 @@ class $d {
11808
11808
  const r = this.draw.getOriginalElementList(), s = this.position.getOriginalPositionList(), l = r[e];
11809
11809
  if (l.tableToolDisabled && !this.draw.isDesignMode())
11810
11810
  return;
11811
- const { scale: a, table: { overflow: c } } = this.options, d = s[e], { colgroup: u, trList: R } = l, { coordinate: { leftTop: g } } = d, f = this.draw.getHeight(), T = this.draw.getPageGap(), I = this.draw.getPageNo() * (f + T), p = g[0], L = g[1] + I, m = l.trList[n].tdList[i], P = m.rowIndex, S = m.colIndex, E = l.height * a, b = l.width * a, y = document.createElement("div");
11811
+ const { scale: a, table: { overflow: c } } = this.options, d = s[e], { colgroup: u, trList: R } = l, { coordinate: { leftTop: g } } = d, f = this.draw.getHeight(), T = this.draw.getPageGap(), I = this.draw.getPageNo() * (f + T), p = g[0], L = g[1] + I, m = l.trList[n].tdList[i], O = m.rowIndex, S = m.colIndex, E = l.height * a, b = l.width * a, y = document.createElement("div");
11812
11812
  y.classList.add(`${nt}-table-tool__select`), y.style.height = `${E * a}`, y.style.left = `${p}px`, y.style.top = `${L}px`, y.style.transform = `translate(-${this.TABLE_SELECT_OFFSET * a}px, ${-this.TABLE_SELECT_OFFSET * a}px)`, y.onclick = () => {
11813
11813
  this.draw.getTableOperate().tableSelectAll();
11814
11814
  }, this.container.append(y), this.toolTableSelectBtn = y;
@@ -11816,7 +11816,7 @@ class $d {
11816
11816
  V.classList.add(`${nt}-table-tool__row`), V.style.transform = `translateX(-${this.ROW_COL_OFFSET * a}px)`;
11817
11817
  for (let M = 0; M < W.length; M++) {
11818
11818
  const U = W[M] * a, C = document.createElement("div");
11819
- C.classList.add(`${nt}-table-tool__row__item`), M === P && C.classList.add("active"), C.onclick = () => {
11819
+ C.classList.add(`${nt}-table-tool__row__item`), M === O && C.classList.add("active"), C.onclick = () => {
11820
11820
  const v = this.draw.getTableParticle().getTdListByRowIndex(R, M), H = v[0], Z = v[v.length - 1];
11821
11821
  this.position.setPositionContext({
11822
11822
  index: e,
@@ -11938,7 +11938,7 @@ class $d {
11938
11938
  _mousedown(t) {
11939
11939
  const { evt: e, index: n, order: i, element: r, isLeftStartBorder: s } = t;
11940
11940
  this.canvas = this.draw.getPage();
11941
- const { scale: l, table: { overflow: a } } = this.options, c = this.draw.getWidth(), d = this.draw.getHeight(), u = this.draw.getPageGap(), R = this.draw.getPageNo() * (d + u), g = this.position.getPositionContext(), I = (this.position.getOriginalPositionList()[g.index]?.coordinate?.leftTop?.[0] || 0) * l, p = this.draw.getMargins(), L = p[0], m = p[1], P = L, S = c - m;
11941
+ const { scale: l, table: { overflow: a } } = this.options, c = this.draw.getWidth(), d = this.draw.getHeight(), u = this.draw.getPageGap(), R = this.draw.getPageNo() * (d + u), g = this.position.getPositionContext(), I = (this.position.getOriginalPositionList()[g.index]?.coordinate?.leftTop?.[0] || 0) * l, p = this.draw.getMargins(), L = p[0], m = p[1], O = L, S = c - m;
11942
11942
  this.mousedownX = e.x, this.mousedownY = e.y;
11943
11943
  const E = e.target, b = this.canvas.getBoundingClientRect(), y = window.getComputedStyle(E).cursor;
11944
11944
  document.body.style.cursor = y, this.canvas.style.cursor = y;
@@ -11961,7 +11961,7 @@ class $d {
11961
11961
  if (a && s) {
11962
11962
  M[n].width - Y / l <= this.MIN_TD_WIDTH && (Y = (M[n].width - this.MIN_TD_WIDTH) * l);
11963
11963
  const U = I + (r.translateX || 0) * l;
11964
- U + Y < P && (Y = P - U), M[n].width -= Y / l, r.width -= Y / l, r.translateX = (r.translateX || 0) + Y / l, N = !0;
11964
+ U + Y < O && (Y = O - U), M[n].width -= Y / l, r.width -= Y / l, r.translateX = (r.translateX || 0) + Y / l, N = !0;
11965
11965
  } else {
11966
11966
  const U = M[n].width;
11967
11967
  Y < 0 && U * l + Y < this.MIN_TD_WIDTH * l && (Y = this.MIN_TD_WIDTH * l - U * l);
@@ -12162,8 +12162,8 @@ class qd {
12162
12162
  const { scale: s } = this.options, l = e.type === "customMacro", a = e.type === "reusableItem", c = e.type === "subTemplate";
12163
12163
  let d, u;
12164
12164
  c ? (d = "#722ed1", u = "#f9f0ff") : a ? (d = "#52c41a", u = "#f6ffed") : l ? (d = "#fa8c16", u = "#fff7e6") : (d = "#1677ff", u = "#e6f4ff"), t.save(), t.font = e.style;
12165
- const R = t.measureText(r), g = R.actualBoundingBoxAscent + R.actualBoundingBoxDescent, f = 8 * s, T = 4 * s, I = 4 * s, p = R.width + f * 2, L = g + T * 2, m = e.metrics, P = n, S = i - m.boundingBoxAscent + (m.boundingBoxAscent + m.boundingBoxDescent - L) / 2;
12166
- t.fillStyle = u, this._drawRoundedRect(t, P, S, p, L, I), t.fill(), t.fillStyle = d, t.textBaseline = "middle", t.fillText(r, n + f, S + L / 2), t.restore();
12165
+ const R = t.measureText(r), g = R.actualBoundingBoxAscent + R.actualBoundingBoxDescent, f = 8 * s, T = 4 * s, I = 4 * s, p = R.width + f * 2, L = g + T * 2, m = e.metrics, O = n, S = i - m.boundingBoxAscent + (m.boundingBoxAscent + m.boundingBoxDescent - L) / 2;
12166
+ t.fillStyle = u, this._drawRoundedRect(t, O, S, p, L, I), t.fill(), t.fillStyle = d, t.textBaseline = "middle", t.fillText(r, n + f, S + L / 2), t.restore();
12167
12167
  }
12168
12168
  /**
12169
12169
  * 表单模式下渲染文本控件样式(type=text)
@@ -12181,11 +12181,11 @@ class qd {
12181
12181
  if (t.fillStyle = d, t.fillText("]", p, i), e.type === "reusableItem") {
12182
12182
  const L = t.measureText("[").width + T + t.measureText("]").width;
12183
12183
  if (t.lineWidth = s, this.draw.getMode() === K.PRINT ? t.strokeStyle = "transparent" : t.strokeStyle = a || "red", e.strikeout) {
12184
- const m = i - 3 * s, P = i + 3.5 * s;
12185
- t.beginPath(), t.moveTo(n, m), t.lineTo(n + L, m), t.stroke(), t.beginPath(), t.moveTo(n, P), t.lineTo(n + L, P), t.stroke();
12184
+ const m = i - 3 * s, O = i + 3.5 * s;
12185
+ t.beginPath(), t.moveTo(n, m), t.lineTo(n + L, m), t.stroke(), t.beginPath(), t.moveTo(n, O), t.lineTo(n + L, O), t.stroke();
12186
12186
  } else if (e.underline && e.textDecoration?.style === "double") {
12187
- const m = Math.floor(i + 2 * s) + 0.5, P = 3 * s;
12188
- t.beginPath(), t.moveTo(n, m), t.lineTo(n + L, m), t.stroke(), t.beginPath(), t.moveTo(n, m + P), t.lineTo(n + L, m + P), t.stroke();
12187
+ const m = Math.floor(i + 2 * s) + 0.5, O = 3 * s;
12188
+ t.beginPath(), t.moveTo(n, m), t.lineTo(n + L, m), t.stroke(), t.beginPath(), t.moveTo(n, m + O), t.lineTo(n + L, m + O), t.stroke();
12189
12189
  }
12190
12190
  }
12191
12191
  t.restore();
@@ -12438,8 +12438,8 @@ class su {
12438
12438
  I.test(f) && (f = ao.formatNumberPlaceholder(f, this.draw.getPageCount(), I, d));
12439
12439
  const p = t.measureText(f);
12440
12440
  if (a) {
12441
- const L = this.draw.getPagePixelRatio(), m = document.createElement("canvas"), P = m.getContext("2d"), S = p.width, E = p.actualBoundingBoxAscent + p.actualBoundingBoxDescent, b = Math.sqrt(Math.pow(S, 2) + Math.pow(E, 2)), y = b + 2 * c[0] * u, W = b + 2 * c[1] * u;
12442
- m.width = y, m.height = W, m.style.width = `${y * L}px`, m.style.height = `${W * L}px`, P.translate(y / 2, W / 2), P.rotate(-45 * Math.PI / 180), P.translate(-y / 2, -W / 2), P.font = `${s * u}px ${r}`, P.fillStyle = l, P.fillText(f, (y - S) / 2, (W - E) / 2 + p.actualBoundingBoxAscent);
12441
+ const L = this.draw.getPagePixelRatio(), m = document.createElement("canvas"), O = m.getContext("2d"), S = p.width, E = p.actualBoundingBoxAscent + p.actualBoundingBoxDescent, b = Math.sqrt(Math.pow(S, 2) + Math.pow(E, 2)), y = b + 2 * c[0] * u, W = b + 2 * c[1] * u;
12442
+ m.width = y, m.height = W, m.style.width = `${y * L}px`, m.style.height = `${W * L}px`, O.translate(y / 2, W / 2), O.rotate(-45 * Math.PI / 180), O.translate(-y / 2, -W / 2), O.font = `${s * u}px ${r}`, O.fillStyle = l, O.fillText(f, (y - S) / 2, (W - E) / 2 + p.actualBoundingBoxAscent);
12443
12443
  const V = t.createPattern(m, "repeat");
12444
12444
  V && (t.fillStyle = V, t.fillRect(0, 0, R, g));
12445
12445
  } else {
@@ -12532,7 +12532,7 @@ class ru {
12532
12532
  let r = 0;
12533
12533
  for (; r < n.length; ) {
12534
12534
  const s = n[r];
12535
- if (r++, s.type === O.TABLE) {
12535
+ if (r++, s.type === P.TABLE) {
12536
12536
  const f = s.trList;
12537
12537
  for (let T = 0; T < f.length; T++) {
12538
12538
  const I = f[T];
@@ -12583,8 +12583,8 @@ class ru {
12583
12583
  const a = this.highlightMatchResult[l];
12584
12584
  let c = null;
12585
12585
  if (a.tableId) {
12586
- const { tableIndex: L, trIndex: m, tdIndex: P, index: S } = a;
12587
- c = s[L]?.trList[m].tdList[P]?.positionList[S];
12586
+ const { tableIndex: L, trIndex: m, tdIndex: O, index: S } = a;
12587
+ c = s[L]?.trList[m].tdList[O]?.positionList[S];
12588
12588
  } else
12589
12589
  c = r[a.index];
12590
12590
  if (!c)
@@ -12666,7 +12666,7 @@ class cu {
12666
12666
  const T = R.elementList[f], I = R.startIndex + f, p = e[I];
12667
12667
  if (!p || r === St.MAIN && p.pageNo !== i)
12668
12668
  continue;
12669
- const L = this._getTargetIdsForElement(T.controlId, l, s);
12669
+ const L = this._getTargetIdsForElement(this._getQualityTargetId(T), l, s);
12670
12670
  for (let M = 0; M < a.length; M++) {
12671
12671
  const U = a[M].get(I);
12672
12672
  U && U.forEach((C) => {
@@ -12675,7 +12675,7 @@ class cu {
12675
12675
  }
12676
12676
  if (!L.length)
12677
12677
  continue;
12678
- const m = p.coordinate.leftTop, P = p.coordinate.rightTop, S = p.coordinate.leftBottom, E = p.coordinate.rightBottom, b = Math.min(m[0], S[0]), y = Math.max(P[0], E[0]), W = Math.min(m[1], P[1]), V = Math.max(S[1], E[1]), F = p.metrics.boundingBoxAscent + p.metrics.boundingBoxDescent, Y = W + p.ascent - p.metrics.boundingBoxAscent, x = F > 0 ? Y : W, X = F > 0 ? Y + F : V, N = this._isButtonElement(T);
12678
+ const m = p.coordinate.leftTop, O = p.coordinate.rightTop, S = p.coordinate.leftBottom, E = p.coordinate.rightBottom, b = Math.min(m[0], S[0]), y = Math.max(O[0], E[0]), W = Math.min(m[1], O[1]), V = Math.max(S[1], E[1]), F = p.metrics.boundingBoxAscent + p.metrics.boundingBoxDescent, Y = W + p.ascent - p.metrics.boundingBoxAscent, x = F > 0 ? Y : W, X = F > 0 ? Y + F : V, N = this._isButtonElement(T);
12679
12679
  for (let M = 0; M < L.length; M++) {
12680
12680
  const { markIndex: U, controlId: C } = L[M], w = `${U}:${C}:${R.startIndex}`, v = g.get(w), H = { x: b, y: x, right: y, bottom: X };
12681
12681
  if (v) {
@@ -12731,33 +12731,33 @@ class cu {
12731
12731
  _getParentMap(t) {
12732
12732
  const e = /* @__PURE__ */ new Map();
12733
12733
  for (let n = 0; n < t.length; n++) {
12734
- const i = t[n];
12735
- i.controlId && i.originControlId && e.set(i.controlId, i.originControlId);
12734
+ const i = t[n], r = this._getQualityTargetId(i);
12735
+ r && i.originControlId && e.set(r, i.originControlId);
12736
12736
  }
12737
12737
  return e;
12738
12738
  }
12739
12739
  _getTitleTargets(t, e) {
12740
12740
  const n = /* @__PURE__ */ new Map();
12741
12741
  return e.forEach((i) => {
12742
- const r = t.findIndex((u) => u.controlId === i);
12742
+ const r = t.findIndex((R) => this._getQualityTargetId(R) === i);
12743
12743
  if (r < 0)
12744
12744
  return;
12745
- const s = t[r].control, l = this._getTitleTextBefore(t, r);
12746
- if (!l)
12745
+ const s = t[r], l = s.control, a = this._getTitleTextBefore(t, r);
12746
+ if (!a)
12747
12747
  return;
12748
- const a = [s?.label, s?.placeholder].filter(Boolean).map((u) => this._normalizeTitleText(u)), c = this._normalizeTitleText(l);
12749
- if (!a.some((u) => u === c || u.includes(c) || c.includes(u)))
12748
+ const c = [l?.label, l?.placeholder].concat(this._isMacroElement(s) ? [s.label] : []).filter(Boolean).map((R) => this._normalizeTitleText(R)), d = this._normalizeTitleText(a);
12749
+ if (!c.some((R) => R === d || R.includes(d) || d.includes(R)))
12750
12750
  return;
12751
- let d = r - 1;
12752
- for (; d >= 0 && this._isTitleValueElement(t[d]); ) {
12753
- let u = n.get(d);
12754
- u || (u = /* @__PURE__ */ new Set(), n.set(d, u)), u.add(i), d--;
12751
+ let u = r - 1;
12752
+ for (; u >= 0 && this._isTitleValueElement(t[u]); ) {
12753
+ let R = n.get(u);
12754
+ R || (R = /* @__PURE__ */ new Set(), n.set(u, R)), R.add(i), u--;
12755
12755
  }
12756
12756
  }), n;
12757
12757
  }
12758
12758
  _getTitleTextBefore(t, e) {
12759
12759
  const n = t[e - 1];
12760
- if (n?.type === O.TITLE)
12760
+ if (n?.type === P.TITLE)
12761
12761
  return n.valueList?.map((s) => s.value).join("") || "";
12762
12762
  if (!this._isTitleValueElement(n))
12763
12763
  return "";
@@ -12778,11 +12778,27 @@ class cu {
12778
12778
  if (!i)
12779
12779
  return n;
12780
12780
  for (let r = 0; r < t.length; r++) {
12781
- const s = t[r];
12782
- !s.controlId || !s.control || (i === "id" && s.controlId === e.id || i === "conceptId" && s.control.conceptId === e.conceptId || i === "code" && s.control.code === e.code) && n.add(s.controlId);
12781
+ const s = t[r], l = this._getQualityTargetId(s);
12782
+ if (!l)
12783
+ continue;
12784
+ const a = s.control?.conceptId || s.conceptId, c = s.control?.code || s.macroConfig?.code || s.dictCode;
12785
+ (i === "id" && l === e.id || i === "conceptId" && a === e.conceptId || i === "code" && c === e.code) && n.add(l);
12783
12786
  }
12784
12787
  return n;
12785
12788
  }
12789
+ _getQualityTargetId(t) {
12790
+ if (t.controlId)
12791
+ return t.controlId;
12792
+ if (this._isMacroElement(t))
12793
+ return t.id;
12794
+ }
12795
+ _isMacroElement(t) {
12796
+ return [
12797
+ P.MACRO,
12798
+ P.CUSTOM_MACRO,
12799
+ P.REUSABLE_ITEM
12800
+ ].includes(t.type);
12801
+ }
12786
12802
  _getTargetIdsForElement(t, e, n) {
12787
12803
  if (!t)
12788
12804
  return [];
@@ -12814,7 +12830,7 @@ class cu {
12814
12830
  return t.required === !0 || ["required", "required-empty", "required_empty"].includes(t.type?.toLowerCase() || "");
12815
12831
  }
12816
12832
  _isButtonElement(t) {
12817
- return t.type === O.BUTTON || t.control?.type === D.BUTTON && !t.control.buttonText;
12833
+ return t.type === P.BUTTON || t.control?.type === D.BUTTON && !t.control.buttonText;
12818
12834
  }
12819
12835
  }
12820
12836
  class du {
@@ -12995,11 +13011,11 @@ class go {
12995
13011
  const R = this.getText(l);
12996
13012
  if (!R) {
12997
13013
  if (a) {
12998
- const P = this.clearSelect(e, {
13014
+ const O = this.clearSelect(e, {
12999
13015
  isIgnoreDeletedRule: n.isIgnoreDeletedRule
13000
13016
  });
13001
- ~P && (this.control.repaintControl({
13002
- curIndex: P
13017
+ ~O && (this.control.repaintControl({
13018
+ curIndex: O
13003
13019
  }), this.control.emitControlContentChange({
13004
13020
  controlValue: []
13005
13021
  }));
@@ -13014,17 +13030,17 @@ class go {
13014
13030
  return;
13015
13031
  a || this.control.removePlaceholder(T, e);
13016
13032
  const I = We(i[T], Ae), p = T + 1, L = Qt(R), m = this.control.getDraw();
13017
- for (let P = 0; P < L.length; P++) {
13033
+ for (let O = 0; O < L.length; O++) {
13018
13034
  const S = {
13019
13035
  ...f,
13020
13036
  ...I,
13021
- type: O.TEXT,
13022
- value: L[P],
13037
+ type: P.TEXT,
13038
+ value: L[O],
13023
13039
  controlComponent: h.VALUE
13024
13040
  };
13025
13041
  (S.color === this.options.control.bracketColor || S.color === this.options.control.placeholderColor) && (S.color = this.options.defaultColor), ge(i, [S], T, {
13026
13042
  editorOptions: this.options
13027
- }), m.spliceElementList(i, p + P, 0, [S]);
13043
+ }), m.spliceElementList(i, p + O, 0, [S]);
13028
13044
  }
13029
13045
  if (this.control.setControlProperties({
13030
13046
  code: t
@@ -13032,9 +13048,9 @@ class go {
13032
13048
  elementList: i,
13033
13049
  range: { startIndex: T, endIndex: T }
13034
13050
  }), !e.range) {
13035
- const P = p + L.length - 1;
13051
+ const O = p + L.length - 1;
13036
13052
  this.control.repaintControl({
13037
- curIndex: P
13053
+ curIndex: O
13038
13054
  }), this.control.emitControlContentChange({
13039
13055
  context: e
13040
13056
  }), d || this.destroy();
@@ -15704,7 +15720,7 @@ class hs {
15704
15720
  break;
15705
15721
  f.controlComponent === h.VALUE && l.push(f), R++;
15706
15722
  }
15707
- return l.filter((f) => f.type !== O.SPLIT_TAG);
15723
+ return l.filter((f) => f.type !== P.SPLIT_TAG);
15708
15724
  }
15709
15725
  removeNextControlElement(t, e) {
15710
15726
  const n = this.control.getDraw();
@@ -15739,14 +15755,14 @@ class hs {
15739
15755
  "controlId",
15740
15756
  "originControlId",
15741
15757
  ...Me
15742
- ]) : We(L, ["type"]), P = f || c || g, S = (V) => {
15758
+ ]) : We(L, ["type"]), O = f || c || g, S = (V) => {
15743
15759
  Me.forEach((F) => {
15744
15760
  delete V[F];
15745
15761
  const Y = R?.[F];
15746
15762
  Y !== void 0 && (V[F] = Y);
15747
15763
  }), delete V.underline, delete V.textDecoration, R?.type === D.TEXT && V.color?.toLowerCase() === "#87d068" ? V.color = this.options.defaultColor : V.color || (V.color = this.options.defaultColor);
15748
15764
  };
15749
- P && S(m), m.controlId = d, R && (m.control = R), u ? m.originControlId = u : delete m.originControlId;
15765
+ O && S(m), m.controlId = d, R && (m.control = R), u ? m.originControlId = u : delete m.originControlId;
15750
15766
  const E = this.options.mode === K.FORM && this.options.modeRule.form.inputTraceEnabled, b = i.startIndex + 1, y = [], W = (V) => {
15751
15767
  const F = y.length ? y : r, Y = y.length ? y.length - 1 : c ? i.startIndex + 1 : i.startIndex;
15752
15768
  ge(F, [V], Y, {
@@ -15755,11 +15771,11 @@ class hs {
15755
15771
  };
15756
15772
  for (let V = 0; V < t.length; V++) {
15757
15773
  const F = t[V];
15758
- if (F.type === O.CONTROL && F.control) {
15774
+ if (F.type === P.CONTROL && F.control) {
15759
15775
  const Y = F, x = Y.controlId || mt(), X = Y.control?.value || [], N = Y.control?.type === D.TEXTFIELD, U = {
15760
15776
  ...We(m, ["underline", "textDecoration"]),
15761
15777
  controlId: x,
15762
- type: O.CONTROL,
15778
+ type: P.CONTROL,
15763
15779
  control: Y.control,
15764
15780
  originControlId: d
15765
15781
  }, C = N ? h.PRETEXTFIX : h.PREFIX, w = N ? h.POSTTEXTFIX : h.POSTFIX, v = N ? Y.control?.preTextFix || this.options.control.preTextFix : Y.control?.prefix || this.options.control.prefix;
@@ -15812,7 +15828,7 @@ class hs {
15812
15828
  ...x,
15813
15829
  controlComponent: h.VALUE
15814
15830
  };
15815
- P && S(X), (X.color === this.options.control.bracketColor || X.color === this.options.control.placeholderColor || X.color === this.options.control.textFixColor) && (X.color = this.options.defaultColor), X.strikeout && delete X.strikeout, E && (X.textDecoration = { style: xn.DOUBLE }, X.underline = !0), W(X);
15831
+ O && S(X), (X.color === this.options.control.bracketColor || X.color === this.options.control.placeholderColor || X.color === this.options.control.textFixColor) && (X.color = this.options.defaultColor), X.strikeout && delete X.strikeout, E && (X.textDecoration = { style: xn.DOUBLE }, X.underline = !0), W(X);
15816
15832
  }
15817
15833
  }
15818
15834
  return y.length && p.spliceElementList(r, b, 0, y), i.startIndex + y.length;
@@ -15919,7 +15935,7 @@ class hs {
15919
15935
  break;
15920
15936
  }
15921
15937
  return M;
15922
- }, P = f && T && (s.controlComponent === h.PREFIX || s.controlComponent === h.PRE_TEXT || s.controlComponent === h.PRETEXTFIX || s.controlComponent === h.PRETEXTFIX_TEXT || s.controlComponent === h.POSTFIX || s.controlComponent === h.POST_TEXT || s.controlComponent === h.POSTTEXTFIX || s.controlComponent === h.POSTTEXTFIX_TEXT || s.controlComponent === h.PLACEHOLDER || s.controlComponent === h.TEXTFIXLABEL), S = e[r + 1], E = !!S?.originControlId && !!S?.controlId && S.originControlId !== S.controlId && (S.controlComponent === h.PREFIX || S.controlComponent === h.PRE_TEXT || S.controlComponent === h.PRETEXTFIX || S.controlComponent === h.PRETEXTFIX_TEXT || S.controlComponent === h.PLACEHOLDER || S.controlComponent === h.TEXTFIXLABEL), b = !!S?.originControlId && !!S?.controlId && S.originControlId !== S.controlId && (S.controlComponent === h.PREFIX || S.controlComponent === h.PRE_TEXT || S.controlComponent === h.PRETEXTFIX || S.controlComponent === h.PRETEXTFIX_TEXT || S.controlComponent === h.POSTFIX || S.controlComponent === h.POST_TEXT || S.controlComponent === h.POSTTEXTFIX || S.controlComponent === h.POSTTEXTFIX_TEXT || S.controlComponent === h.PLACEHOLDER || S.controlComponent === h.TEXTFIXLABEL), y = (M) => this.options.mode === K.FORM ? i : this.control.removeControl(M), W = s.controlComponent === h.VALUE && !s.originControlId && !!S?.originControlId && !!d && R(S.originControlId) === d, V = (M) => !!M && M.controlId === s.controlId && (M.originControlId || null) === (s.originControlId || null), F = (M) => M?.controlComponent === h.POSTFIX || M?.controlComponent === h.POST_TEXT || M?.controlComponent === h.POSTTEXTFIX || M?.controlComponent === h.POSTTEXTFIX_TEXT, Y = () => {
15938
+ }, O = f && T && (s.controlComponent === h.PREFIX || s.controlComponent === h.PRE_TEXT || s.controlComponent === h.PRETEXTFIX || s.controlComponent === h.PRETEXTFIX_TEXT || s.controlComponent === h.POSTFIX || s.controlComponent === h.POST_TEXT || s.controlComponent === h.POSTTEXTFIX || s.controlComponent === h.POSTTEXTFIX_TEXT || s.controlComponent === h.PLACEHOLDER || s.controlComponent === h.TEXTFIXLABEL), S = e[r + 1], E = !!S?.originControlId && !!S?.controlId && S.originControlId !== S.controlId && (S.controlComponent === h.PREFIX || S.controlComponent === h.PRE_TEXT || S.controlComponent === h.PRETEXTFIX || S.controlComponent === h.PRETEXTFIX_TEXT || S.controlComponent === h.PLACEHOLDER || S.controlComponent === h.TEXTFIXLABEL), b = !!S?.originControlId && !!S?.controlId && S.originControlId !== S.controlId && (S.controlComponent === h.PREFIX || S.controlComponent === h.PRE_TEXT || S.controlComponent === h.PRETEXTFIX || S.controlComponent === h.PRETEXTFIX_TEXT || S.controlComponent === h.POSTFIX || S.controlComponent === h.POST_TEXT || S.controlComponent === h.POSTTEXTFIX || S.controlComponent === h.POSTTEXTFIX_TEXT || S.controlComponent === h.PLACEHOLDER || S.controlComponent === h.TEXTFIXLABEL), y = (M) => this.options.mode === K.FORM ? i : this.control.removeControl(M), W = s.controlComponent === h.VALUE && !s.originControlId && !!S?.originControlId && !!d && R(S.originControlId) === d, V = (M) => !!M && M.controlId === s.controlId && (M.originControlId || null) === (s.originControlId || null), F = (M) => M?.controlComponent === h.POSTFIX || M?.controlComponent === h.POST_TEXT || M?.controlComponent === h.POSTTEXTFIX || M?.controlComponent === h.POSTTEXTFIX_TEXT, Y = () => {
15923
15939
  const M = s.controlId, U = s.originControlId || null;
15924
15940
  return a.spliceElementList(e, i, 1), e.some((w) => w.controlId === M && (w.originControlId || null) === U && w.controlComponent === h.VALUE) || this.control.addPlaceholder(i - 1), Math.max(i - 1, 0);
15925
15941
  }, x = s.controlComponent === h.VALUE && !!s.originControlId && V(S) && F(S), X = !!d && !this.control.getIsExistValueByElementListIndex(e, i), N = () => {
@@ -15974,7 +15990,7 @@ class hs {
15974
15990
  const U = p(g);
15975
15991
  return U >= 0 ? U : i;
15976
15992
  }
15977
- if (i === r && P && !(c && s.controlComponent === h.VALUE && !s.originControlId))
15993
+ if (i === r && O && !(c && s.controlComponent === h.VALUE && !s.originControlId))
15978
15994
  return y(i);
15979
15995
  if (this.options.mode === K.FORM && this.options.modeRule.form.deleteTraceEnabled && (!f || I)) {
15980
15996
  if (i === r && s.controlComponent === h.VALUE) {
@@ -15989,10 +16005,10 @@ class hs {
15989
16005
  if (i !== r) {
15990
16006
  a.spliceElementList(e, i + 1, r - i);
15991
16007
  const U = e[i + 1];
15992
- return (U?.controlComponent === h.POSTFIX || U?.controlComponent === h.POST_TEXT || U?.controlComponent === h.POSTTEXTFIX || U?.controlComponent === h.POSTTEXTFIX_TEXT) && this.control.addPlaceholder(i), i === 0 && e[0].type === O.SPLIT_TAG ? a.fixPosition(!0) ?? i : i;
16008
+ return (U?.controlComponent === h.POSTFIX || U?.controlComponent === h.POST_TEXT || U?.controlComponent === h.POSTTEXTFIX || U?.controlComponent === h.POSTTEXTFIX_TEXT) && this.control.addPlaceholder(i), i === 0 && e[0].type === P.SPLIT_TAG ? a.fixPosition(!0) ?? i : i;
15993
16009
  } else {
15994
16010
  const U = e[i - 1], C = e[i + 1];
15995
- return !s.originControlId && U?.controlId === s.controlId && U?.originControlId === s.originControlId && U?.controlComponent === h.VALUE && (s.controlComponent === h.POSTFIX || s.controlComponent === h.POST_TEXT || s.controlComponent === h.POSTTEXTFIX || s.controlComponent === h.POSTTEXTFIX_TEXT) && this.options.mode !== K.FORM ? (a.spliceElementList(e, i - 1, 1), this.getValue().length || this.control.addPlaceholder(i - 2), i - 2) : F(C) ? C.originControlId ? x ? Y() : W ? (a.spliceElementList(e, i, 1), this.getValue().length || this.control.addPlaceholder(i - 1), L(Math.max(i - 1, 0), s.controlId)) : y(i) : (a.spliceElementList(e, i, 1), this.control.addPlaceholder(i - 1), L(Math.max(i - 1, 0), s.controlId)) : (a.spliceElementList(e, i, 1), i === 1 && e[0].type === O.SPLIT_TAG || i === 0 ? a.fixPosition(!0) ?? i - 1 : L(Math.max(i - 1, 0), s.controlId));
16011
+ return !s.originControlId && U?.controlId === s.controlId && U?.originControlId === s.originControlId && U?.controlComponent === h.VALUE && (s.controlComponent === h.POSTFIX || s.controlComponent === h.POST_TEXT || s.controlComponent === h.POSTTEXTFIX || s.controlComponent === h.POSTTEXTFIX_TEXT) && this.options.mode !== K.FORM ? (a.spliceElementList(e, i - 1, 1), this.getValue().length || this.control.addPlaceholder(i - 2), i - 2) : F(C) ? C.originControlId ? x ? Y() : W ? (a.spliceElementList(e, i, 1), this.getValue().length || this.control.addPlaceholder(i - 1), L(Math.max(i - 1, 0), s.controlId)) : y(i) : (a.spliceElementList(e, i, 1), this.control.addPlaceholder(i - 1), L(Math.max(i - 1, 0), s.controlId)) : (a.spliceElementList(e, i, 1), i === 1 && e[0].type === P.SPLIT_TAG || i === 0 ? a.fixPosition(!0) ?? i - 1 : L(Math.max(i - 1, 0), s.controlId));
15996
16012
  }
15997
16013
  }
15998
16014
  } else if (t.key === gt.Delete) {
@@ -16011,7 +16027,7 @@ class hs {
16011
16027
  return l.controlComponent === h.POSTFIX || l.controlComponent === h.POST_TEXT || l.controlComponent === h.POSTTEXTFIX || l.controlComponent === h.POSTTEXTFIX_TEXT || s.controlComponent === h.PLACEHOLDER ? r : M?.controlComponent === h.POSTFIX || M?.controlComponent === h.POST_TEXT || M?.controlComponent === h.POSTTEXTFIX || M?.controlComponent === h.POSTTEXTFIX_TEXT ? M.originControlId ? W ? (a.spliceElementList(e, i + 1, 1), this.getValue().length || this.control.addPlaceholder(i), i) : y(i + 1) : (a.spliceElementList(e, i + 1, 1), this.control.addPlaceholder(i), i) : this.strikeout();
16012
16028
  {
16013
16029
  const w = e[r + 1];
16014
- return s.controlComponent === h.PLACEHOLDER ? r : w?.controlComponent === h.POSTFIX || w?.controlComponent === h.POST_TEXT || w?.controlComponent === h.POSTTEXTFIX || w?.controlComponent === h.POSTTEXTFIX_TEXT ? w.originControlId ? W ? (a.spliceElementList(e, i + 1, 1), this.getValue().length || this.control.addPlaceholder(i), i) : y(i + 1) : (a.spliceElementList(e, i + 1, 1), this.control.addPlaceholder(i), i) : i !== r ? (a.spliceElementList(e, i + 1, r - i), i === 0 && e[0].type === O.SPLIT_TAG ? a.fixPosition(!0) ?? i : i) : w ? (a.spliceElementList(e, i + 1, 1), i === 0 && e[0].type === O.SPLIT_TAG ? a.fixPosition(!0) ?? i : i) : (a.getTd()?.linkTdNextId && s.controlId && this.removeNextControlElement(s.controlId), r);
16030
+ return s.controlComponent === h.PLACEHOLDER ? r : w?.controlComponent === h.POSTFIX || w?.controlComponent === h.POST_TEXT || w?.controlComponent === h.POSTTEXTFIX || w?.controlComponent === h.POSTTEXTFIX_TEXT ? w.originControlId ? W ? (a.spliceElementList(e, i + 1, 1), this.getValue().length || this.control.addPlaceholder(i), i) : y(i + 1) : (a.spliceElementList(e, i + 1, 1), this.control.addPlaceholder(i), i) : i !== r ? (a.spliceElementList(e, i + 1, r - i), i === 0 && e[0].type === P.SPLIT_TAG ? a.fixPosition(!0) ?? i : i) : w ? (a.spliceElementList(e, i + 1, 1), i === 0 && e[0].type === P.SPLIT_TAG ? a.fixPosition(!0) ?? i : i) : (a.getTd()?.linkTdNextId && s.controlId && this.removeNextControlElement(s.controlId), r);
16015
16031
  }
16016
16032
  }
16017
16033
  return r;
@@ -16213,7 +16229,7 @@ class ua {
16213
16229
  L.classList.add(`${nt}-date-day`), e.append(n), e.append(c), e.append(L);
16214
16230
  const m = document.createElement("ul");
16215
16231
  m.classList.add(`${nt}-time-wrap`);
16216
- let P, S, E;
16232
+ let O, S, E;
16217
16233
  [this.lang.hour, this.lang.minute, this.lang.second].forEach((Y, x) => {
16218
16234
  const X = document.createElement("li"), N = document.createElement("span");
16219
16235
  N.innerText = Y, X.append(N);
@@ -16222,7 +16238,7 @@ class ua {
16222
16238
  const H = document.createElement("li");
16223
16239
  H.innerText = `${String(v).padStart(2, "0")}`, H.setAttribute("data-id", `${v}`), M.append(H);
16224
16240
  }
16225
- U ? P = M : C ? S = M : E = M, X.append(M), m.append(X);
16241
+ U ? O = M : C ? S = M : E = M, X.append(M), m.append(X);
16226
16242
  });
16227
16243
  const y = document.createElement("div");
16228
16244
  y.classList.add(`${nt}-date-menu`);
@@ -16245,7 +16261,7 @@ class ua {
16245
16261
  },
16246
16262
  day: L,
16247
16263
  time: {
16248
- hour: P,
16264
+ hour: O,
16249
16265
  minute: S,
16250
16266
  second: E
16251
16267
  },
@@ -16534,7 +16550,7 @@ class po {
16534
16550
  const g = {
16535
16551
  ...l,
16536
16552
  ...c,
16537
- type: O.TEXT,
16553
+ type: P.TEXT,
16538
16554
  value: t[R],
16539
16555
  controlComponent: h.VALUE
16540
16556
  };
@@ -16615,25 +16631,25 @@ class Io extends hs {
16615
16631
  return this.isPopup;
16616
16632
  }
16617
16633
  setValue(t, e = {}, n = {}) {
16618
- if (t.some((P) => !wc(P) || Xa.test(P.value)))
16634
+ if (t.some((O) => !wc(O) || Xa.test(O.value)))
16619
16635
  return -1;
16620
16636
  const i = e.elementList || this.control.getElementList(), r = e.range || this.control.getRange();
16621
16637
  this.control.shrinkBoundary(e);
16622
16638
  const s = pt(t), { startIndex: l, endIndex: a } = r, c = i[l];
16623
16639
  let d = null;
16624
- for (let P = l; P >= 0; P--)
16625
- if (i[P].controlComponent === h.PREFIX) {
16626
- d = i[P];
16640
+ for (let O = l; O >= 0; O--)
16641
+ if (i[O].controlComponent === h.PREFIX) {
16642
+ d = i[O];
16627
16643
  break;
16628
16644
  }
16629
16645
  const u = d?.control || this.element.control;
16630
16646
  if (this.control.getIsExistValueByElementListIndex(i, l)) {
16631
- let P = l;
16632
- for (; P > 0; ) {
16633
- const E = i[P];
16647
+ let O = l;
16648
+ for (; O > 0; ) {
16649
+ const E = i[O];
16634
16650
  if (E.controlId !== c.controlId || E.controlComponent === h.PREFIX || E.controlComponent === h.PRE_TEXT)
16635
16651
  break;
16636
- s.unshift(E), P--;
16652
+ s.unshift(E), O--;
16637
16653
  }
16638
16654
  let S = a + 1;
16639
16655
  for (; S < i.length; ) {
@@ -16678,11 +16694,11 @@ class Io extends hs {
16678
16694
  I = b;
16679
16695
  break;
16680
16696
  }
16681
- const p = this.options.mode === K.FORM, L = p && this.options.modeRule.form.inputTraceEnabled, m = p && this.options.modeRule.form.deleteTraceEnabled, P = ct(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss");
16697
+ const p = this.options.mode === K.FORM, L = p && this.options.modeRule.form.inputTraceEnabled, m = p && this.options.modeRule.form.deleteTraceEnabled, O = ct(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss");
16682
16698
  if (m)
16683
16699
  for (let b = T + 1; b < I; b++) {
16684
16700
  const y = e[b];
16685
- y.controlComponent === h.VALUE && !y.strikeout && y.value && (y.strikeout = !0, y.deletePerson = "SYSTEM", y.deleteTime = P), y.controlComponent === h.PLACEHOLDER && (this.control.getDraw().spliceElementList(e, b, 1), I--, b--);
16701
+ y.controlComponent === h.VALUE && !y.strikeout && y.value && (y.strikeout = !0, y.deletePerson = "SYSTEM", y.deleteTime = O), y.controlComponent === h.PLACEHOLDER && (this.control.getDraw().spliceElementList(e, b, 1), I--, b--);
16686
16702
  }
16687
16703
  else {
16688
16704
  const b = T + 1, y = I - b;
@@ -16697,7 +16713,7 @@ class Io extends hs {
16697
16713
  const S = [];
16698
16714
  for (let b = 0; b < R.length; b++) {
16699
16715
  const y = {
16700
- type: O.TEXT,
16716
+ type: P.TEXT,
16701
16717
  value: R[b],
16702
16718
  controlComponent: h.VALUE,
16703
16719
  controlId: e[T].controlId,
@@ -16801,8 +16817,8 @@ class Rf {
16801
16817
  a.classList.add(`${nt}-number-input-modal`), a.setAttribute(Pn, ln.POPUP);
16802
16818
  const c = (m) => {
16803
16819
  if (m.type === "mouseup") {
16804
- const P = this.options.control.getDraw().getCanvasEvent();
16805
- P.setIsAllowDrag(!1), P.setIsAllowSelection(!1);
16820
+ const O = this.options.control.getDraw().getCanvasEvent();
16821
+ O.setIsAllowDrag(!1), O.setIsAllowSelection(!1);
16806
16822
  }
16807
16823
  m.stopPropagation();
16808
16824
  };
@@ -16813,8 +16829,8 @@ class Rf {
16813
16829
  if (u.classList.add(`${nt}-number-input-modal__title`), u.textContent = "请输入数值", d.appendChild(u), e !== void 0 || n !== void 0) {
16814
16830
  const m = document.createElement("div");
16815
16831
  m.classList.add(`${nt}-number-input-modal__hint`);
16816
- let P = "有效范围:";
16817
- e !== void 0 && n !== void 0 ? P += `${e} ~ ${n}` : e !== void 0 ? P += `≥ ${e}` : P += `≤ ${n}`, i != null && (P += `,保留${i}位小数`), m.textContent = P, d.appendChild(m);
16832
+ let O = "有效范围:";
16833
+ e !== void 0 && n !== void 0 ? O += `${e} ~ ${n}` : e !== void 0 ? O += `≥ ${e}` : O += `≤ ${n}`, i != null && (O += `,保留${i}位小数`), m.textContent = O, d.appendChild(m);
16818
16834
  }
16819
16835
  const R = document.createElement("input");
16820
16836
  R.classList.add(`${nt}-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(() => {
@@ -16834,8 +16850,8 @@ class Rf {
16834
16850
  const m = R.value.trim();
16835
16851
  if (!m)
16836
16852
  return r("");
16837
- const P = parseFloat(m);
16838
- return Number.isNaN(P) || !Number.isFinite(P) ? (g.textContent = "请输入有效的数值", g.style.display = "block", !1) : i != null && (m.split(".")[1] || "").length > i ? (g.textContent = `小数位数不能超过${i}位`, g.style.display = "block", !1) : e !== void 0 && P < e ? (g.textContent = `数值不能小于 ${e}`, g.style.display = "block", !1) : n !== void 0 && P > n ? (g.textContent = `数值不能大于 ${n}`, g.style.display = "block", !1) : (g.style.display = "none", r(m));
16853
+ const O = parseFloat(m);
16854
+ return Number.isNaN(O) || !Number.isFinite(O) ? (g.textContent = "请输入有效的数值", g.style.display = "block", !1) : i != null && (m.split(".")[1] || "").length > i ? (g.textContent = `小数位数不能超过${i}位`, g.style.display = "block", !1) : e !== void 0 && O < e ? (g.textContent = `数值不能小于 ${e}`, g.style.display = "block", !1) : n !== void 0 && O > n ? (g.textContent = `数值不能大于 ${n}`, g.style.display = "block", !1) : (g.style.display = "none", r(m));
16839
16855
  };
16840
16856
  I.onclick = () => {
16841
16857
  p() && l();
@@ -16905,20 +16921,20 @@ class hf {
16905
16921
  if (I.type === "radio") {
16906
16922
  const L = document.createElement("div");
16907
16923
  L.classList.add("dialog-radio-group"), I.horizontal && L.classList.add("dialog-radio-group--horizontal"), I.options?.forEach((m) => {
16908
- const P = document.createElement("label");
16909
- P.classList.add("dialog-radio-item");
16924
+ const O = document.createElement("label");
16925
+ O.classList.add("dialog-radio-item");
16910
16926
  const S = document.createElement("input");
16911
16927
  S.type = "radio", S.name = I.name, S.value = m.value, m.value === (I.value || "") && (S.checked = !0);
16912
16928
  const E = document.createElement("span");
16913
- E.textContent = m.label, P.append(S), P.append(E), L.append(P), S.addEventListener("change", () => {
16929
+ E.textContent = m.label, O.append(S), O.append(E), L.append(O), S.addEventListener("change", () => {
16914
16930
  this._updateFieldVisibility();
16915
16931
  }), this.inputList.push(S);
16916
16932
  }), p.append(L);
16917
16933
  } else if (I.type === "select") {
16918
16934
  const L = document.createElement("select"), m = I.value || "";
16919
- I.options?.forEach((P) => {
16935
+ I.options?.forEach((O) => {
16920
16936
  const S = document.createElement("option");
16921
- S.value = P.value, S.label = P.label, P.value === m && (S.selected = !0), L.append(S);
16937
+ S.value = O.value, S.label = O.label, O.value === m && (S.selected = !0), L.append(S);
16922
16938
  }), L.name = I.name, L.value = m, L.addEventListener("change", () => {
16923
16939
  this._updateFieldVisibility();
16924
16940
  }), I.width && (L.style.width = `${I.width}px`), p.append(L), this.inputList.push(L);
@@ -17332,7 +17348,7 @@ class br {
17332
17348
  break;
17333
17349
  f.controlComponent === h.VALUE && l.push(f), R++;
17334
17350
  }
17335
- return l.filter((f) => f.type !== O.SPLIT_TAG);
17351
+ return l.filter((f) => f.type !== P.SPLIT_TAG);
17336
17352
  }
17337
17353
  removeNextControlElement(t, e) {
17338
17354
  const n = this.control.getDraw();
@@ -17364,12 +17380,12 @@ class br {
17364
17380
  const L = i[p];
17365
17381
  if (L.controlId === c.controlId && (L.controlComponent === h.PREFIX || L.controlComponent === h.PRETEXTFIX)) {
17366
17382
  for (let m = p - 1; m >= 0; m--) {
17367
- const P = i[m];
17368
- if (P.controlId && P.controlId !== c.controlId && (P.controlComponent === h.PRETEXTFIX || P.controlComponent === h.PRETEXTFIX_TEXT || P.controlComponent === h.PREFIX || P.controlComponent === h.PRE_TEXT)) {
17369
- u = P.controlId, R = !0;
17383
+ const O = i[m];
17384
+ if (O.controlId && O.controlId !== c.controlId && (O.controlComponent === h.PRETEXTFIX || O.controlComponent === h.PRETEXTFIX_TEXT || O.controlComponent === h.PREFIX || O.controlComponent === h.PRE_TEXT)) {
17385
+ u = O.controlId, R = !0;
17370
17386
  break;
17371
17387
  }
17372
- if (P.controlId && P.controlId !== c.controlId && (P.controlComponent === h.POSTFIX || P.controlComponent === h.POSTTEXTFIX))
17388
+ if (O.controlId && O.controlId !== c.controlId && (O.controlComponent === h.POSTFIX || O.controlComponent === h.POSTTEXTFIX))
17373
17389
  break;
17374
17390
  }
17375
17391
  break;
@@ -17381,12 +17397,12 @@ class br {
17381
17397
  const L = i[p];
17382
17398
  if (L.controlId === c.controlId && (L.controlComponent === h.PREFIX || L.controlComponent === h.PRETEXTFIX)) {
17383
17399
  for (let m = p - 1; m >= 0; m--) {
17384
- const P = i[m];
17385
- if (P.controlId && P.controlId !== c.controlId && (P.controlComponent === h.PRETEXTFIX || P.controlComponent === h.PRETEXTFIX_TEXT || P.controlComponent === h.PREFIX || P.controlComponent === h.PRE_TEXT)) {
17386
- u = P.controlId, R = !0;
17400
+ const O = i[m];
17401
+ if (O.controlId && O.controlId !== c.controlId && (O.controlComponent === h.PRETEXTFIX || O.controlComponent === h.PRETEXTFIX_TEXT || O.controlComponent === h.PREFIX || O.controlComponent === h.PRE_TEXT)) {
17402
+ u = O.controlId, R = !0;
17387
17403
  break;
17388
17404
  }
17389
- if (P.controlId && P.controlId !== c.controlId && (P.controlComponent === h.POSTFIX || P.controlComponent === h.POSTTEXTFIX))
17405
+ if (O.controlId && O.controlId !== c.controlId && (O.controlComponent === h.POSTFIX || O.controlComponent === h.POSTTEXTFIX))
17390
17406
  break;
17391
17407
  }
17392
17408
  break;
@@ -17406,11 +17422,11 @@ class br {
17406
17422
  };
17407
17423
  for (let p = 0; p < t.length; p++) {
17408
17424
  const L = t[p];
17409
- if (L.type === O.CONTROL && L.control) {
17410
- const m = L, P = m.controlId || mt(), S = m.control?.value || [], E = m.control?.type === D.TEXTFIELD, b = {
17425
+ if (L.type === P.CONTROL && L.control) {
17426
+ const m = L, O = m.controlId || mt(), S = m.control?.value || [], E = m.control?.type === D.TEXTFIELD, b = {
17411
17427
  ...g,
17412
- controlId: P,
17413
- type: O.CONTROL,
17428
+ controlId: O,
17429
+ type: P.CONTROL,
17414
17430
  control: m.control,
17415
17431
  originControlId: u
17416
17432
  }, y = E ? h.PRETEXTFIX : h.PREFIX, W = E ? h.POSTTEXTFIX : h.POSTFIX, V = E ? m.control?.preTextFix || this.options.control.preTextFix : m.control?.prefix || this.options.control.prefix;
@@ -17494,10 +17510,10 @@ class br {
17494
17510
  this.strikeout();
17495
17511
  else {
17496
17512
  if (s !== l)
17497
- return e.slice(s, l + 1).some((L) => L.controlComponent === h.POSTTEXTFIX || L.controlComponent === h.POSTTEXTFIX_TEXT) ? s : (c.spliceElementList(e, s + 1, l - s), this.getValue().length || this.control.addPlaceholder(s), s === 0 && e[0].type === O.SPLIT_TAG ? c.fixPosition(!0) ?? s : s);
17513
+ return e.slice(s, l + 1).some((L) => L.controlComponent === h.POSTTEXTFIX || L.controlComponent === h.POSTTEXTFIX_TEXT) ? s : (c.spliceElementList(e, s + 1, l - s), this.getValue().length || this.control.addPlaceholder(s), s === 0 && e[0].type === P.SPLIT_TAG ? c.fixPosition(!0) ?? s : s);
17498
17514
  {
17499
17515
  const I = e[s - 1];
17500
- return I?.controlId === a.controlId && I?.originControlId === a.originControlId && I?.controlComponent === h.VALUE && (a.controlComponent === h.POSTFIX || a.controlComponent === h.POST_TEXT || a.controlComponent === h.POSTTEXTFIX || a.controlComponent === h.POSTTEXTFIX_TEXT) ? (c.spliceElementList(e, s - 1, 1), this.getValue().length || this.control.addPlaceholder(s - 2), s - 2) : a.controlComponent === h.PRETEXTFIX || a.controlComponent === h.PRETEXTFIX_TEXT || a.controlComponent === h.POSTTEXTFIX || a.controlComponent === h.POSTTEXTFIX_TEXT || a.controlComponent === h.TEXTFIXLABEL || a.controlComponent === h.PLACEHOLDER ? s : (c.spliceElementList(e, s, 1), this.getValue().length || this.control.addPlaceholder(s - 1), s === 1 && e[0].type === O.SPLIT_TAG || s === 0 ? c.fixPosition(!0) ?? s - 1 : s - 1);
17516
+ return I?.controlId === a.controlId && I?.originControlId === a.originControlId && I?.controlComponent === h.VALUE && (a.controlComponent === h.POSTFIX || a.controlComponent === h.POST_TEXT || a.controlComponent === h.POSTTEXTFIX || a.controlComponent === h.POSTTEXTFIX_TEXT) ? (c.spliceElementList(e, s - 1, 1), this.getValue().length || this.control.addPlaceholder(s - 2), s - 2) : a.controlComponent === h.PRETEXTFIX || a.controlComponent === h.PRETEXTFIX_TEXT || a.controlComponent === h.POSTTEXTFIX || a.controlComponent === h.POSTTEXTFIX_TEXT || a.controlComponent === h.TEXTFIXLABEL || a.controlComponent === h.PLACEHOLDER ? s : (c.spliceElementList(e, s, 1), this.getValue().length || this.control.addPlaceholder(s - 1), s === 1 && e[0].type === P.SPLIT_TAG || s === 0 ? c.fixPosition(!0) ?? s - 1 : s - 1);
17501
17517
  }
17502
17518
  }
17503
17519
  } else if (t.key === gt.Delete) {
@@ -17508,7 +17524,7 @@ class br {
17508
17524
  if (this.options.mode === K.FORM)
17509
17525
  this.strikeout();
17510
17526
  else
17511
- return s !== l ? (c.spliceElementList(e, s + 1, l - s), this.getValue().length || this.control.addPlaceholder(s), s === 0 && e[0].type === O.SPLIT_TAG ? c.fixPosition(!0) ?? s : s) : (d || c.getTd()?.linkTdNextId && a.controlId && this.removeNextControlElement(a.controlId), d && ((a.controlComponent === h.PRETEXTFIX || a.controlComponent === h.PRETEXTFIX_TEXT) && (d.controlComponent === h.PLACEHOLDER || d.controlComponent === h.TEXTFIXLABEL) || d.controlComponent === h.POSTTEXTFIX || d.controlComponent === h.POSTTEXTFIX_TEXT || a.controlComponent === h.PLACEHOLDER || a.controlComponent === h.TEXTFIXLABEL) ? s : (c.spliceElementList(e, s + 1, 1), this.getValue().length || this.control.addPlaceholder(s), s === 0 && e[0].type === O.SPLIT_TAG ? c.fixPosition(!0) ?? s : s));
17527
+ return s !== l ? (c.spliceElementList(e, s + 1, l - s), this.getValue().length || this.control.addPlaceholder(s), s === 0 && e[0].type === P.SPLIT_TAG ? c.fixPosition(!0) ?? s : s) : (d || c.getTd()?.linkTdNextId && a.controlId && this.removeNextControlElement(a.controlId), d && ((a.controlComponent === h.PRETEXTFIX || a.controlComponent === h.PRETEXTFIX_TEXT) && (d.controlComponent === h.PLACEHOLDER || d.controlComponent === h.TEXTFIXLABEL) || d.controlComponent === h.POSTTEXTFIX || d.controlComponent === h.POSTTEXTFIX_TEXT || a.controlComponent === h.PLACEHOLDER || a.controlComponent === h.TEXTFIXLABEL) ? s : (c.spliceElementList(e, s + 1, 1), this.getValue().length || this.control.addPlaceholder(s), s === 0 && e[0].type === P.SPLIT_TAG ? c.fixPosition(!0) ?? s : s));
17512
17528
  }
17513
17529
  return l;
17514
17530
  }
@@ -17844,8 +17860,8 @@ ${u} `;
17844
17860
  cycleMax: R.querySelector("#mh-edit-cycleMax")?.value || "_"
17845
17861
  };
17846
17862
  const T = this.control.getElementList(), I = this.element.controlId;
17847
- for (let P = 0; P < T.length; P++) {
17848
- const S = T[P];
17863
+ for (let O = 0; O < T.length; O++) {
17864
+ const S = T[O];
17849
17865
  S.controlId === I && S.control && (S.control.menstrualData = f);
17850
17866
  }
17851
17867
  const p = this.generateDisplayText(f), L = this.textToElements(p);
@@ -17909,7 +17925,7 @@ class ff {
17909
17925
  // 过滤控件辅助元素(前后缀、背景提示)
17910
17926
  filterAssistElement(t) {
17911
17927
  return t.filter((e, n) => {
17912
- if (e.type === O.TABLE) {
17928
+ if (e.type === P.TABLE) {
17913
17929
  const i = e.trList;
17914
17930
  for (let r = 0; r < i.length; r++) {
17915
17931
  const s = i[r];
@@ -18335,12 +18351,12 @@ class ff {
18335
18351
  const T = this.getElementList(), I = this.getRange(), { startIndex: p } = I;
18336
18352
  let L = null;
18337
18353
  for (let m = p; m >= 0; m--) {
18338
- const P = T[m];
18339
- if (P.controlComponent === h.PRETEXTFIX || P.controlComponent === h.PRETEXTFIX_TEXT || P.controlComponent === h.PREFIX || P.controlComponent === h.PRE_TEXT) {
18340
- L = P.controlId || null;
18354
+ const O = T[m];
18355
+ if (O.controlComponent === h.PRETEXTFIX || O.controlComponent === h.PRETEXTFIX_TEXT || O.controlComponent === h.PREFIX || O.controlComponent === h.PRE_TEXT) {
18356
+ L = O.controlId || null;
18341
18357
  break;
18342
18358
  }
18343
- if (P.controlId && P.controlId !== g || P.controlComponent === h.POSTTEXTFIX || P.controlComponent === h.POSTTEXTFIX_TEXT || P.controlComponent === h.POSTFIX || P.controlComponent === h.POST_TEXT)
18359
+ if (O.controlId && O.controlId !== g || O.controlComponent === h.POSTTEXTFIX || O.controlComponent === h.POSTTEXTFIX_TEXT || O.controlComponent === h.POSTFIX || O.controlComponent === h.POST_TEXT)
18344
18360
  break;
18345
18361
  }
18346
18362
  if (L === g) {
@@ -18620,8 +18636,8 @@ class ff {
18620
18636
  const { deletable: m = !0 } = i.control;
18621
18637
  if (!m)
18622
18638
  return null;
18623
- const P = this.draw.getMode();
18624
- if (P === K.FORM && this.options.modeRule[P].controlDeletableDisabled)
18639
+ const O = this.draw.getMode();
18640
+ if (O === K.FORM && this.options.modeRule[O].controlDeletableDisabled)
18625
18641
  return null;
18626
18642
  }
18627
18643
  let r = -1, s = -1;
@@ -18629,8 +18645,8 @@ class ff {
18629
18645
  let u = t;
18630
18646
  for (; u >= 0; ) {
18631
18647
  const m = n[u];
18632
- let P = !1;
18633
- if (l ? P = m.controlId === a && m.originControlId === c : P = m.controlId === a && !m.originControlId, !P) {
18648
+ let O = !1;
18649
+ if (l ? O = m.controlId === a && m.originControlId === c : O = m.controlId === a && !m.originControlId, !O) {
18634
18650
  r = u;
18635
18651
  break;
18636
18652
  }
@@ -18639,8 +18655,8 @@ class ff {
18639
18655
  let R = t;
18640
18656
  for (; R < n.length; ) {
18641
18657
  const m = n[R];
18642
- let P = !1;
18643
- if (l ? P = m.controlId === a && m.originControlId === c : P = m.controlId === a && !m.originControlId, !P) {
18658
+ let O = !1;
18659
+ if (l ? O = m.controlId === a && m.originControlId === c : O = m.controlId === a && !m.originControlId, !O) {
18644
18660
  s = R - 1;
18645
18661
  break;
18646
18662
  }
@@ -18657,15 +18673,15 @@ class ff {
18657
18673
  D.SELECT,
18658
18674
  D.BUTTON
18659
18675
  ].includes(f.type);
18660
- let I = n[0]?.type === O.SPLIT_TAG;
18661
- if (!e.removeNext && T && !l && g.controlComponent !== h.PREFIX && g.type !== O.SPLIT_TAG)
18676
+ let I = n[0]?.type === P.SPLIT_TAG;
18677
+ if (!e.removeNext && T && !l && g.controlComponent !== h.PREFIX && g.type !== P.SPLIT_TAG)
18662
18678
  if (e.removePrev)
18663
18679
  e.removePrev();
18664
18680
  else {
18665
18681
  const m = this.draw.getTd();
18666
18682
  m && this.createRemoveControlHandler(m, i.controlId, !0);
18667
18683
  }
18668
- if (!e.removeNext && T && !l && g.controlComponent !== h.PRETEXTFIX && g.type !== O.SPLIT_TAG)
18684
+ if (!e.removeNext && T && !l && g.controlComponent !== h.PRETEXTFIX && g.type !== P.SPLIT_TAG)
18669
18685
  if (e.removePrev)
18670
18686
  e.removePrev();
18671
18687
  else {
@@ -18768,7 +18784,7 @@ class ff {
18768
18784
  value: f === `
18769
18785
  ` ? A : f,
18770
18786
  controlId: i.controlId,
18771
- type: O.CONTROL,
18787
+ type: P.CONTROL,
18772
18788
  control: i.control,
18773
18789
  controlComponent: h.PLACEHOLDER,
18774
18790
  color: this.controlOptions.placeholderColor
@@ -18826,10 +18842,10 @@ class ff {
18826
18842
  let R = 0;
18827
18843
  for (; R < d.length; ) {
18828
18844
  const g = d[R];
18829
- if (R++, g.type === O.TABLE) {
18830
- const P = g.trList;
18831
- for (let S = 0; S < P.length; S++) {
18832
- const E = P[S];
18845
+ if (R++, g.type === P.TABLE) {
18846
+ const O = g.trList;
18847
+ for (let S = 0; S < O.length; S++) {
18848
+ const E = O[S];
18833
18849
  for (let b = 0; b < E.tdList.length; b++) {
18834
18850
  const y = E.tdList[b], W = y.originalId ?? y.id;
18835
18851
  l.has(W) || (l.add(W), y.linkTdNextId ? a(this.draw.getSplitTdValues(W), u) : a(y.value, u));
@@ -18842,10 +18858,10 @@ class ff {
18842
18858
  let p = R, L = "";
18843
18859
  const m = [];
18844
18860
  for (; p < d.length; ) {
18845
- const P = d[p];
18846
- if (P.controlId !== g.controlId)
18861
+ const O = d[p];
18862
+ if (O.controlId !== g.controlId)
18847
18863
  break;
18848
- (f === D.TEXT || f === D.TEXTFIELD || f === D.DATE || f === D.NUMBER) && P.controlComponent === h.VALUE && (L += P.value, m.push(We(P, ki))), p++;
18864
+ (f === D.TEXT || f === D.TEXTFIELD || f === D.DATE || f === D.NUMBER) && O.controlComponent === h.VALUE && (L += O.value, m.push(We(O, ki))), p++;
18849
18865
  }
18850
18866
  if (f === D.TEXT || f === D.TEXTFIELD || f === D.DATE || f === D.NUMBER)
18851
18867
  s.push({
@@ -18856,12 +18872,12 @@ class ff {
18856
18872
  elementList: vt(m)
18857
18873
  });
18858
18874
  else if (f === D.SELECT || f === D.CHECKBOX || f === D.RADIO) {
18859
- const P = T?.split(",").map((S) => I?.find((E) => E.code === S)?.value).filter(Boolean).join("");
18875
+ const O = T?.split(",").map((S) => I?.find((E) => E.code === S)?.value).filter(Boolean).join("");
18860
18876
  s.push({
18861
18877
  ...g.control,
18862
18878
  zone: u,
18863
18879
  value: T || null,
18864
- innerText: P || null
18880
+ innerText: O || null
18865
18881
  });
18866
18882
  }
18867
18883
  R = p;
@@ -18892,17 +18908,17 @@ class ff {
18892
18908
  let a = 0;
18893
18909
  for (; a < s.length; ) {
18894
18910
  const c = s[a];
18895
- if (a++, c.type === O.TABLE) {
18911
+ if (a++, c.type === P.TABLE) {
18896
18912
  const m = c.trList;
18897
- for (let P = 0; P < m.length; P++) {
18898
- const S = m[P];
18913
+ for (let O = 0; O < m.length; O++) {
18914
+ const S = m[O];
18899
18915
  for (let E = 0; E < S.tdList.length; E++) {
18900
18916
  const b = S.tdList[E];
18901
18917
  i(b.value, b.id);
18902
18918
  }
18903
18919
  }
18904
18920
  }
18905
- if (!c.control || c.type === O.SPLIT_TAG)
18921
+ if (!c.control || c.type === P.SPLIT_TAG)
18906
18922
  continue;
18907
18923
  const d = t.find((m) => (!m.groupId || m.groupId === c.control?.groupId) && (m.id && c.controlId === m.id || m.conceptId && c.control.conceptId === m.conceptId || m.areaId && c.areaId === m.areaId));
18908
18924
  if (!d)
@@ -18930,16 +18946,16 @@ class ff {
18930
18946
  isHandleFirstElement: !1,
18931
18947
  editorOptions: this.options
18932
18948
  });
18933
- const P = new br(c, this);
18934
- this.activeControl = P, m.length ? P.setValue(m, I, p) : P.clearValue(I, p);
18949
+ const O = new br(c, this);
18950
+ this.activeControl = O, m.length ? O.setValue(m, I, p) : O.clearValue(I, p);
18935
18951
  } else if (g === D.TEXT) {
18936
18952
  const m = Array.isArray(u) ? u : u ? [{ value: u }] : [];
18937
18953
  m.length && re(m, {
18938
18954
  isHandleFirstElement: !1,
18939
18955
  editorOptions: this.options
18940
18956
  });
18941
- const P = new hs(c, this);
18942
- this.activeControl = P, m.length ? P.setValue(m, I, p) : P.clearValue(I, p);
18957
+ const O = new hs(c, this);
18958
+ this.activeControl = O, m.length ? O.setValue(m, I, p) : O.clearValue(I, p);
18943
18959
  } else if (g === D.SELECT) {
18944
18960
  if (Array.isArray(u))
18945
18961
  continue;
@@ -18950,15 +18966,15 @@ class ff {
18950
18966
  continue;
18951
18967
  const m = new ri(c, this);
18952
18968
  this.activeControl = m;
18953
- const P = u ? u.split(",") : [];
18954
- m.setSelect(P, I, p);
18969
+ const O = u ? u.split(",") : [];
18970
+ m.setSelect(O, I, p);
18955
18971
  } else if (g === D.RADIO) {
18956
18972
  if (Array.isArray(u))
18957
18973
  continue;
18958
18974
  const m = new os(c, this);
18959
18975
  this.activeControl = m;
18960
- const P = u ? [u] : [];
18961
- m.setSelect(P, I, p);
18976
+ const O = u ? [u] : [];
18977
+ m.setSelect(O, I, p);
18962
18978
  } else if (g === D.DATE) {
18963
18979
  const m = new po(c, this);
18964
18980
  this.activeControl = m, Ai(u) ? (u.length && re(u, {
@@ -18971,16 +18987,16 @@ class ff {
18971
18987
  isHandleFirstElement: !1,
18972
18988
  editorOptions: this.options
18973
18989
  });
18974
- const P = new Io(c, this);
18975
- this.activeControl = P, m.length ? P.setValue(m, I, p) : P.clearValue(I, p);
18990
+ const O = new Io(c, this);
18991
+ this.activeControl = O, m.length ? O.setValue(m, I, p) : O.clearValue(I, p);
18976
18992
  } else if (g === D.BUTTON) {
18977
18993
  const m = Array.isArray(u) ? u : u ? [{ value: u }] : [];
18978
18994
  m.length && re(m, {
18979
18995
  isHandleFirstElement: !1,
18980
18996
  editorOptions: this.options
18981
18997
  });
18982
- const P = new Hn(c, this);
18983
- this.activeControl = P, m.length ? P.setValue(m, I, p) : P.clearSelect(I, p);
18998
+ const O = new Hn(c, this);
18999
+ this.activeControl = O, m.length ? O.setValue(m, I, p) : O.clearSelect(I, p);
18984
19000
  }
18985
19001
  this.emitControlContentChange({
18986
19002
  context: I
@@ -19013,7 +19029,7 @@ class ff {
19013
19029
  let r = 0;
19014
19030
  for (; r < i.length; ) {
19015
19031
  const s = i[r];
19016
- if (r++, s.type === O.TABLE) {
19032
+ if (r++, s.type === P.TABLE) {
19017
19033
  const d = s.trList;
19018
19034
  for (let u = 0; u < d.length; u++) {
19019
19035
  const R = d[u];
@@ -19056,7 +19072,7 @@ class ff {
19056
19072
  let l = 0;
19057
19073
  for (; l < s.length; ) {
19058
19074
  const a = s[l];
19059
- if (l++, a.type === O.TABLE) {
19075
+ if (l++, a.type === P.TABLE) {
19060
19076
  const g = a.trList;
19061
19077
  for (let f = 0; f < g.length; f++) {
19062
19078
  const T = g[f];
@@ -19091,7 +19107,7 @@ class ff {
19091
19107
  range: { startIndex: l - 1, endIndex: l - 1 }
19092
19108
  });
19093
19109
  if (p.length > 0) {
19094
- const L = p.map((P) => P.value).join(""), m = Number(L);
19110
+ const L = p.map((O) => O.value).join(""), m = Number(L);
19095
19111
  !Number.isNaN(m) && Number.isFinite(m) && (f != null && m < f || T != null && m > T) && I.clearValue({
19096
19112
  elementList: s,
19097
19113
  range: { startIndex: l - 1, endIndex: l - 1 }
@@ -19135,7 +19151,7 @@ class ff {
19135
19151
  function e(i) {
19136
19152
  for (let r = 0; r < i.length; r++) {
19137
19153
  const s = i[r];
19138
- if (s.type === O.TABLE) {
19154
+ if (s.type === P.TABLE) {
19139
19155
  const l = s.trList;
19140
19156
  for (let a = 0; a < l.length; a++) {
19141
19157
  const c = l[a];
@@ -19244,7 +19260,7 @@ class ff {
19244
19260
  const { startIndex: n } = this.range.getRange(), i = this.getElementList(), r = this.activeControl?.getElement() || i[n], s = this._getCurrentControlIdentity(n), l = (c, d) => {
19245
19261
  for (let u = d; u > 0; u--) {
19246
19262
  const R = c[u];
19247
- if (R.type === O.TABLE) {
19263
+ if (R.type === P.TABLE) {
19248
19264
  const g = R.trList || [];
19249
19265
  for (let f = g.length - 1; f >= 0; f--) {
19250
19266
  const T = g[f], I = T.tdList;
@@ -19288,8 +19304,8 @@ class ff {
19288
19304
  for (let L = p.length - 1; L >= 0; L--) {
19289
19305
  if (u === T && L >= R)
19290
19306
  continue;
19291
- const m = p[L], P = l(m.value, m.value.length - 1);
19292
- if (P)
19307
+ const m = p[L], O = l(m.value, m.value.length - 1);
19308
+ if (O)
19293
19309
  return {
19294
19310
  positionContext: {
19295
19311
  isTable: !0,
@@ -19300,7 +19316,7 @@ class ff {
19300
19316
  trId: I.id,
19301
19317
  tableId: r.tableId
19302
19318
  },
19303
- nextIndex: P.nextIndex
19319
+ nextIndex: O.nextIndex
19304
19320
  };
19305
19321
  }
19306
19322
  }
@@ -19322,7 +19338,7 @@ class ff {
19322
19338
  const { endIndex: n } = this.range.getRange(), i = this.getElementList(), r = this.activeControl?.getElement() || i[n], s = this._getCurrentControlIdentity(n), l = (c, d) => {
19323
19339
  for (let u = d; u < c.length; u++) {
19324
19340
  const R = c[u];
19325
- if (R.type === O.TABLE) {
19341
+ if (R.type === P.TABLE) {
19326
19342
  const g = R.trList || [];
19327
19343
  for (let f = 0; f < g.length; f++) {
19328
19344
  const T = g[f], I = T.tdList;
@@ -19366,8 +19382,8 @@ class ff {
19366
19382
  for (let L = 0; L < p.length; L++) {
19367
19383
  if (u === T && L <= R)
19368
19384
  continue;
19369
- const m = p[L], P = l(m.value, 0);
19370
- if (P)
19385
+ const m = p[L], O = l(m.value, 0);
19386
+ if (O)
19371
19387
  return {
19372
19388
  positionContext: {
19373
19389
  isTable: !0,
@@ -19378,7 +19394,7 @@ class ff {
19378
19394
  trId: I.id,
19379
19395
  tableId: r.tableId
19380
19396
  },
19381
- nextIndex: P.nextIndex
19397
+ nextIndex: O.nextIndex
19382
19398
  };
19383
19399
  }
19384
19400
  }
@@ -19452,7 +19468,7 @@ class ff {
19452
19468
  const p = g[u];
19453
19469
  if (p.controlId !== l.controlId)
19454
19470
  break;
19455
- if (p.type !== O.SPLIT_TAG && (c.unshift(p), d && (g.splice(u, 1), e[0].type === O.SPLIT_TAG ? e.splice(0, 1) : (n.startIndex++, n.endIndex++), e.unshift(p)), a.startIndex = u), u === 0 && p.controlComponent !== h.PREFIX && R?.linkTdPrevId && (R = this.draw.getTdById(R.linkTdPrevId), R)) {
19471
+ if (p.type !== P.SPLIT_TAG && (c.unshift(p), d && (g.splice(u, 1), e[0].type === P.SPLIT_TAG ? e.splice(0, 1) : (n.startIndex++, n.endIndex++), e.unshift(p)), a.startIndex = u), u === 0 && p.controlComponent !== h.PREFIX && R?.linkTdPrevId && (R = this.draw.getTdById(R.linkTdPrevId), R)) {
19456
19472
  g = R.value, u = R.value.length - 1, d = !0;
19457
19473
  continue;
19458
19474
  }
@@ -19468,7 +19484,7 @@ class ff {
19468
19484
  const p = I[f];
19469
19485
  if (p.controlId !== l.controlId)
19470
19486
  break;
19471
- if (p.type !== O.SPLIT_TAG && (c.push(p), d && (I.splice(f, 1), e.push(p), f--)), f === I.length - 1 && p.controlComponent !== h.POSTFIX && T?.linkTdNextId && (T = this.draw.getTdById(T.linkTdNextId), T)) {
19487
+ if (p.type !== P.SPLIT_TAG && (c.push(p), d && (I.splice(f, 1), e.push(p), f--)), f === I.length - 1 && p.controlComponent !== h.POSTFIX && T?.linkTdNextId && (T = this.draw.getTdById(T.linkTdNextId), T)) {
19472
19488
  I = T.value, f = 0, d = !0;
19473
19489
  continue;
19474
19490
  }
@@ -19530,7 +19546,7 @@ function gs(o, t) {
19530
19546
  const e = (n) => {
19531
19547
  for (let i = 0; i < n.length; i++) {
19532
19548
  const r = n[i];
19533
- if (t(r), r.valueList?.length && e(r.valueList), r.control?.value?.length && e(r.control.value), r.type === O.TABLE && r.trList?.length)
19549
+ if (t(r), r.valueList?.length && e(r.valueList), r.control?.value?.length && e(r.control.value), r.type === P.TABLE && r.trList?.length)
19534
19550
  for (let s = 0; s < r.trList.length; s++) {
19535
19551
  const l = r.trList[s];
19536
19552
  for (let a = 0; a < l.tdList.length; a++)
@@ -19558,10 +19574,10 @@ function If(o) {
19558
19574
  return gs(o, (r) => {
19559
19575
  r.control && r.controlId && !e.has(r.controlId) && (e.add(r.controlId), i(r.control.label, pf(r), "control"));
19560
19576
  const s = r.id;
19561
- if (s && !n.has(s) && (r.type === O.MACRO || r.type === O.CUSTOM_MACRO || r.type === O.REUSABLE_ITEM)) {
19577
+ if (s && !n.has(s) && (r.type === P.MACRO || r.type === P.CUSTOM_MACRO || r.type === P.REUSABLE_ITEM)) {
19562
19578
  n.add(s);
19563
19579
  let l;
19564
- r.type === O.MACRO ? l = r.value : r.type === O.CUSTOM_MACRO ? l = r.macroConfig?.value : r.type === O.REUSABLE_ITEM && (l = r.reusableItemConfig?.value), i(r.label, l, "macro");
19580
+ r.type === P.MACRO ? l = r.value : r.type === P.CUSTOM_MACRO ? l = r.macroConfig?.value : r.type === P.REUSABLE_ITEM && (l = r.reusableItemConfig?.value), i(r.label, l, "macro");
19565
19581
  }
19566
19582
  }), t;
19567
19583
  }
@@ -19611,8 +19627,8 @@ class Lf {
19611
19627
  W > f.height && (u === me.TOP ? s -= b - f.height : u === me.MIDDLE && (s -= (W - f.height) / 2));
19612
19628
  }
19613
19629
  }
19614
- const p = Math.round(n + I * R), L = Math.round(s - f.height + a), m = f.width - (I + l) * R, P = f.height;
19615
- e.save(), e.beginPath(), e.translate(0.5, 0.5), T?.value ? (e.lineWidth = a, e.strokeStyle = c, e.rect(p, L, m, P), e.stroke(), e.beginPath(), e.fillStyle = c, e.fillRect(p, L, m, P), e.beginPath(), e.strokeStyle = d, e.lineWidth = a * 2 * R, e.moveTo(p + 2 * R, L + P / 2), e.lineTo(p + m / 2, L + P - 3 * R), e.lineTo(p + m - 2 * R, L + 3 * R), e.stroke()) : (e.lineWidth = a, e.rect(p, L, m, P), e.stroke()), e.closePath(), e.restore();
19630
+ const p = Math.round(n + I * R), L = Math.round(s - f.height + a), m = f.width - (I + l) * R, O = f.height;
19631
+ e.save(), e.beginPath(), e.translate(0.5, 0.5), T?.value ? (e.lineWidth = a, e.strokeStyle = c, e.rect(p, L, m, O), e.stroke(), e.beginPath(), e.fillStyle = c, e.fillRect(p, L, m, O), e.beginPath(), e.strokeStyle = d, e.lineWidth = a * 2 * R, e.moveTo(p + 2 * R, L + O / 2), e.lineTo(p + m / 2, L + O - 3 * R), e.lineTo(p + m - 2 * R, L + 3 * R), e.stroke()) : (e.lineWidth = a, e.rect(p, L, m, O), e.stroke()), e.closePath(), e.restore();
19616
19632
  }
19617
19633
  }
19618
19634
  class Pf {
@@ -19643,8 +19659,8 @@ class Pf {
19643
19659
  W > f.height && (u === me.TOP ? s -= b - f.height : u === me.MIDDLE && (s -= (W - f.height) / 2));
19644
19660
  }
19645
19661
  }
19646
- const p = Math.round(n + I * R), L = Math.round(s - f.height + a), m = f.width - (I + l) * R, P = f.height;
19647
- e.save(), e.beginPath(), e.translate(0.5, 0.5), e.strokeStyle = T?.value ? c : d, e.lineWidth = a, e.arc(p + m / 2, L + P / 2, m / 2, 0, Math.PI * 2), e.stroke(), T?.value && (e.beginPath(), e.fillStyle = c, e.arc(p + m / 2, L + P / 2, m / 3, 0, Math.PI * 2), e.fill()), e.closePath(), e.restore();
19662
+ const p = Math.round(n + I * R), L = Math.round(s - f.height + a), m = f.width - (I + l) * R, O = f.height;
19663
+ e.save(), e.beginPath(), e.translate(0.5, 0.5), e.strokeStyle = T?.value ? c : d, e.lineWidth = a, e.arc(p + m / 2, L + O / 2, m / 2, 0, Math.PI * 2), e.stroke(), T?.value && (e.beginPath(), e.fillStyle = c, e.arc(p + m / 2, L + O / 2, m / 3, 0, Math.PI * 2), e.fill()), e.closePath(), e.restore();
19648
19664
  }
19649
19665
  }
19650
19666
  const Ho = {
@@ -19683,22 +19699,22 @@ class Of {
19683
19699
  c.font = `${i}px "Microsoft YaHei", sans-serif`, f && (u += c.measureText(`${f}岁`).width + s);
19684
19700
  let T = "";
19685
19701
  if (d.isMenopause) {
19686
- const P = this.getValue(d.menopauseAge);
19687
- P && (T = `${P}岁`);
19702
+ const O = this.getValue(d.menopauseAge);
19703
+ O && (T = `${O}岁`);
19688
19704
  } else {
19689
- const P = this.getValue(d.lastPeriod);
19690
- P && (T = P);
19705
+ const O = this.getValue(d.lastPeriod);
19706
+ O && (T = O);
19691
19707
  }
19692
19708
  T && (u += c.measureText(T).width + s), c.font = `${r}px "Microsoft YaHei", sans-serif`;
19693
19709
  const I = this.getValue(d.periodMin), p = this.getValue(d.periodMax);
19694
19710
  if (I || p) {
19695
- const P = `${I || ""}~${p || ""}`;
19696
- R = Math.max(R, c.measureText(P).width);
19711
+ const O = `${I || ""}~${p || ""}`;
19712
+ R = Math.max(R, c.measureText(O).width);
19697
19713
  }
19698
19714
  const L = this.getValue(d.cycleMin), m = this.getValue(d.cycleMax);
19699
19715
  if (L || m) {
19700
- const P = `${L || ""}~${m || ""}`;
19701
- R = Math.max(R, c.measureText(P).width);
19716
+ const O = `${L || ""}~${m || ""}`;
19717
+ R = Math.max(R, c.measureText(O).width);
19702
19718
  }
19703
19719
  } else
19704
19720
  c.font = `${i}px "Microsoft YaHei", sans-serif`, R = c.measureText("~").width;
@@ -19746,10 +19762,10 @@ class Of {
19746
19762
  const I = T + u / 2, p = R + c;
19747
19763
  t.font = `${a}px "Microsoft YaHei", sans-serif`;
19748
19764
  const L = this.getValue(i.periodMin), m = this.getValue(i.periodMax);
19749
- let P = "";
19750
- L || m ? P = `${L || ""}~${m || ""}` : (t.font = `${l}px "Microsoft YaHei", sans-serif`, P = "~");
19751
- const S = t.measureText(P).width, E = I - S / 2;
19752
- t.fillText(P, E, p), this.drawDivider(t, T, g - l / 2, u, r), t.font = `${l}px "Microsoft YaHei", sans-serif`;
19765
+ let O = "";
19766
+ L || m ? O = `${L || ""}~${m || ""}` : (t.font = `${l}px "Microsoft YaHei", sans-serif`, O = "~");
19767
+ const S = t.measureText(O).width, E = I - S / 2;
19768
+ t.fillText(O, E, p), this.drawDivider(t, T, g - l / 2, u, r), t.font = `${l}px "Microsoft YaHei", sans-serif`;
19753
19769
  let b = "";
19754
19770
  if (i.isMenopause) {
19755
19771
  const X = this.getValue(i.menopauseAge);
@@ -19959,8 +19975,8 @@ class Mf {
19959
19975
  e.save();
19960
19976
  const a = Wr, c = a.fontSize * l, d = a.symbolGap * l, u = a.lineGap * l, R = a.totalHeight * l, g = n + a.totalWidth * l / 2, T = i - R / 2;
19961
19977
  e.font = `${c}px "Microsoft YaHei", sans-serif`, e.fillStyle = this.options.defaultColor, e.textBaseline = "middle", e.textAlign = "center";
19962
- const I = R / 4, p = T + I * 0.7, L = T + I * 1.7, m = T + I * 2.7, P = T + R - I * 0.3;
19963
- this.drawVerticalLine(e, g, T, P - T, l);
19978
+ const I = R / 4, p = T + I * 0.7, L = T + I * 1.7, m = T + I * 2.7, O = T + R - I * 0.3;
19979
+ this.drawVerticalLine(e, g, T, O - T, l);
19964
19980
  const S = g - d, E = g + d;
19965
19981
  this.drawSymbol(e, S, p, s?.a), this.drawSymbol(e, E, p, s?.b);
19966
19982
  const b = S - u, y = E + u;
@@ -20121,12 +20137,12 @@ class Sf {
20121
20137
  calculateLineHalfWidth(t, e) {
20122
20138
  const { minLineHalfWidth: n, maxLineHalfWidth: i, fontSize: r, deciduousFontSize: s, smallFontSize: l, toothGap: a } = gn, c = (T, I, p) => {
20123
20139
  let L = 0;
20124
- const m = (P, S) => `${P}-${S}`;
20125
- return I.forEach((P) => {
20126
- const S = m(p, P), E = t?.toothSurfaceMap?.[S] || [], b = t?.supernumeraryToothMap?.[S];
20140
+ const m = (O, S) => `${O}-${S}`;
20141
+ return I.forEach((O) => {
20142
+ const S = m(p, O), E = t?.toothSurfaceMap?.[S] || [], b = t?.supernumeraryToothMap?.[S];
20127
20143
  L += s * e * 0.6, E.length > 0 && (L += l * e * E.length * 0.5), b && (L += s * e * 0.4), L += a * e;
20128
- }), T.forEach((P) => {
20129
- const S = m(p, P), E = t?.toothSurfaceMap?.[S] || [], b = t?.supernumeraryToothMap?.[S];
20144
+ }), T.forEach((O) => {
20145
+ const S = m(p, O), E = t?.toothSurfaceMap?.[S] || [], b = t?.supernumeraryToothMap?.[S];
20130
20146
  L += r * e * 0.6, E.length > 0 && (L += l * e * E.length * 0.5), b && (L += r * e * 0.4), L += a * e;
20131
20147
  }), L;
20132
20148
  }, d = Math.max(c(t?.upperLeft || [], t?.upperLeftLetter || [], "upperLeft"), c(t?.lowerLeft || [], t?.lowerLeftLetter || [], "lowerLeft")), u = Math.max(c(t?.upperRight || [], t?.upperRightLetter || [], "upperRight"), c(t?.lowerRight || [], t?.lowerRightLetter || [], "lowerRight")), g = Math.max(d, u) / e + gn.halfGap;
@@ -20140,7 +20156,7 @@ class Sf {
20140
20156
  e.save();
20141
20157
  const a = gn.fontSize * l, c = gn.deciduousFontSize * l, d = gn.smallFontSize * l, u = gn.toothGap * l, R = gn.totalHeight * l, g = gn.halfGap * l, f = 2 * l, T = (E, b) => `${E}-${b}`, I = this.calculateLineHalfWidth(s, l), p = I * 2, L = n + I, m = i;
20142
20158
  e.beginPath(), e.rect(L - I, m - R / 2, p, R), e.clip(), e.beginPath(), e.strokeStyle = this.options.defaultColor, e.lineWidth = 1 * l, e.moveTo(L, m - R / 2 + 10 * l), e.lineTo(L, m + R / 2 - 10 * l), e.stroke(), e.beginPath(), e.moveTo(L - I, m), e.lineTo(L + I, m), e.stroke();
20143
- const P = (E, b, y, W, V) => {
20159
+ const O = (E, b, y, W, V) => {
20144
20160
  const F = T(E, b), Y = s?.toothSurfaceMap?.[F] || [], x = yr.filter((w) => Y.includes(w)), X = s?.supernumeraryToothMap?.[F], N = b.toString(), U = typeof b == "string" ? c : a;
20145
20161
  e.font = `${U}px "Microsoft YaHei", sans-serif`, e.textBaseline = "middle";
20146
20162
  let C = y;
@@ -20162,13 +20178,13 @@ class Sf {
20162
20178
  }, S = (E, b, y, W, V, F) => {
20163
20179
  let Y = W;
20164
20180
  F === "right" ? ([...b].reverse().forEach((N) => {
20165
- Y = P(y, N, Y, V, F);
20181
+ Y = O(y, N, Y, V, F);
20166
20182
  }), [...E].reverse().forEach((N) => {
20167
- Y = P(y, N, Y, V, F);
20183
+ Y = O(y, N, Y, V, F);
20168
20184
  })) : (b.forEach((x) => {
20169
- Y = P(y, x, Y, V, F);
20185
+ Y = O(y, x, Y, V, F);
20170
20186
  }), E.forEach((x) => {
20171
- Y = P(y, x, Y, V, F);
20187
+ Y = O(y, x, Y, V, F);
20172
20188
  }));
20173
20189
  };
20174
20190
  S(s?.upperLeft || [], s?.upperLeftLetter || [], "upperLeft", L - g, m - R / 4, "right"), S(s?.upperRight || [], s?.upperRightLetter || [], "upperRight", L + g, m - R / 4, "left"), S(s?.lowerLeft || [], s?.lowerLeftLetter || [], "lowerLeft", L - g, m + R / 4, "right"), S(s?.lowerRight || [], s?.lowerRightLetter || [], "lowerRight", L + g, m + R / 4, "left"), e.restore();
@@ -20705,19 +20721,19 @@ class Sf {
20705
20721
  if (!e)
20706
20722
  return;
20707
20723
  const n = (d, u) => `${d}-${u}`, i = (d, u) => {
20708
- const R = n(d, u), g = this.toothSurfaceMap[R] || [], f = yr.filter((P) => g.includes(P)), T = this.supernumeraryToothMap[R], I = u.toString(), L = typeof u == "string" ? "tooth-preview-tooth-value tooth-preview-tooth-value--deciduous" : "tooth-preview-tooth-value", m = f.length > 0 ? `<sup class="tooth-preview-surface">${f.join(",")}</sup>` : "";
20724
+ const R = n(d, u), g = this.toothSurfaceMap[R] || [], f = yr.filter((O) => g.includes(O)), T = this.supernumeraryToothMap[R], I = u.toString(), L = typeof u == "string" ? "tooth-preview-tooth-value tooth-preview-tooth-value--deciduous" : "tooth-preview-tooth-value", m = f.length > 0 ? `<sup class="tooth-preview-surface">${f.join(",")}</sup>` : "";
20709
20725
  if (T) {
20710
- const P = '<sup class="tooth-preview-supernumerary">S</sup>';
20726
+ const O = '<sup class="tooth-preview-supernumerary">S</sup>';
20711
20727
  return T === "Si" ? `<span class="tooth-preview-tooth">
20712
20728
  <span class="tooth-preview-tooth-bracket">(</span>
20713
- ${P}
20729
+ ${O}
20714
20730
  <span class="${L}">${I}</span>
20715
20731
  <span class="tooth-preview-tooth-bracket">)</span>
20716
20732
  ${m}
20717
20733
  </span>` : `<span class="tooth-preview-tooth">
20718
20734
  <span class="tooth-preview-tooth-bracket">(</span>
20719
20735
  <span class="${L}">${I}</span>
20720
- ${P}
20736
+ ${O}
20721
20737
  <span class="tooth-preview-tooth-bracket">)</span>
20722
20738
  ${m}
20723
20739
  </span>`;
@@ -21125,11 +21141,11 @@ class bf {
21125
21141
  const { mime: E } = this.previewerDrawOption;
21126
21142
  kr(i.src, `${this.curElement?.id}.${E || "png"}`);
21127
21143
  }, c.append(L), t.append(c), this.previewerContainer = t, document.body.append(t);
21128
- let m = 0, P = 0, S = !1;
21144
+ let m = 0, O = 0, S = !1;
21129
21145
  i.onmousedown = (E) => {
21130
- S = !0, m = E.x, P = E.y, t.style.cursor = "move";
21146
+ S = !0, m = E.x, O = E.y, t.style.cursor = "move";
21131
21147
  }, t.onmousemove = (E) => {
21132
- S && (r += E.x - m, s += E.y - P, m = E.x, P = E.y, this._setPreviewerTransform(l, a, r, s));
21148
+ S && (r += E.x - m, s += E.y - O, m = E.x, O = E.y, this._setPreviewerTransform(l, a, r, s));
21133
21149
  }, t.onmouseup = () => {
21134
21150
  S = !1, t.style.cursor = "auto";
21135
21151
  }, t.onwheel = (E) => {
@@ -21201,7 +21217,7 @@ class xf {
21201
21217
  const [n, i] = e, r = this.draw.getElementList(), s = r[n + 1];
21202
21218
  this.draw.spliceElementList(r, n + 1, i - n), this.range.setRange(n, n);
21203
21219
  const l = {
21204
- type: O.DATE,
21220
+ type: P.DATE,
21205
21221
  value: "",
21206
21222
  dateFormat: s.dateFormat,
21207
21223
  valueList: [
@@ -21220,7 +21236,7 @@ class xf {
21220
21236
  if (!~n && !~i)
21221
21237
  return null;
21222
21238
  const r = this.draw.getElementList(), s = r[n];
21223
- if (s.type !== O.DATE)
21239
+ if (s.type !== P.DATE)
21224
21240
  return null;
21225
21241
  let l = n;
21226
21242
  for (; l >= 0; ) {
@@ -21458,7 +21474,7 @@ class Wf {
21458
21474
  const t = this.draw.getOriginalMainElementList(), e = [];
21459
21475
  for (let n = 0; n < t.length; n++) {
21460
21476
  const i = t[n];
21461
- i.type === O.BLOCK && e.push(i.id);
21477
+ i.type === P.BLOCK && e.push(i.id);
21462
21478
  }
21463
21479
  this.blockMap.forEach((n) => {
21464
21480
  const i = n.getBlockElement().id;
@@ -21631,14 +21647,14 @@ class Jf {
21631
21647
  this.indicatorContainer = document.createElement("div"), this.indicatorContainer.classList.add(`${nt}-zone-indicator`);
21632
21648
  const u = this.draw.getHeader(), R = this.draw.getFooter(), g = e ? u.getHeight() : R.getHeight(), f = e ? u.getHeaderTop() : a - R.getFooterBottom() - g;
21633
21649
  for (let T = 0; T < r.length; T++) {
21634
- const I = d * T + f, p = s[3] - this.INDICATOR_PADDING, L = s[3] + l + this.INDICATOR_PADDING, m = e ? I - this.INDICATOR_PADDING : I + g + this.INDICATOR_PADDING, P = e ? I + g + this.INDICATOR_PADDING : I - this.INDICATOR_PADDING, S = document.createElement("div");
21635
- S.innerText = this.i18n.t(`frame.${e ? "header" : "footer"}`), S.style.top = `${P}px`, S.style.transform = `translate(${n * t}px, ${i * t}px) scale(${t})`, this.indicatorContainer.append(S);
21650
+ const I = d * T + f, p = s[3] - this.INDICATOR_PADDING, L = s[3] + l + this.INDICATOR_PADDING, m = e ? I - this.INDICATOR_PADDING : I + g + this.INDICATOR_PADDING, O = e ? I + g + this.INDICATOR_PADDING : I - this.INDICATOR_PADDING, S = document.createElement("div");
21651
+ S.innerText = this.i18n.t(`frame.${e ? "header" : "footer"}`), S.style.top = `${O}px`, S.style.transform = `translate(${n * t}px, ${i * t}px) scale(${t})`, this.indicatorContainer.append(S);
21636
21652
  const E = document.createElement("span");
21637
21653
  E.classList.add(`${nt}-zone-indicator-border__top`), E.style.top = `${m}px`, E.style.width = `${l}px`, E.style.marginLeft = `${s[3]}px`, this.indicatorContainer.append(E);
21638
21654
  const b = document.createElement("span");
21639
21655
  b.classList.add(`${nt}-zone-indicator-border__left`), b.style.top = `${I}px`, b.style.height = `${g}px`, b.style.left = `${p}px`, this.indicatorContainer.append(b);
21640
21656
  const y = document.createElement("span");
21641
- y.classList.add(`${nt}-zone-indicator-border__bottom`), y.style.top = `${P}px`, this.indicatorContainer.append(y);
21657
+ y.classList.add(`${nt}-zone-indicator-border__bottom`), y.style.top = `${O}px`, this.indicatorContainer.append(y);
21642
21658
  const W = document.createElement("span");
21643
21659
  W.classList.add(`${nt}-zone-indicator-border__right`), W.style.top = `${I}px`, W.style.height = `${g}px`, W.style.left = `${L}px`, this.indicatorContainer.append(W);
21644
21660
  }
@@ -21864,7 +21880,7 @@ class $f {
21864
21880
  return;
21865
21881
  let c = 0;
21866
21882
  const { defaultTabWidth: d, scale: u } = this.options;
21867
- for (let I = 1; I < i.length && i[I]?.type === O.TAB; I++)
21883
+ for (let I = 1; I < i.length && i[I]?.type === P.TAB; I++)
21868
21884
  c += d * u;
21869
21885
  const { coordinate: { leftTop: [R, g] } } = n, f = R - r + c, T = g + l;
21870
21886
  if (a.listStyle === Xe.CHECKBOX) {
@@ -22003,7 +22019,7 @@ class zf {
22003
22019
  const n = [];
22004
22020
  for (let i = 0; i < t.length; i++) {
22005
22021
  const r = t[i];
22006
- if (r.type === O.TABLE) {
22022
+ if (r.type === P.TABLE) {
22007
22023
  const s = r.trList;
22008
22024
  for (let l = 0; l < s.length; l++) {
22009
22025
  const a = s[l];
@@ -22037,7 +22053,7 @@ class zf {
22037
22053
  getContextByGroupId(t, e) {
22038
22054
  for (let n = 0; n < t.length; n++) {
22039
22055
  const i = t[n];
22040
- if (i.type === O.TABLE) {
22056
+ if (i.type === P.TABLE) {
22041
22057
  const s = i.trList;
22042
22058
  for (let l = 0; l < s.length; l++) {
22043
22059
  const a = s[l];
@@ -22141,8 +22157,8 @@ class tT {
22141
22157
  for (let f = 0; f < g.length; f++) {
22142
22158
  const T = g[f], { coordinate: { leftBottom: I } } = u[T.startIndex], p = a === ni.PAGE ? f + 1 : T.rowIndex + 1, L = c.measureText(t, {
22143
22159
  value: `${p}`
22144
- }), m = d[3] - (L.width + l) * n, P = I[1] - L.actualBoundingBoxAscent * n;
22145
- t.fillText(`${p}`, m, P);
22160
+ }), m = d[3] - (L.width + l) * n, O = I[1] - L.actualBoundingBoxAscent * n;
22161
+ t.fillText(`${p}`, m, O);
22146
22162
  }
22147
22163
  t.restore();
22148
22164
  }
@@ -22218,7 +22234,7 @@ class iT {
22218
22234
  u.push(I);
22219
22235
  }
22220
22236
  const R = {
22221
- type: O.TABLE,
22237
+ type: P.TABLE,
22222
22238
  value: "",
22223
22239
  colgroup: c,
22224
22240
  trList: u
@@ -22326,7 +22342,7 @@ class iT {
22326
22342
  }), this.range.setRange(0, 0), this.draw.render({ curIndex: 0 });
22327
22343
  }
22328
22344
  adjustColWidth(t) {
22329
- if (t.type !== O.TABLE)
22345
+ if (t.type !== P.TABLE)
22330
22346
  return;
22331
22347
  const { defaultColMinWidth: e } = this.options.table, n = t.colgroup, i = n.reduce((s, l) => s + l.width, 0), r = this.draw.getOriginalInnerWidth();
22332
22348
  if (i > r) {
@@ -22510,7 +22526,7 @@ class iT {
22510
22526
  }
22511
22527
  if (!p.length)
22512
22528
  return;
22513
- const L = p[p.length - 1], m = p[0][0], P = L[L.length - 1], S = m.x, E = m.y, b = P.x + P.width, y = P.y + P.height;
22529
+ const L = p[p.length - 1], m = p[0][0], O = L[L.length - 1], S = m.x, E = m.y, b = O.x + O.width, y = O.y + O.height;
22514
22530
  for (let x = 0; x < p.length; x++) {
22515
22531
  const X = p[x];
22516
22532
  for (let N = 0; N < X.length; N++) {
@@ -22904,7 +22920,7 @@ class sT {
22904
22920
  const l = e || mt();
22905
22921
  return this.draw.insertElementList([
22906
22922
  {
22907
- type: O.AREA,
22923
+ type: P.AREA,
22908
22924
  value: "",
22909
22925
  areaId: l,
22910
22926
  valueList: n,
@@ -23021,7 +23037,7 @@ class sT {
23021
23037
  const { positionList: i } = n, r = this.draw.getOriginalMainElementList(), s = t.value;
23022
23038
  re([
23023
23039
  {
23024
- type: O.AREA,
23040
+ type: P.AREA,
23025
23041
  value: "",
23026
23042
  valueList: s,
23027
23043
  areaId: n.id,
@@ -23537,7 +23553,7 @@ class cT {
23537
23553
  const n = (l) => l ? /^[\s\u00A0\u2000-\u200B\u3000\n\r\t]+$/.test(l) : !1, i = (l, a) => {
23538
23554
  for (let c = 0; c < l.length; c++) {
23539
23555
  const d = l[c];
23540
- if (d.type === O.TABLE && d.trList)
23556
+ if (d.type === P.TABLE && d.trList)
23541
23557
  for (const u of d.trList)
23542
23558
  for (const R of u.tdList)
23543
23559
  i(R.value, a);
@@ -23547,7 +23563,7 @@ class cT {
23547
23563
  e && i(t, r), ((l) => {
23548
23564
  for (let a = 0; a < l.length; a++) {
23549
23565
  const c = l[a];
23550
- if (c.type === O.TABLE && c.trList)
23566
+ if (c.type === P.TABLE && c.trList)
23551
23567
  for (const d of c.trList)
23552
23568
  for (const u of d.tdList)
23553
23569
  this.hideTextFieldWhitespace(u.value, e);
@@ -23583,7 +23599,7 @@ class cT {
23583
23599
  let r = !1, s = 0;
23584
23600
  for (; s < i.length; ) {
23585
23601
  const l = i[s];
23586
- if (l.type === O.SUB_TEMPLATE) {
23602
+ if (l.type === P.SUB_TEMPLATE) {
23587
23603
  const a = !!l.subTemplateConditions?.length;
23588
23604
  if (this.mode === K.EDIT && a)
23589
23605
  r = this.syncSubTemplateExpandedState(i, s, l, !0, !0) || r;
@@ -23592,7 +23608,7 @@ class cT {
23592
23608
  r = this.syncSubTemplateExpandedState(i, s, l, c, !0) || r;
23593
23609
  } else this.mode !== K.FORM && this.mode !== K.PRINT && (r = this.syncSubTemplateExpandedState(i, s, l, !1, !1) || r);
23594
23610
  }
23595
- if (l.valueList?.length && (r = n(l.valueList) || r), l.control?.value?.length && (r = n(l.control.value) || r), l.type === O.TABLE && l.trList?.length)
23611
+ if (l.valueList?.length && (r = n(l.valueList) || r), l.control?.value?.length && (r = n(l.control.value) || r), l.type === P.TABLE && l.trList?.length)
23596
23612
  for (let a = 0; a < l.trList.length; a++) {
23597
23613
  const c = l.trList[a];
23598
23614
  for (let d = 0; d < c.tdList.length; d++)
@@ -23628,7 +23644,7 @@ class cT {
23628
23644
  let l = 0;
23629
23645
  for (; l < s.length; ) {
23630
23646
  const a = s[l];
23631
- if (a.type === O.TABLE && a.trList)
23647
+ if (a.type === P.TABLE && a.trList)
23632
23648
  for (const c of a.trList)
23633
23649
  for (const d of c.tdList)
23634
23650
  this.updateTextFieldPlaceholderVisibility(d.value, e, n);
@@ -23640,22 +23656,22 @@ class cT {
23640
23656
  for (; L < s.length; ) {
23641
23657
  const m = s[L];
23642
23658
  if (m.controlId !== c) {
23643
- const P = m.controlId;
23659
+ const O = m.controlId;
23644
23660
  let S = d === D.TEXT, E = L;
23645
23661
  if (S)
23646
- for (; E < s.length && s[E].controlId === P; )
23662
+ for (; E < s.length && s[E].controlId === O; )
23647
23663
  E++;
23648
23664
  else
23649
23665
  for (; E < s.length; ) {
23650
23666
  const b = s[E];
23651
- if (b.controlId !== P)
23667
+ if (b.controlId !== O)
23652
23668
  break;
23653
- b.controlComponent === h.VALUE && (b.value && b.value.trim() || b.type === O.MENSTRUAL_HISTORY || b.type === O.FETAL_HEART_POSITION || b.type === O.TOOTH_POSITION || b.type === O.MACRO || b.type === O.CUSTOM_MACRO) && (S = !0), E++;
23669
+ b.controlComponent === h.VALUE && (b.value && b.value.trim() || b.type === P.MENSTRUAL_HISTORY || b.type === P.FETAL_HEART_POSITION || b.type === P.TOOTH_POSITION || b.type === P.MACRO || b.type === P.CUSTOM_MACRO) && (S = !0), E++;
23654
23670
  }
23655
23671
  S && (R = !0), L = E;
23656
23672
  continue;
23657
23673
  }
23658
- if ((m.controlComponent === h.PREFIX || m.controlComponent === h.PRETEXTFIX || m.controlComponent === h.PRETEXTFIX_TEXT) && T.push(L), m.controlComponent === h.VALUE && m.value && m.value.trim() && (u = !0), m.controlComponent === h.VALUE && (m.type === O.MENSTRUAL_HISTORY || m.type === O.FETAL_HEART_POSITION || m.type === O.TOOTH_POSITION || m.type === O.MACRO || m.type === O.CUSTOM_MACRO) && (u = !0), m.controlComponent === h.VALUE && m.control && m.control.type !== d && (R = !0), m.controlComponent === h.PLACEHOLDER && (g = !0, f.push(L)), m.controlComponent === h.POSTFIX || m.controlComponent === h.POSTTEXTFIX || m.controlComponent === h.POSTTEXTFIX_TEXT) {
23674
+ if ((m.controlComponent === h.PREFIX || m.controlComponent === h.PRETEXTFIX || m.controlComponent === h.PRETEXTFIX_TEXT) && T.push(L), m.controlComponent === h.VALUE && m.value && m.value.trim() && (u = !0), m.controlComponent === h.VALUE && (m.type === P.MENSTRUAL_HISTORY || m.type === P.FETAL_HEART_POSITION || m.type === P.TOOTH_POSITION || m.type === P.MACRO || m.type === P.CUSTOM_MACRO) && (u = !0), m.controlComponent === h.VALUE && m.control && m.control.type !== d && (R = !0), m.controlComponent === h.PLACEHOLDER && (g = !0, f.push(L)), m.controlComponent === h.POSTFIX || m.controlComponent === h.POSTTEXTFIX || m.controlComponent === h.POSTTEXTFIX_TEXT) {
23659
23675
  I.push(L), p = L;
23660
23676
  break;
23661
23677
  }
@@ -24332,7 +24348,7 @@ class cT {
24332
24348
  const c = n === i, d = n + 1;
24333
24349
  c || this.newSpliceElementList(r, d, i - n), this.newSpliceElementList(r, d, 0, t), l = n + t.length;
24334
24350
  const u = r[d - 1];
24335
- t[0].listId && u && !u.listId && u?.value === A && (!u.type || u.type === O.TEXTFIELD) && (r.splice(n, 1), l -= 1);
24351
+ t[0].listId && u && !u.listId && u?.value === A && (!u.type || u.type === P.TEXTFIELD) && (r.splice(n, 1), l -= 1);
24336
24352
  }
24337
24353
  this.control.destroyControl(), ~l && (this.range.setRange(l, l), this.render({
24338
24354
  curIndex: l,
@@ -24371,7 +24387,7 @@ class cT {
24371
24387
  c && !L && !m && (a[n]?.control?.type === D.TEXTFIELD || a[n]?.control?.type === D.TEXT) && this.control.removePlaceholder(n), c || this.newSpliceElementList(a, d, i - n);
24372
24388
  const S = L || m || p ? u.originControlId : a[n]?.controlId || a[n - 1]?.controlId || a[n + 1]?.controlId;
24373
24389
  for (let E = 0; E < t.length; E++) {
24374
- if ((L || m || p) && !t[E].control && (t[E].controlId = S, t[E].control = p ? I?.control : R.control, t[E].controlComponent = h.VALUE, delete t[E].originControlId), t[E]?.control?.type == "button" && !t[E]?.control?.buttonText && (t[E]?.controlComponent === "prefix" || t[E]?.controlComponent === "postfix" ? (t[E].color = "transparent", t[E].highlight = "#1677FF") : (t[E].color = "#fff", t[E].highlight = "#1677FF")), t[E]?.type === O.MENSTRUAL_HISTORY || t[E]?.type === O.FETAL_HEART_POSITION || t[E]?.type === O.TOOTH_POSITION || t[E]?.type === O.MACRO || t[E]?.type === O.CUSTOM_MACRO || t[E]?.type === O.REUSABLE_ITEM || t[E]?.type === O.SUB_TEMPLATE || t[E]?.type === O.SPECIAL_SYMBOLS) {
24390
+ if ((L || m || p) && !t[E].control && (t[E].controlId = S, t[E].control = p ? I?.control : R.control, t[E].controlComponent = h.VALUE, delete t[E].originControlId), t[E]?.control?.type == "button" && !t[E]?.control?.buttonText && (t[E]?.controlComponent === "prefix" || t[E]?.controlComponent === "postfix" ? (t[E].color = "transparent", t[E].highlight = "#1677FF") : (t[E].color = "#fff", t[E].highlight = "#1677FF")), t[E]?.type === P.MENSTRUAL_HISTORY || t[E]?.type === P.FETAL_HEART_POSITION || t[E]?.type === P.TOOTH_POSITION || t[E]?.type === P.MACRO || t[E]?.type === P.CUSTOM_MACRO || t[E]?.type === P.REUSABLE_ITEM || t[E]?.type === P.SUB_TEMPLATE || t[E]?.type === P.SPECIAL_SYMBOLS) {
24375
24391
  t[E].controlComponent = h.VALUE;
24376
24392
  let b = a[n]?.controlId;
24377
24393
  b || (b = a[n - 1]?.controlId), b || (b = a[n + 1]?.controlId), !t[E].controlId && b && (t[E].controlId = b);
@@ -24384,7 +24400,7 @@ class cT {
24384
24400
  if (a[d]?.control?.type == "TextField" || a[n]?.control?.type == "TextField") {
24385
24401
  c || this.newSpliceElementList(a, d, i - n);
24386
24402
  for (let u = 0; u < t.length; u++)
24387
- if (t[u]?.type === O.MENSTRUAL_HISTORY || t[u]?.type === O.FETAL_HEART_POSITION || t[u]?.type === O.TOOTH_POSITION || t[u]?.type === O.MACRO || t[u]?.type === O.CUSTOM_MACRO || t[u]?.type === O.REUSABLE_ITEM || t[u]?.type === O.SUB_TEMPLATE || t[u]?.type === O.SPECIAL_SYMBOLS) {
24403
+ if (t[u]?.type === P.MENSTRUAL_HISTORY || t[u]?.type === P.FETAL_HEART_POSITION || t[u]?.type === P.TOOTH_POSITION || t[u]?.type === P.MACRO || t[u]?.type === P.CUSTOM_MACRO || t[u]?.type === P.REUSABLE_ITEM || t[u]?.type === P.SUB_TEMPLATE || t[u]?.type === P.SPECIAL_SYMBOLS) {
24388
24404
  t[u].controlComponent = h.VALUE;
24389
24405
  const R = a[n]?.controlId || a[d]?.controlId;
24390
24406
  !t[u].controlId && R && (t[u].controlId = R);
@@ -24396,7 +24412,7 @@ class cT {
24396
24412
  t[R]?.control?.type == "button" && !t[R]?.control?.buttonText && (t[R]?.controlComponent === "prefix" || t[R]?.controlComponent === "postfix" ? (t[R].color = "transparent", t[R].highlight = "#1677FF") : (t[R].color = "#fff", t[R].highlight = "#1677FF"));
24397
24413
  this.spliceElementList(a, d, 0, t), s = n + t.length;
24398
24414
  const u = a[d - 1];
24399
- t[0].listId && u && !u.listId && u?.value === A && (!u.type || u.type === O.TEXT) && (a.splice(n, 1), s -= 1);
24415
+ t[0].listId && u && !u.listId && u?.value === A && (!u.type || u.type === P.TEXT) && (a.splice(n, 1), s -= 1);
24400
24416
  }
24401
24417
  }
24402
24418
  ~s && (this.range.setRange(s, s), this.render({
@@ -24772,7 +24788,7 @@ class cT {
24772
24788
  return s < 12 ? l = s / 12 : s > 30 && (l = 1 + (s - 30) / 30), n * l * (t.rowMargin ?? i) * r;
24773
24789
  }
24774
24790
  computeRowList(t) {
24775
- const { innerWidth: e, elementList: n, isPagingMode: i = !1, isFromTable: r = !1, startX: s = 0, startY: l = 0, pageHeight: a = 0, mainOuterHeight: c = 0, surroundElementList: d = [] } = t, { defaultSize: u, scale: R, imgCaption: g, table: { tdPadding: f, defaultTrMinHeight: T }, defaultTabWidth: I } = this.options, p = this.getDefaultBasicRowMarginHeight(), m = document.createElement("canvas").getContext("2d"), P = this.listParticle.computeListStyle(m, n), S = [], E = this._collectTextControlValueSet(n), b = this._collectTextControlHasContentSet(n);
24791
+ const { innerWidth: e, elementList: n, isPagingMode: i = !1, isFromTable: r = !1, startX: s = 0, startY: l = 0, pageHeight: a = 0, mainOuterHeight: c = 0, surroundElementList: d = [] } = t, { defaultSize: u, scale: R, imgCaption: g, table: { tdPadding: f, defaultTrMinHeight: T }, defaultTabWidth: I } = this.options, p = this.getDefaultBasicRowMarginHeight(), m = document.createElement("canvas").getContext("2d"), O = this.listParticle.computeListStyle(m, n), S = [], E = this._collectTextControlValueSet(n), b = this._collectTextControlHasContentSet(n);
24776
24792
  n.length && S.push({
24777
24793
  width: 0,
24778
24794
  height: 0,
@@ -24791,7 +24807,7 @@ class cT {
24791
24807
  height: 0,
24792
24808
  boundingBoxAscent: 0,
24793
24809
  boundingBoxDescent: 0
24794
- }, w = N.offsetX || M.listId && P.get(M.listId) || 0, v = e - w, H = N.elementList.length === 1;
24810
+ }, w = N.offsetX || M.listId && O.get(M.listId) || 0, v = e - w, H = N.elementList.length === 1;
24795
24811
  if (y += H ? w : 0, W += H && N.offsetY || 0, (M.control?.type === D.TEXTFIELD || M.control?.type === D.TEXT) && !this.isDesignMode() && (M.controlComponent === h.PRETEXTFIX || M.controlComponent === h.PRETEXTFIX_TEXT || M.controlComponent === h.POSTTEXTFIX || M.controlComponent === h.POSTTEXTFIX_TEXT || M.controlComponent === h.TEXTFIXLABEL || M.controlComponent === h.PLACEHOLDER || M.controlComponent === h.PREFIX || M.controlComponent === h.POSTFIX)) {
24796
24812
  const _ = M.control?.type === D.TEXTFIELD, j = M.controlId, G = !!j && !!E?.has(j);
24797
24813
  if (_) {
@@ -24805,7 +24821,7 @@ class cT {
24805
24821
  if (Pe(M) && !this.isDesignMode()) {
24806
24822
  const _ = N.elementList[N.elementList.length - 1];
24807
24823
  C.height = _?.metrics.height || this.options.defaultSize * R, C.boundingBoxAscent = _?.metrics.boundingBoxAscent || 0, C.boundingBoxDescent = _?.metrics.boundingBoxDescent || 0;
24808
- } else if (M.type === O.IMAGE || M.type === O.LATEX)
24824
+ } else if (M.type === P.IMAGE || M.type === P.LATEX)
24809
24825
  if (M.imgDisplay === Pt.SURROUND || M.imgDisplay === Pt.FLOAT_TOP || M.imgDisplay === Pt.FLOAT_BOTTOM)
24810
24826
  C.width = 0, C.height = 0, C.boundingBoxDescent = 0;
24811
24827
  else {
@@ -24820,7 +24836,7 @@ class cT {
24820
24836
  C.boundingBoxAscent += Rt;
24821
24837
  }
24822
24838
  }
24823
- else if (M.type === O.TABLE) {
24839
+ else if (M.type === P.TABLE) {
24824
24840
  const _ = M.tdPadding || f;
24825
24841
  if (M.pagingId) {
24826
24842
  let st = X + 1, ft = 0;
@@ -24832,7 +24848,7 @@ class cT {
24832
24848
  for (let bt = 0; bt < M.trList.length; bt++) {
24833
24849
  const jt = M.trList[bt], ee = jt.tdList.find(({ id: Zt }) => Zt === $t.originalId);
24834
24850
  if (ee) {
24835
- $t.value[0]?.type === O.SPLIT_TAG && $t.value.splice(0, 1), ee.value.push(
24851
+ $t.value[0]?.type === P.SPLIT_TAG && $t.value.splice(0, 1), ee.value.push(
24836
24852
  ...$t.value.map((Zt) => this.updateElementTableInfo(Zt, M, jt, ee))
24837
24853
  ), ee.rowspan = ee.originalRowspan ?? ee.rowspan;
24838
24854
  break;
@@ -24861,7 +24877,7 @@ class cT {
24861
24877
  const j = this.tableParticle.getTableHeight(M), G = this.tableParticle.getTableWidth(M);
24862
24878
  M.width = G, M.height = j;
24863
24879
  const ot = G * R, Rt = j * R;
24864
- if (C.width = ot, C.height = Rt, C.boundingBoxDescent = Rt, C.boundingBoxAscent = -U, n[X + 1]?.type === O.TABLE && (C.boundingBoxAscent -= U), i) {
24880
+ if (C.width = ot, C.height = Rt, C.boundingBoxDescent = Rt, C.boundingBoxAscent = -U, n[X + 1]?.type === P.TABLE && (C.boundingBoxAscent -= U), i) {
24865
24881
  const st = this.getHeight(), ft = this.getMainOuterHeight();
24866
24882
  let Ot = ft;
24867
24883
  for (let bt = 0; bt < S.length; bt++) {
@@ -24869,7 +24885,7 @@ class cT {
24869
24885
  jt.height + Ot + ee > st || S[bt - 1]?.isPageBreak ? Ot = ft + jt.height + ee : Ot += jt.height + ee;
24870
24886
  }
24871
24887
  const Ct = U * 2, Kt = M.trList[0].height * R;
24872
- (Ot + Kt + Ct > st || M.pagingIndex !== 0 && M.trList[0].pagingRepeat || n[X - 1]?.type === O.PAGE_BREAK) && (Ot = ft);
24888
+ (Ot + Kt + Ct > st || M.pagingIndex !== 0 && M.trList[0].pagingRepeat || n[X - 1]?.type === P.PAGE_BREAK) && (Ot = ft);
24873
24889
  let $t = st - (Ot + Ct);
24874
24890
  if (Rt > $t) {
24875
24891
  const bt = M.trList;
@@ -24932,7 +24948,7 @@ class cT {
24932
24948
  ut.original.linkTdNextId = ut.id, ut.value.length && ut.value[0].value !== A && ut.value.unshift({
24933
24949
  ...ut.original.value.slice(-1).pop(),
24934
24950
  value: A,
24935
- type: O.SPLIT_TAG
24951
+ type: P.SPLIT_TAG
24936
24952
  });
24937
24953
  }), bt.splice(jt + 1, 0, Xt), jt += 1, ee = bt.length - jt, Ce = !1), yt.forEach((ut) => {
24938
24954
  if (ut.rowspan > 1) {
@@ -24999,29 +25015,29 @@ class cT {
24999
25015
  }
25000
25016
  }
25001
25017
  this.initTableElementIndex(M, X);
25002
- } else if (M.type === O.SEPARATOR) {
25018
+ } else if (M.type === P.SEPARATOR) {
25003
25019
  const { separator: { lineWidth: _ } } = this.options, j = M.lineWidth || _;
25004
25020
  M.width = v / R, C.width = v, C.height = j * R, C.boundingBoxAscent = -U, C.boundingBoxDescent = -U + C.height;
25005
- } else if (M.type === O.PAGE_BREAK)
25021
+ } else if (M.type === P.PAGE_BREAK)
25006
25022
  M.width = v / R, C.width = v, C.height = u;
25007
- else if (M.type === O.RADIO || M.controlComponent === h.RADIO) {
25023
+ else if (M.type === P.RADIO || M.controlComponent === h.RADIO) {
25008
25024
  const { width: _, height: j, gap: G } = this.options.radio, ot = _ + G * (M.controlComponent ? 1 : 2);
25009
25025
  M.width = ot, C.width = ot * R, C.height = j * R;
25010
- } else if (M.type === O.CHECKBOX || M.controlComponent === h.CHECKBOX) {
25026
+ } else if (M.type === P.CHECKBOX || M.controlComponent === h.CHECKBOX) {
25011
25027
  const { width: _, height: j, gap: G } = this.options.checkbox, ot = _ + G * (M.controlComponent ? 1 : 2);
25012
25028
  M.width = ot, C.width = ot * R, C.height = j * R;
25013
- } else if (M.type === O.MENSTRUAL_HISTORY) {
25029
+ } else if (M.type === P.MENSTRUAL_HISTORY) {
25014
25030
  const _ = this.menstrualHistoryParticle.computeSize(M);
25015
25031
  M.width = _.width / R, C.width = _.width, C.height = _.height, C.boundingBoxAscent = _.height, C.boundingBoxDescent = 0;
25016
- } else if (M.type === O.FETAL_HEART_POSITION) {
25032
+ } else if (M.type === P.FETAL_HEART_POSITION) {
25017
25033
  const _ = this.fetalHeartPositionParticle.computeSize();
25018
25034
  M.width = _.width / R, C.width = _.width, C.height = _.height, C.boundingBoxAscent = _.height / 2, C.boundingBoxDescent = _.height / 2;
25019
- } else if (M.type === O.TOOTH_POSITION) {
25035
+ } else if (M.type === P.TOOTH_POSITION) {
25020
25036
  const _ = this.toothPositionParticle.computeSize(M);
25021
25037
  M.width = _.width / R, C.width = _.width, C.height = _.height, C.boundingBoxAscent = _.height / 2, C.boundingBoxDescent = _.height / 2;
25022
- } else if (M.type === O.TAB)
25038
+ } else if (M.type === P.TAB)
25023
25039
  C.width = I * R, C.height = u * R, C.boundingBoxDescent = 0, C.boundingBoxAscent = this.textParticle.getBasisWordBoundingBoxAscent(m, m.font);
25024
- else if (M.type === O.BLOCK) {
25040
+ else if (M.type === P.BLOCK) {
25025
25041
  if (!M.width)
25026
25042
  C.width = v;
25027
25043
  else {
@@ -25029,16 +25045,16 @@ class cT {
25029
25045
  C.width = Math.min(_, v);
25030
25046
  }
25031
25047
  C.height = M.height * R, C.boundingBoxDescent = C.height, C.boundingBoxAscent = 0;
25032
- } else if (M.type === O.LABEL) {
25048
+ } else if (M.type === P.LABEL) {
25033
25049
  const { defaultSize: _, label: { defaultPadding: j } } = this.options;
25034
25050
  m.font = this.getElementFont(M);
25035
25051
  const G = this.textParticle.measureText(m, M);
25036
25052
  C.width = (G.width + j[1] + j[3]) * R, C.height = (M.size || _) * R, C.boundingBoxDescent = 0, C.boundingBoxAscent = (j[0] + G.actualBoundingBoxAscent) * R;
25037
- } else if (M.type === O.MACRO || M.type === O.CUSTOM_MACRO || M.type === O.REUSABLE_ITEM || M.type === O.SUB_TEMPLATE) {
25053
+ } else if (M.type === P.MACRO || M.type === P.CUSTOM_MACRO || M.type === P.REUSABLE_ITEM || M.type === P.SUB_TEMPLATE) {
25038
25054
  const { defaultSize: _ } = this.options;
25039
25055
  m.font = this.getElementFont(M);
25040
25056
  const j = this.getMode(), G = j === K.EDIT, ot = j === K.FORM;
25041
- if (j === K.READONLY && M.type !== O.SUB_TEMPLATE) {
25057
+ if (j === K.READONLY && M.type !== P.SUB_TEMPLATE) {
25042
25058
  const Rt = Ps(M), st = m.measureText(Rt);
25043
25059
  C.width = st.width, C.height = (M.size || _) * R, C.boundingBoxDescent = st.actualBoundingBoxDescent, C.boundingBoxAscent = st.actualBoundingBoxAscent;
25044
25060
  } else if (G) {
@@ -25050,7 +25066,7 @@ class cT {
25050
25066
  C.height = Ct + Ot * 2;
25051
25067
  const Kt = this.textParticle.measureBasisWord(m, this.getElementFont(M));
25052
25068
  C.boundingBoxAscent = Kt.actualBoundingBoxAscent * R, C.boundingBoxDescent = Kt.actualBoundingBoxDescent * R;
25053
- } else if (M.type === O.CUSTOM_MACRO) {
25069
+ } else if (M.type === P.CUSTOM_MACRO) {
25054
25070
  const Rt = M.macroConfig, st = Rt?.value || "";
25055
25071
  if (ot) {
25056
25072
  const ft = Rt?.type || "text", Ot = this.textParticle.measureText(m, M), Ct = M.label || "";
@@ -25066,7 +25082,7 @@ class cT {
25066
25082
  const ft = M.label || "", Ot = st || `请输入${ft}`, Ct = m.measureText(Ot);
25067
25083
  C.width = Ct.width, C.height = (M.size || _) * R, C.boundingBoxDescent = Ct.actualBoundingBoxDescent, C.boundingBoxAscent = Ct.actualBoundingBoxAscent;
25068
25084
  }
25069
- } else if (M.type === O.REUSABLE_ITEM) {
25085
+ } else if (M.type === P.REUSABLE_ITEM) {
25070
25086
  const st = M.reusableItemConfig?.value || "", ft = M.label || "";
25071
25087
  if (ot) {
25072
25088
  const Ot = this.textParticle.measureText(m, M), Ct = st || `获取 ${ft}`, Kt = m.measureText(Ct), $t = m.measureText("[").width;
@@ -25075,7 +25091,7 @@ class cT {
25075
25091
  const Ot = st || `获取 ${ft}`, Ct = m.measureText(Ot);
25076
25092
  C.width = Ct.width, C.height = (M.size || _) * R, C.boundingBoxDescent = Ct.actualBoundingBoxDescent, C.boundingBoxAscent = Ct.actualBoundingBoxAscent;
25077
25093
  }
25078
- } else if (M.type === O.SUB_TEMPLATE) {
25094
+ } else if (M.type === P.SUB_TEMPLATE) {
25079
25095
  const Rt = M.label || "子模板";
25080
25096
  if (ot) {
25081
25097
  const st = m.measureText(Rt), ft = 8 * R, Ot = 4 * R, Ct = st.actualBoundingBoxAscent + st.actualBoundingBoxDescent;
@@ -25092,13 +25108,13 @@ class cT {
25092
25108
  }
25093
25109
  } else {
25094
25110
  const _ = M.size || u;
25095
- (M.type === O.SUPERSCRIPT || M.type === O.SUBSCRIPT) && (M.actualSize = Math.ceil(_ * 0.6)), C.height = (M.actualSize || _) * R, m.font = this.getElementFont(M);
25111
+ (M.type === P.SUPERSCRIPT || M.type === P.SUBSCRIPT) && (M.actualSize = Math.ceil(_ * 0.6)), C.height = (M.actualSize || _) * R, m.font = this.getElementFont(M);
25096
25112
  const j = this.textParticle.measureText(m, M);
25097
25113
  C.width = j.width * R, M.letterSpacing && (C.width += M.letterSpacing * R);
25098
25114
  const G = this.textParticle.measureBasisWord(m, M.font);
25099
- C.boundingBoxAscent = G.actualBoundingBoxAscent * R, C.boundingBoxDescent = G.actualBoundingBoxDescent * R, M.type === O.SUPERSCRIPT ? C.boundingBoxAscent += C.height / 2 : M.type === O.SUBSCRIPT && (C.boundingBoxDescent += C.height / 2);
25115
+ C.boundingBoxAscent = G.actualBoundingBoxAscent * R, C.boundingBoxDescent = G.actualBoundingBoxDescent * R, M.type === P.SUPERSCRIPT ? C.boundingBoxAscent += C.height / 2 : M.type === P.SUBSCRIPT && (C.boundingBoxDescent += C.height / 2);
25100
25116
  }
25101
- const Z = !Pe(M) && (M.imgDisplay !== Pt.INLINE && M.type === O.IMAGE || M.type === O.LATEX) ? C.height + U : C.boundingBoxAscent + U, $ = U + C.boundingBoxAscent + C.boundingBoxDescent + U, at = Object.assign(M, {
25117
+ const Z = !Pe(M) && (M.imgDisplay !== Pt.INLINE && M.type === P.IMAGE || M.type === P.LATEX) ? C.height + U : C.boundingBoxAscent + U, $ = U + C.boundingBoxAscent + C.boundingBoxDescent + U, at = Object.assign(M, {
25102
25118
  metrics: C,
25103
25119
  left: 0,
25104
25120
  style: this.getElementFont(M, R)
@@ -25111,7 +25127,7 @@ class cT {
25111
25127
  }), x = 0));
25112
25128
  const k = n[X - 1];
25113
25129
  let B = n[X + 1], rt = N.width + C.width;
25114
- if (this.options.wordBreak === qo.BREAK_WORD && (!k?.type || k?.type === O.TEXT) && (!M.type || M.type === O.TEXT)) {
25130
+ if (this.options.wordBreak === qo.BREAK_WORD && (!k?.type || k?.type === P.TEXT) && (!M.type || M.type === P.TEXT)) {
25115
25131
  const _ = `${k?.value || ""}${M.value}`;
25116
25132
  if (this.WORD_LIKE_REG.test(_)) {
25117
25133
  const { width: G, endElement: ot } = this.textParticle.measureWord(m, n, X), Rt = G * R;
@@ -25160,7 +25176,7 @@ class cT {
25160
25176
  wt = N.width + G > v;
25161
25177
  }
25162
25178
  }
25163
- const Gt = M.type === O.SEPARATOR || M.type === O.TABLE || k?.type === O.TABLE || k?.type === O.BLOCK || M.type === O.BLOCK || k?.imgDisplay === Pt.INLINE || M.imgDisplay === Pt.INLINE || k?.listId !== M.listId || k?.areaId !== M.areaId && !M.area?.hide || M.control?.flexDirection === Hi.COLUMN && (M.controlComponent === h.CHECKBOX || M.controlComponent === h.RADIO) && k?.controlComponent === h.VALUE || X !== 0 && M.value === A && !M.area?.hide || wt, ce = rt > v, pe = Gt || ce;
25179
+ const Gt = M.type === P.SEPARATOR || M.type === P.TABLE || k?.type === P.TABLE || k?.type === P.BLOCK || M.type === P.BLOCK || k?.imgDisplay === Pt.INLINE || M.imgDisplay === Pt.INLINE || k?.listId !== M.listId || k?.areaId !== M.areaId && !M.area?.hide || M.control?.flexDirection === Hi.COLUMN && (M.controlComponent === h.CHECKBOX || M.controlComponent === h.RADIO) && k?.controlComponent === h.VALUE || X !== 0 && M.value === A && !M.area?.hide || wt, ce = rt > v, pe = Gt || ce;
25164
25180
  if (pe) {
25165
25181
  const _ = {
25166
25182
  width: C.width,
@@ -25170,7 +25186,7 @@ class cT {
25170
25186
  ascent: Z,
25171
25187
  rowIndex: N.rowIndex + 1,
25172
25188
  rowFlex: n[X]?.rowFlex || n[X + 1]?.rowFlex,
25173
- isPageBreak: M.type === O.PAGE_BREAK
25189
+ isPageBreak: M.type === P.PAGE_BREAK
25174
25190
  };
25175
25191
  if (at.controlComponent !== h.PREFIX && at.control?.indentation === qi.VALUE_START) {
25176
25192
  const j = N.elementList.findIndex((G) => G.controlId === at.controlId && G.controlComponent !== h.PREFIX);
@@ -25182,7 +25198,7 @@ class cT {
25182
25198
  ot && (_.offsetX = ot.coordinate.leftTop[0]);
25183
25199
  }
25184
25200
  }
25185
- M.listId && (_.isList = !0, _.offsetX = P.get(M.listId), _.listIndex = Y), _.offsetY = !r && M.area?.top && M.areaId !== n[X - 1]?.areaId ? M.area.top * R : 0, S.push(_);
25201
+ M.listId && (_.isList = !0, _.offsetX = O.get(M.listId), _.listIndex = Y), _.offsetY = !r && M.area?.top && M.areaId !== n[X - 1]?.areaId ? M.area.top * R : 0, S.push(_);
25186
25202
  } else
25187
25203
  N.width += C.width, X === 0 && (ro(n[1]) || n[1]?.areaId) ? (N.height = p, N.ascent = p) : N.height < $ && (N.height = $, N.ascent = Z), N.elementList.push(at);
25188
25204
  if ((pe || X === n.length - 1) && (N.isWidthNotEnough = ce && !Gt, !N.isSurround && (k?.rowFlex === Ht.JUSTIFY || k?.rowFlex === Ht.ALIGNMENT && N.isWidthNotEnough))) {
@@ -25194,7 +25210,7 @@ class cT {
25194
25210
  N.width = v;
25195
25211
  }
25196
25212
  if (pe) {
25197
- y = s, W += N.height, i && !r && a && (W - l + c + $ > a || M.type === O.PAGE_BREAK) && (W = l, Hc(d, V), V += 1), at.left = 0;
25213
+ y = s, W += N.height, i && !r && a && (W - l + c + $ > a || M.type === P.PAGE_BREAK) && (W = l, Hc(d, V), V += 1), at.left = 0;
25198
25214
  const _ = S[S.length - 1];
25199
25215
  y = this.position.setSurroundPosition({
25200
25216
  pageNo: V,
@@ -25297,7 +25313,7 @@ class cT {
25297
25313
  const R = c.elementList[u], g = c.startIndex + u, f = r[g] === R ? g : r.indexOf(R), T = ~f ? f : g, I = this.control.getControlHighlight(r, T), p = R.highlight || I;
25298
25314
  if (p) {
25299
25315
  d && d !== p && this.highlight.render(t);
25300
- const L = i[T], { coordinate: { leftTop: [m, P] } } = L, S = R.left || 0, E = !R.highlight && !!I && this.control.getIsInlineControlBackground(r, T), b = E ? P + L.ascent - R.metrics.boundingBoxAscent - l : P + s - l, y = E ? R.metrics.boundingBoxAscent + R.metrics.boundingBoxDescent + 2 * l : c.height - 2 * s + 2 * l;
25316
+ const L = i[T], { coordinate: { leftTop: [m, O] } } = L, S = R.left || 0, E = !R.highlight && !!I && this.control.getIsInlineControlBackground(r, T), b = E ? O + L.ascent - R.metrics.boundingBoxAscent - l : O + s - l, y = E ? R.metrics.boundingBoxAscent + R.metrics.boundingBoxDescent + 2 * l : c.height - 2 * s + 2 * l;
25301
25317
  this.highlight.recordFillInfo(t, m - S, b, R.metrics.width + S, y, p);
25302
25318
  } else d && this.highlight.render(t);
25303
25319
  d = p;
@@ -25321,7 +25337,7 @@ class cT {
25321
25337
  isDrawLineBreak: f = !s.disabled,
25322
25338
  td: T,
25323
25339
  isDrawWhiteSpace: I = !l.disabled
25324
- } = e, p = this.isPrintMode(), L = this.isGraffitiMode(), { isCrossRowCol: m, tableId: P } = this.range.getRange();
25340
+ } = e, p = this.isPrintMode(), L = this.isGraffitiMode(), { isCrossRowCol: m, tableId: O } = this.range.getRange();
25325
25341
  let S = R;
25326
25342
  for (let E = 0; E < a.length; E++) {
25327
25343
  const b = a[E], y = {
@@ -25335,55 +25351,55 @@ class cT {
25335
25351
  const F = b.elementList[V], Y = F.metrics, { ascent: x, coordinate: { leftTop: [X, N] } } = u[b.startIndex + V], M = b.elementList[V - 1];
25336
25352
  if (Pe(F) && !this.isDesignMode())
25337
25353
  this.textParticle.complete();
25338
- else if (F.type === O.IMAGE)
25354
+ else if (F.type === P.IMAGE)
25339
25355
  this.textParticle.complete(), F.imgDisplay !== Pt.SURROUND && F.imgDisplay !== Pt.FLOAT_TOP && F.imgDisplay !== Pt.FLOAT_BOTTOM && this.imageParticle.render(t, F, X, N + x);
25340
- else if (F.type === O.LATEX)
25356
+ else if (F.type === P.LATEX)
25341
25357
  this.textParticle.complete(), this.laTexParticle.render(t, F, X, N + x);
25342
- else if (F.type === O.TABLE)
25358
+ else if (F.type === P.TABLE)
25343
25359
  m && (y.x = X, y.y = N, W = F), this.tableParticle.render(t, F, X, N);
25344
- else if (F.type === O.HYPERLINK)
25360
+ else if (F.type === P.HYPERLINK)
25345
25361
  this.textParticle.complete(), this.hyperlinkParticle.render(t, F, X, N + x);
25346
- else if (F.type === O.LABEL)
25362
+ else if (F.type === P.LABEL)
25347
25363
  this.textParticle.complete(), this.labelParticle.render(t, F, X, N + x);
25348
- else if (F.type === O.MACRO || F.type === O.CUSTOM_MACRO || F.type === O.REUSABLE_ITEM || F.type === O.SUB_TEMPLATE)
25364
+ else if (F.type === P.MACRO || F.type === P.CUSTOM_MACRO || F.type === P.REUSABLE_ITEM || F.type === P.SUB_TEMPLATE)
25349
25365
  this.textParticle.complete(), this.macroParticle.render(t, F, X, N + x);
25350
- else if (F.type === O.DATE) {
25366
+ else if (F.type === P.DATE) {
25351
25367
  const Z = b.elementList[V + 1];
25352
25368
  (!M || M.dateId !== F.dateId) && this.textParticle.complete(), this.textParticle.record(t, F, X, N + x), (!Z || Z.dateId !== F.dateId) && this.textParticle.complete();
25353
- } else F.type === O.SUPERSCRIPT ? (this.textParticle.complete(), this.superscriptParticle.render(t, F, X, N + x)) : F.type === O.SUBSCRIPT ? (this.underline.render(t), this.textParticle.complete(), this.subscriptParticle.render(t, F, X, N + x)) : F.type === O.SEPARATOR ? this.separatorParticle.render(t, F, X, N) : F.type === O.PAGE_BREAK ? this.mode !== K.CLEAN && !p && this.pageBreakParticle.render(t, F, X, N) : F.type === O.CHECKBOX || F.controlComponent === h.CHECKBOX ? (this.textParticle.complete(), this.checkboxParticle.render({
25369
+ } else F.type === P.SUPERSCRIPT ? (this.textParticle.complete(), this.superscriptParticle.render(t, F, X, N + x)) : F.type === P.SUBSCRIPT ? (this.underline.render(t), this.textParticle.complete(), this.subscriptParticle.render(t, F, X, N + x)) : F.type === P.SEPARATOR ? this.separatorParticle.render(t, F, X, N) : F.type === P.PAGE_BREAK ? this.mode !== K.CLEAN && !p && this.pageBreakParticle.render(t, F, X, N) : F.type === P.CHECKBOX || F.controlComponent === h.CHECKBOX ? (this.textParticle.complete(), this.checkboxParticle.render({
25354
25370
  ctx: t,
25355
25371
  x: X,
25356
25372
  y: N + x,
25357
25373
  index: V,
25358
25374
  row: b
25359
- })) : F.type === O.RADIO || F.controlComponent === h.RADIO ? (this.textParticle.complete(), this.radioParticle.render({
25375
+ })) : F.type === P.RADIO || F.controlComponent === h.RADIO ? (this.textParticle.complete(), this.radioParticle.render({
25360
25376
  ctx: t,
25361
25377
  x: X,
25362
25378
  y: N + x,
25363
25379
  index: V,
25364
25380
  row: b
25365
- })) : F.type === O.MENSTRUAL_HISTORY ? (this.textParticle.complete(), this.menstrualHistoryParticle.render({
25381
+ })) : F.type === P.MENSTRUAL_HISTORY ? (this.textParticle.complete(), this.menstrualHistoryParticle.render({
25366
25382
  ctx: t,
25367
25383
  x: X,
25368
25384
  y: N + x,
25369
25385
  index: V,
25370
25386
  row: b,
25371
25387
  element: F
25372
- })) : F.type === O.FETAL_HEART_POSITION ? (this.textParticle.complete(), this.fetalHeartPositionParticle.render({
25388
+ })) : F.type === P.FETAL_HEART_POSITION ? (this.textParticle.complete(), this.fetalHeartPositionParticle.render({
25373
25389
  ctx: t,
25374
25390
  x: X,
25375
25391
  y: N + x,
25376
25392
  index: V,
25377
25393
  row: b,
25378
25394
  element: F
25379
- })) : F.type === O.TOOTH_POSITION ? (this.textParticle.complete(), this.toothPositionParticle.render({
25395
+ })) : F.type === P.TOOTH_POSITION ? (this.textParticle.complete(), this.toothPositionParticle.render({
25380
25396
  ctx: t,
25381
25397
  x: X,
25382
25398
  y: N + x,
25383
25399
  index: V,
25384
25400
  row: b,
25385
25401
  element: F
25386
- })) : F.type === O.TAB ? this.textParticle.complete() : F.rowFlex === Ht.ALIGNMENT || F.rowFlex === Ht.JUSTIFY ? (this.textParticle.record(t, F, X, N + x), this.textParticle.complete()) : F.type === O.BLOCK ? (this.textParticle.complete(), this.blockParticle.render(t, c, F, X, N + x)) : (F.left && this.textParticle.complete(), this.textParticle.record(t, F, X, N + x), (F.width || F.letterSpacing || Sa.test(F.value)) && this.textParticle.complete());
25402
+ })) : F.type === P.TAB ? this.textParticle.complete() : F.rowFlex === Ht.ALIGNMENT || F.rowFlex === Ht.JUSTIFY ? (this.textParticle.record(t, F, X, N + x), this.textParticle.complete()) : F.type === P.BLOCK ? (this.textParticle.complete(), this.blockParticle.render(t, c, F, X, N + x)) : (F.left && this.textParticle.complete(), this.textParticle.record(t, F, X, N + x), (F.width || F.letterSpacing || Sa.test(F.value)) && this.textParticle.complete());
25387
25403
  if (f && !p && this.mode !== K.CLEAN && !b.isWidthNotEnough && V === b.elementList.length - 1 && this.lineBreakParticle.render(t, F, X, N + b.height / 2), I && Ea.test(F.value) && this.whiteSpaceParticle.render(t, F, X, N + b.height / 2), F.control?.border) {
25388
25404
  M?.control?.border && M.controlId !== F.controlId && this.control.drawBorder(t);
25389
25405
  const Z = this.getElementRowMargin(F);
@@ -25394,19 +25410,19 @@ class cT {
25394
25410
  F.originControlId && (F.controlComponent === h.PREFIX || F.controlComponent === h.PRE_TEXT || F.controlComponent === h.PRETEXTFIX || F.controlComponent === h.PRETEXTFIX_TEXT) && this.control.drawTextFieldUnderline(t), Z && F.control?.underline && !F.underline && ((!M || M.controlId !== F.controlId || at || M.controlComponent !== h.VALUE && M.controlComponent !== h.PLACEHOLDER) && this.control.startTextFieldUnderline(F.controlId, X, N + b.height), this.control.recordTextFieldUnderlineWidth(F.metrics.width)), $ && this.control.drawTextFieldUnderline(t), F.originControlId && (F.controlComponent === h.POSTFIX || F.controlComponent === h.POST_TEXT || F.controlComponent === h.POSTTEXTFIX || F.controlComponent === h.POSTTEXTFIX_TEXT) && this.control.drawTextFieldUnderline(t);
25395
25411
  } else M?.control?.type === D.TEXT && this.control.drawTextFieldUnderline(t);
25396
25412
  if ((F.underline || F.control?.underline) && F.controlComponent !== h.PLACEHOLDER && !(F.control?.type === D.TEXT && F.control?.underline && !F.underline)) {
25397
- M?.type === O.SUBSCRIPT && F.type !== O.SUBSCRIPT && this.underline.render(t);
25413
+ M?.type === P.SUBSCRIPT && F.type !== P.SUBSCRIPT && this.underline.render(t);
25398
25414
  const Z = this.getElementRowMargin(F), $ = F.left || 0;
25399
25415
  let at = 0;
25400
- F.type === O.SUBSCRIPT && (at = this.subscriptParticle.getOffsetY(F));
25416
+ F.type === P.SUBSCRIPT && (at = this.subscriptParticle.getOffsetY(F));
25401
25417
  const k = F.control?.underline ? this.options.underlineColor : F.color;
25402
25418
  this.underline.recordFillInfo(t, X - $, N + b.height - Z + at, Y.width + $, 0, k, F.textDecoration?.style);
25403
25419
  } else (M?.underline || M?.control?.underline) && (M?.control?.type === D.TEXT && M?.control?.underline && !M.underline || this.underline.render(t));
25404
25420
  if (F.strikeout) {
25405
25421
  if (!F.type || ye.includes(F.type)) {
25406
- M && (M.type === O.SUBSCRIPT && F.type !== O.SUBSCRIPT || M.type === O.SUPERSCRIPT && F.type !== O.SUPERSCRIPT || this.getElementSize(M) !== this.getElementSize(F)) && this.strikeout.render(t);
25422
+ M && (M.type === P.SUBSCRIPT && F.type !== P.SUBSCRIPT || M.type === P.SUPERSCRIPT && F.type !== P.SUPERSCRIPT || this.getElementSize(M) !== this.getElementSize(F)) && this.strikeout.render(t);
25407
25423
  const Z = this.textParticle.measureBasisWord(t, this.getElementFont(F));
25408
25424
  let $ = N + x + Z.actualBoundingBoxDescent * n - Y.height / 2;
25409
- F.type === O.SUBSCRIPT ? $ += this.subscriptParticle.getOffsetY(F) : F.type === O.SUPERSCRIPT && ($ += this.superscriptParticle.getOffsetY(F)), this.strikeout.recordFillInfo(t, X, $, Y.width);
25425
+ F.type === P.SUBSCRIPT ? $ += this.subscriptParticle.getOffsetY(F) : F.type === P.SUPERSCRIPT && ($ += this.superscriptParticle.getOffsetY(F)), this.strikeout.recordFillInfo(t, X, $, Y.width);
25410
25426
  }
25411
25427
  } else M?.strikeout && this.strikeout.render(t);
25412
25428
  const { zone: U, splitTdRange: C } = this.range.getRange();
@@ -25423,7 +25439,7 @@ class cT {
25423
25439
  $ === 0 && b.elementList.length === 1 && ($ = this.options.rangeMinWidth), y.width || (y.x = X, y.y = N, y.height = b.height), y.width += $;
25424
25440
  }
25425
25441
  }
25426
- if (!r.disabled && F.groupIds && this.group.recordFillInfo(F, X, N, Y.width, b.height), S++, F.type === O.TABLE && !Pe(F)) {
25442
+ if (!r.disabled && F.groupIds && this.group.recordFillInfo(F, X, N, Y.width, b.height), S++, F.type === P.TABLE && !Pe(F)) {
25427
25443
  const Z = F.tdPadding || i, $ = Z[1] + Z[3];
25428
25444
  for (let at = 0; at < F.trList.length; at++) {
25429
25445
  const k = F.trList[at];
@@ -25450,7 +25466,7 @@ class cT {
25450
25466
  const { x: V, y: F, width: Y, height: x } = y;
25451
25467
  this.range.render(t, V, F, Y, x);
25452
25468
  }
25453
- if (m && W && W.id === P) {
25469
+ if (m && W && W.id === O) {
25454
25470
  const { coordinate: { leftTop: [V, F] } } = u[b.startIndex];
25455
25471
  this.tableParticle.drawRange(t, W, V, F);
25456
25472
  }
@@ -25462,7 +25478,7 @@ class cT {
25462
25478
  const { scale: n } = this.options, i = this.position.getFloatPositionList(), { imgDisplays: r, pageNo: s } = e;
25463
25479
  for (let l = 0; l < i.length; l++) {
25464
25480
  const a = i[l], c = a.element;
25465
- if ((s === a.pageNo || a.zone === St.HEADER || a.zone == St.FOOTER) && c.imgDisplay && r.includes(c.imgDisplay) && c.type === O.IMAGE) {
25481
+ if ((s === a.pageNo || a.zone === St.HEADER || a.zone == St.FOOTER) && c.imgDisplay && r.includes(c.imgDisplay) && c.type === P.IMAGE) {
25466
25482
  const d = c.imgFloatPosition;
25467
25483
  this.imageParticle.render(t, c, d.x * n, d.y * n);
25468
25484
  }
@@ -25556,7 +25572,7 @@ class cT {
25556
25572
  let { endIndex: l } = this.range.getRange();
25557
25573
  const { isCrossRowCol: a } = this.range.getRange();
25558
25574
  if (!a && ~l) {
25559
- const X = this.getElementList(), N = X[l], U = N?.type === O.SUB_TEMPLATE && N.subTemplateExpanded ? Te.AFTER : Te.BEFORE, C = lo(X, l, U);
25575
+ const X = this.getElementList(), N = X[l], U = N?.type === P.SUB_TEMPLATE && N.subTemplateExpanded ? Te.AFTER : Te.BEFORE, C = lo(X, l, U);
25560
25576
  C !== l && !Pe(X[C]) && (this.range.setRange(C, C), l = C);
25561
25577
  }
25562
25578
  let c;
@@ -25568,11 +25584,11 @@ class cT {
25568
25584
  c = qn(N, X);
25569
25585
  }
25570
25586
  const { header: u, footer: R } = this.options, { isSubmitHistory: g = !0, isSetCursor: f = !0, isLazy: T = !0, isInit: I = !1, isSourceHistory: p = !1, isFirstRender: L = !1, isDel: m = !1 } = t || {};
25571
- let { isCompute: P = !0 } = t || {};
25572
- s && (P = !0);
25587
+ let { isCompute: O = !0 } = t || {};
25588
+ s && (O = !0);
25573
25589
  let { curIndex: S } = t || {};
25574
25590
  const { traceLabel: E } = t || {}, b = this.getInnerWidth(), y = this.getIsPagingMode(), W = this.pageRowList.length;
25575
- if (P) {
25591
+ if (O) {
25576
25592
  if (this.splitTdValueMap.clear(), this.tdMap.clear(), this.position.setFloatPositionList([]), y) {
25577
25593
  if (!u.disabled) {
25578
25594
  const k = Re();
@@ -25623,7 +25639,7 @@ class cT {
25623
25639
  }
25624
25640
  const Y = Re();
25625
25641
  if (T && y ? this._lazyRender() : this._immediateRender(), i(T && y ? "lazyRender" : "immediateRender", Y), f) {
25626
- if (P && c?.tableId) {
25642
+ if (O && c?.tableId) {
25627
25643
  const { index: X } = d, M = this.getOriginalElementList()[X];
25628
25644
  if (c.tableId !== M?.id) {
25629
25645
  const C = this.findTableChildrenElement(!0, c.tableId, c);
@@ -25643,7 +25659,7 @@ class cT {
25643
25659
  const x = Re();
25644
25660
  Is(() => {
25645
25661
  const X = Re();
25646
- this.range.setRangeStyle(), P && this.control.getActiveControl() && this.control.reAwakeControl(), P && !this.isReadonly() && this.getMode() !== K.FORM && d.isTable && this.getOriginalElementList()[d.index].type === O.TABLE && this.tableTool.render(), P && !this.zone.isMainActive() && this.zone.drawZoneIndicator(), W !== 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) && !I && (this.listener.contentChange && this.listener.contentChange(), this.eventBus.isSubscribe("contentChange") && this.eventBus.emit("contentChange"));
25662
+ this.range.setRangeStyle(), O && this.control.getActiveControl() && this.control.reAwakeControl(), O && !this.isReadonly() && this.getMode() !== K.FORM && d.isTable && this.getOriginalElementList()[d.index].type === P.TABLE && this.tableTool.render(), O && !this.zone.isMainActive() && this.zone.drawZoneIndicator(), W !== 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) && !I && (this.listener.contentChange && this.listener.contentChange(), this.eventBus.isSubscribe("contentChange") && this.eventBus.emit("contentChange"));
25647
25663
  const N = Re();
25648
25664
  ms(this.options, E || "render", N - e, [
25649
25665
  ...n,
@@ -25656,7 +25672,7 @@ class cT {
25656
25672
  duration: N - X
25657
25673
  }
25658
25674
  ], {
25659
- isCompute: P,
25675
+ isCompute: O,
25660
25676
  pageCount: this.pageRowList.length
25661
25677
  });
25662
25678
  }), f && this.fixPosition();
@@ -25674,7 +25690,7 @@ class cT {
25674
25690
  for (let d = 0; d < c.trList.length; d++) {
25675
25691
  const u = c.trList[d], R = u.tdList.find((g) => t ? s?.linkTdPrevId === g.id : s?.id === g.linkTdPrevId);
25676
25692
  if (R) {
25677
- n.index = l, n.trIndex = d, n.tableId = c.id, n.trId = u.id, n.tdId = R?.id, e = t ? R.value.length - 1 : e + (R.value[0]?.type === O.SPLIT_TAG ? 1 : 0);
25693
+ n.index = l, n.trIndex = d, n.tableId = c.id, n.trId = u.id, n.tdId = R?.id, e = t ? R.value.length - 1 : e + (R.value[0]?.type === P.SPLIT_TAG ? 1 : 0);
25678
25694
  break;
25679
25695
  }
25680
25696
  }
@@ -26126,7 +26142,7 @@ const hT = [D.TEXT, D.TEXTFIELD], Kr = [
26126
26142
  function Bo(o, t) {
26127
26143
  for (let e = 0; e < o.length; e++) {
26128
26144
  const n = o[e];
26129
- if (n.type === O.CONTROL && n.controlId === t && n.control)
26145
+ if (n.type === P.CONTROL && n.controlId === t && n.control)
26130
26146
  return pt(n);
26131
26147
  if (n.control?.value?.length) {
26132
26148
  const i = Bo(n.control.value, t);
@@ -26138,7 +26154,7 @@ function Bo(o, t) {
26138
26154
  if (i)
26139
26155
  return i;
26140
26156
  }
26141
- if (n.type === O.TABLE && n.trList?.length)
26157
+ if (n.type === P.TABLE && n.trList?.length)
26142
26158
  for (let i = 0; i < n.trList.length; i++) {
26143
26159
  const r = n.trList[i];
26144
26160
  for (let s = 0; s < r.tdList.length; s++) {
@@ -26459,7 +26475,7 @@ class TT {
26459
26475
  const g = {
26460
26476
  value: l[R],
26461
26477
  controlId: t.controlId,
26462
- type: O.CONTROL,
26478
+ type: P.CONTROL,
26463
26479
  control: {
26464
26480
  type: "button",
26465
26481
  buttonLabel: l,
@@ -26530,7 +26546,7 @@ class TT {
26530
26546
  const d = {
26531
26547
  value: e.label[c],
26532
26548
  controlId: e.controlId,
26533
- type: O.CONTROL,
26549
+ type: P.CONTROL,
26534
26550
  control: {
26535
26551
  type: "button",
26536
26552
  buttonLabel: e.label,
@@ -26606,7 +26622,7 @@ class TT {
26606
26622
  u.push({
26607
26623
  value: "[",
26608
26624
  controlId: a,
26609
- type: O.CONTROL,
26625
+ type: P.CONTROL,
26610
26626
  control: d,
26611
26627
  controlComponent: h.PREFIX,
26612
26628
  color: "#1677FF",
@@ -26614,11 +26630,11 @@ class TT {
26614
26630
  });
26615
26631
  for (let I = 0; I < i.length; I++) {
26616
26632
  const p = i[I], L = i.length > 1 ? `${I + 1}.${p.value}` : p.value, m = Qt(L);
26617
- for (let P = 0; P < m.length; P++)
26633
+ for (let O = 0; O < m.length; O++)
26618
26634
  u.push({
26619
- value: m[P],
26635
+ value: m[O],
26620
26636
  controlId: a,
26621
- type: O.CONTROL,
26637
+ type: P.CONTROL,
26622
26638
  control: d,
26623
26639
  controlComponent: h.VALUE,
26624
26640
  color: "#000",
@@ -26627,7 +26643,7 @@ class TT {
26627
26643
  i.length > 1 && I < i.length - 1 && u.push({
26628
26644
  value: A,
26629
26645
  controlId: a,
26630
- type: O.CONTROL,
26646
+ type: P.CONTROL,
26631
26647
  control: d,
26632
26648
  controlComponent: h.VALUE,
26633
26649
  color: "#000",
@@ -26637,7 +26653,7 @@ class TT {
26637
26653
  u.push({
26638
26654
  value: "]",
26639
26655
  controlId: a,
26640
- type: O.CONTROL,
26656
+ type: P.CONTROL,
26641
26657
  control: d,
26642
26658
  controlComponent: h.POSTFIX,
26643
26659
  color: "#1677FF",
@@ -26848,9 +26864,9 @@ class TT {
26848
26864
  const i = this.range.getSelectionElementList();
26849
26865
  if (!i)
26850
26866
  return;
26851
- const r = i.findIndex((s) => s.type === O.SUPERSCRIPT);
26867
+ const r = i.findIndex((s) => s.type === P.SUPERSCRIPT);
26852
26868
  i.forEach((s) => {
26853
- ~r ? s.type === O.SUPERSCRIPT && (s.type = O.TEXT, delete s.actualSize) : (!s.type || s.type === O.TEXT || s.type === O.SUBSCRIPT) && (s.type = O.SUPERSCRIPT);
26869
+ ~r ? s.type === P.SUPERSCRIPT && (s.type = P.TEXT, delete s.actualSize) : (!s.type || s.type === P.TEXT || s.type === P.SUBSCRIPT) && (s.type = P.SUPERSCRIPT);
26854
26870
  }), this.draw.render({ isSetCursor: !1 });
26855
26871
  }
26856
26872
  subscript(t) {
@@ -26860,9 +26876,9 @@ class TT {
26860
26876
  const i = this.range.getSelectionElementList();
26861
26877
  if (!i)
26862
26878
  return;
26863
- const r = i.findIndex((s) => s.type === O.SUBSCRIPT);
26879
+ const r = i.findIndex((s) => s.type === P.SUBSCRIPT);
26864
26880
  i.forEach((s) => {
26865
- ~r ? s.type === O.SUBSCRIPT && (s.type = O.TEXT, delete s.actualSize) : (!s.type || s.type === O.TEXT || s.type === O.SUPERSCRIPT) && (s.type = O.SUBSCRIPT);
26881
+ ~r ? s.type === P.SUBSCRIPT && (s.type = P.TEXT, delete s.actualSize) : (!s.type || s.type === P.TEXT || s.type === P.SUPERSCRIPT) && (s.type = P.SUBSCRIPT);
26866
26882
  }), this.draw.render({ isSetCursor: !1 });
26867
26883
  }
26868
26884
  color(t, e) {
@@ -27045,7 +27061,7 @@ class TT {
27045
27061
  const { startIndex: l, endIndex: a } = this.range.getRange();
27046
27062
  !~l && !~a || this.insertElementList([
27047
27063
  {
27048
- type: O.HYPERLINK,
27064
+ type: P.HYPERLINK,
27049
27065
  value: "",
27050
27066
  valueList: e,
27051
27067
  url: n,
@@ -27059,7 +27075,7 @@ class TT {
27059
27075
  if (!~n && !~i)
27060
27076
  return null;
27061
27077
  const r = this.draw.getElementList(), s = r[n];
27062
- if (s.type !== O.HYPERLINK)
27078
+ if (s.type !== P.HYPERLINK)
27063
27079
  return null;
27064
27080
  let l = n;
27065
27081
  for (; l > 0; ) {
@@ -27137,7 +27153,7 @@ class TT {
27137
27153
  const l = this.draw.getElementList();
27138
27154
  let a = -1;
27139
27155
  const c = l[s + 1];
27140
- if (c && c.type === O.SEPARATOR) {
27156
+ if (c && c.type === P.SEPARATOR) {
27141
27157
  if (c.dashArray && c.dashArray.join() === t.join())
27142
27158
  return;
27143
27159
  a = s, Object.assign(c, {
@@ -27147,7 +27163,7 @@ class TT {
27147
27163
  } else {
27148
27164
  const d = {
27149
27165
  value: lr,
27150
- type: O.SEPARATOR,
27166
+ type: P.SEPARATOR,
27151
27167
  dashArray: t,
27152
27168
  ...e
27153
27169
  };
@@ -27162,7 +27178,7 @@ class TT {
27162
27178
  pageBreak() {
27163
27179
  this.draw.isReadonly() || this.draw.isDisabled() || this.control.getActiveControl() || this.insertElementList([
27164
27180
  {
27165
- type: O.PAGE_BREAK,
27181
+ type: P.PAGE_BREAK,
27166
27182
  value: lr
27167
27183
  }
27168
27184
  ]);
@@ -27198,7 +27214,7 @@ class TT {
27198
27214
  {
27199
27215
  ...t,
27200
27216
  id: r,
27201
- type: O.IMAGE
27217
+ type: P.IMAGE
27202
27218
  }
27203
27219
  ]), r;
27204
27220
  }
@@ -27244,24 +27260,24 @@ class TT {
27244
27260
  }
27245
27261
  replaceImageElement(t) {
27246
27262
  const { startIndex: e } = this.range.getRange(), i = this.draw.getElementList()[e];
27247
- !i || i.type !== O.IMAGE || (i.value = t, this.draw.render({
27263
+ !i || i.type !== P.IMAGE || (i.value = t, this.draw.render({
27248
27264
  isSetCursor: !1
27249
27265
  }));
27250
27266
  }
27251
27267
  saveAsImageElement() {
27252
27268
  const { startIndex: t } = this.range.getRange(), n = this.draw.getElementList()[t];
27253
- !n || n.type !== O.IMAGE || kr(n.value, `${n.id}.png`);
27269
+ !n || n.type !== P.IMAGE || kr(n.value, `${n.id}.png`);
27254
27270
  }
27255
27271
  setImageCrop(t) {
27256
27272
  const { startIndex: e } = this.range.getRange(), i = this.draw.getElementList()[e];
27257
- !i || i.type !== O.IMAGE || (i.imgCrop = t, this.draw.render({
27273
+ !i || i.type !== P.IMAGE || (i.imgCrop = t, this.draw.render({
27258
27274
  isSetCursor: !1,
27259
27275
  isCompute: !1
27260
27276
  }));
27261
27277
  }
27262
27278
  setImageCaption(t) {
27263
27279
  const { startIndex: e } = this.range.getRange(), i = this.draw.getElementList()[e];
27264
- i?.type === O.IMAGE && (i.imgCaption = t, this.draw.render({
27280
+ i?.type === P.IMAGE && (i.imgCaption = t, this.draw.render({
27265
27281
  isSetCursor: !1
27266
27282
  }));
27267
27283
  }
@@ -27364,8 +27380,8 @@ class TT {
27364
27380
  }), c = Nn(l[n], {
27365
27381
  extraPickAttrs: ["id", "controlComponent"]
27366
27382
  }), d = this.draw.getRowList(), u = this.position.getPositionList(), R = u[e], g = u[n], f = R?.pageNo, T = g?.pageNo, I = R?.rowIndex, p = g?.rowIndex, L = d[I], m = d[p];
27367
- let P = 0, S = 0;
27368
- this.draw.getCursor().getHitLineStartIndex() || (P = L?.elementList[0]?.value === A ? R?.index - L?.startIndex : R?.index - L?.startIndex + 1), R === g ? S = P : S = m.elementList[0]?.value === A ? g.index - m.startIndex : g.index - m.startIndex + 1;
27383
+ let O = 0, S = 0;
27384
+ this.draw.getCursor().getHitLineStartIndex() || (O = L?.elementList[0]?.value === A ? R?.index - L?.startIndex : R?.index - L?.startIndex + 1), R === g ? S = O : S = m.elementList[0]?.value === A ? g.index - m.startIndex : g.index - m.startIndex + 1;
27369
27385
  const E = [], b = this.draw.getOriginalHeight(), y = this.draw.getOriginalPageGap(), W = this.position.getSelectionPositionList();
27370
27386
  if (W) {
27371
27387
  let w = null, v = 0, H = null;
@@ -27410,7 +27426,7 @@ class TT {
27410
27426
  endPageNo: T,
27411
27427
  startRowNo: I,
27412
27428
  endRowNo: p,
27413
- startColNo: P,
27429
+ startColNo: O,
27414
27430
  endColNo: S,
27415
27431
  rangeRects: E,
27416
27432
  zone: V,
@@ -27524,7 +27540,7 @@ class TT {
27524
27540
  let c = 0;
27525
27541
  for (; c < l.length; ) {
27526
27542
  const d = l[c];
27527
- if (c++, d.type === O.TABLE) {
27543
+ if (c++, d.type === P.TABLE) {
27528
27544
  const u = d.trList;
27529
27545
  for (let R = 0; R < u.length; R++) {
27530
27546
  const g = u[R];
@@ -27534,7 +27550,7 @@ class TT {
27534
27550
  }
27535
27551
  }
27536
27552
  }
27537
- d.type === O.CONTROL && d.control?.value && r(d.control.value, !0), (e && d.id === e || n && d.conceptId === n) && i.push({
27553
+ d.type === P.CONTROL && d.control?.value && r(d.control.value, !0), (e && d.id === e || n && d.conceptId === n) && i.push({
27538
27554
  elementList: l,
27539
27555
  index: c - 1,
27540
27556
  isInsideControl: a
@@ -27585,7 +27601,7 @@ class TT {
27585
27601
  let a = 0;
27586
27602
  for (; a < l.length; ) {
27587
27603
  const c = l[a];
27588
- if (c.type === O.TABLE) {
27604
+ if (c.type === P.TABLE) {
27589
27605
  const d = c.trList;
27590
27606
  for (let u = 0; u < d.length; u++) {
27591
27607
  const R = d[u];
@@ -27595,7 +27611,7 @@ class TT {
27595
27611
  }
27596
27612
  }
27597
27613
  }
27598
- c.type === O.CONTROL && c.control?.value && r(c.control.value), (e && c.id === e || n && c.conceptId === n) && (i = !0, l.splice(a, 1), a--), a++;
27614
+ c.type === P.CONTROL && c.control?.value && r(c.control.value), (e && c.id === e || n && c.conceptId === n) && (i = !0, l.splice(a, 1), a--), a++;
27599
27615
  }
27600
27616
  }
27601
27617
  const s = [
@@ -27617,7 +27633,7 @@ class TT {
27617
27633
  let a = 0;
27618
27634
  for (; a < l.length; ) {
27619
27635
  const c = l[a];
27620
- if (a++, c.type === O.TABLE) {
27636
+ if (a++, c.type === P.TABLE) {
27621
27637
  const d = c.trList;
27622
27638
  for (let u = 0; u < d.length; u++) {
27623
27639
  const R = d[u];
@@ -27651,7 +27667,7 @@ class TT {
27651
27667
  let a = l.length - 1;
27652
27668
  for (; a >= 0; ) {
27653
27669
  const c = l[a];
27654
- if (c.type === O.TABLE) {
27670
+ if (c.type === P.TABLE) {
27655
27671
  const d = c.trList;
27656
27672
  for (let u = 0; u < d.length; u++) {
27657
27673
  const R = d[u];
@@ -27701,9 +27717,9 @@ class TT {
27701
27717
  const e = this.draw.getOriginalElementList();
27702
27718
  function n(p, L) {
27703
27719
  for (let m = 0; m < p.length; m++) {
27704
- const P = p[m];
27705
- if (P.type === O.TABLE) {
27706
- const S = P.trList;
27720
+ const O = p[m];
27721
+ if (O.type === P.TABLE) {
27722
+ const S = O.trList;
27707
27723
  for (let E = 0; E < S.length; E++) {
27708
27724
  const b = S[E];
27709
27725
  for (let y = 0; y < b.tdList.length; y++) {
@@ -27717,12 +27733,12 @@ class TT {
27717
27733
  tdIndex: y,
27718
27734
  tdId: W.id,
27719
27735
  trId: b.id,
27720
- tableId: P.id
27736
+ tableId: O.id
27721
27737
  };
27722
27738
  }
27723
27739
  }
27724
27740
  }
27725
- if (P.titleId === L) {
27741
+ if (O.titleId === L) {
27726
27742
  let S = m;
27727
27743
  for (; S < p.length; ) {
27728
27744
  if (p[S + 1]?.titleId !== L)
@@ -27869,7 +27885,7 @@ class TT {
27869
27885
  let c = 0;
27870
27886
  for (; c < s.length; ) {
27871
27887
  const d = s[c];
27872
- if (c++, d.type === O.TABLE) {
27888
+ if (c++, d.type === P.TABLE) {
27873
27889
  const R = d.trList;
27874
27890
  for (let g = 0; g < R.length; g++) {
27875
27891
  const f = R[g];
@@ -28017,7 +28033,7 @@ class TT {
28017
28033
  let a = 0;
28018
28034
  for (; a < s.length; ) {
28019
28035
  const c = s[a];
28020
- if (a++, c.type === O.TABLE) {
28036
+ if (a++, c.type === P.TABLE) {
28021
28037
  const R = c.trList;
28022
28038
  for (let g = 0; g < R.length; g++) {
28023
28039
  const f = R[g];
@@ -28080,8 +28096,8 @@ class TT {
28080
28096
  let p = null;
28081
28097
  const L = this.position.getOriginalPositionList();
28082
28098
  if (a) {
28083
- const P = I[c].trList?.[d].tdList[u];
28084
- T = P?.value[R] || null, p = P?.positionList?.[R] || null, f = {
28099
+ const O = I[c].trList?.[d].tdList[u];
28100
+ T = O?.value[R] || null, p = O?.positionList?.[R] || null, f = {
28085
28101
  element: I[c],
28086
28102
  trIndex: d,
28087
28103
  tdIndex: u
@@ -28090,10 +28106,10 @@ class TT {
28090
28106
  T = I[c] || null, p = L[c] || null;
28091
28107
  let m = null;
28092
28108
  if (p) {
28093
- const { pageNo: P, coordinate: { leftTop: S, rightTop: E }, lineHeight: b } = p, y = this.draw.getOriginalHeight(), W = this.draw.getOriginalPageGap();
28109
+ const { pageNo: O, coordinate: { leftTop: S, rightTop: E }, lineHeight: b } = p, y = this.draw.getOriginalHeight(), W = this.draw.getOriginalPageGap();
28094
28110
  m = {
28095
28111
  x: S[0],
28096
- y: S[1] + P * (y + W),
28112
+ y: S[1] + O * (y + W),
28097
28113
  width: E[0] - S[0],
28098
28114
  height: b
28099
28115
  };
@@ -28189,14 +28205,14 @@ class TT {
28189
28205
  getMacroValue(t) {
28190
28206
  const { id: e, dictCode: n, label: i, areaId: r } = t, s = [], l = (c, d) => {
28191
28207
  for (const u of c) {
28192
- if (u.type === O.TABLE) {
28208
+ if (u.type === P.TABLE) {
28193
28209
  const g = u.trList;
28194
28210
  for (const f of g)
28195
28211
  for (const T of f.tdList)
28196
28212
  l(T.value, d);
28197
28213
  continue;
28198
28214
  }
28199
- if (u.type !== O.MACRO && u.type !== O.CUSTOM_MACRO && u.type !== O.REUSABLE_ITEM || e && u.id !== e || n && u.dictCode !== n || i && u.label !== i || r && u.areaId !== r)
28215
+ if (u.type !== P.MACRO && u.type !== P.CUSTOM_MACRO && u.type !== P.REUSABLE_ITEM || e && u.id !== e || n && u.dictCode !== n || i && u.label !== i || r && u.areaId !== r)
28200
28216
  continue;
28201
28217
  const R = {
28202
28218
  id: u.id,
@@ -28205,7 +28221,7 @@ class TT {
28205
28221
  dictCode: u.dictCode,
28206
28222
  zone: d
28207
28223
  };
28208
- u.type === O.MACRO ? R.value = u.value : u.type === O.CUSTOM_MACRO ? (R.macroConfig = u.macroConfig, R.value = u.macroConfig?.value) : u.type === O.REUSABLE_ITEM && (R.reusableItemConfig = u.reusableItemConfig, R.value = u.reusableItemConfig?.value), s.push(R);
28224
+ u.type === P.MACRO ? R.value = u.value : u.type === P.CUSTOM_MACRO ? (R.macroConfig = u.macroConfig, R.value = u.macroConfig?.value) : u.type === P.REUSABLE_ITEM && (R.reusableItemConfig = u.reusableItemConfig, R.value = u.reusableItemConfig?.value), s.push(R);
28209
28225
  }
28210
28226
  }, a = [
28211
28227
  {
@@ -28232,14 +28248,14 @@ class TT {
28232
28248
  getMacroList() {
28233
28249
  const t = [], e = (i) => {
28234
28250
  for (const r of i) {
28235
- if (r.type === O.TABLE) {
28251
+ if (r.type === P.TABLE) {
28236
28252
  const s = r.trList;
28237
28253
  for (const l of s)
28238
28254
  for (const a of l.tdList)
28239
28255
  e(a.value);
28240
28256
  continue;
28241
28257
  }
28242
- (r.type === O.MACRO || r.type === O.CUSTOM_MACRO || r.type === O.REUSABLE_ITEM) && t.push(r);
28258
+ (r.type === P.MACRO || r.type === P.CUSTOM_MACRO || r.type === P.REUSABLE_ITEM) && t.push(r);
28243
28259
  }
28244
28260
  }, n = [
28245
28261
  this.draw.getHeaderElementList(),
@@ -28260,14 +28276,14 @@ class TT {
28260
28276
  const d = (R) => {
28261
28277
  for (let g = 0; g < R.length; g++) {
28262
28278
  const f = R[g];
28263
- if (f.type === O.TABLE) {
28279
+ if (f.type === P.TABLE) {
28264
28280
  const T = f.trList;
28265
28281
  for (const I of T)
28266
28282
  for (const p of I.tdList)
28267
28283
  d(p.value);
28268
28284
  continue;
28269
28285
  }
28270
- f.type !== O.MACRO && f.type !== O.CUSTOM_MACRO && f.type !== O.REUSABLE_ITEM || e && f.id !== e || n && f.dictCode !== n || i && f.label !== i || r && f.areaId !== r || (c = !0, f.type === O.MACRO ? f.value = s : f.type === O.CUSTOM_MACRO ? f.macroConfig ? (f.macroConfig.value = s, l !== void 0 && (f.macroConfig.code = l)) : f.macroConfig = { type: "text", value: s } : f.type === O.REUSABLE_ITEM && (f.reusableItemConfig ? f.reusableItemConfig.value = s : f.reusableItemConfig = { value: s }));
28286
+ f.type !== P.MACRO && f.type !== P.CUSTOM_MACRO && f.type !== P.REUSABLE_ITEM || e && f.id !== e || n && f.dictCode !== n || i && f.label !== i || r && f.areaId !== r || (c = !0, f.type === P.MACRO ? f.value = s : f.type === P.CUSTOM_MACRO ? f.macroConfig ? (f.macroConfig.value = s, l !== void 0 && (f.macroConfig.code = l)) : f.macroConfig = { type: "text", value: s } : f.type === P.REUSABLE_ITEM && (f.reusableItemConfig ? f.reusableItemConfig.value = s : f.reusableItemConfig = { value: s }));
28271
28287
  }
28272
28288
  }, u = [
28273
28289
  this.draw.getHeaderElementList(),
@@ -28292,20 +28308,20 @@ class TT {
28292
28308
  const i = (s) => {
28293
28309
  for (let l = 0; l < s.length; l++) {
28294
28310
  const a = s[l];
28295
- if (a.type === O.TABLE) {
28311
+ if (a.type === P.TABLE) {
28296
28312
  const g = a.trList;
28297
28313
  for (const f of g)
28298
28314
  for (const T of f.tdList)
28299
28315
  i(T.value);
28300
28316
  continue;
28301
28317
  }
28302
- if (a.type !== O.MACRO && a.type !== O.CUSTOM_MACRO && a.type !== O.REUSABLE_ITEM)
28318
+ if (a.type !== P.MACRO && a.type !== P.CUSTOM_MACRO && a.type !== P.REUSABLE_ITEM)
28303
28319
  continue;
28304
28320
  const c = t.find((g) => g.id && a.id === g.id || g.dictCode && a.dictCode === g.dictCode || g.label && a.label === g.label || g.areaId && a.areaId === g.areaId);
28305
28321
  if (!c)
28306
28322
  continue;
28307
28323
  const { value: d, code: u, isSubmitHistory: R = !0 } = c;
28308
- e = !0, R && (n = !0), a.type === O.MACRO ? a.value = d : a.type === O.CUSTOM_MACRO ? a.macroConfig ? (a.macroConfig.value = d, u !== void 0 && (a.macroConfig.code = u)) : a.macroConfig = { type: "text", value: d } : a.type === O.REUSABLE_ITEM && (a.reusableItemConfig ? a.reusableItemConfig.value = d : a.reusableItemConfig = { value: d });
28324
+ e = !0, R && (n = !0), a.type === P.MACRO ? a.value = d : a.type === P.CUSTOM_MACRO ? a.macroConfig ? (a.macroConfig.value = d, u !== void 0 && (a.macroConfig.code = u)) : a.macroConfig = { type: "text", value: d } : a.type === P.REUSABLE_ITEM && (a.reusableItemConfig ? a.reusableItemConfig.value = d : a.reusableItemConfig = { value: d });
28309
28325
  }
28310
28326
  }, r = [
28311
28327
  this.draw.getHeaderElementList(),
@@ -28329,14 +28345,14 @@ class TT {
28329
28345
  const c = (u) => {
28330
28346
  for (let R = 0; R < u.length; R++) {
28331
28347
  const g = u[R];
28332
- if (g.type === O.TABLE) {
28348
+ if (g.type === P.TABLE) {
28333
28349
  const f = g.trList;
28334
28350
  for (const T of f)
28335
28351
  for (const I of T.tdList)
28336
28352
  c(I.value);
28337
28353
  continue;
28338
28354
  }
28339
- g.type !== O.MACRO && g.type !== O.CUSTOM_MACRO && g.type !== O.REUSABLE_ITEM || e && g.id !== e || n && g.dictCode !== n || i && g.label !== i || r && g.areaId !== r || (a = !0, Object.assign(g, s));
28355
+ g.type !== P.MACRO && g.type !== P.CUSTOM_MACRO && g.type !== P.REUSABLE_ITEM || e && g.id !== e || n && g.dictCode !== n || i && g.label !== i || r && g.areaId !== r || (a = !0, Object.assign(g, s));
28340
28356
  }
28341
28357
  }, d = [
28342
28358
  this.draw.getHeaderElementList(),
@@ -28358,7 +28374,7 @@ class TT {
28358
28374
  const { id: e, dictCode: n, label: i, areaId: r } = t, s = (a, c) => {
28359
28375
  for (let d = 0; d < a.length; d++) {
28360
28376
  const u = a[d];
28361
- if (u.type === O.TABLE) {
28377
+ if (u.type === P.TABLE) {
28362
28378
  const R = u.trList;
28363
28379
  for (let g = 0; g < R.length; g++) {
28364
28380
  const f = R[g];
@@ -28378,7 +28394,7 @@ class TT {
28378
28394
  }
28379
28395
  }
28380
28396
  }
28381
- if (!(u.type !== O.MACRO && u.type !== O.CUSTOM_MACRO && u.type !== O.REUSABLE_ITEM) && !(e && u.id !== e) && !(n && u.dictCode !== n) && !(i && u.label !== i) && !(r && u.areaId !== r))
28397
+ if (!(u.type !== P.MACRO && u.type !== P.CUSTOM_MACRO && u.type !== P.REUSABLE_ITEM) && !(e && u.id !== e) && !(n && u.dictCode !== n) && !(i && u.label !== i) && !(r && u.areaId !== r))
28382
28398
  return {
28383
28399
  zone: c,
28384
28400
  index: d
@@ -28430,7 +28446,7 @@ class TT {
28430
28446
  const { label: e, templateId: n, content: i, conditions: r, relation: s = "and", isSubmitHistory: l = !0 } = t, a = {
28431
28447
  id: mt(),
28432
28448
  value: e,
28433
- type: O.SUB_TEMPLATE,
28449
+ type: P.SUB_TEMPLATE,
28434
28450
  label: e,
28435
28451
  templateId: n,
28436
28452
  subTemplateContent: i?.map((c) => pt(c)),
@@ -28452,7 +28468,7 @@ class TT {
28452
28468
  let s = !1;
28453
28469
  for (let l = 0; l < r.length; l++)
28454
28470
  gs(r[l], (a) => {
28455
- a.id !== e || a.type !== O.SUB_TEMPLATE || (Object.assign(a, {
28471
+ a.id !== e || a.type !== P.SUB_TEMPLATE || (Object.assign(a, {
28456
28472
  ...n,
28457
28473
  value: n.label ?? a.value,
28458
28474
  subTemplateContent: n.subTemplateContent ? n.subTemplateContent.map((c) => pt(c)) : a.subTemplateContent?.map((c) => pt(c)),
@@ -28477,7 +28493,7 @@ class TT {
28477
28493
  const { id: e, content: n, isSubmitHistory: i = !0 } = t, r = this.draw.getOriginalMainElementList();
28478
28494
  for (let s = 0; s < r.length; s++) {
28479
28495
  const l = r[s];
28480
- if (l.type === O.SUB_TEMPLATE && (!e || l.id === e)) {
28496
+ if (l.type === P.SUB_TEMPLATE && (!e || l.id === e)) {
28481
28497
  const a = n || l.subTemplateContent;
28482
28498
  if (!a?.length) {
28483
28499
  console.warn("子模板内容为空,无法展开");
@@ -28508,7 +28524,7 @@ class TT {
28508
28524
  const { id: e, isSubmitHistory: n = !0 } = t, i = this.draw.getOriginalMainElementList();
28509
28525
  for (let r = 0; r < i.length; r++) {
28510
28526
  const s = i[r];
28511
- if (s.type === O.SUB_TEMPLATE && (!e || s.id === e)) {
28527
+ if (s.type === P.SUB_TEMPLATE && (!e || s.id === e)) {
28512
28528
  s.subTemplateExpanded = !1, s.hide = !1;
28513
28529
  let l = r + 1;
28514
28530
  for (; l < i.length && i[l].subTemplateParentId === s.id; )
@@ -28529,7 +28545,7 @@ class TT {
28529
28545
  const { id: e, content: n, isSubmitHistory: i = !0 } = t, r = this.draw.getOriginalMainElementList();
28530
28546
  for (let s = 0; s < r.length; s++) {
28531
28547
  const l = r[s];
28532
- if (l.type === O.SUB_TEMPLATE && (!e || l.id === e)) {
28548
+ if (l.type === P.SUB_TEMPLATE && (!e || l.id === e)) {
28533
28549
  l.subTemplateExpanded ? this.collapseSubTemplate({ id: e, isSubmitHistory: i }) : this.expandSubTemplate({ id: e, content: n, isSubmitHistory: i });
28534
28550
  return;
28535
28551
  }
@@ -28729,7 +28745,7 @@ const ST = [
28729
28745
  {
28730
28746
  key: xT,
28731
28747
  i18nPath: "contextmenu.hyperlink.delete",
28732
- when: (o) => !o.isReadonly && o.startElement?.type === O.HYPERLINK,
28748
+ when: (o) => !o.isReadonly && o.startElement?.type === P.HYPERLINK,
28733
28749
  callback: (o) => {
28734
28750
  o.executeDeleteHyperlink();
28735
28751
  }
@@ -28737,7 +28753,7 @@ const ST = [
28737
28753
  {
28738
28754
  key: VT,
28739
28755
  i18nPath: "contextmenu.hyperlink.cancel",
28740
- when: (o) => !o.isReadonly && o.startElement?.type === O.HYPERLINK,
28756
+ when: (o) => !o.isReadonly && o.startElement?.type === P.HYPERLINK,
28741
28757
  callback: (o) => {
28742
28758
  o.executeCancelHyperlink();
28743
28759
  }
@@ -28745,7 +28761,7 @@ const ST = [
28745
28761
  {
28746
28762
  key: WT,
28747
28763
  i18nPath: "contextmenu.hyperlink.edit",
28748
- when: (o) => !o.isReadonly && o.startElement?.type === O.HYPERLINK,
28764
+ when: (o) => !o.isReadonly && o.startElement?.type === P.HYPERLINK,
28749
28765
  callback: (o, t) => {
28750
28766
  const e = window.prompt(o.executeTranslate("contextmenu.hyperlink.edit"), t.startElement?.url);
28751
28767
  e && o.executeEditHyperlink(e);
@@ -28756,7 +28772,7 @@ const ST = [
28756
28772
  key: DT,
28757
28773
  i18nPath: "contextmenu.image.change",
28758
28774
  icon: "image-change",
28759
- when: (o) => !o.isReadonly && !o.editorHasSelection && o.startElement?.type === O.IMAGE,
28775
+ when: (o) => !o.isReadonly && !o.editorHasSelection && o.startElement?.type === P.IMAGE,
28760
28776
  callback: (o) => {
28761
28777
  const t = document.createElement("input");
28762
28778
  t.type = "file", t.accept = ".png, .jpg, .jpeg", t.onchange = () => {
@@ -28772,7 +28788,7 @@ const ST = [
28772
28788
  key: YT,
28773
28789
  i18nPath: "contextmenu.image.saveAs",
28774
28790
  icon: "image",
28775
- when: (o) => !o.editorHasSelection && o.startElement?.type === O.IMAGE,
28791
+ when: (o) => !o.editorHasSelection && o.startElement?.type === P.IMAGE,
28776
28792
  callback: (o) => {
28777
28793
  o.executeSaveAsImageElement();
28778
28794
  }
@@ -28780,7 +28796,7 @@ const ST = [
28780
28796
  {
28781
28797
  key: UT,
28782
28798
  i18nPath: "contextmenu.image.textWrap",
28783
- when: (o) => !o.isReadonly && !o.editorHasSelection && o.startElement?.type === O.IMAGE,
28799
+ when: (o) => !o.isReadonly && !o.editorHasSelection && o.startElement?.type === P.IMAGE,
28784
28800
  childMenus: [
28785
28801
  {
28786
28802
  key: wT,
@@ -29158,7 +29174,7 @@ class mp {
29158
29174
  R?.element && (I = R.element, p = R.element);
29159
29175
  const L = R?.element || null, m = R?.tableInfo?.element || null;
29160
29176
  R?.tableInfo?.element && (g = R.tableInfo.element);
29161
- const P = this.draw.getZone().getZone();
29177
+ const O = this.draw.getZone().getZone();
29162
29178
  return {
29163
29179
  startElement: I,
29164
29180
  endElement: p,
@@ -29168,7 +29184,7 @@ class mp {
29168
29184
  editorHasSelection: l,
29169
29185
  editorTextFocus: s,
29170
29186
  isCrossRowCol: f,
29171
- zone: P,
29187
+ zone: O,
29172
29188
  isInTable: a,
29173
29189
  trIndex: c ?? null,
29174
29190
  tdIndex: d ?? null,
@@ -29185,10 +29201,10 @@ class mp {
29185
29201
  l.classList.add(`${nt}-contextmenu-content`);
29186
29202
  let a = null;
29187
29203
  r && this.contextMenuRelationShip.set(r, s);
29188
- for (let P = 0; P < e.length; P++) {
29189
- const S = e[P];
29204
+ for (let O = 0; O < e.length; O++) {
29205
+ const S = e[O];
29190
29206
  if (S.isDivider) {
29191
- if (P !== 0 && P !== e.length - 1 && !e[P - 1]?.isDivider) {
29207
+ if (O !== 0 && O !== e.length - 1 && !e[O - 1]?.isDivider) {
29192
29208
  const E = document.createElement("div");
29193
29209
  E.classList.add(`${nt}-contextmenu-divider`), l.append(E);
29194
29210
  }
@@ -29645,7 +29661,7 @@ export {
29645
29661
  ln as EditorComponent,
29646
29662
  K as EditorMode,
29647
29663
  St as EditorZone,
29648
- O as ElementType,
29664
+ P as ElementType,
29649
29665
  Hi as FlexDirection,
29650
29666
  Yo as INTERNAL_CONTEXT_MENU_KEY,
29651
29667
  Dd as INTERNAL_SHORTCUT_KEY,