@vervedoc/core 3.0.10 → 3.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/runtime.worker-glNChxsd.js.map +1 -0
- package/dist/core.js +2358 -2238
- package/dist/core.js.map +1 -1
- package/dist/core.umd.cjs +57 -57
- package/dist/core.umd.cjs.map +1 -1
- package/dist/i18n/I18n.d.ts +6 -0
- package/dist/{index-OrDfS8Mp.js → index-DCzhFl4v.js} +102 -94
- package/dist/{index-OrDfS8Mp.js.map → index-DCzhFl4v.js.map} +1 -1
- package/package.json +10 -10
- package/dist/assets/runtime.worker-BUGfHnel.js.map +0 -1
package/dist/core.umd.cjs
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.id="docx-editor-core-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-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;-webkit-appearance:none;-moz-appearance:none;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;overflow:hidden;border-radius:8px;background-color:#fff;border:1px solid rgb(235 236 240)}.ce-table-tool__row{position:absolute;width:14px;border-radius:2px;overflow:visible;background-color:transparent}.ce-table-tool__row .ce-table-tool__row__item{width:100%;position:relative;cursor:pointer;transition:all .2s;background-color:transparent}.ce-table-tool__row .ce-table-tool__row__item:after{display:none}.ce-table-tool__row .ce-table-tool__row__item:hover{background-color:#409eff1a}.ce-table-tool__row .ce-table-tool__row__item:last-child:after{display:none}.ce-table-tool__quick__add{width:20px;height:20px;position:absolute;border-radius:3px;background-color:#fff;border:1px solid #d0d0d0;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s;box-shadow:0 1px 3px #00000014}.ce-table-tool__quick__add:hover{border-color:#409eff;background-color:#ecf5ff}.ce-table-tool__quick__add:after{content:"+";color:#606266;font-size:16px;font-weight:300;line-height:1;position:static;transform:none}.ce-table-tool__quick__add:hover:after{color:#409eff}.ce-table-tool__select{width:20px;height:20px;position:absolute;border-radius:3px;cursor:pointer;background-color:#fff;border:1px solid #d0d0d0;display:flex;align-items:center;justify-content:center;transition:all .2s;box-shadow:0 1px 3px #00000014}.ce-table-tool__select:hover{border-color:#409eff;background-color:#ecf5ff}.ce-table-tool__select:after{content:"";width:10px;height:10px;border:1.5px solid #606266;border-radius:1px;position:static;transform:none;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.ce-table-tool__select:before{content:"";position:absolute;width:10px;height:10px;background:linear-gradient(to right,#606266 1px,transparent 1px) center/50% 100%,linear-gradient(to bottom,#606266 1px,transparent 1px) center/100% 50%}.ce-table-tool__select:hover:after{border-color:#409eff}.ce-table-tool__select:hover:before{background:linear-gradient(to right,#409eff 1px,transparent 1px) center/50% 100%,linear-gradient(to bottom,#409eff 1px,transparent 1px) center/100% 50%}.ce-table-tool__col{position:absolute;height:14px;border-radius:2px;overflow:visible;background-color:transparent;display:flex}.ce-table-tool__col .ce-table-tool__col__item{height:100%;position:relative;cursor:pointer;transition:all .2s;background-color:transparent}.ce-table-tool__col .ce-table-tool__col__item:after{display:none}.ce-table-tool__col .ce-table-tool__col__item:hover{background-color:#409eff1a}.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:#409eff26}.ce-table-tool__col .ce-table-tool__anchor{right:-5px;width:10px;height:14px;z-index:9;position:absolute;cursor:col-resize}.ce-table-tool__row .ce-table-tool__anchor{bottom:-5px;left:0;width:14px;height:10px;z-index:9;position:absolute;cursor:row-resize}.ce-table-anchor__line{z-index:9;position:absolute;border:1px dashed #409eff}.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-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-toolbar{display:flex;justify-content:space-between;align-items:center;padding:0!important;background:transparent!important;height:24px;position:absolute}.ce-zone-toolbar-label{padding:2px 8px;font-size:12px;color:#0078d4;background:#dae7fc;border-radius:2px;white-space:nowrap}.ce-zone-toolbar-btn{display:flex;align-items:center;gap:4px;padding:4px 8px;font-size:12px;color:#0078d4;background:#dae7fc;border-radius:2px;cursor:pointer;transition:background-color .2s;white-space:nowrap}.ce-zone-toolbar-btn:hover{background:#c6d8f8}.ce-zone-toolbar-btn span{margin:0 2px}.ce-zone-toolbar-btn svg{flex-shrink:0}.ce-zone-pagenumber-menu{position:fixed;background:#fff;border:1px solid #e0e0e0;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:1000;min-width:140px;padding:4px 0}.ce-zone-pagenumber-menu-item{padding:8px 16px;font-size:13px;color:#333;cursor:pointer;transition:background-color .15s}.ce-zone-pagenumber-menu-item:hover{background-color:#f5f5f5}.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-floating-toolbar{display:none;position:fixed;background:#fff;border-radius:8px;padding:4px 8px;box-shadow:0 2px 10px #00000026;border:1px solid #dadce0;z-index:2000;gap:2px;align-items:center}.ce-floating-toolbar.show{display:flex}.ce-floating-toolbar .fb-btn{width:32px;height:32px;border:none;background:transparent;border-radius:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#444746;padding:0}.ce-floating-toolbar .fb-btn:hover{background:#f1f3f4}.ce-floating-toolbar .fb-btn.active{background:#e8f0fe;color:#1a73e8}.ce-floating-toolbar .fb-btn svg{width:18px;height:18px}.ce-floating-toolbar .fb-divider{width:1px;height:20px;background:#dadce0;margin:0 4px}.ce-floating-toolbar .fb-select{height:28px;padding:0 8px;border:1px solid #dadce0;background:#fff;border-radius:4px;font-size:12px;color:#444746;cursor:pointer;outline:none}.ce-floating-toolbar .fb-select:hover{background:#f1f3f4}.ce-floating-toolbar .fb-color{width:28px;height:28px;padding:2px;border:1px solid #dadce0;background:transparent;border-radius:4px;cursor:pointer}.ce-floating-toolbar .fb-color-picker{position:relative}.ce-floating-toolbar .fb-color-btn{position:relative;flex-direction:column;height:36px;padding-bottom:2px}.ce-floating-toolbar .fb-color-indicator{display:block;width:16px;height:3px;border-radius:1px;margin-top:1px}.ce-floating-toolbar .fb-color-input{position:absolute;width:0;height:0;opacity:0;pointer-events:none}.ce-floating-toolbar .fb-label{font-size:12px;color:#5f6368;padding:0 4px}.ce-table-context-menu{position:fixed;background:#fff;border:1px solid #e7e7e7;border-radius:0;box-shadow:0 10px 28px #0f172a1f;padding:6px 0;min-width:176px;z-index:9999;font-family:Microsoft YaHei,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:13px;color:#303133;-webkit-user-select:none;user-select:none;overflow:hidden}.ce-table-context-menu__item{min-height:33px;padding:0 12px;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:16px;line-height:1;white-space:nowrap;transition:background-color .15s ease,color .15s ease}.ce-table-context-menu__item:hover{background-color:#f5f7fa}.ce-table-context-menu__item.disabled{opacity:.45;cursor:not-allowed;pointer-events:none}.ce-table-context-menu__item.disabled:hover{background-color:transparent}.ce-table-context-menu__item.active{background-color:#f5f7fa}.ce-table-context-menu__item.danger .ce-table-context-menu__label,.ce-table-context-menu__item.danger .ce-table-context-menu__icon svg,.ce-table-context-menu__item.danger .ce-table-context-menu__arrow{color:#d14343}.ce-table-context-menu__main,.ce-table-context-menu__meta{display:inline-flex;align-items:center}.ce-table-context-menu__main{gap:10px;min-width:0;flex:1 1 auto}.ce-table-context-menu__meta{gap:8px;flex:0 0 auto}.ce-table-context-menu__icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;flex-shrink:0}.ce-table-context-menu__icon svg{width:16px;height:16px;color:#646a73}.ce-table-context-menu__item:hover .ce-table-context-menu__icon svg{color:#303133}.ce-table-context-menu__label{font-size:12px;color:#303133;font-weight:400;letter-spacing:0}.ce-table-context-menu__shortcut{color:#909399;font-size:11px}.ce-table-context-menu__arrow{color:#909399;font-size:12px;font-family:Segoe UI,sans-serif;font-weight:600;line-height:1}.ce-table-context-menu__divider{height:1px;background-color:#ebeef5;margin:6px 0}.ce-table-context-menu__input-number{width:54px;height:22px;padding:0 6px;border:1px solid #dcdfe6;border-radius:0;font-size:11px;outline:none;transition:border-color .15s ease,box-shadow .15s ease;color:#303133;background:#fff;text-align:center}.ce-table-context-menu__input-number:focus{border-color:#409eff;box-shadow:0 0 0 2px #409eff1f}.ce-table-context-menu__input-number:hover{border-color:#c0c4cc}.ce-table-context-menu__unit{font-size:11px;color:#606266;flex-shrink:0}.ce-table-context-menu__color-preview{width:14px;height:14px;border:1px solid #dcdfe6;border-radius:0;box-sizing:border-box;background-image:linear-gradient(45deg,#f2f3f5 25%,transparent 25%),linear-gradient(-45deg,#f2f3f5 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#f2f3f5 75%),linear-gradient(-45deg,transparent 75%,#f2f3f5 75%);background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0}.ce-table-context-menu--sub{min-width:190px}.ce-table-context-menu--icon-grid{display:grid;grid-template-columns:repeat(3,28px);gap:6px;min-width:auto;padding:8px}.ce-table-context-menu--icon-grid .ce-table-context-menu__item{width:28px;min-width:28px;min-height:28px;padding:0;justify-content:center;gap:0;border:1px solid #9fa3a9;box-sizing:border-box}.ce-table-context-menu--icon-grid .ce-table-context-menu__main,.ce-table-context-menu--icon-grid .ce-table-context-menu__meta{flex:none}.ce-table-context-menu--icon-grid .ce-table-context-menu__main{justify-content:center}.ce-table-context-menu--icon-grid .ce-table-context-menu__icon{width:16px;height:16px}.ce-table-context-menu--icon-grid .ce-table-context-menu__item:hover,.ce-table-context-menu--icon-grid .ce-table-context-menu__item.active{background-color:#f0f0f0}.ce-table-context-menu__color-panel{position:fixed;width:250px;padding:8px;background:#fff;border:1px solid #e7e7e7;border-radius:0;box-shadow:0 10px 28px #0f172a1f;z-index:10001;box-sizing:border-box}.ce-table-context-menu__picker-host{width:100%}.ce-table-context-menu__picker-host .picker_wrapper{width:100%;margin:0;border:none;box-shadow:none;background:transparent}.ce-table-context-menu__picker-host .picker_editor input,.ce-table-context-menu__picker-host .picker_done button,.ce-table-context-menu__picker-host .picker_cancel button{font-size:12px}.ce-table-context-menu__picker-host .picker_done button,.ce-table-context-menu__picker-host .picker_cancel button{min-width:56px;height:28px;padding:0 10px;border-radius:0;line-height:28px}.ce-table-context-menu__picker-host .picker_done{margin-top:6px}.ce-table-context-menu__picker-host .picker_cancel{display:none}.ce-inputarea{width:100px;height:30px;min-width:0;min-height:0;margin:0;padding:0;left:0;top:0;letter-spacing:0;font-size:12px;position:absolute;z-index:-1;outline:none;resize:none;border:none;overflow:hidden;color:transparent;-webkit-user-select:none;user-select:none;caret-color:transparent;background-color:transparent}.ce-cursor{width:1px;height:20px;left:0;right:0;position:absolute;outline:none;background-color:#000;pointer-events:none}.ce-cursor.ce-cursor--animation{animation-duration:1s;animation-iteration-count:infinite;animation-name:cursorAnimation}@keyframes cursorAnimation{0%{opacity:1}13%{opacity:0}50%{opacity:0}63%{opacity:1}to{opacity:1}}.ce-float-image{position:absolute;opacity:.5;pointer-events:none}`)),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
(function(le,ce){typeof exports=="object"&&typeof module<"u"?ce(exports,require("@vervedoc/docx-editor-schema"),require("@vervedoc/docx-editor-view"),require("@vervedoc/docx-editor-transform"),require("@vervedoc/docx-editor-state"),require("@vervedoc/docx-editor-history"),require("@vervedoc/docx-editor-keymap"),require("@vervedoc/docx-editor-commands"),require("@vervedoc/docx-editor-comment"),require("jszip")):typeof define=="function"&&define.amd?define(["exports","@vervedoc/docx-editor-schema","@vervedoc/docx-editor-view","@vervedoc/docx-editor-transform","@vervedoc/docx-editor-state","@vervedoc/docx-editor-history","@vervedoc/docx-editor-keymap","@vervedoc/docx-editor-commands","@vervedoc/docx-editor-comment","jszip"],ce):(le=typeof globalThis<"u"?globalThis:le||self,ce(le.VerveDocCore={},le.DocxEditorSchema,le.DocxEditorView,le.DocxEditorTransform,le.DocxEditorState,le.DocxEditorHistory,le.DocxEditorKeymap,le.DocxEditorCommands,le.DocxEditorComment,le.JSZip))})(this,function(le,ce,ve,qe,Qt,fn,dn,Fe,Sr,cf){"use strict";var ev=Object.defineProperty;var tv=(le,ce,ve)=>ce in le?ev(le,ce,{enumerable:!0,configurable:!0,writable:!0,value:ve}):le[ce]=ve;var Se=(le,ce,ve)=>tv(le,typeof ce!="symbol"?ce+"":ce,ve);const ba="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBfPShlPT4oZS5DT05UQUlOPSJjb250YWluIixlLkNPVkVSPSJjb3ZlciIsZSkpKF98fHt9KSxCPShlPT4oZS5SRVBFQVQ9InJlcGVhdCIsZS5OT19SRVBFQVQ9Im5vLXJlcGVhdCIsZS5SRVBFQVRfWD0icmVwZWF0LXgiLGUuUkVQRUFUX1k9InJlcGVhdC15IixlKSkoQnx8e30pLFI9KGU9PihlLkhBTEY9ImhhbGYiLGUuT05FX1RISVJEPSJvbmUtdGhpcmQiLGUuUVVBUlRFUj0icXVhcnRlciIsZSkpKFJ8fHt9KSx5PShlPT4oZS5BUkFCSUM9ImFyYWJpYyIsZS5DSElORVNFPSJjaGluZXNlIixlKSkoeXx8e30pLEM9KGU9PihlLlBSRUZJWD0icHJlZml4IixlLlBPU1RGSVg9InBvc3RmaXgiLGUuUFJFX1RFWFQ9InByZVRleHQiLGUuUE9TVF9URVhUPSJwb3N0VGV4dCIsZS5QTEFDRUhPTERFUj0icGxhY2Vob2xkZXIiLGUuVkFMVUU9InZhbHVlIixlLkNIRUNLQk9YPSJjaGVja2JveCIsZS5SQURJTz0icmFkaW8iLGUpKShDfHx7fSksZD0oZT0+KGUuVEVYVD0idGV4dCIsZS5JTUFHRT0iaW1hZ2UiLGUuVEFCTEU9InRhYmxlIixlLkhZUEVSTElOSz0iaHlwZXJsaW5rIixlLlNVUEVSU0NSSVBUPSJzdXBlcnNjcmlwdCIsZS5TVUJTQ1JJUFQ9InN1YnNjcmlwdCIsZS5TRVBBUkFUT1I9InNlcGFyYXRvciIsZS5QQUdFX0JSRUFLPSJwYWdlQnJlYWsiLGUuQ09OVFJPTD0iY29udHJvbCIsZS5BUkVBPSJhcmVhIixlLkNIRUNLQk9YPSJjaGVja2JveCIsZS5SQURJTz0icmFkaW8iLGUuTEFURVg9ImxhdGV4IixlLlRBQj0idGFiIixlLkRBVEU9ImRhdGUiLGUuQkxPQ0s9ImJsb2NrIixlLlRJVExFPSJ0aXRsZSIsZS5MSVNUPSJsaXN0IixlLlBMQUNFSE9MREVSPSJwbGFjZWhvbGRlciIsZS5GT09UTk9URV9NQVJLPSJmb290bm90ZU1hcmsiLGUuRk9PVE5PVEVfQ09OVEVOVD0iZm9vdG5vdGVDb250ZW50IixlLkZPT1ROT1RFX1NFUEFSQVRPUj0iZm9vdG5vdGVTZXBhcmF0b3IiLGUuQ09MVU1OX0JSRUFLPSJjb2x1bW5CcmVhayIsZS5SRVZJU0lPTl9JTlNFUlQ9InJldmlzaW9uSW5zZXJ0IixlLlJFVklTSU9OX0RFTEVURT0icmV2aXNpb25EZWxldGUiLGUpKShkfHx7fSksaz0oZT0+KGUuUEFHRT0icGFnZSIsZS5DT05USU5VSVRZPSJjb250aW51aXR5IixlKSkoa3x8e30pLHY9KGU9PihlLlVMPSJ1bCIsZS5PTD0ib2wiLGUpKSh2fHx7fSksVD0oZT0+KGUuRElTQz0iZGlzYyIsZS5DSVJDTEU9ImNpcmNsZSIsZS5TUVVBUkU9InNxdWFyZSIsZS5DSEVDS0JPWD0iY2hlY2tib3giLGUuRElBTU9ORD0iZGlhbW9uZCIsZS5EQVNIPSJkYXNoIixlLkNIRUNLPSJjaGVjayIsZS5UUklBTkdMRT0idHJpYW5nbGUiLGUuU1RBUj0ic3RhciIsZS5BUlJPVz0iYXJyb3ciLGUuRElBTU9ORF9TT0xJRD0iZGlhbW9uZC1zb2xpZCIsZS5BTkdMRT0iYW5nbGUiLGUuSE9MTE9XX0NJUkNMRT0iaG9sbG93LWNpcmNsZSIsZS5IT0xMT1dfU1FVQVJFPSJob2xsb3ctc3F1YXJlIixlLkhFQVJUX0hPTExPVz0iaGVhcnQtaG9sbG93IixlLkhBU0g9Imhhc2giLGUuVFJJQU5HTEVfU09MSUQ9InRyaWFuZ2xlLXNvbGlkIixlLlNUQVJfU09MSUQ9InN0YXItc29saWQiLGUuSEVBUlRfU09MSUQ9ImhlYXJ0LXNvbGlkIixlLkZMT1dFUj0iZmxvd2VyIixlLkFTVEVSSVNLPSJhc3RlcmlzayIsZS5IT0xMT1dfRElBTU9ORD0iaG9sbG93LWRpYW1vbmQiLGUuSE9MTE9XX1RSSUFOR0xFPSJob2xsb3ctdHJpYW5nbGUiLGUpKShUfHx7fSksTD0oZT0+KGUuRElTQz0iZGlzYyIsZS5DSVJDTEU9ImNpcmNsZSIsZS5TUVVBUkU9InNxdWFyZSIsZS5DSEVDS0JPWD0iY2hlY2tib3giLGUuRElBTU9ORD0iZGlhbW9uZCIsZS5EQVNIPSJkYXNoIixlLkNIRUNLPSJjaGVjayIsZS5ERUNJTUFMPSJkZWNpbWFsIixlLkRFQ0lNQUxfRE9UPSJkZWNpbWFsLWRvdCIsZS5ERUNJTUFMX1BBUkVOPSJkZWNpbWFsLXBhcmVuIixlLkRFQ0lNQUxfQ0lSQ0xFPSJkZWNpbWFsLWNpcmNsZSIsZS5ERUNJTUFMX0JSQUNLRVQ9ImRlY2ltYWwtYnJhY2tldCIsZS5DSElORVNFPSJjaGluZXNlIixlLkNISU5FU0VfQlJBQ0tFVD0iY2hpbmVzZS1icmFja2V0IixlLlVQUEVSX0FMUEhBPSJ1cHBlci1hbHBoYSIsZS5MT1dFUl9BTFBIQV9ET1Q9Imxvd2VyLWFscGhhLWRvdCIsZSkpKEx8fHt9KSx3PShlPT4oZS5MRUZUPSJsZWZ0IixlLkNFTlRFUj0iY2VudGVyIixlLlJJR0hUPSJyaWdodCIsZS5BTElHTk1FTlQ9ImFsaWdubWVudCIsZS5KVVNUSUZZPSJqdXN0aWZ5IixlKSkod3x8e30pLEk9KGU9PihlLkZJUlNUPSJmaXJzdCIsZS5TRUNPTkQ9InNlY29uZCIsZS5USElSRD0idGhpcmQiLGUuRk9VUlRIPSJmb3VydGgiLGUuRklGVEg9ImZpZnRoIixlLlNJWFRIPSJzaXh0aCIsZSkpKEl8fHt9KSxIPShlPT4oZS5UT1A9InRvcCIsZS5NSURETEU9Im1pZGRsZSIsZS5CT1RUT009ImJvdHRvbSIsZSkpKEh8fHt9KSx4PShlPT4oZS5URVhUPSJ0ZXh0IixlLklNQUdFPSJpbWFnZSIsZSkpKHh8fHt9KTtjb25zdCBTPSLigIsiO1IuSEFMRisiIiwxLzIsUi5PTkVfVEhJUkQrIiIsMS8zLFIuUVVBUlRFUisiIiwxLzQ7Y29uc3QgTT1bInJvd0ZsZXgiLCJyb3dNYXJnaW4iLCJwYXJhZ3JhcGhDb2xvciIsInBhcmFncmFwaEluZGVudExlZnQiLCJwYXJhZ3JhcGhGaXJzdExpbmVJbmRlbnQiLCJwYXJhZ3JhcGhTcGFjaW5nQmVmb3JlIiwicGFyYWdyYXBoU3BhY2luZ0FmdGVyIl0sVT1bInR5cGUiLCJmb250Iiwic2l6ZSIsImNoYXJhY3RlclNjYWxlIiwiYm9sZCIsImNvbG9yIiwiaXRhbGljIiwiaGlnaGxpZ2h0IiwicGFyYWdyYXBoQ29sb3IiLCJ1bmRlcmxpbmUiLCJzdHJpa2VvdXQiLCJyb3dGbGV4Iiwicm93TWFyZ2luIiwiZGFzaEFycmF5Iiwic2VwYXJhdG9yVHlwZSIsInNlcGFyYXRvckxpbmVXaWR0aCIsInRyTGlzdCIsInRhYmxlVG9vbERpc2FibGVkIiwiYm9yZGVyVHlwZSIsImJvcmRlckNvbG9yIiwiYm9yZGVyV2lkdGgiLCJib3JkZXJFeHRlcm5hbFdpZHRoIiwid2lkdGgiLCJoZWlnaHQiLCJ1cmwiLCJjb2xncm91cCIsInZhbHVlTGlzdCIsImNvbnRyb2wiLCJjaGVja2JveCIsInJhZGlvIiwiZGF0ZUZvcm1hdCIsImJsb2NrIiwibGV2ZWwiLCJ0aXRsZSIsImxpc3RUeXBlIiwibGlzdFN0eWxlIiwibGlzdFdyYXAiLCJncm91cElkcyIsImNvbmNlcHRJZCIsImltZ0Rpc3BsYXkiLCJpbWdGbG9hdFBvc2l0aW9uIiwiaW1nVG9vbERpc2FibGVkIiwidGV4dERlY29yYXRpb24iLCJleHRlbnNpb24iLCJleHRlcm5hbElkIiwiYXJlYUlkIiwiYXJlYSIsInBhcmFncmFwaEluZGVudExlZnQiLCJwYXJhZ3JhcGhGaXJzdExpbmVJbmRlbnQiLCJwYXJhZ3JhcGhTcGFjaW5nQmVmb3JlIiwicGFyYWdyYXBoU3BhY2luZ0FmdGVyIiwicmV2aXNpb25JZCIsInJldmlzaW9uVHlwZSIsInJldmlzaW9uQXV0aG9yIiwicmV2aXNpb25EYXRlIl0sSz1bImNvbmNlcHRJZCIsImV4dGVuc2lvbiIsImV4dGVybmFsSWQiLCJ2ZXJ0aWNhbEFsaWduIiwiYmFja2dyb3VuZENvbG9yIiwiYm9yZGVyVHlwZXMiLCJib3JkZXJTdHlsZSIsInNsYXNoVHlwZXMiLCJkaXNhYmxlZCIsImRlbGV0YWJsZSJdLFc9WyJmb250Iiwic2l6ZSIsImJvbGQiLCJoaWdobGlnaHQiLCJpdGFsaWMiLCJzdHJpa2VvdXQiXSxWPVtkLlRFWFQsZC5IWVBFUkxJTkssZC5TVUJTQ1JJUFQsZC5TVVBFUlNDUklQVCxkLkNPTlRST0wsZC5EQVRFLGQuUExBQ0VIT0xERVJdO2QuSU1BR0UsZC5MQVRFWCxkLkJMT0NLLGQuUEFHRV9CUkVBSyxkLlNFUEFSQVRPUixkLlRBQkxFLGQuVElUTEUsZC5MSVNULHcuQ0VOVEVSLHkuQVJBQklDLHkuQVJBQklDLHkuQVJBQklDLHkuQVJBQklDLHkuQVJBQklDLHkuQVJBQklDLHkuQVJBQklDLHkuQVJBQklDLHkuQ0hJTkVTRSx5LkNISU5FU0U7Y29uc3QgRz1uZXcgUmVnRXhwKGBeWyR7U30KXWApO3guVEVYVCx5LkFSQUJJQyxJLkZJUlNUKyIiLEkuU0VDT05EKyIiLEkuVEhJUkQrIiIsSS5GT1VSVEgrIiIsSS5GSUZUSCsiIixJLlNJWFRIKyIiLEkuRklSU1QrIiIsSS5TRUNPTkQrIiIsSS5USElSRCsiIixJLkZPVVJUSCsiIixJLkZJRlRIKyIiLEkuU0lYVEgrIiIsSS5GSVJTVCxJLlNFQ09ORCxJLlRISVJELEkuRk9VUlRILEkuRklGVEgsSS5TSVhUSDtjb25zdCAkPXtbVC5ESVNDXToi4oCiIixbVC5DSVJDTEVdOiLil6YiLFtULlNRVUFSRV06IuKWq++4jiIsW1QuQ0hFQ0tCT1hdOiLimJHvuI8iLFtULkRJQU1PTkRdOiLil4YiLFtULkRBU0hdOiLigJQiLFtULkNIRUNLXToi4pyTIixbVC5UUklBTkdMRV06IuKWtiIsW1QuU1RBUl06IuKYhSIsW1QuQVJST1ddOiLilrgiLFtULkRJQU1PTkRfU09MSURdOiLimaYiLFtULkFOR0xFXToiPiIsW1QuSE9MTE9XX0NJUkNMRV06IuKXiyIsW1QuSE9MTE9XX1NRVUFSRV06IuKWoSIsW1QuSEVBUlRfSE9MTE9XXToi4pmhIixbVC5IQVNIXToiIyIsW1QuVFJJQU5HTEVfU09MSURdOiLilrIiLFtULlNUQVJfU09MSURdOiLimIYiLFtULkhFQVJUX1NPTElEXToi4pmlIixbVC5GTE9XRVJdOiLinL8iLFtULkFTVEVSSVNLXToiKiIsW1QuSE9MTE9XX0RJQU1PTkRdOiLil4ciLFtULkhPTExPV19UUklBTkdMRV06IuKWtyJ9O3YuT0wrIiIsdi5VTCsiIixMLkRJU0MrIiIsTC5DSVJDTEUrIiIsTC5TUVVBUkUrIiIsTC5ERUNJTUFMKyIiLEwuREVDSU1BTF9ET1QrIiIsTC5ERUNJTUFMX1BBUkVOKyIiLEwuREVDSU1BTF9DSVJDTEUrIiIsTC5ERUNJTUFMX0JSQUNLRVQrIiIsTC5DSElORVNFKyIiLEwuQ0hJTkVTRV9CUkFDS0VUKyIiLEwuVVBQRVJfQUxQSEErIiIsTC5MT1dFUl9BTFBIQV9ET1QrIiIsTC5DSEVDS0JPWCsiIixMLkRJQU1PTkQrIiIsTC5EQVNIKyIiLEwuQ0hFQ0srIiIsXy5DT1ZFUixCLk5PX1JFUEVBVCxILkJPVFRPTSxSLkhBTEYsUi5IQUxGLEguQk9UVE9NLGsuQ09OVElOVUlUWTtmdW5jdGlvbiBqKGUpe3JldHVybiBlJiZlLl9fZXNNb2R1bGUmJk9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChlLCJkZWZhdWx0Iik/ZS5kZWZhdWx0OmV9dmFyIHo9ZnVuY3Rpb24gZShyLGEpe2lmKHI9PT1hKXJldHVybiEwO2lmKHImJmEmJnR5cGVvZiByPT0ib2JqZWN0IiYmdHlwZW9mIGE9PSJvYmplY3QiKXtpZihyLmNvbnN0cnVjdG9yIT09YS5jb25zdHJ1Y3RvcilyZXR1cm4hMTt2YXIgZixzLGk7aWYoQXJyYXkuaXNBcnJheShyKSl7aWYoZj1yLmxlbmd0aCxmIT1hLmxlbmd0aClyZXR1cm4hMTtmb3Iocz1mO3MtLSE9PTA7KWlmKCFlKHJbc10sYVtzXSkpcmV0dXJuITE7cmV0dXJuITB9aWYoci5jb25zdHJ1Y3Rvcj09PVJlZ0V4cClyZXR1cm4gci5zb3VyY2U9PT1hLnNvdXJjZSYmci5mbGFncz09PWEuZmxhZ3M7aWYoci52YWx1ZU9mIT09T2JqZWN0LnByb3RvdHlwZS52YWx1ZU9mKXJldHVybiByLnZhbHVlT2YoKT09PWEudmFsdWVPZigpO2lmKHIudG9TdHJpbmchPT1PYmplY3QucHJvdG90eXBlLnRvU3RyaW5nKXJldHVybiByLnRvU3RyaW5nKCk9PT1hLnRvU3RyaW5nKCk7aWYoaT1PYmplY3Qua2V5cyhyKSxmPWkubGVuZ3RoLGYhPT1PYmplY3Qua2V5cyhhKS5sZW5ndGgpcmV0dXJuITE7Zm9yKHM9ZjtzLS0hPT0wOylpZighT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKGEsaVtzXSkpcmV0dXJuITE7Zm9yKHM9ZjtzLS0hPT0wOyl7dmFyIHA9aVtzXTtpZighZShyW3BdLGFbcF0pKXJldHVybiExfXJldHVybiEwfXJldHVybiByIT09ciYmYSE9PWF9O2NvbnN0IFk9aih6KTt2YXIgUT1xO2Z1bmN0aW9uIGIoZSl7cmV0dXJuIGUgaW5zdGFuY2VvZiBCdWZmZXI/QnVmZmVyLmZyb20oZSk6bmV3IGUuY29uc3RydWN0b3IoZS5idWZmZXIuc2xpY2UoKSxlLmJ5dGVPZmZzZXQsZS5sZW5ndGgpfWZ1bmN0aW9uIHEoZSl7aWYoZT1lfHx7fSxlLmNpcmNsZXMpcmV0dXJuIFooZSk7Y29uc3Qgcj1uZXcgTWFwO2lmKHIuc2V0KERhdGUscD0+bmV3IERhdGUocCkpLHIuc2V0KE1hcCwocCxjKT0+bmV3IE1hcChmKEFycmF5LmZyb20ocCksYykpKSxyLnNldChTZXQsKHAsYyk9Pm5ldyBTZXQoZihBcnJheS5mcm9tKHApLGMpKSksZS5jb25zdHJ1Y3RvckhhbmRsZXJzKWZvcihjb25zdCBwIG9mIGUuY29uc3RydWN0b3JIYW5kbGVycylyLnNldChwWzBdLHBbMV0pO2xldCBhPW51bGw7cmV0dXJuIGUucHJvdG8/aTpzO2Z1bmN0aW9uIGYocCxjKXtjb25zdCB0PU9iamVjdC5rZXlzKHApLEU9bmV3IEFycmF5KHQubGVuZ3RoKTtmb3IobGV0IG49MDtuPHQubGVuZ3RoO24rKyl7Y29uc3QgbD10W25dLG89cFtsXTt0eXBlb2YgbyE9Im9iamVjdCJ8fG89PT1udWxsP0VbbF09bzpvLmNvbnN0cnVjdG9yIT09T2JqZWN0JiYoYT1yLmdldChvLmNvbnN0cnVjdG9yKSk/RVtsXT1hKG8sYyk6QXJyYXlCdWZmZXIuaXNWaWV3KG8pP0VbbF09YihvKTpFW2xdPWMobyl9cmV0dXJuIEV9ZnVuY3Rpb24gcyhwKXtpZih0eXBlb2YgcCE9Im9iamVjdCJ8fHA9PT1udWxsKXJldHVybiBwO2lmKEFycmF5LmlzQXJyYXkocCkpcmV0dXJuIGYocCxzKTtpZihwLmNvbnN0cnVjdG9yIT09T2JqZWN0JiYoYT1yLmdldChwLmNvbnN0cnVjdG9yKSkpcmV0dXJuIGEocCxzKTtjb25zdCBjPXt9O2Zvcihjb25zdCB0IGluIHApe2lmKE9iamVjdC5oYXNPd25Qcm9wZXJ0eS5jYWxsKHAsdCk9PT0hMSljb250aW51ZTtjb25zdCBFPXBbdF07dHlwZW9mIEUhPSJvYmplY3QifHxFPT09bnVsbD9jW3RdPUU6RS5jb25zdHJ1Y3RvciE9PU9iamVjdCYmKGE9ci5nZXQoRS5jb25zdHJ1Y3RvcikpP2NbdF09YShFLHMpOkFycmF5QnVmZmVyLmlzVmlldyhFKT9jW3RdPWIoRSk6Y1t0XT1zKEUpfXJldHVybiBjfWZ1bmN0aW9uIGkocCl7aWYodHlwZW9mIHAhPSJvYmplY3QifHxwPT09bnVsbClyZXR1cm4gcDtpZihBcnJheS5pc0FycmF5KHApKXJldHVybiBmKHAsaSk7aWYocC5jb25zdHJ1Y3RvciE9PU9iamVjdCYmKGE9ci5nZXQocC5jb25zdHJ1Y3RvcikpKXJldHVybiBhKHAsaSk7Y29uc3QgYz17fTtmb3IoY29uc3QgdCBpbiBwKXtjb25zdCBFPXBbdF07dHlwZW9mIEUhPSJvYmplY3QifHxFPT09bnVsbD9jW3RdPUU6RS5jb25zdHJ1Y3RvciE9PU9iamVjdCYmKGE9ci5nZXQoRS5jb25zdHJ1Y3RvcikpP2NbdF09YShFLGkpOkFycmF5QnVmZmVyLmlzVmlldyhFKT9jW3RdPWIoRSk6Y1t0XT1pKEUpfXJldHVybiBjfX1mdW5jdGlvbiBaKGUpe2NvbnN0IHI9W10sYT1bXSxmPW5ldyBNYXA7aWYoZi5zZXQoRGF0ZSx0PT5uZXcgRGF0ZSh0KSksZi5zZXQoTWFwLCh0LEUpPT5uZXcgTWFwKGkoQXJyYXkuZnJvbSh0KSxFKSkpLGYuc2V0KFNldCwodCxFKT0+bmV3IFNldChpKEFycmF5LmZyb20odCksRSkpKSxlLmNvbnN0cnVjdG9ySGFuZGxlcnMpZm9yKGNvbnN0IHQgb2YgZS5jb25zdHJ1Y3RvckhhbmRsZXJzKWYuc2V0KHRbMF0sdFsxXSk7bGV0IHM9bnVsbDtyZXR1cm4gZS5wcm90bz9jOnA7ZnVuY3Rpb24gaSh0LEUpe2NvbnN0IG49T2JqZWN0LmtleXModCksbD1uZXcgQXJyYXkobi5sZW5ndGgpO2ZvcihsZXQgbz0wO288bi5sZW5ndGg7bysrKXtjb25zdCBBPW5bb10sdT10W0FdO2lmKHR5cGVvZiB1IT0ib2JqZWN0Inx8dT09PW51bGwpbFtBXT11O2Vsc2UgaWYodS5jb25zdHJ1Y3RvciE9PU9iamVjdCYmKHM9Zi5nZXQodS5jb25zdHJ1Y3RvcikpKWxbQV09cyh1LEUpO2Vsc2UgaWYoQXJyYXlCdWZmZXIuaXNWaWV3KHUpKWxbQV09Yih1KTtlbHNle2NvbnN0IE89ci5pbmRleE9mKHUpO08hPT0tMT9sW0FdPWFbT106bFtBXT1FKHUpfX1yZXR1cm4gbH1mdW5jdGlvbiBwKHQpe2lmKHR5cGVvZiB0IT0ib2JqZWN0Inx8dD09PW51bGwpcmV0dXJuIHQ7aWYoQXJyYXkuaXNBcnJheSh0KSlyZXR1cm4gaSh0LHApO2lmKHQuY29uc3RydWN0b3IhPT1PYmplY3QmJihzPWYuZ2V0KHQuY29uc3RydWN0b3IpKSlyZXR1cm4gcyh0LHApO2NvbnN0IEU9e307ci5wdXNoKHQpLGEucHVzaChFKTtmb3IoY29uc3QgbiBpbiB0KXtpZihPYmplY3QuaGFzT3duUHJvcGVydHkuY2FsbCh0LG4pPT09ITEpY29udGludWU7Y29uc3QgbD10W25dO2lmKHR5cGVvZiBsIT0ib2JqZWN0Inx8bD09PW51bGwpRVtuXT1sO2Vsc2UgaWYobC5jb25zdHJ1Y3RvciE9PU9iamVjdCYmKHM9Zi5nZXQobC5jb25zdHJ1Y3RvcikpKUVbbl09cyhsLHApO2Vsc2UgaWYoQXJyYXlCdWZmZXIuaXNWaWV3KGwpKUVbbl09YihsKTtlbHNle2NvbnN0IG89ci5pbmRleE9mKGwpO28hPT0tMT9FW25dPWFbb106RVtuXT1wKGwpfX1yZXR1cm4gci5wb3AoKSxhLnBvcCgpLEV9ZnVuY3Rpb24gYyh0KXtpZih0eXBlb2YgdCE9Im9iamVjdCJ8fHQ9PT1udWxsKXJldHVybiB0O2lmKEFycmF5LmlzQXJyYXkodCkpcmV0dXJuIGkodCxjKTtpZih0LmNvbnN0cnVjdG9yIT09T2JqZWN0JiYocz1mLmdldCh0LmNvbnN0cnVjdG9yKSkpcmV0dXJuIHModCxjKTtjb25zdCBFPXt9O3IucHVzaCh0KSxhLnB1c2goRSk7Zm9yKGNvbnN0IG4gaW4gdCl7Y29uc3QgbD10W25dO2lmKHR5cGVvZiBsIT0ib2JqZWN0Inx8bD09PW51bGwpRVtuXT1sO2Vsc2UgaWYobC5jb25zdHJ1Y3RvciE9PU9iamVjdCYmKHM9Zi5nZXQobC5jb25zdHJ1Y3RvcikpKUVbbl09cyhsLGMpO2Vsc2UgaWYoQXJyYXlCdWZmZXIuaXNWaWV3KGwpKUVbbl09YihsKTtlbHNle2NvbnN0IG89ci5pbmRleE9mKGwpO28hPT0tMT9FW25dPWFbb106RVtuXT1jKGwpfX1yZXR1cm4gci5wb3AoKSxhLnBvcCgpLEV9fWNvbnN0IEo9aihRKTt2YXIgZWU9dGU7ZnVuY3Rpb24gdGUoZSxyKXt2YXIgYT17fTt0eXBlb2Ygcj09InN0cmluZyImJihyPVtdLnNsaWNlLmNhbGwoYXJndW1lbnRzLDEpKTtmb3IodmFyIGY9ci5sZW5ndGgscz0wO3M8ZjtzKyspe3ZhciBpPXJbc107aSBpbiBlJiYoYVtpXT1lW2ldKX1yZXR1cm4gYX1jb25zdCByZT1KKCk7ZnVuY3Rpb24gb2UoZSl7cmV0dXJuIHR5cGVvZiBzdHJ1Y3R1cmVkQ2xvbmU9PSJmdW5jdGlvbiI/c3RydWN0dXJlZENsb25lKGUpOnJlKGUpfWZ1bmN0aW9uIFgoZSxyKXtyZXR1cm4gZWUoZSxyKX1mdW5jdGlvbiBuZShlLHIpe2NvbnN0IGE9T2JqZWN0LmtleXMoZSksZj1PYmplY3Qua2V5cyhyKTtpZihhLmxlbmd0aCE9PWYubGVuZ3RoKXJldHVybiExO2ZvcihsZXQgcz0wO3M8YS5sZW5ndGg7cysrKXtjb25zdCBpPWFbc107aWYoaSE9PSJ2YWx1ZSImJiEoaT09PSJncm91cElkcyImJkFycmF5LmlzQXJyYXkoZVtpXSkmJkFycmF5LmlzQXJyYXkocltpXSkmJlkoZVtpXSxyW2ldKSkmJmVbaV0hPT1yW2ldKXJldHVybiExfXJldHVybiEwfWZ1bmN0aW9uIE4oZSxyPXt9KXtjb25zdHtleHRyYVBpY2tBdHRyczphfT1yLGY9Wy4uLlVdO2EmJmYucHVzaCguLi5hKTtjb25zdCBzPXt2YWx1ZTplLnZhbHVlPT09Uz9gCmA6ZS52YWx1ZX07cmV0dXJuIGYuZm9yRWFjaChpPT57Y29uc3QgcD1lW2ldO3AhPT12b2lkIDAmJihzW2ldPXApfSksc31mdW5jdGlvbiBnKGUscj17fSl7Y29uc3R7ZXh0cmFQaWNrQXR0cnM6YSxpc0NsYXNzaWZ5QXJlYTpmPSExLGlzQ2xvbmU6cz0hMH09cixpPXM/b2UoZSk6ZSxwPVtdO2xldCBjPTA7Zm9yKDtjPGkubGVuZ3RoOyl7bGV0IHQ9aVtjXTtpZihjPT09MCYmdC52YWx1ZT09PVMmJiF0Lmxpc3RJZCYmKCF0LnR5cGV8fHQudHlwZT09PWQuVEVYVCkpe2NvbnN0IG49aVtjKzFdO24mJk0uZm9yRWFjaChsPT57dFtsXSE9PXZvaWQgMCYmbltsXT09PXZvaWQgMCYmKG5bbF09dFtsXSl9KSxjKys7Y29udGludWV9aWYodC5hcmVhSWQpe2NvbnN0IG49dC5hcmVhSWQsbD10LmFyZWEsbz1bXTtmb3IoO2M8aS5sZW5ndGg7KXtjb25zdCB1PWlbY107aWYobiE9PXUuYXJlYUlkKXtjLS07YnJlYWt9ZGVsZXRlIHUuYXJlYSxkZWxldGUgdS5hcmVhSWQsby5wdXNoKHUpLGMrK31jb25zdCBBPWcobyxyKTtpZihmKXtjb25zdCB1PXt0eXBlOmQuQVJFQSx2YWx1ZToiIixhcmVhSWQ6bixhcmVhOmx9O3UudmFsdWVMaXN0PUEsdD11fWVsc2V7cC5zcGxpY2UoYywwLC4uLkEpO2NvbnRpbnVlfX1lbHNlIGlmKHQudGl0bGVJZCYmdC5sZXZlbCl7Y29uc3Qgbj10LnRpdGxlSWQ7aWYobil7Y29uc3QgbD10LmxldmVsLG89e3R5cGU6ZC5USVRMRSx0aXRsZTp0LnRpdGxlLHRpdGxlSWQ6bix2YWx1ZToiIixsZXZlbDpsfSxBPVtdO2Zvcig7YzxpLmxlbmd0aDspe2NvbnN0IHU9aVtjXTtpZihuIT09dS50aXRsZUlkKXtjLS07YnJlYWt9ZGVsZXRlIHUubGV2ZWwsZGVsZXRlIHUudGl0bGUsQS5wdXNoKHUpLGMrK31vLnZhbHVlTGlzdD1nKEEsciksdD1vfX1lbHNlIGlmKHQubGlzdElkJiZ0Lmxpc3RUeXBlKXtjb25zdCBuPXQubGlzdElkO2lmKG4pe2NvbnN0IGw9dC5saXN0VHlwZSxvPXQubGlzdFN0eWxlLEE9e3R5cGU6ZC5MSVNULHZhbHVlOiIiLGxpc3RJZDpuLGxpc3RUeXBlOmwsbGlzdFN0eWxlOm99LHU9W107Zm9yKDtjPGkubGVuZ3RoOyl7Y29uc3QgTz1pW2NdO2lmKG4hPT1PLmxpc3RJZCl7Yy0tO2JyZWFrfWRlbGV0ZSBPLmxpc3RUeXBlLGRlbGV0ZSBPLmxpc3RTdHlsZSx1LnB1c2goTyksYysrfUEudmFsdWVMaXN0PWcodSxyKSx0PUF9fWVsc2UgaWYodC50eXBlPT09ZC5UQUJMRSl7aWYodC5wYWdpbmdJZCl7bGV0IG49YysxLGw9MDtmb3IoO248aS5sZW5ndGg7KXtjb25zdCBvPWlbbl07aWYoby5wYWdpbmdJZD09PXQucGFnaW5nSWQpdC5oZWlnaHQrPW8uaGVpZ2h0LHQudHJMaXN0LnB1c2goLi4uby50ckxpc3QpLG4rKyxsKys7ZWxzZSBicmVha31jKz1sfWlmKHQudHJMaXN0KWZvcihsZXQgbj0wO248dC50ckxpc3QubGVuZ3RoO24rKyl7Y29uc3QgbD10LnRyTGlzdFtuXTtkZWxldGUgbC5pZDtmb3IobGV0IG89MDtvPGwudGRMaXN0Lmxlbmd0aDtvKyspe2NvbnN0IEE9bC50ZExpc3Rbb10sdT17Y29sc3BhbjpBLmNvbHNwYW4scm93c3BhbjpBLnJvd3NwYW4sdmFsdWU6ZyhBLnZhbHVlLHsuLi5yLGlzQ2xhc3NpZnlBcmVhOiExfSl9O0suZm9yRWFjaChPPT57Y29uc3QgaD1BW09dO2ghPT12b2lkIDAmJih1W09dPWgpfSksbC50ZExpc3Rbb109dX19fWVsc2UgaWYodC50eXBlPT09ZC5IWVBFUkxJTkspe2NvbnN0IG49dC5oeXBlcmxpbmtJZDtpZihuKXtjb25zdCBsPXt0eXBlOmQuSFlQRVJMSU5LLHZhbHVlOiIiLHVybDp0LnVybH0sbz1bXTtmb3IoO2M8aS5sZW5ndGg7KXtjb25zdCBBPWlbY107aWYobiE9PUEuaHlwZXJsaW5rSWQpe2MtLTticmVha31kZWxldGUgQS50eXBlLGRlbGV0ZSBBLnVybCxvLnB1c2goQSksYysrfWwudmFsdWVMaXN0PWcobyxyKSx0PWx9fWVsc2UgaWYodC50eXBlPT09ZC5EQVRFKXtjb25zdCBuPXQuZGF0ZUlkO2lmKG4pe2NvbnN0IGw9e3R5cGU6ZC5EQVRFLHZhbHVlOiIiLGRhdGVGb3JtYXQ6dC5kYXRlRm9ybWF0fSxvPVtdO2Zvcig7YzxpLmxlbmd0aDspe2NvbnN0IEE9aVtjXTtpZihuIT09QS5kYXRlSWQpe2MtLTticmVha31kZWxldGUgQS50eXBlLGRlbGV0ZSBBLmRhdGVGb3JtYXQsby5wdXNoKEEpLGMrK31sLnZhbHVlTGlzdD1nKG8sciksdD1sfX1lbHNlIGlmKHQuY29udHJvbElkKXtjb25zdCBuPXQuY29udHJvbElkO2lmKHQuY29udHJvbENvbXBvbmVudD09PUMuUFJFRklYKXtjb25zdCBsPVtdO2xldCBvPSExLEE9Yztmb3IoO0E8aS5sZW5ndGg7KXtjb25zdCB1PWlbQV07aWYobiE9PXUuY29udHJvbElkKWJyZWFrO3UuY29udHJvbENvbXBvbmVudD09PUMuVkFMVUUmJihkZWxldGUgdS5jb250cm9sLGRlbGV0ZSB1LmNvbnRyb2xJZCxsLnB1c2godSkpLHUuY29udHJvbENvbXBvbmVudD09PUMuUE9TVEZJWCYmKG89ITApLEErK31pZihvKXtjb25zdCB1PVgodCxXKSxPPXsuLi50LmNvbnRyb2wsLi4udX0saD17Li4uWCh0LE0pLHR5cGU6ZC5DT05UUk9MLHZhbHVlOiIiLGNvbnRyb2w6Tyxjb250cm9sSWQ6bn07aC5jb250cm9sLnZhbHVlPWcobCxyKSx0PU4oaCx7ZXh0cmFQaWNrQXR0cnM6YX0pLGMrPUEtYy0xfX1pZih0LmNvbnRyb2xDb21wb25lbnQmJihkZWxldGUgdC5jb250cm9sLGRlbGV0ZSB0LmNvbnRyb2xJZCx0LmNvbnRyb2xDb21wb25lbnQhPT1DLlZBTFVFJiZ0LmNvbnRyb2xDb21wb25lbnQhPT1DLlBSRV9URVhUJiZ0LmNvbnRyb2xDb21wb25lbnQhPT1DLlBPU1RfVEVYVCkpe2MrKztjb250aW51ZX19Y29uc3QgRT1OKHQse2V4dHJhUGlja0F0dHJzOmF9KTtpZighdC50eXBlfHx0LnR5cGU9PT1kLlRFWFR8fHQudHlwZT09PWQuU1VCU0NSSVBUfHx0LnR5cGU9PT1kLlNVUEVSU0NSSVBUKWZvcig7YzxpLmxlbmd0aDspe2NvbnN0IG49aVtjKzFdO2lmKGMrKyxuJiZuZShFLE4obix7ZXh0cmFQaWNrQXR0cnM6YX0pKSl7Y29uc3QgbD1uLnZhbHVlPT09Uz9gCmA6bi52YWx1ZTtFLnZhbHVlKz1sfWVsc2UgYnJlYWt9ZWxzZSBjKys7cC5wdXNoKEUpfXJldHVybiBwfWZ1bmN0aW9uIGFlKGUpe2xldCByPTA7Y29uc3QgYT1uZXcgTWFwO2ZvcihsZXQgZj0wO2Y8ZS5sZW5ndGg7ZisrKXtjb25zdCBzPWVbZl07aWYoZj09PTApe2lmKHMuY2hlY2tib3gpY29udGludWU7cy52YWx1ZT1zLnZhbHVlLnJlcGxhY2UoRywiIil9aWYocy5saXN0V3JhcCl7Y29uc3QgaT1hLmdldChyKXx8W107aS5wdXNoKHMpLGEuc2V0KHIsaSl9ZWxzZXtjb25zdCBpPXMudmFsdWUuc3BsaXQoYApgKTtmb3IobGV0IHA9MDtwPGkubGVuZ3RoO3ArKyl7cD4wJiYocis9MSk7Y29uc3QgYz1pW3BdLHQ9YS5nZXQocil8fFtdO3QucHVzaCh7Li4ucyx2YWx1ZTpjfSksYS5zZXQocix0KX19fXJldHVybiBhfWZ1bmN0aW9uIGxlKGUpe2Z1bmN0aW9uIHIoYSl7dmFyIGYscyxpLHAsYyx0LEU7bGV0IG49IiI7Zm9yKGxldCBsPTA7bDxhLmxlbmd0aDtsKyspe2NvbnN0IG89YVtsXTtpZihvLnR5cGU9PT1kLlRBQkxFKXtuKz1gCmA7Y29uc3QgQT1vLnRyTGlzdDtmb3IobGV0IHU9MDt1PEEubGVuZ3RoO3UrKyl7Y29uc3QgTz1BW3VdO2ZvcihsZXQgaD0wO2g8Ty50ZExpc3QubGVuZ3RoO2grKyl7Y29uc3QgRD1PLnRkTGlzdFtoXSxGPXIoZyhELnZhbHVlKSksY2U9aD09PTAsZmU9Ty50ZExpc3QubGVuZ3RoLTE9PT1oO24rPWAke2NlPyIiOiIgICJ9JHtGfSR7ZmU/YApgOiIifWB9fX1lbHNlIGlmKG8udHlwZT09PWQuVEFCKW4rPSIJIjtlbHNlIGlmKG8udHlwZT09PWQuSFlQRVJMSU5LKW4rPW8udmFsdWVMaXN0Lm1hcChBPT5BLnZhbHVlKS5qb2luKCIiKTtlbHNlIGlmKG8udHlwZT09PWQuVElUTEUpbis9YCR7cihnKG8udmFsdWVMaXN0KSl9YDtlbHNlIGlmKG8udHlwZT09PWQuTElTVCl7Y29uc3QgQT1nKG8udmFsdWVMaXN0KSx1PWFlKEEpO2xldCBPPSIiO28ubGlzdFR5cGU9PT12LlVMJiYoTz0kW28ubGlzdFN0eWxlXSksdS5mb3JFYWNoKChoLEQpPT57Y29uc3QgRj11LnNpemUtMT09PUQ7bis9YAoke098fGAke0QrMX0uYH0ke3IoaCl9JHtGP2AKYDoiIn1gfSl9ZWxzZSBpZihvLnR5cGU9PT1kLkNIRUNLQk9YKW4rPShmPW8uY2hlY2tib3gpIT1udWxsJiZmLnZhbHVlPyLimJEiOiLilqEiO2Vsc2UgaWYoby50eXBlPT09ZC5SQURJTyluKz0ocz1vLnJhZGlvKSE9bnVsbCYmcy52YWx1ZT8i4piJIjoi4peLIjtlbHNlIGlmKCFvLnR5cGV8fG8udHlwZT09PWQuTEFURVh8fFYuaW5jbHVkZXMoby50eXBlKSl7bGV0IEE9IiI7aWYoby50eXBlPT09ZC5DT05UUk9MKXtjb25zdCB1PSgocD0oaT1vLmNvbnRyb2wudmFsdWUpPT1udWxsP3ZvaWQgMDppWzBdKT09bnVsbD92b2lkIDA6cC52YWx1ZSl8fCIiO0E9dT9gJHsoKGM9by5jb250cm9sKT09bnVsbD92b2lkIDA6Yy5wcmVUZXh0KXx8IiJ9JHt1fSR7KCh0PW8uY29udHJvbCk9PW51bGw/dm9pZCAwOnQucG9zdFRleHQpfHwiIn1gOiIifWVsc2Ugby50eXBlPT09ZC5EQVRFP0E9KChFPW8udmFsdWVMaXN0KT09bnVsbD92b2lkIDA6RS5tYXAodT0+dS52YWx1ZSkuam9pbigiIikpfHwiIjpBPW8udmFsdWU7bis9QS5yZXBsYWNlKG5ldyBSZWdFeHAoYCR7U31gLCJnIiksYApgKX19cmV0dXJuIG59cmV0dXJuIHIoZyhlKSl9ZnVuY3Rpb24gbShlLHI9bmV3IFNldCxhPVtdKXtmb3IoY29uc3QgZiBvZiBlKXtpZihBcnJheS5pc0FycmF5KGY9PW51bGw/dm9pZCAwOmYuZ3JvdXBJZHMpKWZvcihjb25zdCBzIG9mIGYuZ3JvdXBJZHMpcyYmIXIuaGFzKHMpJiYoci5hZGQocyksYS5wdXNoKHMpKTtpZigoZj09bnVsbD92b2lkIDA6Zi50eXBlKT09PWQuVEFCTEUpe2Zvcihjb25zdCBzIG9mIGYudHJMaXN0fHxbXSlmb3IoY29uc3QgaSBvZiBzLnRkTGlzdHx8W10pbShpLnZhbHVlfHxbXSxyLGEpO2NvbnRpbnVlfUFycmF5LmlzQXJyYXkoZj09bnVsbD92b2lkIDA6Zi52YWx1ZUxpc3QpJiZtKGYudmFsdWVMaXN0LHIsYSl9cmV0dXJuIGF9ZnVuY3Rpb24gc2UoZSl7cmV0dXJuIGxlKGUpLnJlcGxhY2UoL1x1MjAwQi9nLCIiKS5yZXBsYWNlKC9ccy9nLCIiKS5sZW5ndGh9ZnVuY3Rpb24gaWUoZSl7dmFyIGY7Y29uc3Qgcj1lLm9yaWdpbkRhdGEsYT0oZj1lLnZhbHVlT3B0aW9ucyk9PW51bGw/dm9pZCAwOmYuZXh0cmFQaWNrQXR0cnM7cmV0dXJue2RhdGFWZXJzaW9uOmUuZGF0YVZlcnNpb24sc2NoZW1hVmVyc2lvbjplLnNjaGVtYVZlcnNpb258fCIiLGRhdGE6e2hlYWRlcjpnKHIuaGVhZGVyLHtleHRyYVBpY2tBdHRyczphfSksbWFpbjpnKHIubWFpbix7ZXh0cmFQaWNrQXR0cnM6YSxpc0NsYXNzaWZ5QXJlYTohMH0pLGZvb3RlcjpnKHIuZm9vdGVyLHtleHRyYVBpY2tBdHRyczphfSl9LG9wdGlvbnM6ZS5lZGl0b3JPcHRpb25zfHx7fX19Y29uc3QgUD1zZWxmO1Aub25tZXNzYWdlPWU9Pntjb25zdHtpZDpyLHR5cGU6YSxwYXlsb2FkOmZ9PWUuZGF0YTt0cnl7bGV0IHM7c3dpdGNoKGEpe2Nhc2UiZ2V0VmFsdWUiOnM9aWUoZik7YnJlYWs7Y2FzZSJnZXRXb3JkQ291bnQiOnM9c2UoZi5tYWluRWxlbWVudExpc3R8fFtdKTticmVhaztjYXNlImdldEdyb3VwSWRzIjpzPW0oZi5tYWluRWxlbWVudExpc3R8fFtdKTticmVhaztkZWZhdWx0OnRocm93IG5ldyBFcnJvcihgVW5zdXBwb3J0ZWQgd29ya2VyIHRhc2s6ICR7YX1gKX1jb25zdCBpPXtpZDpyLHN1Y2Nlc3M6ITAsZGF0YTpzfTtQLnBvc3RNZXNzYWdlKGkpfWNhdGNoKHMpe2NvbnN0IGk9e2lkOnIsc3VjY2VzczohMSxlcnJvcjpzIGluc3RhbmNlb2YgRXJyb3I/cy5tZXNzYWdlOiJXb3JrZXIgZXhlY3V0aW9uIGZhaWxlZCJ9O1AucG9zdE1lc3NhZ2UoaSl9fX0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPXJ1bnRpbWUud29ya2VyLUJVR2ZIbmVsLmpzLm1hcAo=",hf=r=>Uint8Array.from(atob(r),e=>e.charCodeAt(0)),va=typeof self<"u"&&self.Blob&&new Blob([hf(ba)],{type:"text/javascript;charset=utf-8"});function ff(r){let e;try{if(e=va&&(self.URL||self.webkitURL).createObjectURL(va),!e)throw"";const t=new Worker(e,{name:r==null?void 0:r.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+ba,{name:r==null?void 0:r.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}function pn(r,e=new Set,t=[]){for(const n of r){if(Array.isArray(n==null?void 0:n.groupIds))for(const i of n.groupIds)i&&!e.has(i)&&(e.add(i),t.push(i));if((n==null?void 0:n.type)===ce.ElementType.TABLE){for(const i of n.trList||[])for(const s of i.tdList||[])pn(s.value||[],e,t);continue}Array.isArray(n==null?void 0:n.valueList)&&pn(n.valueList,e,t)}return t}class _a{constructor(e){Se(this,"draw");Se(this,"worker",null);Se(this,"pendingTaskMap",new Map);Se(this,"warnedFallbackSet",new Set);Se(this,"requestSeed",0);Se(this,"_handleMessage",e=>{const{id:t,success:n,data:i,error:s}=e.data,o=this.pendingTaskMap.get(t);o&&(this.pendingTaskMap.delete(t),n?o.resolve(i):o.reject(new Error(s||"Worker task failed")))});Se(this,"_handleError",()=>{this._warnFallback("worker-runtime-error","Worker 运行时异常,后续任务将降级为主线程执行。"),this.terminate()});this.draw=e,this._initWorker()}getValue(e){return this._runTask("getValue",{dataVersion:ce.DOCX_EDITOR_DATA_VERSION,schemaVersion:ce.DOCX_EDITOR_SCHEMA_VERSION,editorOptions:this.draw.getOptions(),valueOptions:e,originData:this.draw.getOriginValue(e)},()=>Promise.resolve(this.draw.getValue(e)))}getGroupIds(){return this._runTask("getGroupIds",{dataVersion:ce.DOCX_EDITOR_DATA_VERSION,schemaVersion:ce.DOCX_EDITOR_SCHEMA_VERSION,mainElementList:this.draw.getOriginalMainElementList()},()=>Promise.resolve(pn(this.draw.getOriginalMainElementList())))}getWordCount(){return this._runTask("getWordCount",{dataVersion:ce.DOCX_EDITOR_DATA_VERSION,schemaVersion:ce.DOCX_EDITOR_SCHEMA_VERSION,mainElementList:this.draw.getOriginalMainElementList()},()=>{const e=ce.getTextFromElementList(this.draw.getOriginalMainElementList()).replace(/\u200B/g,"");return Promise.resolve(e.replace(/\s/g,"").length)})}terminate(){var e;(e=this.worker)==null||e.terminate(),this.worker=null,this._rejectPendingTasks(new Error("Worker terminated"))}_initWorker(){if(typeof Worker>"u"){this._warnFallback("worker-unavailable","当前环境不支持 Worker,已降级为主线程执行。");return}try{this.worker=new ff,this.worker.onmessage=this._handleMessage,this.worker.onerror=this._handleError}catch(e){this.worker=null,this._warnFallback("worker-init-failed","Worker 初始化失败,已降级为主线程执行。",e)}}_runTask(e,t,n){if(!this.worker)return this._warnFallback(`fallback-${e}`,`${e} 未使用 Worker,已降级为主线程执行。`),n();const i=`${Date.now()}-${this.requestSeed++}`,s={id:i,type:e,payload:t};return new Promise((o,a)=>{this.pendingTaskMap.set(i,{resolve:o,reject:a});try{this.worker.postMessage(s)}catch(l){this.pendingTaskMap.delete(i),a(l)}}).catch(o=>(this._warnFallback(`fallback-${e}`,`${e} 的 Worker 执行失败,已降级为主线程执行。`,o),n()))}_rejectPendingTasks(e){for(const[,t]of this.pendingTaskMap)t.reject(e);this.pendingTaskMap.clear()}_warnFallback(e,t,n){this.warnedFallbackSet.has(e)||(this.warnedFallbackSet.add(e),n?console.warn(`[WorkerManager] ${t}`,n):console.warn(`[WorkerManager] ${t}`))}}class Ta{constructor(){Se(this,"workerManager",null)}install(e){return this.workerManager=new _a(e),typeof e.setWorkerManager=="function"&&e.setWorkerManager(this.workerManager),this}getWorkerManager(){return this.workerManager}}function df(r){const e=atob(r.replace(/^data:[^;]+;base64,/,"")),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}function Ea(r){return r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function pf(r){if(!r.trList||!Array.isArray(r.trList))return"";const e=Number.isFinite(Number(r.borderWidth))?Number(r.borderWidth):1,t=typeof r.borderColor=="string"&&r.borderColor?r.borderColor:"#000000",n=r.borderType==="dash"?"dashed":"solid",i=r.borderType==="empty",s=r.borderType==="external",o=i?"border: none;":s?`border: ${e}px ${n} ${t};`:"border: none;",a=i||s?"border: none;":`border: ${e}px ${n} ${t};`;let l=`<table style="border-collapse: collapse; width: 100%; ${o}">`;for(const h of r.trList){if(l+="<tr>",h.tdList&&Array.isArray(h.tdList))for(const f of h.tdList){const m=f.colspan?` colspan="${f.colspan}"`:"",v=f.rowspan?` rowspan="${f.rowspan}"`:"";if(l+=`<td${m}${v} style="${a} padding: 4px 8px;">`,f.value&&Array.isArray(f.value))for(const y of f.value)y.value&&(l+=Ea(y.value));l+="</td>"}l+="</tr>"}return l+="</table>",l}class Sa{constructor(){Se(this,"_command",null)}install(e,t){this._command=t;const n=e.__structureAdapter;return n&&(n.exportDocx=this.exportDocx.bind(this),n.previewHtml=this.previewHtml.bind(this)),this}async exportDocx(e){var n,i;const t=e==null?void 0:e.callback;try{const s=this._command.getValue(),{Document:o,Packer:a,Paragraph:l,TextRun:h,ImageRun:f,Table:m,TableRow:v,TableCell:y,WidthType:b,BorderStyle:g}=await Promise.resolve().then(()=>J0),_=[],d=s.data.main||[];let T=[];for(const E of d){const P=E!=null&&E.extension&&typeof E.extension=="object"?E.extension.bookmarkMarker:null;if(!(P!=null&&P.name)){if(E.value===`
|
|
3
|
-
`||E.type==="pageBreak")T.length>0&&(_.push(new l({children:T})),T=[]),E.type==="pageBreak"&&_.push(new l({pageBreakBefore:!0}));else if(E.type==="image"&&E.value){T.length>0&&(_.push(new l({children:T})),T=[]);try{const
|
|
4
|
-
`)s+="<br>";else if(o.type==="pageBreak")s+='<div style="page-break-after: always;"></div>';else if(o.type==="image"&&o.value)s+=`<img src="${o.value}" style="max-width: 100%; height: auto;" />`;else if(o.type==="table")s+=
|
|
2
|
+
(function(ue,ce){typeof exports=="object"&&typeof module<"u"?ce(exports,require("@vervedoc/docx-editor-schema"),require("@vervedoc/docx-editor-view"),require("@vervedoc/docx-editor-transform"),require("@vervedoc/docx-editor-state"),require("@vervedoc/docx-editor-history"),require("@vervedoc/docx-editor-keymap"),require("@vervedoc/docx-editor-commands"),require("@vervedoc/docx-editor-comment"),require("jszip")):typeof define=="function"&&define.amd?define(["exports","@vervedoc/docx-editor-schema","@vervedoc/docx-editor-view","@vervedoc/docx-editor-transform","@vervedoc/docx-editor-state","@vervedoc/docx-editor-history","@vervedoc/docx-editor-keymap","@vervedoc/docx-editor-commands","@vervedoc/docx-editor-comment","jszip"],ce):(ue=typeof globalThis<"u"?globalThis:ue||self,ce(ue.VerveDocCore={},ue.DocxEditorSchema,ue.DocxEditorView,ue.DocxEditorTransform,ue.DocxEditorState,ue.DocxEditorHistory,ue.DocxEditorKeymap,ue.DocxEditorCommands,ue.DocxEditorComment,ue.JSZip))})(this,(function(ue,ce,be,Je,Zt,dn,pn,Ie,Sr,df){"use strict";var r0=Object.defineProperty;var n0=(ue,ce,be)=>ce in ue?r0(ue,ce,{enumerable:!0,configurable:!0,writable:!0,value:be}):ue[ce]=be;var Ee=(ue,ce,be)=>n0(ue,typeof ce!="symbol"?ce+"":ce,be);const _a='(function(){"use strict";var B=(e=>(e.CONTAIN="contain",e.COVER="cover",e))(B||{}),_=(e=>(e.REPEAT="repeat",e.NO_REPEAT="no-repeat",e.REPEAT_X="repeat-x",e.REPEAT_Y="repeat-y",e))(_||{}),b=(e=>(e.HALF="half",e.ONE_THIRD="one-third",e.QUARTER="quarter",e))(b||{}),R=(e=>(e.ARABIC="arabic",e.CHINESE="chinese",e))(R||{}),C=(e=>(e.PREFIX="prefix",e.POSTFIX="postfix",e.PRE_TEXT="preText",e.POST_TEXT="postText",e.PLACEHOLDER="placeholder",e.VALUE="value",e.CHECKBOX="checkbox",e.RADIO="radio",e))(C||{}),A=(e=>(e.TEXT="text",e.IMAGE="image",e.TABLE="table",e.HYPERLINK="hyperlink",e.SUPERSCRIPT="superscript",e.SUBSCRIPT="subscript",e.SEPARATOR="separator",e.PAGE_BREAK="pageBreak",e.CONTROL="control",e.AREA="area",e.CHECKBOX="checkbox",e.RADIO="radio",e.LATEX="latex",e.TAB="tab",e.DATE="date",e.BLOCK="block",e.TITLE="title",e.LIST="list",e.PLACEHOLDER="placeholder",e.FOOTNOTE_MARK="footnoteMark",e.FOOTNOTE_CONTENT="footnoteContent",e.FOOTNOTE_SEPARATOR="footnoteSeparator",e.COLUMN_BREAK="columnBreak",e.REVISION_INSERT="revisionInsert",e.REVISION_DELETE="revisionDelete",e.SHAPE="shape",e))(A||{}),k=(e=>(e.PAGE="page",e.CONTINUITY="continuity",e))(k||{}),H=(e=>(e.UL="ul",e.OL="ol",e))(H||{}),I=(e=>(e.DISC="disc",e.CIRCLE="circle",e.SQUARE="square",e.CHECKBOX="checkbox",e.DIAMOND="diamond",e.DASH="dash",e.CHECK="check",e.TRIANGLE="triangle",e.STAR="star",e.ARROW="arrow",e.DIAMOND_SOLID="diamond-solid",e.ANGLE="angle",e.HOLLOW_CIRCLE="hollow-circle",e.HOLLOW_SQUARE="hollow-square",e.HEART_HOLLOW="heart-hollow",e.HASH="hash",e.TRIANGLE_SOLID="triangle-solid",e.STAR_SOLID="star-solid",e.HEART_SOLID="heart-solid",e.FLOWER="flower",e.ASTERISK="asterisk",e.HOLLOW_DIAMOND="hollow-diamond",e.HOLLOW_TRIANGLE="hollow-triangle",e))(I||{}),L=(e=>(e.DISC="disc",e.CIRCLE="circle",e.SQUARE="square",e.CHECKBOX="checkbox",e.DIAMOND="diamond",e.DASH="dash",e.CHECK="check",e.DECIMAL="decimal",e.DECIMAL_DOT="decimal-dot",e.DECIMAL_PAREN="decimal-paren",e.DECIMAL_CIRCLE="decimal-circle",e.DECIMAL_BRACKET="decimal-bracket",e.CHINESE="chinese",e.CHINESE_BRACKET="chinese-bracket",e.UPPER_ALPHA="upper-alpha",e.LOWER_ALPHA_DOT="lower-alpha-dot",e))(L||{}),w=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e.ALIGNMENT="alignment",e.JUSTIFY="justify",e))(w||{}),h=(e=>(e.FIRST="first",e.SECOND="second",e.THIRD="third",e.FOURTH="fourth",e.FIFTH="fifth",e.SIXTH="sixth",e))(h||{}),N=(e=>(e.TOP="top",e.MIDDLE="middle",e.BOTTOM="bottom",e))(N||{}),x=(e=>(e.TEXT="text",e.IMAGE="image",e))(x||{});const v="";b.HALF+"",1/2,b.ONE_THIRD+"",1/3,b.QUARTER+"",1/4;const M=["rowFlex","rowMargin","paragraphColor","paragraphIndentLeft","paragraphFirstLineIndent","paragraphSpacingBefore","paragraphSpacingAfter"],G=["type","font","size","characterScale","bold","color","italic","highlight","paragraphColor","underline","strikeout","rowFlex","rowMargin","dashArray","separatorType","separatorLineWidth","trList","tableToolDisabled","borderType","borderColor","borderWidth","borderExternalWidth","width","height","url","colgroup","valueList","control","checkbox","radio","dateFormat","block","level","title","listType","listStyle","listWrap","groupIds","conceptId","imgDisplay","imgFloatPosition","imgToolDisabled","textDecoration","extension","externalId","areaId","area","paragraphIndentLeft","paragraphFirstLineIndent","paragraphSpacingBefore","paragraphSpacingAfter","revisionId","revisionType","revisionAuthor","revisionDate"],V=["conceptId","extension","externalId","verticalAlign","backgroundColor","borderTypes","borderStyle","slashTypes","disabled","deletable"],$=["font","size","bold","highlight","italic","strikeout"],z=[A.TEXT,A.HYPERLINK,A.SUBSCRIPT,A.SUPERSCRIPT,A.CONTROL,A.DATE,A.PLACEHOLDER];A.IMAGE,A.LATEX,A.BLOCK,A.PAGE_BREAK,A.SEPARATOR,A.TABLE,A.SHAPE,A.TITLE,A.LIST,w.CENTER,R.ARABIC,R.ARABIC,R.ARABIC,R.ARABIC,R.ARABIC,R.ARABIC,R.ARABIC,R.ARABIC,R.CHINESE,R.CHINESE;const Y=new RegExp(`^[${v}\n]`);x.TEXT,R.ARABIC,h.FIRST+"",h.SECOND+"",h.THIRD+"",h.FOURTH+"",h.FIFTH+"",h.SIXTH+"",h.FIRST+"",h.SECOND+"",h.THIRD+"",h.FOURTH+"",h.FIFTH+"",h.SIXTH+"",h.FIRST,h.SECOND,h.THIRD,h.FOURTH,h.FIFTH,h.SIXTH;const Q={[I.DISC]:"•",[I.CIRCLE]:"◦",[I.SQUARE]:"▫︎",[I.CHECKBOX]:"☑️",[I.DIAMOND]:"◆",[I.DASH]:"—",[I.CHECK]:"✓",[I.TRIANGLE]:"▶",[I.STAR]:"★",[I.ARROW]:"▸",[I.DIAMOND_SOLID]:"♦",[I.ANGLE]:">",[I.HOLLOW_CIRCLE]:"○",[I.HOLLOW_SQUARE]:"□",[I.HEART_HOLLOW]:"♡",[I.HASH]:"#",[I.TRIANGLE_SOLID]:"▲",[I.STAR_SOLID]:"☆",[I.HEART_SOLID]:"♥",[I.FLOWER]:"✿",[I.ASTERISK]:"*",[I.HOLLOW_DIAMOND]:"◇",[I.HOLLOW_TRIANGLE]:"▷"};H.OL+"",H.UL+"",L.DISC+"",L.CIRCLE+"",L.SQUARE+"",L.DECIMAL+"",L.DECIMAL_DOT+"",L.DECIMAL_PAREN+"",L.DECIMAL_CIRCLE+"",L.DECIMAL_BRACKET+"",L.CHINESE+"",L.CHINESE_BRACKET+"",L.UPPER_ALPHA+"",L.LOWER_ALPHA_DOT+"",L.CHECKBOX+"",L.DIAMOND+"",L.DASH+"",L.CHECK+"",B.COVER,_.NO_REPEAT,N.BOTTOM,b.HALF,b.HALF,N.BOTTOM,k.CONTINUITY;function j(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var X,U;function q(){return U||(U=1,X=function e(s,u){if(s===u)return!0;if(s&&u&&typeof s=="object"&&typeof u=="object"){if(s.constructor!==u.constructor)return!1;var c,i,o;if(Array.isArray(s)){if(c=s.length,c!=u.length)return!1;for(i=c;i--!==0;)if(!e(s[i],u[i]))return!1;return!0}if(s.constructor===RegExp)return s.source===u.source&&s.flags===u.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===u.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===u.toString();if(o=Object.keys(s),c=o.length,c!==Object.keys(u).length)return!1;for(i=c;i--!==0;)if(!Object.prototype.hasOwnProperty.call(u,o[i]))return!1;for(i=c;i--!==0;){var T=o[i];if(!e(s[T],u[T]))return!1}return!0}return s!==s&&u!==u}),X}var J=q();const Z=j(J);var m,K;function ee(){if(K)return m;K=1,m=s;function e(c){return c instanceof Buffer?Buffer.from(c):new c.constructor(c.buffer.slice(),c.byteOffset,c.length)}function s(c){if(c=c||{},c.circles)return u(c);const i=new Map;if(i.set(Date,E=>new Date(E)),i.set(Map,(E,a)=>new Map(T(Array.from(E),a))),i.set(Set,(E,a)=>new Set(T(Array.from(E),a))),c.constructorHandlers)for(const E of c.constructorHandlers)i.set(E[0],E[1]);let o=null;return c.proto?l:p;function T(E,a){const r=Object.keys(E),t=new Array(r.length);for(let f=0;f<r.length;f++){const n=r[f],d=E[n];typeof d!="object"||d===null?t[n]=d:d.constructor!==Object&&(o=i.get(d.constructor))?t[n]=o(d,a):ArrayBuffer.isView(d)?t[n]=e(d):t[n]=a(d)}return t}function p(E){if(typeof E!="object"||E===null)return E;if(Array.isArray(E))return T(E,p);if(E.constructor!==Object&&(o=i.get(E.constructor)))return o(E,p);const a={};for(const r in E){if(Object.hasOwnProperty.call(E,r)===!1)continue;const t=E[r];typeof t!="object"||t===null?a[r]=t:t.constructor!==Object&&(o=i.get(t.constructor))?a[r]=o(t,p):ArrayBuffer.isView(t)?a[r]=e(t):a[r]=p(t)}return a}function l(E){if(typeof E!="object"||E===null)return E;if(Array.isArray(E))return T(E,l);if(E.constructor!==Object&&(o=i.get(E.constructor)))return o(E,l);const a={};for(const r in E){const t=E[r];typeof t!="object"||t===null?a[r]=t:t.constructor!==Object&&(o=i.get(t.constructor))?a[r]=o(t,l):ArrayBuffer.isView(t)?a[r]=e(t):a[r]=l(t)}return a}}function u(c){const i=[],o=[],T=new Map;if(T.set(Date,r=>new Date(r)),T.set(Map,(r,t)=>new Map(l(Array.from(r),t))),T.set(Set,(r,t)=>new Set(l(Array.from(r),t))),c.constructorHandlers)for(const r of c.constructorHandlers)T.set(r[0],r[1]);let p=null;return c.proto?a:E;function l(r,t){const f=Object.keys(r),n=new Array(f.length);for(let d=0;d<f.length;d++){const O=f[d],g=r[O];if(typeof g!="object"||g===null)n[O]=g;else if(g.constructor!==Object&&(p=T.get(g.constructor)))n[O]=p(g,t);else if(ArrayBuffer.isView(g))n[O]=e(g);else{const S=i.indexOf(g);S!==-1?n[O]=o[S]:n[O]=t(g)}}return n}function E(r){if(typeof r!="object"||r===null)return r;if(Array.isArray(r))return l(r,E);if(r.constructor!==Object&&(p=T.get(r.constructor)))return p(r,E);const t={};i.push(r),o.push(t);for(const f in r){if(Object.hasOwnProperty.call(r,f)===!1)continue;const n=r[f];if(typeof n!="object"||n===null)t[f]=n;else if(n.constructor!==Object&&(p=T.get(n.constructor)))t[f]=p(n,E);else if(ArrayBuffer.isView(n))t[f]=e(n);else{const d=i.indexOf(n);d!==-1?t[f]=o[d]:t[f]=E(n)}}return i.pop(),o.pop(),t}function a(r){if(typeof r!="object"||r===null)return r;if(Array.isArray(r))return l(r,a);if(r.constructor!==Object&&(p=T.get(r.constructor)))return p(r,a);const t={};i.push(r),o.push(t);for(const f in r){const n=r[f];if(typeof n!="object"||n===null)t[f]=n;else if(n.constructor!==Object&&(p=T.get(n.constructor)))t[f]=p(n,a);else if(ArrayBuffer.isView(n))t[f]=e(n);else{const d=i.indexOf(n);d!==-1?t[f]=o[d]:t[f]=a(n)}}return i.pop(),o.pop(),t}}return m}var te=ee();const re=j(te);var oe=ne;function ne(e,s){var u={};typeof s=="string"&&(s=[].slice.call(arguments,1));for(var c=s.length,i=0;i<c;i++){var o=s[i];o in e&&(u[o]=e[o])}return u}const le=re();function ae(e){return typeof structuredClone=="function"?structuredClone(e):le(e)}function W(e,s){return oe(e,s)}function se(e,s){const u=Object.keys(e),c=Object.keys(s);if(u.length!==c.length)return!1;for(let i=0;i<u.length;i++){const o=u[i];if(o!=="value"&&!(o==="groupIds"&&Array.isArray(e[o])&&Array.isArray(s[o])&&Z(e[o],s[o]))&&e[o]!==s[o])return!1}return!0}function D(e,s={}){const{extraPickAttrs:u}=s,c=[...G];u&&c.push(...u);const i={value:e.value===v?`\n`:e.value};return c.forEach(o=>{const T=e[o];T!==void 0&&(i[o]=T)}),i}function y(e,s={}){const{extraPickAttrs:u,isClassifyArea:c=!1,isClone:i=!0}=s,o=i?ae(e):e,T=[];let p=0;for(;p<o.length;){let l=o[p];if(p===0&&l.value===v&&!l.listId&&(!l.type||l.type===A.TEXT)){const a=o[p+1];a&&M.forEach(r=>{l[r]!==void 0&&a[r]===void 0&&(a[r]=l[r])}),p++;continue}if(l.areaId){const a=l.areaId,r=l.area,t=[];for(;p<o.length;){const n=o[p];if(a!==n.areaId){p--;break}delete n.area,delete n.areaId,t.push(n),p++}const f=y(t,s);if(c){const n={type:A.AREA,value:"",areaId:a,area:r};n.valueList=f,l=n}else{T.splice(p,0,...f);continue}}else if(l.titleId&&l.level){const a=l.titleId;if(a){const r=l.level,t={type:A.TITLE,title:l.title,titleId:a,value:"",level:r},f=[];for(;p<o.length;){const n=o[p];if(a!==n.titleId){p--;break}delete n.level,delete n.title,f.push(n),p++}t.valueList=y(f,s),l=t}}else if(l.listId&&l.listType){const a=l.listId;if(a){const r=l.listType,t=l.listStyle,f={type:A.LIST,value:"",listId:a,listType:r,listStyle:t},n=[];for(;p<o.length;){const d=o[p];if(a!==d.listId){p--;break}delete d.listType,delete d.listStyle,n.push(d),p++}f.valueList=y(n,s),l=f}}else if(l.type===A.TABLE){if(l.pagingId){let a=p+1,r=0;for(;a<o.length;){const t=o[a];if(t.pagingId===l.pagingId)l.height+=t.height,l.trList.push(...t.trList),a++,r++;else break}p+=r}if(l.trList)for(let a=0;a<l.trList.length;a++){const r=l.trList[a];delete r.id;for(let t=0;t<r.tdList.length;t++){const f=r.tdList[t],n={colspan:f.colspan,rowspan:f.rowspan,value:y(f.value,{...s,isClassifyArea:!1})};V.forEach(d=>{const O=f[d];O!==void 0&&(n[d]=O)}),r.tdList[t]=n}}}else if(l.type===A.HYPERLINK){const a=l.hyperlinkId;if(a){const r={type:A.HYPERLINK,value:"",url:l.url},t=[];for(;p<o.length;){const f=o[p];if(a!==f.hyperlinkId){p--;break}delete f.type,delete f.url,t.push(f),p++}r.valueList=y(t,s),l=r}}else if(l.type===A.DATE){const a=l.dateId;if(a){const r={type:A.DATE,value:"",dateFormat:l.dateFormat},t=[];for(;p<o.length;){const f=o[p];if(a!==f.dateId){p--;break}delete f.type,delete f.dateFormat,t.push(f),p++}r.valueList=y(t,s),l=r}}else if(l.controlId){const a=l.controlId;if(l.controlComponent===C.PREFIX){const r=[];let t=!1,f=p;for(;f<o.length;){const n=o[f];if(a!==n.controlId)break;n.controlComponent===C.VALUE&&(delete n.control,delete n.controlId,r.push(n)),n.controlComponent===C.POSTFIX&&(t=!0),f++}if(t){const n=W(l,$),d={...l.control,...n},O={...W(l,M),type:A.CONTROL,value:"",control:d,controlId:a};O.control.value=y(r,s),l=D(O,{extraPickAttrs:u}),p+=f-p-1}}if(l.controlComponent&&(delete l.control,delete l.controlId,l.controlComponent!==C.VALUE&&l.controlComponent!==C.PRE_TEXT&&l.controlComponent!==C.POST_TEXT)){p++;continue}}const E=D(l,{extraPickAttrs:u});if(!l.type||l.type===A.TEXT||l.type===A.SUBSCRIPT||l.type===A.SUPERSCRIPT)for(;p<o.length;){const a=o[p+1];if(p++,a&&se(E,D(a,{extraPickAttrs:u}))){const r=a.value===v?`\n`:a.value;E.value+=r}else break}else p++;T.push(E)}return T}function ie(e){let s=0;const u=new Map;for(let c=0;c<e.length;c++){const i=e[c];if(c===0){if(i.checkbox)continue;i.value=i.value.replace(Y,"")}if(i.listWrap){const o=u.get(s)||[];o.push(i),u.set(s,o)}else{const o=i.value.split(`\n`);for(let T=0;T<o.length;T++){T>0&&(s+=1);const p=o[T],l=u.get(s)||[];l.push({...i,value:p}),u.set(s,l)}}}return u}function ce(e){function s(u){var c,i,o,T,p,l,E;let a="";for(let r=0;r<u.length;r++){const t=u[r];if(t.type===A.TABLE){a+=`\n`;const f=t.trList;for(let n=0;n<f.length;n++){const d=f[n];for(let O=0;O<d.tdList.length;O++){const g=d.tdList[O],S=s(y(g.value)),ue=O===0,Ee=d.tdList.length-1===O;a+=`${ue?"":" "}${S}${Ee?`\n`:""}`}}}else if(t.type===A.TAB)a+=" ";else if(t.type===A.HYPERLINK)a+=t.valueList.map(f=>f.value).join("");else if(t.type===A.TITLE)a+=`${s(y(t.valueList))}`;else if(t.type===A.LIST){const f=y(t.valueList),n=ie(f);let d="";t.listType===H.UL&&(d=Q[t.listStyle]),n.forEach((O,g)=>{const S=n.size-1===g;a+=`\n${d||`${g+1}.`}${s(O)}${S?`\n`:""}`})}else if(t.type===A.CHECKBOX)a+=(c=t.checkbox)!=null&&c.value?"☑":"□";else if(t.type===A.RADIO)a+=(i=t.radio)!=null&&i.value?"☉":"○";else if(!t.type||t.type===A.LATEX||z.includes(t.type)){let f="";if(t.type===A.CONTROL){const n=((T=(o=t.control.value)==null?void 0:o[0])==null?void 0:T.value)||"";f=n?`${((p=t.control)==null?void 0:p.preText)||""}${n}${((l=t.control)==null?void 0:l.postText)||""}`:""}else t.type===A.DATE?f=((E=t.valueList)==null?void 0:E.map(n=>n.value).join(""))||"":f=t.value;a+=f.replace(new RegExp(`${v}`,"g"),`\n`)}}return a}return s(y(e))}function P(e,s=new Set,u=[]){for(const c of e){if(Array.isArray(c==null?void 0:c.groupIds))for(const i of c.groupIds)i&&!s.has(i)&&(s.add(i),u.push(i));if((c==null?void 0:c.type)===A.TABLE){for(const i of c.trList||[])for(const o of i.tdList||[])P(o.value||[],s,u);continue}Array.isArray(c==null?void 0:c.valueList)&&P(c.valueList,s,u)}return u}function fe(e){return ce(e).replace(/\\u200B/g,"").replace(/\\s/g,"").length}function pe(e){var c;const s=e.originData,u=(c=e.valueOptions)==null?void 0:c.extraPickAttrs;return{dataVersion:e.dataVersion,schemaVersion:e.schemaVersion||"",data:{header:y(s.header,{extraPickAttrs:u}),main:y(s.main,{extraPickAttrs:u,isClassifyArea:!0}),footer:y(s.footer,{extraPickAttrs:u})},options:e.editorOptions||{}}}const F=self;F.onmessage=e=>{const{id:s,type:u,payload:c}=e.data;try{let i;switch(u){case"getValue":i=pe(c);break;case"getWordCount":i=fe(c.mainElementList||[]);break;case"getGroupIds":i=P(c.mainElementList||[]);break;default:throw new Error(`Unsupported worker task: ${u}`)}const o={id:s,success:!0,data:i};F.postMessage(o)}catch(i){const o={id:s,success:!1,error:i instanceof Error?i.message:"Worker execution failed"};F.postMessage(o)}}})();\n//# sourceMappingURL=runtime.worker-glNChxsd.js.map\n',Ta=typeof self<"u"&&self.Blob&&new Blob([_a],{type:"text/javascript;charset=utf-8"});function pf(r){let e;try{if(e=Ta&&(self.URL||self.webkitURL).createObjectURL(Ta),!e)throw"";const t=new Worker(e,{name:r==null?void 0:r.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(_a),{name:r==null?void 0:r.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}function mn(r,e=new Set,t=[]){for(const n of r){if(Array.isArray(n==null?void 0:n.groupIds))for(const i of n.groupIds)i&&!e.has(i)&&(e.add(i),t.push(i));if((n==null?void 0:n.type)===ce.ElementType.TABLE){for(const i of n.trList||[])for(const s of i.tdList||[])mn(s.value||[],e,t);continue}Array.isArray(n==null?void 0:n.valueList)&&mn(n.valueList,e,t)}return t}class Ea{constructor(e){Ee(this,"draw");Ee(this,"worker",null);Ee(this,"pendingTaskMap",new Map);Ee(this,"warnedFallbackSet",new Set);Ee(this,"requestSeed",0);Ee(this,"_handleMessage",e=>{const{id:t,success:n,data:i,error:s}=e.data,o=this.pendingTaskMap.get(t);o&&(this.pendingTaskMap.delete(t),n?o.resolve(i):o.reject(new Error(s||"Worker task failed")))});Ee(this,"_handleError",()=>{this._warnFallback("worker-runtime-error","Worker 运行时异常,后续任务将降级为主线程执行。"),this.terminate()});this.draw=e,this._initWorker()}getValue(e){return this._runTask("getValue",{dataVersion:ce.DOCX_EDITOR_DATA_VERSION,schemaVersion:ce.DOCX_EDITOR_SCHEMA_VERSION,editorOptions:this.draw.getOptions(),valueOptions:e,originData:this.draw.getOriginValue(e)},()=>Promise.resolve(this.draw.getValue(e)))}getGroupIds(){return this._runTask("getGroupIds",{dataVersion:ce.DOCX_EDITOR_DATA_VERSION,schemaVersion:ce.DOCX_EDITOR_SCHEMA_VERSION,mainElementList:this.draw.getOriginalMainElementList()},()=>Promise.resolve(mn(this.draw.getOriginalMainElementList())))}getWordCount(){return this._runTask("getWordCount",{dataVersion:ce.DOCX_EDITOR_DATA_VERSION,schemaVersion:ce.DOCX_EDITOR_SCHEMA_VERSION,mainElementList:this.draw.getOriginalMainElementList()},()=>{const e=ce.getTextFromElementList(this.draw.getOriginalMainElementList()).replace(/\u200B/g,"");return Promise.resolve(e.replace(/\s/g,"").length)})}terminate(){var e;(e=this.worker)==null||e.terminate(),this.worker=null,this._rejectPendingTasks(new Error("Worker terminated"))}_initWorker(){if(typeof Worker>"u"){this._warnFallback("worker-unavailable","当前环境不支持 Worker,已降级为主线程执行。");return}try{this.worker=new pf,this.worker.onmessage=this._handleMessage,this.worker.onerror=this._handleError}catch(e){this.worker=null,this._warnFallback("worker-init-failed","Worker 初始化失败,已降级为主线程执行。",e)}}_runTask(e,t,n){if(!this.worker)return this._warnFallback(`fallback-${e}`,`${e} 未使用 Worker,已降级为主线程执行。`),n();const i=`${Date.now()}-${this.requestSeed++}`,s={id:i,type:e,payload:t};return new Promise((o,a)=>{this.pendingTaskMap.set(i,{resolve:o,reject:a});try{this.worker.postMessage(s)}catch(l){this.pendingTaskMap.delete(i),a(l)}}).catch(o=>(this._warnFallback(`fallback-${e}`,`${e} 的 Worker 执行失败,已降级为主线程执行。`,o),n()))}_rejectPendingTasks(e){for(const[,t]of this.pendingTaskMap)t.reject(e);this.pendingTaskMap.clear()}_warnFallback(e,t,n){this.warnedFallbackSet.has(e)||(this.warnedFallbackSet.add(e),n?console.warn(`[WorkerManager] ${t}`,n):console.warn(`[WorkerManager] ${t}`))}}class Aa{constructor(){Ee(this,"workerManager",null)}install(e){return this.workerManager=new Ea(e),typeof e.setWorkerManager=="function"&&e.setWorkerManager(this.workerManager),this}getWorkerManager(){return this.workerManager}}function mf(r){const e=atob(r.replace(/^data:[^;]+;base64,/,"")),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}function Sa(r){return r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function gf(r){if(!r.trList||!Array.isArray(r.trList))return"";const e=Number.isFinite(Number(r.borderWidth))?Number(r.borderWidth):1,t=typeof r.borderColor=="string"&&r.borderColor?r.borderColor:"#000000",n=r.borderType==="dash"?"dashed":"solid",i=r.borderType==="empty",s=r.borderType==="external",o=i?"border: none;":s?`border: ${e}px ${n} ${t};`:"border: none;",a=i||s?"border: none;":`border: ${e}px ${n} ${t};`;let l=`<table style="border-collapse: collapse; width: 100%; ${o}">`;for(const c of r.trList){if(l+="<tr>",c.tdList&&Array.isArray(c.tdList))for(const f of c.tdList){const m=f.colspan?` colspan="${f.colspan}"`:"",v=f.rowspan?` rowspan="${f.rowspan}"`:"";if(l+=`<td${m}${v} style="${a} padding: 4px 8px;">`,f.value&&Array.isArray(f.value))for(const y of f.value)y.value&&(l+=Sa(y.value));l+="</td>"}l+="</tr>"}return l+="</table>",l}class xa{constructor(){Ee(this,"_command",null)}install(e,t){this._command=t;const n=e.__structureAdapter;return n&&(n.exportDocx=this.exportDocx.bind(this),n.previewHtml=this.previewHtml.bind(this)),this}async exportDocx(e){var n,i;const t=e==null?void 0:e.callback;try{const s=this._command.getValue(),{Document:o,Packer:a,Paragraph:l,TextRun:c,ImageRun:f,Table:m,TableRow:v,TableCell:y,WidthType:b,BorderStyle:g}=await Promise.resolve().then(()=>Jb),_=[],d=s.data.main||[];let T=[];for(const E of d){const O=E!=null&&E.extension&&typeof E.extension=="object"?E.extension.bookmarkMarker:null;if(!(O!=null&&O.name)){if(E.value===`
|
|
3
|
+
`||E.type==="pageBreak")T.length>0&&(_.push(new l({children:T})),T=[]),E.type==="pageBreak"&&_.push(new l({pageBreakBefore:!0}));else if(E.type==="image"&&E.value){T.length>0&&(_.push(new l({children:T})),T=[]);try{const P=mf(E.value),B=E.width||200,I=E.height||200;_.push(new l({children:[new f({data:P,transformation:{width:B,height:I},type:"png"})]}))}catch(P){console.warn("[ExportComponent] 图片导出失败:",P)}}else if(E.type==="table"&&E.trList){T.length>0&&(_.push(new l({children:T})),T=[]);try{const P=L=>{if(typeof L!="string")return"000000";const V=L.trim();return V?V.startsWith("#")?V.slice(1):V:"000000"},B=L=>(L==="dash"?"dash":"single")==="dash"?g.DASHED??"dashed":g.SINGLE??"single",I=g.NONE??g.NIL??"none",K=L=>{const V=Number(L);return!Number.isFinite(V)||V<=0?8:Math.max(1,Math.round(V*8))},oe=L=>({style:L.style,size:L.size,color:L.color}),N=E.borderType??"all",U=P(E.borderColor),x=K(E.borderWidth),X=E.borderExternalWidth!==void 0?K(E.borderExternalWidth):x,re=B(N),z=oe({style:I,size:0,color:U}),se=oe({style:re,size:x,color:U}),Q=oe({style:re,size:X,color:U}),me=N==="empty"?{top:z,bottom:z,left:z,right:z,insideHorizontal:z,insideVertical:z}:N==="external"?{top:Q,bottom:Q,left:Q,right:Q,insideHorizontal:z,insideVertical:z}:N==="internal"?{top:z,bottom:z,left:z,right:z,insideHorizontal:se,insideVertical:se}:{top:Q,bottom:Q,left:Q,right:Q,insideHorizontal:se,insideVertical:se},Y=E.trList.map(L=>{const V=(L.tdList||[]).map(Z=>{const ie=(Z.value||[]).map(C=>C.value||"").join(""),$=Array.isArray(Z.borderTypes)&&Z.borderTypes.length?{...Z.borderTypes.includes("top")?{top:se}:{},...Z.borderTypes.includes("right")?{right:se}:{},...Z.borderTypes.includes("bottom")?{bottom:se}:{},...Z.borderTypes.includes("left")?{left:se}:{}}:void 0;return new y({children:[new l({children:[new c(ie)]})],columnSpan:Z.colspan||1,rowSpan:Z.rowspan||1,...$?{borders:$}:{}})});return new v({children:V})});_.push(new m({rows:Y,width:{size:100,type:b.PERCENTAGE},borders:me}))}catch(P){console.warn("[ExportComponent] 表格导出失败:",P)}}else if(E.value){const P={text:E.value,bold:E.bold,italics:E.italic,size:(E.size||10.5)*2,font:((n=E.font)==null?void 0:n.split(",")[0])||"SimSun",color:(i=E.color)==null?void 0:i.replace("#",""),underline:E.underline?{}:void 0,strike:E.strikeout};E.revisionType&&E.revisionId&&(P.revision={id:E.revisionId,author:E.revisionAuthor||"",date:E.revisionDate||"",type:E.revisionType==="insert"?"insert":"delete"}),T.push(new c(P))}}}T.length>0&&_.push(new l({children:T}));const w=new o({sections:[{children:_}]}),p=await a.toBlob(w);return t&&t(p),p}catch(s){return console.error("[ExportComponent] 导出 Docx 失败:",s),null}}previewHtml(e){const t=e==null?void 0:e.callback;try{const i=this._command.getValue().data.main||[];let s="";for(const o of i)if(o.value===`
|
|
4
|
+
`)s+="<br>";else if(o.type==="pageBreak")s+='<div style="page-break-after: always;"></div>';else if(o.type==="image"&&o.value)s+=`<img src="${o.value}" style="max-width: 100%; height: auto;" />`;else if(o.type==="table")s+=gf(o);else if(o.value){const a=[];o.bold&&a.push("font-weight: bold"),o.italic&&a.push("font-style: italic"),o.underline&&a.push("text-decoration: underline"),o.strikeout&&a.push("text-decoration: line-through"),o.color&&a.push(`color: ${o.color}`),o.highlight&&a.push(`background-color: ${o.highlight}`),o.size&&a.push(`font-size: ${o.size}px`),o.font&&a.push(`font-family: ${o.font}`);const l=a.length>0?` style="${a.join("; ")}"`:"";s+=`<span${l}>${Sa(o.value)}</span>`}return t&&t(s),s}catch(n){return console.error("[ExportComponent] 预览 HTML 失败:",n),t&&t("<p>预览失败</p>"),"<p>预览失败</p>"}}}/*!
|
|
5
5
|
* vanilla-picker v2.12.3
|
|
6
6
|
* https://vanilla-picker.js.org
|
|
7
7
|
*
|
|
8
8
|
* Copyright 2017-2024 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate)
|
|
9
9
|
* Released under the ISC license.
|
|
10
|
-
*/var
|
|
11
|
-
linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,vf=360,Aa="keydown",Ar="mousedown",yn="focusin";function $e(r,e){return(e||document).querySelector(r)}function _f(r){r.preventDefault(),r.stopPropagation()}function bn(r,e,t,n,i){r.add(e,Aa,function(s){t.indexOf(s.key)>=0&&n(s)})}var ka=function(){function r(e){mn(this,r),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new wf,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return gn(r,[{key:"setOptions",value:function(t){var n=this;if(!t)return;var i=this.settings;function s(h,f,m){for(var v in h)f[v]=h[v]}if(t instanceof HTMLElement)i.parent=t;else{i.parent&&t.parent&&i.parent!==t.parent&&(this._events.remove(i.parent),this._popupInited=!1),s(t,i),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);var o=t.color||t.colour;o&&this._setColor(o)}var a=i.parent;if(a&&i.popup&&!this._popupInited){var l=function(f){return n.openHandler(f)};this._events.add(a,"click",l),bn(this._events,a,[" ","Spacebar","Enter"],l),this._popupInited=!0}else t.parent&&!i.popup&&this.show()}},{key:"openHandler",value:function(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";var n=t&&t.type===Aa?this._domEdit:this.domElement;setTimeout(function(){return n.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(t){var n=t&&t.type,i=!1;if(!t)i=!0;else if(n===Ar||n===yn){var s=(this.__containedEvent||0)+100;t.timeStamp>s&&(i=!0)}else _f(t),i=!0;i&&this.hide()&&(this.settings.parent.style.pointerEvents="",n!==Ar&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(t,n){this.closeHandler(),this.setOptions(t),n&&this.openHandler()}},{key:"setColor",value:function(t,n){this._setColor(t,{silent:n})}},{key:"_setColor",value:function(t,n){if(typeof t=="string"&&(t=t.trim()),!!t){n=n||{};var i=void 0;try{i=new gf(t)}catch(o){if(n.failSilently)return;throw o}if(!this.settings.alpha){var s=i.hsla;s[3]=1,i.hsla=s}this.colour=this.color=i,this._setHSLA(null,null,null,null,n)}}},{key:"setColour",value:function(t,n){this.setColor(t,n)}},{key:"show",value:function(){var t=this.settings.parent;if(!t)return!1;if(this.domElement){var n=this._toggleDOM(!0);return this._setPosition(),n}var i=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',s=yf(i);return this.domElement=s,this._domH=$e(".picker_hue",s),this._domSL=$e(".picker_sl",s),this._domA=$e(".picker_alpha",s),this._domEdit=$e(".picker_editor input",s),this._domSample=$e(".picker_sample",s),this._domOkay=$e(".picker_done button",s),this._domCancel=$e(".picker_cancel button",s),s.classList.add("layout_"+this.settings.layout),this.settings.alpha||s.classList.add("no_alpha"),this.settings.editor||s.classList.add("no_editor"),this.settings.cancelButton||s.classList.add("no_cancel"),this._ifPopup(function(){return s.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var t=this,n=this,i=this.domElement,s=this._events;function o(h,f,m){s.add(h,f,m)}o(i,"click",function(h){return h.preventDefault()}),wn(s,this._domH,function(h,f){return n._setHSLA(h)}),wn(s,this._domSL,function(h,f){return n._setHSLA(null,h,1-f)}),this.settings.alpha&&wn(s,this._domA,function(h,f){return n._setHSLA(null,null,null,1-f)});var a=this._domEdit;o(a,"input",function(h){n._setColor(this.value,{fromEditor:!0,failSilently:!0})}),o(a,"focus",function(h){var f=this;f.selectionStart===f.selectionEnd&&f.select()}),this._ifPopup(function(){var h=function(v){return t.closeHandler(v)};o(window,Ar,h),o(window,yn,h),bn(s,i,["Esc","Escape"],h);var f=function(v){t.__containedEvent=v.timeStamp};o(i,Ar,f),o(i,yn,f),o(t._domCancel,"click",h)});var l=function(f){t._ifPopup(function(){return t.closeHandler(f)}),t.onDone&&t.onDone(t.colour)};o(this._domOkay,"click",l),bn(s,i,["Enter"],l)}},{key:"_setPosition",value:function(){var t=this.settings.parent,n=this.domElement;t!==n.parentNode&&t.appendChild(n),this._ifPopup(function(i){getComputedStyle(t).position==="static"&&(t.style.position="relative");var s=i===!0?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(o){o===s?n.classList.add(o):n.classList.remove(o)}),n.classList.add(s)})}},{key:"_setHSLA",value:function(t,n,i,s,o){o=o||{};var a=this.colour,l=a.hsla;[t,n,i,s].forEach(function(h,f){(h||h===0)&&(l[f]=h)}),a.hsla=l,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(a)}},{key:"_updateUI",value:function(t){if(!this.domElement)return;t=t||{};var n=this.colour,i=n.hsla,s="hsl("+i[0]*vf+", 100%, 50%)",o=n.hslString,a=n.hslaString,l=this._domH,h=this._domSL,f=this._domA,m=$e(".picker_selector",l),v=$e(".picker_selector",h),y=$e(".picker_selector",f);function b(P,L,M){L.style.left=M*100+"%"}function g(P,L,M){L.style.top=M*100+"%"}b(l,m,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=s,b(h,v,i[1]),g(h,v,1-i[2]),h.style.color=o,g(f,y,1-i[3]);var _=o,d=_.replace("hsl","hsla").replace(")",", 0)"),T="linear-gradient("+[_,d]+")";if(this._domA.style.background=T+", "+bf,!t.fromEditor){var w=this.settings.editorFormat,p=this.settings.alpha,E=void 0;switch(w){case"rgb":E=n.printRGB(p);break;case"hsl":E=n.printHSL(p);break;default:E=n.printHex(p)}this._domEdit.value=E}this._domSample.style.color=a}},{key:"_ifPopup",value:function(t,n){this.settings.parent&&this.settings.popup?t&&t(this.settings.popup):n&&n()}},{key:"_toggleDOM",value:function(t){var n=this.domElement;if(!n)return!1;var i=t?"":"none",s=n.style.display!==i;return s&&(n.style.display=i),s}}]),r}();{var vn=document.createElement("style");vn.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(vn),ka.StyleElement=vn}const Re=r=>`<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">${r}</svg>`,et=(r,e)=>{const t=r==="center"?5.5:4,n=r==="left"?5:r==="center"?9-t/2:13-t;return Re(`
|
|
10
|
+
*/var gn=function(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")},wn=(function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}})(),xr=(function(){function r(e,t){var n=[],i=!0,s=!1,o=void 0;try{for(var a=e[Symbol.iterator](),l;!(i=(l=a.next()).done)&&(n.push(l.value),!(t&&n.length===t));i=!0);}catch(c){s=!0,o=c}finally{try{!i&&a.return&&a.return()}finally{if(s)throw o}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})();String.prototype.startsWith=String.prototype.startsWith||function(r){return this.indexOf(r)===0},String.prototype.padStart=String.prototype.padStart||function(r,e){for(var t=this;t.length<r;)t=e+t;return t};var wf={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function ka(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,t=e>0?r.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):r.toString();return t||"0"}var yf=(function(){function r(e,t,n,i){gn(this,r);var s=this;function o(l){if(l.startsWith("hsl")){var c=l.match(/([\-\d\.e]+)/g).map(Number),f=xr(c,4),m=f[0],v=f[1],y=f[2],b=f[3];b===void 0&&(b=1),m/=360,v/=100,y/=100,s.hsla=[m,v,y,b]}else if(l.startsWith("rgb")){var g=l.match(/([\-\d\.e]+)/g).map(Number),_=xr(g,4),d=_[0],T=_[1],w=_[2],p=_[3];p===void 0&&(p=1),s.rgba=[d,T,w,p]}else l.startsWith("#")?s.rgba=r.hexToRgb(l):s.rgba=r.nameToRgb(l)||r.hexToRgb(l)}if(e!==void 0)if(Array.isArray(e))this.rgba=e;else if(n===void 0){var a=e&&""+e;a&&o(a.toLowerCase())}else this.rgba=[e,t,n,i===void 0?1:i]}return wn(r,[{key:"printRGB",value:function(t){var n=t?this.rgba:this.rgba.slice(0,3),i=n.map(function(s,o){return ka(s,o===3?3:0)});return t?"rgba("+i+")":"rgb("+i+")"}},{key:"printHSL",value:function(t){var n=[360,100,100,1],i=["","%","%",""],s=t?this.hsla:this.hsla.slice(0,3),o=s.map(function(a,l){return ka(a*n[l],l===3?3:1)+i[l]});return t?"hsla("+o+")":"hsl("+o+")"}},{key:"printHex",value:function(t){var n=this.hex;return t?n:n.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=r.hslToRgb(this._hsla)},set:function(t){t.length===3&&(t[3]=1),this._rgba=t,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=r.rgbToHsl(this._rgba)},set:function(t){t.length===3&&(t[3]=1),this._hsla=t,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var t=this.rgba,n=t.map(function(i,s){return s<3?i.toString(16):Math.round(i*255).toString(16)});return"#"+n.map(function(i){return i.padStart(2,"0")}).join("")},set:function(t){this.rgba=r.hexToRgb(t)}}],[{key:"hexToRgb",value:function(t){var n=(t.startsWith("#")?t.slice(1):t).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!n.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+t);var i=n.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(s){return parseInt(s,16)});return i[3]=i[3]/255,i}},{key:"nameToRgb",value:function(t){var n=t.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),i=wf[n];return i===void 0?i:r.hexToRgb(i.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(t){var n=xr(t,4),i=n[0],s=n[1],o=n[2],a=n[3];i/=255,s/=255,o/=255;var l=Math.max(i,s,o),c=Math.min(i,s,o),f=void 0,m=void 0,v=(l+c)/2;if(l===c)f=m=0;else{var y=l-c;switch(m=v>.5?y/(2-l-c):y/(l+c),l){case i:f=(s-o)/y+(s<o?6:0);break;case s:f=(o-i)/y+2;break;case o:f=(i-s)/y+4;break}f/=6}return[f,m,v,a]}},{key:"hslToRgb",value:function(t){var n=xr(t,4),i=n[0],s=n[1],o=n[2],a=n[3],l=void 0,c=void 0,f=void 0;if(s===0)l=c=f=o;else{var m=function(_,d,T){return T<0&&(T+=1),T>1&&(T-=1),T<.16666666666666666?_+(d-_)*6*T:T<.5?d:T<.6666666666666666?_+(d-_)*(.6666666666666666-T)*6:_},v=o<.5?o*(1+s):o+s-o*s,y=2*o-v;l=m(y,v,i+1/3),c=m(y,v,i),f=m(y,v,i-1/3)}var b=[l*255,c*255,f*255].map(Math.round);return b[3]=a,b}}]),r})(),vf=(function(){function r(){gn(this,r),this._events=[]}return wn(r,[{key:"add",value:function(t,n,i){t.addEventListener(n,i,!1),this._events.push({target:t,type:n,handler:i})}},{key:"remove",value:function(t,n,i){this._events=this._events.filter(function(s){var o=!0;return t&&t!==s.target&&(o=!1),n&&n!==s.type&&(o=!1),i&&i!==s.handler&&(o=!1),o&&r._doRemove(s.target,s.type,s.handler),!o})}},{key:"destroy",value:function(){this._events.forEach(function(t){return r._doRemove(t.target,t.type,t.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(t,n,i){t.removeEventListener(n,i,!1)}}]),r})();function bf(r){var e=document.createElement("div");return e.innerHTML=r,e.firstElementChild}function yn(r,e,t){var n=!1;function i(l,c,f){return Math.max(c,Math.min(l,f))}function s(l,c,f){if(f&&(n=!0),!!n){l.preventDefault();var m=e.getBoundingClientRect(),v=m.width,y=m.height,b=c.clientX,g=c.clientY,_=i(b-m.left,0,v),d=i(g-m.top,0,y);t(_/v,d/y)}}function o(l,c){var f=l.buttons===void 0?l.which:l.buttons;f===1?s(l,l,c):n=!1}function a(l,c){l.touches.length===1?s(l,l.touches[0],c):n=!1}r.add(e,"mousedown",function(l){o(l,!0)}),r.add(e,"touchstart",function(l){a(l,!0)}),r.add(window,"mousemove",o),r.add(e,"touchmove",a),r.add(window,"mouseup",function(l){n=!1}),r.add(e,"touchend",function(l){n=!1}),r.add(e,"touchcancel",function(l){n=!1})}var _f=`linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,
|
|
11
|
+
linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,Tf=360,Ca="keydown",kr="mousedown",vn="focusin";function Qe(r,e){return(e||document).querySelector(r)}function Ef(r){r.preventDefault(),r.stopPropagation()}function bn(r,e,t,n,i){r.add(e,Ca,function(s){t.indexOf(s.key)>=0&&n(s)})}var Ra=(function(){function r(e){gn(this,r),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new vf,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return wn(r,[{key:"setOptions",value:function(t){var n=this;if(!t)return;var i=this.settings;function s(c,f,m){for(var v in c)f[v]=c[v]}if(t instanceof HTMLElement)i.parent=t;else{i.parent&&t.parent&&i.parent!==t.parent&&(this._events.remove(i.parent),this._popupInited=!1),s(t,i),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);var o=t.color||t.colour;o&&this._setColor(o)}var a=i.parent;if(a&&i.popup&&!this._popupInited){var l=function(f){return n.openHandler(f)};this._events.add(a,"click",l),bn(this._events,a,[" ","Spacebar","Enter"],l),this._popupInited=!0}else t.parent&&!i.popup&&this.show()}},{key:"openHandler",value:function(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";var n=t&&t.type===Ca?this._domEdit:this.domElement;setTimeout(function(){return n.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(t){var n=t&&t.type,i=!1;if(!t)i=!0;else if(n===kr||n===vn){var s=(this.__containedEvent||0)+100;t.timeStamp>s&&(i=!0)}else Ef(t),i=!0;i&&this.hide()&&(this.settings.parent.style.pointerEvents="",n!==kr&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(t,n){this.closeHandler(),this.setOptions(t),n&&this.openHandler()}},{key:"setColor",value:function(t,n){this._setColor(t,{silent:n})}},{key:"_setColor",value:function(t,n){if(typeof t=="string"&&(t=t.trim()),!!t){n=n||{};var i=void 0;try{i=new yf(t)}catch(o){if(n.failSilently)return;throw o}if(!this.settings.alpha){var s=i.hsla;s[3]=1,i.hsla=s}this.colour=this.color=i,this._setHSLA(null,null,null,null,n)}}},{key:"setColour",value:function(t,n){this.setColor(t,n)}},{key:"show",value:function(){var t=this.settings.parent;if(!t)return!1;if(this.domElement){var n=this._toggleDOM(!0);return this._setPosition(),n}var i=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',s=bf(i);return this.domElement=s,this._domH=Qe(".picker_hue",s),this._domSL=Qe(".picker_sl",s),this._domA=Qe(".picker_alpha",s),this._domEdit=Qe(".picker_editor input",s),this._domSample=Qe(".picker_sample",s),this._domOkay=Qe(".picker_done button",s),this._domCancel=Qe(".picker_cancel button",s),s.classList.add("layout_"+this.settings.layout),this.settings.alpha||s.classList.add("no_alpha"),this.settings.editor||s.classList.add("no_editor"),this.settings.cancelButton||s.classList.add("no_cancel"),this._ifPopup(function(){return s.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var t=this,n=this,i=this.domElement,s=this._events;function o(c,f,m){s.add(c,f,m)}o(i,"click",function(c){return c.preventDefault()}),yn(s,this._domH,function(c,f){return n._setHSLA(c)}),yn(s,this._domSL,function(c,f){return n._setHSLA(null,c,1-f)}),this.settings.alpha&&yn(s,this._domA,function(c,f){return n._setHSLA(null,null,null,1-f)});var a=this._domEdit;o(a,"input",function(c){n._setColor(this.value,{fromEditor:!0,failSilently:!0})}),o(a,"focus",function(c){var f=this;f.selectionStart===f.selectionEnd&&f.select()}),this._ifPopup(function(){var c=function(v){return t.closeHandler(v)};o(window,kr,c),o(window,vn,c),bn(s,i,["Esc","Escape"],c);var f=function(v){t.__containedEvent=v.timeStamp};o(i,kr,f),o(i,vn,f),o(t._domCancel,"click",c)});var l=function(f){t._ifPopup(function(){return t.closeHandler(f)}),t.onDone&&t.onDone(t.colour)};o(this._domOkay,"click",l),bn(s,i,["Enter"],l)}},{key:"_setPosition",value:function(){var t=this.settings.parent,n=this.domElement;t!==n.parentNode&&t.appendChild(n),this._ifPopup(function(i){getComputedStyle(t).position==="static"&&(t.style.position="relative");var s=i===!0?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(o){o===s?n.classList.add(o):n.classList.remove(o)}),n.classList.add(s)})}},{key:"_setHSLA",value:function(t,n,i,s,o){o=o||{};var a=this.colour,l=a.hsla;[t,n,i,s].forEach(function(c,f){(c||c===0)&&(l[f]=c)}),a.hsla=l,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(a)}},{key:"_updateUI",value:function(t){if(!this.domElement)return;t=t||{};var n=this.colour,i=n.hsla,s="hsl("+i[0]*Tf+", 100%, 50%)",o=n.hslString,a=n.hslaString,l=this._domH,c=this._domSL,f=this._domA,m=Qe(".picker_selector",l),v=Qe(".picker_selector",c),y=Qe(".picker_selector",f);function b(O,P,B){P.style.left=B*100+"%"}function g(O,P,B){P.style.top=B*100+"%"}b(l,m,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=s,b(c,v,i[1]),g(c,v,1-i[2]),c.style.color=o,g(f,y,1-i[3]);var _=o,d=_.replace("hsl","hsla").replace(")",", 0)"),T="linear-gradient("+[_,d]+")";if(this._domA.style.background=T+", "+_f,!t.fromEditor){var w=this.settings.editorFormat,p=this.settings.alpha,E=void 0;switch(w){case"rgb":E=n.printRGB(p);break;case"hsl":E=n.printHSL(p);break;default:E=n.printHex(p)}this._domEdit.value=E}this._domSample.style.color=a}},{key:"_ifPopup",value:function(t,n){this.settings.parent&&this.settings.popup?t&&t(this.settings.popup):n&&n()}},{key:"_toggleDOM",value:function(t){var n=this.domElement;if(!n)return!1;var i=t?"":"none",s=n.style.display!==i;return s&&(n.style.display=i),s}}]),r})();{var _n=document.createElement("style");_n.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(_n),Ra.StyleElement=_n}const Ce=r=>`<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">${r}</svg>`,et=(r,e)=>{const t=r==="center"?5.5:4,n=r==="left"?5:r==="center"?9-t/2:13-t;return Ce(`
|
|
12
12
|
<rect x="3.25" y="3.25" width="11.5" height="11.5" stroke="currentColor" stroke-width="1.1"/>
|
|
13
13
|
<path d="M${n} ${e==="top"?5.2:e==="middle"?9:12.8}H${n+t}" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
14
|
-
`)},Te={tableBorder:
|
|
14
|
+
`)},Te={tableBorder:Ce(`
|
|
15
15
|
<rect x="2.75" y="2.75" width="12.5" height="12.5" rx="1.5" stroke="currentColor" stroke-width="1.2"/>
|
|
16
16
|
<path d="M9 2.75V15.25M2.75 9H15.25" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/>
|
|
17
|
-
`),borderAll:
|
|
17
|
+
`),borderAll:Ce(`
|
|
18
18
|
<rect x="2.75" y="2.75" width="12.5" height="12.5" rx="1.5" stroke="currentColor" stroke-width="1.2"/>
|
|
19
19
|
<path d="M9 2.75V15.25M2.75 9H15.25" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
20
|
-
`),borderExternal:
|
|
20
|
+
`),borderExternal:Ce(`
|
|
21
21
|
<rect x="2.75" y="2.75" width="12.5" height="12.5" rx="1.5" stroke="currentColor" stroke-width="1.4"/>
|
|
22
|
-
`),borderInternal:
|
|
22
|
+
`),borderInternal:Ce(`
|
|
23
23
|
<path d="M9 2.75V15.25M2.75 9H15.25" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/>
|
|
24
24
|
<rect x="2.75" y="2.75" width="12.5" height="12.5" rx="1.5" stroke="currentColor" stroke-width="0.8" stroke-dasharray="2 2" opacity="0.45"/>
|
|
25
|
-
`),borderDash:
|
|
25
|
+
`),borderDash:Ce(`
|
|
26
26
|
<rect x="2.75" y="2.75" width="12.5" height="12.5" rx="1.5" stroke="currentColor" stroke-width="1.2" stroke-dasharray="2 2"/>
|
|
27
27
|
<path d="M9 2.75V15.25M2.75 9H15.25" stroke="currentColor" stroke-width="1.1" stroke-dasharray="2 2" stroke-linecap="round"/>
|
|
28
|
-
`),borderNone:
|
|
28
|
+
`),borderNone:Ce(`
|
|
29
29
|
<rect x="2.75" y="2.75" width="12.5" height="12.5" rx="1.5" stroke="currentColor" stroke-width="1.2" stroke-dasharray="2 2"/>
|
|
30
30
|
<path d="M4 4L14 14" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
31
|
-
`),borderColor:
|
|
31
|
+
`),borderColor:Ce(`
|
|
32
32
|
<path d="M4 12L9.5 6.5L12 9L6.5 14.5" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
33
33
|
<path d="M10.8 5.2L12.8 3.2L14.8 5.2L12.8 7.2" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
34
34
|
<path d="M4 15H14" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
35
|
-
`),borderWidth:
|
|
35
|
+
`),borderWidth:Ce(`
|
|
36
36
|
<path d="M4 5H14" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
37
37
|
<path d="M4 9H14" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
38
38
|
<path d="M4 13H14" stroke="currentColor" stroke-width="3" stroke-linecap="round"/>
|
|
39
|
-
`),cellAlign:et("center","middle"),alignTopLeft:et("left","top"),alignTopCenter:et("center","top"),alignTopRight:et("right","top"),alignMiddleLeft:et("left","middle"),alignMiddleCenter:et("center","middle"),alignMiddleRight:et("right","middle"),alignBottomLeft:et("left","bottom"),alignBottomCenter:et("center","bottom"),alignBottomRight:et("right","bottom"),insert:
|
|
39
|
+
`),cellAlign:et("center","middle"),alignTopLeft:et("left","top"),alignTopCenter:et("center","top"),alignTopRight:et("right","top"),alignMiddleLeft:et("left","middle"),alignMiddleCenter:et("center","middle"),alignMiddleRight:et("right","middle"),alignBottomLeft:et("left","bottom"),alignBottomCenter:et("center","bottom"),alignBottomRight:et("right","bottom"),insert:Ce(`
|
|
40
40
|
<rect x="2.75" y="2.75" width="12.5" height="12.5" rx="1.5" stroke="currentColor" stroke-width="1.2"/>
|
|
41
41
|
<path d="M9 5.25V12.75M5.25 9H12.75" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
42
|
-
`),insertColLeft:
|
|
42
|
+
`),insertColLeft:Ce(`
|
|
43
43
|
<rect x="6.2" y="2.75" width="8.05" height="12.5" rx="1.2" stroke="currentColor" stroke-width="1.2"/>
|
|
44
44
|
<path d="M2.8 9H6.2M4.5 7.3V10.7" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
45
|
-
`),insertColRight:
|
|
45
|
+
`),insertColRight:Ce(`
|
|
46
46
|
<rect x="2.75" y="2.75" width="8.05" height="12.5" rx="1.2" stroke="currentColor" stroke-width="1.2"/>
|
|
47
47
|
<path d="M11.8 9H15.2M13.5 7.3V10.7" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
48
|
-
`),insertRowAbove:
|
|
48
|
+
`),insertRowAbove:Ce(`
|
|
49
49
|
<rect x="2.75" y="6.2" width="12.5" height="8.05" rx="1.2" stroke="currentColor" stroke-width="1.2"/>
|
|
50
50
|
<path d="M9 2.8V6.2M7.3 4.5H10.7" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
51
|
-
`),insertRowBelow:
|
|
51
|
+
`),insertRowBelow:Ce(`
|
|
52
52
|
<rect x="2.75" y="2.75" width="12.5" height="8.05" rx="1.2" stroke="currentColor" stroke-width="1.2"/>
|
|
53
53
|
<path d="M9 11.8V15.2M7.3 13.5H10.7" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
54
|
-
`),delete:
|
|
54
|
+
`),delete:Ce(`
|
|
55
55
|
<path d="M5 5L13 13M13 5L5 13" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/>
|
|
56
|
-
`),deleteRow:
|
|
56
|
+
`),deleteRow:Ce(`
|
|
57
57
|
<rect x="2.75" y="2.75" width="12.5" height="12.5" rx="1.5" stroke="currentColor" stroke-width="1.2"/>
|
|
58
58
|
<path d="M5 9H13" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/>
|
|
59
|
-
`),deleteTable:
|
|
59
|
+
`),deleteTable:Ce(`
|
|
60
60
|
<rect x="2.75" y="2.75" width="12.5" height="12.5" rx="1.5" stroke="currentColor" stroke-width="1.2"/>
|
|
61
61
|
<path d="M5 5L13 13M13 5L5 13" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
62
|
-
`),cancelMerge:
|
|
62
|
+
`),cancelMerge:Ce(`
|
|
63
63
|
<rect x="3" y="4" width="5" height="10" rx="1" stroke="currentColor" stroke-width="1.2"/>
|
|
64
64
|
<rect x="10" y="4" width="5" height="10" rx="1" stroke="currentColor" stroke-width="1.2"/>
|
|
65
65
|
<path d="M8.5 9H9.5" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/>
|
|
66
|
-
`),merge:
|
|
66
|
+
`),merge:Ce(`
|
|
67
67
|
<rect x="3" y="4" width="5" height="10" rx="1" stroke="currentColor" stroke-width="1.2"/>
|
|
68
68
|
<rect x="10" y="4" width="5" height="10" rx="1" stroke="currentColor" stroke-width="1.2"/>
|
|
69
69
|
<path d="M7.5 9H10.5" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/>
|
|
70
|
-
`),split:
|
|
70
|
+
`),split:Ce(`
|
|
71
71
|
<rect x="3" y="4" width="12" height="10" rx="1.4" stroke="currentColor" stroke-width="1.2"/>
|
|
72
72
|
<path d="M9 4V14" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
73
|
-
`),selectAll:
|
|
73
|
+
`),selectAll:Ce(`
|
|
74
74
|
<rect x="2.75" y="2.75" width="12.5" height="12.5" rx="1.5" stroke="currentColor" stroke-width="1.2"/>
|
|
75
75
|
<rect x="5" y="5" width="2.8" height="2.8" fill="currentColor" opacity="0.5"/>
|
|
76
76
|
<rect x="10.2" y="5" width="2.8" height="2.8" fill="currentColor" opacity="0.5"/>
|
|
77
77
|
<rect x="5" y="10.2" width="2.8" height="2.8" fill="currentColor" opacity="0.5"/>
|
|
78
78
|
<rect x="10.2" y="10.2" width="2.8" height="2.8" fill="currentColor" opacity="0.5"/>
|
|
79
|
-
`),backgroundColor:
|
|
79
|
+
`),backgroundColor:Ce(`
|
|
80
80
|
<rect x="3" y="3" width="12" height="12" rx="1.5" stroke="currentColor" stroke-width="1.2"/>
|
|
81
81
|
<rect x="5.5" y="5.5" width="7" height="7" rx="1" fill="currentColor" opacity="0.35"/>
|
|
82
|
-
`),cellBorder:
|
|
82
|
+
`),cellBorder:Ce(`
|
|
83
83
|
<rect x="3" y="3" width="12" height="12" rx="1.5" stroke="currentColor" stroke-width="1.2"/>
|
|
84
84
|
<path d="M6 6H12M6 9H12M6 12H12" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
85
|
-
`),slash:
|
|
85
|
+
`),slash:Ce(`
|
|
86
86
|
<rect x="3" y="3" width="12" height="12" rx="1.5" stroke="currentColor" stroke-width="1.2"/>
|
|
87
87
|
<path d="M5 13L13 5" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
88
|
-
`)};class Tf{constructor(e){Se(this,"draw");Se(this,"menuElement",null);Se(this,"_removeContextmenuHandler",null);Se(this,"subMenuElement",null);Se(this,"_hideSubMenuTimer",null);Se(this,"activeColorPanel",null);Se(this,"activePicker",null);this.draw=e}show(e,t,n){this.close();const i=this._buildMenuItems(n);this.menuElement=this._createMenuElement(i,e,t),document.body.appendChild(this.menuElement),this._bindGlobalEvents()}close(){this._destroyActiveColorPanel(),this.menuElement&&(this.menuElement.remove(),this.menuElement=null),this.subMenuElement&&(this.subMenuElement.remove(),this.subMenuElement=null),this._removeContextmenuHandler&&(this._removeContextmenuHandler(),this._removeContextmenuHandler=null)}_buildMenuItems(e){const t=this._getCurrentTd(e),n=e.borderColor||this._getDefaultBorderColor(),i=Number(e.borderWidth??.5),s=Number(e.borderExternalWidth??0),o=(t==null?void 0:t.backgroundColor)||"#ffffff",a=!!this.draw.getRange().getRange().isCrossRowCol,l=this._canCancelMerge(t);return[{label:"表格边框",icon:Te.tableBorder,children:[{label:"全部边框",icon:Te.borderAll,active:(e.borderType||ce.TableBorder.ALL)===ce.TableBorder.ALL,action:()=>this._setBorderType(ce.TableBorder.ALL)},{label:"外侧边框",icon:Te.borderExternal,active:e.borderType===ce.TableBorder.EXTERNAL,action:()=>this._setBorderType(ce.TableBorder.EXTERNAL)},{label:"内部边框",icon:Te.borderInternal,active:e.borderType===ce.TableBorder.INTERNAL,action:()=>this._setBorderType(ce.TableBorder.INTERNAL)},{label:"虚线边框",icon:Te.borderDash,active:e.borderType===ce.TableBorder.DASH,action:()=>this._setBorderType(ce.TableBorder.DASH)},{label:"无边框",icon:Te.borderNone,active:e.borderType===ce.TableBorder.EMPTY,action:()=>this._setBorderType(ce.TableBorder.EMPTY)},{divider:!0},{label:"边框颜色",icon:Te.borderColor,previewColor:n,closeOnClick:!1,action:h=>this._showBorderColorPicker(n,h)},{label:"边框宽度",icon:Te.borderWidth,inputType:"number",inputDefault:i,inputMin:0,inputMax:12,inputStep:.5,inputAction:h=>this._setBorderWidth(h)},{label:"外边框宽度",icon:Te.borderExternal,inputType:"number",inputDefault:s,inputMin:0,inputMax:12,inputStep:.5,inputAction:h=>this._setBorderExternalWidth(h)}]},{label:"单元格对齐方式",icon:Te.cellAlign,childrenLayout:"icon-grid",children:[{title:"左上对齐",icon:Te.alignTopLeft,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.TOP,ce.RowFlex.LEFT),action:()=>this._setCellAlign(ce.VerticalAlign.TOP,ce.RowFlex.LEFT)},{title:"中上对齐",icon:Te.alignTopCenter,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.TOP,ce.RowFlex.CENTER),action:()=>this._setCellAlign(ce.VerticalAlign.TOP,ce.RowFlex.CENTER)},{title:"右上对齐",icon:Te.alignTopRight,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.TOP,ce.RowFlex.RIGHT),action:()=>this._setCellAlign(ce.VerticalAlign.TOP,ce.RowFlex.RIGHT)},{title:"左中对齐",icon:Te.alignMiddleLeft,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.MIDDLE,ce.RowFlex.LEFT),action:()=>this._setCellAlign(ce.VerticalAlign.MIDDLE,ce.RowFlex.LEFT)},{title:"居中对齐",icon:Te.alignMiddleCenter,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.MIDDLE,ce.RowFlex.CENTER),action:()=>this._setCellAlign(ce.VerticalAlign.MIDDLE,ce.RowFlex.CENTER)},{title:"右中对齐",icon:Te.alignMiddleRight,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.MIDDLE,ce.RowFlex.RIGHT),action:()=>this._setCellAlign(ce.VerticalAlign.MIDDLE,ce.RowFlex.RIGHT)},{title:"左下对齐",icon:Te.alignBottomLeft,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.BOTTOM,ce.RowFlex.LEFT),action:()=>this._setCellAlign(ce.VerticalAlign.BOTTOM,ce.RowFlex.LEFT)},{title:"中下对齐",icon:Te.alignBottomCenter,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.BOTTOM,ce.RowFlex.CENTER),action:()=>this._setCellAlign(ce.VerticalAlign.BOTTOM,ce.RowFlex.CENTER)},{title:"右下对齐",icon:Te.alignBottomRight,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.BOTTOM,ce.RowFlex.RIGHT),action:()=>this._setCellAlign(ce.VerticalAlign.BOTTOM,ce.RowFlex.RIGHT)}]},{label:"插入行列",icon:Te.insert,children:[{label:"在左侧插入",icon:Te.insertColLeft,inputType:"number",inputDefault:1,inputMin:1,inputMax:100,inputStep:1,inputAction:h=>this._repeatAction(h,()=>{this.draw.getTableOperate().insertTableLeftCol()}),unit:"列"},{label:"在右侧插入",icon:Te.insertColRight,inputType:"number",inputDefault:1,inputMin:1,inputMax:100,inputStep:1,inputAction:h=>this._repeatAction(h,()=>{this.draw.getTableOperate().insertTableRightCol()}),unit:"列"},{label:"在上方插入",icon:Te.insertRowAbove,inputType:"number",inputDefault:1,inputMin:1,inputMax:100,inputStep:1,inputAction:h=>this._repeatAction(h,()=>{this.draw.getTableOperate().insertTableTopRow()}),unit:"行"},{label:"在下方插入",icon:Te.insertRowBelow,inputType:"number",inputDefault:1,inputMin:1,inputMax:100,inputStep:1,inputAction:h=>this._repeatAction(h,()=>{this.draw.getTableOperate().insertTableBottomRow()}),unit:"行"}]},{label:"删除行列",icon:Te.delete,children:[{label:"删除当前行",icon:Te.deleteRow,action:()=>this._deleteRow()},{label:"删除当前列",icon:Te.deleteRow,action:()=>this._deleteColumn()},{label:"删除表格",icon:Te.deleteTable,danger:!0,action:()=>this._deleteTable()}]},{label:"取消合并",icon:Te.cancelMerge,disabled:!l,action:()=>this._cancelMergeTableCell()},{divider:!0},{label:"合并单元格",icon:Te.merge,disabled:!a,action:()=>this._mergeTableCell()},{label:"拆分单元格",icon:Te.split,children:[{label:"左右拆分",icon:Te.split,action:()=>this._splitVerticalTableCell()},{label:"上下拆分",icon:Te.split,action:()=>this._splitHorizontalTableCell()}]},{label:"单元格边框",icon:Te.cellBorder,children:[{label:"上边框",icon:Te.cellBorder,action:()=>this._toggleTdBorderType(ce.TdBorder.TOP)},{label:"右边框",icon:Te.cellBorder,action:()=>this._toggleTdBorderType(ce.TdBorder.RIGHT)},{label:"下边框",icon:Te.cellBorder,action:()=>this._toggleTdBorderType(ce.TdBorder.BOTTOM)},{label:"左边框",icon:Te.cellBorder,action:()=>this._toggleTdBorderType(ce.TdBorder.LEFT)}]},{label:"斜线样式",icon:Te.slash,children:[{label:"正斜线",icon:Te.slash,action:()=>this._toggleTdSlashType(ce.TdSlash.FORWARD)},{label:"反斜线",icon:Te.slash,action:()=>this._toggleTdSlashType(ce.TdSlash.BACK)}]},{label:"单元格底纹",icon:Te.backgroundColor,previewColor:o,closeOnClick:!1,action:h=>this._showBackgroundColorPicker(o,h)},{divider:!0},{label:"全选表格",icon:Te.selectAll,action:()=>this._selectAllTable()}]}_createMenuElement(e,t,n){const i=document.createElement("div");i.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu`),e.forEach(l=>{if(l.divider){const h=document.createElement("div");h.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__divider`),i.appendChild(h)}else{const h=this._createMenuItem(l);i.appendChild(h)}}),i.style.left=`${t}px`,i.style.top=`${n}px`;const s=i.getBoundingClientRect(),o=window.innerWidth,a=window.innerHeight;return t+s.width>o&&(i.style.left=`${o-s.width-10}px`),n+s.height>a&&(i.style.top=`${a-s.height-10}px`),i}_createMenuItem(e){const t=document.createElement("div");t.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__item`),e.iconOnly&&t.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__item--icon-only`),(e.title||e.label)&&(t.title=e.title||e.label||""),e.disabled&&t.classList.add("disabled"),e.danger&&t.classList.add("danger"),e.active&&t.classList.add("active");const n=document.createElement("div");n.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__main`),t.appendChild(n);const i=document.createElement("div");if(i.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__meta`),t.appendChild(i),e.icon){const s=document.createElement("span");s.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__icon`),s.innerHTML=e.icon,n.appendChild(s)}if(e.label&&!e.iconOnly){const s=document.createElement("span");s.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__label`),s.textContent=e.label,n.appendChild(s)}if(e.inputType==="number"){const s=document.createElement("input");if(s.type="number",s.min=String(e.inputMin??1),s.max=String(e.inputMax??100),s.step=String(e.inputStep??1),s.value=String(e.inputDefault||1),s.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__input-number`),s.addEventListener("click",o=>o.stopPropagation()),s.addEventListener("mousedown",o=>o.stopPropagation()),i.appendChild(s),e.unit){const o=document.createElement("span");o.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__unit`),o.textContent=e.unit,i.appendChild(o)}e.inputAction&&t.addEventListener("click",o=>{const a=Number.parseFloat(s.value);o.stopPropagation(),e.inputAction(Number.isFinite(a)?a:e.inputDefault||1),this.close()})}else{if(e.previewColor){const s=document.createElement("span");s.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__color-preview`),s.style.backgroundColor=e.previewColor,i.appendChild(s)}if(e.shortcut){const s=document.createElement("span");s.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__shortcut`),s.textContent=e.shortcut,i.appendChild(s)}if(e.children&&e.children.length>0){const s=document.createElement("span");s.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__arrow`),s.textContent=">",i.appendChild(s),t.addEventListener("mouseenter",o=>{this._hideSubMenuTimer&&(clearTimeout(this._hideSubMenuTimer),this._hideSubMenuTimer=null),this._showSubMenu(o.currentTarget,e.children,e.childrenLayout||"default")}),t.addEventListener("mouseleave",()=>{this._delayHideSubMenu()})}e.action&&!e.disabled&&t.addEventListener("click",s=>{s.stopPropagation(),e.action(t),e.closeOnClick!==!1&&this.close()})}return t}_showSubMenu(e,t,n="default"){this._hideSubMenu();const i=document.createElement("div");i.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu`),i.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu--sub`),n==="icon-grid"&&i.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu--icon-grid`),t.forEach(f=>{if(f.divider){const m=document.createElement("div");m.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__divider`),i.appendChild(m)}else{const m=this._createMenuItem(f);i.appendChild(m)}});const s=e.getBoundingClientRect(),o=5;let a=s.right+o,l=s.top;document.body.appendChild(i);const h=i.getBoundingClientRect();a+h.width>window.innerWidth&&(a=s.left-h.width-o),l+h.height>window.innerHeight&&(l=window.innerHeight-h.height-10),i.style.left=`${a}px`,i.style.top=`${l}px`,i.addEventListener("mouseenter",()=>{this._hideSubMenuTimer&&(clearTimeout(this._hideSubMenuTimer),this._hideSubMenuTimer=null)}),i.addEventListener("mouseleave",()=>{this._delayHideSubMenu()}),this.subMenuElement=i}_delayHideSubMenu(){this._hideSubMenuTimer&&clearTimeout(this._hideSubMenuTimer),this._hideSubMenuTimer=window.setTimeout(()=>{this._hideSubMenu(),this._hideSubMenuTimer=null},150)}_hideSubMenu(){this._hideSubMenuTimer&&(clearTimeout(this._hideSubMenuTimer),this._hideSubMenuTimer=null),this.subMenuElement&&(this.subMenuElement.remove(),this.subMenuElement=null)}_bindGlobalEvents(){const e=i=>{var a,l,h;const s=i.target;!!((a=this.menuElement)!=null&&a.contains(s))||!!((l=this.subMenuElement)!=null&&l.contains(s))||!!((h=this.activeColorPanel)!=null&&h.contains(s))||this.close()},t=i=>{i.key==="Escape"&&this.close()},n=()=>{this.close()};document.addEventListener("click",e),document.addEventListener("keydown",t),window.addEventListener("scroll",n,!0),window.addEventListener("resize",n),this._removeContextmenuHandler=()=>{document.removeEventListener("click",e),document.removeEventListener("keydown",t),window.removeEventListener("scroll",n,!0),window.removeEventListener("resize",n)}}_repeatAction(e,t){const n=Math.max(1,Math.floor(e));for(let i=0;i<n;i++)t()}_getCurrentTd(e){var n,i;const t=this.draw.getPosition().getPositionContext();return!t.isTable||t.trIndex===void 0||t.tdIndex===void 0?null:((i=(n=e.trList)==null?void 0:n[t.trIndex])==null?void 0:i.tdList[t.tdIndex])||null}_canCancelMerge(e){return e?e.rowspan>1||e.colspan>1:!1}_getDefaultBorderColor(){return this.draw.getOptions().table.defaultBorderColor}_deleteTable(){this.draw.getTableOperate().deleteTable()}_deleteRow(){this.draw.getTableOperate().deleteTableRow()}_deleteColumn(){this.draw.getTableOperate().deleteTableCol()}_selectAllTable(){this.draw.getTableOperate().tableSelectAll()}_setBorderType(e){this.draw.getTableOperate().tableBorderType(e)}_setBorderWidth(e){this.draw.getTableOperate().tableBorderWidth(e)}_setBorderExternalWidth(e){this.draw.getTableOperate().tableBorderExternalWidth(e)}_isCellAlignActive(e,t,n){const i=(e==null?void 0:e.verticalAlign)||ce.VerticalAlign.TOP,s=this._getTdRowFlex(e);return i===t&&s===n}_getTdRowFlex(e){var n;return((n=e==null?void 0:e.value.find(i=>i.rowFlex))==null?void 0:n.rowFlex)||ce.RowFlex.LEFT}_getSelectedTds(){const e=this.draw.getTableParticle().getRangeRowCol();if(!e)return[];const t=[],n=new Set;for(let i=0;i<e.length;i++){const s=e[i];for(let o=0;o<s.length;o++){const a=s[o];if(!a)continue;const l=a.id||`${a.rowIndex}-${a.colIndex}-${a.trIndex}-${a.tdIndex}`;n.has(l)||(n.add(l),t.push(a))}}return t}_setCellAlign(e,t){const n=this._getSelectedTds();if(!n.length)return;let i=!1;for(let o=0;o<n.length;o++){const a=n[o];(a.verticalAlign||ce.VerticalAlign.TOP)!==e&&(a.verticalAlign=e,i=!0);for(let h=0;h<a.value.length;h++){const f=a.value[h];(f.rowFlex||ce.RowFlex.LEFT)!==t&&(t===ce.RowFlex.LEFT?delete f.rowFlex:f.rowFlex=t,i=!0)}}if(!i)return;const{endIndex:s}=this.draw.getRange().getRange();this.draw.render({curIndex:s})}_toggleTdBorderType(e){this.draw.getTableOperate().tableTdBorderType(e)}_toggleTdSlashType(e){this.draw.getTableOperate().tableTdSlashType(e)}_mergeTableCell(){this.draw.getTableOperate().mergeTableCell()}_cancelMergeTableCell(){this.draw.getTableOperate().cancelMergeTableCell()}_splitVerticalTableCell(){this.draw.getTableOperate().splitVerticalTableCell()}_splitHorizontalTableCell(){this.draw.getTableOperate().splitHorizontalTableCell()}_showBorderColorPicker(e,t){this._showColorPanel(e,t,n=>{this.draw.getTableOperate().tableBorderColor(n)})}_showBackgroundColorPicker(e,t){this._showColorPanel(e,t,n=>{this.draw.getTableOperate().tableTdBackgroundColor(n)})}_showColorPanel(e,t,n){this._destroyActiveColorPanel();const i=this._normalizeColorValue(e),s=document.createElement("div");s.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__color-panel`);const o=document.createElement("div");o.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__picker-host`),s.appendChild(o),document.body.appendChild(s),this.activeColorPanel=s,this._positionColorPanel(s,t);const a=new ka({parent:o,popup:!1,color:i,editor:!0,editorFormat:"hex",cancelButton:!1,onChange:h=>{n(h.hex)},onDone:()=>{this.close()},onClose:()=>{this.close()}});this.activePicker=a;const l=o.querySelector(".picker_done button");l&&(l.textContent="确认")}_destroyActiveColorPanel(){if(this.activePicker){const e=this.activePicker;this.activePicker=null,e.destroy()}this.activeColorPanel&&(this.activeColorPanel.remove(),this.activeColorPanel=null)}_positionColorPanel(e,t){const n=t||this.subMenuElement||this.menuElement;if(!n)return;const i=8,s=8,o=n.getBoundingClientRect(),a=e.getBoundingClientRect();let l=o.right+i,h=o.top;l+a.width>window.innerWidth-s&&(l=o.left-a.width-i),l<s&&(l=Math.max(s,window.innerWidth-a.width-s)),h+a.height>window.innerHeight-s&&(h=window.innerHeight-a.height-s),h<s&&(h=s),e.style.left=`${l}px`,e.style.top=`${h}px`}_normalizeColorValue(e,t=!0){const n=e.trim(),i=n.startsWith("#")?n:`#${n}`;return/^#[0-9a-fA-F]{6}$/.test(i)?i:t?"#000000":""}}class Ef{constructor(){Se(this,"_contextMenu")}install(e){return this._contextMenu=new Tf(e),e.__tableContextMenu=this._contextMenu,this}getContextMenu(){return this._contextMenu}}function Sf(r,e){return r===1125&&e===1593?{size:"a3",width:"297mm",height:"420mm"}:r===794&&e===1123?{size:"a4",width:"210mm",height:"297mm"}:r===565&&e===796?{size:"a5",width:"148mm",height:"210mm"}:{size:"",width:`${r}px`,height:`${e}px`}}function xf(r,e){const{width:t,height:n,direction:i=ce.PaperDirection.VERTICAL}=e,s=document.createElement("iframe");s.style.visibility="hidden",s.style.position="absolute",s.style.left="0",s.style.top="0",s.style.width="0",s.style.height="0",s.style.border="none",document.body.append(s);const o=s.contentWindow,a=o.document;a.open();const l=document.createElement("div"),h=Sf(t,n);r.forEach(v=>{const y=document.createElement("img");y.style.width=i===ce.PaperDirection.HORIZONTAL?h.height:h.width,y.style.height=i===ce.PaperDirection.HORIZONTAL?h.width:h.height,y.src=v,l.append(y)});const f=document.createElement("style"),m=`
|
|
88
|
+
`)};class Af{constructor(e){Ee(this,"draw");Ee(this,"menuElement",null);Ee(this,"_removeContextmenuHandler",null);Ee(this,"subMenuElement",null);Ee(this,"_hideSubMenuTimer",null);Ee(this,"activeColorPanel",null);Ee(this,"activePicker",null);this.draw=e}show(e,t,n){this.close();const i=this._buildMenuItems(n);this.menuElement=this._createMenuElement(i,e,t),document.body.appendChild(this.menuElement),this._bindGlobalEvents()}close(){this._destroyActiveColorPanel(),this.menuElement&&(this.menuElement.remove(),this.menuElement=null),this.subMenuElement&&(this.subMenuElement.remove(),this.subMenuElement=null),this._removeContextmenuHandler&&(this._removeContextmenuHandler(),this._removeContextmenuHandler=null)}_buildMenuItems(e){const t=this._getCurrentTd(e),n=e.borderColor||this._getDefaultBorderColor(),i=Number(e.borderWidth??.5),s=Number(e.borderExternalWidth??0),o=(t==null?void 0:t.backgroundColor)||"#ffffff",a=!!this.draw.getRange().getRange().isCrossRowCol,l=this._canCancelMerge(t);return[{label:"表格边框",icon:Te.tableBorder,children:[{label:"全部边框",icon:Te.borderAll,active:(e.borderType||ce.TableBorder.ALL)===ce.TableBorder.ALL,action:()=>this._setBorderType(ce.TableBorder.ALL)},{label:"外侧边框",icon:Te.borderExternal,active:e.borderType===ce.TableBorder.EXTERNAL,action:()=>this._setBorderType(ce.TableBorder.EXTERNAL)},{label:"内部边框",icon:Te.borderInternal,active:e.borderType===ce.TableBorder.INTERNAL,action:()=>this._setBorderType(ce.TableBorder.INTERNAL)},{label:"虚线边框",icon:Te.borderDash,active:e.borderType===ce.TableBorder.DASH,action:()=>this._setBorderType(ce.TableBorder.DASH)},{label:"无边框",icon:Te.borderNone,active:e.borderType===ce.TableBorder.EMPTY,action:()=>this._setBorderType(ce.TableBorder.EMPTY)},{divider:!0},{label:"边框颜色",icon:Te.borderColor,previewColor:n,closeOnClick:!1,action:c=>this._showBorderColorPicker(n,c)},{label:"边框宽度",icon:Te.borderWidth,inputType:"number",inputDefault:i,inputMin:0,inputMax:12,inputStep:.5,inputAction:c=>this._setBorderWidth(c)},{label:"外边框宽度",icon:Te.borderExternal,inputType:"number",inputDefault:s,inputMin:0,inputMax:12,inputStep:.5,inputAction:c=>this._setBorderExternalWidth(c)}]},{label:"单元格对齐方式",icon:Te.cellAlign,childrenLayout:"icon-grid",children:[{title:"左上对齐",icon:Te.alignTopLeft,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.TOP,ce.RowFlex.LEFT),action:()=>this._setCellAlign(ce.VerticalAlign.TOP,ce.RowFlex.LEFT)},{title:"中上对齐",icon:Te.alignTopCenter,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.TOP,ce.RowFlex.CENTER),action:()=>this._setCellAlign(ce.VerticalAlign.TOP,ce.RowFlex.CENTER)},{title:"右上对齐",icon:Te.alignTopRight,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.TOP,ce.RowFlex.RIGHT),action:()=>this._setCellAlign(ce.VerticalAlign.TOP,ce.RowFlex.RIGHT)},{title:"左中对齐",icon:Te.alignMiddleLeft,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.MIDDLE,ce.RowFlex.LEFT),action:()=>this._setCellAlign(ce.VerticalAlign.MIDDLE,ce.RowFlex.LEFT)},{title:"居中对齐",icon:Te.alignMiddleCenter,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.MIDDLE,ce.RowFlex.CENTER),action:()=>this._setCellAlign(ce.VerticalAlign.MIDDLE,ce.RowFlex.CENTER)},{title:"右中对齐",icon:Te.alignMiddleRight,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.MIDDLE,ce.RowFlex.RIGHT),action:()=>this._setCellAlign(ce.VerticalAlign.MIDDLE,ce.RowFlex.RIGHT)},{title:"左下对齐",icon:Te.alignBottomLeft,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.BOTTOM,ce.RowFlex.LEFT),action:()=>this._setCellAlign(ce.VerticalAlign.BOTTOM,ce.RowFlex.LEFT)},{title:"中下对齐",icon:Te.alignBottomCenter,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.BOTTOM,ce.RowFlex.CENTER),action:()=>this._setCellAlign(ce.VerticalAlign.BOTTOM,ce.RowFlex.CENTER)},{title:"右下对齐",icon:Te.alignBottomRight,iconOnly:!0,active:this._isCellAlignActive(t,ce.VerticalAlign.BOTTOM,ce.RowFlex.RIGHT),action:()=>this._setCellAlign(ce.VerticalAlign.BOTTOM,ce.RowFlex.RIGHT)}]},{label:"插入行列",icon:Te.insert,children:[{label:"在左侧插入",icon:Te.insertColLeft,inputType:"number",inputDefault:1,inputMin:1,inputMax:100,inputStep:1,inputAction:c=>this._repeatAction(c,()=>{this.draw.getTableOperate().insertTableLeftCol()}),unit:"列"},{label:"在右侧插入",icon:Te.insertColRight,inputType:"number",inputDefault:1,inputMin:1,inputMax:100,inputStep:1,inputAction:c=>this._repeatAction(c,()=>{this.draw.getTableOperate().insertTableRightCol()}),unit:"列"},{label:"在上方插入",icon:Te.insertRowAbove,inputType:"number",inputDefault:1,inputMin:1,inputMax:100,inputStep:1,inputAction:c=>this._repeatAction(c,()=>{this.draw.getTableOperate().insertTableTopRow()}),unit:"行"},{label:"在下方插入",icon:Te.insertRowBelow,inputType:"number",inputDefault:1,inputMin:1,inputMax:100,inputStep:1,inputAction:c=>this._repeatAction(c,()=>{this.draw.getTableOperate().insertTableBottomRow()}),unit:"行"}]},{label:"删除行列",icon:Te.delete,children:[{label:"删除当前行",icon:Te.deleteRow,action:()=>this._deleteRow()},{label:"删除当前列",icon:Te.deleteRow,action:()=>this._deleteColumn()},{label:"删除表格",icon:Te.deleteTable,danger:!0,action:()=>this._deleteTable()}]},{label:"取消合并",icon:Te.cancelMerge,disabled:!l,action:()=>this._cancelMergeTableCell()},{divider:!0},{label:"合并单元格",icon:Te.merge,disabled:!a,action:()=>this._mergeTableCell()},{label:"拆分单元格",icon:Te.split,children:[{label:"左右拆分",icon:Te.split,action:()=>this._splitVerticalTableCell()},{label:"上下拆分",icon:Te.split,action:()=>this._splitHorizontalTableCell()}]},{label:"单元格边框",icon:Te.cellBorder,children:[{label:"上边框",icon:Te.cellBorder,action:()=>this._toggleTdBorderType(ce.TdBorder.TOP)},{label:"右边框",icon:Te.cellBorder,action:()=>this._toggleTdBorderType(ce.TdBorder.RIGHT)},{label:"下边框",icon:Te.cellBorder,action:()=>this._toggleTdBorderType(ce.TdBorder.BOTTOM)},{label:"左边框",icon:Te.cellBorder,action:()=>this._toggleTdBorderType(ce.TdBorder.LEFT)}]},{label:"斜线样式",icon:Te.slash,children:[{label:"正斜线",icon:Te.slash,action:()=>this._toggleTdSlashType(ce.TdSlash.FORWARD)},{label:"反斜线",icon:Te.slash,action:()=>this._toggleTdSlashType(ce.TdSlash.BACK)}]},{label:"单元格底纹",icon:Te.backgroundColor,previewColor:o,closeOnClick:!1,action:c=>this._showBackgroundColorPicker(o,c)},{divider:!0},{label:"全选表格",icon:Te.selectAll,action:()=>this._selectAllTable()}]}_createMenuElement(e,t,n){const i=document.createElement("div");i.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu`),e.forEach(l=>{if(l.divider){const c=document.createElement("div");c.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__divider`),i.appendChild(c)}else{const c=this._createMenuItem(l);i.appendChild(c)}}),i.style.left=`${t}px`,i.style.top=`${n}px`;const s=i.getBoundingClientRect(),o=window.innerWidth,a=window.innerHeight;return t+s.width>o&&(i.style.left=`${o-s.width-10}px`),n+s.height>a&&(i.style.top=`${a-s.height-10}px`),i}_createMenuItem(e){const t=document.createElement("div");t.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__item`),e.iconOnly&&t.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__item--icon-only`),(e.title||e.label)&&(t.title=e.title||e.label||""),e.disabled&&t.classList.add("disabled"),e.danger&&t.classList.add("danger"),e.active&&t.classList.add("active");const n=document.createElement("div");n.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__main`),t.appendChild(n);const i=document.createElement("div");if(i.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__meta`),t.appendChild(i),e.icon){const s=document.createElement("span");s.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__icon`),s.innerHTML=e.icon,n.appendChild(s)}if(e.label&&!e.iconOnly){const s=document.createElement("span");s.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__label`),s.textContent=e.label,n.appendChild(s)}if(e.inputType==="number"){const s=document.createElement("input");if(s.type="number",s.min=String(e.inputMin??1),s.max=String(e.inputMax??100),s.step=String(e.inputStep??1),s.value=String(e.inputDefault||1),s.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__input-number`),s.addEventListener("click",o=>o.stopPropagation()),s.addEventListener("mousedown",o=>o.stopPropagation()),i.appendChild(s),e.unit){const o=document.createElement("span");o.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__unit`),o.textContent=e.unit,i.appendChild(o)}e.inputAction&&t.addEventListener("click",o=>{const a=Number.parseFloat(s.value);o.stopPropagation(),e.inputAction(Number.isFinite(a)?a:e.inputDefault||1),this.close()})}else{if(e.previewColor){const s=document.createElement("span");s.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__color-preview`),s.style.backgroundColor=e.previewColor,i.appendChild(s)}if(e.shortcut){const s=document.createElement("span");s.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__shortcut`),s.textContent=e.shortcut,i.appendChild(s)}if(e.children&&e.children.length>0){const s=document.createElement("span");s.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__arrow`),s.textContent=">",i.appendChild(s),t.addEventListener("mouseenter",o=>{this._hideSubMenuTimer&&(clearTimeout(this._hideSubMenuTimer),this._hideSubMenuTimer=null),this._showSubMenu(o.currentTarget,e.children,e.childrenLayout||"default")}),t.addEventListener("mouseleave",()=>{this._delayHideSubMenu()})}e.action&&!e.disabled&&t.addEventListener("click",s=>{s.stopPropagation(),e.action(t),e.closeOnClick!==!1&&this.close()})}return t}_showSubMenu(e,t,n="default"){this._hideSubMenu();const i=document.createElement("div");i.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu`),i.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu--sub`),n==="icon-grid"&&i.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu--icon-grid`),t.forEach(f=>{if(f.divider){const m=document.createElement("div");m.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__divider`),i.appendChild(m)}else{const m=this._createMenuItem(f);i.appendChild(m)}});const s=e.getBoundingClientRect(),o=5;let a=s.right+o,l=s.top;document.body.appendChild(i);const c=i.getBoundingClientRect();a+c.width>window.innerWidth&&(a=s.left-c.width-o),l+c.height>window.innerHeight&&(l=window.innerHeight-c.height-10),i.style.left=`${a}px`,i.style.top=`${l}px`,i.addEventListener("mouseenter",()=>{this._hideSubMenuTimer&&(clearTimeout(this._hideSubMenuTimer),this._hideSubMenuTimer=null)}),i.addEventListener("mouseleave",()=>{this._delayHideSubMenu()}),this.subMenuElement=i}_delayHideSubMenu(){this._hideSubMenuTimer&&clearTimeout(this._hideSubMenuTimer),this._hideSubMenuTimer=window.setTimeout(()=>{this._hideSubMenu(),this._hideSubMenuTimer=null},150)}_hideSubMenu(){this._hideSubMenuTimer&&(clearTimeout(this._hideSubMenuTimer),this._hideSubMenuTimer=null),this.subMenuElement&&(this.subMenuElement.remove(),this.subMenuElement=null)}_bindGlobalEvents(){const e=i=>{var a,l,c;const s=i.target;!!((a=this.menuElement)!=null&&a.contains(s))||!!((l=this.subMenuElement)!=null&&l.contains(s))||!!((c=this.activeColorPanel)!=null&&c.contains(s))||this.close()},t=i=>{i.key==="Escape"&&this.close()},n=()=>{this.close()};document.addEventListener("click",e),document.addEventListener("keydown",t),window.addEventListener("scroll",n,!0),window.addEventListener("resize",n),this._removeContextmenuHandler=()=>{document.removeEventListener("click",e),document.removeEventListener("keydown",t),window.removeEventListener("scroll",n,!0),window.removeEventListener("resize",n)}}_repeatAction(e,t){const n=Math.max(1,Math.floor(e));for(let i=0;i<n;i++)t()}_getCurrentTd(e){var n,i;const t=this.draw.getPosition().getPositionContext();return!t.isTable||t.trIndex===void 0||t.tdIndex===void 0?null:((i=(n=e.trList)==null?void 0:n[t.trIndex])==null?void 0:i.tdList[t.tdIndex])||null}_canCancelMerge(e){return e?e.rowspan>1||e.colspan>1:!1}_getDefaultBorderColor(){return this.draw.getOptions().table.defaultBorderColor}_deleteTable(){this.draw.getTableOperate().deleteTable()}_deleteRow(){this.draw.getTableOperate().deleteTableRow()}_deleteColumn(){this.draw.getTableOperate().deleteTableCol()}_selectAllTable(){this.draw.getTableOperate().tableSelectAll()}_setBorderType(e){this.draw.getTableOperate().tableBorderType(e)}_setBorderWidth(e){this.draw.getTableOperate().tableBorderWidth(e)}_setBorderExternalWidth(e){this.draw.getTableOperate().tableBorderExternalWidth(e)}_isCellAlignActive(e,t,n){const i=(e==null?void 0:e.verticalAlign)||ce.VerticalAlign.TOP,s=this._getTdRowFlex(e);return i===t&&s===n}_getTdRowFlex(e){var n;return((n=e==null?void 0:e.value.find(i=>i.rowFlex))==null?void 0:n.rowFlex)||ce.RowFlex.LEFT}_getSelectedTds(){const e=this.draw.getTableParticle().getRangeRowCol();if(!e)return[];const t=[],n=new Set;for(let i=0;i<e.length;i++){const s=e[i];for(let o=0;o<s.length;o++){const a=s[o];if(!a)continue;const l=a.id||`${a.rowIndex}-${a.colIndex}-${a.trIndex}-${a.tdIndex}`;n.has(l)||(n.add(l),t.push(a))}}return t}_setCellAlign(e,t){const n=this._getSelectedTds();if(!n.length)return;let i=!1;for(let o=0;o<n.length;o++){const a=n[o];(a.verticalAlign||ce.VerticalAlign.TOP)!==e&&(a.verticalAlign=e,i=!0);for(let c=0;c<a.value.length;c++){const f=a.value[c];(f.rowFlex||ce.RowFlex.LEFT)!==t&&(t===ce.RowFlex.LEFT?delete f.rowFlex:f.rowFlex=t,i=!0)}}if(!i)return;const{endIndex:s}=this.draw.getRange().getRange();this.draw.render({curIndex:s})}_toggleTdBorderType(e){this.draw.getTableOperate().tableTdBorderType(e)}_toggleTdSlashType(e){this.draw.getTableOperate().tableTdSlashType(e)}_mergeTableCell(){this.draw.getTableOperate().mergeTableCell()}_cancelMergeTableCell(){this.draw.getTableOperate().cancelMergeTableCell()}_splitVerticalTableCell(){this.draw.getTableOperate().splitVerticalTableCell()}_splitHorizontalTableCell(){this.draw.getTableOperate().splitHorizontalTableCell()}_showBorderColorPicker(e,t){this._showColorPanel(e,t,n=>{this.draw.getTableOperate().tableBorderColor(n)})}_showBackgroundColorPicker(e,t){this._showColorPanel(e,t,n=>{this.draw.getTableOperate().tableTdBackgroundColor(n)})}_showColorPanel(e,t,n){this._destroyActiveColorPanel();const i=this._normalizeColorValue(e),s=document.createElement("div");s.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__color-panel`);const o=document.createElement("div");o.classList.add(`${ce.EDITOR_PREFIX}-table-context-menu__picker-host`),s.appendChild(o),document.body.appendChild(s),this.activeColorPanel=s,this._positionColorPanel(s,t);const a=new Ra({parent:o,popup:!1,color:i,editor:!0,editorFormat:"hex",cancelButton:!1,onChange:c=>{n(c.hex)},onDone:()=>{this.close()},onClose:()=>{this.close()}});this.activePicker=a;const l=o.querySelector(".picker_done button");l&&(l.textContent="确认")}_destroyActiveColorPanel(){if(this.activePicker){const e=this.activePicker;this.activePicker=null,e.destroy()}this.activeColorPanel&&(this.activeColorPanel.remove(),this.activeColorPanel=null)}_positionColorPanel(e,t){const n=t||this.subMenuElement||this.menuElement;if(!n)return;const i=8,s=8,o=n.getBoundingClientRect(),a=e.getBoundingClientRect();let l=o.right+i,c=o.top;l+a.width>window.innerWidth-s&&(l=o.left-a.width-i),l<s&&(l=Math.max(s,window.innerWidth-a.width-s)),c+a.height>window.innerHeight-s&&(c=window.innerHeight-a.height-s),c<s&&(c=s),e.style.left=`${l}px`,e.style.top=`${c}px`}_normalizeColorValue(e,t=!0){const n=e.trim(),i=n.startsWith("#")?n:`#${n}`;return/^#[0-9a-fA-F]{6}$/.test(i)?i:t?"#000000":""}}class Sf{constructor(){Ee(this,"_contextMenu")}install(e){return this._contextMenu=new Af(e),e.__tableContextMenu=this._contextMenu,this}getContextMenu(){return this._contextMenu}}function xf(r,e){return r===1125&&e===1593?{size:"a3",width:"297mm",height:"420mm"}:r===794&&e===1123?{size:"a4",width:"210mm",height:"297mm"}:r===565&&e===796?{size:"a5",width:"148mm",height:"210mm"}:{size:"",width:`${r}px`,height:`${e}px`}}function kf(r,e){const{width:t,height:n,direction:i=ce.PaperDirection.VERTICAL}=e,s=document.createElement("iframe");s.style.visibility="hidden",s.style.position="absolute",s.style.left="0",s.style.top="0",s.style.width="0",s.style.height="0",s.style.border="none",document.body.append(s);const o=s.contentWindow,a=o.document;a.open();const l=document.createElement("div"),c=xf(t,n);r.forEach(v=>{const y=document.createElement("img");y.style.width=i===ce.PaperDirection.HORIZONTAL?c.height:c.width,y.style.height=i===ce.PaperDirection.HORIZONTAL?c.width:c.height,y.src=v,l.append(y)});const f=document.createElement("style"),m=`
|
|
89
89
|
* {
|
|
90
90
|
margin: 0;
|
|
91
91
|
padding: 0;
|
|
92
92
|
}
|
|
93
93
|
@page {
|
|
94
94
|
margin: 0;
|
|
95
|
-
size: ${
|
|
95
|
+
size: ${c.size} ${i===ce.PaperDirection.HORIZONTAL?"landscape":"portrait"};
|
|
96
96
|
}
|
|
97
97
|
/* 隐藏浏览器默认的页眉页脚 */
|
|
98
98
|
@media print {
|
|
@@ -104,32 +104,32 @@
|
|
|
104
104
|
padding: 0;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
`;f.append(document.createTextNode(m)),setTimeout(()=>{a.write(`${f.outerHTML}${l.innerHTML}`),o.print(),a.close(),window.addEventListener("mouseover",()=>{s==null||s.remove()},{once:!0})})}class Ra{constructor(e,t,n={}){Se(this,"command");Se(this,"listener");Se(this,"eventBus");Se(this,"override");Se(this,"register");Se(this,"comment");Se(this,"revision");Se(this,"destroy");Se(this,"use");var d;const i=ce.mergeOption(n);t=ce.deepClone(t);let s=[],o=[],a=[];Array.isArray(t)?o=t:(s=t.header||[],o=t.main,a=t.footer||[]),[s,o,a].forEach(T=>{ce.formatElementList(T,{editorOptions:i,isForceCompensation:!0})}),this.listener=new Qt.Listener,this.eventBus=new Qt.EventBus,this.override=new ve.Override;const h=new ve.Draw(e,i,{header:s,main:o,footer:a},this.listener,this.eventBus,this.override);h.setBlockParticle(new Fe.BlockParticle(h)),new fn.HistoryComponent().install(h),new Fe.ControlComponent().install(h);const f=new Ta().install(h),m=new qe.CommandAdapt(h,{pasteByApi:ve.pasteByApi,printImageBase64:xf});this.command=new qe.Command(m),h.__structureAdapter=m._structure,new Fe.GadgetComponent().install(h,this.command),new Sa().install(h,this.command),new Ef().install(h),this.comment=new Sr.CommentComponent().install(this.command),this.revision=new Sr.RevisionComponent;const v=new dn.KeymapComponent().install(h,this.command),b=((d=i.floatingBar)==null?void 0:d.enabled)!==!1?new ve.FloatingBar(h,this.command):null,g=v.getShortcut();this.register=new ve.Register({shortcut:g,i18n:h.getI18n()}),h.setRegister(this.register),this.destroy=()=>{var T;h.destroy(),g.removeEvent(),b==null||b.destroy(),(T=f.getWorkerManager())==null||T.terminate()};const _=new ve.Plugin(this);this.use=_.use.bind(_)}}class Af{install(e){return this}setLang(e,t){}}class kf{constructor(){Se(this,"_saveTimer",null);Se(this,"_saving",!1);Se(this,"_pendingSave",!1);Se(this,"_autoSaveOptions",null)}install(){return this}configureAutoSave(e){this._autoSaveOptions={interval:800,enabled:!0,...e}}async saveNow(e){var n,i;if(this._saving){this._pendingSave=!0;return}if(!this._autoSaveOptions||(i=(n=this._autoSaveOptions).isReadonly)!=null&&i.call(n))return;const t=this._autoSaveOptions.getContent();if(t){this._saving=!0,this._pendingSave=!1;try{await this._autoSaveOptions.onSave(t)}finally{this._saving=!1,this._pendingSave&&this.scheduleSave()}}}scheduleSave(){var e,t;!this._autoSaveOptions||!this._autoSaveOptions.enabled||(t=(e=this._autoSaveOptions).isReadonly)!=null&&t.call(e)||(this._saveTimer&&clearTimeout(this._saveTimer),this._saveTimer=setTimeout(()=>{this.saveNow({silent:!0})},this._autoSaveOptions.interval||800))}stopAutoSave(){this._saveTimer&&(clearTimeout(this._saveTimer),this._saveTimer=null)}isSaving(){return this._saving}destroy(){this.stopAutoSave(),this._autoSaveOptions=null}}function Rf(){const r=localStorage.getItem(ce.EDITOR_CLIPBOARD);return r?JSON.parse(r):null}function If(){localStorage.removeItem(ce.EDITOR_CLIPBOARD)}function Cf(r){let e=!1;for(let t=0;t<r.items.length;t++)if(r.items[t].kind==="file"){e=!0;break}return e}const Nf="3.0.10",Pf={preserveStyles:!0,defaultFont:"SimSun, serif",defaultSize:12,tableWidthMode:"fit",defaultTableRowHeight:32,defaultTableTdPadding:[0,4,0,4],forceDefaultLineHeight:1},G={w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",a:"http://schemas.openxmlformats.org/drawingml/2006/main",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",c:"http://schemas.openxmlformats.org/drawingml/2006/chart",v:"urn:schemas-microsoft-com:vml",pic:"http://schemas.openxmlformats.org/drawingml/2006/picture",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",rel:"http://schemas.openxmlformats.org/package/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math"};function We(r){return r/1440*96}function Lf(r){return r*(96/144)}function Ot(r){return r/9525}function Of(r){return r/8*(96/72)}const Ff={yellow:"#FFFF00",green:"#00FF00",cyan:"#00FFFF",magenta:"#FF00FF",blue:"#0000FF",red:"#FF0000",darkBlue:"#000080",darkCyan:"#008080",darkGreen:"#008000",darkMagenta:"#800080",darkRed:"#800000",darkYellow:"#808000",darkGray:"#808080",lightGray:"#C0C0C0",black:"#000000",white:"#FFFFFF"},Df={宋体:"SimSun","Song Ti":"SimSun",新宋体:"NSimSun",黑体:"SimHei","Hei Ti":"SimHei",楷体:"KaiTi",楷体_GB2312:"KaiTi","Kai Ti":"KaiTi",仿宋:"FangSong",仿宋_GB2312:"FangSong","Fang Song":"FangSong",微软雅黑:"Microsoft YaHei","Microsoft YaHei":"Microsoft YaHei",等线:"DengXian","等线 Light":"DengXian Light","等线 Regular":"DengXian",幼圆:"YouYuan",华文细黑:"STXihei",华文宋体:"STSong",华文仿宋:"STFangsong",华文楷体:"STKaiti",华文中宋:"STZhongsong",华文琥珀:"STHupo",华文新魏:"STXinwei",华文彩云:"STCaiyun",华文行楷:"STXingkai",华文隶书:"STLiti",方正舒体:"FZShuTi",方正姚体:"FZYaoti","Times New Roman":"Times New Roman",Calibri:"Calibri","Calibri Light":"Calibri Light",Arial:"Arial","Arial Narrow":"Arial Narrow",Verdana:"Verdana",Tahoma:"Tahoma","Courier New":"Courier New",Georgia:"Georgia","Comic Sans MS":"Comic Sans MS",Impact:"Impact","Trebuchet MS":"Trebuchet MS","Palatino Linotype":"Palatino Linotype",Garamond:"Garamond",Century:"Century",Cambria:"Cambria","Cambria Math":"Cambria Math",Consolas:"Consolas","Franklin Gothic Medium":"Franklin Gothic Medium"};function kr(r){if(r)return Df[r]??r}const Bf={bullet:{listType:"ul",listStyle:"disc"},decimal:{listType:"ol",listStyle:"decimal"},lowerLetter:{listType:"ol",listStyle:"lower-alpha"},upperLetter:{listType:"ol",listStyle:"upper-alpha"},lowerRoman:{listType:"ol",listStyle:"lower-roman"},upperRoman:{listType:"ol",listStyle:"upper-roman"},chineseCounting:{listType:"ol",listStyle:"cjk-ideographic"},chineseCountingThousand:{listType:"ol",listStyle:"cjk-ideographic"},ideographTraditional:{listType:"ol",listStyle:"cjk-ideographic"},japaneseCounting:{listType:"ol",listStyle:"decimal"},ordinal:{listType:"ol",listStyle:"decimal"},cardinalText:{listType:"ol",listStyle:"decimal"},none:{listType:"ul",listStyle:"none"}},Mf={left:"left",center:"center",right:"right",both:"justify",justify:"justify",distribute:"justify",numTab:"left",highKashida:"left",lowKashida:"left",thaiDistribute:"justify"},Uf={none:0,nil:0,single:1,thick:1,double:2,dotted:3,dashed:4,dashSmallGap:4,dotDash:5,dotDotDash:6,triple:7,wave:8,thinThickSmallGap:1,thickThinSmallGap:1,thinThickThinSmallGap:1},Rr={background1:"lt1",background2:"lt2",text1:"dk1",text2:"dk2",light1:"lt1",light2:"lt2",dark1:"dk1",dark2:"dk2"};function kt(r){return new DOMParser().parseFromString(r,"application/xml")}function Ir(r,e,t){const n=[];for(let i=0;i<r.childNodes.length;i++){const s=r.childNodes[i];s.nodeType===1&&s.localName===t&&s.namespaceURI===e&&n.push(s)}return n}function fe(r,e,t){for(let n=0;n<r.childNodes.length;n++){const i=r.childNodes[n];if(i.nodeType===1&&i.localName===t&&i.namespaceURI===e)return i}return null}function xe(r){return r&&(r.getAttributeNS(G.w,"val")||r.getAttribute("w:val"))||null}function Ne(r,e){for(let t=0;t<r.childNodes.length;t++){const n=r.childNodes[t];n.nodeType===1&&e(n)}}function _n(r,e,t){return fe(r,e,t)!==null}function Wf(r){const e={colors:new Map,majorFont:null,minorFont:null};if(!r)return e;const n=kt(r).documentElement;return Hf(n,e),Gf(n,e),e}function Hf(r,e){const t=r.getElementsByTagNameNS(G.a,"clrScheme");if(t.length===0)return;const n=t[0];Ne(n,i=>{const s=i.localName,o=fe(i,G.a,"srgbClr");if(o){const l=o.getAttribute("val");if(l){e.colors.set(s,l.toUpperCase());return}}const a=fe(i,G.a,"sysClr");if(a){const l=a.getAttribute("lastClr");l&&e.colors.set(s,l.toUpperCase())}})}function Gf(r,e){const t=r.getElementsByTagNameNS(G.a,"fontScheme");if(t.length===0)return;const n=t[0],i=fe(n,G.a,"majorFont");i&&(e.majorFont=Ia(i));const s=fe(n,G.a,"minorFont");s&&(e.minorFont=Ia(s))}function Ia(r){const e=fe(r,G.a,"ea");if(e){const n=e.getAttribute("typeface");if(n&&n!=="")return n}const t=fe(r,G.a,"latin");if(t){const n=t.getAttribute("typeface");if(n&&n!=="")return n}return null}function Cr(r,e,t,n){const i=Rr[e]??e,s=r.colors.get(i);if(!s)return null;if(!t&&!n)return`#${s}`;const o=parseInt(s.substring(0,2),16)/255,a=parseInt(s.substring(2,4),16)/255,l=parseInt(s.substring(4,6),16)/255,[h,f,m]=jf(o,a,l);let v=m;if(t){const _=parseInt(t,16)/255;v=m+(1-m)*_}if(n){const _=parseInt(n,16)/255;v=m*_}v=Math.min(1,Math.max(0,v));const[y,b,g]=Zf(h,f,v);return`#${En(y)}${En(b)}${En(g)}`.toUpperCase()}function Vf(r,e){if(!e)return null;const t=e.toLowerCase();return t.startsWith("major")?r.majorFont:t.startsWith("minor")?r.minorFont:null}function jf(r,e,t){const n=Math.max(r,e,t),i=Math.min(r,e,t),s=n-i;let o=0,a=0;const l=(n+i)/2;return s!==0&&(a=l>.5?s/(2-n-i):s/(n+i),n===r?o=((e-t)/s+(e<t?6:0))/6:n===e?o=((t-r)/s+2)/6:o=((r-e)/s+4)/6),[o,a,l]}function Zf(r,e,t){if(e===0){const s=Math.round(t*255);return[s,s,s]}const n=t<.5?t*(1+e):t+e-t*e,i=2*t-n;return[Math.round(Tn(i,n,r+1/3)*255),Math.round(Tn(i,n,r)*255),Math.round(Tn(i,n,r-1/3)*255)]}function Tn(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*(2/3-t)*6:r}function En(r){return Math.min(255,Math.max(0,r)).toString(16).padStart(2,"0")}class zf{constructor(e,t){Se(this,"styleMap",new Map);Se(this,"defaultParagraphStyle",{});Se(this,"defaultRunStyle",{});Se(this,"theme");this.theme=t,e&&this.parseStylesXml(e)}parseParagraphProperties(e){const t={},n=fe(e,G.w,"jc");if(n){const l=xe(n);l&&(t.rowFlex=l)}Xf(e,t),Kf(e,t);const i=fe(e,G.w,"shd");if(i){const l=Sn(i,this.theme);t.paragraphColor=l??""}const s=fe(e,G.w,"outlineLvl");if(s){const l=xe(s);if(l!==null){const h=parseInt(l,10);h>=0&&h<=5&&(t.titleLevel=h+1)}}const o=fe(e,G.w,"numPr");if(o){const l=fe(o,G.w,"numId"),h=fe(o,G.w,"ilvl");if(l&&(t.numId=xe(l)??void 0),h){const f=xe(h);f!==null&&(t.listLevel=parseInt(f,10))}}const a=fe(e,G.w,"tabs");return a&&(t.tabStops=Yf(a)),t}parseRunProperties(e){const t={};if(_n(e,G.w,"b")){const f=fe(e,G.w,"b"),m=f?xe(f):null;t.bold=m!=="0"&&m!=="false"}if(_n(e,G.w,"i")){const f=fe(e,G.w,"i"),m=f?xe(f):null;t.italic=m!=="0"&&m!=="false"}const n=fe(e,G.w,"u");if(n){const f=xe(n);t.underline=f!=="none"&&f!=="0"}if(_n(e,G.w,"strike")){const f=fe(e,G.w,"strike"),m=f?xe(f):null;t.strikeout=m!=="0"&&m!=="false"}const i=fe(e,G.w,"sz")??fe(e,G.w,"szCs");if(i){const f=xe(i);f&&(t.size=Lf(parseInt(f,10)))}const s=fe(e,G.w,"rFonts");s&&(t.font=Jf(s,this.theme));const o=fe(e,G.w,"color");o&&(t.color=Qf(o,this.theme));const a=fe(e,G.w,"highlight");if(a){const f=xe(a);f&&f!=="none"&&(t.highlight=Ff[f]??`#${f}`)}if(!t.highlight){const f=fe(e,G.w,"shd");if(f){const m=Sn(f,this.theme);m&&(t.highlight=m)}}const l=fe(e,G.w,"spacing");if(l){const f=xe(l);if(f){const m=parseInt(f,10),v=We(m);Math.abs(v)>=.5&&(t.letterSpacing=v)}}const h=fe(e,G.w,"vertAlign");if(h){const f=xe(h);(f==="superscript"||f==="subscript")&&(t.vertAlign=f)}return t}resolveStyle(e){const t={paragraph:{...this.defaultParagraphStyle},run:{...this.defaultRunStyle}};if(!e)return t;const n=[];let i=e;const s=new Set;for(;i&&!s.has(i);){s.add(i);const o=this.styleMap.get(i);if(!o)break;n.unshift(o),i=o.basedOnId}for(const o of n)Ca(t.paragraph,o.paragraphStyle),Ca(t.run,o.runStyle);return t}getDefaultRunStyle(){return{...this.defaultRunStyle}}getDefaultParagraphStyle(){return{...this.defaultParagraphStyle}}parseStylesXml(e){const n=kt(e).documentElement,i=fe(n,G.w,"docDefaults");i&&this.parseDocDefaults(i);const s=n.getElementsByTagNameNS(G.w,"style");for(let o=0;o<s.length;o++)this.parseStyleElement(s[o])}parseDocDefaults(e){const t=fe(e,G.w,"rPrDefault");if(t){const i=fe(t,G.w,"rPr");i&&(this.defaultRunStyle=this.parseRunProperties(i))}const n=fe(e,G.w,"pPrDefault");if(n){const i=fe(n,G.w,"pPr");i&&(this.defaultParagraphStyle=this.parseParagraphProperties(i))}}parseStyleElement(e){const t=e.getAttributeNS(G.w,"styleId")??e.getAttribute("w:styleId")??e.getAttribute("styleId")??"";if(!t)return;const n=fe(e,G.w,"name"),i=xe(n)??"",s=fe(e,G.w,"basedOn"),o=xe(s);let a={},l={};const h=fe(e,G.w,"pPr");if(h&&(a=this.parseParagraphProperties(h)),a.titleLevel===void 0){const m=$f(i,t);m!==void 0&&(a.titleLevel=m)}const f=fe(e,G.w,"rPr");f&&(l=this.parseRunProperties(f)),this.styleMap.set(t,{id:t,name:i,basedOnId:o,paragraphStyle:a,runStyle:l})}}function Xf(r,e){const t=fe(r,G.w,"spacing");if(!t)return;const n=t.getAttributeNS(G.w,"before")??t.getAttribute("w:before"),i=t.getAttributeNS(G.w,"after")??t.getAttribute("w:after"),s=t.getAttributeNS(G.w,"line")??t.getAttribute("w:line"),o=t.getAttributeNS(G.w,"lineRule")??t.getAttribute("w:lineRule");if(n&&(e.spacingBefore=We(parseInt(n,10))),i&&(e.spacingAfter=We(parseInt(i,10))),s){const a=parseInt(s,10);!o||o==="auto"?(e.lineHeight=a/240,e.lineHeightRule="auto"):o==="exact"?(e.lineHeight=We(a),e.lineHeightRule="exact"):o==="atLeast"&&(e.lineHeight=We(a),e.lineHeightRule="atLeast")}}function Kf(r,e){const t=fe(r,G.w,"ind");if(!t)return;const n=t.getAttributeNS(G.w,"left")??t.getAttribute("w:left"),i=t.getAttributeNS(G.w,"right")??t.getAttribute("w:right"),s=t.getAttributeNS(G.w,"firstLine")??t.getAttribute("w:firstLine"),o=t.getAttributeNS(G.w,"hanging")??t.getAttribute("w:hanging"),a=n?We(parseInt(n,10)):0,l=o?We(parseInt(o,10)):0;n&&o&&Math.abs(a-l)<2||(n&&(e.indentLeft=a),i&&(e.indentRight=We(parseInt(i,10))),s?e.firstLineIndent=We(parseInt(s,10)):o&&(e.indentLeft=a+l,e.firstLineIndent=-l))}function Yf(r){const e=[],t=r.getElementsByTagNameNS(G.w,"tab");for(let n=0;n<t.length;n++){const i=t[n],s=i.getAttributeNS(G.w,"val")??i.getAttribute("w:val")??"left",o=i.getAttributeNS(G.w,"pos")??i.getAttribute("w:pos");o&&e.push({pos:We(parseInt(o,10)),type:s})}return e}function Jf(r,e){const t=r.getAttributeNS(G.w,"eastAsia")??r.getAttribute("w:eastAsia");if(t)return kr(t);const n=r.getAttributeNS(G.w,"ascii")??r.getAttribute("w:ascii");if(n)return kr(n);const i=r.getAttributeNS(G.w,"hAnsi")??r.getAttribute("w:hAnsi");if(i)return kr(i);const s=r.getAttributeNS(G.w,"eastAsiaTheme")??r.getAttribute("w:eastAsiaTheme"),o=r.getAttributeNS(G.w,"asciiTheme")??r.getAttribute("w:asciiTheme"),a=Vf(e,s??o);if(a)return kr(a)}function Qf(r,e){const t=r.getAttributeNS(G.w,"themeColor")??r.getAttribute("w:themeColor");if(t){const i=Rr[t]??t,s=r.getAttributeNS(G.w,"themeTint")??r.getAttribute("w:themeTint")??void 0,o=r.getAttributeNS(G.w,"themeShade")??r.getAttribute("w:themeShade")??void 0;return Cr(e,i,s,o)??void 0}const n=xe(r);if(!(!n||n==="auto"))return`#${n}`}function Sn(r,e){const t=r.getAttributeNS(G.w,"val")??r.getAttribute("w:val");if(t==="nil")return null;if(t==="solid")return qf(r,e);const n=r.getAttributeNS(G.w,"themeFill")??r.getAttribute("w:themeFill");if(n){const s=Rr[n]??n,o=r.getAttributeNS(G.w,"themeFillTint")??r.getAttribute("w:themeFillTint")??void 0,a=r.getAttributeNS(G.w,"themeFillShade")??r.getAttribute("w:themeFillShade")??void 0,l=Cr(e,s,o,a);return l?Nr(l)?null:l:null}const i=r.getAttributeNS(G.w,"fill")??r.getAttribute("w:fill");return!i||i==="auto"||Nr(`#${i}`)?null:`#${i}`}function qf(r,e){const t=r.getAttributeNS(G.w,"themeColor")??r.getAttribute("w:themeColor");if(t){const i=Rr[t]??t,s=r.getAttributeNS(G.w,"themeTint")??r.getAttribute("w:themeTint")??void 0,o=r.getAttributeNS(G.w,"themeShade")??r.getAttribute("w:themeShade")??void 0,a=Cr(e,i,s,o);return a?Nr(a)?null:a:null}const n=r.getAttributeNS(G.w,"color")??r.getAttribute("w:color");return!n||n==="auto"||Nr(`#${n}`)?null:`#${n}`}function Nr(r){const e=r.toUpperCase().replace("#","");return e==="FFFFFF"||e==="FFF"||e==="AUTO"}function $f(r,e){const t=[/^heading\s*(\d+)$/i,/^标题\s*(\d+)$/];for(const n of t){const i=r.match(n)??e.match(n);if(i){const s=parseInt(i[1],10);if(s>=1&&s<=6)return s}}}function Ca(r,e){for(const t of Object.keys(e))e[t]!==void 0&&(r[t]=e[t])}class ed{constructor(e){Se(this,"abstractNums",new Map);Se(this,"numRefs",new Map);e&&this.parseNumberingXml(e)}resolve(e,t){const n=this.numRefs.get(e);if(!n)return null;const i=this.abstractNums.get(n.abstractNumId);if(!i)return null;const s=n.levelOverrides.get(t);if(s!=null&&s.overrideLevelDef)return this.mapLevelToInfo(s.overrideLevelDef,t);const o=i.levels.get(t);if(!o){const a=i.levels.get(0);return a?this.mapLevelToInfo(a,t):null}return this.mapLevelToInfo(o,t)}parseNumberingXml(e){const n=kt(e).documentElement;this.parseAbstractNums(n),this.parseNumReferences(n)}parseAbstractNums(e){const t=e.getElementsByTagNameNS(G.w,"abstractNum");for(let n=0;n<t.length;n++){const i=t[n],s=i.getAttributeNS(G.w,"abstractNumId")??i.getAttribute("w:abstractNumId")??"",o=new Map,a=i.getElementsByTagNameNS(G.w,"lvl");for(let l=0;l<a.length;l++){const h=a[l];if(h.parentElement!==i)continue;const f=h.getAttributeNS(G.w,"ilvl")??h.getAttribute("w:ilvl")??"0",m=parseInt(f,10);o.set(m,Na(h))}this.abstractNums.set(s,{abstractNumId:s,levels:o})}}parseNumReferences(e){const t=e.getElementsByTagNameNS(G.w,"num");for(let n=0;n<t.length;n++){const i=t[n],s=i.getAttributeNS(G.w,"numId")??i.getAttribute("w:numId")??"",o=fe(i,G.w,"abstractNumId"),a=xe(o)??"",l=new Map,h=i.getElementsByTagNameNS(G.w,"lvlOverride");for(let f=0;f<h.length;f++){const m=h[f],v=m.getAttributeNS(G.w,"ilvl")??m.getAttribute("w:ilvl")??"0",y=parseInt(v,10),b={ilvl:y},g=fe(m,G.w,"startOverride");if(g){const d=xe(g);d&&(b.startOverride=parseInt(d,10))}const _=fe(m,G.w,"lvl");_&&(b.overrideLevelDef=Na(_),b.startOverride!==void 0&&(b.overrideLevelDef.start=b.startOverride)),l.set(y,b)}this.numRefs.set(s,{numId:s,abstractNumId:a,levelOverrides:l})}}mapLevelToInfo(e,t){const n=Bf[e.numFmt];return n?{listType:n.listType,listStyle:n.listStyle,level:t,indentLeft:e.indentLeft,indentHanging:e.indentHanging}:td(e.lvlText)?{listType:"ul",listStyle:"disc",level:t}:{listType:"ol",listStyle:"decimal",level:t}}}function Na(r){const e=fe(r,G.w,"numFmt"),t=xe(e)??"decimal",n=fe(r,G.w,"lvlText"),i=xe(n)??"",s=fe(r,G.w,"start"),o=s?parseInt(xe(s)??"1",10):1;let a,l;const h=fe(r,G.w,"pPr");if(h){const f=fe(h,G.w,"ind");if(f){const m=f.getAttributeNS(G.w,"left")??f.getAttribute("w:left"),v=f.getAttributeNS(G.w,"hanging")??f.getAttribute("w:hanging");m&&(a=We(parseInt(m,10))),v&&(l=We(parseInt(v,10)))}}return{numFmt:t,lvlText:i,start:o,indentLeft:a,indentHanging:l}}function td(r){return r===""?!0:["·","o","–","•","-","●","○","■","□","◆","◇","★","☆"].includes(r.trim())}function Pa(r){const e=new Map,n=kt(r).documentElement;return Ne(n,i=>{if(i.localName==="Relationship"){const s=i.getAttribute("Id")||"",o=i.getAttribute("Type")||"",a=i.getAttribute("Target")||"";s&&e.set(s,{id:s,type:o,target:a})}}),e}const xn={value:0};function Ft(r,e,t,n){const i=[],s=fe(r,G.w,"rPr"),o=s?e.parseRunProperties(s):{},a=nd(n,o);let l=null;return Ne(r,h=>{const f=h.localName;if(f==="t"){const m=h.textContent??"";m!==""&&i.push({type:"text",value:m,style:{...a}}),l=null}else if(f==="delText"){const m=h.textContent??"";m!==""&&i.push({type:"text",value:m,style:{...a}}),l=null}else if(f==="br"){const m=h.getAttributeNS(G.w,"type")??h.getAttribute("w:type"),v=rd(m);v!==l&&(i.push({type:"break",breakType:v}),l=v)}else if(f==="tab")i.push({type:"tab"}),l=null;else if(f==="sym"){const m=h.getAttributeNS(G.w,"char")??h.getAttribute("w:char");if(m){const v=parseInt(m,16),y=v>=61440&&v<=61695?v-61440:v;i.push({type:"text",value:String.fromCharCode(y),style:{...a}})}l=null}else f==="softHyphen"?l=null:f==="noBreakHyphen"?(i.push({type:"text",value:"-",style:{...a}}),l=null):(f==="footnoteReference"||f==="endnoteReference")&&(xn.value++,i.push({type:"text",value:String(xn.value),style:{...a,vertAlign:"superscript"}}),l=null)}),i}function rd(r){return r==="page"?"page":r==="column"?"column":"line"}function nd(r,e){const t={...r};for(const n of Object.keys(e))e[n]!==void 0&&(t[n]=e[n]);return t}function La(r,e,t,n){const i=fe(r,G.wp,"inline"),s=fe(r,G.wp,"anchor"),o=i||s;if(!o)return null;const a=fe(o,G.wp,"extent");let l=100,h=100;if(a){const w=a.getAttribute("cx"),p=a.getAttribute("cy");w&&(l=Ot(parseInt(w,10))),p&&(h=Ot(parseInt(p,10)))}const f=o.getElementsByTagNameNS(G.a,"blip");if(f.length===0)return null;const m=f[0],v=m.getAttributeNS(G.r,"embed")||m.getAttribute("r:embed")||m.getAttributeNS(G.r,"link")||m.getAttribute("r:link")||"";if(!v)return null;const y=e.get(v);if(!y)return null;const b=y.target.replace(/^\.\.\//,""),g=b.startsWith("word/")?b:`word/${b}`,_=t[g]||t[b];if(!_)return null;let d,T;if(s){d=ad(s);const w=n||{top:72,bottom:72,left:90,right:90},p=fe(s,G.wp,"positionH"),E=fe(s,G.wp,"positionV");let P=w.left,L=w.top;if(p){const M=p.getAttribute("relativeFrom")||"column",C=fe(p,G.wp,"posOffset");if(C!=null&&C.textContent){const z=Ot(parseInt(C.textContent,10));M==="page"?P=z:P=w.left+z}else{const z=fe(p,G.wp,"align");z!=null&&z.textContent&&(P=id(z.textContent.trim(),w,Math.round(l)))}}if(E){const M=E.getAttribute("relativeFrom")||"paragraph",C=fe(E,G.wp,"posOffset");if(C!=null&&C.textContent){const z=Ot(parseInt(C.textContent,10));M==="page"?L=z:L=w.top+z}else{const z=fe(E,G.wp,"align");z!=null&&z.textContent&&(L=sd(z.textContent.trim(),w,Math.round(h)))}}T={x:P,y:L}}else i&&(d="inline");return{type:"image",src:_,width:Math.round(l),height:Math.round(h),display:d,floatPosition:T}}function id(r,e,t){const i=794-e.left-e.right;switch(r){case"left":return e.left;case"center":return e.left+(i-t)/2;case"right":return e.left+i-t;default:return e.left}}function sd(r,e,t){const i=1123-e.top-e.bottom;switch(r){case"top":return e.top;case"center":return e.top+(i-t)/2;case"bottom":return e.top+i-t;default:return e.top}}function ad(r){const e=r.getAttribute("behindDoc")==="1",t=fe(r,G.wp,"wrapNone"),n=fe(r,G.wp,"wrapSquare"),i=fe(r,G.wp,"wrapTight"),s=fe(r,G.wp,"wrapThrough"),o=fe(r,G.wp,"wrapTopAndBottom");return n||i||s?"surround":e?"float-bottom":"float-top"}function od(r,e,t,n){const i=r.getElementsByTagNameNS(G.c,"chart");if(i.length===0)return null;const s=i[0],o=s.getAttributeNS(G.r,"id")||s.getAttribute("r:id")||"";if(!o)return null;const a=e.get(o);if(!a)return null;const l=a.target.startsWith("word/")?a.target:`word/${a.target.replace(/^\.\.\//,"")}`;let h=400,f=300;const m=fe(r,G.wp,"inline")||fe(r,G.wp,"anchor");if(m){const g=fe(m,G.wp,"extent");if(g){const _=g.getAttribute("cx"),d=g.getAttribute("cy");_&&(h=Ot(parseInt(_,10))),d&&(f=Ot(parseInt(d,10)))}}const v=l.replace(/\/([^/]+)$/,"/_rels/$1.rels"),y=t[v];if(y){const g=Pa(y);for(const _ of g.values())if(_.type.includes("image")||_.target.match(/\.(png|jpg|jpeg|gif|bmp|tiff)$/i)){const d=ld(l,_.target),T=n[d]||n[_.target];if(T)return{type:"image",src:T,width:Math.round(h),height:Math.round(f)}}}const b=r.getElementsByTagNameNS(G.a,"blip");for(let g=0;g<b.length;g++){const _=b[g],d=_.getAttributeNS(G.r,"embed")||_.getAttribute("r:embed")||"";if(d){const T=e.get(d);if(T){const w=T.target.replace(/^\.\.\//,""),p=w.startsWith("word/")?w:`word/${w}`,E=n[p]||n[w];if(E)return{type:"image",src:E,width:Math.round(h),height:Math.round(f)}}}}return null}function Oa(r){return r.getElementsByTagNameNS(G.c,"chart").length>0}function ld(r,e){const t=r.substring(0,r.lastIndexOf("/")),n=e.split("/"),i=t.split("/");for(const s of n)s===".."?i.pop():s!=="."&&i.push(s);return i.join("/")}const ud="#0563C1";function cd(r,e,t,n,i){const s=hd(r,i),o=[];return Ne(r,a=>{var l,h;if(a.localName==="r"&&a.namespaceURI===G.w){const f=Ft(a,e,t,n);for(const m of f)m.type==="text"&&o.push(An(m,a,e))}else if(a.localName==="ins"&&a.namespaceURI===G.w){const f=a.getAttributeNS(G.w,"id")??a.getAttribute("w:id")??"",m=a.getAttributeNS(G.w,"author")??a.getAttribute("w:author")??"",v=a.getAttributeNS(G.w,"date")??a.getAttribute("w:date")??"";let y=f||`rev_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;for(let g=o.length-1;g>=0;g--){const _=o[g];if(_.type==="text"&&((l=_.revision)==null?void 0:l.type)==="delete"&&_.revision.author===m&&_.revision.date===v){_.revision.id!==y&&(y=_.revision.id);break}if(!(_.type==="text"&&((h=_.revision)==null?void 0:h.type)==="delete")&&!(_.type==="text"&&!_.revision))break}const b={id:y,type:"insert",author:m,date:v};Ne(a,g=>{if(g.localName==="r"&&g.namespaceURI===G.w){const _=Ft(g,e,t,n);for(const d of _)d.type==="text"&&(d.revision=b,o.push(An(d,g,e)))}})}else if(a.localName==="del"&&a.namespaceURI===G.w){const f=a.getAttributeNS(G.w,"id")??a.getAttribute("w:id")??`rev_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,m=a.getAttributeNS(G.w,"author")??a.getAttribute("w:author")??"",v=a.getAttributeNS(G.w,"date")??a.getAttribute("w:date")??"",y={id:f,type:"delete",author:m,date:v};Ne(a,b=>{if(b.localName==="r"&&b.namespaceURI===G.w){const g=Ft(b,e,t,n);for(const _ of g)_.type==="text"&&(_.revision=y,o.push(An(_,b,e)))}})}}),o.length===0?null:{type:"hyperlink",url:s,children:o}}function hd(r,e){const t=r.getAttributeNS(G.r,"id")??r.getAttribute("r:id")??"";if(t){const i=e.get(t);if(i!=null&&i.target)return i.target}const n=r.getAttributeNS(G.w,"anchor")??r.getAttribute("w:anchor");return n?`#${n}`:""}function An(r,e,t){const n=fe(e,G.w,"rPr"),i=n?t.parseRunProperties(n):{},s={...r.style};return i.color===void 0&&!s.color&&(s.color=ud),i.underline===void 0&&s.underline===void 0&&(s.underline=!0),{...r,style:s}}function Dt(r,e,t,n,i,s,o,a){const l=fe(r,G.w,"pPr");let h={},f={},m=null;if(l){const b=fe(l,G.w,"pStyle");m=xe(b)}if(m){const b=e.resolveStyle(m);h={...b.paragraph},f={...b.run}}if(l){const b=e.parseParagraphProperties(l);Da(h,b);const g=fe(l,G.w,"rPr");if(g){const _=e.parseRunProperties(g);Da(f,_)}}if(!h.titleLevel&&m){const b=gd(m);b!==void 0&&(h.titleLevel=b)}if(h.numId&&h.numId!=="0"){const b=h.listLevel??0,g=n.resolve(h.numId,b);g&&(h.listType=g.listType,h.listStyle=g.listStyle,h.listLevel=g.level)}const v=[];let y="none";if(Ne(r,b=>{var d,T;const g=b.localName,_=b.namespaceURI;if(g!=="pPr"){if(g==="r"&&_===G.w){if(fd(b,y,w=>{y=w}))return;if(y==="cached"){const w=dd(b,p=>({type:"text",value:p,style:{...f}}),e,t,f);v.push(...w);return}qt(b,v,i,s,e,t,f,o)}else if(g==="ins"&&_===G.w){const w=b.getAttributeNS(G.w,"id")??b.getAttribute("w:id")??"",p=b.getAttributeNS(G.w,"author")??b.getAttribute("w:author")??"",E=b.getAttributeNS(G.w,"date")??b.getAttribute("w:date")??"";let P=w||`rev_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;for(let L=v.length-1;L>=0;L--){const M=v[L];if(M.type==="text"&&((d=M.revision)==null?void 0:d.type)==="delete"&&M.revision.author===p&&M.revision.date===E){M.revision.id!==P&&(P=M.revision.id);break}if(!(M.type==="text"&&((T=M.revision)==null?void 0:T.type)==="delete")&&!(M.type==="text"&&!M.revision))break}Ne(b,L=>{L.localName==="r"&&L.namespaceURI===G.w&&qt(L,v,i,s,e,t,f,o,{id:P,type:"insert",author:p,date:E})})}else if(g==="del"&&_===G.w){const w=b.getAttributeNS(G.w,"id")??b.getAttribute("w:id")??`rev_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,p=b.getAttributeNS(G.w,"author")??b.getAttribute("w:author")??"",E=b.getAttributeNS(G.w,"date")??b.getAttribute("w:date")??"";Ne(b,P=>{P.localName==="r"&&P.namespaceURI===G.w&&qt(P,v,i,s,e,t,f,o,{id:w,type:"delete",author:p,date:E})})}else if(g==="hyperlink"&&_===G.w){const w=cd(b,e,t,f,i);w&&v.push(w)}else if(g==="AlternateContent"&&_===G.mc)pd(b,v,i,s,e,t,f,o);else if(g==="oMath"&&_===G.m){const w=md(b,f);v.push(...w)}else if(g==="commentRangeStart"&&_===G.w){const w=b.getAttributeNS(G.w,"id")??b.getAttribute("w:id")??"";w&&v.push({type:"commentMarker",markType:"start",commentId:w})}else if(g==="commentRangeEnd"&&_===G.w){const w=b.getAttributeNS(G.w,"id")??b.getAttribute("w:id")??"";w&&v.push({type:"commentMarker",markType:"end",commentId:w})}}}),v.length===0){const b=f.size??a??12;v.push({type:"text",value:"",style:{...f,size:b}})}return{type:"paragraph",chunks:v,style:h}}function fd(r,e,t){const n=fe(r,G.w,"fldChar"),i=fe(r,G.w,"instrText");if(n){const s=n.getAttributeNS(G.w,"fldCharType")??n.getAttribute("w:fldCharType");return s==="begin"?(t("instr"),!0):s==="separate"?(t("cached"),!0):(s==="end"&&t("none"),!0)}return!!(i&&e==="instr")}function dd(r,e,t,n,i){return Ft(r,t,n,i)}function qt(r,e,t,n,i,s,o,a,l){let h=fe(r,G.w,"drawing"),f=fe(r,G.w,"pict");if(!h&&!f){const m=fe(r,G.mc,"AlternateContent");if(m){const v=fe(m,G.mc,"Choice");if(v&&(h=fe(v,G.w,"drawing")),!h){const y=fe(m,G.mc,"Fallback");y&&(f=fe(y,G.w,"pict"))}}}if(h){if(!Oa(h)){const m=La(h,t,n,a);m?e.push(m):e.push(...Pr(h,i,s,o))}}else if(f){const m=Fa(f,t,n);m?e.push(m):e.push(...Pr(f,i,s,o))}else{const m=Ft(r,i,s,o);if(l)for(const v of m)v.type==="text"&&(v.revision=l);e.push(...m)}}function pd(r,e,t,n,i,s,o,a){const l=fe(r,G.mc,"Choice");if(l){let f=!1;if(Ne(l,m=>{if(m.localName==="r"&&m.namespaceURI===G.w)qt(m,e,t,n,i,s,o,a),f=!0;else if(m.localName==="drawing"&&m.namespaceURI===G.w){if(!Oa(m)){const v=La(m,t,n,a);v?e.push(v):e.push(...Pr(m,i,s,o))}f=!0}}),f)return}const h=fe(r,G.mc,"Fallback");h&&Ne(h,f=>{if(f.localName==="r"&&f.namespaceURI===G.w)qt(f,e,t,n,i,s,o,a);else if(f.localName==="pict"&&f.namespaceURI===G.w){const m=Fa(f,t,n);m?e.push(m):e.push(...Pr(f,i,s,o))}})}function Pr(r,e,t,n){const i=r.getElementsByTagNameNS(G.w,"txbxContent");if(i.length===0)return[];const s=[],o=i[0];let a=!0;return Ne(o,l=>{l.localName==="p"&&l.namespaceURI===G.w&&(a||s.push({type:"break",breakType:"line"}),a=!1,Ne(l,h=>{h.localName==="r"&&h.namespaceURI===G.w&&s.push(...Ft(h,e,t,n))}))}),s}function Fa(r,e,t){const n="urn:schemas-microsoft-com:vml",i=r.getElementsByTagNameNS(n,"imagedata");if(i.length===0)return null;const s=i[0],o=s.getAttributeNS(G.r,"id")??s.getAttribute("r:id")??s.getAttributeNS(G.r,"href")??"";if(!o)return null;const a=e.get(o);if(!a)return null;const l=a.target.replace(/^\.\.\//,""),h=l.startsWith("word/")?l:`word/${l}`,f=t[h]??t[l];if(!f)return null;const m=r.getElementsByTagNameNS(n,"shape");let v=100,y=100;if(m.length>0){const b=m[0].getAttribute("style")??"",g=b.match(/width:\s*([\d.]+)pt/),_=b.match(/height:\s*([\d.]+)pt/);g&&(v=parseFloat(g[1])*(96/72)),_&&(y=parseFloat(_[1])*(96/72))}return{type:"image",src:f,width:Math.round(v),height:Math.round(y)}}function md(r,e){const t=r.getElementsByTagNameNS(G.m,"t"),n=[];for(let s=0;s<t.length;s++){const o=t[s].textContent??"";o.trim()&&n.push(o)}return[{type:"text",value:n.length>0?n.join(""):"[公式]",style:{...e,italic:!0}}]}function gd(r){const e=r.match(/^heading\s*(\d+)$/i);if(e){const n=parseInt(e[1],10);if(n>=1&&n<=6)return n}const t=r.match(/^标题\s*(\d+)$/);if(t){const n=parseInt(t[1],10);if(n>=1&&n<=6)return n}}function Da(r,e){for(const t of Object.keys(e))e[t]!==void 0&&(r[t]=e[t])}function Lr(r,e,t,n,i,s,o){const a=wd(r),{borderType:l,borderColor:h,borderWidth:f}=yd(r,t),m=Ir(r,G.w,"tr"),v=[];for(const b of m)v.push(bd(b,e,t,n,i,s,o));return{type:"table",rows:Ed(v),colWidths:a,borderType:l,borderColor:h,borderWidth:f}}function wd(r){const e=[],t=fe(r,G.w,"tblGrid");if(!t)return e;for(const n of Ir(t,G.w,"gridCol")){const i=n.getAttributeNS(G.w,"w")??n.getAttribute("w:w");e.push(i?We(parseInt(i,10)):100)}return e}function yd(r,e){const t=fe(r,G.w,"tblPr");if(!t)return{};const n=fe(t,G.w,"tblBorders");if(!n)return{};const i=fe(n,G.w,"top");if(!i)return{};const s=xe(i),o=s==="none"||s==="nil"?"EMPTY":"ALL",a=i.getAttributeNS(G.w,"themeColor")??i.getAttribute("w:themeColor");let l;if(a){const m=Cr(e,a);m&&(l=m)}else{const m=i.getAttributeNS(G.w,"color")??i.getAttribute("w:color");m&&m!=="auto"&&(l=`#${m}`)}const h=i.getAttributeNS(G.w,"sz")??i.getAttribute("w:sz"),f=h?Of(parseInt(h,10)):void 0;return{borderType:o,borderColor:l,borderWidth:f}}function bd(r,e,t,n,i,s,o){let a;const l=fe(r,G.w,"trPr");if(l){const f=fe(l,G.w,"trHeight");if(f){const m=f.getAttributeNS(G.w,"val")??f.getAttribute("w:val"),v=f.getAttributeNS(G.w,"hRule")??f.getAttribute("w:hRule");if(m){const y=We(parseInt(m,10));v==="exact"?a=y:a=Math.min(y,200)}}}const h=[];for(const f of Ir(r,G.w,"tc"))h.push(vd(f,e,t,n,i,s,o));return{height:a,cells:h}}function vd(r,e,t,n,i,s,o){const a=fe(r,G.w,"tcPr");let l=1;if(a){const g=fe(a,G.w,"gridSpan");if(g){const _=xe(g);_&&(l=parseInt(_,10))}}let h=null;if(a){const g=fe(a,G.w,"vMerge");g&&(h=xe(g)==="restart"?"restart":"continue")}let f;if(a){const g=fe(a,G.w,"shd");g&&(f=Sn(g,t)??void 0)}let m;if(a){const g=fe(a,G.w,"vAlign");g&&(m=xe(g)??void 0)}let v;if(a){const g=fe(a,G.w,"tcW");if(g){const _=g.getAttributeNS(G.w,"w")??g.getAttribute("w:w"),d=g.getAttributeNS(G.w,"type")??g.getAttribute("w:type");_&&d==="dxa"&&(v=We(parseInt(_,10)))}}const y=_d(a),b=[];return Td(r,b,e,t,n,i,s,o),{paragraphs:b,colspan:l,vMerge:h,backgroundColor:f,verticalAlign:m,borderTypes:y,width:v}}function _d(r){if(!r)return;const e=fe(r,G.w,"tcBorders");if(!e)return;const t=["top","right","bottom","left"],n=[];let i=!1;for(const s of t){const o=fe(e,G.w,s);if(o){const a=xe(o)??"single";n.push(Uf[a]??1),i=!0}else n.push(-1)}return i?n:void 0}function Td(r,e,t,n,i,s,o,a){Ne(r,l=>{if(l.localName==="p"&&l.namespaceURI===G.w)e.push(Dt(l,t,n,i,s,o,a));else if(l.localName==="tbl"&&l.namespaceURI===G.w){const h=Lr(l,t,n,i,s,o,a);e.push({type:"paragraph",chunks:[{type:"nestedTable",table:h}],style:{}})}else if(l.localName==="sdt"&&l.namespaceURI===G.w){const h=fe(l,G.w,"sdtContent");h&&Ne(h,f=>{f.localName==="p"&&f.namespaceURI===G.w&&e.push(Dt(f,t,n,i,s,o,a))})}})}function Ed(r){const e=[],t=new Map;for(let n=0;n<r.length;n++){const i=r[n],s=[];let o=0;for(const a of i.cells){if(a.vMerge==="restart")t.set(o,{rowIdx:e.length,cellIdx:s.length}),s.push(Ba(a,1));else if(a.vMerge==="continue"){const l=t.get(o);l&&e[l.rowIdx].cells[l.cellIdx].rowspan++}else t.delete(o),s.push(Ba(a,1));o+=a.colspan}e.push({height:i.height,cells:s})}return e}function Ba(r,e){return{paragraphs:r.paragraphs,colspan:r.colspan,rowspan:e,backgroundColor:r.backgroundColor,verticalAlign:r.verticalAlign,borderTypes:r.borderTypes,width:r.width}}function Sd(r){const e=fe(r,G.w,"sdtPr");if(!e)return!1;const t=fe(e,G.w,"docPartObj");if(t){const l=fe(t,G.w,"docPartGallery"),h=xe(l);if(h&&h.toLowerCase().includes("table of contents"))return!0}const n=fe(e,G.w,"alias"),i=xe(n);if(i){const l=i.toLowerCase();if(l.includes("目录")||l.includes("toc")||l.includes("table of contents"))return!0}const s=fe(e,G.w,"tag"),o=xe(s);if(o){const l=o.toLowerCase();if(l.includes("目录")||l.includes("toc"))return!0}const a=fe(r,G.w,"sdtContent");if(a){const l=a.getElementsByTagNameNS(G.w,"instrText");for(let h=0;h<l.length;h++)if((l[h].textContent||"").trim().startsWith("TOC"))return!0}return!1}function xd(r,e,t,n,i,s){const o=[],a=fe(r,G.w,"sdtContent");return a&&Ne(a,l=>{l.localName==="p"&&l.namespaceURI===G.w&&o.push(Dt(l,e,t,n,i,s))}),o}function Ma(r){const e={breakType:"nextPage",columns:1,colWidths:[],colSpace:0,separator:!1},t=fe(r,G.w,"type");if(t){const a=t.getAttributeNS(G.w,"val")??t.getAttribute("w:val");(a==="continuous"||a==="nextColumn"||a==="evenPage"||a==="oddPage"||a==="nextPage")&&(e.breakType=a)}const n=fe(r,G.w,"cols");if(!n)return e;const i=n.getAttributeNS(G.w,"num")??n.getAttribute("w:num"),s=n.getAttributeNS(G.w,"space")??n.getAttribute("w:space"),o=n.getAttributeNS(G.w,"sep")??n.getAttribute("w:sep");i&&(e.columns=Math.max(1,parseInt(i,10))),s&&(e.colSpace=We(parseInt(s,10))),e.separator=o==="1"||o==="true";for(const a of Ir(n,G.w,"col")){const l=a.getAttributeNS(G.w,"w")??a.getAttribute("w:w");l&&e.colWidths.push(We(parseInt(l,10)))}return e}function Ua(r,e,t){const{columns:n,colWidths:i,colSpace:s,separator:o}=e,a=Ad(n,i,s,t),l=kd(r,n);return{type:"column",columns:n,colWidths:a,colSpace:s,separator:o,groups:l}}function Ad(r,e,t,n){if(e.length>=r)return e.slice(0,r);const i=t*Math.max(0,r-1),s=(n-i)/r;return Array.from({length:r},()=>Math.max(s,50))}function kd(r,e){const t=[[]];for(const n of r)if(n.chunks.some(s=>s.type==="break"&&s.breakType==="column")&&t.length<e){const s=n.chunks.filter(o=>!(o.type==="break"&&o.breakType==="column"));s.length>0?t.push([{...n,chunks:s}]):t.push([])}else t[t.length-1].push(n);return t}const Ze="http://schemas.openxmlformats.org/drawingml/2006/chart",Rd=G.a;function Id(r){try{const e=Cd(r);return!e||e.series.length===0?null:Dd(e)}catch(e){return console.error("[ooxmlChartParser] parse error:",e),null}}function Cd(r){const n=kt(r).documentElement.getElementsByTagNameNS(Ze,"chart");if(n.length===0)return null;const i=n[0],s=Nd(i),o=i.getElementsByTagNameNS(Ze,"plotArea");if(o.length===0)return null;const a=o[0],l={barChart:"bar",bar3DChart:"bar",lineChart:"line",line3DChart:"line",pieChart:"pie",pie3DChart:"pie",areaChart:"area",area3DChart:"area",scatterChart:"scatter",radarChart:"radar",doughnutChart:"doughnut",ofPieChart:"pie"};for(const[h,f]of Object.entries(l)){const m=a.getElementsByTagNameNS(Ze,h);if(m.length>0){const v=Pd(m[0]);if(v.series.length>0)return{type:f,title:s,categories:v.categories,series:v.series}}}return null}function Nd(r){const e=r.getElementsByTagNameNS(Ze,"title");if(e.length===0)return"";const t=e[0].getElementsByTagNameNS(Rd,"t");if(t.length>0)return Array.from(t).map(i=>i.textContent||"").join("");const n=e[0].getElementsByTagNameNS(Ze,"v");return n.length>0&&n[0].textContent||""}function Pd(r){const e=r.getElementsByTagNameNS(Ze,"ser"),t=[];let n=[];for(let i=0;i<e.length;i++){const s=e[i],o=Ld(s)||`系列${i+1}`;n.length===0&&(n=Od(s));const a=Fd(s);a.length>0&&t.push({name:o,values:a})}if(n.length===0&&t.length>0){const i=Math.max(...t.map(s=>s.values.length));n=Array.from({length:i},(s,o)=>`${o+1}`)}return{categories:n,series:t}}function Ld(r){const e=kn(r,Ze,"tx");if(e.length===0)return"";const t=Or(e[0],"strCache");if(t.length>0)return t[0];const n=e[0].getElementsByTagNameNS(Ze,"v");return n.length>0&&n[0].textContent||""}function Od(r){const e=kn(r,Ze,"cat");if(e.length===0)return[];const t=Or(e[0],"strCache");if(t.length>0)return t;const n=Or(e[0],"numCache");return n.length>0?n:[]}function Fd(r){const e=kn(r,Ze,"val");return e.length===0?[]:Or(e[0],"numCache").map(n=>parseFloat(n)||0)}function Or(r,e){const t=r.getElementsByTagNameNS(Ze,e);if(t.length===0)return[];const i=t[0].getElementsByTagNameNS(Ze,"pt");if(i.length===0)return[];const s=[];for(let a=0;a<i.length;a++){const l=i[a],h=parseInt(l.getAttribute("idx")||"0",10),f=l.getElementsByTagNameNS(Ze,"v"),m=f.length>0&&f[0].textContent||"";s.push({idx:h,val:m})}s.sort((a,l)=>a.idx-l.idx);const o=[];for(const a of s){for(;o.length<a.idx;)o.push("");o.push(a.val)}return o}function kn(r,e,t){const n=[];for(let i=0;i<r.childNodes.length;i++){const s=r.childNodes[i];s.nodeType===1&&s.localName===t&&s.namespaceURI===e&&n.push(s)}return n}function Dd(r){const{type:e,title:t,categories:n,series:i}=r,o={animation:!1,color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],grid:{left:"3%",right:"4%",bottom:"12%",top:t?"15%":"10%",containLabel:!0}};if(t&&(o.title={text:t,left:"center",textStyle:{fontSize:14}}),i.length>1&&(o.legend={show:!0,bottom:0,data:i.map(l=>l.name)}),e==="pie"||e==="doughnut"){const l=n.map((f,m)=>{var v;return{name:f,value:((v=i[0])==null?void 0:v.values[m])||0}});return{...o,tooltip:{trigger:"item",formatter:"{b}: {c} ({d}%)"},series:[{type:"pie",radius:e==="doughnut"?["40%","70%"]:"55%",data:l,label:{formatter:"{b}: {d}%"}}]}}if(e==="radar"){const l=Math.max(...i.flatMap(f=>f.values))*1.2||100,h=n.map(f=>({name:f,max:l}));return{...o,tooltip:{trigger:"item"},radar:{indicator:h,shape:"circle"},series:[{type:"radar",data:i.map(f=>({name:f.name,value:f.values}))}]}}if(e==="scatter")return{...o,tooltip:{trigger:"item"},xAxis:{type:"value"},yAxis:{type:"value"},series:i.map(l=>({name:l.name,type:"scatter",data:l.values.map((h,f)=>[n[f]&&parseFloat(n[f])||f,h])}))};const a=e==="area"?"line":e==="bar"||e==="line"?e:"bar";return{...o,tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},xAxis:{type:"category",data:n,axisLabel:{rotate:n.length>8?45:0}},yAxis:{type:"value"},series:i.map(l=>({name:l.name,type:a,data:l.values,...e==="area"?{areaStyle:{}}:{}}))}}function Bd(r){const e=new Map;if(!r)return e;const i=kt(r).documentElement.getElementsByTagNameNS(G.w,"comment");for(let s=0;s<i.length;s++){const o=i[s],a=o.getAttributeNS(G.w,"id")||o.getAttribute("w:id")||"",l=o.getAttributeNS(G.w,"author")||o.getAttribute("w:author")||"",h=o.getAttributeNS(G.w,"date")||o.getAttribute("w:date")||"",f=o.getAttributeNS(G.w,"initials")||o.getAttribute("w:initials")||void 0;if(!a)continue;const m=Md(o);e.set(a,{id:a,author:l,date:h,initials:f,content:m})}return e}function Md(r){const e=[];return Ne(r,t=>{if(t.localName==="p"&&t.namespaceURI===G.w){const n=[];Ne(t,i=>{i.localName==="r"&&i.namespaceURI===G.w&&Ne(i,s=>{s.localName==="t"&&s.namespaceURI===G.w&&n.push(s.textContent||"")})}),e.push(n.join(""))}}),e.join(`
|
|
108
|
-
`)}const
|
|
107
|
+
`;f.append(document.createTextNode(m)),setTimeout(()=>{a.write(`${f.outerHTML}${l.innerHTML}`),o.print(),a.close(),window.addEventListener("mouseover",()=>{s==null||s.remove()},{once:!0})})}const Tn={datePicker:{now:"此刻",confirm:"确定",return:"返回",timeSelect:"选择时间",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},year:"年",month:"月",hour:"时",minute:"分",second:"秒"},pageBreak:{displayName:"分页符"},frame:{header:"页眉",footer:"页脚"}},Jt={zhCN:Tn,enUS:{datePicker:{now:"Now",confirm:"Confirm",return:"Return",timeSelect:"Select Time",weeks:{sun:"Su",mon:"Mo",tue:"Tu",wed:"We",thu:"Th",fri:"Fr",sat:"Sa"},year:"Year",month:"Month",hour:"H",minute:"M",second:"S"},pageBreak:{displayName:"Page Break"},frame:{header:"Header",footer:"Footer"}}};function Cf(r,e){const t=e.split(".");let n=r;for(const i of t){if(n==null||typeof n!="object")return e;n=n[i]}return typeof n=="string"?n:e}class Ia{constructor(e="zhCN"){Ee(this,"_locale");Ee(this,"_lang");this._locale=e,this._lang=Jt[e]||Tn}t(e,...t){return Cf(this._lang,e)}registerLangMap(e,t){e===this._locale&&t&&(this._lang={...this._lang,...t}),Jt[e]=Jt[e]?{...Jt[e],...t}:t}destroy(){}install(e){return this}setLang(e,t){this._locale=e,this._lang=Jt[e]||Tn}}class Na{constructor(e,t,n={}){Ee(this,"command");Ee(this,"listener");Ee(this,"eventBus");Ee(this,"override");Ee(this,"register");Ee(this,"comment");Ee(this,"revision");Ee(this,"destroy");Ee(this,"use");var B;const i=ce.mergeOption(n);t=ce.deepClone(t);let s=[],o=[],a=[];Array.isArray(t)?o=t:(s=t.header||[],o=t.main,a=t.footer||[]),[s,o,a].forEach(I=>{ce.formatElementList(I,{editorOptions:i,isForceCompensation:!0,laTexToSVG:Ie.LaTexParticle.convertLaTextToSVG})}),this.listener=new Zt.Listener,this.eventBus=new Zt.EventBus,this.override=new be.Override;const c=new be.Draw(e,i,{header:s,main:o,footer:a},this.listener,this.eventBus,this.override),f=new Ia(i.locale);c.i18n=f,c.setBlockParticle(new Ie.BlockParticle(c)),c.setLaTexParticle(new Ie.LaTexParticle(c)),c.setDateParticle(new Ie.DateParticle(c));const m=Ie.LaTexParticle.convertLaTextToSVG,v=I=>{for(const K of I)if(K.type==="latex"&&K.value&&!K.laTexSVG){const oe=m(K.value);K.laTexSVG=oe.svg,K.width=K.width||oe.width,K.height=K.height||oe.height,K.id=K.id||`latex_${Date.now()}_${Math.random().toString(36).slice(2)}`}},y=c.insertElementList.bind(c);c.insertElementList=(I,K)=>(v(I),y(I,K));const b=c.appendElementList.bind(c);c.appendElementList=(I,K)=>(v(I),b(I,K)),new dn.HistoryComponent().install(c),new Ie.ControlComponent().install(c);const g=new Aa().install(c),_=new Je.CommandAdapt(c,{pasteByApi:be.pasteByApi,printImageBase64:kf});this.command=new Je.Command(_);const d=_._bookmark;d&&(d.addBookmark=I=>{var Y,L,V,Z,ie,$;if((Y=d.isDisabled)!=null&&Y.call(d)||(ie=(V=(L=d.draw)==null?void 0:L.getControl)==null?void 0:(Z=V.call(L)).getActiveControl)!=null&&ie.call(Z))return;const K=($=I==null?void 0:I.name)==null?void 0:$.trim();if(!K||!/^[\w\u4e00-\u9fff]+$/.test(K)||d.getBookmarks().some(C=>C.name===K))return;const{startIndex:oe,endIndex:N}=d.range.getRange();if(oe<0||N<0)return;const U=d.draw.getElementList(),x="",X=oe===N,re=oe+1,z=N+1;if(!X){const C={value:x,extension:{bookmarkMarker:{name:K,position:"end"}}},k={value:x,extension:{bookmarkMarker:{name:K,position:"start"}}};d.draw.spliceElementList(U,Math.min(z,U.length),0,[C]),d.draw.spliceElementList(U,Math.min(re,U.length),0,[k]);const G=Math.min(z+1,U.length-1);d.range.setRange(G,G),d.draw.render({curIndex:G});return}const se={value:x,extension:{bookmarkMarker:{name:K,position:"start"}}},Q=Math.min(re,U.length);d.draw.spliceElementList(U,Q,0,[se]);const me=Math.min(Q,U.length-1);d.range.setRange(me,me),d.draw.render({curIndex:me})}),c.__structureAdapter=_._structure;const T=_._bookmark;this.command.getBookmarks=()=>{var I;return((I=T==null?void 0:T.getBookmarks)==null?void 0:I.call(T))||[]},new Ie.GadgetComponent().install(c,this.command),new xa().install(c,this.command),new Sf().install(c),this.comment=new Sr.CommentComponent().install(this.command),this.revision=new Sr.RevisionComponent;const w=new pn.KeymapComponent().install(c,this.command),E=((B=i.floatingBar)==null?void 0:B.enabled)!==!1?new be.FloatingBar(c,this.command):null,O=w.getShortcut();this.register=new be.Register({shortcut:O,i18n:c.getI18n()}),c.setRegister(this.register),this.destroy=()=>{var I;c.destroy(),O.removeEvent(),E==null||E.destroy(),(I=g.getWorkerManager())==null||I.terminate()};const P=new be.Plugin(this);this.use=P.use.bind(P)}}class Rf{constructor(){Ee(this,"_saveTimer",null);Ee(this,"_saving",!1);Ee(this,"_pendingSave",!1);Ee(this,"_autoSaveOptions",null)}install(){return this}configureAutoSave(e){this._autoSaveOptions={interval:800,enabled:!0,...e}}async saveNow(e){var n,i;if(this._saving){this._pendingSave=!0;return}if(!this._autoSaveOptions||(i=(n=this._autoSaveOptions).isReadonly)!=null&&i.call(n))return;const t=this._autoSaveOptions.getContent();if(t){this._saving=!0,this._pendingSave=!1;try{await this._autoSaveOptions.onSave(t)}finally{this._saving=!1,this._pendingSave&&this.scheduleSave()}}}scheduleSave(){var e,t;!this._autoSaveOptions||!this._autoSaveOptions.enabled||(t=(e=this._autoSaveOptions).isReadonly)!=null&&t.call(e)||(this._saveTimer&&clearTimeout(this._saveTimer),this._saveTimer=setTimeout(()=>{this.saveNow({silent:!0})},this._autoSaveOptions.interval||800))}stopAutoSave(){this._saveTimer&&(clearTimeout(this._saveTimer),this._saveTimer=null)}isSaving(){return this._saving}destroy(){this.stopAutoSave(),this._autoSaveOptions=null}}function If(){const r=localStorage.getItem(ce.EDITOR_CLIPBOARD);return r?JSON.parse(r):null}function Nf(){localStorage.removeItem(ce.EDITOR_CLIPBOARD)}function Of(r){let e=!1;for(let t=0;t<r.items.length;t++)if(r.items[t].kind==="file"){e=!0;break}return e}const Pf="3.0.11",Lf={preserveStyles:!0,defaultFont:"SimSun, serif",defaultSize:12,tableWidthMode:"fit",defaultTableRowHeight:32,defaultTableTdPadding:[0,4,0,4],forceDefaultLineHeight:1},W={w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",a:"http://schemas.openxmlformats.org/drawingml/2006/main",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",c:"http://schemas.openxmlformats.org/drawingml/2006/chart",v:"urn:schemas-microsoft-com:vml",pic:"http://schemas.openxmlformats.org/drawingml/2006/picture",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",rel:"http://schemas.openxmlformats.org/package/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math"};function Ue(r){return r/1440*96}function Df(r){return r*(96/144)}function Lt(r){return r/9525}function Ff(r){return r/8*(96/72)}const Bf={yellow:"#FFFF00",green:"#00FF00",cyan:"#00FFFF",magenta:"#FF00FF",blue:"#0000FF",red:"#FF0000",darkBlue:"#000080",darkCyan:"#008080",darkGreen:"#008000",darkMagenta:"#800080",darkRed:"#800000",darkYellow:"#808000",darkGray:"#808080",lightGray:"#C0C0C0",black:"#000000",white:"#FFFFFF"},Mf={宋体:"SimSun","Song Ti":"SimSun",新宋体:"NSimSun",黑体:"SimHei","Hei Ti":"SimHei",楷体:"KaiTi",楷体_GB2312:"KaiTi","Kai Ti":"KaiTi",仿宋:"FangSong",仿宋_GB2312:"FangSong","Fang Song":"FangSong",微软雅黑:"Microsoft YaHei","Microsoft YaHei":"Microsoft YaHei",等线:"DengXian","等线 Light":"DengXian Light","等线 Regular":"DengXian",幼圆:"YouYuan",华文细黑:"STXihei",华文宋体:"STSong",华文仿宋:"STFangsong",华文楷体:"STKaiti",华文中宋:"STZhongsong",华文琥珀:"STHupo",华文新魏:"STXinwei",华文彩云:"STCaiyun",华文行楷:"STXingkai",华文隶书:"STLiti",方正舒体:"FZShuTi",方正姚体:"FZYaoti","Times New Roman":"Times New Roman",Calibri:"Calibri","Calibri Light":"Calibri Light",Arial:"Arial","Arial Narrow":"Arial Narrow",Verdana:"Verdana",Tahoma:"Tahoma","Courier New":"Courier New",Georgia:"Georgia","Comic Sans MS":"Comic Sans MS",Impact:"Impact","Trebuchet MS":"Trebuchet MS","Palatino Linotype":"Palatino Linotype",Garamond:"Garamond",Century:"Century",Cambria:"Cambria","Cambria Math":"Cambria Math",Consolas:"Consolas","Franklin Gothic Medium":"Franklin Gothic Medium"};function Cr(r){if(r)return Mf[r]??r}const Hf={bullet:{listType:"ul",listStyle:"disc"},decimal:{listType:"ol",listStyle:"decimal"},lowerLetter:{listType:"ol",listStyle:"lower-alpha"},upperLetter:{listType:"ol",listStyle:"upper-alpha"},lowerRoman:{listType:"ol",listStyle:"lower-roman"},upperRoman:{listType:"ol",listStyle:"upper-roman"},chineseCounting:{listType:"ol",listStyle:"cjk-ideographic"},chineseCountingThousand:{listType:"ol",listStyle:"cjk-ideographic"},ideographTraditional:{listType:"ol",listStyle:"cjk-ideographic"},japaneseCounting:{listType:"ol",listStyle:"decimal"},ordinal:{listType:"ol",listStyle:"decimal"},cardinalText:{listType:"ol",listStyle:"decimal"},none:{listType:"ul",listStyle:"none"}},Uf={left:"left",center:"center",right:"right",both:"justify",justify:"justify",distribute:"justify",numTab:"left",highKashida:"left",lowKashida:"left",thaiDistribute:"justify"},jf={none:0,nil:0,single:1,thick:1,double:2,dotted:3,dashed:4,dashSmallGap:4,dotDash:5,dotDotDash:6,triple:7,wave:8,thinThickSmallGap:1,thickThinSmallGap:1,thinThickThinSmallGap:1},Rr={background1:"lt1",background2:"lt2",text1:"dk1",text2:"dk2",light1:"lt1",light2:"lt2",dark1:"dk1",dark2:"dk2"};function kt(r){return new DOMParser().parseFromString(r,"application/xml")}function Ir(r,e,t){const n=[];for(let i=0;i<r.childNodes.length;i++){const s=r.childNodes[i];s.nodeType===1&&s.localName===t&&s.namespaceURI===e&&n.push(s)}return n}function fe(r,e,t){for(let n=0;n<r.childNodes.length;n++){const i=r.childNodes[n];if(i.nodeType===1&&i.localName===t&&i.namespaceURI===e)return i}return null}function Se(r){return r&&(r.getAttributeNS(W.w,"val")||r.getAttribute("w:val"))||null}function Oe(r,e){for(let t=0;t<r.childNodes.length;t++){const n=r.childNodes[t];n.nodeType===1&&e(n)}}function En(r,e,t){return fe(r,e,t)!==null}function Wf(r){const e={colors:new Map,majorFont:null,minorFont:null};if(!r)return e;const n=kt(r).documentElement;return zf(n,e),Gf(n,e),e}function zf(r,e){const t=r.getElementsByTagNameNS(W.a,"clrScheme");if(t.length===0)return;const n=t[0];Oe(n,i=>{const s=i.localName,o=fe(i,W.a,"srgbClr");if(o){const l=o.getAttribute("val");if(l){e.colors.set(s,l.toUpperCase());return}}const a=fe(i,W.a,"sysClr");if(a){const l=a.getAttribute("lastClr");l&&e.colors.set(s,l.toUpperCase())}})}function Gf(r,e){const t=r.getElementsByTagNameNS(W.a,"fontScheme");if(t.length===0)return;const n=t[0],i=fe(n,W.a,"majorFont");i&&(e.majorFont=Oa(i));const s=fe(n,W.a,"minorFont");s&&(e.minorFont=Oa(s))}function Oa(r){const e=fe(r,W.a,"ea");if(e){const n=e.getAttribute("typeface");if(n&&n!=="")return n}const t=fe(r,W.a,"latin");if(t){const n=t.getAttribute("typeface");if(n&&n!=="")return n}return null}function Nr(r,e,t,n){const i=Rr[e]??e,s=r.colors.get(i);if(!s)return null;if(!t&&!n)return`#${s}`;const o=parseInt(s.substring(0,2),16)/255,a=parseInt(s.substring(2,4),16)/255,l=parseInt(s.substring(4,6),16)/255,[c,f,m]=qf(o,a,l);let v=m;if(t){const _=parseInt(t,16)/255;v=m+(1-m)*_}if(n){const _=parseInt(n,16)/255;v=m*_}v=Math.min(1,Math.max(0,v));const[y,b,g]=Vf(c,f,v);return`#${Sn(y)}${Sn(b)}${Sn(g)}`.toUpperCase()}function Kf(r,e){if(!e)return null;const t=e.toLowerCase();return t.startsWith("major")?r.majorFont:t.startsWith("minor")?r.minorFont:null}function qf(r,e,t){const n=Math.max(r,e,t),i=Math.min(r,e,t),s=n-i;let o=0,a=0;const l=(n+i)/2;return s!==0&&(a=l>.5?s/(2-n-i):s/(n+i),n===r?o=((e-t)/s+(e<t?6:0))/6:n===e?o=((t-r)/s+2)/6:o=((r-e)/s+4)/6),[o,a,l]}function Vf(r,e,t){if(e===0){const s=Math.round(t*255);return[s,s,s]}const n=t<.5?t*(1+e):t+e-t*e,i=2*t-n;return[Math.round(An(i,n,r+1/3)*255),Math.round(An(i,n,r)*255),Math.round(An(i,n,r-1/3)*255)]}function An(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*(2/3-t)*6:r}function Sn(r){return Math.min(255,Math.max(0,r)).toString(16).padStart(2,"0")}class $f{constructor(e,t){Ee(this,"styleMap",new Map);Ee(this,"defaultParagraphStyle",{});Ee(this,"defaultRunStyle",{});Ee(this,"theme");this.theme=t,e&&this.parseStylesXml(e)}parseParagraphProperties(e){const t={},n=fe(e,W.w,"jc");if(n){const l=Se(n);l&&(t.rowFlex=l)}Xf(e,t),Yf(e,t);const i=fe(e,W.w,"shd");if(i){const l=xn(i,this.theme);t.paragraphColor=l??""}const s=fe(e,W.w,"outlineLvl");if(s){const l=Se(s);if(l!==null){const c=parseInt(l,10);c>=0&&c<=5&&(t.titleLevel=c+1)}}const o=fe(e,W.w,"numPr");if(o){const l=fe(o,W.w,"numId"),c=fe(o,W.w,"ilvl");if(l&&(t.numId=Se(l)??void 0),c){const f=Se(c);f!==null&&(t.listLevel=parseInt(f,10))}}const a=fe(e,W.w,"tabs");return a&&(t.tabStops=Zf(a)),t}parseRunProperties(e){const t={};if(En(e,W.w,"b")){const f=fe(e,W.w,"b"),m=f?Se(f):null;t.bold=m!=="0"&&m!=="false"}if(En(e,W.w,"i")){const f=fe(e,W.w,"i"),m=f?Se(f):null;t.italic=m!=="0"&&m!=="false"}const n=fe(e,W.w,"u");if(n){const f=Se(n);t.underline=f!=="none"&&f!=="0"}if(En(e,W.w,"strike")){const f=fe(e,W.w,"strike"),m=f?Se(f):null;t.strikeout=m!=="0"&&m!=="false"}const i=fe(e,W.w,"sz")??fe(e,W.w,"szCs");if(i){const f=Se(i);f&&(t.size=Df(parseInt(f,10)))}const s=fe(e,W.w,"rFonts");s&&(t.font=Jf(s,this.theme));const o=fe(e,W.w,"color");o&&(t.color=Qf(o,this.theme));const a=fe(e,W.w,"highlight");if(a){const f=Se(a);f&&f!=="none"&&(t.highlight=Bf[f]??`#${f}`)}if(!t.highlight){const f=fe(e,W.w,"shd");if(f){const m=xn(f,this.theme);m&&(t.highlight=m)}}const l=fe(e,W.w,"spacing");if(l){const f=Se(l);if(f){const m=parseInt(f,10),v=Ue(m);Math.abs(v)>=.5&&(t.letterSpacing=v)}}const c=fe(e,W.w,"vertAlign");if(c){const f=Se(c);(f==="superscript"||f==="subscript")&&(t.vertAlign=f)}return t}resolveStyle(e){const t={paragraph:{...this.defaultParagraphStyle},run:{...this.defaultRunStyle}};if(!e)return t;const n=[];let i=e;const s=new Set;for(;i&&!s.has(i);){s.add(i);const o=this.styleMap.get(i);if(!o)break;n.unshift(o),i=o.basedOnId}for(const o of n)Pa(t.paragraph,o.paragraphStyle),Pa(t.run,o.runStyle);return t}getDefaultRunStyle(){return{...this.defaultRunStyle}}getDefaultParagraphStyle(){return{...this.defaultParagraphStyle}}parseStylesXml(e){const n=kt(e).documentElement,i=fe(n,W.w,"docDefaults");i&&this.parseDocDefaults(i);const s=n.getElementsByTagNameNS(W.w,"style");for(let o=0;o<s.length;o++)this.parseStyleElement(s[o])}parseDocDefaults(e){const t=fe(e,W.w,"rPrDefault");if(t){const i=fe(t,W.w,"rPr");i&&(this.defaultRunStyle=this.parseRunProperties(i))}const n=fe(e,W.w,"pPrDefault");if(n){const i=fe(n,W.w,"pPr");i&&(this.defaultParagraphStyle=this.parseParagraphProperties(i))}}parseStyleElement(e){const t=e.getAttributeNS(W.w,"styleId")??e.getAttribute("w:styleId")??e.getAttribute("styleId")??"";if(!t)return;const n=fe(e,W.w,"name"),i=Se(n)??"",s=fe(e,W.w,"basedOn"),o=Se(s);let a={},l={};const c=fe(e,W.w,"pPr");if(c&&(a=this.parseParagraphProperties(c)),a.titleLevel===void 0){const m=td(i,t);m!==void 0&&(a.titleLevel=m)}const f=fe(e,W.w,"rPr");f&&(l=this.parseRunProperties(f)),this.styleMap.set(t,{id:t,name:i,basedOnId:o,paragraphStyle:a,runStyle:l})}}function Xf(r,e){const t=fe(r,W.w,"spacing");if(!t)return;const n=t.getAttributeNS(W.w,"before")??t.getAttribute("w:before"),i=t.getAttributeNS(W.w,"after")??t.getAttribute("w:after"),s=t.getAttributeNS(W.w,"line")??t.getAttribute("w:line"),o=t.getAttributeNS(W.w,"lineRule")??t.getAttribute("w:lineRule");if(n&&(e.spacingBefore=Ue(parseInt(n,10))),i&&(e.spacingAfter=Ue(parseInt(i,10))),s){const a=parseInt(s,10);!o||o==="auto"?(e.lineHeight=a/240,e.lineHeightRule="auto"):o==="exact"?(e.lineHeight=Ue(a),e.lineHeightRule="exact"):o==="atLeast"&&(e.lineHeight=Ue(a),e.lineHeightRule="atLeast")}}function Yf(r,e){const t=fe(r,W.w,"ind");if(!t)return;const n=t.getAttributeNS(W.w,"left")??t.getAttribute("w:left"),i=t.getAttributeNS(W.w,"right")??t.getAttribute("w:right"),s=t.getAttributeNS(W.w,"firstLine")??t.getAttribute("w:firstLine"),o=t.getAttributeNS(W.w,"hanging")??t.getAttribute("w:hanging"),a=n?Ue(parseInt(n,10)):0,l=o?Ue(parseInt(o,10)):0;n&&o&&Math.abs(a-l)<2||(n&&(e.indentLeft=a),i&&(e.indentRight=Ue(parseInt(i,10))),s?e.firstLineIndent=Ue(parseInt(s,10)):o&&(e.indentLeft=a+l,e.firstLineIndent=-l))}function Zf(r){const e=[],t=r.getElementsByTagNameNS(W.w,"tab");for(let n=0;n<t.length;n++){const i=t[n],s=i.getAttributeNS(W.w,"val")??i.getAttribute("w:val")??"left",o=i.getAttributeNS(W.w,"pos")??i.getAttribute("w:pos");o&&e.push({pos:Ue(parseInt(o,10)),type:s})}return e}function Jf(r,e){const t=r.getAttributeNS(W.w,"eastAsia")??r.getAttribute("w:eastAsia");if(t)return Cr(t);const n=r.getAttributeNS(W.w,"ascii")??r.getAttribute("w:ascii");if(n)return Cr(n);const i=r.getAttributeNS(W.w,"hAnsi")??r.getAttribute("w:hAnsi");if(i)return Cr(i);const s=r.getAttributeNS(W.w,"eastAsiaTheme")??r.getAttribute("w:eastAsiaTheme"),o=r.getAttributeNS(W.w,"asciiTheme")??r.getAttribute("w:asciiTheme"),a=Kf(e,s??o);if(a)return Cr(a)}function Qf(r,e){const t=r.getAttributeNS(W.w,"themeColor")??r.getAttribute("w:themeColor");if(t){const i=Rr[t]??t,s=r.getAttributeNS(W.w,"themeTint")??r.getAttribute("w:themeTint")??void 0,o=r.getAttributeNS(W.w,"themeShade")??r.getAttribute("w:themeShade")??void 0;return Nr(e,i,s,o)??void 0}const n=Se(r);if(!(!n||n==="auto"))return`#${n}`}function xn(r,e){const t=r.getAttributeNS(W.w,"val")??r.getAttribute("w:val");if(t==="nil")return null;if(t==="solid")return ed(r,e);const n=r.getAttributeNS(W.w,"themeFill")??r.getAttribute("w:themeFill");if(n){const s=Rr[n]??n,o=r.getAttributeNS(W.w,"themeFillTint")??r.getAttribute("w:themeFillTint")??void 0,a=r.getAttributeNS(W.w,"themeFillShade")??r.getAttribute("w:themeFillShade")??void 0,l=Nr(e,s,o,a);return l?Or(l)?null:l:null}const i=r.getAttributeNS(W.w,"fill")??r.getAttribute("w:fill");return!i||i==="auto"||Or(`#${i}`)?null:`#${i}`}function ed(r,e){const t=r.getAttributeNS(W.w,"themeColor")??r.getAttribute("w:themeColor");if(t){const i=Rr[t]??t,s=r.getAttributeNS(W.w,"themeTint")??r.getAttribute("w:themeTint")??void 0,o=r.getAttributeNS(W.w,"themeShade")??r.getAttribute("w:themeShade")??void 0,a=Nr(e,i,s,o);return a?Or(a)?null:a:null}const n=r.getAttributeNS(W.w,"color")??r.getAttribute("w:color");return!n||n==="auto"||Or(`#${n}`)?null:`#${n}`}function Or(r){const e=r.toUpperCase().replace("#","");return e==="FFFFFF"||e==="FFF"||e==="AUTO"}function td(r,e){const t=[/^heading\s*(\d+)$/i,/^标题\s*(\d+)$/];for(const n of t){const i=r.match(n)??e.match(n);if(i){const s=parseInt(i[1],10);if(s>=1&&s<=6)return s}}}function Pa(r,e){for(const t of Object.keys(e))e[t]!==void 0&&(r[t]=e[t])}class rd{constructor(e){Ee(this,"abstractNums",new Map);Ee(this,"numRefs",new Map);e&&this.parseNumberingXml(e)}resolve(e,t){const n=this.numRefs.get(e);if(!n)return null;const i=this.abstractNums.get(n.abstractNumId);if(!i)return null;const s=n.levelOverrides.get(t);if(s!=null&&s.overrideLevelDef)return this.mapLevelToInfo(s.overrideLevelDef,t);const o=i.levels.get(t);if(!o){const a=i.levels.get(0);return a?this.mapLevelToInfo(a,t):null}return this.mapLevelToInfo(o,t)}parseNumberingXml(e){const n=kt(e).documentElement;this.parseAbstractNums(n),this.parseNumReferences(n)}parseAbstractNums(e){const t=e.getElementsByTagNameNS(W.w,"abstractNum");for(let n=0;n<t.length;n++){const i=t[n],s=i.getAttributeNS(W.w,"abstractNumId")??i.getAttribute("w:abstractNumId")??"",o=new Map,a=i.getElementsByTagNameNS(W.w,"lvl");for(let l=0;l<a.length;l++){const c=a[l];if(c.parentElement!==i)continue;const f=c.getAttributeNS(W.w,"ilvl")??c.getAttribute("w:ilvl")??"0",m=parseInt(f,10);o.set(m,La(c))}this.abstractNums.set(s,{abstractNumId:s,levels:o})}}parseNumReferences(e){const t=e.getElementsByTagNameNS(W.w,"num");for(let n=0;n<t.length;n++){const i=t[n],s=i.getAttributeNS(W.w,"numId")??i.getAttribute("w:numId")??"",o=fe(i,W.w,"abstractNumId"),a=Se(o)??"",l=new Map,c=i.getElementsByTagNameNS(W.w,"lvlOverride");for(let f=0;f<c.length;f++){const m=c[f],v=m.getAttributeNS(W.w,"ilvl")??m.getAttribute("w:ilvl")??"0",y=parseInt(v,10),b={ilvl:y},g=fe(m,W.w,"startOverride");if(g){const d=Se(g);d&&(b.startOverride=parseInt(d,10))}const _=fe(m,W.w,"lvl");_&&(b.overrideLevelDef=La(_),b.startOverride!==void 0&&(b.overrideLevelDef.start=b.startOverride)),l.set(y,b)}this.numRefs.set(s,{numId:s,abstractNumId:a,levelOverrides:l})}}mapLevelToInfo(e,t){const n=Hf[e.numFmt];return n?{listType:n.listType,listStyle:n.listStyle,level:t,indentLeft:e.indentLeft,indentHanging:e.indentHanging}:nd(e.lvlText)?{listType:"ul",listStyle:"disc",level:t}:{listType:"ol",listStyle:"decimal",level:t}}}function La(r){const e=fe(r,W.w,"numFmt"),t=Se(e)??"decimal",n=fe(r,W.w,"lvlText"),i=Se(n)??"",s=fe(r,W.w,"start"),o=s?parseInt(Se(s)??"1",10):1;let a,l;const c=fe(r,W.w,"pPr");if(c){const f=fe(c,W.w,"ind");if(f){const m=f.getAttributeNS(W.w,"left")??f.getAttribute("w:left"),v=f.getAttributeNS(W.w,"hanging")??f.getAttribute("w:hanging");m&&(a=Ue(parseInt(m,10))),v&&(l=Ue(parseInt(v,10)))}}return{numFmt:t,lvlText:i,start:o,indentLeft:a,indentHanging:l}}function nd(r){return r===""?!0:["·","o","–","•","-","●","○","■","□","◆","◇","★","☆"].includes(r.trim())}function Da(r){const e=new Map,n=kt(r).documentElement;return Oe(n,i=>{if(i.localName==="Relationship"){const s=i.getAttribute("Id")||"",o=i.getAttribute("Type")||"",a=i.getAttribute("Target")||"";s&&e.set(s,{id:s,type:o,target:a})}}),e}const kn={value:0};function Dt(r,e,t,n){const i=[],s=fe(r,W.w,"rPr"),o=s?e.parseRunProperties(s):{},a=sd(n,o);let l=null;return Oe(r,c=>{const f=c.localName;if(f==="t"){const m=c.textContent??"";m!==""&&i.push({type:"text",value:m,style:{...a}}),l=null}else if(f==="delText"){const m=c.textContent??"";m!==""&&i.push({type:"text",value:m,style:{...a}}),l=null}else if(f==="br"){const m=c.getAttributeNS(W.w,"type")??c.getAttribute("w:type"),v=id(m);v!==l&&(i.push({type:"break",breakType:v}),l=v)}else if(f==="tab")i.push({type:"tab"}),l=null;else if(f==="sym"){const m=c.getAttributeNS(W.w,"char")??c.getAttribute("w:char");if(m){const v=parseInt(m,16),y=v>=61440&&v<=61695?v-61440:v;i.push({type:"text",value:String.fromCharCode(y),style:{...a}})}l=null}else f==="softHyphen"?l=null:f==="noBreakHyphen"?(i.push({type:"text",value:"-",style:{...a}}),l=null):(f==="footnoteReference"||f==="endnoteReference")&&(kn.value++,i.push({type:"text",value:String(kn.value),style:{...a,vertAlign:"superscript"}}),l=null)}),i}function id(r){return r==="page"?"page":r==="column"?"column":"line"}function sd(r,e){const t={...r};for(const n of Object.keys(e))e[n]!==void 0&&(t[n]=e[n]);return t}function Fa(r,e,t,n){const i=fe(r,W.wp,"inline"),s=fe(r,W.wp,"anchor"),o=i||s;if(!o)return null;const a=fe(o,W.wp,"extent");let l=100,c=100;if(a){const w=a.getAttribute("cx"),p=a.getAttribute("cy");w&&(l=Lt(parseInt(w,10))),p&&(c=Lt(parseInt(p,10)))}const f=o.getElementsByTagNameNS(W.a,"blip");if(f.length===0)return null;const m=f[0],v=m.getAttributeNS(W.r,"embed")||m.getAttribute("r:embed")||m.getAttributeNS(W.r,"link")||m.getAttribute("r:link")||"";if(!v)return null;const y=e.get(v);if(!y)return null;const b=y.target.replace(/^\.\.\//,""),g=b.startsWith("word/")?b:`word/${b}`,_=t[g]||t[b];if(!_)return null;let d,T;if(s){d=ld(s);const w=n||{top:72,bottom:72,left:90,right:90},p=fe(s,W.wp,"positionH"),E=fe(s,W.wp,"positionV");let O=w.left,P=w.top;if(p){const B=p.getAttribute("relativeFrom")||"column",I=fe(p,W.wp,"posOffset");if(I!=null&&I.textContent){const K=Lt(parseInt(I.textContent,10));B==="page"?O=K:O=w.left+K}else{const K=fe(p,W.wp,"align");K!=null&&K.textContent&&(O=ad(K.textContent.trim(),w,Math.round(l)))}}if(E){const B=E.getAttribute("relativeFrom")||"paragraph",I=fe(E,W.wp,"posOffset");if(I!=null&&I.textContent){const K=Lt(parseInt(I.textContent,10));B==="page"?P=K:P=w.top+K}else{const K=fe(E,W.wp,"align");K!=null&&K.textContent&&(P=od(K.textContent.trim(),w,Math.round(c)))}}T={x:O,y:P}}else i&&(d="inline");return{type:"image",src:_,width:Math.round(l),height:Math.round(c),display:d,floatPosition:T}}function ad(r,e,t){const i=794-e.left-e.right;switch(r){case"left":return e.left;case"center":return e.left+(i-t)/2;case"right":return e.left+i-t;default:return e.left}}function od(r,e,t){const i=1123-e.top-e.bottom;switch(r){case"top":return e.top;case"center":return e.top+(i-t)/2;case"bottom":return e.top+i-t;default:return e.top}}function ld(r){const e=r.getAttribute("behindDoc")==="1",t=fe(r,W.wp,"wrapNone"),n=fe(r,W.wp,"wrapSquare"),i=fe(r,W.wp,"wrapTight"),s=fe(r,W.wp,"wrapThrough"),o=fe(r,W.wp,"wrapTopAndBottom");return n||i||s?"surround":e?"float-bottom":"float-top"}function ud(r,e,t,n){const i=r.getElementsByTagNameNS(W.c,"chart");if(i.length===0)return null;const s=i[0],o=s.getAttributeNS(W.r,"id")||s.getAttribute("r:id")||"";if(!o)return null;const a=e.get(o);if(!a)return null;const l=a.target.startsWith("word/")?a.target:`word/${a.target.replace(/^\.\.\//,"")}`;let c=400,f=300;const m=fe(r,W.wp,"inline")||fe(r,W.wp,"anchor");if(m){const g=fe(m,W.wp,"extent");if(g){const _=g.getAttribute("cx"),d=g.getAttribute("cy");_&&(c=Lt(parseInt(_,10))),d&&(f=Lt(parseInt(d,10)))}}const v=l.replace(/\/([^/]+)$/,"/_rels/$1.rels"),y=t[v];if(y){const g=Da(y);for(const _ of g.values())if(_.type.includes("image")||_.target.match(/\.(png|jpg|jpeg|gif|bmp|tiff)$/i)){const d=cd(l,_.target),T=n[d]||n[_.target];if(T)return{type:"image",src:T,width:Math.round(c),height:Math.round(f)}}}const b=r.getElementsByTagNameNS(W.a,"blip");for(let g=0;g<b.length;g++){const _=b[g],d=_.getAttributeNS(W.r,"embed")||_.getAttribute("r:embed")||"";if(d){const T=e.get(d);if(T){const w=T.target.replace(/^\.\.\//,""),p=w.startsWith("word/")?w:`word/${w}`,E=n[p]||n[w];if(E)return{type:"image",src:E,width:Math.round(c),height:Math.round(f)}}}}return null}function Ba(r){return r.getElementsByTagNameNS(W.c,"chart").length>0}function cd(r,e){const t=r.substring(0,r.lastIndexOf("/")),n=e.split("/"),i=t.split("/");for(const s of n)s===".."?i.pop():s!=="."&&i.push(s);return i.join("/")}const hd="#0563C1";function fd(r,e,t,n,i){const s=dd(r,i),o=[];return Oe(r,a=>{var l,c;if(a.localName==="r"&&a.namespaceURI===W.w){const f=Dt(a,e,t,n);for(const m of f)m.type==="text"&&o.push(Cn(m,a,e))}else if(a.localName==="ins"&&a.namespaceURI===W.w){const f=a.getAttributeNS(W.w,"id")??a.getAttribute("w:id")??"",m=a.getAttributeNS(W.w,"author")??a.getAttribute("w:author")??"",v=a.getAttributeNS(W.w,"date")??a.getAttribute("w:date")??"";let y=f||`rev_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;for(let g=o.length-1;g>=0;g--){const _=o[g];if(_.type==="text"&&((l=_.revision)==null?void 0:l.type)==="delete"&&_.revision.author===m&&_.revision.date===v){_.revision.id!==y&&(y=_.revision.id);break}if(!(_.type==="text"&&((c=_.revision)==null?void 0:c.type)==="delete")&&!(_.type==="text"&&!_.revision))break}const b={id:y,type:"insert",author:m,date:v};Oe(a,g=>{if(g.localName==="r"&&g.namespaceURI===W.w){const _=Dt(g,e,t,n);for(const d of _)d.type==="text"&&(d.revision=b,o.push(Cn(d,g,e)))}})}else if(a.localName==="del"&&a.namespaceURI===W.w){const f=a.getAttributeNS(W.w,"id")??a.getAttribute("w:id")??`rev_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,m=a.getAttributeNS(W.w,"author")??a.getAttribute("w:author")??"",v=a.getAttributeNS(W.w,"date")??a.getAttribute("w:date")??"",y={id:f,type:"delete",author:m,date:v};Oe(a,b=>{if(b.localName==="r"&&b.namespaceURI===W.w){const g=Dt(b,e,t,n);for(const _ of g)_.type==="text"&&(_.revision=y,o.push(Cn(_,b,e)))}})}}),o.length===0?null:{type:"hyperlink",url:s,children:o}}function dd(r,e){const t=r.getAttributeNS(W.r,"id")??r.getAttribute("r:id")??"";if(t){const i=e.get(t);if(i!=null&&i.target)return i.target}const n=r.getAttributeNS(W.w,"anchor")??r.getAttribute("w:anchor");return n?`#${n}`:""}function Cn(r,e,t){const n=fe(e,W.w,"rPr"),i=n?t.parseRunProperties(n):{},s={...r.style};return i.color===void 0&&!s.color&&(s.color=hd),i.underline===void 0&&s.underline===void 0&&(s.underline=!0),{...r,style:s}}function Ft(r,e,t,n,i,s,o,a){const l=fe(r,W.w,"pPr");let c={},f={},m=null;if(l){const b=fe(l,W.w,"pStyle");m=Se(b)}if(m){const b=e.resolveStyle(m);c={...b.paragraph},f={...b.run}}if(l){const b=e.parseParagraphProperties(l);Ha(c,b);const g=fe(l,W.w,"rPr");if(g){const _=e.parseRunProperties(g);Ha(f,_)}}if(!c.titleLevel&&m){const b=yd(m);b!==void 0&&(c.titleLevel=b)}if(c.numId&&c.numId!=="0"){const b=c.listLevel??0,g=n.resolve(c.numId,b);g&&(c.listType=g.listType,c.listStyle=g.listStyle,c.listLevel=g.level)}const v=[];let y="none";if(Oe(r,b=>{var d,T;const g=b.localName,_=b.namespaceURI;if(g!=="pPr"){if(g==="r"&&_===W.w){if(pd(b,y,w=>{y=w}))return;if(y==="cached"){const w=md(b,p=>({type:"text",value:p,style:{...f}}),e,t,f);v.push(...w);return}Qt(b,v,i,s,e,t,f,o)}else if(g==="ins"&&_===W.w){const w=b.getAttributeNS(W.w,"id")??b.getAttribute("w:id")??"",p=b.getAttributeNS(W.w,"author")??b.getAttribute("w:author")??"",E=b.getAttributeNS(W.w,"date")??b.getAttribute("w:date")??"";let O=w||`rev_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;for(let P=v.length-1;P>=0;P--){const B=v[P];if(B.type==="text"&&((d=B.revision)==null?void 0:d.type)==="delete"&&B.revision.author===p&&B.revision.date===E){B.revision.id!==O&&(O=B.revision.id);break}if(!(B.type==="text"&&((T=B.revision)==null?void 0:T.type)==="delete")&&!(B.type==="text"&&!B.revision))break}Oe(b,P=>{P.localName==="r"&&P.namespaceURI===W.w&&Qt(P,v,i,s,e,t,f,o,{id:O,type:"insert",author:p,date:E})})}else if(g==="del"&&_===W.w){const w=b.getAttributeNS(W.w,"id")??b.getAttribute("w:id")??`rev_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,p=b.getAttributeNS(W.w,"author")??b.getAttribute("w:author")??"",E=b.getAttributeNS(W.w,"date")??b.getAttribute("w:date")??"";Oe(b,O=>{O.localName==="r"&&O.namespaceURI===W.w&&Qt(O,v,i,s,e,t,f,o,{id:w,type:"delete",author:p,date:E})})}else if(g==="hyperlink"&&_===W.w){const w=fd(b,e,t,f,i);w&&v.push(w)}else if(g==="AlternateContent"&&_===W.mc)gd(b,v,i,s,e,t,f,o);else if(g==="oMath"&&_===W.m){const w=wd(b,f);v.push(...w)}else if(g==="commentRangeStart"&&_===W.w){const w=b.getAttributeNS(W.w,"id")??b.getAttribute("w:id")??"";w&&v.push({type:"commentMarker",markType:"start",commentId:w})}else if(g==="commentRangeEnd"&&_===W.w){const w=b.getAttributeNS(W.w,"id")??b.getAttribute("w:id")??"";w&&v.push({type:"commentMarker",markType:"end",commentId:w})}}}),v.length===0){const b=f.size??a??12;v.push({type:"text",value:"",style:{...f,size:b}})}return{type:"paragraph",chunks:v,style:c}}function pd(r,e,t){const n=fe(r,W.w,"fldChar"),i=fe(r,W.w,"instrText");if(n){const s=n.getAttributeNS(W.w,"fldCharType")??n.getAttribute("w:fldCharType");return s==="begin"?(t("instr"),!0):s==="separate"?(t("cached"),!0):(s==="end"&&t("none"),!0)}return!!(i&&e==="instr")}function md(r,e,t,n,i){return Dt(r,t,n,i)}function Qt(r,e,t,n,i,s,o,a,l){let c=fe(r,W.w,"drawing"),f=fe(r,W.w,"pict");if(!c&&!f){const m=fe(r,W.mc,"AlternateContent");if(m){const v=fe(m,W.mc,"Choice");if(v&&(c=fe(v,W.w,"drawing")),!c){const y=fe(m,W.mc,"Fallback");y&&(f=fe(y,W.w,"pict"))}}}if(c){if(!Ba(c)){const m=Fa(c,t,n,a);m?e.push(m):e.push(...Pr(c,i,s,o))}}else if(f){const m=Ma(f,t,n);m?e.push(m):e.push(...Pr(f,i,s,o))}else{const m=Dt(r,i,s,o);if(l)for(const v of m)v.type==="text"&&(v.revision=l);e.push(...m)}}function gd(r,e,t,n,i,s,o,a){const l=fe(r,W.mc,"Choice");if(l){let f=!1;if(Oe(l,m=>{if(m.localName==="r"&&m.namespaceURI===W.w)Qt(m,e,t,n,i,s,o,a),f=!0;else if(m.localName==="drawing"&&m.namespaceURI===W.w){if(!Ba(m)){const v=Fa(m,t,n,a);v?e.push(v):e.push(...Pr(m,i,s,o))}f=!0}}),f)return}const c=fe(r,W.mc,"Fallback");c&&Oe(c,f=>{if(f.localName==="r"&&f.namespaceURI===W.w)Qt(f,e,t,n,i,s,o,a);else if(f.localName==="pict"&&f.namespaceURI===W.w){const m=Ma(f,t,n);m?e.push(m):e.push(...Pr(f,i,s,o))}})}function Pr(r,e,t,n){const i=r.getElementsByTagNameNS(W.w,"txbxContent");if(i.length===0)return[];const s=[],o=i[0];let a=!0;return Oe(o,l=>{l.localName==="p"&&l.namespaceURI===W.w&&(a||s.push({type:"break",breakType:"line"}),a=!1,Oe(l,c=>{c.localName==="r"&&c.namespaceURI===W.w&&s.push(...Dt(c,e,t,n))}))}),s}function Ma(r,e,t){const n="urn:schemas-microsoft-com:vml",i=r.getElementsByTagNameNS(n,"imagedata");if(i.length===0)return null;const s=i[0],o=s.getAttributeNS(W.r,"id")??s.getAttribute("r:id")??s.getAttributeNS(W.r,"href")??"";if(!o)return null;const a=e.get(o);if(!a)return null;const l=a.target.replace(/^\.\.\//,""),c=l.startsWith("word/")?l:`word/${l}`,f=t[c]??t[l];if(!f)return null;const m=r.getElementsByTagNameNS(n,"shape");let v=100,y=100;if(m.length>0){const b=m[0].getAttribute("style")??"",g=b.match(/width:\s*([\d.]+)pt/),_=b.match(/height:\s*([\d.]+)pt/);g&&(v=parseFloat(g[1])*(96/72)),_&&(y=parseFloat(_[1])*(96/72))}return{type:"image",src:f,width:Math.round(v),height:Math.round(y)}}function wd(r,e){const t=r.getElementsByTagNameNS(W.m,"t"),n=[];for(let s=0;s<t.length;s++){const o=t[s].textContent??"";o.trim()&&n.push(o)}return[{type:"text",value:n.length>0?n.join(""):"[公式]",style:{...e,italic:!0}}]}function yd(r){const e=r.match(/^heading\s*(\d+)$/i);if(e){const n=parseInt(e[1],10);if(n>=1&&n<=6)return n}const t=r.match(/^标题\s*(\d+)$/);if(t){const n=parseInt(t[1],10);if(n>=1&&n<=6)return n}}function Ha(r,e){for(const t of Object.keys(e))e[t]!==void 0&&(r[t]=e[t])}function Lr(r,e,t,n,i,s,o){const a=vd(r),{borderType:l,borderColor:c,borderWidth:f}=bd(r,t),m=Ir(r,W.w,"tr"),v=[];for(const b of m)v.push(_d(b,e,t,n,i,s,o));return{type:"table",rows:Sd(v),colWidths:a,borderType:l,borderColor:c,borderWidth:f}}function vd(r){const e=[],t=fe(r,W.w,"tblGrid");if(!t)return e;for(const n of Ir(t,W.w,"gridCol")){const i=n.getAttributeNS(W.w,"w")??n.getAttribute("w:w");e.push(i?Ue(parseInt(i,10)):100)}return e}function bd(r,e){const t=fe(r,W.w,"tblPr");if(!t)return{};const n=fe(t,W.w,"tblBorders");if(!n)return{};const i=fe(n,W.w,"top");if(!i)return{};const s=Se(i),o=s==="none"||s==="nil"?"EMPTY":"ALL",a=i.getAttributeNS(W.w,"themeColor")??i.getAttribute("w:themeColor");let l;if(a){const m=Nr(e,a);m&&(l=m)}else{const m=i.getAttributeNS(W.w,"color")??i.getAttribute("w:color");m&&m!=="auto"&&(l=`#${m}`)}const c=i.getAttributeNS(W.w,"sz")??i.getAttribute("w:sz"),f=c?Ff(parseInt(c,10)):void 0;return{borderType:o,borderColor:l,borderWidth:f}}function _d(r,e,t,n,i,s,o){let a;const l=fe(r,W.w,"trPr");if(l){const f=fe(l,W.w,"trHeight");if(f){const m=f.getAttributeNS(W.w,"val")??f.getAttribute("w:val"),v=f.getAttributeNS(W.w,"hRule")??f.getAttribute("w:hRule");if(m){const y=Ue(parseInt(m,10));v==="exact"?a=y:a=Math.min(y,200)}}}const c=[];for(const f of Ir(r,W.w,"tc"))c.push(Td(f,e,t,n,i,s,o));return{height:a,cells:c}}function Td(r,e,t,n,i,s,o){const a=fe(r,W.w,"tcPr");let l=1;if(a){const g=fe(a,W.w,"gridSpan");if(g){const _=Se(g);_&&(l=parseInt(_,10))}}let c=null;if(a){const g=fe(a,W.w,"vMerge");g&&(c=Se(g)==="restart"?"restart":"continue")}let f;if(a){const g=fe(a,W.w,"shd");g&&(f=xn(g,t)??void 0)}let m;if(a){const g=fe(a,W.w,"vAlign");g&&(m=Se(g)??void 0)}let v;if(a){const g=fe(a,W.w,"tcW");if(g){const _=g.getAttributeNS(W.w,"w")??g.getAttribute("w:w"),d=g.getAttributeNS(W.w,"type")??g.getAttribute("w:type");_&&d==="dxa"&&(v=Ue(parseInt(_,10)))}}const y=Ed(a),b=[];return Ad(r,b,e,t,n,i,s,o),{paragraphs:b,colspan:l,vMerge:c,backgroundColor:f,verticalAlign:m,borderTypes:y,width:v}}function Ed(r){if(!r)return;const e=fe(r,W.w,"tcBorders");if(!e)return;const t=["top","right","bottom","left"],n=[];let i=!1;for(const s of t){const o=fe(e,W.w,s);if(o){const a=Se(o)??"single";n.push(jf[a]??1),i=!0}else n.push(-1)}return i?n:void 0}function Ad(r,e,t,n,i,s,o,a){Oe(r,l=>{if(l.localName==="p"&&l.namespaceURI===W.w)e.push(Ft(l,t,n,i,s,o,a));else if(l.localName==="tbl"&&l.namespaceURI===W.w){const c=Lr(l,t,n,i,s,o,a);e.push({type:"paragraph",chunks:[{type:"nestedTable",table:c}],style:{}})}else if(l.localName==="sdt"&&l.namespaceURI===W.w){const c=fe(l,W.w,"sdtContent");c&&Oe(c,f=>{f.localName==="p"&&f.namespaceURI===W.w&&e.push(Ft(f,t,n,i,s,o,a))})}})}function Sd(r){const e=[],t=new Map;for(let n=0;n<r.length;n++){const i=r[n],s=[];let o=0;for(const a of i.cells){if(a.vMerge==="restart")t.set(o,{rowIdx:e.length,cellIdx:s.length}),s.push(Ua(a,1));else if(a.vMerge==="continue"){const l=t.get(o);l&&e[l.rowIdx].cells[l.cellIdx].rowspan++}else t.delete(o),s.push(Ua(a,1));o+=a.colspan}e.push({height:i.height,cells:s})}return e}function Ua(r,e){return{paragraphs:r.paragraphs,colspan:r.colspan,rowspan:e,backgroundColor:r.backgroundColor,verticalAlign:r.verticalAlign,borderTypes:r.borderTypes,width:r.width}}function xd(r){const e=fe(r,W.w,"sdtPr");if(!e)return!1;const t=fe(e,W.w,"docPartObj");if(t){const l=fe(t,W.w,"docPartGallery"),c=Se(l);if(c&&c.toLowerCase().includes("table of contents"))return!0}const n=fe(e,W.w,"alias"),i=Se(n);if(i){const l=i.toLowerCase();if(l.includes("目录")||l.includes("toc")||l.includes("table of contents"))return!0}const s=fe(e,W.w,"tag"),o=Se(s);if(o){const l=o.toLowerCase();if(l.includes("目录")||l.includes("toc"))return!0}const a=fe(r,W.w,"sdtContent");if(a){const l=a.getElementsByTagNameNS(W.w,"instrText");for(let c=0;c<l.length;c++)if((l[c].textContent||"").trim().startsWith("TOC"))return!0}return!1}function kd(r,e,t,n,i,s){const o=[],a=fe(r,W.w,"sdtContent");return a&&Oe(a,l=>{l.localName==="p"&&l.namespaceURI===W.w&&o.push(Ft(l,e,t,n,i,s))}),o}function ja(r){const e={breakType:"nextPage",columns:1,colWidths:[],colSpace:0,separator:!1},t=fe(r,W.w,"type");if(t){const a=t.getAttributeNS(W.w,"val")??t.getAttribute("w:val");(a==="continuous"||a==="nextColumn"||a==="evenPage"||a==="oddPage"||a==="nextPage")&&(e.breakType=a)}const n=fe(r,W.w,"cols");if(!n)return e;const i=n.getAttributeNS(W.w,"num")??n.getAttribute("w:num"),s=n.getAttributeNS(W.w,"space")??n.getAttribute("w:space"),o=n.getAttributeNS(W.w,"sep")??n.getAttribute("w:sep");i&&(e.columns=Math.max(1,parseInt(i,10))),s&&(e.colSpace=Ue(parseInt(s,10))),e.separator=o==="1"||o==="true";for(const a of Ir(n,W.w,"col")){const l=a.getAttributeNS(W.w,"w")??a.getAttribute("w:w");l&&e.colWidths.push(Ue(parseInt(l,10)))}return e}function Wa(r,e,t){const{columns:n,colWidths:i,colSpace:s,separator:o}=e,a=Cd(n,i,s,t),l=Rd(r,n);return{type:"column",columns:n,colWidths:a,colSpace:s,separator:o,groups:l}}function Cd(r,e,t,n){if(e.length>=r)return e.slice(0,r);const i=t*Math.max(0,r-1),s=(n-i)/r;return Array.from({length:r},()=>Math.max(s,50))}function Rd(r,e){const t=[[]];for(const n of r)if(n.chunks.some(s=>s.type==="break"&&s.breakType==="column")&&t.length<e){const s=n.chunks.filter(o=>!(o.type==="break"&&o.breakType==="column"));s.length>0?t.push([{...n,chunks:s}]):t.push([])}else t[t.length-1].push(n);return t}const Ke="http://schemas.openxmlformats.org/drawingml/2006/chart",Id=W.a;function Nd(r){try{const e=Od(r);return!e||e.series.length===0?null:Md(e)}catch(e){return console.error("[ooxmlChartParser] parse error:",e),null}}function Od(r){const n=kt(r).documentElement.getElementsByTagNameNS(Ke,"chart");if(n.length===0)return null;const i=n[0],s=Pd(i),o=i.getElementsByTagNameNS(Ke,"plotArea");if(o.length===0)return null;const a=o[0],l={barChart:"bar",bar3DChart:"bar",lineChart:"line",line3DChart:"line",pieChart:"pie",pie3DChart:"pie",areaChart:"area",area3DChart:"area",scatterChart:"scatter",radarChart:"radar",doughnutChart:"doughnut",ofPieChart:"pie"};for(const[c,f]of Object.entries(l)){const m=a.getElementsByTagNameNS(Ke,c);if(m.length>0){const v=Ld(m[0]);if(v.series.length>0)return{type:f,title:s,categories:v.categories,series:v.series}}}return null}function Pd(r){const e=r.getElementsByTagNameNS(Ke,"title");if(e.length===0)return"";const t=e[0].getElementsByTagNameNS(Id,"t");if(t.length>0)return Array.from(t).map(i=>i.textContent||"").join("");const n=e[0].getElementsByTagNameNS(Ke,"v");return n.length>0&&n[0].textContent||""}function Ld(r){const e=r.getElementsByTagNameNS(Ke,"ser"),t=[];let n=[];for(let i=0;i<e.length;i++){const s=e[i],o=Dd(s)||`系列${i+1}`;n.length===0&&(n=Fd(s));const a=Bd(s);a.length>0&&t.push({name:o,values:a})}if(n.length===0&&t.length>0){const i=Math.max(...t.map(s=>s.values.length));n=Array.from({length:i},(s,o)=>`${o+1}`)}return{categories:n,series:t}}function Dd(r){const e=Rn(r,Ke,"tx");if(e.length===0)return"";const t=Dr(e[0],"strCache");if(t.length>0)return t[0];const n=e[0].getElementsByTagNameNS(Ke,"v");return n.length>0&&n[0].textContent||""}function Fd(r){const e=Rn(r,Ke,"cat");if(e.length===0)return[];const t=Dr(e[0],"strCache");if(t.length>0)return t;const n=Dr(e[0],"numCache");return n.length>0?n:[]}function Bd(r){const e=Rn(r,Ke,"val");return e.length===0?[]:Dr(e[0],"numCache").map(n=>parseFloat(n)||0)}function Dr(r,e){const t=r.getElementsByTagNameNS(Ke,e);if(t.length===0)return[];const i=t[0].getElementsByTagNameNS(Ke,"pt");if(i.length===0)return[];const s=[];for(let a=0;a<i.length;a++){const l=i[a],c=parseInt(l.getAttribute("idx")||"0",10),f=l.getElementsByTagNameNS(Ke,"v"),m=f.length>0&&f[0].textContent||"";s.push({idx:c,val:m})}s.sort((a,l)=>a.idx-l.idx);const o=[];for(const a of s){for(;o.length<a.idx;)o.push("");o.push(a.val)}return o}function Rn(r,e,t){const n=[];for(let i=0;i<r.childNodes.length;i++){const s=r.childNodes[i];s.nodeType===1&&s.localName===t&&s.namespaceURI===e&&n.push(s)}return n}function Md(r){const{type:e,title:t,categories:n,series:i}=r,o={animation:!1,color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],grid:{left:"3%",right:"4%",bottom:"12%",top:t?"15%":"10%",containLabel:!0}};if(t&&(o.title={text:t,left:"center",textStyle:{fontSize:14}}),i.length>1&&(o.legend={show:!0,bottom:0,data:i.map(l=>l.name)}),e==="pie"||e==="doughnut"){const l=n.map((f,m)=>{var v;return{name:f,value:((v=i[0])==null?void 0:v.values[m])||0}});return{...o,tooltip:{trigger:"item",formatter:"{b}: {c} ({d}%)"},series:[{type:"pie",radius:e==="doughnut"?["40%","70%"]:"55%",data:l,label:{formatter:"{b}: {d}%"}}]}}if(e==="radar"){const l=Math.max(...i.flatMap(f=>f.values))*1.2||100,c=n.map(f=>({name:f,max:l}));return{...o,tooltip:{trigger:"item"},radar:{indicator:c,shape:"circle"},series:[{type:"radar",data:i.map(f=>({name:f.name,value:f.values}))}]}}if(e==="scatter")return{...o,tooltip:{trigger:"item"},xAxis:{type:"value"},yAxis:{type:"value"},series:i.map(l=>({name:l.name,type:"scatter",data:l.values.map((c,f)=>[n[f]&&parseFloat(n[f])||f,c])}))};const a=e==="area"?"line":e==="bar"||e==="line"?e:"bar";return{...o,tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},xAxis:{type:"category",data:n,axisLabel:{rotate:n.length>8?45:0}},yAxis:{type:"value"},series:i.map(l=>({name:l.name,type:a,data:l.values,...e==="area"?{areaStyle:{}}:{}}))}}function Hd(r){const e=new Map;if(!r)return e;const i=kt(r).documentElement.getElementsByTagNameNS(W.w,"comment");for(let s=0;s<i.length;s++){const o=i[s],a=o.getAttributeNS(W.w,"id")||o.getAttribute("w:id")||"",l=o.getAttributeNS(W.w,"author")||o.getAttribute("w:author")||"",c=o.getAttributeNS(W.w,"date")||o.getAttribute("w:date")||"",f=o.getAttributeNS(W.w,"initials")||o.getAttribute("w:initials")||void 0;if(!a)continue;const m=Ud(o);e.set(a,{id:a,author:l,date:c,initials:f,content:m})}return e}function Ud(r){const e=[];return Oe(r,t=>{if(t.localName==="p"&&t.namespaceURI===W.w){const n=[];Oe(t,i=>{i.localName==="r"&&i.namespaceURI===W.w&&Oe(i,s=>{s.localName==="t"&&s.namespaceURI===W.w&&n.push(s.textContent||"")})}),e.push(n.join(""))}}),e.join(`
|
|
108
|
+
`)}const vt="",jd={1:"first",2:"second",3:"third",4:"fourth",5:"fifth",6:"sixth"},Wd={top:"top",center:"middle",bottom:"bottom"};let zd=0;function In(){return`docx_${Date.now()}_${++zd}`}function Gd(r,e,t){const n=[],i=new Set,s=e.defaultSize??12,o=Kd(r,s);let a=s;for(let l=0;l<o.length;l++){const c=o[l],f=n.length===0;c.type==="paragraph"?a=Nn(c,n,e,f,i,a):c.type==="table"?(Ka(c,n,e,i),a=s):c.type==="column"&&(tp(c,n,e,i),a=s)}return n.length===0&&n.push({value:vt}),n}function Kd(r,e){const t=[];let n=0;const i=()=>{if(n<=0)return;const s=n;n=0,t.push({type:"paragraph",chunks:[{type:"text",value:vt,style:{size:e}}],style:{spacingAfter:s>1?(s-1)*e*1.2:0}})};for(const s of r)s.type==="paragraph"&&qd(s)?n++:(i(),t.push(s));return i(),t}function qd(r){if(r.chunks.length===0)return!0;if(r.chunks.length===1){const e=r.chunks[0];return e.type==="text"&&e.value===vt}return!1}function Nn(r,e,t,n,i,s){const{style:o,chunks:a}=r,l=t.defaultSize??12,c=t.forceDefaultLineHeight,f={};if(o.rowFlex){const b=Uf[o.rowFlex];b&&(f.rowFlex=b)}o.spacingBefore!==void 0&&(f.paragraphSpacingBefore=o.spacingBefore),o.spacingAfter!==void 0&&(f.paragraphSpacingAfter=o.spacingAfter),c?f.lineHeight=c:o.lineHeight!==void 0&&(f.lineHeight=o.lineHeight),o.indentLeft!==void 0&&(f.paragraphIndentLeft=o.indentLeft),o.firstLineIndent!==void 0&&(f.paragraphFirstLineIndent=o.firstLineIndent),o.paragraphColor&&(f.paragraphColor=o.paragraphColor);const m=o.titleLevel!==void 0&&o.titleLevel>=1&&o.titleLevel<=6,v=!!o.listType;if(!n&&e.length>0){const b={value:vt,size:s};e.push(b)}const y=[];for(const b of a)$d(b,y,t,i);if(y.length===0&&y.push({value:vt,size:l}),m){za(y,f);const b={value:"",type:"title",level:jd[o.titleLevel],valueList:y,...f};e.push(b)}else if(v){za(y,f);const b={value:"",type:"list",listType:o.listType,listStyle:o.listStyle,listLevel:o.listLevel,valueList:y,...f};e.push(b)}else for(let b=0;b<y.length;b++){const g=y[b];b===0?Object.assign(g,f):(f.rowFlex&&(g.rowFlex=f.rowFlex),f.paragraphColor&&(g.paragraphColor=f.paragraphColor)),e.push(g)}return Vd(y,l)}function za(r,e){for(const t of r)e.rowFlex&&(t.rowFlex=e.rowFlex),e.paragraphColor&&(t.paragraphColor=e.paragraphColor)}function Vd(r,e){for(let t=r.length-1;t>=0;t--){const n=r[t].size;if(typeof n=="number"&&n>0)return n}return e}function $d(r,e,t,n){switch(r.type){case"text":Xd(r,e,t,n);break;case"image":Yd(r,e,n);break;case"hyperlink":Jd(r,e,t,n);break;case"break":Qd(r,e);break;case"tab":e.push({value:"",type:"tab"});break;case"commentMarker":r.markType==="start"?n.add(`comment_${r.commentId}`):n.delete(`comment_${r.commentId}`);break;case"bookmark":break;default:r.type}}function Xd(r,e,t,n){const{value:i,style:s}=r,o=t.defaultSize??12;for(const a of i){const l={value:a};Ga(l,s),s.vertAlign==="superscript"?(l.type="superscript",l.actualSize=(s.size??o)*.6):s.vertAlign==="subscript"&&(l.type="subscript",l.actualSize=(s.size??o)*.6),n.size>0&&(l.groupIds=[...n]),r.revision&&(l.revisionId=r.revision.id,l.revisionType=r.revision.type,l.revisionAuthor=r.revision.author,l.revisionDate=r.revision.date,r.revision.type==="insert"?l.color=l.color||"#1a73e8":r.revision.type==="delete"&&(l.color=l.color||"#f56c6c")),e.push(l)}}function Yd(r,e,t){const n={value:r.src,type:"image",width:r.width,height:r.height,id:In()};r.display&&(n.imgDisplay=Zd(r.display),r.floatPosition&&n.imgDisplay!=="inline"&&n.imgDisplay!=="block"&&(n.imgFloatPosition=r.floatPosition)),t.size>0&&(n.groupIds=[...t]),e.push(n)}function Zd(r){return{inline:"inline",block:"block",surround:"surround","float-top":"float-top","float-bottom":"float-bottom",floatTop:"float-top"}[r]??"inline"}function Jd(r,e,t,n){t.defaultSize;const i=[];for(const o of r.children)for(const a of o.value){const l={value:a};Ga(l,o.style),n.size>0&&(l.groupIds=[...n]),o.revision&&(l.revisionId=o.revision.id,l.revisionType=o.revision.type,l.revisionAuthor=o.revision.author,l.revisionDate=o.revision.date,o.revision.type==="insert"?l.color=l.color||"#1a73e8":o.revision.type==="delete"&&(l.color=l.color||"#f56c6c")),i.push(l)}if(i.length===0)return;const s={value:"",type:"hyperlink",url:r.url,hyperlinkId:In(),valueList:i};n.size>0&&(s.groupIds=[...n]),e.push(s)}function Qd(r,e){r.breakType==="page"?e.push({value:`
|
|
109
109
|
`,type:"pageBreak"}):r.breakType==="line"&&e.push({value:`
|
|
110
|
-
`})}function
|
|
111
|
-
`,type:"columnBreak",columnId:i});let a=t.defaultSize??12;for(let l=0;l<o.length;l++){const h=l===0&&s===0;a=In(o[l],e,t,h,n,a);const m=e[e.length-1];m&&!m.columnId&&(m.columnId=i)}}e.push({value:bt})}class Va{constructor(e){Se(this,"options");this.options={...e}}async parse(e){try{const t=await cf.loadAsync(e),[n,i,s,o,a,l]=await Promise.all([this.readZipEntry(t,"word/document.xml"),this.readZipEntry(t,"word/styles.xml"),this.readZipEntry(t,"word/numbering.xml"),this.readZipEntry(t,"word/theme/theme1.xml"),this.readZipEntry(t,"word/_rels/document.xml.rels"),this.readZipEntry(t,"word/comments.xml")]);if(!n)return{success:!1,elements:[],error:"Missing word/document.xml"};const h=await this.extractMediaFiles(t),f=await this.extractChartRelFiles(t),m=await this.extractChartXmlFiles(t),v={documentXml:n,stylesXml:i,numberingXml:s,themeXml:o,documentRels:a,commentsXml:l,chartRelsMap:f,chartXmlMap:m,mediaMap:h,options:this.getMergedOptions()};return this.parseDocumentSync(v)}catch(t){const n=t instanceof Error?t.message:String(t);return{success:!1,elements:[],error:n}}}async parseFromFile(e){const t=await e.arrayBuffer();return this.parse(t)}async parseDocumentSync(e){try{xn.value=0;let t=null;if(e.options.chartRenderer&&Object.keys(e.chartXmlMap).length>0){const p=e.options.chartRenderer;t=(E,P,L,M)=>p.renderToDataUrl(E,P,L,M)}const n=Wf(e.themeXml),i=new zf(e.stylesXml,n),s=new ed(e.numberingXml),o=Bd(e.commentsXml),a=e.documentRels?Pa(e.documentRels):new Map,h=kt(e.documentXml).documentElement.getElementsByTagNameNS(G.w,"body");if(h.length===0)return{success:!1,elements:[],error:"No <w:body> found"};const f=h[0],m=rp(f,G.w,fe),v=e.options.defaultSize??12,y=[];let b=[];const g=[],_=()=>{for(const p of b)y.push(p);b=[]},d=p=>{g.length>0&&(p.chunks.unshift(...g),g.length=0)};Ne(f,p=>{const E=p.localName,P=p.namespaceURI;if(E==="p"&&P===G.w){const L=Dt(p,i,n,s,a,e.mediaMap,m,v);d(L),ep(p,L,a,e.chartRelsMap,e.chartXmlMap,e.mediaMap,t,{c:G.c,r:G.r,wp:G.wp,w:G.w},fe);const M=fe(p,G.w,"pPr"),C=M?fe(M,G.w,"sectPr"):null;if(C){const z=Ma(C);if(z.columns>1){b.push(L);const N=e.options.targetInnerWidth??600;y.push(Ua(b,z,N)),b=[]}else _(),y.push(L);const ue=z.breakType;ue!=="continuous"&&ue!=="nextColumn"&&y.push({type:"paragraph",chunks:[{type:"break",breakType:"page"}],style:{}})}else b.push(L)}else if(E==="tbl"&&P===G.w)_(),y.push(Lr(p,i,n,s,a,e.mediaMap,m));else if(E==="sdt"&&P===G.w)ja(p,b,y,_,i,n,s,a,e.mediaMap,m,v,G.w,fe,Ne);else if(E==="customXml"&&P===G.w)Ne(p,L=>{L.localName==="p"&&L.namespaceURI===G.w?b.push(Dt(L,i,n,s,a,e.mediaMap,m,v)):L.localName==="tbl"&&L.namespaceURI===G.w&&(_(),y.push(Lr(L,i,n,s,a,e.mediaMap,m)))});else if(E==="sectPr"&&P===G.w){const L=Ma(p);if(L.columns>1&&b.length>0){const M=e.options.targetInnerWidth??600;y.push(Ua(b,L,M)),b=[]}}else if(E==="commentRangeStart"&&P===G.w){const L=p.getAttributeNS(G.w,"id")??p.getAttribute("w:id")??"";L&&g.push({type:"commentMarker",markType:"start",commentId:L})}else if(E==="commentRangeEnd"&&P===G.w){const L=p.getAttributeNS(G.w,"id")??p.getAttribute("w:id")??"";L&&g.push({type:"commentMarker",markType:"end",commentId:L})}}),_();const T=Gd(y,e.options,o),w=o.size>0?[...o.values()]:void 0;return{success:!0,elements:T,comments:w}}catch(t){const n=t instanceof Error?t.message:String(t);return{success:!1,elements:[],error:`Parse failed: ${n}`}}}async readZipEntry(e,t){const n=e.file(t);return n?n.async("string"):null}async extractMediaFiles(e){const t={},n={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",tiff:"image/tiff",tif:"image/tiff",svg:"image/svg+xml",emf:"image/x-emf",wmf:"image/x-wmf"},i=[];return e.forEach((s,o)=>{s.startsWith("word/media/")&&!o.dir&&i.push(o.async("base64").then(a=>{var m;const l=((m=s.split(".").pop())==null?void 0:m.toLowerCase())??"png",f=`data:${n[l]??"image/png"};base64,${a}`;t[s]=f,t[s.replace("word/","")]=f}))}),await Promise.all(i),t}async extractChartRelFiles(e){const t={},n=[];return e.forEach((i,s)=>{i.includes("charts/_rels/")&&i.endsWith(".rels")&&!s.dir&&n.push(s.async("string").then(o=>{t[i]=o}))}),await Promise.all(n),t}async extractChartXmlFiles(e){const t={},n=[];return e.forEach((i,s)=>{i.match(/^word\/charts\/chart\d+\.xml$/)&&!s.dir&&n.push(s.async("string").then(o=>{t[i]=o}))}),await Promise.all(n),t}getMergedOptions(){return{...Pf,...this.options}}}function ja(r,e,t,n,i,s,o,a,l,h,f,m,v,y){if(Sd(r)){const g=xd(r,i,s,o,a,l);for(const _ of g)e.push(_);return}const b=v(r,m,"sdtContent");b&&y(b,g=>{g.localName==="p"&&g.namespaceURI===m?e.push(Dt(g,i,s,o,a,l,h,f)):g.localName==="tbl"&&g.namespaceURI===m?(n(),t.push(Lr(g,i,s,o,a,l,h))):g.localName==="sdt"&&g.namespaceURI===m&&ja(g,e,t,n,i,s,o,a,l,h,f,m,v,y)})}function ep(r,e,t,n,i,s,o,a,l){const h=r.getElementsByTagNameNS(a.w,"drawing");for(let f=0;f<h.length;f++){const m=h[f];if(!m.getElementsByTagNameNS(a.c,"chart").length)continue;let v=od(m,t,n,s);!v&&o&&(v=tp(m,t,i,o,a,l)),v&&e.chunks.push(v)}}function tp(r,e,t,n,i,s){const o=r.getElementsByTagNameNS(i.c,"chart");if(o.length===0)return null;const a=o[0].getAttributeNS(i.r,"id")??o[0].getAttribute("r:id")??"";if(!a)return null;const l=e.get(a);if(!l)return null;const h=l.target.startsWith("word/")?l.target:`word/${l.target.replace(/^\.\.\//,"")}`,f=t[h];if(!f)return null;let m=400,v=300;const y=s(r,i.wp,"inline")??s(r,i.wp,"anchor");if(y){const g=s(y,i.wp,"extent");if(g){const _=g.getAttribute("cx"),d=g.getAttribute("cy");_&&(m=Math.round(parseInt(_,10)/9525)),d&&(v=Math.round(parseInt(d,10)/9525))}}const b=Id(f);if(!b)return null;try{return{type:"image",src:n(b,m,v,2),width:m,height:v}}catch{return null}}function rp(r,e,t){const n={top:72,bottom:72,left:90,right:90},i=t(r,e,"sectPr");if(!i)return n;const s=t(i,e,"pgMar");if(!s)return n;const o=v=>v?parseInt(v,10):null,a=v=>v/1440*96,l=o(s.getAttributeNS(e,"top")??s.getAttribute("w:top")),h=o(s.getAttributeNS(e,"bottom")??s.getAttribute("w:bottom")),f=o(s.getAttributeNS(e,"left")??s.getAttribute("w:left")),m=o(s.getAttributeNS(e,"right")??s.getAttribute("w:right"));return{top:l!==null?a(l):n.top,bottom:h!==null?a(h):n.bottom,left:f!==null?a(f):n.left,right:m!==null?a(m):n.right}}function Za(r){return new Va(r)}async function np(r,e){const t=Za(e);return r instanceof File?t.parseFromFile(r):t.parse(r)}var ip=Object.defineProperty,sp=Object.defineProperties,ap=Object.getOwnPropertyDescriptors,Fr=Object.getOwnPropertySymbols,za=Object.prototype.hasOwnProperty,Xa=Object.prototype.propertyIsEnumerable,Cn=(r,e,t)=>e in r?ip(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ye=(r,e)=>{for(var t in e||(e={}))za.call(e,t)&&Cn(r,t,e[t]);if(Fr)for(var t of Fr(e))Xa.call(e,t)&&Cn(r,t,e[t]);return r},Ce=(r,e)=>sp(r,ap(e)),Ka=(r,e)=>{var t={};for(var n in r)za.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&Fr)for(var n of Fr(r))e.indexOf(n)<0&&Xa.call(r,n)&&(t[n]=r[n]);return t},ne=(r,e,t)=>Cn(r,typeof e!="symbol"?e+"":e,t),Nn=(r,e,t)=>new Promise((n,i)=>{var s=l=>{try{a(t.next(l))}catch(h){i(h)}},o=l=>{try{a(t.throw(l))}catch(h){i(h)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((t=t.apply(r,e)).next())});class $t{constructor(e){ne(this,"rootKey"),this.rootKey=e}}const Ya=Object.seal({});class q extends $t{constructor(e){super(e),ne(this,"root"),this.root=new Array}prepForXml(e){var t;e.stack.push(this);const n=this.root.map(i=>i instanceof $t?i.prepForXml(e):i).filter(i=>i!==void 0);return e.stack.pop(),{[this.rootKey]:n.length?n.length===1&&((t=n[0])!=null&&t._attr)?n[0]:n:Ya}}addChildElement(e){return this.root.push(e),this}}class ct extends q{constructor(e,t){super(e),ne(this,"includeIfEmpty"),this.includeIfEmpty=t}prepForXml(e){const t=super.prepForXml(e);if(this.includeIfEmpty||t&&(typeof t[this.rootKey]!="object"||Object.keys(t[this.rootKey]).length))return t}}class we extends $t{constructor(e){super("_attr"),ne(this,"xmlKeys"),this.root=e}prepForXml(e){const t={};return Object.entries(this.root).forEach(([n,i])=>{if(i!==void 0){const s=this.xmlKeys&&this.xmlKeys[n]||n;t[s]=i}}),{_attr:t}}}class Pn extends $t{constructor(e){super("_attr"),this.root=e}prepForXml(e){return{_attr:Object.values(this.root).filter(({value:n})=>n!==void 0).reduce((n,{key:i,value:s})=>Ce(ye({},n),{[i]:s}),{})}}}class De extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w:val",color:"w:color",fill:"w:fill",space:"w:space",sz:"w:sz",type:"w:type",rsidR:"w:rsidR",rsidRPr:"w:rsidRPr",rsidSect:"w:rsidSect",w:"w:w",h:"w:h",top:"w:top",right:"w:right",bottom:"w:bottom",left:"w:left",header:"w:header",footer:"w:footer",gutter:"w:gutter",linePitch:"w:linePitch",pos:"w:pos"})}}var Ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ln(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var On={},Dr={exports:{}},Ja;function Fn(){if(Ja)return Dr.exports;Ja=1;var r=typeof Reflect=="object"?Reflect:null,e=r&&typeof r.apply=="function"?r.apply:function(E,P,L){return Function.prototype.apply.call(E,P,L)},t;r&&typeof r.ownKeys=="function"?t=r.ownKeys:Object.getOwnPropertySymbols?t=function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:t=function(E){return Object.getOwnPropertyNames(E)};function n(p){console&&console.warn&&console.warn(p)}var i=Number.isNaN||function(E){return E!==E};function s(){s.init.call(this)}Dr.exports=s,Dr.exports.once=d,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(p){if(typeof p!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof p)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(p){if(typeof p!="number"||p<0||i(p))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+p+".");o=p}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(E){if(typeof E!="number"||E<0||i(E))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+E+".");return this._maxListeners=E,this};function l(p){return p._maxListeners===void 0?s.defaultMaxListeners:p._maxListeners}s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(E){for(var P=[],L=1;L<arguments.length;L++)P.push(arguments[L]);var M=E==="error",C=this._events;if(C!==void 0)M=M&&C.error===void 0;else if(!M)return!1;if(M){var z;if(P.length>0&&(z=P[0]),z instanceof Error)throw z;var ue=new Error("Unhandled error."+(z?" ("+z.message+")":""));throw ue.context=z,ue}var N=C[E];if(N===void 0)return!1;if(typeof N=="function")e(N,this,P);else for(var W=N.length,A=b(N,W),L=0;L<W;++L)e(A[L],this,P);return!0};function h(p,E,P,L){var M,C,z;if(a(P),C=p._events,C===void 0?(C=p._events=Object.create(null),p._eventsCount=0):(C.newListener!==void 0&&(p.emit("newListener",E,P.listener?P.listener:P),C=p._events),z=C[E]),z===void 0)z=C[E]=P,++p._eventsCount;else if(typeof z=="function"?z=C[E]=L?[P,z]:[z,P]:L?z.unshift(P):z.push(P),M=l(p),M>0&&z.length>M&&!z.warned){z.warned=!0;var ue=new Error("Possible EventEmitter memory leak detected. "+z.length+" "+String(E)+" listeners added. Use emitter.setMaxListeners() to increase limit");ue.name="MaxListenersExceededWarning",ue.emitter=p,ue.type=E,ue.count=z.length,n(ue)}return p}s.prototype.addListener=function(E,P){return h(this,E,P,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(E,P){return h(this,E,P,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(p,E,P){var L={fired:!1,wrapFn:void 0,target:p,type:E,listener:P},M=f.bind(L);return M.listener=P,L.wrapFn=M,M}s.prototype.once=function(E,P){return a(P),this.on(E,m(this,E,P)),this},s.prototype.prependOnceListener=function(E,P){return a(P),this.prependListener(E,m(this,E,P)),this},s.prototype.removeListener=function(E,P){var L,M,C,z,ue;if(a(P),M=this._events,M===void 0)return this;if(L=M[E],L===void 0)return this;if(L===P||L.listener===P)--this._eventsCount===0?this._events=Object.create(null):(delete M[E],M.removeListener&&this.emit("removeListener",E,L.listener||P));else if(typeof L!="function"){for(C=-1,z=L.length-1;z>=0;z--)if(L[z]===P||L[z].listener===P){ue=L[z].listener,C=z;break}if(C<0)return this;C===0?L.shift():g(L,C),L.length===1&&(M[E]=L[0]),M.removeListener!==void 0&&this.emit("removeListener",E,ue||P)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(E){var P,L,M;if(L=this._events,L===void 0)return this;if(L.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):L[E]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete L[E]),this;if(arguments.length===0){var C=Object.keys(L),z;for(M=0;M<C.length;++M)z=C[M],z!=="removeListener"&&this.removeAllListeners(z);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(P=L[E],typeof P=="function")this.removeListener(E,P);else if(P!==void 0)for(M=P.length-1;M>=0;M--)this.removeListener(E,P[M]);return this};function v(p,E,P){var L=p._events;if(L===void 0)return[];var M=L[E];return M===void 0?[]:typeof M=="function"?P?[M.listener||M]:[M]:P?_(M):b(M,M.length)}s.prototype.listeners=function(E){return v(this,E,!0)},s.prototype.rawListeners=function(E){return v(this,E,!1)},s.listenerCount=function(p,E){return typeof p.listenerCount=="function"?p.listenerCount(E):y.call(p,E)},s.prototype.listenerCount=y;function y(p){var E=this._events;if(E!==void 0){var P=E[p];if(typeof P=="function")return 1;if(P!==void 0)return P.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function b(p,E){for(var P=new Array(E),L=0;L<E;++L)P[L]=p[L];return P}function g(p,E){for(;E+1<p.length;E++)p[E]=p[E+1];p.pop()}function _(p){for(var E=new Array(p.length),P=0;P<E.length;++P)E[P]=p[P].listener||p[P];return E}function d(p,E){return new Promise(function(P,L){function M(z){p.removeListener(E,C),L(z)}function C(){typeof p.removeListener=="function"&&p.removeListener("error",M),P([].slice.call(arguments))}w(p,E,C,{once:!0}),E!=="error"&&T(p,M,{once:!0})})}function T(p,E,P){typeof p.on=="function"&&w(p,"error",E,P)}function w(p,E,P,L){if(typeof p.on=="function")L.once?p.once(E,P):p.on(E,P);else if(typeof p.addEventListener=="function")p.addEventListener(E,function M(C){L.once&&p.removeEventListener(E,M),P(C)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof p)}return Dr.exports}var Br={exports:{}},Qa;function vt(){return Qa||(Qa=1,typeof Object.create=="function"?Br.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Br.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),Br.exports}function op(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var qa={exports:{}},Pe=qa.exports={},tt,rt;function Dn(){throw new Error("setTimeout has not been defined")}function Bn(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?tt=setTimeout:tt=Dn}catch{tt=Dn}try{typeof clearTimeout=="function"?rt=clearTimeout:rt=Bn}catch{rt=Bn}})();function $a(r){if(tt===setTimeout)return setTimeout(r,0);if((tt===Dn||!tt)&&setTimeout)return tt=setTimeout,setTimeout(r,0);try{return tt(r,0)}catch{try{return tt.call(null,r,0)}catch{return tt.call(this,r,0)}}}function lp(r){if(rt===clearTimeout)return clearTimeout(r);if((rt===Bn||!rt)&&clearTimeout)return rt=clearTimeout,clearTimeout(r);try{return rt(r)}catch{try{return rt.call(null,r)}catch{return rt.call(this,r)}}}var ht=[],Bt=!1,Rt,Mr=-1;function up(){!Bt||!Rt||(Bt=!1,Rt.length?ht=Rt.concat(ht):Mr=-1,ht.length&&eo())}function eo(){if(!Bt){var r=$a(up);Bt=!0;for(var e=ht.length;e;){for(Rt=ht,ht=[];++Mr<e;)Rt&&Rt[Mr].run();Mr=-1,e=ht.length}Rt=null,Bt=!1,lp(r)}}Pe.nextTick=function(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];ht.push(new to(r,e)),ht.length===1&&!Bt&&$a(eo)};function to(r,e){this.fun=r,this.array=e}to.prototype.run=function(){this.fun.apply(null,this.array)},Pe.title="browser",Pe.browser=!0,Pe.env={},Pe.argv=[],Pe.version="",Pe.versions={};function ft(){}Pe.on=ft,Pe.addListener=ft,Pe.once=ft,Pe.off=ft,Pe.removeListener=ft,Pe.removeAllListeners=ft,Pe.emit=ft,Pe.prependListener=ft,Pe.prependOnceListener=ft,Pe.listeners=function(r){return[]},Pe.binding=function(r){throw new Error("process.binding is not supported")},Pe.cwd=function(){return"/"},Pe.chdir=function(r){throw new Error("process.chdir is not supported")},Pe.umask=function(){return 0};var cp=qa.exports;const Ee=op(cp);var Mn,ro;function no(){return ro||(ro=1,Mn=Fn().EventEmitter),Mn}var Un={},er={},io;function hp(){if(io)return er;io=1,er.byteLength=a,er.toByteArray=h,er.fromByteArray=v;for(var r=[],e=[],t=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=n.length;i<s;++i)r[i]=n[i],e[n.charCodeAt(i)]=i;e[45]=62,e[95]=63;function o(y){var b=y.length;if(b%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=y.indexOf("=");g===-1&&(g=b);var _=g===b?0:4-g%4;return[g,_]}function a(y){var b=o(y),g=b[0],_=b[1];return(g+_)*3/4-_}function l(y,b,g){return(b+g)*3/4-g}function h(y){var b,g=o(y),_=g[0],d=g[1],T=new t(l(y,_,d)),w=0,p=d>0?_-4:_,E;for(E=0;E<p;E+=4)b=e[y.charCodeAt(E)]<<18|e[y.charCodeAt(E+1)]<<12|e[y.charCodeAt(E+2)]<<6|e[y.charCodeAt(E+3)],T[w++]=b>>16&255,T[w++]=b>>8&255,T[w++]=b&255;return d===2&&(b=e[y.charCodeAt(E)]<<2|e[y.charCodeAt(E+1)]>>4,T[w++]=b&255),d===1&&(b=e[y.charCodeAt(E)]<<10|e[y.charCodeAt(E+1)]<<4|e[y.charCodeAt(E+2)]>>2,T[w++]=b>>8&255,T[w++]=b&255),T}function f(y){return r[y>>18&63]+r[y>>12&63]+r[y>>6&63]+r[y&63]}function m(y,b,g){for(var _,d=[],T=b;T<g;T+=3)_=(y[T]<<16&16711680)+(y[T+1]<<8&65280)+(y[T+2]&255),d.push(f(_));return d.join("")}function v(y){for(var b,g=y.length,_=g%3,d=[],T=16383,w=0,p=g-_;w<p;w+=T)d.push(m(y,w,w+T>p?p:w+T));return _===1?(b=y[g-1],d.push(r[b>>2]+r[b<<4&63]+"==")):_===2&&(b=(y[g-2]<<8)+y[g-1],d.push(r[b>>10]+r[b>>4&63]+r[b<<2&63]+"=")),d.join("")}return er}var Ur={},so;function fp(){return so||(so=1,Ur.read=function(r,e,t,n,i){var s,o,a=i*8-n-1,l=(1<<a)-1,h=l>>1,f=-7,m=t?i-1:0,v=t?-1:1,y=r[e+m];for(m+=v,s=y&(1<<-f)-1,y>>=-f,f+=a;f>0;s=s*256+r[e+m],m+=v,f-=8);for(o=s&(1<<-f)-1,s>>=-f,f+=n;f>0;o=o*256+r[e+m],m+=v,f-=8);if(s===0)s=1-h;else{if(s===l)return o?NaN:(y?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-h}return(y?-1:1)*o*Math.pow(2,s-n)},Ur.write=function(r,e,t,n,i,s){var o,a,l,h=s*8-i-1,f=(1<<h)-1,m=f>>1,v=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:s-1,b=n?1:-1,g=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=f):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+m>=1?e+=v/l:e+=v*Math.pow(2,1-m),e*l>=2&&(o++,l/=2),o+m>=f?(a=0,o=f):o+m>=1?(a=(e*l-1)*Math.pow(2,i),o=o+m):(a=e*Math.pow(2,m-1)*Math.pow(2,i),o=0));i>=8;r[t+y]=a&255,y+=b,a/=256,i-=8);for(o=o<<i|a,h+=i;h>0;r[t+y]=o&255,y+=b,o/=256,h-=8);r[t+y-b]|=g*128}),Ur}var ao;function Wr(){return ao||(ao=1,function(r){var e=hp(),t=fp(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=a,r.SlowBuffer=T,r.INSPECT_MAX_BYTES=50;var i=2147483647;r.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=s(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{var I=new Uint8Array(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,Uint8Array.prototype),Object.setPrototypeOf(I,u),I.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(I){if(I>i)throw new RangeError('The value "'+I+'" is invalid for option "size"');var u=new Uint8Array(I);return Object.setPrototypeOf(u,a.prototype),u}function a(I,u,c){if(typeof I=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return m(I)}return l(I,u,c)}a.poolSize=8192;function l(I,u,c){if(typeof I=="string")return v(I,u);if(ArrayBuffer.isView(I))return b(I);if(I==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof I);if(ee(I,ArrayBuffer)||I&&ee(I.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ee(I,SharedArrayBuffer)||I&&ee(I.buffer,SharedArrayBuffer)))return g(I,u,c);if(typeof I=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var x=I.valueOf&&I.valueOf();if(x!=null&&x!==I)return a.from(x,u,c);var B=_(I);if(B)return B;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof I[Symbol.toPrimitive]=="function")return a.from(I[Symbol.toPrimitive]("string"),u,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof I)}a.from=function(I,u,c){return l(I,u,c)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function h(I){if(typeof I!="number")throw new TypeError('"size" argument must be of type number');if(I<0)throw new RangeError('The value "'+I+'" is invalid for option "size"')}function f(I,u,c){return h(I),I<=0?o(I):u!==void 0?typeof c=="string"?o(I).fill(u,c):o(I).fill(u):o(I)}a.alloc=function(I,u,c){return f(I,u,c)};function m(I){return h(I),o(I<0?0:d(I)|0)}a.allocUnsafe=function(I){return m(I)},a.allocUnsafeSlow=function(I){return m(I)};function v(I,u){if((typeof u!="string"||u==="")&&(u="utf8"),!a.isEncoding(u))throw new TypeError("Unknown encoding: "+u);var c=w(I,u)|0,x=o(c),B=x.write(I,u);return B!==c&&(x=x.slice(0,B)),x}function y(I){for(var u=I.length<0?0:d(I.length)|0,c=o(u),x=0;x<u;x+=1)c[x]=I[x]&255;return c}function b(I){if(ee(I,Uint8Array)){var u=new Uint8Array(I);return g(u.buffer,u.byteOffset,u.byteLength)}return y(I)}function g(I,u,c){if(u<0||I.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(I.byteLength<u+(c||0))throw new RangeError('"length" is outside of buffer bounds');var x;return u===void 0&&c===void 0?x=new Uint8Array(I):c===void 0?x=new Uint8Array(I,u):x=new Uint8Array(I,u,c),Object.setPrototypeOf(x,a.prototype),x}function _(I){if(a.isBuffer(I)){var u=d(I.length)|0,c=o(u);return c.length===0||I.copy(c,0,0,u),c}if(I.length!==void 0)return typeof I.length!="number"||S(I.length)?o(0):y(I);if(I.type==="Buffer"&&Array.isArray(I.data))return y(I.data)}function d(I){if(I>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return I|0}function T(I){return+I!=I&&(I=0),a.alloc(+I)}a.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==a.prototype},a.compare=function(u,c){if(ee(u,Uint8Array)&&(u=a.from(u,u.offset,u.byteLength)),ee(c,Uint8Array)&&(c=a.from(c,c.offset,c.byteLength)),!a.isBuffer(u)||!a.isBuffer(c))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===c)return 0;for(var x=u.length,B=c.length,Z=0,H=Math.min(x,B);Z<H;++Z)if(u[Z]!==c[Z]){x=u[Z],B=c[Z];break}return x<B?-1:B<x?1:0},a.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(u,c){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return a.alloc(0);var x;if(c===void 0)for(c=0,x=0;x<u.length;++x)c+=u[x].length;var B=a.allocUnsafe(c),Z=0;for(x=0;x<u.length;++x){var H=u[x];if(ee(H,Uint8Array))Z+H.length>B.length?a.from(H).copy(B,Z):Uint8Array.prototype.set.call(B,H,Z);else if(a.isBuffer(H))H.copy(B,Z);else throw new TypeError('"list" argument must be an Array of Buffers');Z+=H.length}return B};function w(I,u){if(a.isBuffer(I))return I.length;if(ArrayBuffer.isView(I)||ee(I,ArrayBuffer))return I.byteLength;if(typeof I!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof I);var c=I.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&c===0)return 0;for(var B=!1;;)switch(u){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return k(I).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return O(I).length;default:if(B)return x?-1:k(I).length;u=(""+u).toLowerCase(),B=!0}}a.byteLength=w;function p(I,u,c){var x=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,u>>>=0,c<=u))return"";for(I||(I="utf8");;)switch(I){case"hex":return te(this,u,c);case"utf8":case"utf-8":return A(this,u,c);case"ascii":return V(this,u,c);case"latin1":case"binary":return se(this,u,c);case"base64":return W(this,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,u,c);default:if(x)throw new TypeError("Unknown encoding: "+I);I=(I+"").toLowerCase(),x=!0}}a.prototype._isBuffer=!0;function E(I,u,c){var x=I[u];I[u]=I[c],I[c]=x}a.prototype.swap16=function(){var u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var c=0;c<u;c+=2)E(this,c,c+1);return this},a.prototype.swap32=function(){var u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var c=0;c<u;c+=4)E(this,c,c+3),E(this,c+1,c+2);return this},a.prototype.swap64=function(){var u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var c=0;c<u;c+=8)E(this,c,c+7),E(this,c+1,c+6),E(this,c+2,c+5),E(this,c+3,c+4);return this},a.prototype.toString=function(){var u=this.length;return u===0?"":arguments.length===0?A(this,0,u):p.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(u){if(!a.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:a.compare(this,u)===0},a.prototype.inspect=function(){var u="",c=r.INSPECT_MAX_BYTES;return u=this.toString("hex",0,c).replace(/(.{2})/g,"$1 ").trim(),this.length>c&&(u+=" ... "),"<Buffer "+u+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(u,c,x,B,Z){if(ee(u,Uint8Array)&&(u=a.from(u,u.offset,u.byteLength)),!a.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(c===void 0&&(c=0),x===void 0&&(x=u?u.length:0),B===void 0&&(B=0),Z===void 0&&(Z=this.length),c<0||x>u.length||B<0||Z>this.length)throw new RangeError("out of range index");if(B>=Z&&c>=x)return 0;if(B>=Z)return-1;if(c>=x)return 1;if(c>>>=0,x>>>=0,B>>>=0,Z>>>=0,this===u)return 0;for(var H=Z-B,ae=x-c,he=Math.min(H,ae),oe=this.slice(B,Z),ge=u.slice(c,x),be=0;be<he;++be)if(oe[be]!==ge[be]){H=oe[be],ae=ge[be];break}return H<ae?-1:ae<H?1:0};function P(I,u,c,x,B){if(I.length===0)return-1;if(typeof c=="string"?(x=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,S(c)&&(c=B?0:I.length-1),c<0&&(c=I.length+c),c>=I.length){if(B)return-1;c=I.length-1}else if(c<0)if(B)c=0;else return-1;if(typeof u=="string"&&(u=a.from(u,x)),a.isBuffer(u))return u.length===0?-1:L(I,u,c,x,B);if(typeof u=="number")return u=u&255,typeof Uint8Array.prototype.indexOf=="function"?B?Uint8Array.prototype.indexOf.call(I,u,c):Uint8Array.prototype.lastIndexOf.call(I,u,c):L(I,[u],c,x,B);throw new TypeError("val must be string, number or Buffer")}function L(I,u,c,x,B){var Z=1,H=I.length,ae=u.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(I.length<2||u.length<2)return-1;Z=2,H/=2,ae/=2,c/=2}function he(Ge,At){return Z===1?Ge[At]:Ge.readUInt16BE(At*Z)}var oe;if(B){var ge=-1;for(oe=c;oe<H;oe++)if(he(I,oe)===he(u,ge===-1?0:oe-ge)){if(ge===-1&&(ge=oe),oe-ge+1===ae)return ge*Z}else ge!==-1&&(oe-=oe-ge),ge=-1}else for(c+ae>H&&(c=H-ae),oe=c;oe>=0;oe--){for(var be=!0,_e=0;_e<ae;_e++)if(he(I,oe+_e)!==he(u,_e)){be=!1;break}if(be)return oe}return-1}a.prototype.includes=function(u,c,x){return this.indexOf(u,c,x)!==-1},a.prototype.indexOf=function(u,c,x){return P(this,u,c,x,!0)},a.prototype.lastIndexOf=function(u,c,x){return P(this,u,c,x,!1)};function M(I,u,c,x){c=Number(c)||0;var B=I.length-c;x?(x=Number(x),x>B&&(x=B)):x=B;var Z=u.length;x>Z/2&&(x=Z/2);for(var H=0;H<x;++H){var ae=parseInt(u.substr(H*2,2),16);if(S(ae))return H;I[c+H]=ae}return H}function C(I,u,c,x){return D(k(u,I.length-c),I,c,x)}function z(I,u,c,x){return D(j(u),I,c,x)}function ue(I,u,c,x){return D(O(u),I,c,x)}function N(I,u,c,x){return D(U(u,I.length-c),I,c,x)}a.prototype.write=function(u,c,x,B){if(c===void 0)B="utf8",x=this.length,c=0;else if(x===void 0&&typeof c=="string")B=c,x=this.length,c=0;else if(isFinite(c))c=c>>>0,isFinite(x)?(x=x>>>0,B===void 0&&(B="utf8")):(B=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Z=this.length-c;if((x===void 0||x>Z)&&(x=Z),u.length>0&&(x<0||c<0)||c>this.length)throw new RangeError("Attempt to write outside buffer bounds");B||(B="utf8");for(var H=!1;;)switch(B){case"hex":return M(this,u,c,x);case"utf8":case"utf-8":return C(this,u,c,x);case"ascii":case"latin1":case"binary":return z(this,u,c,x);case"base64":return ue(this,u,c,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,u,c,x);default:if(H)throw new TypeError("Unknown encoding: "+B);B=(""+B).toLowerCase(),H=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function W(I,u,c){return u===0&&c===I.length?e.fromByteArray(I):e.fromByteArray(I.slice(u,c))}function A(I,u,c){c=Math.min(I.length,c);for(var x=[],B=u;B<c;){var Z=I[B],H=null,ae=Z>239?4:Z>223?3:Z>191?2:1;if(B+ae<=c){var he,oe,ge,be;switch(ae){case 1:Z<128&&(H=Z);break;case 2:he=I[B+1],(he&192)===128&&(be=(Z&31)<<6|he&63,be>127&&(H=be));break;case 3:he=I[B+1],oe=I[B+2],(he&192)===128&&(oe&192)===128&&(be=(Z&15)<<12|(he&63)<<6|oe&63,be>2047&&(be<55296||be>57343)&&(H=be));break;case 4:he=I[B+1],oe=I[B+2],ge=I[B+3],(he&192)===128&&(oe&192)===128&&(ge&192)===128&&(be=(Z&15)<<18|(he&63)<<12|(oe&63)<<6|ge&63,be>65535&&be<1114112&&(H=be))}}H===null?(H=65533,ae=1):H>65535&&(H-=65536,x.push(H>>>10&1023|55296),H=56320|H&1023),x.push(H),B+=ae}return re(x)}var Y=4096;function re(I){var u=I.length;if(u<=Y)return String.fromCharCode.apply(String,I);for(var c="",x=0;x<u;)c+=String.fromCharCode.apply(String,I.slice(x,x+=Y));return c}function V(I,u,c){var x="";c=Math.min(I.length,c);for(var B=u;B<c;++B)x+=String.fromCharCode(I[B]&127);return x}function se(I,u,c){var x="";c=Math.min(I.length,c);for(var B=u;B<c;++B)x+=String.fromCharCode(I[B]);return x}function te(I,u,c){var x=I.length;(!u||u<0)&&(u=0),(!c||c<0||c>x)&&(c=x);for(var B="",Z=u;Z<c;++Z)B+=$[I[Z]];return B}function me(I,u,c){for(var x=I.slice(u,c),B="",Z=0;Z<x.length-1;Z+=2)B+=String.fromCharCode(x[Z]+x[Z+1]*256);return B}a.prototype.slice=function(u,c){var x=this.length;u=~~u,c=c===void 0?x:~~c,u<0?(u+=x,u<0&&(u=0)):u>x&&(u=x),c<0?(c+=x,c<0&&(c=0)):c>x&&(c=x),c<u&&(c=u);var B=this.subarray(u,c);return Object.setPrototypeOf(B,a.prototype),B};function J(I,u,c){if(I%1!==0||I<0)throw new RangeError("offset is not uint");if(I+u>c)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(u,c,x){u=u>>>0,c=c>>>0,x||J(u,c,this.length);for(var B=this[u],Z=1,H=0;++H<c&&(Z*=256);)B+=this[u+H]*Z;return B},a.prototype.readUintBE=a.prototype.readUIntBE=function(u,c,x){u=u>>>0,c=c>>>0,x||J(u,c,this.length);for(var B=this[u+--c],Z=1;c>0&&(Z*=256);)B+=this[u+--c]*Z;return B},a.prototype.readUint8=a.prototype.readUInt8=function(u,c){return u=u>>>0,c||J(u,1,this.length),this[u]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(u,c){return u=u>>>0,c||J(u,2,this.length),this[u]|this[u+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(u,c){return u=u>>>0,c||J(u,2,this.length),this[u]<<8|this[u+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(u,c){return u=u>>>0,c||J(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(u,c){return u=u>>>0,c||J(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},a.prototype.readIntLE=function(u,c,x){u=u>>>0,c=c>>>0,x||J(u,c,this.length);for(var B=this[u],Z=1,H=0;++H<c&&(Z*=256);)B+=this[u+H]*Z;return Z*=128,B>=Z&&(B-=Math.pow(2,8*c)),B},a.prototype.readIntBE=function(u,c,x){u=u>>>0,c=c>>>0,x||J(u,c,this.length);for(var B=c,Z=1,H=this[u+--B];B>0&&(Z*=256);)H+=this[u+--B]*Z;return Z*=128,H>=Z&&(H-=Math.pow(2,8*c)),H},a.prototype.readInt8=function(u,c){return u=u>>>0,c||J(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},a.prototype.readInt16LE=function(u,c){u=u>>>0,c||J(u,2,this.length);var x=this[u]|this[u+1]<<8;return x&32768?x|4294901760:x},a.prototype.readInt16BE=function(u,c){u=u>>>0,c||J(u,2,this.length);var x=this[u+1]|this[u]<<8;return x&32768?x|4294901760:x},a.prototype.readInt32LE=function(u,c){return u=u>>>0,c||J(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},a.prototype.readInt32BE=function(u,c){return u=u>>>0,c||J(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},a.prototype.readFloatLE=function(u,c){return u=u>>>0,c||J(u,4,this.length),t.read(this,u,!0,23,4)},a.prototype.readFloatBE=function(u,c){return u=u>>>0,c||J(u,4,this.length),t.read(this,u,!1,23,4)},a.prototype.readDoubleLE=function(u,c){return u=u>>>0,c||J(u,8,this.length),t.read(this,u,!0,52,8)},a.prototype.readDoubleBE=function(u,c){return u=u>>>0,c||J(u,8,this.length),t.read(this,u,!1,52,8)};function F(I,u,c,x,B,Z){if(!a.isBuffer(I))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>B||u<Z)throw new RangeError('"value" argument is out of bounds');if(c+x>I.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(u,c,x,B){if(u=+u,c=c>>>0,x=x>>>0,!B){var Z=Math.pow(2,8*x)-1;F(this,u,c,x,Z,0)}var H=1,ae=0;for(this[c]=u&255;++ae<x&&(H*=256);)this[c+ae]=u/H&255;return c+x},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(u,c,x,B){if(u=+u,c=c>>>0,x=x>>>0,!B){var Z=Math.pow(2,8*x)-1;F(this,u,c,x,Z,0)}var H=x-1,ae=1;for(this[c+H]=u&255;--H>=0&&(ae*=256);)this[c+H]=u/ae&255;return c+x},a.prototype.writeUint8=a.prototype.writeUInt8=function(u,c,x){return u=+u,c=c>>>0,x||F(this,u,c,1,255,0),this[c]=u&255,c+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(u,c,x){return u=+u,c=c>>>0,x||F(this,u,c,2,65535,0),this[c]=u&255,this[c+1]=u>>>8,c+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(u,c,x){return u=+u,c=c>>>0,x||F(this,u,c,2,65535,0),this[c]=u>>>8,this[c+1]=u&255,c+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(u,c,x){return u=+u,c=c>>>0,x||F(this,u,c,4,4294967295,0),this[c+3]=u>>>24,this[c+2]=u>>>16,this[c+1]=u>>>8,this[c]=u&255,c+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(u,c,x){return u=+u,c=c>>>0,x||F(this,u,c,4,4294967295,0),this[c]=u>>>24,this[c+1]=u>>>16,this[c+2]=u>>>8,this[c+3]=u&255,c+4},a.prototype.writeIntLE=function(u,c,x,B){if(u=+u,c=c>>>0,!B){var Z=Math.pow(2,8*x-1);F(this,u,c,x,Z-1,-Z)}var H=0,ae=1,he=0;for(this[c]=u&255;++H<x&&(ae*=256);)u<0&&he===0&&this[c+H-1]!==0&&(he=1),this[c+H]=(u/ae>>0)-he&255;return c+x},a.prototype.writeIntBE=function(u,c,x,B){if(u=+u,c=c>>>0,!B){var Z=Math.pow(2,8*x-1);F(this,u,c,x,Z-1,-Z)}var H=x-1,ae=1,he=0;for(this[c+H]=u&255;--H>=0&&(ae*=256);)u<0&&he===0&&this[c+H+1]!==0&&(he=1),this[c+H]=(u/ae>>0)-he&255;return c+x},a.prototype.writeInt8=function(u,c,x){return u=+u,c=c>>>0,x||F(this,u,c,1,127,-128),u<0&&(u=255+u+1),this[c]=u&255,c+1},a.prototype.writeInt16LE=function(u,c,x){return u=+u,c=c>>>0,x||F(this,u,c,2,32767,-32768),this[c]=u&255,this[c+1]=u>>>8,c+2},a.prototype.writeInt16BE=function(u,c,x){return u=+u,c=c>>>0,x||F(this,u,c,2,32767,-32768),this[c]=u>>>8,this[c+1]=u&255,c+2},a.prototype.writeInt32LE=function(u,c,x){return u=+u,c=c>>>0,x||F(this,u,c,4,2147483647,-2147483648),this[c]=u&255,this[c+1]=u>>>8,this[c+2]=u>>>16,this[c+3]=u>>>24,c+4},a.prototype.writeInt32BE=function(u,c,x){return u=+u,c=c>>>0,x||F(this,u,c,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[c]=u>>>24,this[c+1]=u>>>16,this[c+2]=u>>>8,this[c+3]=u&255,c+4};function X(I,u,c,x,B,Z){if(c+x>I.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}function Q(I,u,c,x,B){return u=+u,c=c>>>0,B||X(I,u,c,4),t.write(I,u,c,x,23,4),c+4}a.prototype.writeFloatLE=function(u,c,x){return Q(this,u,c,!0,x)},a.prototype.writeFloatBE=function(u,c,x){return Q(this,u,c,!1,x)};function ie(I,u,c,x,B){return u=+u,c=c>>>0,B||X(I,u,c,8),t.write(I,u,c,x,52,8),c+8}a.prototype.writeDoubleLE=function(u,c,x){return ie(this,u,c,!0,x)},a.prototype.writeDoubleBE=function(u,c,x){return ie(this,u,c,!1,x)},a.prototype.copy=function(u,c,x,B){if(!a.isBuffer(u))throw new TypeError("argument should be a Buffer");if(x||(x=0),!B&&B!==0&&(B=this.length),c>=u.length&&(c=u.length),c||(c=0),B>0&&B<x&&(B=x),B===x||u.length===0||this.length===0)return 0;if(c<0)throw new RangeError("targetStart out of bounds");if(x<0||x>=this.length)throw new RangeError("Index out of range");if(B<0)throw new RangeError("sourceEnd out of bounds");B>this.length&&(B=this.length),u.length-c<B-x&&(B=u.length-c+x);var Z=B-x;return this===u&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(c,x,B):Uint8Array.prototype.set.call(u,this.subarray(x,B),c),Z},a.prototype.fill=function(u,c,x,B){if(typeof u=="string"){if(typeof c=="string"?(B=c,c=0,x=this.length):typeof x=="string"&&(B=x,x=this.length),B!==void 0&&typeof B!="string")throw new TypeError("encoding must be a string");if(typeof B=="string"&&!a.isEncoding(B))throw new TypeError("Unknown encoding: "+B);if(u.length===1){var Z=u.charCodeAt(0);(B==="utf8"&&Z<128||B==="latin1")&&(u=Z)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(c<0||this.length<c||this.length<x)throw new RangeError("Out of range index");if(x<=c)return this;c=c>>>0,x=x===void 0?this.length:x>>>0,u||(u=0);var H;if(typeof u=="number")for(H=c;H<x;++H)this[H]=u;else{var ae=a.isBuffer(u)?u:a.from(u,B),he=ae.length;if(he===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(H=0;H<x-c;++H)this[H+c]=ae[H%he]}return this};var K=/[^+/0-9A-Za-z-_]/g;function R(I){if(I=I.split("=")[0],I=I.trim().replace(K,""),I.length<2)return"";for(;I.length%4!==0;)I=I+"=";return I}function k(I,u){u=u||1/0;for(var c,x=I.length,B=null,Z=[],H=0;H<x;++H){if(c=I.charCodeAt(H),c>55295&&c<57344){if(!B){if(c>56319){(u-=3)>-1&&Z.push(239,191,189);continue}else if(H+1===x){(u-=3)>-1&&Z.push(239,191,189);continue}B=c;continue}if(c<56320){(u-=3)>-1&&Z.push(239,191,189),B=c;continue}c=(B-55296<<10|c-56320)+65536}else B&&(u-=3)>-1&&Z.push(239,191,189);if(B=null,c<128){if((u-=1)<0)break;Z.push(c)}else if(c<2048){if((u-=2)<0)break;Z.push(c>>6|192,c&63|128)}else if(c<65536){if((u-=3)<0)break;Z.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((u-=4)<0)break;Z.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return Z}function j(I){for(var u=[],c=0;c<I.length;++c)u.push(I.charCodeAt(c)&255);return u}function U(I,u){for(var c,x,B,Z=[],H=0;H<I.length&&!((u-=2)<0);++H)c=I.charCodeAt(H),x=c>>8,B=c%256,Z.push(B),Z.push(x);return Z}function O(I){return e.toByteArray(R(I))}function D(I,u,c,x){for(var B=0;B<x&&!(B+c>=u.length||B>=I.length);++B)u[B+c]=I[B];return B}function ee(I,u){return I instanceof u||I!=null&&I.constructor!=null&&I.constructor.name!=null&&I.constructor.name===u.name}function S(I){return I!==I}var $=function(){for(var I="0123456789abcdef",u=new Array(256),c=0;c<16;++c)for(var x=c*16,B=0;B<16;++B)u[x+B]=I[c]+I[B];return u}()}(Un)),Un}var Wn={},Hn={},Gn,oo;function lo(){return oo||(oo=1,Gn=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==i||a.enumerable!==!0)return!1}return!0}),Gn}var Vn,uo;function jn(){if(uo)return Vn;uo=1;var r=lo();return Vn=function(){return r()&&!!Symbol.toStringTag},Vn}var Zn,co;function ho(){return co||(co=1,Zn=Object),Zn}var zn,fo;function dp(){return fo||(fo=1,zn=Error),zn}var Xn,po;function pp(){return po||(po=1,Xn=EvalError),Xn}var Kn,mo;function mp(){return mo||(mo=1,Kn=RangeError),Kn}var Yn,go;function gp(){return go||(go=1,Yn=ReferenceError),Yn}var Jn,wo;function yo(){return wo||(wo=1,Jn=SyntaxError),Jn}var Qn,bo;function Hr(){return bo||(bo=1,Qn=TypeError),Qn}var qn,vo;function wp(){return vo||(vo=1,qn=URIError),qn}var $n,_o;function yp(){return _o||(_o=1,$n=Math.abs),$n}var ei,To;function bp(){return To||(To=1,ei=Math.floor),ei}var ti,Eo;function vp(){return Eo||(Eo=1,ti=Math.max),ti}var ri,So;function _p(){return So||(So=1,ri=Math.min),ri}var ni,xo;function Tp(){return xo||(xo=1,ni=Math.pow),ni}var ii,Ao;function Ep(){return Ao||(Ao=1,ii=Math.round),ii}var si,ko;function Sp(){return ko||(ko=1,si=Number.isNaN||function(e){return e!==e}),si}var ai,Ro;function xp(){if(Ro)return ai;Ro=1;var r=Sp();return ai=function(t){return r(t)||t===0?t:t<0?-1:1},ai}var oi,Io;function Ap(){return Io||(Io=1,oi=Object.getOwnPropertyDescriptor),oi}var li,Co;function tr(){if(Co)return li;Co=1;var r=Ap();if(r)try{r([],"length")}catch{r=null}return li=r,li}var ui,No;function Gr(){if(No)return ui;No=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return ui=r,ui}var ci,Po;function kp(){if(Po)return ci;Po=1;var r=typeof Symbol<"u"&&Symbol,e=lo();return ci=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},ci}var hi,Lo;function Oo(){return Lo||(Lo=1,hi=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),hi}var fi,Fo;function Do(){if(Fo)return fi;Fo=1;var r=ho();return fi=r.getPrototypeOf||null,fi}var di,Bo;function Rp(){if(Bo)return di;Bo=1;var r="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,n="[object Function]",i=function(l,h){for(var f=[],m=0;m<l.length;m+=1)f[m]=l[m];for(var v=0;v<h.length;v+=1)f[v+l.length]=h[v];return f},s=function(l,h){for(var f=[],m=h,v=0;m<l.length;m+=1,v+=1)f[v]=l[m];return f},o=function(a,l){for(var h="",f=0;f<a.length;f+=1)h+=a[f],f+1<a.length&&(h+=l);return h};return di=function(l){var h=this;if(typeof h!="function"||e.apply(h)!==n)throw new TypeError(r+h);for(var f=s(arguments,1),m,v=function(){if(this instanceof m){var d=h.apply(this,i(f,arguments));return Object(d)===d?d:this}return h.apply(l,i(f,arguments))},y=t(0,h.length-f.length),b=[],g=0;g<y;g++)b[g]="$"+g;if(m=Function("binder","return function ("+o(b,",")+"){ return binder.apply(this,arguments); }")(v),h.prototype){var _=function(){};_.prototype=h.prototype,m.prototype=new _,_.prototype=null}return m},di}var pi,Mo;function rr(){if(Mo)return pi;Mo=1;var r=Rp();return pi=Function.prototype.bind||r,pi}var mi,Uo;function gi(){return Uo||(Uo=1,mi=Function.prototype.call),mi}var wi,Wo;function yi(){return Wo||(Wo=1,wi=Function.prototype.apply),wi}var bi,Ho;function Ip(){return Ho||(Ho=1,bi=typeof Reflect<"u"&&Reflect&&Reflect.apply),bi}var vi,Go;function Vo(){if(Go)return vi;Go=1;var r=rr(),e=yi(),t=gi(),n=Ip();return vi=n||r.call(t,e),vi}var _i,jo;function Ti(){if(jo)return _i;jo=1;var r=rr(),e=Hr(),t=gi(),n=Vo();return _i=function(s){if(s.length<1||typeof s[0]!="function")throw new e("a function is required");return n(r,t,s)},_i}var Ei,Zo;function Cp(){if(Zo)return Ei;Zo=1;var r=Ti(),e=tr(),t;try{t=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var n=!!t&&e&&e(Object.prototype,"__proto__"),i=Object,s=i.getPrototypeOf;return Ei=n&&typeof n.get=="function"?r([n.get]):typeof s=="function"?function(a){return s(a==null?a:i(a))}:!1,Ei}var Si,zo;function Xo(){if(zo)return Si;zo=1;var r=Oo(),e=Do(),t=Cp();return Si=r?function(i){return r(i)}:e?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return e(i)}:t?function(i){return t(i)}:null,Si}var xi,Ko;function Np(){if(Ko)return xi;Ko=1;var r=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=rr();return xi=t.call(r,e),xi}var Ai,Yo;function Jo(){if(Yo)return Ai;Yo=1;var r,e=ho(),t=dp(),n=pp(),i=mp(),s=gp(),o=yo(),a=Hr(),l=wp(),h=yp(),f=bp(),m=vp(),v=_p(),y=Tp(),b=Ep(),g=xp(),_=Function,d=function(j){try{return _('"use strict"; return ('+j+").constructor;")()}catch{}},T=tr(),w=Gr(),p=function(){throw new a},E=T?function(){try{return arguments.callee,p}catch{try{return T(arguments,"callee").get}catch{return p}}}():p,P=kp()(),L=Xo(),M=Do(),C=Oo(),z=yi(),ue=gi(),N={},W=typeof Uint8Array>"u"||!L?r:L(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":P&&L?L([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":_,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":P&&L?L(L([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!P||!L?r:L(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":T,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":i,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!P||!L?r:L(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":P&&L?L(""[Symbol.iterator]()):r,"%Symbol%":P?Symbol:r,"%SyntaxError%":o,"%ThrowTypeError%":E,"%TypedArray%":W,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":ue,"%Function.prototype.apply%":z,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":M,"%Math.abs%":h,"%Math.floor%":f,"%Math.max%":m,"%Math.min%":v,"%Math.pow%":y,"%Math.round%":b,"%Math.sign%":g,"%Reflect.getPrototypeOf%":C};if(L)try{null.error}catch(j){var Y=L(L(j));A["%Error.prototype%"]=Y}var re=function j(U){var O;if(U==="%AsyncFunction%")O=d("async function () {}");else if(U==="%GeneratorFunction%")O=d("function* () {}");else if(U==="%AsyncGeneratorFunction%")O=d("async function* () {}");else if(U==="%AsyncGenerator%"){var D=j("%AsyncGeneratorFunction%");D&&(O=D.prototype)}else if(U==="%AsyncIteratorPrototype%"){var ee=j("%AsyncGenerator%");ee&&L&&(O=L(ee.prototype))}return A[U]=O,O},V={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},se=rr(),te=Np(),me=se.call(ue,Array.prototype.concat),J=se.call(z,Array.prototype.splice),F=se.call(ue,String.prototype.replace),X=se.call(ue,String.prototype.slice),Q=se.call(ue,RegExp.prototype.exec),ie=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,K=/\\(\\)?/g,R=function(U){var O=X(U,0,1),D=X(U,-1);if(O==="%"&&D!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(D==="%"&&O!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var ee=[];return F(U,ie,function(S,$,I,u){ee[ee.length]=I?F(u,K,"$1"):$||S}),ee},k=function(U,O){var D=U,ee;if(te(V,D)&&(ee=V[D],D="%"+ee[0]+"%"),te(A,D)){var S=A[D];if(S===N&&(S=re(D)),typeof S>"u"&&!O)throw new a("intrinsic "+U+" exists, but is not available. Please file an issue!");return{alias:ee,name:D,value:S}}throw new o("intrinsic "+U+" does not exist!")};return Ai=function(U,O){if(typeof U!="string"||U.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof O!="boolean")throw new a('"allowMissing" argument must be a boolean');if(Q(/^%?[^%]*%?$/,U)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var D=R(U),ee=D.length>0?D[0]:"",S=k("%"+ee+"%",O),$=S.name,I=S.value,u=!1,c=S.alias;c&&(ee=c[0],J(D,me([0,1],c)));for(var x=1,B=!0;x<D.length;x+=1){var Z=D[x],H=X(Z,0,1),ae=X(Z,-1);if((H==='"'||H==="'"||H==="`"||ae==='"'||ae==="'"||ae==="`")&&H!==ae)throw new o("property names with quotes must have matching quotes");if((Z==="constructor"||!B)&&(u=!0),ee+="."+Z,$="%"+ee+"%",te(A,$))I=A[$];else if(I!=null){if(!(Z in I)){if(!O)throw new a("base intrinsic for "+U+" exists, but the property is not available.");return}if(T&&x+1>=D.length){var he=T(I,Z);B=!!he,B&&"get"in he&&!("originalValue"in he.get)?I=he.get:I=I[Z]}else B=te(I,Z),I=I[Z];B&&!u&&(A[$]=I)}}return I},Ai}var ki,Qo;function qo(){if(Qo)return ki;Qo=1;var r=Jo(),e=Ti(),t=e([r("%String.prototype.indexOf%")]);return ki=function(i,s){var o=r(i,!!s);return typeof o=="function"&&t(i,".prototype.")>-1?e([o]):o},ki}var Ri,$o;function Pp(){if($o)return Ri;$o=1;var r=jn()(),e=qo(),t=e("Object.prototype.toString"),n=function(a){return r&&a&&typeof a=="object"&&Symbol.toStringTag in a?!1:t(a)==="[object Arguments]"},i=function(a){return n(a)?!0:a!==null&&typeof a=="object"&&"length"in a&&typeof a.length=="number"&&a.length>=0&&t(a)!=="[object Array]"&&"callee"in a&&t(a.callee)==="[object Function]"},s=function(){return n(arguments)}();return n.isLegacyArguments=i,Ri=s?n:i,Ri}var Ii,el;function Lp(){if(el)return Ii;el=1;var r=Object.prototype.toString,e=Function.prototype.toString,t=/^\s*(?:function)?\*/,n=jn()(),i=Object.getPrototypeOf,s=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch{}},o;return Ii=function(l){if(typeof l!="function")return!1;if(t.test(e.call(l)))return!0;if(!n){var h=r.call(l);return h==="[object GeneratorFunction]"}if(!i)return!1;if(typeof o>"u"){var f=s();o=f?i(f):!1}return i(l)===o},Ii}var Ci,tl;function Op(){if(tl)return Ci;tl=1;var r=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,t,n;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},e(function(){throw 42},null,t)}catch(T){T!==n&&(e=null)}else e=null;var i=/^\s*class\b/,s=function(w){try{var p=r.call(w);return i.test(p)}catch{return!1}},o=function(w){try{return s(w)?!1:(r.call(w),!0)}catch{return!1}},a=Object.prototype.toString,l="[object Object]",h="[object Function]",f="[object GeneratorFunction]",m="[object HTMLAllCollection]",v="[object HTML document.all class]",y="[object HTMLCollection]",b=typeof Symbol=="function"&&!!Symbol.toStringTag,g=!(0 in[,]),_=function(){return!1};if(typeof document=="object"){var d=document.all;a.call(d)===a.call(document.all)&&(_=function(w){if((g||!w)&&(typeof w>"u"||typeof w=="object"))try{var p=a.call(w);return(p===m||p===v||p===y||p===l)&&w("")==null}catch{}return!1})}return Ci=e?function(w){if(_(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{e(w,null,t)}catch(p){if(p!==n)return!1}return!s(w)&&o(w)}:function(w){if(_(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;if(b)return o(w);if(s(w))return!1;var p=a.call(w);return p!==h&&p!==f&&!/^\[object HTML/.test(p)?!1:o(w)},Ci}var Ni,rl;function Fp(){if(rl)return Ni;rl=1;var r=Op(),e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,n=function(l,h,f){for(var m=0,v=l.length;m<v;m++)t.call(l,m)&&(f==null?h(l[m],m,l):h.call(f,l[m],m,l))},i=function(l,h,f){for(var m=0,v=l.length;m<v;m++)f==null?h(l.charAt(m),m,l):h.call(f,l.charAt(m),m,l)},s=function(l,h,f){for(var m in l)t.call(l,m)&&(f==null?h(l[m],m,l):h.call(f,l[m],m,l))};function o(a){return e.call(a)==="[object Array]"}return Ni=function(l,h,f){if(!r(h))throw new TypeError("iterator must be a function");var m;arguments.length>=3&&(m=f),o(l)?n(l,h,m):typeof l=="string"?i(l,h,m):s(l,h,m)},Ni}var Pi,nl;function Dp(){return nl||(nl=1,Pi=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Pi}var Li,il;function Bp(){if(il)return Li;il=1;var r=Dp(),e=typeof globalThis>"u"?Ke:globalThis;return Li=function(){for(var n=[],i=0;i<r.length;i++)typeof e[r[i]]=="function"&&(n[n.length]=r[i]);return n},Li}var Oi={exports:{}},Fi,sl;function Mp(){if(sl)return Fi;sl=1;var r=Gr(),e=yo(),t=Hr(),n=tr();return Fi=function(s,o,a){if(!s||typeof s!="object"&&typeof s!="function")throw new t("`obj` must be an object or a function`");if(typeof o!="string"&&typeof o!="symbol")throw new t("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new t("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new t("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new t("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new t("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,h=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,m=arguments.length>6?arguments[6]:!1,v=!!n&&n(s,o);if(r)r(s,o,{configurable:f===null&&v?v.configurable:!f,enumerable:l===null&&v?v.enumerable:!l,value:a,writable:h===null&&v?v.writable:!h});else if(m||!l&&!h&&!f)s[o]=a;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Fi}var Di,al;function Up(){if(al)return Di;al=1;var r=Gr(),e=function(){return!!r};return e.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},Di=e,Di}var Bi,ol;function Wp(){if(ol)return Bi;ol=1;var r=Jo(),e=Mp(),t=Up()(),n=tr(),i=Hr(),s=r("%Math.floor%");return Bi=function(a,l){if(typeof a!="function")throw new i("`fn` is not a function");if(typeof l!="number"||l<0||l>4294967295||s(l)!==l)throw new i("`length` must be a positive 32-bit integer");var h=arguments.length>2&&!!arguments[2],f=!0,m=!0;if("length"in a&&n){var v=n(a,"length");v&&!v.configurable&&(f=!1),v&&!v.writable&&(m=!1)}return(f||m||!h)&&(t?e(a,"length",l,!0,!0):e(a,"length",l)),a},Bi}var Mi,ll;function Hp(){if(ll)return Mi;ll=1;var r=rr(),e=yi(),t=Vo();return Mi=function(){return t(r,e,arguments)},Mi}var ul;function Gp(){return ul||(ul=1,function(r){var e=Wp(),t=Gr(),n=Ti(),i=Hp();r.exports=function(o){var a=n(arguments),l=o.length-(arguments.length-1);return e(a,1+(l>0?l:0),!0)},t?t(r.exports,"apply",{value:i}):r.exports.apply=i}(Oi)),Oi.exports}var Ui,cl;function hl(){if(cl)return Ui;cl=1;var r=Fp(),e=Bp(),t=Gp(),n=qo(),i=tr(),s=Xo(),o=n("Object.prototype.toString"),a=jn()(),l=typeof globalThis>"u"?Ke:globalThis,h=e(),f=n("String.prototype.slice"),m=n("Array.prototype.indexOf",!0)||function(_,d){for(var T=0;T<_.length;T+=1)if(_[T]===d)return T;return-1},v={__proto__:null};a&&i&&s?r(h,function(g){var _=new l[g];if(Symbol.toStringTag in _&&s){var d=s(_),T=i(d,Symbol.toStringTag);if(!T&&d){var w=s(d);T=i(w,Symbol.toStringTag)}v["$"+g]=t(T.get)}}):r(h,function(g){var _=new l[g],d=_.slice||_.set;d&&(v["$"+g]=t(d))});var y=function(_){var d=!1;return r(v,function(T,w){if(!d)try{"$"+T(_)===w&&(d=f(w,1))}catch{}}),d},b=function(_){var d=!1;return r(v,function(T,w){if(!d)try{T(_),d=f(w,1)}catch{}}),d};return Ui=function(_){if(!_||typeof _!="object")return!1;if(!a){var d=f(o(_),8,-1);return m(h,d)>-1?d:d!=="Object"?!1:b(_)}return i?y(_):null},Ui}var Wi,fl;function Vp(){if(fl)return Wi;fl=1;var r=hl();return Wi=function(t){return!!r(t)},Wi}var dl;function jp(){return dl||(dl=1,function(r){var e=Pp(),t=Lp(),n=hl(),i=Vp();function s(x){return x.call.bind(x)}var o=typeof BigInt<"u",a=typeof Symbol<"u",l=s(Object.prototype.toString),h=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),m=s(Boolean.prototype.valueOf);if(o)var v=s(BigInt.prototype.valueOf);if(a)var y=s(Symbol.prototype.valueOf);function b(x,B){if(typeof x!="object")return!1;try{return B(x),!0}catch{return!1}}r.isArgumentsObject=e,r.isGeneratorFunction=t,r.isTypedArray=i;function g(x){return typeof Promise<"u"&&x instanceof Promise||x!==null&&typeof x=="object"&&typeof x.then=="function"&&typeof x.catch=="function"}r.isPromise=g;function _(x){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(x):i(x)||X(x)}r.isArrayBufferView=_;function d(x){return n(x)==="Uint8Array"}r.isUint8Array=d;function T(x){return n(x)==="Uint8ClampedArray"}r.isUint8ClampedArray=T;function w(x){return n(x)==="Uint16Array"}r.isUint16Array=w;function p(x){return n(x)==="Uint32Array"}r.isUint32Array=p;function E(x){return n(x)==="Int8Array"}r.isInt8Array=E;function P(x){return n(x)==="Int16Array"}r.isInt16Array=P;function L(x){return n(x)==="Int32Array"}r.isInt32Array=L;function M(x){return n(x)==="Float32Array"}r.isFloat32Array=M;function C(x){return n(x)==="Float64Array"}r.isFloat64Array=C;function z(x){return n(x)==="BigInt64Array"}r.isBigInt64Array=z;function ue(x){return n(x)==="BigUint64Array"}r.isBigUint64Array=ue;function N(x){return l(x)==="[object Map]"}N.working=typeof Map<"u"&&N(new Map);function W(x){return typeof Map>"u"?!1:N.working?N(x):x instanceof Map}r.isMap=W;function A(x){return l(x)==="[object Set]"}A.working=typeof Set<"u"&&A(new Set);function Y(x){return typeof Set>"u"?!1:A.working?A(x):x instanceof Set}r.isSet=Y;function re(x){return l(x)==="[object WeakMap]"}re.working=typeof WeakMap<"u"&&re(new WeakMap);function V(x){return typeof WeakMap>"u"?!1:re.working?re(x):x instanceof WeakMap}r.isWeakMap=V;function se(x){return l(x)==="[object WeakSet]"}se.working=typeof WeakSet<"u"&&se(new WeakSet);function te(x){return se(x)}r.isWeakSet=te;function me(x){return l(x)==="[object ArrayBuffer]"}me.working=typeof ArrayBuffer<"u"&&me(new ArrayBuffer);function J(x){return typeof ArrayBuffer>"u"?!1:me.working?me(x):x instanceof ArrayBuffer}r.isArrayBuffer=J;function F(x){return l(x)==="[object DataView]"}F.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&F(new DataView(new ArrayBuffer(1),0,1));function X(x){return typeof DataView>"u"?!1:F.working?F(x):x instanceof DataView}r.isDataView=X;var Q=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ie(x){return l(x)==="[object SharedArrayBuffer]"}function K(x){return typeof Q>"u"?!1:(typeof ie.working>"u"&&(ie.working=ie(new Q)),ie.working?ie(x):x instanceof Q)}r.isSharedArrayBuffer=K;function R(x){return l(x)==="[object AsyncFunction]"}r.isAsyncFunction=R;function k(x){return l(x)==="[object Map Iterator]"}r.isMapIterator=k;function j(x){return l(x)==="[object Set Iterator]"}r.isSetIterator=j;function U(x){return l(x)==="[object Generator]"}r.isGeneratorObject=U;function O(x){return l(x)==="[object WebAssembly.Module]"}r.isWebAssemblyCompiledModule=O;function D(x){return b(x,h)}r.isNumberObject=D;function ee(x){return b(x,f)}r.isStringObject=ee;function S(x){return b(x,m)}r.isBooleanObject=S;function $(x){return o&&b(x,v)}r.isBigIntObject=$;function I(x){return a&&b(x,y)}r.isSymbolObject=I;function u(x){return D(x)||ee(x)||S(x)||$(x)||I(x)}r.isBoxedPrimitive=u;function c(x){return typeof Uint8Array<"u"&&(J(x)||K(x))}r.isAnyArrayBuffer=c,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(x){Object.defineProperty(r,x,{enumerable:!1,value:function(){throw new Error(x+" is not supported in userland")}})})}(Hn)),Hn}var Hi,pl;function Zp(){return pl||(pl=1,Hi=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),Hi}var ml;function gl(){return ml||(ml=1,function(r){var e=Object.getOwnPropertyDescriptors||function(X){for(var Q=Object.keys(X),ie={},K=0;K<Q.length;K++)ie[Q[K]]=Object.getOwnPropertyDescriptor(X,Q[K]);return ie},t=/%[sdj%]/g;r.format=function(F){if(!E(F)){for(var X=[],Q=0;Q<arguments.length;Q++)X.push(o(arguments[Q]));return X.join(" ")}for(var Q=1,ie=arguments,K=ie.length,R=String(F).replace(t,function(j){if(j==="%%")return"%";if(Q>=K)return j;switch(j){case"%s":return String(ie[Q++]);case"%d":return Number(ie[Q++]);case"%j":try{return JSON.stringify(ie[Q++])}catch{return"[Circular]"}default:return j}}),k=ie[Q];Q<K;k=ie[++Q])T(k)||!C(k)?R+=" "+k:R+=" "+o(k);return R},r.deprecate=function(F,X){if(typeof Ee<"u"&&Ee.noDeprecation===!0)return F;if(typeof Ee>"u")return function(){return r.deprecate(F,X).apply(this,arguments)};var Q=!1;function ie(){if(!Q){if(Ee.throwDeprecation)throw new Error(X);Ee.traceDeprecation?console.trace(X):console.error(X),Q=!0}return F.apply(this,arguments)}return ie};var n={},i=/^$/;if(Ee.env.NODE_DEBUG){var s=Ee.env.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+s+"$","i")}r.debuglog=function(F){if(F=F.toUpperCase(),!n[F])if(i.test(F)){var X=Ee.pid;n[F]=function(){var Q=r.format.apply(r,arguments);console.error("%s %d: %s",F,X,Q)}}else n[F]=function(){};return n[F]};function o(F,X){var Q={seen:[],stylize:l};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),d(X)?Q.showHidden=X:X&&r._extend(Q,X),L(Q.showHidden)&&(Q.showHidden=!1),L(Q.depth)&&(Q.depth=2),L(Q.colors)&&(Q.colors=!1),L(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=a),f(Q,F,Q.depth)}r.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function a(F,X){var Q=o.styles[X];return Q?"\x1B["+o.colors[Q][0]+"m"+F+"\x1B["+o.colors[Q][1]+"m":F}function l(F,X){return F}function h(F){var X={};return F.forEach(function(Q,ie){X[Q]=!0}),X}function f(F,X,Q){if(F.customInspect&&X&&N(X.inspect)&&X.inspect!==r.inspect&&!(X.constructor&&X.constructor.prototype===X)){var ie=X.inspect(Q,F);return E(ie)||(ie=f(F,ie,Q)),ie}var K=m(F,X);if(K)return K;var R=Object.keys(X),k=h(R);if(F.showHidden&&(R=Object.getOwnPropertyNames(X)),ue(X)&&(R.indexOf("message")>=0||R.indexOf("description")>=0))return v(X);if(R.length===0){if(N(X)){var j=X.name?": "+X.name:"";return F.stylize("[Function"+j+"]","special")}if(M(X))return F.stylize(RegExp.prototype.toString.call(X),"regexp");if(z(X))return F.stylize(Date.prototype.toString.call(X),"date");if(ue(X))return v(X)}var U="",O=!1,D=["{","}"];if(_(X)&&(O=!0,D=["[","]"]),N(X)){var ee=X.name?": "+X.name:"";U=" [Function"+ee+"]"}if(M(X)&&(U=" "+RegExp.prototype.toString.call(X)),z(X)&&(U=" "+Date.prototype.toUTCString.call(X)),ue(X)&&(U=" "+v(X)),R.length===0&&(!O||X.length==0))return D[0]+U+D[1];if(Q<0)return M(X)?F.stylize(RegExp.prototype.toString.call(X),"regexp"):F.stylize("[Object]","special");F.seen.push(X);var S;return O?S=y(F,X,Q,k,R):S=R.map(function($){return b(F,X,Q,k,$,O)}),F.seen.pop(),g(S,U,D)}function m(F,X){if(L(X))return F.stylize("undefined","undefined");if(E(X)){var Q="'"+JSON.stringify(X).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return F.stylize(Q,"string")}if(p(X))return F.stylize(""+X,"number");if(d(X))return F.stylize(""+X,"boolean");if(T(X))return F.stylize("null","null")}function v(F){return"["+Error.prototype.toString.call(F)+"]"}function y(F,X,Q,ie,K){for(var R=[],k=0,j=X.length;k<j;++k)se(X,String(k))?R.push(b(F,X,Q,ie,String(k),!0)):R.push("");return K.forEach(function(U){U.match(/^\d+$/)||R.push(b(F,X,Q,ie,U,!0))}),R}function b(F,X,Q,ie,K,R){var k,j,U;if(U=Object.getOwnPropertyDescriptor(X,K)||{value:X[K]},U.get?U.set?j=F.stylize("[Getter/Setter]","special"):j=F.stylize("[Getter]","special"):U.set&&(j=F.stylize("[Setter]","special")),se(ie,K)||(k="["+K+"]"),j||(F.seen.indexOf(U.value)<0?(T(Q)?j=f(F,U.value,null):j=f(F,U.value,Q-1),j.indexOf(`
|
|
112
|
-
`)>-1&&(
|
|
113
|
-
`).map(function(
|
|
114
|
-
`).slice(2):
|
|
115
|
-
`+
|
|
116
|
-
`).map(function(
|
|
117
|
-
`))):
|
|
118
|
-
`)>=0
|
|
119
|
-
`)+" "+
|
|
120
|
-
`)+" "+Q[1]:Q[0]+X+" "+F.join(", ")+" "+Q[1]}r.types=jp();function _(F){return Array.isArray(F)}r.isArray=_;function d(F){return typeof F=="boolean"}r.isBoolean=d;function T(F){return F===null}r.isNull=T;function w(F){return F==null}r.isNullOrUndefined=w;function p(F){return typeof F=="number"}r.isNumber=p;function E(F){return typeof F=="string"}r.isString=E;function P(F){return typeof F=="symbol"}r.isSymbol=P;function L(F){return F===void 0}r.isUndefined=L;function M(F){return C(F)&&A(F)==="[object RegExp]"}r.isRegExp=M,r.types.isRegExp=M;function C(F){return typeof F=="object"&&F!==null}r.isObject=C;function z(F){return C(F)&&A(F)==="[object Date]"}r.isDate=z,r.types.isDate=z;function ue(F){return C(F)&&(A(F)==="[object Error]"||F instanceof Error)}r.isError=ue,r.types.isNativeError=ue;function N(F){return typeof F=="function"}r.isFunction=N;function W(F){return F===null||typeof F=="boolean"||typeof F=="number"||typeof F=="string"||typeof F=="symbol"||typeof F>"u"}r.isPrimitive=W,r.isBuffer=Zp();function A(F){return Object.prototype.toString.call(F)}function Y(F){return F<10?"0"+F.toString(10):F.toString(10)}var re=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var F=new Date,X=[Y(F.getHours()),Y(F.getMinutes()),Y(F.getSeconds())].join(":");return[F.getDate(),re[F.getMonth()],X].join(" ")}r.log=function(){console.log("%s - %s",V(),r.format.apply(r,arguments))},r.inherits=vt(),r._extend=function(F,X){if(!X||!C(X))return F;for(var Q=Object.keys(X),ie=Q.length;ie--;)F[Q[ie]]=X[Q[ie]];return F};function se(F,X){return Object.prototype.hasOwnProperty.call(F,X)}var te=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;r.promisify=function(X){if(typeof X!="function")throw new TypeError('The "original" argument must be of type Function');if(te&&X[te]){var Q=X[te];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,te,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var ie,K,R=new Promise(function(U,O){ie=U,K=O}),k=[],j=0;j<arguments.length;j++)k.push(arguments[j]);k.push(function(U,O){U?K(U):ie(O)});try{X.apply(this,k)}catch(U){K(U)}return R}return Object.setPrototypeOf(Q,Object.getPrototypeOf(X)),te&&Object.defineProperty(Q,te,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(Q,e(X))},r.promisify.custom=te;function me(F,X){if(!F){var Q=new Error("Promise was rejected with a falsy value");Q.reason=F,F=Q}return X(F)}function J(F){if(typeof F!="function")throw new TypeError('The "original" argument must be of type Function');function X(){for(var Q=[],ie=0;ie<arguments.length;ie++)Q.push(arguments[ie]);var K=Q.pop();if(typeof K!="function")throw new TypeError("The last argument must be of type Function");var R=this,k=function(){return K.apply(R,arguments)};F.apply(this,Q).then(function(j){Ee.nextTick(k.bind(null,null,j))},function(j){Ee.nextTick(me.bind(null,j,k))})}return Object.setPrototypeOf(X,Object.getPrototypeOf(F)),Object.defineProperties(X,e(F)),X}r.callbackify=J}(Wn)),Wn}var Gi,wl;function zp(){if(wl)return Gi;wl=1;function r(b,g){var _=Object.keys(b);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(b);g&&(d=d.filter(function(T){return Object.getOwnPropertyDescriptor(b,T).enumerable})),_.push.apply(_,d)}return _}function e(b){for(var g=1;g<arguments.length;g++){var _=arguments[g]!=null?arguments[g]:{};g%2?r(Object(_),!0).forEach(function(d){t(b,d,_[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(_)):r(Object(_)).forEach(function(d){Object.defineProperty(b,d,Object.getOwnPropertyDescriptor(_,d))})}return b}function t(b,g,_){return g=o(g),g in b?Object.defineProperty(b,g,{value:_,enumerable:!0,configurable:!0,writable:!0}):b[g]=_,b}function n(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function i(b,g){for(var _=0;_<g.length;_++){var d=g[_];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(b,o(d.key),d)}}function s(b,g,_){return g&&i(b.prototype,g),Object.defineProperty(b,"prototype",{writable:!1}),b}function o(b){var g=a(b,"string");return typeof g=="symbol"?g:String(g)}function a(b,g){if(typeof b!="object"||b===null)return b;var _=b[Symbol.toPrimitive];if(_!==void 0){var d=_.call(b,g);if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(b)}var l=Wr(),h=l.Buffer,f=gl(),m=f.inspect,v=m&&m.custom||"inspect";function y(b,g,_){h.prototype.copy.call(b,g,_)}return Gi=function(){function b(){n(this,b),this.head=null,this.tail=null,this.length=0}return s(b,[{key:"push",value:function(_){var d={data:_,next:null};this.length>0?this.tail.next=d:this.head=d,this.tail=d,++this.length}},{key:"unshift",value:function(_){var d={data:_,next:this.head};this.length===0&&(this.tail=d),this.head=d,++this.length}},{key:"shift",value:function(){if(this.length!==0){var _=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,_}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(_){if(this.length===0)return"";for(var d=this.head,T=""+d.data;d=d.next;)T+=_+d.data;return T}},{key:"concat",value:function(_){if(this.length===0)return h.alloc(0);for(var d=h.allocUnsafe(_>>>0),T=this.head,w=0;T;)y(T.data,d,w),w+=T.data.length,T=T.next;return d}},{key:"consume",value:function(_,d){var T;return _<this.head.data.length?(T=this.head.data.slice(0,_),this.head.data=this.head.data.slice(_)):_===this.head.data.length?T=this.shift():T=d?this._getString(_):this._getBuffer(_),T}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(_){var d=this.head,T=1,w=d.data;for(_-=w.length;d=d.next;){var p=d.data,E=_>p.length?p.length:_;if(E===p.length?w+=p:w+=p.slice(0,_),_-=E,_===0){E===p.length?(++T,d.next?this.head=d.next:this.head=this.tail=null):(this.head=d,d.data=p.slice(E));break}++T}return this.length-=T,w}},{key:"_getBuffer",value:function(_){var d=h.allocUnsafe(_),T=this.head,w=1;for(T.data.copy(d),_-=T.data.length;T=T.next;){var p=T.data,E=_>p.length?p.length:_;if(p.copy(d,d.length-_,0,E),_-=E,_===0){E===p.length?(++w,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=p.slice(E));break}++w}return this.length-=w,d}},{key:v,value:function(_,d){return m(this,e(e({},d),{},{depth:0,customInspect:!1}))}}]),b}(),Gi}var Vi,yl;function bl(){if(yl)return Vi;yl=1;function r(o,a){var l=this,h=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return h||f?(a?a(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Ee.nextTick(i,this,o)):Ee.nextTick(i,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(m){!a&&m?l._writableState?l._writableState.errorEmitted?Ee.nextTick(t,l):(l._writableState.errorEmitted=!0,Ee.nextTick(e,l,m)):Ee.nextTick(e,l,m):a?(Ee.nextTick(t,l),a(m)):Ee.nextTick(t,l)}),this)}function e(o,a){i(o,a),t(o)}function t(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function n(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(o,a){o.emit("error",a)}function s(o,a){var l=o._readableState,h=o._writableState;l&&l.autoDestroy||h&&h.autoDestroy?o.destroy(a):o.emit("error",a)}return Vi={destroy:r,undestroy:n,errorOrDestroy:s},Vi}var ji={},vl;function Mt(){if(vl)return ji;vl=1;function r(a,l){a.prototype=Object.create(l.prototype),a.prototype.constructor=a,a.__proto__=l}var e={};function t(a,l,h){h||(h=Error);function f(v,y,b){return typeof l=="string"?l:l(v,y,b)}var m=function(v){r(y,v);function y(b,g,_){return v.call(this,f(b,g,_))||this}return y}(h);m.prototype.name=h.name,m.prototype.code=a,e[a]=m}function n(a,l){if(Array.isArray(a)){var h=a.length;return a=a.map(function(f){return String(f)}),h>2?"one of ".concat(l," ").concat(a.slice(0,h-1).join(", "),", or ")+a[h-1]:h===2?"one of ".concat(l," ").concat(a[0]," or ").concat(a[1]):"of ".concat(l," ").concat(a[0])}else return"of ".concat(l," ").concat(String(a))}function i(a,l,h){return a.substr(0,l.length)===l}function s(a,l,h){return(h===void 0||h>a.length)&&(h=a.length),a.substring(h-l.length,h)===l}function o(a,l,h){return typeof h!="number"&&(h=0),h+l.length>a.length?!1:a.indexOf(l,h)!==-1}return t("ERR_INVALID_OPT_VALUE",function(a,l){return'The value "'+l+'" is invalid for option "'+a+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(a,l,h){var f;typeof l=="string"&&i(l,"not ")?(f="must not be",l=l.replace(/^not /,"")):f="must be";var m;if(s(a," argument"))m="The ".concat(a," ").concat(f," ").concat(n(l,"type"));else{var v=o(a,".")?"property":"argument";m='The "'.concat(a,'" ').concat(v," ").concat(f," ").concat(n(l,"type"))}return m+=". Received type ".concat(typeof h),m},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ji.codes=e,ji}var Zi,_l;function Tl(){if(_l)return Zi;_l=1;var r=Mt().codes.ERR_INVALID_OPT_VALUE;function e(n,i,s){return n.highWaterMark!=null?n.highWaterMark:i?n[s]:null}function t(n,i,s,o){var a=e(i,o,s);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var l=o?s:"highWaterMark";throw new r(l,a)}return Math.floor(a)}return n.objectMode?16:16*1024}return Zi={getHighWaterMark:t},Zi}var zi,El;function Xp(){if(El)return zi;El=1,zi=r;function r(t,n){if(e("noDeprecation"))return t;var i=!1;function s(){if(!i){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return t.apply(this,arguments)}return s}function e(t){try{if(!Ke.localStorage)return!1}catch{return!1}var n=Ke.localStorage[t];return n==null?!1:String(n).toLowerCase()==="true"}return zi}var Xi,Sl;function xl(){if(Sl)return Xi;Sl=1,Xi=M;function r(K){var R=this;this.next=null,this.entry=null,this.finish=function(){ie(R,K)}}var e;M.WritableState=P;var t={deprecate:Xp()},n=no(),i=Wr().Buffer,s=(typeof Ke<"u"?Ke:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(K){return i.from(K)}function a(K){return i.isBuffer(K)||K instanceof s}var l=bl(),h=Tl(),f=h.getHighWaterMark,m=Mt().codes,v=m.ERR_INVALID_ARG_TYPE,y=m.ERR_METHOD_NOT_IMPLEMENTED,b=m.ERR_MULTIPLE_CALLBACK,g=m.ERR_STREAM_CANNOT_PIPE,_=m.ERR_STREAM_DESTROYED,d=m.ERR_STREAM_NULL_VALUES,T=m.ERR_STREAM_WRITE_AFTER_END,w=m.ERR_UNKNOWN_ENCODING,p=l.errorOrDestroy;vt()(M,n);function E(){}function P(K,R,k){e=e||Ut(),K=K||{},typeof k!="boolean"&&(k=R instanceof e),this.objectMode=!!K.objectMode,k&&(this.objectMode=this.objectMode||!!K.writableObjectMode),this.highWaterMark=f(this,K,"writableHighWaterMark",k),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=K.decodeStrings===!1;this.decodeStrings=!j,this.defaultEncoding=K.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(U){re(R,U)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=K.emitClose!==!1,this.autoDestroy=!!K.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}P.prototype.getBuffer=function(){for(var R=this.bufferedRequest,k=[];R;)k.push(R),R=R.next;return k},function(){try{Object.defineProperty(P.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var L;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(L=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(R){return L.call(this,R)?!0:this!==M?!1:R&&R._writableState instanceof P}})):L=function(R){return R instanceof this};function M(K){e=e||Ut();var R=this instanceof e;if(!R&&!L.call(M,this))return new M(K);this._writableState=new P(K,this,R),this.writable=!0,K&&(typeof K.write=="function"&&(this._write=K.write),typeof K.writev=="function"&&(this._writev=K.writev),typeof K.destroy=="function"&&(this._destroy=K.destroy),typeof K.final=="function"&&(this._final=K.final)),n.call(this)}M.prototype.pipe=function(){p(this,new g)};function C(K,R){var k=new T;p(K,k),Ee.nextTick(R,k)}function z(K,R,k,j){var U;return k===null?U=new d:typeof k!="string"&&!R.objectMode&&(U=new v("chunk",["string","Buffer"],k)),U?(p(K,U),Ee.nextTick(j,U),!1):!0}M.prototype.write=function(K,R,k){var j=this._writableState,U=!1,O=!j.objectMode&&a(K);return O&&!i.isBuffer(K)&&(K=o(K)),typeof R=="function"&&(k=R,R=null),O?R="buffer":R||(R=j.defaultEncoding),typeof k!="function"&&(k=E),j.ending?C(this,k):(O||z(this,j,K,k))&&(j.pendingcb++,U=N(this,j,O,K,R,k)),U},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var K=this._writableState;K.corked&&(K.corked--,!K.writing&&!K.corked&&!K.bufferProcessing&&K.bufferedRequest&&te(this,K))},M.prototype.setDefaultEncoding=function(R){if(typeof R=="string"&&(R=R.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((R+"").toLowerCase())>-1))throw new w(R);return this._writableState.defaultEncoding=R,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ue(K,R,k){return!K.objectMode&&K.decodeStrings!==!1&&typeof R=="string"&&(R=i.from(R,k)),R}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(K,R,k,j,U,O){if(!k){var D=ue(R,j,U);j!==D&&(k=!0,U="buffer",j=D)}var ee=R.objectMode?1:j.length;R.length+=ee;var S=R.length<R.highWaterMark;if(S||(R.needDrain=!0),R.writing||R.corked){var $=R.lastBufferedRequest;R.lastBufferedRequest={chunk:j,encoding:U,isBuf:k,callback:O,next:null},$?$.next=R.lastBufferedRequest:R.bufferedRequest=R.lastBufferedRequest,R.bufferedRequestCount+=1}else W(K,R,!1,ee,j,U,O);return S}function W(K,R,k,j,U,O,D){R.writelen=j,R.writecb=D,R.writing=!0,R.sync=!0,R.destroyed?R.onwrite(new _("write")):k?K._writev(U,R.onwrite):K._write(U,O,R.onwrite),R.sync=!1}function A(K,R,k,j,U){--R.pendingcb,k?(Ee.nextTick(U,j),Ee.nextTick(X,K,R),K._writableState.errorEmitted=!0,p(K,j)):(U(j),K._writableState.errorEmitted=!0,p(K,j),X(K,R))}function Y(K){K.writing=!1,K.writecb=null,K.length-=K.writelen,K.writelen=0}function re(K,R){var k=K._writableState,j=k.sync,U=k.writecb;if(typeof U!="function")throw new b;if(Y(k),R)A(K,k,j,R,U);else{var O=me(k)||K.destroyed;!O&&!k.corked&&!k.bufferProcessing&&k.bufferedRequest&&te(K,k),j?Ee.nextTick(V,K,k,O,U):V(K,k,O,U)}}function V(K,R,k,j){k||se(K,R),R.pendingcb--,j(),X(K,R)}function se(K,R){R.length===0&&R.needDrain&&(R.needDrain=!1,K.emit("drain"))}function te(K,R){R.bufferProcessing=!0;var k=R.bufferedRequest;if(K._writev&&k&&k.next){var j=R.bufferedRequestCount,U=new Array(j),O=R.corkedRequestsFree;O.entry=k;for(var D=0,ee=!0;k;)U[D]=k,k.isBuf||(ee=!1),k=k.next,D+=1;U.allBuffers=ee,W(K,R,!0,R.length,U,"",O.finish),R.pendingcb++,R.lastBufferedRequest=null,O.next?(R.corkedRequestsFree=O.next,O.next=null):R.corkedRequestsFree=new r(R),R.bufferedRequestCount=0}else{for(;k;){var S=k.chunk,$=k.encoding,I=k.callback,u=R.objectMode?1:S.length;if(W(K,R,!1,u,S,$,I),k=k.next,R.bufferedRequestCount--,R.writing)break}k===null&&(R.lastBufferedRequest=null)}R.bufferedRequest=k,R.bufferProcessing=!1}M.prototype._write=function(K,R,k){k(new y("_write()"))},M.prototype._writev=null,M.prototype.end=function(K,R,k){var j=this._writableState;return typeof K=="function"?(k=K,K=null,R=null):typeof R=="function"&&(k=R,R=null),K!=null&&this.write(K,R),j.corked&&(j.corked=1,this.uncork()),j.ending||Q(this,j,k),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function me(K){return K.ending&&K.length===0&&K.bufferedRequest===null&&!K.finished&&!K.writing}function J(K,R){K._final(function(k){R.pendingcb--,k&&p(K,k),R.prefinished=!0,K.emit("prefinish"),X(K,R)})}function F(K,R){!R.prefinished&&!R.finalCalled&&(typeof K._final=="function"&&!R.destroyed?(R.pendingcb++,R.finalCalled=!0,Ee.nextTick(J,K,R)):(R.prefinished=!0,K.emit("prefinish")))}function X(K,R){var k=me(R);if(k&&(F(K,R),R.pendingcb===0&&(R.finished=!0,K.emit("finish"),R.autoDestroy))){var j=K._readableState;(!j||j.autoDestroy&&j.endEmitted)&&K.destroy()}return k}function Q(K,R,k){R.ending=!0,X(K,R),k&&(R.finished?Ee.nextTick(k):K.once("finish",k)),R.ended=!0,K.writable=!1}function ie(K,R,k){var j=K.entry;for(K.entry=null;j;){var U=j.callback;R.pendingcb--,U(k),j=j.next}R.corkedRequestsFree.next=K}return Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(R){this._writableState&&(this._writableState.destroyed=R)}}),M.prototype.destroy=l.destroy,M.prototype._undestroy=l.undestroy,M.prototype._destroy=function(K,R){R(K)},Xi}var Ki,Al;function Ut(){if(Al)return Ki;Al=1;var r=Object.keys||function(h){var f=[];for(var m in h)f.push(m);return f};Ki=o;var e=Ll(),t=xl();vt()(o,e);for(var n=r(t.prototype),i=0;i<n.length;i++){var s=n[i];o.prototype[s]||(o.prototype[s]=t.prototype[s])}function o(h){if(!(this instanceof o))return new o(h);e.call(this,h),t.call(this,h),this.allowHalfOpen=!0,h&&(h.readable===!1&&(this.readable=!1),h.writable===!1&&(this.writable=!1),h.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",a)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function a(){this._writableState.ended||Ee.nextTick(l,this)}function l(h){h.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),Ki}var Yi={},Vr={exports:{}},kl;function Kp(){return kl||(kl=1,function(r,e){var t=Wr(),n=t.Buffer;function i(o,a){for(var l in o)a[l]=o[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?r.exports=t:(i(t,e),e.Buffer=s);function s(o,a,l){return n(o,a,l)}i(n,s),s.from=function(o,a,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,l)},s.alloc=function(o,a,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var h=n(o);return a!==void 0?typeof l=="string"?h.fill(a,l):h.fill(a):h.fill(0),h},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}}(Vr,Vr.exports)),Vr.exports}var Rl;function Ji(){if(Rl)return Yi;Rl=1;var r=Kp().Buffer,e=r.isEncoding||function(d){switch(d=""+d,d&&d.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(d){if(!d)return"utf8";for(var T;;)switch(d){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return d;default:if(T)return;d=(""+d).toLowerCase(),T=!0}}function n(d){var T=t(d);if(typeof T!="string"&&(r.isEncoding===e||!e(d)))throw new Error("Unknown encoding: "+d);return T||d}Yi.StringDecoder=i;function i(d){this.encoding=n(d);var T;switch(this.encoding){case"utf16le":this.text=m,this.end=v,T=4;break;case"utf8":this.fillLast=l,T=4;break;case"base64":this.text=y,this.end=b,T=3;break;default:this.write=g,this.end=_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(T)}i.prototype.write=function(d){if(d.length===0)return"";var T,w;if(this.lastNeed){if(T=this.fillLast(d),T===void 0)return"";w=this.lastNeed,this.lastNeed=0}else w=0;return w<d.length?T?T+this.text(d,w):this.text(d,w):T||""},i.prototype.end=f,i.prototype.text=h,i.prototype.fillLast=function(d){if(this.lastNeed<=d.length)return d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,d.length),this.lastNeed-=d.length};function s(d){return d<=127?0:d>>5===6?2:d>>4===14?3:d>>3===30?4:d>>6===2?-1:-2}function o(d,T,w){var p=T.length-1;if(p<w)return 0;var E=s(T[p]);return E>=0?(E>0&&(d.lastNeed=E-1),E):--p<w||E===-2?0:(E=s(T[p]),E>=0?(E>0&&(d.lastNeed=E-2),E):--p<w||E===-2?0:(E=s(T[p]),E>=0?(E>0&&(E===2?E=0:d.lastNeed=E-3),E):0))}function a(d,T,w){if((T[0]&192)!==128)return d.lastNeed=0,"�";if(d.lastNeed>1&&T.length>1){if((T[1]&192)!==128)return d.lastNeed=1,"�";if(d.lastNeed>2&&T.length>2&&(T[2]&192)!==128)return d.lastNeed=2,"�"}}function l(d){var T=this.lastTotal-this.lastNeed,w=a(this,d);if(w!==void 0)return w;if(this.lastNeed<=d.length)return d.copy(this.lastChar,T,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,T,0,d.length),this.lastNeed-=d.length}function h(d,T){var w=o(this,d,T);if(!this.lastNeed)return d.toString("utf8",T);this.lastTotal=w;var p=d.length-(w-this.lastNeed);return d.copy(this.lastChar,0,p),d.toString("utf8",T,p)}function f(d){var T=d&&d.length?this.write(d):"";return this.lastNeed?T+"�":T}function m(d,T){if((d.length-T)%2===0){var w=d.toString("utf16le",T);if(w){var p=w.charCodeAt(w.length-1);if(p>=55296&&p<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=d[d.length-1],d.toString("utf16le",T,d.length-1)}function v(d){var T=d&&d.length?this.write(d):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return T+this.lastChar.toString("utf16le",0,w)}return T}function y(d,T){var w=(d.length-T)%3;return w===0?d.toString("base64",T):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=d[d.length-1]:(this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1]),d.toString("base64",T,d.length-w))}function b(d){var T=d&&d.length?this.write(d):"";return this.lastNeed?T+this.lastChar.toString("base64",0,3-this.lastNeed):T}function g(d){return d.toString(this.encoding)}function _(d){return d&&d.length?this.write(d):""}return Yi}var Qi,Il;function qi(){if(Il)return Qi;Il=1;var r=Mt().codes.ERR_STREAM_PREMATURE_CLOSE;function e(s){var o=!1;return function(){if(!o){o=!0;for(var a=arguments.length,l=new Array(a),h=0;h<a;h++)l[h]=arguments[h];s.apply(this,l)}}}function t(){}function n(s){return s.setHeader&&typeof s.abort=="function"}function i(s,o,a){if(typeof o=="function")return i(s,null,o);o||(o={}),a=e(a||t);var l=o.readable||o.readable!==!1&&s.readable,h=o.writable||o.writable!==!1&&s.writable,f=function(){s.writable||v()},m=s._writableState&&s._writableState.finished,v=function(){h=!1,m=!0,l||a.call(s)},y=s._readableState&&s._readableState.endEmitted,b=function(){l=!1,y=!0,h||a.call(s)},g=function(w){a.call(s,w)},_=function(){var w;if(l&&!y)return(!s._readableState||!s._readableState.ended)&&(w=new r),a.call(s,w);if(h&&!m)return(!s._writableState||!s._writableState.ended)&&(w=new r),a.call(s,w)},d=function(){s.req.on("finish",v)};return n(s)?(s.on("complete",v),s.on("abort",_),s.req?d():s.on("request",d)):h&&!s._writableState&&(s.on("end",f),s.on("close",f)),s.on("end",b),s.on("finish",v),o.error!==!1&&s.on("error",g),s.on("close",_),function(){s.removeListener("complete",v),s.removeListener("abort",_),s.removeListener("request",d),s.req&&s.req.removeListener("finish",v),s.removeListener("end",f),s.removeListener("close",f),s.removeListener("finish",v),s.removeListener("end",b),s.removeListener("error",g),s.removeListener("close",_)}}return Qi=i,Qi}var $i,Cl;function Yp(){if(Cl)return $i;Cl=1;var r;function e(w,p,E){return p=t(p),p in w?Object.defineProperty(w,p,{value:E,enumerable:!0,configurable:!0,writable:!0}):w[p]=E,w}function t(w){var p=n(w,"string");return typeof p=="symbol"?p:String(p)}function n(w,p){if(typeof w!="object"||w===null)return w;var E=w[Symbol.toPrimitive];if(E!==void 0){var P=E.call(w,p);if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(w)}var i=qi(),s=Symbol("lastResolve"),o=Symbol("lastReject"),a=Symbol("error"),l=Symbol("ended"),h=Symbol("lastPromise"),f=Symbol("handlePromise"),m=Symbol("stream");function v(w,p){return{value:w,done:p}}function y(w){var p=w[s];if(p!==null){var E=w[m].read();E!==null&&(w[h]=null,w[s]=null,w[o]=null,p(v(E,!1)))}}function b(w){Ee.nextTick(y,w)}function g(w,p){return function(E,P){w.then(function(){if(p[l]){E(v(void 0,!0));return}p[f](E,P)},P)}}var _=Object.getPrototypeOf(function(){}),d=Object.setPrototypeOf((r={get stream(){return this[m]},next:function(){var p=this,E=this[a];if(E!==null)return Promise.reject(E);if(this[l])return Promise.resolve(v(void 0,!0));if(this[m].destroyed)return new Promise(function(C,z){Ee.nextTick(function(){p[a]?z(p[a]):C(v(void 0,!0))})});var P=this[h],L;if(P)L=new Promise(g(P,this));else{var M=this[m].read();if(M!==null)return Promise.resolve(v(M,!1));L=new Promise(this[f])}return this[h]=L,L}},e(r,Symbol.asyncIterator,function(){return this}),e(r,"return",function(){var p=this;return new Promise(function(E,P){p[m].destroy(null,function(L){if(L){P(L);return}E(v(void 0,!0))})})}),r),_),T=function(p){var E,P=Object.create(d,(E={},e(E,m,{value:p,writable:!0}),e(E,s,{value:null,writable:!0}),e(E,o,{value:null,writable:!0}),e(E,a,{value:null,writable:!0}),e(E,l,{value:p._readableState.endEmitted,writable:!0}),e(E,f,{value:function(M,C){var z=P[m].read();z?(P[h]=null,P[s]=null,P[o]=null,M(v(z,!1))):(P[s]=M,P[o]=C)},writable:!0}),E));return P[h]=null,i(p,function(L){if(L&&L.code!=="ERR_STREAM_PREMATURE_CLOSE"){var M=P[o];M!==null&&(P[h]=null,P[s]=null,P[o]=null,M(L)),P[a]=L;return}var C=P[s];C!==null&&(P[h]=null,P[s]=null,P[o]=null,C(v(void 0,!0))),P[l]=!0}),p.on("readable",b.bind(null,P)),P};return $i=T,$i}var es,Nl;function Jp(){return Nl||(Nl=1,es=function(){throw new Error("Readable.from is not available in the browser")}),es}var ts,Pl;function Ll(){if(Pl)return ts;Pl=1,ts=C;var r;C.ReadableState=M,Fn().EventEmitter;var e=function(D,ee){return D.listeners(ee).length},t=no(),n=Wr().Buffer,i=(typeof Ke<"u"?Ke:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(O){return n.from(O)}function o(O){return n.isBuffer(O)||O instanceof i}var a=gl(),l;a&&a.debuglog?l=a.debuglog("stream"):l=function(){};var h=zp(),f=bl(),m=Tl(),v=m.getHighWaterMark,y=Mt().codes,b=y.ERR_INVALID_ARG_TYPE,g=y.ERR_STREAM_PUSH_AFTER_EOF,_=y.ERR_METHOD_NOT_IMPLEMENTED,d=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,T,w,p;vt()(C,t);var E=f.errorOrDestroy,P=["error","close","destroy","pause","resume"];function L(O,D,ee){if(typeof O.prependListener=="function")return O.prependListener(D,ee);!O._events||!O._events[D]?O.on(D,ee):Array.isArray(O._events[D])?O._events[D].unshift(ee):O._events[D]=[ee,O._events[D]]}function M(O,D,ee){r=r||Ut(),O=O||{},typeof ee!="boolean"&&(ee=D instanceof r),this.objectMode=!!O.objectMode,ee&&(this.objectMode=this.objectMode||!!O.readableObjectMode),this.highWaterMark=v(this,O,"readableHighWaterMark",ee),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=O.emitClose!==!1,this.autoDestroy=!!O.autoDestroy,this.destroyed=!1,this.defaultEncoding=O.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,O.encoding&&(T||(T=Ji().StringDecoder),this.decoder=new T(O.encoding),this.encoding=O.encoding)}function C(O){if(r=r||Ut(),!(this instanceof C))return new C(O);var D=this instanceof r;this._readableState=new M(O,this,D),this.readable=!0,O&&(typeof O.read=="function"&&(this._read=O.read),typeof O.destroy=="function"&&(this._destroy=O.destroy)),t.call(this)}Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(D){this._readableState&&(this._readableState.destroyed=D)}}),C.prototype.destroy=f.destroy,C.prototype._undestroy=f.undestroy,C.prototype._destroy=function(O,D){D(O)},C.prototype.push=function(O,D){var ee=this._readableState,S;return ee.objectMode?S=!0:typeof O=="string"&&(D=D||ee.defaultEncoding,D!==ee.encoding&&(O=n.from(O,D),D=""),S=!0),z(this,O,D,!1,S)},C.prototype.unshift=function(O){return z(this,O,null,!0,!1)};function z(O,D,ee,S,$){l("readableAddChunk",D);var I=O._readableState;if(D===null)I.reading=!1,re(O,I);else{var u;if($||(u=N(I,D)),u)E(O,u);else if(I.objectMode||D&&D.length>0)if(typeof D!="string"&&!I.objectMode&&Object.getPrototypeOf(D)!==n.prototype&&(D=s(D)),S)I.endEmitted?E(O,new d):ue(O,I,D,!0);else if(I.ended)E(O,new g);else{if(I.destroyed)return!1;I.reading=!1,I.decoder&&!ee?(D=I.decoder.write(D),I.objectMode||D.length!==0?ue(O,I,D,!1):te(O,I)):ue(O,I,D,!1)}else S||(I.reading=!1,te(O,I))}return!I.ended&&(I.length<I.highWaterMark||I.length===0)}function ue(O,D,ee,S){D.flowing&&D.length===0&&!D.sync?(D.awaitDrain=0,O.emit("data",ee)):(D.length+=D.objectMode?1:ee.length,S?D.buffer.unshift(ee):D.buffer.push(ee),D.needReadable&&V(O)),te(O,D)}function N(O,D){var ee;return!o(D)&&typeof D!="string"&&D!==void 0&&!O.objectMode&&(ee=new b("chunk",["string","Buffer","Uint8Array"],D)),ee}C.prototype.isPaused=function(){return this._readableState.flowing===!1},C.prototype.setEncoding=function(O){T||(T=Ji().StringDecoder);var D=new T(O);this._readableState.decoder=D,this._readableState.encoding=this._readableState.decoder.encoding;for(var ee=this._readableState.buffer.head,S="";ee!==null;)S+=D.write(ee.data),ee=ee.next;return this._readableState.buffer.clear(),S!==""&&this._readableState.buffer.push(S),this._readableState.length=S.length,this};var W=1073741824;function A(O){return O>=W?O=W:(O--,O|=O>>>1,O|=O>>>2,O|=O>>>4,O|=O>>>8,O|=O>>>16,O++),O}function Y(O,D){return O<=0||D.length===0&&D.ended?0:D.objectMode?1:O!==O?D.flowing&&D.length?D.buffer.head.data.length:D.length:(O>D.highWaterMark&&(D.highWaterMark=A(O)),O<=D.length?O:D.ended?D.length:(D.needReadable=!0,0))}C.prototype.read=function(O){l("read",O),O=parseInt(O,10);var D=this._readableState,ee=O;if(O!==0&&(D.emittedReadable=!1),O===0&&D.needReadable&&((D.highWaterMark!==0?D.length>=D.highWaterMark:D.length>0)||D.ended))return l("read: emitReadable",D.length,D.ended),D.length===0&&D.ended?k(this):V(this),null;if(O=Y(O,D),O===0&&D.ended)return D.length===0&&k(this),null;var S=D.needReadable;l("need readable",S),(D.length===0||D.length-O<D.highWaterMark)&&(S=!0,l("length less than watermark",S)),D.ended||D.reading?(S=!1,l("reading or ended",S)):S&&(l("do read"),D.reading=!0,D.sync=!0,D.length===0&&(D.needReadable=!0),this._read(D.highWaterMark),D.sync=!1,D.reading||(O=Y(ee,D)));var $;return O>0?$=R(O,D):$=null,$===null?(D.needReadable=D.length<=D.highWaterMark,O=0):(D.length-=O,D.awaitDrain=0),D.length===0&&(D.ended||(D.needReadable=!0),ee!==O&&D.ended&&k(this)),$!==null&&this.emit("data",$),$};function re(O,D){if(l("onEofChunk"),!D.ended){if(D.decoder){var ee=D.decoder.end();ee&&ee.length&&(D.buffer.push(ee),D.length+=D.objectMode?1:ee.length)}D.ended=!0,D.sync?V(O):(D.needReadable=!1,D.emittedReadable||(D.emittedReadable=!0,se(O)))}}function V(O){var D=O._readableState;l("emitReadable",D.needReadable,D.emittedReadable),D.needReadable=!1,D.emittedReadable||(l("emitReadable",D.flowing),D.emittedReadable=!0,Ee.nextTick(se,O))}function se(O){var D=O._readableState;l("emitReadable_",D.destroyed,D.length,D.ended),!D.destroyed&&(D.length||D.ended)&&(O.emit("readable"),D.emittedReadable=!1),D.needReadable=!D.flowing&&!D.ended&&D.length<=D.highWaterMark,K(O)}function te(O,D){D.readingMore||(D.readingMore=!0,Ee.nextTick(me,O,D))}function me(O,D){for(;!D.reading&&!D.ended&&(D.length<D.highWaterMark||D.flowing&&D.length===0);){var ee=D.length;if(l("maybeReadMore read 0"),O.read(0),ee===D.length)break}D.readingMore=!1}C.prototype._read=function(O){E(this,new _("_read()"))},C.prototype.pipe=function(O,D){var ee=this,S=this._readableState;switch(S.pipesCount){case 0:S.pipes=O;break;case 1:S.pipes=[S.pipes,O];break;default:S.pipes.push(O);break}S.pipesCount+=1,l("pipe count=%d opts=%j",S.pipesCount,D);var $=(!D||D.end!==!1)&&O!==Ee.stdout&&O!==Ee.stderr,I=$?c:ge;S.endEmitted?Ee.nextTick(I):ee.once("end",I),O.on("unpipe",u);function u(be,_e){l("onunpipe"),be===ee&&_e&&_e.hasUnpiped===!1&&(_e.hasUnpiped=!0,Z())}function c(){l("onend"),O.end()}var x=J(ee);O.on("drain",x);var B=!1;function Z(){l("cleanup"),O.removeListener("close",he),O.removeListener("finish",oe),O.removeListener("drain",x),O.removeListener("error",ae),O.removeListener("unpipe",u),ee.removeListener("end",c),ee.removeListener("end",ge),ee.removeListener("data",H),B=!0,S.awaitDrain&&(!O._writableState||O._writableState.needDrain)&&x()}ee.on("data",H);function H(be){l("ondata");var _e=O.write(be);l("dest.write",_e),_e===!1&&((S.pipesCount===1&&S.pipes===O||S.pipesCount>1&&U(S.pipes,O)!==-1)&&!B&&(l("false write response, pause",S.awaitDrain),S.awaitDrain++),ee.pause())}function ae(be){l("onerror",be),ge(),O.removeListener("error",ae),e(O,"error")===0&&E(O,be)}L(O,"error",ae);function he(){O.removeListener("finish",oe),ge()}O.once("close",he);function oe(){l("onfinish"),O.removeListener("close",he),ge()}O.once("finish",oe);function ge(){l("unpipe"),ee.unpipe(O)}return O.emit("pipe",ee),S.flowing||(l("pipe resume"),ee.resume()),O};function J(O){return function(){var ee=O._readableState;l("pipeOnDrain",ee.awaitDrain),ee.awaitDrain&&ee.awaitDrain--,ee.awaitDrain===0&&e(O,"data")&&(ee.flowing=!0,K(O))}}C.prototype.unpipe=function(O){var D=this._readableState,ee={hasUnpiped:!1};if(D.pipesCount===0)return this;if(D.pipesCount===1)return O&&O!==D.pipes?this:(O||(O=D.pipes),D.pipes=null,D.pipesCount=0,D.flowing=!1,O&&O.emit("unpipe",this,ee),this);if(!O){var S=D.pipes,$=D.pipesCount;D.pipes=null,D.pipesCount=0,D.flowing=!1;for(var I=0;I<$;I++)S[I].emit("unpipe",this,{hasUnpiped:!1});return this}var u=U(D.pipes,O);return u===-1?this:(D.pipes.splice(u,1),D.pipesCount-=1,D.pipesCount===1&&(D.pipes=D.pipes[0]),O.emit("unpipe",this,ee),this)},C.prototype.on=function(O,D){var ee=t.prototype.on.call(this,O,D),S=this._readableState;return O==="data"?(S.readableListening=this.listenerCount("readable")>0,S.flowing!==!1&&this.resume()):O==="readable"&&!S.endEmitted&&!S.readableListening&&(S.readableListening=S.needReadable=!0,S.flowing=!1,S.emittedReadable=!1,l("on readable",S.length,S.reading),S.length?V(this):S.reading||Ee.nextTick(X,this)),ee},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(O,D){var ee=t.prototype.removeListener.call(this,O,D);return O==="readable"&&Ee.nextTick(F,this),ee},C.prototype.removeAllListeners=function(O){var D=t.prototype.removeAllListeners.apply(this,arguments);return(O==="readable"||O===void 0)&&Ee.nextTick(F,this),D};function F(O){var D=O._readableState;D.readableListening=O.listenerCount("readable")>0,D.resumeScheduled&&!D.paused?D.flowing=!0:O.listenerCount("data")>0&&O.resume()}function X(O){l("readable nexttick read 0"),O.read(0)}C.prototype.resume=function(){var O=this._readableState;return O.flowing||(l("resume"),O.flowing=!O.readableListening,Q(this,O)),O.paused=!1,this};function Q(O,D){D.resumeScheduled||(D.resumeScheduled=!0,Ee.nextTick(ie,O,D))}function ie(O,D){l("resume",D.reading),D.reading||O.read(0),D.resumeScheduled=!1,O.emit("resume"),K(O),D.flowing&&!D.reading&&O.read(0)}C.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function K(O){var D=O._readableState;for(l("flow",D.flowing);D.flowing&&O.read()!==null;);}C.prototype.wrap=function(O){var D=this,ee=this._readableState,S=!1;O.on("end",function(){if(l("wrapped end"),ee.decoder&&!ee.ended){var u=ee.decoder.end();u&&u.length&&D.push(u)}D.push(null)}),O.on("data",function(u){if(l("wrapped data"),ee.decoder&&(u=ee.decoder.write(u)),!(ee.objectMode&&u==null)&&!(!ee.objectMode&&(!u||!u.length))){var c=D.push(u);c||(S=!0,O.pause())}});for(var $ in O)this[$]===void 0&&typeof O[$]=="function"&&(this[$]=function(c){return function(){return O[c].apply(O,arguments)}}($));for(var I=0;I<P.length;I++)O.on(P[I],this.emit.bind(this,P[I]));return this._read=function(u){l("wrapped _read",u),S&&(S=!1,O.resume())},this},typeof Symbol=="function"&&(C.prototype[Symbol.asyncIterator]=function(){return w===void 0&&(w=Yp()),w(this)}),Object.defineProperty(C.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(C.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(C.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(D){this._readableState&&(this._readableState.flowing=D)}}),C._fromList=R,Object.defineProperty(C.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function R(O,D){if(D.length===0)return null;var ee;return D.objectMode?ee=D.buffer.shift():!O||O>=D.length?(D.decoder?ee=D.buffer.join(""):D.buffer.length===1?ee=D.buffer.first():ee=D.buffer.concat(D.length),D.buffer.clear()):ee=D.buffer.consume(O,D.decoder),ee}function k(O){var D=O._readableState;l("endReadable",D.endEmitted),D.endEmitted||(D.ended=!0,Ee.nextTick(j,D,O))}function j(O,D){if(l("endReadableNT",O.endEmitted,O.length),!O.endEmitted&&O.length===0&&(O.endEmitted=!0,D.readable=!1,D.emit("end"),O.autoDestroy)){var ee=D._writableState;(!ee||ee.autoDestroy&&ee.finished)&&D.destroy()}}typeof Symbol=="function"&&(C.from=function(O,D){return p===void 0&&(p=Jp()),p(C,O,D)});function U(O,D){for(var ee=0,S=O.length;ee<S;ee++)if(O[ee]===D)return ee;return-1}return ts}var rs,Ol;function Fl(){if(Ol)return rs;Ol=1,rs=a;var r=Mt().codes,e=r.ERR_METHOD_NOT_IMPLEMENTED,t=r.ERR_MULTIPLE_CALLBACK,n=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=r.ERR_TRANSFORM_WITH_LENGTH_0,s=Ut();vt()(a,s);function o(f,m){var v=this._transformState;v.transforming=!1;var y=v.writecb;if(y===null)return this.emit("error",new t);v.writechunk=null,v.writecb=null,m!=null&&this.push(m),y(f);var b=this._readableState;b.reading=!1,(b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}function a(f){if(!(this instanceof a))return new a(f);s.call(this,f),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",l)}function l(){var f=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(m,v){h(f,m,v)}):h(this,null,null)}a.prototype.push=function(f,m){return this._transformState.needTransform=!1,s.prototype.push.call(this,f,m)},a.prototype._transform=function(f,m,v){v(new e("_transform()"))},a.prototype._write=function(f,m,v){var y=this._transformState;if(y.writecb=v,y.writechunk=f,y.writeencoding=m,!y.transforming){var b=this._readableState;(y.needTransform||b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}},a.prototype._read=function(f){var m=this._transformState;m.writechunk!==null&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},a.prototype._destroy=function(f,m){s.prototype._destroy.call(this,f,function(v){m(v)})};function h(f,m,v){if(m)return f.emit("error",m);if(v!=null&&f.push(v),f._writableState.length)throw new i;if(f._transformState.transforming)throw new n;return f.push(null)}return rs}var ns,Dl;function Qp(){if(Dl)return ns;Dl=1,ns=e;var r=Fl();vt()(e,r);function e(t){if(!(this instanceof e))return new e(t);r.call(this,t)}return e.prototype._transform=function(t,n,i){i(null,t)},ns}var is,Bl;function qp(){if(Bl)return is;Bl=1;var r;function e(v){var y=!1;return function(){y||(y=!0,v.apply(void 0,arguments))}}var t=Mt().codes,n=t.ERR_MISSING_ARGS,i=t.ERR_STREAM_DESTROYED;function s(v){if(v)throw v}function o(v){return v.setHeader&&typeof v.abort=="function"}function a(v,y,b,g){g=e(g);var _=!1;v.on("close",function(){_=!0}),r===void 0&&(r=qi()),r(v,{readable:y,writable:b},function(T){if(T)return g(T);_=!0,g()});var d=!1;return function(T){if(!_&&!d){if(d=!0,o(v))return v.abort();if(typeof v.destroy=="function")return v.destroy();g(T||new i("pipe"))}}}function l(v){v()}function h(v,y){return v.pipe(y)}function f(v){return!v.length||typeof v[v.length-1]!="function"?s:v.pop()}function m(){for(var v=arguments.length,y=new Array(v),b=0;b<v;b++)y[b]=arguments[b];var g=f(y);if(Array.isArray(y[0])&&(y=y[0]),y.length<2)throw new n("streams");var _,d=y.map(function(T,w){var p=w<y.length-1,E=w>0;return a(T,p,E,function(P){_||(_=P),P&&d.forEach(l),!p&&(d.forEach(l),g(_))})});return y.reduce(h)}return is=m,is}var ss,Ml;function as(){if(Ml)return ss;Ml=1,ss=t;var r=Fn().EventEmitter,e=vt();e(t,r),t.Readable=Ll(),t.Writable=xl(),t.Duplex=Ut(),t.Transform=Fl(),t.PassThrough=Qp(),t.finished=qi(),t.pipeline=qp(),t.Stream=t;function t(){r.call(this)}return t.prototype.pipe=function(n,i){var s=this;function o(y){n.writable&&n.write(y)===!1&&s.pause&&s.pause()}s.on("data",o);function a(){s.readable&&s.resume&&s.resume()}n.on("drain",a),!n._isStdio&&(!i||i.end!==!1)&&(s.on("end",h),s.on("close",f));var l=!1;function h(){l||(l=!0,n.end())}function f(){l||(l=!0,typeof n.destroy=="function"&&n.destroy())}function m(y){if(v(),r.listenerCount(this,"error")===0)throw y}s.on("error",m),n.on("error",m);function v(){s.removeListener("data",o),n.removeListener("drain",a),s.removeListener("end",h),s.removeListener("close",f),s.removeListener("error",m),n.removeListener("error",m),s.removeListener("end",v),s.removeListener("close",v),n.removeListener("close",v)}return s.on("end",v),s.on("close",v),n.on("close",v),n.emit("pipe",s),n},ss}var Ul;function $p(){return Ul||(Ul=1,function(r){(function(e){e.parser=function(R,k){return new n(R,k)},e.SAXParser=n,e.SAXStream=f,e.createStream=h,e.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function n(R,k){if(!(this instanceof n))return new n(R,k);var j=this;s(j),j.q=j.c="",j.bufferCheckPosition=e.MAX_BUFFER_LENGTH,j.opt=k||{},j.opt.lowercase=j.opt.lowercase||j.opt.lowercasetags,j.looseCase=j.opt.lowercase?"toLowerCase":"toUpperCase",j.tags=[],j.closed=j.closedRoot=j.sawRoot=!1,j.tag=j.error=null,j.strict=!!R,j.noscript=!!(R||j.opt.noscript),j.state=C.BEGIN,j.strictEntities=j.opt.strictEntities,j.ENTITIES=j.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),j.attribList=[],j.opt.xmlns&&(j.ns=Object.create(g)),j.trackPosition=j.opt.position!==!1,j.trackPosition&&(j.position=j.line=j.column=0),ue(j,"onready")}Object.create||(Object.create=function(R){function k(){}k.prototype=R;var j=new k;return j}),Object.keys||(Object.keys=function(R){var k=[];for(var j in R)R.hasOwnProperty(j)&&k.push(j);return k});function i(R){for(var k=Math.max(e.MAX_BUFFER_LENGTH,10),j=0,U=0,O=t.length;U<O;U++){var D=R[t[U]].length;if(D>k)switch(t[U]){case"textNode":W(R);break;case"cdata":N(R,"oncdata",R.cdata),R.cdata="";break;case"script":N(R,"onscript",R.script),R.script="";break;default:Y(R,"Max buffer length exceeded: "+t[U])}j=Math.max(j,D)}var ee=e.MAX_BUFFER_LENGTH-j;R.bufferCheckPosition=ee+R.position}function s(R){for(var k=0,j=t.length;k<j;k++)R[t[k]]=""}function o(R){W(R),R.cdata!==""&&(N(R,"oncdata",R.cdata),R.cdata=""),R.script!==""&&(N(R,"onscript",R.script),R.script="")}n.prototype={end:function(){re(this)},write:K,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){o(this)}};var a;try{a=as().Stream}catch{a=function(){}}var l=e.EVENTS.filter(function(R){return R!=="error"&&R!=="end"});function h(R,k){return new f(R,k)}function f(R,k){if(!(this instanceof f))return new f(R,k);a.apply(this),this._parser=new n(R,k),this.writable=!0,this.readable=!0;var j=this;this._parser.onend=function(){j.emit("end")},this._parser.onerror=function(U){j.emit("error",U),j._parser.error=null},this._decoder=null,l.forEach(function(U){Object.defineProperty(j,"on"+U,{get:function(){return j._parser["on"+U]},set:function(O){if(!O)return j.removeAllListeners(U),j._parser["on"+U]=O,O;j.on(U,O)},enumerable:!0,configurable:!1})})}f.prototype=Object.create(a.prototype,{constructor:{value:f}}),f.prototype.write=function(R){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(R)){if(!this._decoder){var k=Ji().StringDecoder;this._decoder=new k("utf8")}R=this._decoder.write(R)}return this._parser.write(R.toString()),this.emit("data",R),!0},f.prototype.end=function(R){return R&&R.length&&this.write(R),this._parser.end(),!0},f.prototype.on=function(R,k){var j=this;return!j._parser["on"+R]&&l.indexOf(R)!==-1&&(j._parser["on"+R]=function(){var U=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);U.splice(0,0,R),j.emit.apply(j,U)}),a.prototype.on.call(j,R,k)};var m="[CDATA[",v="DOCTYPE",y="http://www.w3.org/XML/1998/namespace",b="http://www.w3.org/2000/xmlns/",g={xml:y,xmlns:b},_=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,d=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,T=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,w=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function p(R){return R===" "||R===`
|
|
121
|
-
`||
|
|
122
|
-
Line: `+
|
|
123
|
-
Column: `+
|
|
124
|
-
Char: `+
|
|
125
|
-
Actual: `+
|
|
126
|
-
Actual: `+
|
|
127
|
-
`?(k.line++,k.column=0):k.column++),k.state){case
|
|
128
|
-
`?(k.line++,k.column=0):k.column++);k.textNode+=R.substring(O,j-1)}U==="<"&&!(k.sawRoot&&k.closedRoot&&!k.strict)?(k.state=C.OPEN_WAKA,k.startTagPosition=k.position):(!p(U)&&(!k.sawRoot||k.closedRoot)&&V(k,"Text data outside of root node."),U==="&"?k.state=C.TEXT_ENTITY:k.textNode+=U);continue;case C.SCRIPT:U==="<"?k.state=C.SCRIPT_ENDING:k.script+=U;continue;case C.SCRIPT_ENDING:U==="/"?k.state=C.CLOSE_TAG:(k.script+="<"+U,k.state=C.SCRIPT);continue;case C.OPEN_WAKA:if(U==="!")k.state=C.SGML_DECL,k.sgmlDecl="";else if(!p(U))if(L(_,U))k.state=C.OPEN_TAG,k.tagName=U;else if(U==="/")k.state=C.CLOSE_TAG,k.tagName="";else if(U==="?")k.state=C.PROC_INST,k.procInstName=k.procInstBody="";else{if(V(k,"Unencoded <"),k.startTagPosition+1<k.position){var D=k.position-k.startTagPosition;U=new Array(D).join(" ")+U}k.textNode+="<"+U,k.state=C.TEXT}continue;case C.SGML_DECL:(k.sgmlDecl+U).toUpperCase()===m?(N(k,"onopencdata"),k.state=C.CDATA,k.sgmlDecl="",k.cdata=""):k.sgmlDecl+U==="--"?(k.state=C.COMMENT,k.comment="",k.sgmlDecl=""):(k.sgmlDecl+U).toUpperCase()===v?(k.state=C.DOCTYPE,(k.doctype||k.sawRoot)&&V(k,"Inappropriately located doctype declaration"),k.doctype="",k.sgmlDecl=""):U===">"?(N(k,"onsgmldeclaration",k.sgmlDecl),k.sgmlDecl="",k.state=C.TEXT):(E(U)&&(k.state=C.SGML_DECL_QUOTED),k.sgmlDecl+=U);continue;case C.SGML_DECL_QUOTED:U===k.q&&(k.state=C.SGML_DECL,k.q=""),k.sgmlDecl+=U;continue;case C.DOCTYPE:U===">"?(k.state=C.TEXT,N(k,"ondoctype",k.doctype),k.doctype=!0):(k.doctype+=U,U==="["?k.state=C.DOCTYPE_DTD:E(U)&&(k.state=C.DOCTYPE_QUOTED,k.q=U));continue;case C.DOCTYPE_QUOTED:k.doctype+=U,U===k.q&&(k.q="",k.state=C.DOCTYPE);continue;case C.DOCTYPE_DTD:k.doctype+=U,U==="]"?k.state=C.DOCTYPE:E(U)&&(k.state=C.DOCTYPE_DTD_QUOTED,k.q=U);continue;case C.DOCTYPE_DTD_QUOTED:k.doctype+=U,U===k.q&&(k.state=C.DOCTYPE_DTD,k.q="");continue;case C.COMMENT:U==="-"?k.state=C.COMMENT_ENDING:k.comment+=U;continue;case C.COMMENT_ENDING:U==="-"?(k.state=C.COMMENT_ENDED,k.comment=A(k.opt,k.comment),k.comment&&N(k,"oncomment",k.comment),k.comment=""):(k.comment+="-"+U,k.state=C.COMMENT);continue;case C.COMMENT_ENDED:U!==">"?(V(k,"Malformed comment"),k.comment+="--"+U,k.state=C.COMMENT):k.state=C.TEXT;continue;case C.CDATA:U==="]"?k.state=C.CDATA_ENDING:k.cdata+=U;continue;case C.CDATA_ENDING:U==="]"?k.state=C.CDATA_ENDING_2:(k.cdata+="]"+U,k.state=C.CDATA);continue;case C.CDATA_ENDING_2:U===">"?(k.cdata&&N(k,"oncdata",k.cdata),N(k,"onclosecdata"),k.cdata="",k.state=C.TEXT):U==="]"?k.cdata+="]":(k.cdata+="]]"+U,k.state=C.CDATA);continue;case C.PROC_INST:U==="?"?k.state=C.PROC_INST_ENDING:p(U)?k.state=C.PROC_INST_BODY:k.procInstName+=U;continue;case C.PROC_INST_BODY:if(!k.procInstBody&&p(U))continue;U==="?"?k.state=C.PROC_INST_ENDING:k.procInstBody+=U;continue;case C.PROC_INST_ENDING:U===">"?(N(k,"onprocessinginstruction",{name:k.procInstName,body:k.procInstBody}),k.procInstName=k.procInstBody="",k.state=C.TEXT):(k.procInstBody+="?"+U,k.state=C.PROC_INST_BODY);continue;case C.OPEN_TAG:L(d,U)?k.tagName+=U:(se(k),U===">"?J(k):U==="/"?k.state=C.OPEN_TAG_SLASH:(p(U)||V(k,"Invalid character in tag name"),k.state=C.ATTRIB));continue;case C.OPEN_TAG_SLASH:U===">"?(J(k,!0),F(k)):(V(k,"Forward-slash in opening tag not followed by >"),k.state=C.ATTRIB);continue;case C.ATTRIB:if(p(U))continue;U===">"?J(k):U==="/"?k.state=C.OPEN_TAG_SLASH:L(_,U)?(k.attribName=U,k.attribValue="",k.state=C.ATTRIB_NAME):V(k,"Invalid attribute name");continue;case C.ATTRIB_NAME:U==="="?k.state=C.ATTRIB_VALUE:U===">"?(V(k,"Attribute without value"),k.attribValue=k.attribName,me(k),J(k)):p(U)?k.state=C.ATTRIB_NAME_SAW_WHITE:L(d,U)?k.attribName+=U:V(k,"Invalid attribute name");continue;case C.ATTRIB_NAME_SAW_WHITE:if(U==="=")k.state=C.ATTRIB_VALUE;else{if(p(U))continue;V(k,"Attribute without value"),k.tag.attributes[k.attribName]="",k.attribValue="",N(k,"onattribute",{name:k.attribName,value:""}),k.attribName="",U===">"?J(k):L(_,U)?(k.attribName=U,k.state=C.ATTRIB_NAME):(V(k,"Invalid attribute name"),k.state=C.ATTRIB)}continue;case C.ATTRIB_VALUE:if(p(U))continue;E(U)?(k.q=U,k.state=C.ATTRIB_VALUE_QUOTED):(V(k,"Unquoted attribute value"),k.state=C.ATTRIB_VALUE_UNQUOTED,k.attribValue=U);continue;case C.ATTRIB_VALUE_QUOTED:if(U!==k.q){U==="&"?k.state=C.ATTRIB_VALUE_ENTITY_Q:k.attribValue+=U;continue}me(k),k.q="",k.state=C.ATTRIB_VALUE_CLOSED;continue;case C.ATTRIB_VALUE_CLOSED:p(U)?k.state=C.ATTRIB:U===">"?J(k):U==="/"?k.state=C.OPEN_TAG_SLASH:L(_,U)?(V(k,"No whitespace between attributes"),k.attribName=U,k.attribValue="",k.state=C.ATTRIB_NAME):V(k,"Invalid attribute name");continue;case C.ATTRIB_VALUE_UNQUOTED:if(!P(U)){U==="&"?k.state=C.ATTRIB_VALUE_ENTITY_U:k.attribValue+=U;continue}me(k),U===">"?J(k):k.state=C.ATTRIB;continue;case C.CLOSE_TAG:if(k.tagName)U===">"?F(k):L(d,U)?k.tagName+=U:k.script?(k.script+="</"+k.tagName,k.tagName="",k.state=C.SCRIPT):(p(U)||V(k,"Invalid tagname in closing tag"),k.state=C.CLOSE_TAG_SAW_WHITE);else{if(p(U))continue;M(_,U)?k.script?(k.script+="</"+U,k.state=C.SCRIPT):V(k,"Invalid tagname in closing tag."):k.tagName=U}continue;case C.CLOSE_TAG_SAW_WHITE:if(p(U))continue;U===">"?F(k):V(k,"Invalid characters in closing tag");continue;case C.TEXT_ENTITY:case C.ATTRIB_VALUE_ENTITY_Q:case C.ATTRIB_VALUE_ENTITY_U:var ee,S;switch(k.state){case C.TEXT_ENTITY:ee=C.TEXT,S="textNode";break;case C.ATTRIB_VALUE_ENTITY_Q:ee=C.ATTRIB_VALUE_QUOTED,S="attribValue";break;case C.ATTRIB_VALUE_ENTITY_U:ee=C.ATTRIB_VALUE_UNQUOTED,S="attribValue";break}U===";"?(k[S]+=X(k),k.entity="",k.state=ee):L(k.entity.length?w:T,U)?k.entity+=U:(V(k,"Invalid character in entity name"),k[S]+="&"+k.entity+U,k.entity="",k.state=ee);continue;default:throw new Error(k,"Unknown state: "+k.state)}return k.position>=k.bufferCheckPosition&&i(k),k}String.fromCodePoint||function(){var R=String.fromCharCode,k=Math.floor,j=function(){var U=16384,O=[],D,ee,S=-1,$=arguments.length;if(!$)return"";for(var I="";++S<$;){var u=Number(arguments[S]);if(!isFinite(u)||u<0||u>1114111||k(u)!==u)throw RangeError("Invalid code point: "+u);u<=65535?O.push(u):(u-=65536,D=(u>>10)+55296,ee=u%1024+56320,O.push(D,ee)),(S+1===$||O.length>U)&&(I+=R.apply(null,O),O.length=0)}return I};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:j,configurable:!0,writable:!0}):String.fromCodePoint=j}()})(r)}(On)),On}var os,Wl;function ls(){return Wl||(Wl=1,os={isArray:function(r){return Array.isArray?Array.isArray(r):Object.prototype.toString.call(r)==="[object Array]"}}),os}var us,Hl;function cs(){if(Hl)return us;Hl=1;var r=ls().isArray;return us={copyOptions:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n},ensureFlagExists:function(e,t){(!(e in t)||typeof t[e]!="boolean")&&(t[e]=!1)},ensureSpacesExists:function(e){(!("spaces"in e)||typeof e.spaces!="number"&&typeof e.spaces!="string")&&(e.spaces=0)},ensureAlwaysArrayExists:function(e){(!("alwaysArray"in e)||typeof e.alwaysArray!="boolean"&&!r(e.alwaysArray))&&(e.alwaysArray=!1)},ensureKeyExists:function(e,t){(!(e+"Key"in t)||typeof t[e+"Key"]!="string")&&(t[e+"Key"]=t.compact?"_"+e:e)},checkFnExists:function(e,t){return e+"Fn"in t}},us}var hs,Gl;function Vl(){if(Gl)return hs;Gl=1;var r=$p(),e=cs(),t=ls().isArray,n,i;function s(d){return n=e.copyOptions(d),e.ensureFlagExists("ignoreDeclaration",n),e.ensureFlagExists("ignoreInstruction",n),e.ensureFlagExists("ignoreAttributes",n),e.ensureFlagExists("ignoreText",n),e.ensureFlagExists("ignoreComment",n),e.ensureFlagExists("ignoreCdata",n),e.ensureFlagExists("ignoreDoctype",n),e.ensureFlagExists("compact",n),e.ensureFlagExists("alwaysChildren",n),e.ensureFlagExists("addParent",n),e.ensureFlagExists("trim",n),e.ensureFlagExists("nativeType",n),e.ensureFlagExists("nativeTypeAttributes",n),e.ensureFlagExists("sanitize",n),e.ensureFlagExists("instructionHasAttributes",n),e.ensureFlagExists("captureSpacesBetweenElements",n),e.ensureAlwaysArrayExists(n),e.ensureKeyExists("declaration",n),e.ensureKeyExists("instruction",n),e.ensureKeyExists("attributes",n),e.ensureKeyExists("text",n),e.ensureKeyExists("comment",n),e.ensureKeyExists("cdata",n),e.ensureKeyExists("doctype",n),e.ensureKeyExists("type",n),e.ensureKeyExists("name",n),e.ensureKeyExists("elements",n),e.ensureKeyExists("parent",n),e.checkFnExists("doctype",n),e.checkFnExists("instruction",n),e.checkFnExists("cdata",n),e.checkFnExists("comment",n),e.checkFnExists("text",n),e.checkFnExists("instructionName",n),e.checkFnExists("elementName",n),e.checkFnExists("attributeName",n),e.checkFnExists("attributeValue",n),e.checkFnExists("attributes",n),n}function o(d){var T=Number(d);if(!isNaN(T))return T;var w=d.toLowerCase();return w==="true"?!0:w==="false"?!1:d}function a(d,T){var w;if(n.compact){if(!i[n[d+"Key"]]&&(t(n.alwaysArray)?n.alwaysArray.indexOf(n[d+"Key"])!==-1:n.alwaysArray)&&(i[n[d+"Key"]]=[]),i[n[d+"Key"]]&&!t(i[n[d+"Key"]])&&(i[n[d+"Key"]]=[i[n[d+"Key"]]]),d+"Fn"in n&&typeof T=="string"&&(T=n[d+"Fn"](T,i)),d==="instruction"&&("instructionFn"in n||"instructionNameFn"in n)){for(w in T)if(T.hasOwnProperty(w))if("instructionFn"in n)T[w]=n.instructionFn(T[w],w,i);else{var p=T[w];delete T[w],T[n.instructionNameFn(w,p,i)]=p}}t(i[n[d+"Key"]])?i[n[d+"Key"]].push(T):i[n[d+"Key"]]=T}else{i[n.elementsKey]||(i[n.elementsKey]=[]);var E={};if(E[n.typeKey]=d,d==="instruction"){for(w in T)if(T.hasOwnProperty(w))break;E[n.nameKey]="instructionNameFn"in n?n.instructionNameFn(w,T,i):w,n.instructionHasAttributes?(E[n.attributesKey]=T[w][n.attributesKey],"instructionFn"in n&&(E[n.attributesKey]=n.instructionFn(E[n.attributesKey],w,i))):("instructionFn"in n&&(T[w]=n.instructionFn(T[w],w,i)),E[n.instructionKey]=T[w])}else d+"Fn"in n&&(T=n[d+"Fn"](T,i)),E[n[d+"Key"]]=T;n.addParent&&(E[n.parentKey]=i),i[n.elementsKey].push(E)}}function l(d){if("attributesFn"in n&&d&&(d=n.attributesFn(d,i)),(n.trim||"attributeValueFn"in n||"attributeNameFn"in n||n.nativeTypeAttributes)&&d){var T;for(T in d)if(d.hasOwnProperty(T)&&(n.trim&&(d[T]=d[T].trim()),n.nativeTypeAttributes&&(d[T]=o(d[T])),"attributeValueFn"in n&&(d[T]=n.attributeValueFn(d[T],T,i)),"attributeNameFn"in n)){var w=d[T];delete d[T],d[n.attributeNameFn(T,d[T],i)]=w}}return d}function h(d){var T={};if(d.body&&(d.name.toLowerCase()==="xml"||n.instructionHasAttributes)){for(var w=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,p;(p=w.exec(d.body))!==null;)T[p[1]]=p[2]||p[3]||p[4];T=l(T)}if(d.name.toLowerCase()==="xml"){if(n.ignoreDeclaration)return;i[n.declarationKey]={},Object.keys(T).length&&(i[n.declarationKey][n.attributesKey]=T),n.addParent&&(i[n.declarationKey][n.parentKey]=i)}else{if(n.ignoreInstruction)return;n.trim&&(d.body=d.body.trim());var E={};n.instructionHasAttributes&&Object.keys(T).length?(E[d.name]={},E[d.name][n.attributesKey]=T):E[d.name]=d.body,a("instruction",E)}}function f(d,T){var w;if(typeof d=="object"&&(T=d.attributes,d=d.name),T=l(T),"elementNameFn"in n&&(d=n.elementNameFn(d,i)),n.compact){if(w={},!n.ignoreAttributes&&T&&Object.keys(T).length){w[n.attributesKey]={};var p;for(p in T)T.hasOwnProperty(p)&&(w[n.attributesKey][p]=T[p])}!(d in i)&&(t(n.alwaysArray)?n.alwaysArray.indexOf(d)!==-1:n.alwaysArray)&&(i[d]=[]),i[d]&&!t(i[d])&&(i[d]=[i[d]]),t(i[d])?i[d].push(w):i[d]=w}else i[n.elementsKey]||(i[n.elementsKey]=[]),w={},w[n.typeKey]="element",w[n.nameKey]=d,!n.ignoreAttributes&&T&&Object.keys(T).length&&(w[n.attributesKey]=T),n.alwaysChildren&&(w[n.elementsKey]=[]),i[n.elementsKey].push(w);w[n.parentKey]=i,i=w}function m(d){n.ignoreText||!d.trim()&&!n.captureSpacesBetweenElements||(n.trim&&(d=d.trim()),n.nativeType&&(d=o(d)),n.sanitize&&(d=d.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")),a("text",d))}function v(d){n.ignoreComment||(n.trim&&(d=d.trim()),a("comment",d))}function y(d){var T=i[n.parentKey];n.addParent||delete i[n.parentKey],i=T}function b(d){n.ignoreCdata||(n.trim&&(d=d.trim()),a("cdata",d))}function g(d){n.ignoreDoctype||(d=d.replace(/^ /,""),n.trim&&(d=d.trim()),a("doctype",d))}function _(d){d.note=d}return hs=function(d,T){var w=r.parser(!0,{}),p={};if(i=p,n=s(T),w.opt={strictEntities:!0},w.onopentag=f,w.ontext=m,w.oncomment=v,w.onclosetag=y,w.onerror=_,w.oncdata=b,w.ondoctype=g,w.onprocessinginstruction=h,w.write(d).close(),p[n.elementsKey]){var E=p[n.elementsKey];delete p[n.elementsKey],p[n.elementsKey]=E,delete p.text}return p},hs}var fs,jl;function em(){if(jl)return fs;jl=1;var r=cs(),e=Vl();function t(n){var i=r.copyOptions(n);return r.ensureSpacesExists(i),i}return fs=function(n,i){var s,o,a,l;return s=t(i),o=e(n,s),l="compact"in s&&s.compact?"_parent":"parent","addParent"in s&&s.addParent?a=JSON.stringify(o,function(h,f){return h===l?"_":f},s.spaces):a=JSON.stringify(o,null,s.spaces),a.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")},fs}var ds,Zl;function zl(){if(Zl)return ds;Zl=1;var r=cs(),e=ls().isArray,t,n;function i(w){var p=r.copyOptions(w);return r.ensureFlagExists("ignoreDeclaration",p),r.ensureFlagExists("ignoreInstruction",p),r.ensureFlagExists("ignoreAttributes",p),r.ensureFlagExists("ignoreText",p),r.ensureFlagExists("ignoreComment",p),r.ensureFlagExists("ignoreCdata",p),r.ensureFlagExists("ignoreDoctype",p),r.ensureFlagExists("compact",p),r.ensureFlagExists("indentText",p),r.ensureFlagExists("indentCdata",p),r.ensureFlagExists("indentAttributes",p),r.ensureFlagExists("indentInstruction",p),r.ensureFlagExists("fullTagEmptyElement",p),r.ensureFlagExists("noQuotesForNativeAttributes",p),r.ensureSpacesExists(p),typeof p.spaces=="number"&&(p.spaces=Array(p.spaces+1).join(" ")),r.ensureKeyExists("declaration",p),r.ensureKeyExists("instruction",p),r.ensureKeyExists("attributes",p),r.ensureKeyExists("text",p),r.ensureKeyExists("comment",p),r.ensureKeyExists("cdata",p),r.ensureKeyExists("doctype",p),r.ensureKeyExists("type",p),r.ensureKeyExists("name",p),r.ensureKeyExists("elements",p),r.checkFnExists("doctype",p),r.checkFnExists("instruction",p),r.checkFnExists("cdata",p),r.checkFnExists("comment",p),r.checkFnExists("text",p),r.checkFnExists("instructionName",p),r.checkFnExists("elementName",p),r.checkFnExists("attributeName",p),r.checkFnExists("attributeValue",p),r.checkFnExists("attributes",p),r.checkFnExists("fullTagEmptyElement",p),p}function s(w,p,E){return(!E&&w.spaces?`
|
|
129
|
-
`:"")+Array(p+1).join(w.spaces)}function o(w,p,E){if(p.ignoreAttributes)return"";"attributesFn"in p&&(w=p.attributesFn(w,n,t));var P,
|
|
130
|
-
`+Array(E+1).join(p.spaces):""),P.push("</"+L+">")):P.push("/>"),P.join("")}function g(w,p,E,P){return w.reduce(function(L,M){var C=s(p,E,P&&!L);switch(M.type){case"element":return L+C+b(M,p,E);case"comment":return L+C+h(M[p.commentKey],p);case"doctype":return L+C+m(M[p.doctypeKey],p);case"cdata":return L+(p.indentCdata?C:"")+f(M[p.cdataKey],p);case"text":return L+(p.indentText?C:"")+v(M[p.textKey],p);case"instruction":var z={};return z[M[p.nameKey]]=M[p.attributesKey]?M:M[p.instructionKey],L+(p.indentInstruction?C:"")+l(z,p,E)}},"")}function _(w,p,E){var P;for(P in w)if(w.hasOwnProperty(P))switch(P){case p.parentKey:case p.attributesKey:break;case p.textKey:if(p.indentText||E)return!0;break;case p.cdataKey:if(p.indentCdata||E)return!0;break;case p.instructionKey:if(p.indentInstruction||E)return!0;break;case p.doctypeKey:case p.commentKey:return!0;default:return!0}return!1}function d(w,p,E,P,L){t=w,n=p;var M="elementNameFn"in E?E.elementNameFn(p,w):p;if(typeof w>"u"||w===null||w==="")return"fullTagEmptyElementFn"in E&&E.fullTagEmptyElementFn(p,w)||E.fullTagEmptyElement?"<"+M+"></"+M+">":"<"+M+"/>";var C=[];if(p){if(C.push("<"+M),typeof w!="object")return C.push(">"+v(w,E)+"</"+M+">"),C.join("");w[E.attributesKey]&&C.push(o(w[E.attributesKey],E,P));var z=_(w,E,!0)||w[E.attributesKey]&&w[E.attributesKey]["xml:space"]==="preserve";if(z||("fullTagEmptyElementFn"in E?z=E.fullTagEmptyElementFn(p,w):z=E.fullTagEmptyElement),z)C.push(">");else return C.push("/>"),C.join("")}return C.push(T(w,E,P+1,!1)),t=w,n=p,p&&C.push((L?s(E,P,!1):"")+"</"+M+">"),C.join("")}function T(w,p,E,P){var L,M,C,z=[];for(M in w)if(w.hasOwnProperty(M))for(C=e(w[M])?w[M]:[w[M]],L=0;L<C.length;++L){switch(M){case p.declarationKey:z.push(a(C[L],p,E));break;case p.instructionKey:z.push((p.indentInstruction?s(p,E,P):"")+l(C[L],p,E));break;case p.attributesKey:case p.parentKey:break;case p.textKey:z.push((p.indentText?s(p,E,P):"")+v(C[L],p));break;case p.cdataKey:z.push((p.indentCdata?s(p,E,P):"")+f(C[L],p));break;case p.doctypeKey:z.push(s(p,E,P)+m(C[L],p));break;case p.commentKey:z.push(s(p,E,P)+h(C[L],p));break;default:z.push(s(p,E,P)+d(C[L],M,p,E,_(C[L],p)))}P=P&&!z.length}return z.join("")}return ds=function(w,p){p=i(p);var E=[];return t=w,n="_root_",p.compact?E.push(T(w,p,0,!0)):(w[p.declarationKey]&&E.push(a(w[p.declarationKey],p,0)),w[p.elementsKey]&&w[p.elementsKey].length&&E.push(g(w[p.elementsKey],p,0,!E.length))),E.join("")},ds}var ps,Xl;function tm(){if(Xl)return ps;Xl=1;var r=zl();return ps=function(e,t){e instanceof Buffer&&(e=e.toString());var n=null;if(typeof e=="string")try{n=JSON.parse(e)}catch{throw new Error("The JSON structure is invalid")}else n=e;return r(n,t)},ps}var ms,Kl;function rm(){if(Kl)return ms;Kl=1;var r=Vl(),e=em(),t=zl(),n=tm();return ms={xml2js:r,xml2json:e,js2xml:t,json2xml:n},ms}var jr=rm();const Zr=r=>{switch(r.type){case void 0:case"element":const e=new Yl(r.name,r.attributes),t=r.elements||[];for(const n of t){const i=Zr(n);i!==void 0&&e.push(i)}return e;case"text":return r.text;default:return}};class nm extends we{}class Yl extends q{static fromXmlString(e){const t=jr.xml2js(e,{compact:!1});return Zr(t)}constructor(e,t){super(e),t&&this.root.push(new nm(t))}push(e){this.root.push(e)}}class Jl extends q{constructor(e){super(""),this._attr=e}prepForXml(e){return{_attr:this._attr}}}const im="";class gs extends q{constructor(e,t){super(e),t&&(this.root=t.root)}}const Me=r=>{if(isNaN(r))throw new Error(`Invalid value '${r}' specified. Must be an integer.`);return Math.floor(r)},nr=r=>{const e=Me(r);if(e<0)throw new Error(`Invalid value '${r}' specified. Must be a positive integer.`);return e},zr=(r,e)=>{const t=e*2;if(r.length!==t||isNaN(+`0x${r}`))throw new Error(`Invalid hex value '${r}'. Expected ${t} digit hex value`);return r},sm=r=>zr(r,4),Ql=r=>zr(r,2),ws=r=>zr(r,1),ir=r=>{const e=r.slice(-2),t=r.substring(0,r.length-2);return`${Number(t)}${e}`},ys=r=>{const e=ir(r);if(parseFloat(e)<0)throw new Error(`Invalid value '${e}' specified. Expected a positive number.`);return e},It=r=>{if(r==="auto")return r;const e=r.charAt(0)==="#"?r.substring(1):r;return zr(e,3)},nt=r=>typeof r=="string"?ir(r):Me(r),ql=r=>typeof r=="string"?ys(r):nr(r),am=r=>typeof r=="string"?ir(r):Me(r),Oe=r=>typeof r=="string"?ys(r):nr(r),$l=r=>{const e=r.substring(0,r.length-1);return`${Number(e)}%`},bs=r=>typeof r=="number"?Me(r):r.slice(-1)==="%"?$l(r):ir(r),eu=nr,tu=nr,ru=r=>r.toISOString();class de extends q{constructor(e,t=!0){super(e),t!==!0&&this.root.push(new De({val:t}))}}class Xr extends q{constructor(e,t){super(e),this.root.push(new De({val:ql(t)}))}}class Ue extends q{}class dt extends q{constructor(e,t){super(e),this.root.push(new De({val:t}))}}const Wt=(r,e)=>new pe({name:r,attributes:{value:{key:"w:val",value:e}}});class Ht extends q{constructor(e,t){super(e),this.root.push(new De({val:t}))}}class om extends q{constructor(e,t){super(e),this.root.push(new De({val:t}))}}class _t extends q{constructor(e,t){super(e),this.root.push(t)}}class pe extends q{constructor({name:e,attributes:t,children:n}){super(e),t&&this.root.push(new Pn(t)),n&&this.root.push(...n)}}const Qe={START:"start",CENTER:"center",END:"end",BOTH:"both",MEDIUM_KASHIDA:"mediumKashida",DISTRIBUTE:"distribute",NUM_TAB:"numTab",HIGH_KASHIDA:"highKashida",LOW_KASHIDA:"lowKashida",THAI_DISTRIBUTE:"thaiDistribute",LEFT:"left",RIGHT:"right",JUSTIFIED:"both"},vs=r=>new pe({name:"w:jc",attributes:{val:{key:"w:val",value:r}}}),Ie=(r,{color:e,size:t,space:n,style:i})=>new pe({name:r,attributes:{style:{key:"w:val",value:i},color:{key:"w:color",value:e===void 0?void 0:It(e)},size:{key:"w:sz",value:t===void 0?void 0:eu(t)},space:{key:"w:space",value:n===void 0?void 0:tu(n)}}}),Kr={SINGLE:"single",DASH_DOT_STROKED:"dashDotStroked",DASHED:"dashed",DASH_SMALL_GAP:"dashSmallGap",DOT_DASH:"dotDash",DOT_DOT_DASH:"dotDotDash",DOTTED:"dotted",DOUBLE:"double",DOUBLE_WAVE:"doubleWave",INSET:"inset",NIL:"nil",NONE:"none",OUTSET:"outset",THICK:"thick",THICK_THIN_LARGE_GAP:"thickThinLargeGap",THICK_THIN_MEDIUM_GAP:"thickThinMediumGap",THICK_THIN_SMALL_GAP:"thickThinSmallGap",THIN_THICK_LARGE_GAP:"thinThickLargeGap",THIN_THICK_MEDIUM_GAP:"thinThickMediumGap",THIN_THICK_SMALL_GAP:"thinThickSmallGap",THIN_THICK_THIN_LARGE_GAP:"thinThickThinLargeGap",THIN_THICK_THIN_MEDIUM_GAP:"thinThickThinMediumGap",THIN_THICK_THIN_SMALL_GAP:"thinThickThinSmallGap",THREE_D_EMBOSS:"threeDEmboss",THREE_D_ENGRAVE:"threeDEngrave",TRIPLE:"triple",WAVE:"wave"};class nu extends ct{constructor(e){super("w:pBdr"),e.top&&this.root.push(Ie("w:top",e.top)),e.bottom&&this.root.push(Ie("w:bottom",e.bottom)),e.left&&this.root.push(Ie("w:left",e.left)),e.right&&this.root.push(Ie("w:right",e.right)),e.between&&this.root.push(Ie("w:between",e.between))}}class iu extends q{constructor(){super("w:pBdr");const e=Ie("w:bottom",{color:"auto",space:1,style:Kr.SINGLE,size:6});this.root.push(e)}}const su=({start:r,end:e,left:t,right:n,hanging:i,firstLine:s})=>new pe({name:"w:ind",attributes:{start:{key:"w:start",value:r===void 0?void 0:nt(r)},end:{key:"w:end",value:e===void 0?void 0:nt(e)},left:{key:"w:left",value:t===void 0?void 0:nt(t)},right:{key:"w:right",value:n===void 0?void 0:nt(n)},hanging:{key:"w:hanging",value:i===void 0?void 0:Oe(i)},firstLine:{key:"w:firstLine",value:s===void 0?void 0:Oe(s)}}}),au=()=>new pe({name:"w:br"}),_s={BEGIN:"begin",END:"end",SEPARATE:"separate"},Ts=(r,e)=>new pe({name:"w:fldChar",attributes:{type:{key:"w:fldCharType",value:r},dirty:{key:"w:dirty",value:e}}}),it=r=>Ts(_s.BEGIN,r),pt=r=>Ts(_s.SEPARATE,r),st=r=>Ts(_s.END,r),lm={CENTER:"center",INSIDE:"inside",LEFT:"left",OUTSIDE:"outside",RIGHT:"right"},um={BOTTOM:"bottom",CENTER:"center",INSIDE:"inside",OUTSIDE:"outside",TOP:"top"},cm={DECIMAL:"decimal",UPPER_ROMAN:"upperRoman",LOWER_ROMAN:"lowerRoman",UPPER_LETTER:"upperLetter",LOWER_LETTER:"lowerLetter",ORDINAL:"ordinal",CARDINAL_TEXT:"cardinalText",ORDINAL_TEXT:"ordinalText",HEX:"hex",CHICAGO:"chicago",IDEOGRAPH_DIGITAL:"ideographDigital",JAPANESE_COUNTING:"japaneseCounting",AIUEO:"aiueo",IROHA:"iroha",DECIMAL_FULL_WIDTH:"decimalFullWidth",DECIMAL_HALF_WIDTH:"decimalHalfWidth",JAPANESE_LEGAL:"japaneseLegal",JAPANESE_DIGITAL_TEN_THOUSAND:"japaneseDigitalTenThousand",DECIMAL_ENCLOSED_CIRCLE:"decimalEnclosedCircle",DECIMAL_FULL_WIDTH_2:"decimalFullWidth2",AIUEO_FULL_WIDTH:"aiueoFullWidth",IROHA_FULL_WIDTH:"irohaFullWidth",DECIMAL_ZERO:"decimalZero",BULLET:"bullet",GANADA:"ganada",CHOSUNG:"chosung",DECIMAL_ENCLOSED_FULL_STOP:"decimalEnclosedFullstop",DECIMAL_ENCLOSED_PAREN:"decimalEnclosedParen",DECIMAL_ENCLOSED_CIRCLE_CHINESE:"decimalEnclosedCircleChinese",IDEOGRAPH_ENCLOSED_CIRCLE:"ideographEnclosedCircle",IDEOGRAPH_TRADITIONAL:"ideographTraditional",IDEOGRAPH_ZODIAC:"ideographZodiac",IDEOGRAPH_ZODIAC_TRADITIONAL:"ideographZodiacTraditional",TAIWANESE_COUNTING:"taiwaneseCounting",IDEOGRAPH_LEGAL_TRADITIONAL:"ideographLegalTraditional",TAIWANESE_COUNTING_THOUSAND:"taiwaneseCountingThousand",TAIWANESE_DIGITAL:"taiwaneseDigital",CHINESE_COUNTING:"chineseCounting",CHINESE_LEGAL_SIMPLIFIED:"chineseLegalSimplified",CHINESE_COUNTING_TEN_THOUSAND:"chineseCountingThousand",KOREAN_DIGITAL:"koreanDigital",KOREAN_COUNTING:"koreanCounting",KOREAN_LEGAL:"koreanLegal",KOREAN_DIGITAL_2:"koreanDigital2",VIETNAMESE_COUNTING:"vietnameseCounting",RUSSIAN_LOWER:"russianLower",RUSSIAN_UPPER:"russianUpper",NONE:"none",NUMBER_IN_DASH:"numberInDash",HEBREW_1:"hebrew1",HEBREW_2:"hebrew2",ARABIC_ALPHA:"arabicAlpha",ARABIC_ABJAD:"arabicAbjad",HINDI_VOWELS:"hindiVowels",HINDI_CONSONANTS:"hindiConsonants",HINDI_NUMBERS:"hindiNumbers",HINDI_COUNTING:"hindiCounting",THAI_LETTERS:"thaiLetters",THAI_NUMBERS:"thaiNumbers",THAI_COUNTING:"thaiCounting",BAHT_TEXT:"bahtText",DOLLAR_TEXT:"dollarText"},Ve={DEFAULT:"default",PRESERVE:"preserve"};class ze extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{space:"xml:space"})}}class hm extends q{constructor(){super("w:instrText"),this.root.push(new ze({space:Ve.PRESERVE})),this.root.push("PAGE")}}class fm extends q{constructor(){super("w:instrText"),this.root.push(new ze({space:Ve.PRESERVE})),this.root.push("NUMPAGES")}}class dm extends q{constructor(){super("w:instrText"),this.root.push(new ze({space:Ve.PRESERVE})),this.root.push("SECTIONPAGES")}}class pm extends q{constructor(){super("w:instrText"),this.root.push(new ze({space:Ve.PRESERVE})),this.root.push("SECTION")}}const sr=({fill:r,color:e,type:t})=>new pe({name:"w:shd",attributes:{fill:{key:"w:fill",value:r===void 0?void 0:It(r)},color:{key:"w:color",value:e===void 0?void 0:It(e)},type:{key:"w:val",value:t}}}),mm={CLEAR:"clear",DIAGONAL_CROSS:"diagCross",DIAGONAL_STRIPE:"diagStripe",HORIZONTAL_CROSS:"horzCross",HORIZONTAL_STRIPE:"horzStripe",NIL:"nil",PERCENT_5:"pct5",PERCENT_10:"pct10",PERCENT_12:"pct12",PERCENT_15:"pct15",PERCENT_20:"pct20",PERCENT_25:"pct25",PERCENT_30:"pct30",PERCENT_35:"pct35",PERCENT_37:"pct37",PERCENT_40:"pct40",PERCENT_45:"pct45",PERCENT_50:"pct50",PERCENT_55:"pct55",PERCENT_60:"pct60",PERCENT_62:"pct62",PERCENT_65:"pct65",PERCENT_70:"pct70",PERCENT_75:"pct75",PERCENT_80:"pct80",PERCENT_85:"pct85",PERCENT_87:"pct87",PERCENT_90:"pct90",PERCENT_95:"pct95",REVERSE_DIAGONAL_STRIPE:"reverseDiagStripe",SOLID:"solid",THIN_DIAGONAL_CROSS:"thinDiagCross",THIN_DIAGONAL_STRIPE:"thinDiagStripe",THIN_HORIZONTAL_CROSS:"thinHorzCross",THIN_REVERSE_DIAGONAL_STRIPE:"thinReverseDiagStripe",THIN_VERTICAL_STRIPE:"thinVertStripe",VERTICAL_STRIPE:"vertStripe"};class je extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date"})}}class gm extends q{constructor(e){super("w:del"),this.root.push(new je({id:e.id,author:e.author,date:e.date}))}}class wm extends q{constructor(e){super("w:ins"),this.root.push(new je({id:e.id,author:e.author,date:e.date}))}}const Es={DOT:"dot"},Ss=(r=Es.DOT)=>new pe({name:"w:em",attributes:{val:{key:"w:val",value:r}}}),ym=()=>Ss(Es.DOT);class bm extends q{constructor(e){super("w:spacing"),this.root.push(new De({val:nt(e)}))}}class vm extends q{constructor(e){super("w:color"),this.root.push(new De({val:It(e)}))}}class _m extends q{constructor(e){super("w:highlight"),this.root.push(new De({val:e}))}}class Tm extends q{constructor(e){super("w:highlightCs"),this.root.push(new De({val:e}))}}const Em=r=>new pe({name:"w:lang",attributes:{value:{key:"w:val",value:r.value},eastAsia:{key:"w:eastAsia",value:r.eastAsia},bidirectional:{key:"w:bidi",value:r.bidirectional}}}),Yr=(r,e)=>{if(typeof r=="string"){const n=r;return new pe({name:"w:rFonts",attributes:{ascii:{key:"w:ascii",value:n},cs:{key:"w:cs",value:n},eastAsia:{key:"w:eastAsia",value:n},hAnsi:{key:"w:hAnsi",value:n},hint:{key:"w:hint",value:e}}})}const t=r;return new pe({name:"w:rFonts",attributes:{ascii:{key:"w:ascii",value:t.ascii},cs:{key:"w:cs",value:t.cs},eastAsia:{key:"w:eastAsia",value:t.eastAsia},hAnsi:{key:"w:hAnsi",value:t.hAnsi},hint:{key:"w:hint",value:t.hint}}})},ou=r=>new pe({name:"w:vertAlign",attributes:{val:{key:"w:val",value:r}}}),Sm=()=>ou("superscript"),xm=()=>ou("subscript"),xs={SINGLE:"single",WORDS:"words",DOUBLE:"double",THICK:"thick",DOTTED:"dotted",DOTTEDHEAVY:"dottedHeavy",DASH:"dash",DASHEDHEAVY:"dashedHeavy",DASHLONG:"dashLong",DASHLONGHEAVY:"dashLongHeavy",DOTDASH:"dotDash",DASHDOTHEAVY:"dashDotHeavy",DOTDOTDASH:"dotDotDash",DASHDOTDOTHEAVY:"dashDotDotHeavy",WAVE:"wave",WAVYHEAVY:"wavyHeavy",WAVYDOUBLE:"wavyDouble",NONE:"none"},lu=(r=xs.SINGLE,e)=>new pe({name:"w:u",attributes:{val:{key:"w:val",value:r},color:{key:"w:color",value:e===void 0?void 0:It(e)}}}),Am={BLINK_BACKGROUND:"blinkBackground",LIGHTS:"lights",ANTS_BLACK:"antsBlack",ANTS_RED:"antsRed",SHIMMER:"shimmer",SPARKLE:"sparkle",NONE:"none"},km={BLACK:"black",BLUE:"blue",CYAN:"cyan",DARK_BLUE:"darkBlue",DARK_CYAN:"darkCyan",DARK_GRAY:"darkGray",DARK_GREEN:"darkGreen",DARK_MAGENTA:"darkMagenta",DARK_RED:"darkRed",DARK_YELLOW:"darkYellow",GREEN:"green",LIGHT_GRAY:"lightGray",MAGENTA:"magenta",NONE:"none",RED:"red",WHITE:"white",YELLOW:"yellow"};class mt extends ct{constructor(e){var t,n;if(super("w:rPr"),!e)return;e.style&&this.push(new dt("w:rStyle",e.style)),e.font&&(typeof e.font=="string"?this.push(Yr(e.font)):"name"in e.font?this.push(Yr(e.font.name,e.font.hint)):this.push(Yr(e.font))),e.bold!==void 0&&this.push(new de("w:b",e.bold)),(e.boldComplexScript===void 0&&e.bold!==void 0||e.boldComplexScript)&&this.push(new de("w:bCs",(t=e.boldComplexScript)!=null?t:e.bold)),e.italics!==void 0&&this.push(new de("w:i",e.italics)),(e.italicsComplexScript===void 0&&e.italics!==void 0||e.italicsComplexScript)&&this.push(new de("w:iCs",(n=e.italicsComplexScript)!=null?n:e.italics)),e.smallCaps!==void 0?this.push(new de("w:smallCaps",e.smallCaps)):e.allCaps!==void 0&&this.push(new de("w:caps",e.allCaps)),e.strike!==void 0&&this.push(new de("w:strike",e.strike)),e.doubleStrike!==void 0&&this.push(new de("w:dstrike",e.doubleStrike)),e.emboss!==void 0&&this.push(new de("w:emboss",e.emboss)),e.imprint!==void 0&&this.push(new de("w:imprint",e.imprint)),e.noProof!==void 0&&this.push(new de("w:noProof",e.noProof)),e.snapToGrid!==void 0&&this.push(new de("w:snapToGrid",e.snapToGrid)),e.vanish&&this.push(new de("w:vanish",e.vanish)),e.color&&this.push(new vm(e.color)),e.characterSpacing&&this.push(new bm(e.characterSpacing)),e.scale!==void 0&&this.push(new Ht("w:w",e.scale)),e.kern&&this.push(new Xr("w:kern",e.kern)),e.position&&this.push(new dt("w:position",e.position)),e.size!==void 0&&this.push(new Xr("w:sz",e.size));const i=e.sizeComplexScript===void 0||e.sizeComplexScript===!0?e.size:e.sizeComplexScript;i&&this.push(new Xr("w:szCs",i)),e.highlight&&this.push(new _m(e.highlight));const s=e.highlightComplexScript===void 0||e.highlightComplexScript===!0?e.highlight:e.highlightComplexScript;s&&this.push(new Tm(s)),e.underline&&this.push(lu(e.underline.type,e.underline.color)),e.effect&&this.push(new dt("w:effect",e.effect)),e.border&&this.push(Ie("w:bdr",e.border)),e.shading&&this.push(sr(e.shading)),e.subScript&&this.push(xm()),e.superScript&&this.push(Sm()),e.rightToLeft!==void 0&&this.push(new de("w:rtl",e.rightToLeft)),e.emphasisMark&&this.push(Ss(e.emphasisMark.type)),e.language&&this.push(Em(e.language)),e.specVanish&&this.push(new de("w:specVanish",e.vanish)),e.math&&this.push(new de("w:oMath",e.math)),e.revision&&this.push(new cu(e.revision))}push(e){this.root.push(e)}}class uu extends mt{constructor(e){super(e),e!=null&&e.insertion&&this.push(new wm(e.insertion)),e!=null&&e.deletion&&this.push(new gm(e.deletion))}}class cu extends q{constructor(e){super("w:rPrChange"),this.root.push(new je({id:e.id,author:e.author,date:e.date})),this.addChildElement(new mt(e))}}class ar extends q{constructor(e){var t;super("w:t"),typeof e=="string"?(this.root.push(new ze({space:Ve.PRESERVE})),this.root.push(e)):(this.root.push(new ze({space:(t=e.space)!=null?t:Ve.DEFAULT})),this.root.push(e.text))}}const Tt={CURRENT:"CURRENT",TOTAL_PAGES:"TOTAL_PAGES",TOTAL_PAGES_IN_SECTION:"TOTAL_PAGES_IN_SECTION",CURRENT_SECTION:"SECTION"};class Be extends q{constructor(e){if(super("w:r"),ne(this,"properties"),this.properties=new mt(e),this.root.push(this.properties),e.break)for(let t=0;t<e.break;t++)this.root.push(au());if(e.children)for(const t of e.children){if(typeof t=="string"){switch(t){case Tt.CURRENT:this.root.push(it()),this.root.push(new hm),this.root.push(pt()),this.root.push(st());break;case Tt.TOTAL_PAGES:this.root.push(it()),this.root.push(new fm),this.root.push(pt()),this.root.push(st());break;case Tt.TOTAL_PAGES_IN_SECTION:this.root.push(it()),this.root.push(new dm),this.root.push(pt()),this.root.push(st());break;case Tt.CURRENT_SECTION:this.root.push(it()),this.root.push(new pm),this.root.push(pt()),this.root.push(st());break;default:this.root.push(new ar(t));break}continue}this.root.push(t)}else e.text!==void 0&&this.root.push(new ar(e.text))}}class or extends Be{constructor(e){super(typeof e=="string"?{text:e}:e)}}class Rm extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{char:"w:char",symbolfont:"w:font"})}}let hu=class extends q{constructor(e="",t="Wingdings"){super("w:sym"),this.root.push(new Rm({char:e,symbolfont:t}))}};class fu extends Be{constructor(e){if(typeof e=="string")return super({}),this.root.push(new hu(e)),this;super(e),this.root.push(new hu(e.char,e.symbolfont))}}var As={},Ae={},ks,du;function lr(){if(du)return ks;du=1,ks=r;function r(e,t){if(!e)throw new Error(t||"Assertion failed")}return r.equal=function(t,n,i){if(t!=n)throw new Error(i||"Assertion failed: "+t+" != "+n)},ks}var pu;function at(){if(pu)return Ae;pu=1;var r=lr(),e=vt();Ae.inherits=e;function t(N,W){return(N.charCodeAt(W)&64512)!==55296||W<0||W+1>=N.length?!1:(N.charCodeAt(W+1)&64512)===56320}function n(N,W){if(Array.isArray(N))return N.slice();if(!N)return[];var A=[];if(typeof N=="string")if(W){if(W==="hex")for(N=N.replace(/[^a-z0-9]+/ig,""),N.length%2!==0&&(N="0"+N),re=0;re<N.length;re+=2)A.push(parseInt(N[re]+N[re+1],16))}else for(var Y=0,re=0;re<N.length;re++){var V=N.charCodeAt(re);V<128?A[Y++]=V:V<2048?(A[Y++]=V>>6|192,A[Y++]=V&63|128):t(N,re)?(V=65536+((V&1023)<<10)+(N.charCodeAt(++re)&1023),A[Y++]=V>>18|240,A[Y++]=V>>12&63|128,A[Y++]=V>>6&63|128,A[Y++]=V&63|128):(A[Y++]=V>>12|224,A[Y++]=V>>6&63|128,A[Y++]=V&63|128)}else for(re=0;re<N.length;re++)A[re]=N[re]|0;return A}Ae.toArray=n;function i(N){for(var W="",A=0;A<N.length;A++)W+=a(N[A].toString(16));return W}Ae.toHex=i;function s(N){var W=N>>>24|N>>>8&65280|N<<8&16711680|(N&255)<<24;return W>>>0}Ae.htonl=s;function o(N,W){for(var A="",Y=0;Y<N.length;Y++){var re=N[Y];W==="little"&&(re=s(re)),A+=l(re.toString(16))}return A}Ae.toHex32=o;function a(N){return N.length===1?"0"+N:N}Ae.zero2=a;function l(N){return N.length===7?"0"+N:N.length===6?"00"+N:N.length===5?"000"+N:N.length===4?"0000"+N:N.length===3?"00000"+N:N.length===2?"000000"+N:N.length===1?"0000000"+N:N}Ae.zero8=l;function h(N,W,A,Y){var re=A-W;r(re%4===0);for(var V=new Array(re/4),se=0,te=W;se<V.length;se++,te+=4){var me;Y==="big"?me=N[te]<<24|N[te+1]<<16|N[te+2]<<8|N[te+3]:me=N[te+3]<<24|N[te+2]<<16|N[te+1]<<8|N[te],V[se]=me>>>0}return V}Ae.join32=h;function f(N,W){for(var A=new Array(N.length*4),Y=0,re=0;Y<N.length;Y++,re+=4){var V=N[Y];W==="big"?(A[re]=V>>>24,A[re+1]=V>>>16&255,A[re+2]=V>>>8&255,A[re+3]=V&255):(A[re+3]=V>>>24,A[re+2]=V>>>16&255,A[re+1]=V>>>8&255,A[re]=V&255)}return A}Ae.split32=f;function m(N,W){return N>>>W|N<<32-W}Ae.rotr32=m;function v(N,W){return N<<W|N>>>32-W}Ae.rotl32=v;function y(N,W){return N+W>>>0}Ae.sum32=y;function b(N,W,A){return N+W+A>>>0}Ae.sum32_3=b;function g(N,W,A,Y){return N+W+A+Y>>>0}Ae.sum32_4=g;function _(N,W,A,Y,re){return N+W+A+Y+re>>>0}Ae.sum32_5=_;function d(N,W,A,Y){var re=N[W],V=N[W+1],se=Y+V>>>0,te=(se<Y?1:0)+A+re;N[W]=te>>>0,N[W+1]=se}Ae.sum64=d;function T(N,W,A,Y){var re=W+Y>>>0,V=(re<W?1:0)+N+A;return V>>>0}Ae.sum64_hi=T;function w(N,W,A,Y){var re=W+Y;return re>>>0}Ae.sum64_lo=w;function p(N,W,A,Y,re,V,se,te){var me=0,J=W;J=J+Y>>>0,me+=J<W?1:0,J=J+V>>>0,me+=J<V?1:0,J=J+te>>>0,me+=J<te?1:0;var F=N+A+re+se+me;return F>>>0}Ae.sum64_4_hi=p;function E(N,W,A,Y,re,V,se,te){var me=W+Y+V+te;return me>>>0}Ae.sum64_4_lo=E;function P(N,W,A,Y,re,V,se,te,me,J){var F=0,X=W;X=X+Y>>>0,F+=X<W?1:0,X=X+V>>>0,F+=X<V?1:0,X=X+te>>>0,F+=X<te?1:0,X=X+J>>>0,F+=X<J?1:0;var Q=N+A+re+se+me+F;return Q>>>0}Ae.sum64_5_hi=P;function L(N,W,A,Y,re,V,se,te,me,J){var F=W+Y+V+te+J;return F>>>0}Ae.sum64_5_lo=L;function M(N,W,A){var Y=W<<32-A|N>>>A;return Y>>>0}Ae.rotr64_hi=M;function C(N,W,A){var Y=N<<32-A|W>>>A;return Y>>>0}Ae.rotr64_lo=C;function z(N,W,A){return N>>>A}Ae.shr64_hi=z;function ue(N,W,A){var Y=N<<32-A|W>>>A;return Y>>>0}return Ae.shr64_lo=ue,Ae}var Rs={},mu;function ur(){if(mu)return Rs;mu=1;var r=at(),e=lr();function t(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return Rs.BlockHash=t,t.prototype.update=function(i,s){if(i=r.toArray(i,s),this.pending?this.pending=this.pending.concat(i):this.pending=i,this.pendingTotal+=i.length,this.pending.length>=this._delta8){i=this.pending;var o=i.length%this._delta8;this.pending=i.slice(i.length-o,i.length),this.pending.length===0&&(this.pending=null),i=r.join32(i,0,i.length-o,this.endian);for(var a=0;a<i.length;a+=this._delta32)this._update(i,a,a+this._delta32)}return this},t.prototype.digest=function(i){return this.update(this._pad()),e(this.pending===null),this._digest(i)},t.prototype._pad=function(){var i=this.pendingTotal,s=this._delta8,o=s-(i+this.padLength)%s,a=new Array(o+this.padLength);a[0]=128;for(var l=1;l<o;l++)a[l]=0;if(i<<=3,this.endian==="big"){for(var h=8;h<this.padLength;h++)a[l++]=0;a[l++]=0,a[l++]=0,a[l++]=0,a[l++]=0,a[l++]=i>>>24&255,a[l++]=i>>>16&255,a[l++]=i>>>8&255,a[l++]=i&255}else for(a[l++]=i&255,a[l++]=i>>>8&255,a[l++]=i>>>16&255,a[l++]=i>>>24&255,a[l++]=0,a[l++]=0,a[l++]=0,a[l++]=0,h=8;h<this.padLength;h++)a[l++]=0;return a},Rs}var Ct={},ot={},gu;function wu(){if(gu)return ot;gu=1;var r=at(),e=r.rotr32;function t(f,m,v,y){if(f===0)return n(m,v,y);if(f===1||f===3)return s(m,v,y);if(f===2)return i(m,v,y)}ot.ft_1=t;function n(f,m,v){return f&m^~f&v}ot.ch32=n;function i(f,m,v){return f&m^f&v^m&v}ot.maj32=i;function s(f,m,v){return f^m^v}ot.p32=s;function o(f){return e(f,2)^e(f,13)^e(f,22)}ot.s0_256=o;function a(f){return e(f,6)^e(f,11)^e(f,25)}ot.s1_256=a;function l(f){return e(f,7)^e(f,18)^f>>>3}ot.g0_256=l;function h(f){return e(f,17)^e(f,19)^f>>>10}return ot.g1_256=h,ot}var Is,yu;function Im(){if(yu)return Is;yu=1;var r=at(),e=ur(),t=wu(),n=r.rotl32,i=r.sum32,s=r.sum32_5,o=t.ft_1,a=e.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;a.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return r.inherits(h,a),Is=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(m,v){for(var y=this.W,b=0;b<16;b++)y[b]=m[v+b];for(;b<y.length;b++)y[b]=n(y[b-3]^y[b-8]^y[b-14]^y[b-16],1);var g=this.h[0],_=this.h[1],d=this.h[2],T=this.h[3],w=this.h[4];for(b=0;b<y.length;b++){var p=~~(b/20),E=s(n(g,5),o(p,_,d,T),w,y[b],l[p]);w=T,T=d,d=n(_,30),_=g,g=E}this.h[0]=i(this.h[0],g),this.h[1]=i(this.h[1],_),this.h[2]=i(this.h[2],d),this.h[3]=i(this.h[3],T),this.h[4]=i(this.h[4],w)},h.prototype._digest=function(m){return m==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},Is}var Cs,bu;function vu(){if(bu)return Cs;bu=1;var r=at(),e=ur(),t=wu(),n=lr(),i=r.sum32,s=r.sum32_4,o=r.sum32_5,a=t.ch32,l=t.maj32,h=t.s0_256,f=t.s1_256,m=t.g0_256,v=t.g1_256,y=e.BlockHash,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function g(){if(!(this instanceof g))return new g;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}return r.inherits(g,y),Cs=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(d,T){for(var w=this.W,p=0;p<16;p++)w[p]=d[T+p];for(;p<w.length;p++)w[p]=s(v(w[p-2]),w[p-7],m(w[p-15]),w[p-16]);var E=this.h[0],P=this.h[1],L=this.h[2],M=this.h[3],C=this.h[4],z=this.h[5],ue=this.h[6],N=this.h[7];for(n(this.k.length===w.length),p=0;p<w.length;p++){var W=o(N,f(C),a(C,z,ue),this.k[p],w[p]),A=i(h(E),l(E,P,L));N=ue,ue=z,z=C,C=i(M,W),M=L,L=P,P=E,E=i(W,A)}this.h[0]=i(this.h[0],E),this.h[1]=i(this.h[1],P),this.h[2]=i(this.h[2],L),this.h[3]=i(this.h[3],M),this.h[4]=i(this.h[4],C),this.h[5]=i(this.h[5],z),this.h[6]=i(this.h[6],ue),this.h[7]=i(this.h[7],N)},g.prototype._digest=function(d){return d==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},Cs}var Ns,_u;function Cm(){if(_u)return Ns;_u=1;var r=at(),e=vu();function t(){if(!(this instanceof t))return new t;e.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return r.inherits(t,e),Ns=t,t.blockSize=512,t.outSize=224,t.hmacStrength=192,t.padLength=64,t.prototype._digest=function(i){return i==="hex"?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")},Ns}var Ps,Tu;function Eu(){if(Tu)return Ps;Tu=1;var r=at(),e=ur(),t=lr(),n=r.rotr64_hi,i=r.rotr64_lo,s=r.shr64_hi,o=r.shr64_lo,a=r.sum64,l=r.sum64_hi,h=r.sum64_lo,f=r.sum64_4_hi,m=r.sum64_4_lo,v=r.sum64_5_hi,y=r.sum64_5_lo,b=e.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function _(){if(!(this instanceof _))return new _;b.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}r.inherits(_,b),Ps=_,_.blockSize=1024,_.outSize=512,_.hmacStrength=192,_.padLength=128,_.prototype._prepareBlock=function(A,Y){for(var re=this.W,V=0;V<32;V++)re[V]=A[Y+V];for(;V<re.length;V+=2){var se=ue(re[V-4],re[V-3]),te=N(re[V-4],re[V-3]),me=re[V-14],J=re[V-13],F=C(re[V-30],re[V-29]),X=z(re[V-30],re[V-29]),Q=re[V-32],ie=re[V-31];re[V]=f(se,te,me,J,F,X,Q,ie),re[V+1]=m(se,te,me,J,F,X,Q,ie)}},_.prototype._update=function(A,Y){this._prepareBlock(A,Y);var re=this.W,V=this.h[0],se=this.h[1],te=this.h[2],me=this.h[3],J=this.h[4],F=this.h[5],X=this.h[6],Q=this.h[7],ie=this.h[8],K=this.h[9],R=this.h[10],k=this.h[11],j=this.h[12],U=this.h[13],O=this.h[14],D=this.h[15];t(this.k.length===re.length);for(var ee=0;ee<re.length;ee+=2){var S=O,$=D,I=L(ie,K),u=M(ie,K),c=d(ie,K,R,k,j),x=T(ie,K,R,k,j,U),B=this.k[ee],Z=this.k[ee+1],H=re[ee],ae=re[ee+1],he=v(S,$,I,u,c,x,B,Z,H,ae),oe=y(S,$,I,u,c,x,B,Z,H,ae);S=E(V,se),$=P(V,se),I=w(V,se,te,me,J),u=p(V,se,te,me,J,F);var ge=l(S,$,I,u),be=h(S,$,I,u);O=j,D=U,j=R,U=k,R=ie,k=K,ie=l(X,Q,he,oe),K=h(Q,Q,he,oe),X=J,Q=F,J=te,F=me,te=V,me=se,V=l(he,oe,ge,be),se=h(he,oe,ge,be)}a(this.h,0,V,se),a(this.h,2,te,me),a(this.h,4,J,F),a(this.h,6,X,Q),a(this.h,8,ie,K),a(this.h,10,R,k),a(this.h,12,j,U),a(this.h,14,O,D)},_.prototype._digest=function(A){return A==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")};function d(W,A,Y,re,V){var se=W&Y^~W&V;return se<0&&(se+=4294967296),se}function T(W,A,Y,re,V,se){var te=A&re^~A&se;return te<0&&(te+=4294967296),te}function w(W,A,Y,re,V){var se=W&Y^W&V^Y&V;return se<0&&(se+=4294967296),se}function p(W,A,Y,re,V,se){var te=A&re^A&se^re&se;return te<0&&(te+=4294967296),te}function E(W,A){var Y=n(W,A,28),re=n(A,W,2),V=n(A,W,7),se=Y^re^V;return se<0&&(se+=4294967296),se}function P(W,A){var Y=i(W,A,28),re=i(A,W,2),V=i(A,W,7),se=Y^re^V;return se<0&&(se+=4294967296),se}function L(W,A){var Y=n(W,A,14),re=n(W,A,18),V=n(A,W,9),se=Y^re^V;return se<0&&(se+=4294967296),se}function M(W,A){var Y=i(W,A,14),re=i(W,A,18),V=i(A,W,9),se=Y^re^V;return se<0&&(se+=4294967296),se}function C(W,A){var Y=n(W,A,1),re=n(W,A,8),V=s(W,A,7),se=Y^re^V;return se<0&&(se+=4294967296),se}function z(W,A){var Y=i(W,A,1),re=i(W,A,8),V=o(W,A,7),se=Y^re^V;return se<0&&(se+=4294967296),se}function ue(W,A){var Y=n(W,A,19),re=n(A,W,29),V=s(W,A,6),se=Y^re^V;return se<0&&(se+=4294967296),se}function N(W,A){var Y=i(W,A,19),re=i(A,W,29),V=o(W,A,6),se=Y^re^V;return se<0&&(se+=4294967296),se}return Ps}var Ls,Su;function Nm(){if(Su)return Ls;Su=1;var r=at(),e=Eu();function t(){if(!(this instanceof t))return new t;e.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return r.inherits(t,e),Ls=t,t.blockSize=1024,t.outSize=384,t.hmacStrength=192,t.padLength=128,t.prototype._digest=function(i){return i==="hex"?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")},Ls}var xu;function Pm(){return xu||(xu=1,Ct.sha1=Im(),Ct.sha224=Cm(),Ct.sha256=vu(),Ct.sha384=Nm(),Ct.sha512=Eu()),Ct}var Os={},Au;function Lm(){if(Au)return Os;Au=1;var r=at(),e=ur(),t=r.rotl32,n=r.sum32,i=r.sum32_3,s=r.sum32_4,o=e.BlockHash;function a(){if(!(this instanceof a))return new a;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}r.inherits(a,o),Os.ripemd160=a,a.blockSize=512,a.outSize=160,a.hmacStrength=192,a.padLength=64,a.prototype._update=function(_,d){for(var T=this.h[0],w=this.h[1],p=this.h[2],E=this.h[3],P=this.h[4],L=T,M=w,C=p,z=E,ue=P,N=0;N<80;N++){var W=n(t(s(T,l(N,w,p,E),_[m[N]+d],h(N)),y[N]),P);T=P,P=E,E=t(p,10),p=w,w=W,W=n(t(s(L,l(79-N,M,C,z),_[v[N]+d],f(N)),b[N]),ue),L=ue,ue=z,z=t(C,10),C=M,M=W}W=i(this.h[1],p,z),this.h[1]=i(this.h[2],E,ue),this.h[2]=i(this.h[3],P,L),this.h[3]=i(this.h[4],T,M),this.h[4]=i(this.h[0],w,C),this.h[0]=W},a.prototype._digest=function(_){return _==="hex"?r.toHex32(this.h,"little"):r.split32(this.h,"little")};function l(g,_,d,T){return g<=15?_^d^T:g<=31?_&d|~_&T:g<=47?(_|~d)^T:g<=63?_&T|d&~T:_^(d|~T)}function h(g){return g<=15?0:g<=31?1518500249:g<=47?1859775393:g<=63?2400959708:2840853838}function f(g){return g<=15?1352829926:g<=31?1548603684:g<=47?1836072691:g<=63?2053994217:0}var m=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],v=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],b=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return Os}var Fs,ku;function Om(){if(ku)return Fs;ku=1;var r=at(),e=lr();function t(n,i,s){if(!(this instanceof t))return new t(n,i,s);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(i,s))}return Fs=t,t.prototype._init=function(i){i.length>this.blockSize&&(i=new this.Hash().update(i).digest()),e(i.length<=this.blockSize);for(var s=i.length;s<this.blockSize;s++)i.push(0);for(s=0;s<i.length;s++)i[s]^=54;for(this.inner=new this.Hash().update(i),s=0;s<i.length;s++)i[s]^=106;this.outer=new this.Hash().update(i)},t.prototype.update=function(i,s){return this.inner.update(i,s),this},t.prototype.digest=function(i){return this.outer.update(this.inner.digest()),this.outer.digest(i)},Fs}var Ru;function Fm(){return Ru||(Ru=1,function(r){var e=r;e.utils=at(),e.common=ur(),e.sha=Pm(),e.ripemd=Lm(),e.hmac=Om(),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160}(As)),As}var Dm=Fm();const Bm=Ln(Dm);let Mm="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Um=(r,e=21)=>(t=e)=>{let n="",i=t|0;for(;i--;)n+=r[Math.random()*r.length|0];return n},Wm=(r=21)=>{let e="",t=r|0;for(;t--;)e+=Mm[Math.random()*64|0];return e};const Hm=r=>Math.floor(r/25.4*72*20),Ye=r=>Math.floor(r*72*20),cr=(r=0)=>{let e=r;return()=>++e},Iu=()=>cr(),Cu=()=>cr(1),Nu=()=>cr(),Pu=()=>cr(),hr=()=>Wm().toLowerCase(),Ds=r=>Bm.sha1().update(r instanceof ArrayBuffer?new Uint8Array(r):r).digest("hex"),fr=r=>Um("1234567890abcdef",r)(),Lu=()=>`${fr(8)}-${fr(4)}-${fr(4)}-${fr(4)}-${fr(12)}`,dr=r=>new Uint8Array(new TextEncoder().encode(r)),Ou={CHARACTER:"character",COLUMN:"column",INSIDE_MARGIN:"insideMargin",LEFT_MARGIN:"leftMargin",MARGIN:"margin",OUTSIDE_MARGIN:"outsideMargin",PAGE:"page",RIGHT_MARGIN:"rightMargin"},Fu={BOTTOM_MARGIN:"bottomMargin",INSIDE_MARGIN:"insideMargin",LINE:"line",MARGIN:"margin",OUTSIDE_MARGIN:"outsideMargin",PAGE:"page",PARAGRAPH:"paragraph",TOP_MARGIN:"topMargin"},Du=()=>new pe({name:"wp:simplePos",attributes:{x:{key:"x",value:0},y:{key:"y",value:0}}}),Bu=r=>new pe({name:"wp:align",children:[r]}),Mu=r=>new pe({name:"wp:posOffset",children:[r.toString()]}),Uu=({relative:r,align:e,offset:t})=>new pe({name:"wp:positionH",attributes:{relativeFrom:{key:"relativeFrom",value:r??Ou.PAGE}},children:[(()=>{if(e)return Bu(e);if(t!==void 0)return Mu(t);throw new Error("There is no configuration provided for floating position (Align or offset)")})()]}),Wu=({relative:r,align:e,offset:t})=>new pe({name:"wp:positionV",attributes:{relativeFrom:{key:"relativeFrom",value:r??Fu.PAGE}},children:[(()=>{if(e)return Bu(e);if(t!==void 0)return Mu(t);throw new Error("There is no configuration provided for floating position (Align or offset)")})()]});var Hu=(r=>(r.CENTER="ctr",r.TOP="t",r.BOTTOM="b",r))(Hu||{});const Gu=(r={})=>{var e,t,n,i;return new pe({name:"wps:bodyPr",attributes:{lIns:{key:"lIns",value:(e=r.margins)==null?void 0:e.left},rIns:{key:"rIns",value:(t=r.margins)==null?void 0:t.right},tIns:{key:"tIns",value:(n=r.margins)==null?void 0:n.top},bIns:{key:"bIns",value:(i=r.margins)==null?void 0:i.bottom},anchor:{key:"anchor",value:r.verticalAnchor}},children:[...r.noAutoFit?[new de("a:noAutofit",r.noAutoFit)]:[]]})},Gm=(r={txBox:"1"})=>new pe({name:"wps:cNvSpPr",attributes:{txBox:{key:"txBox",value:r.txBox}}}),Vm=r=>new pe({name:"w:txbxContent",children:[...r]}),jm=r=>new pe({name:"wps:txbx",children:[Vm(r)]});class Zm extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{cx:"cx",cy:"cy"})}}class zm extends q{constructor(e,t){super("a:ext"),ne(this,"attributes"),this.attributes=new Zm({cx:e,cy:t}),this.root.push(this.attributes)}}class Xm extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{x:"x",y:"y"})}}class Km extends q{constructor(e,t){super("a:off"),this.root.push(new Xm({x:e??0,y:t??0}))}}class Ym extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{flipVertical:"flipV",flipHorizontal:"flipH",rotation:"rot"})}}class Vu extends q{constructor(e){var t,n,i,s,o,a;super("a:xfrm"),ne(this,"extents"),ne(this,"offset"),this.root.push(new Ym({flipVertical:(t=e.flip)==null?void 0:t.vertical,flipHorizontal:(n=e.flip)==null?void 0:n.horizontal,rotation:e.rotation})),this.offset=new Km((s=(i=e.offset)==null?void 0:i.emus)==null?void 0:s.x,(a=(o=e.offset)==null?void 0:o.emus)==null?void 0:a.y),this.extents=new zm(e.emus.x,e.emus.y),this.root.push(this.offset),this.root.push(this.extents)}}const ju=()=>new pe({name:"a:noFill"}),Jm=r=>new pe({name:"a:srgbClr",attributes:{value:{key:"val",value:r.value}}}),Qm=r=>new pe({name:"a:schemeClr",attributes:{value:{key:"val",value:r.value}}}),Bs=r=>new pe({name:"a:solidFill",children:[r.type==="rgb"?Jm(r):Qm(r)]}),qm=r=>new pe({name:"a:ln",attributes:{width:{key:"w",value:r.width},cap:{key:"cap",value:r.cap},compoundLine:{key:"cmpd",value:r.compoundLine},align:{key:"algn",value:r.align}},children:[r.type==="noFill"?ju():r.solidFillType==="rgb"?Bs({type:"rgb",value:r.value}):Bs({type:"scheme",value:r.value})]});class $m extends q{constructor(){super("a:avLst")}}class eg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{prst:"prst"})}}class tg extends q{constructor(){super("a:prstGeom"),this.root.push(new eg({prst:"rect"})),this.root.push(new $m)}}class rg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{bwMode:"bwMode"})}}class Zu extends q{constructor({element:e,outline:t,solidFill:n,transform:i}){super(`${e}:spPr`),ne(this,"form"),this.root.push(new rg({bwMode:"auto"})),this.form=new Vu(i),this.root.push(this.form),this.root.push(new tg),t&&(this.root.push(ju()),this.root.push(qm(t))),n&&this.root.push(Bs(n))}}const zu=r=>new pe({name:"wps:wsp",children:[Gm(r.nonVisualProperties),new Zu({element:"wps",transform:r.transformation,outline:r.outline,solidFill:r.solidFill}),jm(r.children),Gu(r.bodyProperties)]});class Ms extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{uri:"uri"})}}const ng=r=>new pe({name:"asvg:svgBlip",attributes:{asvg:{key:"xmlns:asvg",value:"http://schemas.microsoft.com/office/drawing/2016/SVG/main"},embed:{key:"r:embed",value:`rId{${r.fileName}}`}}}),ig=r=>new pe({name:"a:ext",attributes:{uri:{key:"uri",value:"{96DAC541-7B7A-43D3-8B79-37D633B846F1}"}},children:[ng(r)]}),sg=r=>new pe({name:"a:extLst",children:[ig(r)]}),ag=r=>new pe({name:"a:blip",attributes:{embed:{key:"r:embed",value:`rId{${r.type==="svg"?r.fallback.fileName:r.fileName}}`},cstate:{key:"cstate",value:"none"}},children:r.type==="svg"?[sg(r)]:[]});class og extends q{constructor(){super("a:srcRect")}}class lg extends q{constructor(){super("a:fillRect")}}class ug extends q{constructor(){super("a:stretch"),this.root.push(new lg)}}class cg extends q{constructor(e){super("pic:blipFill"),this.root.push(ag(e)),this.root.push(new og),this.root.push(new ug)}}class hg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{noChangeAspect:"noChangeAspect",noChangeArrowheads:"noChangeArrowheads"})}}class fg extends q{constructor(){super("a:picLocks"),this.root.push(new hg({noChangeAspect:1,noChangeArrowheads:1}))}}class dg extends q{constructor(){super("pic:cNvPicPr"),this.root.push(new fg)}}const Xu=(r,e)=>new pe({name:"a:hlinkClick",attributes:Ce(ye({},e?{xmlns:{key:"xmlns:a",value:"http://schemas.openxmlformats.org/drawingml/2006/main"}}:{}),{id:{key:"r:id",value:`rId${r}`}})});class pg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"id",name:"name",descr:"descr"})}}class mg extends q{constructor(){super("pic:cNvPr"),this.root.push(new pg({id:0,name:"",descr:""}))}prepForXml(e){for(let t=e.stack.length-1;t>=0;t--){const n=e.stack[t];if(n instanceof Gt){this.root.push(Xu(n.linkId,!1));break}}return super.prepForXml(e)}}class gg extends q{constructor(){super("pic:nvPicPr"),this.root.push(new mg),this.root.push(new dg)}}class wg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{xmlns:"xmlns:pic"})}}class Ku extends q{constructor({mediaData:e,transform:t,outline:n}){super("pic:pic"),this.root.push(new wg({xmlns:"http://schemas.openxmlformats.org/drawingml/2006/picture"})),this.root.push(new gg),this.root.push(new cg(e)),this.root.push(new Zu({element:"pic",transform:t,outline:n}))}}const yg=r=>new pe({name:"wpg:grpSpPr",children:[new Vu(r)]}),bg=()=>new pe({name:"wpg:cNvGrpSpPr"}),vg=r=>new pe({name:"wpg:wgp",children:[bg(),yg(r.transformation),...r.children]});class _g extends q{constructor({mediaData:e,transform:t,outline:n,solidFill:i}){if(super("a:graphicData"),e.type==="wps"){this.root.push(new Ms({uri:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}));const s=zu(Ce(ye({},e.data),{transformation:t,outline:n,solidFill:i}));this.root.push(s)}else if(e.type==="wpg"){this.root.push(new Ms({uri:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"}));const o=e.children.map(l=>l.type==="wps"?zu(Ce(ye({},l.data),{transformation:l.transformation,outline:l.outline,solidFill:l.solidFill})):new Ku({mediaData:l,transform:l.transformation,outline:l.outline})),a=vg({children:o,transformation:t});this.root.push(a)}else{this.root.push(new Ms({uri:"http://schemas.openxmlformats.org/drawingml/2006/picture"}));const s=e,o=new Ku({mediaData:s,transform:t,outline:n});this.root.push(o)}}}class Tg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{a:"xmlns:a"})}}class Yu extends q{constructor({mediaData:e,transform:t,outline:n,solidFill:i}){super("a:graphic"),ne(this,"data"),this.root.push(new Tg({a:"http://schemas.openxmlformats.org/drawingml/2006/main"})),this.data=new _g({mediaData:e,transform:t,outline:n,solidFill:i}),this.root.push(this.data)}}const pr={NONE:0,SQUARE:1,TIGHT:2,TOP_AND_BOTTOM:3},Ju={BOTH_SIDES:"bothSides",LEFT:"left",RIGHT:"right",LARGEST:"largest"},Us=()=>new pe({name:"wp:wrapNone"}),Qu=(r,e={top:0,bottom:0,left:0,right:0})=>new pe({name:"wp:wrapSquare",attributes:{wrapText:{key:"wrapText",value:r.side||Ju.BOTH_SIDES},distT:{key:"distT",value:e.top},distB:{key:"distB",value:e.bottom},distL:{key:"distL",value:e.left},distR:{key:"distR",value:e.right}}}),qu=(r={top:0,bottom:0})=>new pe({name:"wp:wrapTight",attributes:{distT:{key:"distT",value:r.top},distB:{key:"distB",value:r.bottom}}}),$u=(r={top:0,bottom:0})=>new pe({name:"wp:wrapTopAndBottom",attributes:{distT:{key:"distT",value:r.top},distB:{key:"distB",value:r.bottom}}});class ec extends q{constructor({name:e,description:t,title:n,id:i}={name:"",description:"",title:""}){super("wp:docPr"),ne(this,"docPropertiesUniqueNumericId",Nu());const s={id:{key:"id",value:i??this.docPropertiesUniqueNumericId()},name:{key:"name",value:e}};t!=null&&(s.description={key:"descr",value:t}),n!=null&&(s.title={key:"title",value:n}),this.root.push(new Pn(s))}prepForXml(e){for(let t=e.stack.length-1;t>=0;t--){const n=e.stack[t];if(n instanceof Gt){this.root.push(Xu(n.linkId,!0));break}}return super.prepForXml(e)}}const tc=({top:r,right:e,bottom:t,left:n})=>new pe({name:"wp:effectExtent",attributes:{top:{key:"t",value:r},right:{key:"r",value:e},bottom:{key:"b",value:t},left:{key:"l",value:n}}}),rc=({x:r,y:e})=>new pe({name:"wp:extent",attributes:{x:{key:"cx",value:r},y:{key:"cy",value:e}}});class Eg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{xmlns:"xmlns:a",noChangeAspect:"noChangeAspect"})}}class Sg extends q{constructor(){super("a:graphicFrameLocks"),this.root.push(new Eg({xmlns:"http://schemas.openxmlformats.org/drawingml/2006/main",noChangeAspect:1}))}}const nc=()=>new pe({name:"wp:cNvGraphicFramePr",children:[new Sg]});class xg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{distT:"distT",distB:"distB",distL:"distL",distR:"distR",allowOverlap:"allowOverlap",behindDoc:"behindDoc",layoutInCell:"layoutInCell",locked:"locked",relativeHeight:"relativeHeight",simplePos:"simplePos"})}}class Ag extends q{constructor({mediaData:e,transform:t,drawingOptions:n}){super("wp:anchor");const i=ye({allowOverlap:!0,behindDocument:!1,lockAnchor:!1,layoutInCell:!0,verticalPosition:{},horizontalPosition:{}},n.floating);if(this.root.push(new xg({distT:i.margins&&i.margins.top||0,distB:i.margins&&i.margins.bottom||0,distL:i.margins&&i.margins.left||0,distR:i.margins&&i.margins.right||0,simplePos:"0",allowOverlap:i.allowOverlap===!0?"1":"0",behindDoc:i.behindDocument===!0?"1":"0",locked:i.lockAnchor===!0?"1":"0",layoutInCell:i.layoutInCell===!0?"1":"0",relativeHeight:i.zIndex?i.zIndex:t.emus.y})),this.root.push(Du()),this.root.push(Uu(i.horizontalPosition)),this.root.push(Wu(i.verticalPosition)),this.root.push(rc({x:t.emus.x,y:t.emus.y})),this.root.push(tc({top:0,right:0,bottom:0,left:0})),n.floating!==void 0&&n.floating.wrap!==void 0)switch(n.floating.wrap.type){case pr.SQUARE:this.root.push(Qu(n.floating.wrap,n.floating.margins));break;case pr.TIGHT:this.root.push(qu(n.floating.margins));break;case pr.TOP_AND_BOTTOM:this.root.push($u(n.floating.margins));break;case pr.NONE:default:this.root.push(Us())}else this.root.push(Us());this.root.push(new ec(n.docProperties)),this.root.push(nc()),this.root.push(new Yu({mediaData:e,transform:t,outline:n.outline,solidFill:n.solidFill}))}}const kg=({mediaData:r,transform:e,docProperties:t,outline:n,solidFill:i})=>{var s,o,a,l;return new pe({name:"wp:inline",attributes:{distanceTop:{key:"distT",value:0},distanceBottom:{key:"distB",value:0},distanceLeft:{key:"distL",value:0},distanceRight:{key:"distR",value:0}},children:[rc({x:e.emus.x,y:e.emus.y}),tc(n?{top:((s=n.width)!=null?s:9525)*2,right:((o=n.width)!=null?o:9525)*2,bottom:((a=n.width)!=null?a:9525)*2,left:((l=n.width)!=null?l:9525)*2}:{top:0,right:0,bottom:0,left:0}),new ec(t),nc(),new Yu({mediaData:r,transform:e,outline:n,solidFill:i})]})};class Jr extends q{constructor(e,t={}){super("w:drawing"),t.floating?this.root.push(new Ag({mediaData:e,transform:e.transformation,drawingOptions:t})):this.root.push(kg({mediaData:e,transform:e.transformation,docProperties:t.docProperties,outline:t.outline,solidFill:t.solidFill}))}}const Rg=r=>{const e=";base64,",t=r.indexOf(e),n=t===-1?0:t+e.length;return new Uint8Array(atob(r.substring(n)).split("").map(i=>i.charCodeAt(0)))},ic=r=>typeof r=="string"?Rg(r):r,Ws=(r,e)=>({data:ic(r.data),fileName:e,transformation:{pixels:{x:Math.round(r.transformation.width),y:Math.round(r.transformation.height)},emus:{x:Math.round(r.transformation.width*9525),y:Math.round(r.transformation.height*9525)},flip:r.transformation.flip,rotation:r.transformation.rotation?r.transformation.rotation*6e4:void 0}});class Ig extends Be{constructor(e){super({}),ne(this,"imageData");const n=`${Ds(e.data)}.${e.type}`;this.imageData=e.type==="svg"?Ce(ye({type:e.type},Ws(e,n)),{fallback:ye({type:e.fallback.type},Ws(Ce(ye({},e.fallback),{transformation:e.transformation}),`${Ds(e.fallback.data)}.${e.fallback.type}`))}):ye({type:e.type},Ws(e,n));const i=new Jr(this.imageData,{floating:e.floating,docProperties:e.altText,outline:e.outline});this.root.push(i)}prepForXml(e){return e.file.Media.addImage(this.imageData.fileName,this.imageData),this.imageData.type==="svg"&&e.file.Media.addImage(this.imageData.fallback.fileName,this.imageData.fallback),super.prepForXml(e)}}const Hs=r=>{var e,t,n,i,s,o,a,l;return{offset:{pixels:{x:Math.round((t=(e=r.offset)==null?void 0:e.left)!=null?t:0),y:Math.round((i=(n=r.offset)==null?void 0:n.top)!=null?i:0)},emus:{x:Math.round(((o=(s=r.offset)==null?void 0:s.left)!=null?o:0)*9525),y:Math.round(((l=(a=r.offset)==null?void 0:a.top)!=null?l:0)*9525)}},pixels:{x:Math.round(r.width),y:Math.round(r.height)},emus:{x:Math.round(r.width*9525),y:Math.round(r.height*9525)},flip:r.flip,rotation:r.rotation?r.rotation*6e4:void 0}};class Cg extends Be{constructor(e){super({}),ne(this,"wpsShapeData"),this.wpsShapeData={type:e.type,transformation:Hs(e.transformation),data:ye({},e)};const t=new Jr(this.wpsShapeData,{floating:e.floating,docProperties:e.altText,outline:e.outline,solidFill:e.solidFill});this.root.push(t)}}class Ng extends Be{constructor(e){super({}),ne(this,"wpgGroupData"),ne(this,"mediaDatas"),this.wpgGroupData={type:e.type,transformation:Hs(e.transformation),children:e.children};const t=new Jr(this.wpgGroupData,{floating:e.floating,docProperties:e.altText});this.mediaDatas=e.children.filter(n=>n.type!=="wps").map(n=>n),this.root.push(t)}prepForXml(e){return this.mediaDatas.forEach(t=>{e.file.Media.addImage(t.fileName,t),t.type==="svg"&&e.file.Media.addImage(t.fallback.fileName,t.fallback)}),super.prepForXml(e)}}class Pg extends q{constructor(e){super("w:instrText"),this.root.push(new ze({space:Ve.PRESERVE})),this.root.push(`SEQ ${e}`)}}class Lg extends Be{constructor(e){super({}),this.root.push(it(!0)),this.root.push(new Pg(e)),this.root.push(pt()),this.root.push(st())}}class Og extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{instr:"w:instr"})}}class Gs extends q{constructor(e,t){super("w:fldSimple"),this.root.push(new Og({instr:e})),t!==void 0&&this.root.push(new or(t))}}class Fg extends Gs{constructor(e){super(` MERGEFIELD ${e} `,`«${e}»`)}}class Dg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{xmlns:"xmlns"})}}const sc={EXTERNAL:"External"},Bg=(r,e,t,n)=>new pe({name:"Relationship",attributes:{id:{key:"Id",value:r},type:{key:"Type",value:e},target:{key:"Target",value:t},targetMode:{key:"TargetMode",value:n}}});class Et extends q{constructor(){super("Relationships"),this.root.push(new Dg({xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}))}addRelationship(e,t,n,i){this.root.push(Bg(`rId${e}`,t,n,i))}get RelationshipCount(){return this.root.length-1}}class Mg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id",initials:"w:initials",author:"w:author",date:"w:date"})}}class Vs extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id"})}}class Ug extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{"xmlns:cx":"xmlns:cx","xmlns:cx1":"xmlns:cx1","xmlns:cx2":"xmlns:cx2","xmlns:cx3":"xmlns:cx3","xmlns:cx4":"xmlns:cx4","xmlns:cx5":"xmlns:cx5","xmlns:cx6":"xmlns:cx6","xmlns:cx7":"xmlns:cx7","xmlns:cx8":"xmlns:cx8","xmlns:mc":"xmlns:mc","xmlns:aink":"xmlns:aink","xmlns:am3d":"xmlns:am3d","xmlns:o":"xmlns:o","xmlns:r":"xmlns:r","xmlns:m":"xmlns:m","xmlns:v":"xmlns:v","xmlns:wp14":"xmlns:wp14","xmlns:wp":"xmlns:wp","xmlns:w10":"xmlns:w10","xmlns:w":"xmlns:w","xmlns:w14":"xmlns:w14","xmlns:w15":"xmlns:w15","xmlns:w16cex":"xmlns:w16cex","xmlns:w16cid":"xmlns:w16cid","xmlns:w16":"xmlns:w16","xmlns:w16sdtdh":"xmlns:w16sdtdh","xmlns:w16se":"xmlns:w16se","xmlns:wpg":"xmlns:wpg","xmlns:wpi":"xmlns:wpi","xmlns:wne":"xmlns:wne","xmlns:wps":"xmlns:wps"})}}class Wg extends q{constructor(e){super("w:commentRangeStart"),this.root.push(new Vs({id:e}))}}class Hg extends q{constructor(e){super("w:commentRangeEnd"),this.root.push(new Vs({id:e}))}}class Gg extends q{constructor(e){super("w:commentReference"),this.root.push(new Vs({id:e}))}}class ac extends q{constructor({id:e,initials:t,author:n,date:i=new Date,children:s}){super("w:comment"),this.root.push(new Mg({id:e,initials:t,author:n,date:i.toISOString()}));for(const o of s)this.root.push(o)}}class oc extends q{constructor({children:e}){super("w:comments"),ne(this,"relationships"),this.root.push(new Ug({"xmlns:cx":"http://schemas.microsoft.com/office/drawing/2014/chartex","xmlns:cx1":"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex","xmlns:cx2":"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex","xmlns:cx3":"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex","xmlns:cx4":"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex","xmlns:cx5":"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex","xmlns:cx6":"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex","xmlns:cx7":"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex","xmlns:cx8":"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:aink":"http://schemas.microsoft.com/office/drawing/2016/ink","xmlns:am3d":"http://schemas.microsoft.com/office/drawing/2017/model3d","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:m":"http://schemas.openxmlformats.org/officeDocument/2006/math","xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:wp14":"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing","xmlns:wp":"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing","xmlns:w10":"urn:schemas-microsoft-com:office:word","xmlns:w":"http://schemas.openxmlformats.org/wordprocessingml/2006/main","xmlns:w14":"http://schemas.microsoft.com/office/word/2010/wordml","xmlns:w15":"http://schemas.microsoft.com/office/word/2012/wordml","xmlns:w16cex":"http://schemas.microsoft.com/office/word/2018/wordml/cex","xmlns:w16cid":"http://schemas.microsoft.com/office/word/2016/wordml/cid","xmlns:w16":"http://schemas.microsoft.com/office/word/2018/wordml","xmlns:w16sdtdh":"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash","xmlns:w16se":"http://schemas.microsoft.com/office/word/2015/wordml/symex","xmlns:wpg":"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup","xmlns:wpi":"http://schemas.microsoft.com/office/word/2010/wordprocessingInk","xmlns:wne":"http://schemas.microsoft.com/office/word/2006/wordml","xmlns:wps":"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}));for(const t of e)this.root.push(new ac(t));this.relationships=new Et}get Relationships(){return this.relationships}}class Vg extends Ue{constructor(){super("w:noBreakHyphen")}}class jg extends Ue{constructor(){super("w:softHyphen")}}class Zg extends Ue{constructor(){super("w:dayShort")}}class zg extends Ue{constructor(){super("w:monthShort")}}class Xg extends Ue{constructor(){super("w:yearShort")}}class Kg extends Ue{constructor(){super("w:dayLong")}}class Yg extends Ue{constructor(){super("w:monthLong")}}class Jg extends Ue{constructor(){super("w:yearLong")}}class Qg extends Ue{constructor(){super("w:annotationRef")}}class qg extends Ue{constructor(){super("w:footnoteRef")}}class lc extends Ue{constructor(){super("w:endnoteRef")}}class $g extends Ue{constructor(){super("w:separator")}}class ew extends Ue{constructor(){super("w:continuationSeparator")}}class tw extends Ue{constructor(){super("w:pgNum")}}class rw extends Ue{constructor(){super("w:cr")}}class uc extends Ue{constructor(){super("w:tab")}}class nw extends Ue{constructor(){super("w:lastRenderedPageBreak")}}const iw={LEFT:"left",CENTER:"center",RIGHT:"right"},sw={MARGIN:"margin",INDENT:"indent"},aw={NONE:"none",DOT:"dot",HYPHEN:"hyphen",UNDERSCORE:"underscore",MIDDLE_DOT:"middleDot"};class ow extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{alignment:"w:alignment",relativeTo:"w:relativeTo",leader:"w:leader"})}}class lw extends q{constructor(e){super("w:ptab"),this.root.push(new ow({alignment:e.alignment,relativeTo:e.relativeTo,leader:e.leader}))}}const cc={COLUMN:"column",PAGE:"page"};class hc extends q{constructor(e){super("w:br"),this.root.push(new De({type:e}))}}class uw extends Be{constructor(){super({}),this.root.push(new hc(cc.PAGE))}}class cw extends Be{constructor(){super({}),this.root.push(new hc(cc.COLUMN))}}class fc extends q{constructor(){super("w:pageBreakBefore")}}const Nt={AT_LEAST:"atLeast",EXACTLY:"exactly",EXACT:"exact",AUTO:"auto"},dc=({after:r,before:e,line:t,lineRule:n,beforeAutoSpacing:i,afterAutoSpacing:s})=>new pe({name:"w:spacing",attributes:{after:{key:"w:after",value:r},before:{key:"w:before",value:e},line:{key:"w:line",value:t},lineRule:{key:"w:lineRule",value:n},beforeAutoSpacing:{key:"w:beforeAutospacing",value:i},afterAutoSpacing:{key:"w:afterAutospacing",value:s}}}),hw={HEADING_1:"Heading1",HEADING_2:"Heading2",HEADING_3:"Heading3",HEADING_4:"Heading4",HEADING_5:"Heading5",HEADING_6:"Heading6",TITLE:"Title"},mr=r=>new pe({name:"w:pStyle",attributes:{val:{key:"w:val",value:r}}}),js={LEFT:"left",RIGHT:"right",CENTER:"center",BAR:"bar",CLEAR:"clear",DECIMAL:"decimal",END:"end",NUM:"num",START:"start"},fw={DOT:"dot",HYPHEN:"hyphen",MIDDLE_DOT:"middleDot",NONE:"none",UNDERSCORE:"underscore"},dw={MAX:9026},pc=({type:r,position:e,leader:t})=>new pe({name:"w:tab",attributes:{val:{key:"w:val",value:r},pos:{key:"w:pos",value:e},leader:{key:"w:leader",value:t}}}),mc=r=>new pe({name:"w:tabs",children:r.map(e=>pc(e))});class Qr extends q{constructor(e,t){super("w:numPr"),this.root.push(new pw(t)),this.root.push(new mw(e))}}class pw extends q{constructor(e){if(super("w:ilvl"),e>9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new De({val:e}))}}class mw extends q{constructor(e){super("w:numId"),this.root.push(new De({val:typeof e=="string"?`{${e}}`:e}))}}class gr extends q{constructor(){super(...arguments),ne(this,"fileChild",Symbol())}}class gw extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"r:id",history:"w:history",anchor:"w:anchor"})}}const ww={INTERNAL:"INTERNAL",EXTERNAL:"EXTERNAL"};class Gt extends q{constructor(e,t,n){super("w:hyperlink"),ne(this,"linkId"),this.linkId=t;const i={history:1,anchor:n||void 0,id:n?void 0:`rId${this.linkId}`},s=new gw(i);this.root.push(s),e.forEach(o=>{this.root.push(o)})}}class gc extends Gt{constructor(e){super(e.children,hr(),e.anchor)}}class Zs extends q{constructor(e){super("w:externalHyperlink"),this.options=e}}class yw extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id",name:"w:name"})}}class bw extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id"})}}class wc{constructor(e){ne(this,"bookmarkUniqueNumericId",Pu()),ne(this,"start"),ne(this,"children"),ne(this,"end");const t=this.bookmarkUniqueNumericId();this.start=new yc(e.id,t),this.children=e.children,this.end=new bc(t)}}class yc extends q{constructor(e,t){super("w:bookmarkStart");const n=new yw({name:e,id:t});this.root.push(n)}}class bc extends q{constructor(e){super("w:bookmarkEnd");const t=new bw({id:e});this.root.push(t)}}var vc=(r=>(r.NONE="none",r.RELATIVE="relative",r.NO_CONTEXT="no_context",r.FULL_CONTEXT="full_context",r))(vc||{});const vw={relative:"\\r",no_context:"\\n",full_context:"\\w",none:void 0};class _w extends Gs{constructor(e,t,n={}){const{hyperlink:i=!0,referenceFormat:s="full_context"}=n,o=`REF ${e}`,a=[...i?["\\h"]:[],...[vw[s]].filter(h=>!!h)],l=`${o} ${a.join(" ")}`;super(l,t)}}const _c=r=>new pe({name:"w:outlineLvl",attributes:{val:{key:"w:val",value:r}}});class Tw extends q{constructor(e,t={}){super("w:instrText"),this.root.push(new ze({space:Ve.PRESERVE}));let n=`PAGEREF ${e}`;t.hyperlink&&(n=`${n} \\h`),t.useRelativePosition&&(n=`${n} \\p`),this.root.push(n)}}class Ew extends Be{constructor(e,t={}){super({children:[it(!0),new Tw(e,t),st()]})}}const Sw={ANSI:"00",DEFAULT:"01",SYMBOL:"02",MAC:"4D",JIS:"80",HANGUL:"81",JOHAB:"82",GB_2312:"86",CHINESEBIG5:"88",GREEK:"A1",TURKISH:"A2",VIETNAMESE:"A3",HEBREW:"B1",ARABIC:"B2",BALTIC:"BA",RUSSIAN:"CC",THAI:"DE",EASTEUROPE:"EE",OEM:"FF"},qr=({id:r,fontKey:e,subsetted:t},n)=>new pe({name:n,attributes:ye({id:{key:"r:id",value:r}},e?{fontKey:{key:"w:fontKey",value:`{${e}}`}}:{}),children:[...t?[new de("w:subsetted",t)]:[]]}),xw=({name:r,altName:e,panose1:t,charset:n,family:i,notTrueType:s,pitch:o,sig:a,embedRegular:l,embedBold:h,embedItalic:f,embedBoldItalic:m})=>new pe({name:"w:font",attributes:{name:{key:"w:name",value:r}},children:[...e?[Wt("w:altName",e)]:[],...t?[Wt("w:panose1",t)]:[],...n?[Wt("w:charset",n)]:[],Wt("w:family",i),...s?[new de("w:notTrueType",s)]:[],Wt("w:pitch",o),...a?[new pe({name:"w:sig",attributes:{usb0:{key:"w:usb0",value:a.usb0},usb1:{key:"w:usb1",value:a.usb1},usb2:{key:"w:usb2",value:a.usb2},usb3:{key:"w:usb3",value:a.usb3},csb0:{key:"w:csb0",value:a.csb0},csb1:{key:"w:csb1",value:a.csb1}}})]:[],...l?[qr(l,"w:embedRegular")]:[],...h?[qr(h,"w:embedBold")]:[],...f?[qr(f,"w:embedItalic")]:[],...m?[qr(m,"w:embedBoldItalic")]:[]]}),Aw=({name:r,index:e,fontKey:t,characterSet:n})=>xw({name:r,sig:{usb0:"E0002AFF",usb1:"C000247B",usb2:"00000009",usb3:"00000000",csb0:"000001FF",csb1:"00000000"},charset:n,family:"auto",pitch:"variable",embedRegular:{fontKey:t,id:`rId${e}`}}),kw=r=>new pe({name:"w:fonts",attributes:{mc:{key:"xmlns:mc",value:"http://schemas.openxmlformats.org/markup-compatibility/2006"},r:{key:"xmlns:r",value:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},w:{key:"xmlns:w",value:"http://schemas.openxmlformats.org/wordprocessingml/2006/main"},w14:{key:"xmlns:w14",value:"http://schemas.microsoft.com/office/word/2010/wordml"},w15:{key:"xmlns:w15",value:"http://schemas.microsoft.com/office/word/2012/wordml"},w16cex:{key:"xmlns:w16cex",value:"http://schemas.microsoft.com/office/word/2018/wordml/cex"},w16cid:{key:"xmlns:w16cid",value:"http://schemas.microsoft.com/office/word/2016/wordml/cid"},w16:{key:"xmlns:w16",value:"http://schemas.microsoft.com/office/word/2018/wordml"},w16sdtdh:{key:"xmlns:w16sdtdh",value:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash"},w16se:{key:"xmlns:w16se",value:"http://schemas.microsoft.com/office/word/2015/wordml/symex"},Ignorable:{key:"mc:Ignorable",value:"w14 w15 w16se w16cid w16 w16cex w16sdtdh"}},children:r.map((e,t)=>Aw({name:e.name,index:t+1,fontKey:e.fontKey,characterSet:e.characterSet}))});class Tc{constructor(e){ne(this,"fontTable"),ne(this,"relationships"),ne(this,"fontOptionsWithKey",[]),this.options=e,this.fontOptionsWithKey=e.map(t=>Ce(ye({},t),{fontKey:Lu()})),this.fontTable=kw(this.fontOptionsWithKey),this.relationships=new Et;for(let t=0;t<e.length;t++)this.relationships.addRelationship(t+1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/font",`fonts/${e[t].name}.odttf`)}get View(){return this.fontTable}get Relationships(){return this.relationships}}const Rw=()=>new pe({name:"w:wordWrap",attributes:{val:{key:"w:val",value:0}}}),Iw={NONE:"none",DROP:"drop",MARGIN:"margin"},Cw={MARGIN:"margin",PAGE:"page",TEXT:"text"},Nw={AROUND:"around",AUTO:"auto",NONE:"none",NOT_BESIDE:"notBeside",THROUGH:"through",TIGHT:"tight"},Ec=r=>{var e,t;return new pe({name:"w:framePr",attributes:{anchorLock:{key:"w:anchorLock",value:r.anchorLock},dropCap:{key:"w:dropCap",value:r.dropCap},width:{key:"w:w",value:r.width},height:{key:"w:h",value:r.height},x:{key:"w:x",value:r.position?r.position.x:void 0},y:{key:"w:y",value:r.position?r.position.y:void 0},anchorHorizontal:{key:"w:hAnchor",value:r.anchor.horizontal},anchorVertical:{key:"w:vAnchor",value:r.anchor.vertical},spaceHorizontal:{key:"w:hSpace",value:(e=r.space)==null?void 0:e.horizontal},spaceVertical:{key:"w:vSpace",value:(t=r.space)==null?void 0:t.vertical},rule:{key:"w:hRule",value:r.rule},alignmentX:{key:"w:xAlign",value:r.alignment?r.alignment.x:void 0},alignmentY:{key:"w:yAlign",value:r.alignment?r.alignment.y:void 0},lines:{key:"w:lines",value:r.lines},wrap:{key:"w:wrap",value:r.wrap}}})};class gt extends ct{constructor(e){var t,n;if(super("w:pPr",e==null?void 0:e.includeIfEmpty),ne(this,"numberingReferences",[]),!e)return this;e.heading&&this.push(mr(e.heading)),e.bullet&&this.push(mr("ListParagraph")),e.numbering&&!e.style&&!e.heading&&(e.numbering.custom||this.push(mr("ListParagraph"))),e.style&&this.push(mr(e.style)),e.keepNext!==void 0&&this.push(new de("w:keepNext",e.keepNext)),e.keepLines!==void 0&&this.push(new de("w:keepLines",e.keepLines)),e.pageBreakBefore&&this.push(new fc),e.frame&&this.push(Ec(e.frame)),e.widowControl!==void 0&&this.push(new de("w:widowControl",e.widowControl)),e.bullet&&this.push(new Qr(1,e.bullet.level)),e.numbering?(this.numberingReferences.push({reference:e.numbering.reference,instance:(t=e.numbering.instance)!=null?t:0}),this.push(new Qr(`${e.numbering.reference}-${(n=e.numbering.instance)!=null?n:0}`,e.numbering.level))):e.numbering===!1&&this.push(new Qr(0,0)),e.border&&this.push(new nu(e.border)),e.thematicBreak&&this.push(new iu),e.shading&&this.push(sr(e.shading)),e.wordWrap&&this.push(Rw()),e.overflowPunctuation&&this.push(new de("w:overflowPunct",e.overflowPunctuation));const i=[...e.rightTabStop!==void 0?[{type:js.RIGHT,position:e.rightTabStop}]:[],...e.tabStops?e.tabStops:[],...e.leftTabStop!==void 0?[{type:js.LEFT,position:e.leftTabStop}]:[]];i.length>0&&this.push(mc(i)),e.bidirectional!==void 0&&this.push(new de("w:bidi",e.bidirectional)),e.spacing&&this.push(dc(e.spacing)),e.indent&&this.push(su(e.indent)),e.contextualSpacing!==void 0&&this.push(new de("w:contextualSpacing",e.contextualSpacing)),e.alignment&&this.push(vs(e.alignment)),e.outlineLevel!==void 0&&this.push(_c(e.outlineLevel)),e.suppressLineNumbers!==void 0&&this.push(new de("w:suppressLineNumbers",e.suppressLineNumbers)),e.autoSpaceEastAsianText!==void 0&&this.push(new de("w:autoSpaceDN",e.autoSpaceEastAsianText)),e.run&&this.push(new uu(e.run)),e.revision&&this.push(new Sc(e.revision))}push(e){this.root.push(e)}prepForXml(e){if(!(e.viewWrapper instanceof Tc))for(const t of this.numberingReferences)e.file.Numbering.createConcreteNumberingInstance(t.reference,t.instance);return super.prepForXml(e)}}class Sc extends q{constructor(e){super("w:pPrChange"),this.root.push(new je({id:e.id,author:e.author,date:e.date})),this.root.push(new gt(Ce(ye({},e),{includeIfEmpty:!0})))}}class Je extends gr{constructor(e){if(super("w:p"),ne(this,"properties"),typeof e=="string")return this.properties=new gt({}),this.root.push(this.properties),this.root.push(new or(e)),this;if(this.properties=new gt(e),this.root.push(this.properties),e.text&&this.root.push(new or(e.text)),e.children)for(const t of e.children){if(t instanceof wc){this.root.push(t.start);for(const n of t.children)this.root.push(n);this.root.push(t.end);continue}this.root.push(t)}}prepForXml(e){for(const t of this.root)if(t instanceof Zs){const n=this.root.indexOf(t),i=new Gt(t.options.children,hr());e.viewWrapper.Relationships.addRelationship(i.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",t.options.link,sc.EXTERNAL),this.root[n]=i}return super.prepForXml(e)}addRunToFront(e){return this.root.splice(1,0,e),this}}let Pw=class extends q{constructor(e){super("m:oMath");for(const t of e.children)this.root.push(t)}};class Lw extends q{constructor(e){super("m:t"),this.root.push(e)}}class Ow extends q{constructor(e){super("m:r"),this.root.push(new Lw(e))}}class xc extends q{constructor(e){super("m:den");for(const t of e)this.root.push(t)}}class Ac extends q{constructor(e){super("m:num");for(const t of e)this.root.push(t)}}class Fw extends q{constructor(e){super("m:f"),this.root.push(new Ac(e.numerator)),this.root.push(new xc(e.denominator))}}const kc=({accent:r})=>new pe({name:"m:chr",attributes:{accent:{key:"m:val",value:r}}}),He=({children:r})=>new pe({name:"m:e",children:r}),Rc=({value:r})=>new pe({name:"m:limLoc",attributes:{value:{key:"m:val",value:r||"undOvr"}}}),Dw=()=>new pe({name:"m:subHide",attributes:{hide:{key:"m:val",value:1}}}),Bw=()=>new pe({name:"m:supHide",attributes:{hide:{key:"m:val",value:1}}}),zs=({accent:r,hasSuperScript:e,hasSubScript:t,limitLocationVal:n})=>new pe({name:"m:naryPr",children:[...r?[kc({accent:r})]:[],Rc({value:n}),...e?[]:[Bw()],...t?[]:[Dw()]]}),Vt=({children:r})=>new pe({name:"m:sub",children:r}),jt=({children:r})=>new pe({name:"m:sup",children:r});class Mw extends q{constructor(e){super("m:nary"),this.root.push(zs({accent:"∑",hasSuperScript:!!e.superScript,hasSubScript:!!e.subScript})),e.subScript&&this.root.push(Vt({children:e.subScript})),e.superScript&&this.root.push(jt({children:e.superScript})),this.root.push(He({children:e.children}))}}class Uw extends q{constructor(e){super("m:nary"),this.root.push(zs({accent:"",hasSuperScript:!!e.superScript,hasSubScript:!!e.subScript,limitLocationVal:"subSup"})),e.subScript&&this.root.push(Vt({children:e.subScript})),e.superScript&&this.root.push(jt({children:e.superScript})),this.root.push(He({children:e.children}))}}class Xs extends q{constructor(e){super("m:lim");for(const t of e)this.root.push(t)}}class Ww extends q{constructor(e){super("m:limUpp"),this.root.push(He({children:e.children})),this.root.push(new Xs(e.limit))}}class Hw extends q{constructor(e){super("m:limLow"),this.root.push(He({children:e.children})),this.root.push(new Xs(e.limit))}}const Ic=()=>new pe({name:"m:sSupPr"});class Gw extends q{constructor(e){super("m:sSup"),this.root.push(Ic()),this.root.push(He({children:e.children})),this.root.push(jt({children:e.superScript}))}}const Cc=()=>new pe({name:"m:sSubPr"});class Vw extends q{constructor(e){super("m:sSub"),this.root.push(Cc()),this.root.push(He({children:e.children})),this.root.push(Vt({children:e.subScript}))}}const Nc=()=>new pe({name:"m:sSubSupPr"});class jw extends q{constructor(e){super("m:sSubSup"),this.root.push(Nc()),this.root.push(He({children:e.children})),this.root.push(Vt({children:e.subScript})),this.root.push(jt({children:e.superScript}))}}const Pc=()=>new pe({name:"m:sPrePr"});class Zw extends pe{constructor({children:e,subScript:t,superScript:n}){super({name:"m:sPre",children:[Pc(),He({children:e}),Vt({children:t}),jt({children:n})]})}}const zw="";class Lc extends q{constructor(e){if(super("m:deg"),e)for(const t of e)this.root.push(t)}}class Xw extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{hide:"m:val"})}}class Kw extends q{constructor(){super("m:degHide"),this.root.push(new Xw({hide:1}))}}class Oc extends q{constructor(e){super("m:radPr"),e||this.root.push(new Kw)}}class Yw extends q{constructor(e){super("m:rad"),this.root.push(new Oc(!!e.degree)),this.root.push(new Lc(e.degree)),this.root.push(He({children:e.children}))}}class Fc extends q{constructor(e){super("m:fName");for(const t of e)this.root.push(t)}}class Dc extends q{constructor(){super("m:funcPr")}}class Jw extends q{constructor(e){super("m:func"),this.root.push(new Dc),this.root.push(new Fc(e.name)),this.root.push(He({children:e.children}))}}const Qw=({character:r})=>new pe({name:"m:begChr",attributes:{character:{key:"m:val",value:r}}}),qw=({character:r})=>new pe({name:"m:endChr",attributes:{character:{key:"m:val",value:r}}}),$r=({characters:r})=>new pe({name:"m:dPr",children:r?[Qw({character:r.beginningCharacter}),qw({character:r.endingCharacter})]:[]});class $w extends q{constructor(e){super("m:d"),this.root.push($r({})),this.root.push(He({children:e.children}))}}class ey extends q{constructor(e){super("m:d"),this.root.push($r({characters:{beginningCharacter:"[",endingCharacter:"]"}})),this.root.push(He({children:e.children}))}}class ty extends q{constructor(e){super("m:d"),this.root.push($r({characters:{beginningCharacter:"{",endingCharacter:"}"}})),this.root.push(He({children:e.children}))}}class ry extends q{constructor(e){super("m:d"),this.root.push($r({characters:{beginningCharacter:"〈",endingCharacter:"〉"}})),this.root.push(He({children:e.children}))}}const ny=r=>new pe({name:"w:gridCol",attributes:r!==void 0?{width:{key:"w:w",value:Oe(r)}}:void 0});class Bc extends q{constructor(e,t){super("w:tblGrid");for(const n of e)this.root.push(ny(n));t&&this.root.push(new sy(t))}}class iy extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id"})}}class sy extends q{constructor(e){super("w:tblGridChange"),this.root.push(new iy({id:e.id})),this.root.push(new Bc(e.columnWidths))}}class ay extends q{constructor(e){super("w:ins"),this.root.push(new je({id:e.id,author:e.author,date:e.date})),this.addChildElement(new or(e))}}class oy extends q{constructor(){super("w:delInstrText"),this.root.push(new ze({space:Ve.PRESERVE})),this.root.push("PAGE")}}class ly extends q{constructor(){super("w:delInstrText"),this.root.push(new ze({space:Ve.PRESERVE})),this.root.push("NUMPAGES")}}class uy extends q{constructor(){super("w:delInstrText"),this.root.push(new ze({space:Ve.PRESERVE})),this.root.push("SECTIONPAGES")}}class Mc extends q{constructor(e){super("w:delText"),this.root.push(new ze({space:Ve.PRESERVE})),this.root.push(e)}}class cy extends q{constructor(e){super("w:del"),ne(this,"deletedTextRunWrapper"),this.root.push(new je({id:e.id,author:e.author,date:e.date})),this.deletedTextRunWrapper=new hy(e),this.addChildElement(this.deletedTextRunWrapper)}}class hy extends q{constructor(e){if(super("w:r"),this.root.push(new mt(e)),e.children)for(const t of e.children){if(typeof t=="string"){switch(t){case Tt.CURRENT:this.root.push(it()),this.root.push(new oy),this.root.push(pt()),this.root.push(st());break;case Tt.TOTAL_PAGES:this.root.push(it()),this.root.push(new ly),this.root.push(pt()),this.root.push(st());break;case Tt.TOTAL_PAGES_IN_SECTION:this.root.push(it()),this.root.push(new uy),this.root.push(pt()),this.root.push(st());break;default:this.root.push(new Mc(t));break}continue}this.root.push(t)}else e.text&&this.root.push(new Mc(e.text));if(e.break)for(let t=0;t<e.break;t++)this.root.splice(1,0,au())}}class Uc extends q{constructor(e){super("w:ins"),this.root.push(new je({id:e.id,author:e.author,date:e.date}))}}class Wc extends q{constructor(e){super("w:del"),this.root.push(new je({id:e.id,author:e.author,date:e.date}))}}class Hc extends q{constructor(e){super("w:cellIns"),this.root.push(new je({id:e.id,author:e.author,date:e.date}))}}class Gc extends q{constructor(e){super("w:cellDel"),this.root.push(new je({id:e.id,author:e.author,date:e.date}))}}const fy={CONTINUE:"cont",RESTART:"rest"};class Vc extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date",verticalMerge:"w:vMerge",verticalMergeOriginal:"w:vMergeOrig"})}}class jc extends q{constructor(e){super("w:cellMerge"),this.root.push(new Vc(e))}}const Zc={TOP:"top",CENTER:"center",BOTTOM:"bottom"},zc=Ce(ye({},Zc),{BOTH:"both"}),dy=zc,Ks=r=>new pe({name:"w:vAlign",attributes:{verticalAlign:{key:"w:val",value:r}}}),Xc=({marginUnitType:r=en.DXA,top:e,left:t,bottom:n,right:i})=>[{name:"w:top",size:e},{name:"w:left",size:t},{name:"w:bottom",size:n},{name:"w:right",size:i}].filter(s=>s.size!==void 0).map(({name:s,size:o})=>wr(s,{type:r,size:o})),py=r=>{const e=Xc(r);if(e.length!==0)return new pe({name:"w:tblCellMar",children:e})},my=r=>{const e=Xc(r);if(e.length!==0)return new pe({name:"w:tcMar",children:e})},en={AUTO:"auto",DXA:"dxa",NIL:"nil",PERCENTAGE:"pct"},wr=(r,{type:e=en.AUTO,size:t})=>{let n=t;return e===en.PERCENTAGE&&typeof t=="number"&&(n=`${t}%`),new pe({name:r,attributes:{type:{key:"w:type",value:e},size:{key:"w:w",value:bs(n)}}})};class Kc extends ct{constructor(e){super("w:tcBorders"),e.top&&this.root.push(Ie("w:top",e.top)),e.start&&this.root.push(Ie("w:start",e.start)),e.left&&this.root.push(Ie("w:left",e.left)),e.bottom&&this.root.push(Ie("w:bottom",e.bottom)),e.end&&this.root.push(Ie("w:end",e.end)),e.right&&this.root.push(Ie("w:right",e.right))}}class gy extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w:val"})}}class Yc extends q{constructor(e){super("w:gridSpan"),this.root.push(new gy({val:Me(e)}))}}const Ys={CONTINUE:"continue",RESTART:"restart"};class wy extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w:val"})}}class Js extends q{constructor(e){super("w:vMerge"),this.root.push(new wy({val:e}))}}const yy={BOTTOM_TO_TOP_LEFT_TO_RIGHT:"btLr",LEFT_TO_RIGHT_TOP_TO_BOTTOM:"lrTb",TOP_TO_BOTTOM_RIGHT_TO_LEFT:"tbRl"};class by extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w:val"})}}class Jc extends q{constructor(e){super("w:textDirection"),this.root.push(new by({val:e}))}}class Qc extends ct{constructor(e){if(super("w:tcPr",e.includeIfEmpty),e.width&&this.root.push(wr("w:tcW",e.width)),e.columnSpan&&this.root.push(new Yc(e.columnSpan)),e.verticalMerge?this.root.push(new Js(e.verticalMerge)):e.rowSpan&&e.rowSpan>1&&this.root.push(new Js(Ys.RESTART)),e.borders&&this.root.push(new Kc(e.borders)),e.shading&&this.root.push(sr(e.shading)),e.margins){const t=my(e.margins);t&&this.root.push(t)}e.textDirection&&this.root.push(new Jc(e.textDirection)),e.verticalAlign&&this.root.push(Ks(e.verticalAlign)),e.insertion&&this.root.push(new Hc(e.insertion)),e.deletion&&this.root.push(new Gc(e.deletion)),e.revision&&this.root.push(new vy(e.revision)),e.cellMerge&&this.root.push(new jc(e.cellMerge))}}class vy extends q{constructor(e){super("w:tcPrChange"),this.root.push(new je({id:e.id,author:e.author,date:e.date})),this.root.push(new Qc(Ce(ye({},e),{includeIfEmpty:!0})))}}class Qs extends q{constructor(e){super("w:tc"),this.options=e,this.root.push(new Qc(e));for(const t of e.children)this.root.push(t)}prepForXml(e){return this.root[this.root.length-1]instanceof Je||this.root.push(new Je({})),super.prepForXml(e)}}const Zt={style:Kr.NONE,size:0,color:"auto"},zt={style:Kr.SINGLE,size:4,color:"auto"};class qs extends q{constructor(e){var t,n,i,s,o,a;super("w:tblBorders"),this.root.push(Ie("w:top",(t=e.top)!=null?t:zt)),this.root.push(Ie("w:left",(n=e.left)!=null?n:zt)),this.root.push(Ie("w:bottom",(i=e.bottom)!=null?i:zt)),this.root.push(Ie("w:right",(s=e.right)!=null?s:zt)),this.root.push(Ie("w:insideH",(o=e.insideHorizontal)!=null?o:zt)),this.root.push(Ie("w:insideV",(a=e.insideVertical)!=null?a:zt))}}ne(qs,"NONE",{top:Zt,bottom:Zt,left:Zt,right:Zt,insideHorizontal:Zt,insideVertical:Zt});const _y={MARGIN:"margin",PAGE:"page",TEXT:"text"},Ty={CENTER:"center",INSIDE:"inside",LEFT:"left",OUTSIDE:"outside",RIGHT:"right"},Ey={CENTER:"center",INSIDE:"inside",BOTTOM:"bottom",OUTSIDE:"outside",INLINE:"inline",TOP:"top"},Sy={NEVER:"never",OVERLAP:"overlap"},xy=r=>new pe({name:"w:tblOverlap",attributes:{val:{key:"w:val",value:r}}}),qc=({horizontalAnchor:r,verticalAnchor:e,absoluteHorizontalPosition:t,relativeHorizontalPosition:n,absoluteVerticalPosition:i,relativeVerticalPosition:s,bottomFromText:o,topFromText:a,leftFromText:l,rightFromText:h,overlap:f})=>new pe({name:"w:tblpPr",attributes:{leftFromText:{key:"w:leftFromText",value:l===void 0?void 0:Oe(l)},rightFromText:{key:"w:rightFromText",value:h===void 0?void 0:Oe(h)},topFromText:{key:"w:topFromText",value:a===void 0?void 0:Oe(a)},bottomFromText:{key:"w:bottomFromText",value:o===void 0?void 0:Oe(o)},absoluteHorizontalPosition:{key:"w:tblpX",value:t===void 0?void 0:nt(t)},absoluteVerticalPosition:{key:"w:tblpY",value:i===void 0?void 0:nt(i)},horizontalAnchor:{key:"w:horzAnchor",value:r},relativeHorizontalPosition:{key:"w:tblpXSpec",value:n},relativeVerticalPosition:{key:"w:tblpYSpec",value:s},verticalAnchor:{key:"w:vertAnchor",value:e}},children:f?[xy(f)]:void 0}),Ay={AUTOFIT:"autofit",FIXED:"fixed"},$c=r=>new pe({name:"w:tblLayout",attributes:{type:{key:"w:type",value:r}}}),ky={DXA:"dxa"},eh=({type:r=ky.DXA,value:e})=>new pe({name:"w:tblCellSpacing",attributes:{type:{key:"w:type",value:r},value:{key:"w:w",value:bs(e)}}}),th=({firstRow:r,lastRow:e,firstColumn:t,lastColumn:n,noHBand:i,noVBand:s})=>new pe({name:"w:tblLook",attributes:{firstRow:{key:"w:firstRow",value:r},lastRow:{key:"w:lastRow",value:e},firstColumn:{key:"w:firstColumn",value:t},lastColumn:{key:"w:lastColumn",value:n},noHBand:{key:"w:noHBand",value:i},noVBand:{key:"w:noVBand",value:s}}});class $s extends ct{constructor(e){if(super("w:tblPr",e.includeIfEmpty),e.style&&this.root.push(new dt("w:tblStyle",e.style)),e.float&&this.root.push(qc(e.float)),e.visuallyRightToLeft!==void 0&&this.root.push(new de("w:bidiVisual",e.visuallyRightToLeft)),e.width&&this.root.push(wr("w:tblW",e.width)),e.alignment&&this.root.push(vs(e.alignment)),e.indent&&this.root.push(wr("w:tblInd",e.indent)),e.borders&&this.root.push(new qs(e.borders)),e.shading&&this.root.push(sr(e.shading)),e.layout&&this.root.push($c(e.layout)),e.cellMargin){const t=py(e.cellMargin);t&&this.root.push(t)}e.tableLook&&this.root.push(th(e.tableLook)),e.cellSpacing&&this.root.push(eh(e.cellSpacing)),e.revision&&this.root.push(new Ry(e.revision))}}class Ry extends q{constructor(e){super("w:tblPrChange"),this.root.push(new je({id:e.id,author:e.author,date:e.date})),this.root.push(new $s(Ce(ye({},e),{includeIfEmpty:!0})))}}class Iy extends gr{constructor({rows:e,width:t,columnWidths:n=Array(Math.max(...e.map(_=>_.CellCount))).fill(100),columnWidthsRevision:i,margins:s,indent:o,float:a,layout:l,style:h,borders:f,alignment:m,visuallyRightToLeft:v,tableLook:y,cellSpacing:b,revision:g}){super("w:tbl"),this.root.push(new $s({borders:f??{},width:t??{size:100},indent:o,float:a,layout:l,style:h,alignment:m,cellMargin:s,visuallyRightToLeft:v,tableLook:y,cellSpacing:b,revision:g})),this.root.push(new Bc(n,i));for(const _ of e)this.root.push(_);e.forEach((_,d)=>{if(d===e.length-1)return;let T=0;_.cells.forEach(w=>{if(w.options.rowSpan&&w.options.rowSpan>1){const p=new Qs({rowSpan:w.options.rowSpan-1,columnSpan:w.options.columnSpan,borders:w.options.borders,children:[],verticalMerge:Ys.CONTINUE});e[d+1].addCellToColumnIndex(p,T)}T+=w.options.columnSpan||1})})}}const Cy={AUTO:"auto",ATLEAST:"atLeast",EXACT:"exact"},rh=(r,e)=>new pe({name:"w:trHeight",attributes:{value:{key:"w:val",value:Oe(r)},rule:{key:"w:hRule",value:e}}});class ea extends ct{constructor(e){super("w:trPr",e.includeIfEmpty),e.cantSplit!==void 0&&this.root.push(new de("w:cantSplit",e.cantSplit)),e.tableHeader!==void 0&&this.root.push(new de("w:tblHeader",e.tableHeader)),e.height&&this.root.push(rh(e.height.value,e.height.rule)),e.cellSpacing&&this.root.push(eh(e.cellSpacing)),e.insertion&&this.root.push(new Uc(e.insertion)),e.deletion&&this.root.push(new Wc(e.deletion)),e.revision&&this.root.push(new nh(e.revision))}}class nh extends q{constructor(e){super("w:trPrChange"),this.root.push(new je({id:e.id,author:e.author,date:e.date})),this.root.push(new ea(Ce(ye({},e),{includeIfEmpty:!0})))}}class Ny extends q{constructor(e){super("w:tr"),this.options=e,this.root.push(new ea(e));for(const t of e.children)this.root.push(t)}get CellCount(){return this.options.children.length}get cells(){return this.root.filter(e=>e instanceof Qs)}addCellToIndex(e,t){this.root.splice(t+1,0,e)}addCellToColumnIndex(e,t){const n=this.columnIndexToRootIndex(t,!0);this.addCellToIndex(e,n-1)}rootIndexToColumnIndex(e){if(e<1||e>=this.root.length)throw new Error(`cell 'rootIndex' should between 1 to ${this.root.length-1}`);let t=0;for(let n=1;n<e;n++){const i=this.root[n];t+=i.options.columnSpan||1}return t}columnIndexToRootIndex(e,t=!1){if(e<0)throw new Error("cell 'columnIndex' should not less than zero");let n=0,i=1;for(;n<=e;){if(i>=this.root.length){if(t)return this.root.length;throw new Error(`cell 'columnIndex' should not great than ${n-1}`)}const s=this.root[i];i+=1,n+=s&&s.options.columnSpan||1}return i-1}}class Py extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class Ly extends q{constructor(){super("Properties"),this.root.push(new Py({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}))}}class Oy extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{xmlns:"xmlns"})}}const wt=(r,e)=>new pe({name:"Default",attributes:{contentType:{key:"ContentType",value:r},extension:{key:"Extension",value:e}}}),Xe=(r,e)=>new pe({name:"Override",attributes:{contentType:{key:"ContentType",value:r},partName:{key:"PartName",value:e}}});class Fy extends q{constructor(){super("Types"),this.root.push(new Oy({xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"})),this.root.push(wt("image/png","png")),this.root.push(wt("image/jpeg","jpeg")),this.root.push(wt("image/jpeg","jpg")),this.root.push(wt("image/bmp","bmp")),this.root.push(wt("image/gif","gif")),this.root.push(wt("image/svg+xml","svg")),this.root.push(wt("application/vnd.openxmlformats-package.relationships+xml","rels")),this.root.push(wt("application/xml","xml")),this.root.push(wt("application/vnd.openxmlformats-officedocument.obfuscatedFont","odttf")),this.root.push(Xe("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","/word/document.xml")),this.root.push(Xe("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml","/word/styles.xml")),this.root.push(Xe("application/vnd.openxmlformats-package.core-properties+xml","/docProps/core.xml")),this.root.push(Xe("application/vnd.openxmlformats-officedocument.custom-properties+xml","/docProps/custom.xml")),this.root.push(Xe("application/vnd.openxmlformats-officedocument.extended-properties+xml","/docProps/app.xml")),this.root.push(Xe("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml","/word/numbering.xml")),this.root.push(Xe("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml","/word/footnotes.xml")),this.root.push(Xe("application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml","/word/endnotes.xml")),this.root.push(Xe("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml","/word/settings.xml")),this.root.push(Xe("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml","/word/comments.xml")),this.root.push(Xe("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml","/word/fontTable.xml"))}addFooter(e){this.root.push(Xe("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",`/word/footer${e}.xml`))}addHeader(e){this.root.push(Xe("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",`/word/header${e}.xml`))}}const tn={wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",aink:"http://schemas.microsoft.com/office/drawing/2016/ink",am3d:"http://schemas.microsoft.com/office/drawing/2017/model3d",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16:"http://schemas.microsoft.com/office/word/2018/wordml",w16sdtdh:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex"};class yr extends we{constructor(e,t){super(ye({Ignorable:t},Object.fromEntries(e.map(n=>[n,tn[n]])))),ne(this,"xmlKeys",ye({Ignorable:"mc:Ignorable"},Object.fromEntries(Object.keys(tn).map(n=>[n,`xmlns:${n}`]))))}}class Dy extends q{constructor(e){super("cp:coreProperties"),this.root.push(new yr(["cp","dc","dcterms","dcmitype","xsi"])),e.title&&this.root.push(new _t("dc:title",e.title)),e.subject&&this.root.push(new _t("dc:subject",e.subject)),e.creator&&this.root.push(new _t("dc:creator",e.creator)),e.keywords&&this.root.push(new _t("cp:keywords",e.keywords)),e.description&&this.root.push(new _t("dc:description",e.description)),e.lastModifiedBy&&this.root.push(new _t("cp:lastModifiedBy",e.lastModifiedBy)),e.revision&&this.root.push(new _t("cp:revision",String(e.revision))),this.root.push(new ih("dcterms:created")),this.root.push(new ih("dcterms:modified"))}}class By extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{type:"xsi:type"})}}class ih extends q{constructor(e){super(e),this.root.push(new By({type:"dcterms:W3CDTF"})),this.root.push(ru(new Date))}}class My extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class Uy extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{formatId:"fmtid",pid:"pid",name:"name"})}}class Wy extends q{constructor(e,t){super("property"),this.root.push(new Uy({formatId:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e.toString(),name:t.name})),this.root.push(new Hy(t.value))}}class Hy extends q{constructor(e){super("vt:lpwstr"),this.root.push(e)}}class Gy extends q{constructor(e){super("Properties"),ne(this,"nextId"),ne(this,"properties",[]),this.root.push(new My({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"})),this.nextId=2;for(const t of e)this.addCustomProperty(t)}prepForXml(e){return this.properties.forEach(t=>this.root.push(t)),super.prepForXml(e)}addCustomProperty(e){this.properties.push(new Wy(this.nextId++,e))}}const sh=({space:r,count:e,separate:t,equalWidth:n,children:i})=>new pe({name:"w:cols",attributes:{space:{key:"w:space",value:r===void 0?void 0:Oe(r)},count:{key:"w:num",value:e===void 0?void 0:Me(e)},separate:{key:"w:sep",value:t},equalWidth:{key:"w:equalWidth",value:n}},children:!n&&i?i:void 0}),Vy={DEFAULT:"default",LINES:"lines",LINES_AND_CHARS:"linesAndChars",SNAP_TO_CHARS:"snapToChars"},ah=({type:r,linePitch:e,charSpace:t})=>new pe({name:"w:docGrid",attributes:{type:{key:"w:type",value:r},linePitch:{key:"w:linePitch",value:Me(e)},charSpace:{key:"w:charSpace",value:t?Me(t):void 0}}}),Pt={DEFAULT:"default",FIRST:"first",EVEN:"even"},ta={HEADER:"w:headerReference",FOOTER:"w:footerReference"},rn=(r,e)=>new pe({name:r,attributes:{type:{key:"w:type",value:e.type||Pt.DEFAULT},id:{key:"r:id",value:`rId${e.id}`}}}),jy={NEW_PAGE:"newPage",NEW_SECTION:"newSection",CONTINUOUS:"continuous"},oh=({countBy:r,start:e,restart:t,distance:n})=>new pe({name:"w:lnNumType",attributes:{countBy:{key:"w:countBy",value:r===void 0?void 0:Me(r)},start:{key:"w:start",value:e===void 0?void 0:Me(e)},restart:{key:"w:restart",value:t},distance:{key:"w:distance",value:n===void 0?void 0:Oe(n)}}}),Zy={ALL_PAGES:"allPages",FIRST_PAGE:"firstPage",NOT_FIRST_PAGE:"notFirstPage"},zy={PAGE:"page",TEXT:"text"},Xy={BACK:"back",FRONT:"front"};class lh extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{display:"w:display",offsetFrom:"w:offsetFrom",zOrder:"w:zOrder"})}}class uh extends ct{constructor(e){if(super("w:pgBorders"),!e)return this;e.pageBorders?this.root.push(new lh({display:e.pageBorders.display,offsetFrom:e.pageBorders.offsetFrom,zOrder:e.pageBorders.zOrder})):this.root.push(new lh({})),e.pageBorderTop&&this.root.push(Ie("w:top",e.pageBorderTop)),e.pageBorderLeft&&this.root.push(Ie("w:left",e.pageBorderLeft)),e.pageBorderBottom&&this.root.push(Ie("w:bottom",e.pageBorderBottom)),e.pageBorderRight&&this.root.push(Ie("w:right",e.pageBorderRight))}}const ch=(r,e,t,n,i,s,o)=>new pe({name:"w:pgMar",attributes:{top:{key:"w:top",value:nt(r)},right:{key:"w:right",value:Oe(e)},bottom:{key:"w:bottom",value:nt(t)},left:{key:"w:left",value:Oe(n)},header:{key:"w:header",value:Oe(i)},footer:{key:"w:footer",value:Oe(s)},gutter:{key:"w:gutter",value:Oe(o)}}}),Ky={HYPHEN:"hyphen",PERIOD:"period",COLON:"colon",EM_DASH:"emDash",EN_DASH:"endash"},hh=({start:r,formatType:e,separator:t})=>new pe({name:"w:pgNumType",attributes:{start:{key:"w:start",value:r===void 0?void 0:Me(r)},formatType:{key:"w:fmt",value:e},separator:{key:"w:chapSep",value:t}}}),nn={PORTRAIT:"portrait",LANDSCAPE:"landscape"},fh=({width:r,height:e,orientation:t,code:n})=>{const i=Oe(r),s=Oe(e);return new pe({name:"w:pgSz",attributes:{width:{key:"w:w",value:t===nn.LANDSCAPE?s:i},height:{key:"w:h",value:t===nn.LANDSCAPE?i:s},orientation:{key:"w:orient",value:t},code:{key:"w:code",value:n}}})},Yy={LEFT_TO_RIGHT_TOP_TO_BOTTOM:"lrTb",TOP_TO_BOTTOM_RIGHT_TO_LEFT:"tbRl"};class Jy extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w:val"})}}class dh extends q{constructor(e){super("w:textDirection"),this.root.push(new Jy({val:e}))}}const Qy={NEXT_PAGE:"nextPage",NEXT_COLUMN:"nextColumn",CONTINUOUS:"continuous",EVEN_PAGE:"evenPage",ODD_PAGE:"oddPage"},ph=r=>new pe({name:"w:type",attributes:{val:{key:"w:val",value:r}}}),St={TOP:1440,RIGHT:1440,BOTTOM:1440,LEFT:1440,HEADER:708,FOOTER:708,GUTTER:0},sn={WIDTH:11906,HEIGHT:16838,ORIENTATION:nn.PORTRAIT};class ra extends q{constructor({page:{size:{width:e=sn.WIDTH,height:t=sn.HEIGHT,orientation:n=sn.ORIENTATION}={},margin:{top:i=St.TOP,right:s=St.RIGHT,bottom:o=St.BOTTOM,left:a=St.LEFT,header:l=St.HEADER,footer:h=St.FOOTER,gutter:f=St.GUTTER}={},pageNumbers:m={},borders:v,textDirection:y}={},grid:{linePitch:b=360,charSpace:g,type:_}={},headerWrapperGroup:d={},footerWrapperGroup:T={},lineNumbers:w,titlePage:p,verticalAlign:E,column:P,type:L,revision:M}={}){super("w:sectPr"),this.addHeaderFooterGroup(ta.HEADER,d),this.addHeaderFooterGroup(ta.FOOTER,T),L&&this.root.push(ph(L)),this.root.push(fh({width:e,height:t,orientation:n})),this.root.push(ch(i,s,o,a,l,h,f)),v&&this.root.push(new uh(v)),w&&this.root.push(oh(w)),this.root.push(hh(m)),P&&this.root.push(sh(P)),E&&this.root.push(Ks(E)),p!==void 0&&this.root.push(new de("w:titlePg",p)),y&&this.root.push(new dh(y)),M&&this.root.push(new mh(M)),this.root.push(ah({linePitch:b,charSpace:g,type:_}))}addHeaderFooterGroup(e,t){t.default&&this.root.push(rn(e,{type:Pt.DEFAULT,id:t.default.View.ReferenceId})),t.first&&this.root.push(rn(e,{type:Pt.FIRST,id:t.first.View.ReferenceId})),t.even&&this.root.push(rn(e,{type:Pt.EVEN,id:t.even.View.ReferenceId}))}}class mh extends q{constructor(e){super("w:sectPrChange"),this.root.push(new je({id:e.id,author:e.author,date:e.date})),this.root.push(new ra(e))}}class qy extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{width:"w:w",space:"w:space"})}}class $y extends q{constructor(e){super("w:col"),this.root.push(new qy({width:Oe(e.width),space:e.space===void 0?void 0:Oe(e.space)}))}}class gh extends q{constructor(){super("w:body"),ne(this,"sections",[])}addSection(e){const t=this.sections.pop();this.root.push(this.createSectionParagraph(t)),this.sections.push(new ra(e))}prepForXml(e){return this.sections.length===1&&(this.root.splice(0,1),this.root.push(this.sections.pop())),super.prepForXml(e)}push(e){this.root.push(e)}createSectionParagraph(e){const t=new Je({}),n=new gt({});return n.push(e),t.addChildElement(n),t}}class wh extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{color:"w:color",themeColor:"w:themeColor",themeShade:"w:themeShade",themeTint:"w:themeTint"})}}class yh extends q{constructor(e){super("w:background"),this.root.push(new wh({color:e.color===void 0?void 0:It(e.color),themeColor:e.themeColor,themeShade:e.themeShade===void 0?void 0:ws(e.themeShade),themeTint:e.themeTint===void 0?void 0:ws(e.themeTint)}))}}class eb extends q{constructor(e){super("w:document"),ne(this,"body"),this.root.push(new yr(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps","cx","cx1","cx2","cx3","cx4","cx5","cx6","cx7","cx8","aink","am3d","w16cex","w16cid","w16","w16sdtdh","w16se"],"w14 w15 wp14")),this.body=new gh,e.background&&this.root.push(new yh(e.background)),this.root.push(this.body)}add(e){return this.body.push(e),this}get Body(){return this.body}}class tb{constructor(e){ne(this,"document"),ne(this,"relationships"),this.document=new eb(e),this.relationships=new Et}get View(){return this.document}get Relationships(){return this.relationships}}class rb extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class nb extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{type:"w:type",id:"w:id"})}}class ib extends Be{constructor(){super({style:"EndnoteReference"}),this.root.push(new lc)}}const bh={SEPARATOR:"separator",CONTINUATION_SEPARATOR:"continuationSeparator"};class na extends q{constructor(e){super("w:endnote"),this.root.push(new nb({type:e.type,id:e.id}));for(let t=0;t<e.children.length;t++){const n=e.children[t];t===0&&n.addRunToFront(new ib),this.root.push(n)}}}class sb extends q{constructor(){super("w:continuationSeparator")}}class vh extends Be{constructor(){super({}),this.root.push(new sb)}}class ab extends q{constructor(){super("w:separator")}}class _h extends Be{constructor(){super({}),this.root.push(new ab)}}class Th extends q{constructor(){super("w:endnotes"),this.root.push(new rb({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));const e=new na({id:-1,type:bh.SEPARATOR,children:[new Je({spacing:{after:0,line:240,lineRule:Nt.AUTO},children:[new _h]})]});this.root.push(e);const t=new na({id:0,type:bh.CONTINUATION_SEPARATOR,children:[new Je({spacing:{after:0,line:240,lineRule:Nt.AUTO},children:[new vh]})]});this.root.push(t)}createEndnote(e,t){const n=new na({id:e,children:t});this.root.push(n)}}class ob{constructor(){ne(this,"endnotes"),ne(this,"relationships"),this.endnotes=new Th,this.relationships=new Et}get View(){return this.endnotes}get Relationships(){return this.relationships}}class lb extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type"})}}let ub=class extends gs{constructor(e,t){super("w:ftr",t),ne(this,"refId"),this.refId=e,t||this.root.push(new lb({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}};class Eh{constructor(e,t,n){ne(this,"footer"),ne(this,"relationships"),this.media=e,this.footer=new ub(t,n),this.relationships=new Et}add(e){this.footer.add(e)}addChildElement(e){this.footer.addChildElement(e)}get View(){return this.footer}get Relationships(){return this.relationships}get Media(){return this.media}}class cb extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{type:"w:type",id:"w:id"})}}class hb extends q{constructor(){super("w:footnoteRef")}}class fb extends Be{constructor(){super({style:"FootnoteReference"}),this.root.push(new hb)}}const Sh={SEPERATOR:"separator",CONTINUATION_SEPERATOR:"continuationSeparator"};class ia extends q{constructor(e){super("w:footnote"),this.root.push(new cb({type:e.type,id:e.id}));for(let t=0;t<e.children.length;t++){const n=e.children[t];t===0&&n.addRunToFront(new fb),this.root.push(n)}}}class db extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class xh extends q{constructor(){super("w:footnotes"),this.root.push(new db({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));const e=new ia({id:-1,type:Sh.SEPERATOR,children:[new Je({spacing:{after:0,line:240,lineRule:Nt.AUTO},children:[new _h]})]});this.root.push(e);const t=new ia({id:0,type:Sh.CONTINUATION_SEPERATOR,children:[new Je({spacing:{after:0,line:240,lineRule:Nt.AUTO},children:[new vh]})]});this.root.push(t)}createFootNote(e,t){const n=new ia({id:e,children:t});this.root.push(n)}}class pb{constructor(){ne(this,"footnotess"),ne(this,"relationships"),this.footnotess=new xh,this.relationships=new Et}get View(){return this.footnotess}get Relationships(){return this.relationships}}class mb extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type",cx:"xmlns:cx",cx1:"xmlns:cx1",cx2:"xmlns:cx2",cx3:"xmlns:cx3",cx4:"xmlns:cx4",cx5:"xmlns:cx5",cx6:"xmlns:cx6",cx7:"xmlns:cx7",cx8:"xmlns:cx8",w16cid:"xmlns:w16cid",w16se:"xmlns:w16se"})}}let gb=class extends gs{constructor(e,t){super("w:hdr",t),ne(this,"refId"),this.refId=e,t||this.root.push(new mb({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}};class Ah{constructor(e,t,n){ne(this,"header"),ne(this,"relationships"),this.media=e,this.header=new gb(t,n),this.relationships=new Et}add(e){return this.header.add(e),this}addChildElement(e){this.header.addChildElement(e)}get View(){return this.header}get Relationships(){return this.relationships}get Media(){return this.media}}class sa{constructor(){ne(this,"map"),this.map=new Map}addImage(e,t){this.map.set(e,t)}get Array(){return Array.from(this.map.values())}}const wb="",lt={DECIMAL:"decimal",UPPER_ROMAN:"upperRoman",LOWER_ROMAN:"lowerRoman",UPPER_LETTER:"upperLetter",LOWER_LETTER:"lowerLetter",ORDINAL:"ordinal",CARDINAL_TEXT:"cardinalText",ORDINAL_TEXT:"ordinalText",HEX:"hex",CHICAGO:"chicago",IDEOGRAPH__DIGITAL:"ideographDigital",JAPANESE_COUNTING:"japaneseCounting",AIUEO:"aiueo",IROHA:"iroha",DECIMAL_FULL_WIDTH:"decimalFullWidth",DECIMAL_HALF_WIDTH:"decimalHalfWidth",JAPANESE_LEGAL:"japaneseLegal",JAPANESE_DIGITAL_TEN_THOUSAND:"japaneseDigitalTenThousand",DECIMAL_ENCLOSED_CIRCLE:"decimalEnclosedCircle",DECIMAL_FULL_WIDTH2:"decimalFullWidth2",AIUEO_FULL_WIDTH:"aiueoFullWidth",IROHA_FULL_WIDTH:"irohaFullWidth",DECIMAL_ZERO:"decimalZero",BULLET:"bullet",GANADA:"ganada",CHOSUNG:"chosung",DECIMAL_ENCLOSED_FULLSTOP:"decimalEnclosedFullstop",DECIMAL_ENCLOSED_PARENTHESES:"decimalEnclosedParen",DECIMAL_ENCLOSED_CIRCLE_CHINESE:"decimalEnclosedCircleChinese",IDEOGRAPH_ENCLOSED_CIRCLE:"ideographEnclosedCircle",IDEOGRAPH_TRADITIONAL:"ideographTraditional",IDEOGRAPH_ZODIAC:"ideographZodiac",IDEOGRAPH_ZODIAC_TRADITIONAL:"ideographZodiacTraditional",TAIWANESE_COUNTING:"taiwaneseCounting",IDEOGRAPH_LEGAL_TRADITIONAL:"ideographLegalTraditional",TAIWANESE_COUNTING_THOUSAND:"taiwaneseCountingThousand",TAIWANESE_DIGITAL:"taiwaneseDigital",CHINESE_COUNTING:"chineseCounting",CHINESE_LEGAL_SIMPLIFIED:"chineseLegalSimplified",CHINESE_COUNTING_THOUSAND:"chineseCountingThousand",KOREAN_DIGITAL:"koreanDigital",KOREAN_COUNTING:"koreanCounting",KOREAN_LEGAL:"koreanLegal",KOREAN_DIGITAL2:"koreanDigital2",VIETNAMESE_COUNTING:"vietnameseCounting",RUSSIAN_LOWER:"russianLower",RUSSIAN_UPPER:"russianUpper",NONE:"none",NUMBER_IN_DASH:"numberInDash",HEBREW1:"hebrew1",HEBREW2:"hebrew2",ARABIC_ALPHA:"arabicAlpha",ARABIC_ABJAD:"arabicAbjad",HINDI_VOWELS:"hindiVowels",HINDI_CONSONANTS:"hindiConsonants",HINDI_NUMBERS:"hindiNumbers",HINDI_COUNTING:"hindiCounting",THAI_LETTERS:"thaiLetters",THAI_NUMBERS:"thaiNumbers",THAI_COUNTING:"thaiCounting",BAHT_TEXT:"bahtText",DOLLAR_TEXT:"dollarText",CUSTOM:"custom"};class yb extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{ilvl:"w:ilvl",tentative:"w15:tentative"})}}class bb extends q{constructor(e){super("w:numFmt"),this.root.push(new De({val:e}))}}class vb extends q{constructor(e){super("w:lvlText"),this.root.push(new De({val:e}))}}class _b extends q{constructor(e){super("w:lvlJc"),this.root.push(new De({val:e}))}}const Tb={NOTHING:"nothing",SPACE:"space",TAB:"tab"};class Eb extends q{constructor(e){super("w:suff"),this.root.push(new De({val:e}))}}class Sb extends q{constructor(){super("w:isLgl")}}class aa extends q{constructor({level:e,format:t,text:n,alignment:i=Qe.START,start:s=1,style:o,suffix:a,isLegalNumberingStyle:l}){if(super("w:lvl"),ne(this,"paragraphProperties"),ne(this,"runProperties"),this.root.push(new Ht("w:start",Me(s))),t&&this.root.push(new bb(t)),a&&this.root.push(new Eb(a)),l&&this.root.push(new Sb),n&&this.root.push(new vb(n)),this.root.push(new _b(i)),this.paragraphProperties=new gt(o&&o.paragraph),this.runProperties=new mt(o&&o.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties),e>9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new yb({ilvl:Me(e),tentative:1}))}}class kh extends aa{}class xb extends aa{}class Ab extends q{constructor(e){super("w:multiLevelType"),this.root.push(new De({val:e}))}}class kb extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{abstractNumId:"w:abstractNumId",restartNumberingAfterBreak:"w15:restartNumberingAfterBreak"})}}class oa extends q{constructor(e,t){super("w:abstractNum"),ne(this,"id"),this.root.push(new kb({abstractNumId:Me(e),restartNumberingAfterBreak:0})),this.root.push(new Ab("hybridMultilevel")),this.id=e;for(const n of t)this.root.push(new kh(n))}}class Rb extends q{constructor(e){super("w:abstractNumId"),this.root.push(new De({val:e}))}}class Ib extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{numId:"w:numId"})}}class la extends q{constructor(e){if(super("w:num"),ne(this,"numId"),ne(this,"reference"),ne(this,"instance"),this.numId=e.numId,this.reference=e.reference,this.instance=e.instance,this.root.push(new Ib({numId:Me(e.numId)})),this.root.push(new Rb(Me(e.abstractNumId))),e.overrideLevels&&e.overrideLevels.length)for(const t of e.overrideLevels)this.root.push(new Rh(t.num,t.start))}}class Cb extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{ilvl:"w:ilvl"})}}class Rh extends q{constructor(e,t){super("w:lvlOverride"),this.root.push(new Cb({ilvl:e})),t!==void 0&&this.root.push(new Pb(t))}}class Nb extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w:val"})}}class Pb extends q{constructor(e){super("w:startOverride"),this.root.push(new Nb({val:e}))}}class Ih extends q{constructor(e){super("w:numbering"),ne(this,"abstractNumberingMap",new Map),ne(this,"concreteNumberingMap",new Map),ne(this,"referenceConfigMap",new Map),ne(this,"abstractNumUniqueNumericId",Iu()),ne(this,"concreteNumUniqueNumericId",Cu()),this.root.push(new yr(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps"],"w14 w15 wp14"));const t=new oa(this.abstractNumUniqueNumericId(),[{level:0,format:lt.BULLET,text:"●",alignment:Qe.LEFT,style:{paragraph:{indent:{left:Ye(.5),hanging:Ye(.25)}}}},{level:1,format:lt.BULLET,text:"○",alignment:Qe.LEFT,style:{paragraph:{indent:{left:Ye(1),hanging:Ye(.25)}}}},{level:2,format:lt.BULLET,text:"■",alignment:Qe.LEFT,style:{paragraph:{indent:{left:2160,hanging:Ye(.25)}}}},{level:3,format:lt.BULLET,text:"●",alignment:Qe.LEFT,style:{paragraph:{indent:{left:2880,hanging:Ye(.25)}}}},{level:4,format:lt.BULLET,text:"○",alignment:Qe.LEFT,style:{paragraph:{indent:{left:3600,hanging:Ye(.25)}}}},{level:5,format:lt.BULLET,text:"■",alignment:Qe.LEFT,style:{paragraph:{indent:{left:4320,hanging:Ye(.25)}}}},{level:6,format:lt.BULLET,text:"●",alignment:Qe.LEFT,style:{paragraph:{indent:{left:5040,hanging:Ye(.25)}}}},{level:7,format:lt.BULLET,text:"●",alignment:Qe.LEFT,style:{paragraph:{indent:{left:5760,hanging:Ye(.25)}}}},{level:8,format:lt.BULLET,text:"●",alignment:Qe.LEFT,style:{paragraph:{indent:{left:6480,hanging:Ye(.25)}}}}]);this.concreteNumberingMap.set("default-bullet-numbering",new la({numId:1,abstractNumId:t.id,reference:"default-bullet-numbering",instance:0,overrideLevels:[{num:0,start:1}]})),this.abstractNumberingMap.set("default-bullet-numbering",t);for(const n of e.config)this.abstractNumberingMap.set(n.reference,new oa(this.abstractNumUniqueNumericId(),n.levels)),this.referenceConfigMap.set(n.reference,n.levels)}prepForXml(e){for(const t of this.abstractNumberingMap.values())this.root.push(t);for(const t of this.concreteNumberingMap.values())this.root.push(t);return super.prepForXml(e)}createConcreteNumberingInstance(e,t){const n=this.abstractNumberingMap.get(e);if(!n)return;const i=`${e}-${t}`;if(this.concreteNumberingMap.has(i))return;const s=this.referenceConfigMap.get(e),o=s&&s[0].start,a={numId:this.concreteNumUniqueNumericId(),abstractNumId:n.id,reference:e,instance:t,overrideLevels:[typeof o=="number"&&Number.isInteger(o)?{num:0,start:o}:{num:0,start:1}]};this.concreteNumberingMap.set(i,new la(a))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}}const Lb=r=>new pe({name:"w:compatSetting",attributes:{version:{key:"w:val",value:r},name:{key:"w:name",value:"compatibilityMode"},uri:{key:"w:uri",value:"http://schemas.microsoft.com/office/word"}}});class Ob extends q{constructor(e){super("w:compat"),e.version&&this.root.push(Lb(e.version)),e.useSingleBorderforContiguousCells&&this.root.push(new de("w:useSingleBorderforContiguousCells",e.useSingleBorderforContiguousCells)),e.wordPerfectJustification&&this.root.push(new de("w:wpJustification",e.wordPerfectJustification)),e.noTabStopForHangingIndent&&this.root.push(new de("w:noTabHangInd",e.noTabStopForHangingIndent)),e.noLeading&&this.root.push(new de("w:noLeading",e.noLeading)),e.spaceForUnderline&&this.root.push(new de("w:spaceForUL",e.spaceForUnderline)),e.noColumnBalance&&this.root.push(new de("w:noColumnBalance",e.noColumnBalance)),e.balanceSingleByteDoubleByteWidth&&this.root.push(new de("w:balanceSingleByteDoubleByteWidth",e.balanceSingleByteDoubleByteWidth)),e.noExtraLineSpacing&&this.root.push(new de("w:noExtraLineSpacing",e.noExtraLineSpacing)),e.doNotLeaveBackslashAlone&&this.root.push(new de("w:doNotLeaveBackslashAlone",e.doNotLeaveBackslashAlone)),e.underlineTrailingSpaces&&this.root.push(new de("w:ulTrailSpace",e.underlineTrailingSpaces)),e.doNotExpandShiftReturn&&this.root.push(new de("w:doNotExpandShiftReturn",e.doNotExpandShiftReturn)),e.spacingInWholePoints&&this.root.push(new de("w:spacingInWholePoints",e.spacingInWholePoints)),e.lineWrapLikeWord6&&this.root.push(new de("w:lineWrapLikeWord6",e.lineWrapLikeWord6)),e.printBodyTextBeforeHeader&&this.root.push(new de("w:printBodyTextBeforeHeader",e.printBodyTextBeforeHeader)),e.printColorsBlack&&this.root.push(new de("w:printColBlack",e.printColorsBlack)),e.spaceWidth&&this.root.push(new de("w:wpSpaceWidth",e.spaceWidth)),e.showBreaksInFrames&&this.root.push(new de("w:showBreaksInFrames",e.showBreaksInFrames)),e.subFontBySize&&this.root.push(new de("w:subFontBySize",e.subFontBySize)),e.suppressBottomSpacing&&this.root.push(new de("w:suppressBottomSpacing",e.suppressBottomSpacing)),e.suppressTopSpacing&&this.root.push(new de("w:suppressTopSpacing",e.suppressTopSpacing)),e.suppressSpacingAtTopOfPage&&this.root.push(new de("w:suppressSpacingAtTopOfPage",e.suppressSpacingAtTopOfPage)),e.suppressTopSpacingWP&&this.root.push(new de("w:suppressTopSpacingWP",e.suppressTopSpacingWP)),e.suppressSpBfAfterPgBrk&&this.root.push(new de("w:suppressSpBfAfterPgBrk",e.suppressSpBfAfterPgBrk)),e.swapBordersFacingPages&&this.root.push(new de("w:swapBordersFacingPages",e.swapBordersFacingPages)),e.convertMailMergeEsc&&this.root.push(new de("w:convMailMergeEsc",e.convertMailMergeEsc)),e.truncateFontHeightsLikeWP6&&this.root.push(new de("w:truncateFontHeightsLikeWP6",e.truncateFontHeightsLikeWP6)),e.macWordSmallCaps&&this.root.push(new de("w:mwSmallCaps",e.macWordSmallCaps)),e.usePrinterMetrics&&this.root.push(new de("w:usePrinterMetrics",e.usePrinterMetrics)),e.doNotSuppressParagraphBorders&&this.root.push(new de("w:doNotSuppressParagraphBorders",e.doNotSuppressParagraphBorders)),e.wrapTrailSpaces&&this.root.push(new de("w:wrapTrailSpaces",e.wrapTrailSpaces)),e.footnoteLayoutLikeWW8&&this.root.push(new de("w:footnoteLayoutLikeWW8",e.footnoteLayoutLikeWW8)),e.shapeLayoutLikeWW8&&this.root.push(new de("w:shapeLayoutLikeWW8",e.shapeLayoutLikeWW8)),e.alignTablesRowByRow&&this.root.push(new de("w:alignTablesRowByRow",e.alignTablesRowByRow)),e.forgetLastTabAlignment&&this.root.push(new de("w:forgetLastTabAlignment",e.forgetLastTabAlignment)),e.adjustLineHeightInTable&&this.root.push(new de("w:adjustLineHeightInTable",e.adjustLineHeightInTable)),e.autoSpaceLikeWord95&&this.root.push(new de("w:autoSpaceLikeWord95",e.autoSpaceLikeWord95)),e.noSpaceRaiseLower&&this.root.push(new de("w:noSpaceRaiseLower",e.noSpaceRaiseLower)),e.doNotUseHTMLParagraphAutoSpacing&&this.root.push(new de("w:doNotUseHTMLParagraphAutoSpacing",e.doNotUseHTMLParagraphAutoSpacing)),e.layoutRawTableWidth&&this.root.push(new de("w:layoutRawTableWidth",e.layoutRawTableWidth)),e.layoutTableRowsApart&&this.root.push(new de("w:layoutTableRowsApart",e.layoutTableRowsApart)),e.useWord97LineBreakRules&&this.root.push(new de("w:useWord97LineBreakRules",e.useWord97LineBreakRules)),e.doNotBreakWrappedTables&&this.root.push(new de("w:doNotBreakWrappedTables",e.doNotBreakWrappedTables)),e.doNotSnapToGridInCell&&this.root.push(new de("w:doNotSnapToGridInCell",e.doNotSnapToGridInCell)),e.selectFieldWithFirstOrLastCharacter&&this.root.push(new de("w:selectFldWithFirstOrLastChar",e.selectFieldWithFirstOrLastCharacter)),e.applyBreakingRules&&this.root.push(new de("w:applyBreakingRules",e.applyBreakingRules)),e.doNotWrapTextWithPunctuation&&this.root.push(new de("w:doNotWrapTextWithPunct",e.doNotWrapTextWithPunctuation)),e.doNotUseEastAsianBreakRules&&this.root.push(new de("w:doNotUseEastAsianBreakRules",e.doNotUseEastAsianBreakRules)),e.useWord2002TableStyleRules&&this.root.push(new de("w:useWord2002TableStyleRules",e.useWord2002TableStyleRules)),e.growAutofit&&this.root.push(new de("w:growAutofit",e.growAutofit)),e.useFELayout&&this.root.push(new de("w:useFELayout",e.useFELayout)),e.useNormalStyleForList&&this.root.push(new de("w:useNormalStyleForList",e.useNormalStyleForList)),e.doNotUseIndentAsNumberingTabStop&&this.root.push(new de("w:doNotUseIndentAsNumberingTabStop",e.doNotUseIndentAsNumberingTabStop)),e.useAlternateEastAsianLineBreakRules&&this.root.push(new de("w:useAltKinsokuLineBreakRules",e.useAlternateEastAsianLineBreakRules)),e.allowSpaceOfSameStyleInTable&&this.root.push(new de("w:allowSpaceOfSameStyleInTable",e.allowSpaceOfSameStyleInTable)),e.doNotSuppressIndentation&&this.root.push(new de("w:doNotSuppressIndentation",e.doNotSuppressIndentation)),e.doNotAutofitConstrainedTables&&this.root.push(new de("w:doNotAutofitConstrainedTables",e.doNotAutofitConstrainedTables)),e.autofitToFirstFixedWidthCell&&this.root.push(new de("w:autofitToFirstFixedWidthCell",e.autofitToFirstFixedWidthCell)),e.underlineTabInNumberingList&&this.root.push(new de("w:underlineTabInNumList",e.underlineTabInNumberingList)),e.displayHangulFixedWidth&&this.root.push(new de("w:displayHangulFixedWidth",e.displayHangulFixedWidth)),e.splitPgBreakAndParaMark&&this.root.push(new de("w:splitPgBreakAndParaMark",e.splitPgBreakAndParaMark)),e.doNotVerticallyAlignCellWithSp&&this.root.push(new de("w:doNotVertAlignCellWithSp",e.doNotVerticallyAlignCellWithSp)),e.doNotBreakConstrainedForcedTable&&this.root.push(new de("w:doNotBreakConstrainedForcedTable",e.doNotBreakConstrainedForcedTable)),e.ignoreVerticalAlignmentInTextboxes&&this.root.push(new de("w:doNotVertAlignInTxbx",e.ignoreVerticalAlignmentInTextboxes)),e.useAnsiKerningPairs&&this.root.push(new de("w:useAnsiKerningPairs",e.useAnsiKerningPairs)),e.cachedColumnBalance&&this.root.push(new de("w:cachedColBalance",e.cachedColumnBalance))}}class Fb extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class Db extends q{constructor(e){var t,n,i,s,o,a,l,h;super("w:settings"),this.root.push(new Fb({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"})),this.root.push(new de("w:displayBackgroundShape",!0)),e.trackRevisions!==void 0&&this.root.push(new de("w:trackRevisions",e.trackRevisions)),e.evenAndOddHeaders!==void 0&&this.root.push(new de("w:evenAndOddHeaders",e.evenAndOddHeaders)),e.updateFields!==void 0&&this.root.push(new de("w:updateFields",e.updateFields)),e.defaultTabStop!==void 0&&this.root.push(new Ht("w:defaultTabStop",e.defaultTabStop)),((t=e.hyphenation)==null?void 0:t.autoHyphenation)!==void 0&&this.root.push(new de("w:autoHyphenation",e.hyphenation.autoHyphenation)),((n=e.hyphenation)==null?void 0:n.hyphenationZone)!==void 0&&this.root.push(new Ht("w:hyphenationZone",e.hyphenation.hyphenationZone)),((i=e.hyphenation)==null?void 0:i.consecutiveHyphenLimit)!==void 0&&this.root.push(new Ht("w:consecutiveHyphenLimit",e.hyphenation.consecutiveHyphenLimit)),((s=e.hyphenation)==null?void 0:s.doNotHyphenateCaps)!==void 0&&this.root.push(new de("w:doNotHyphenateCaps",e.hyphenation.doNotHyphenateCaps)),this.root.push(new Ob(Ce(ye({},(o=e.compatibility)!=null?o:{}),{version:(h=(l=(a=e.compatibility)==null?void 0:a.version)!=null?l:e.compatibilityModeVersion)!=null?h:15})))}}class Ch extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w:val"})}}class Bb extends q{constructor(e){super("w:name"),this.root.push(new Ch({val:e}))}}class Mb extends q{constructor(e){super("w:uiPriority"),this.root.push(new Ch({val:Me(e)}))}}class Ub extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{type:"w:type",styleId:"w:styleId",default:"w:default",customStyle:"w:customStyle"})}}class Nh extends q{constructor(e,t){super("w:style"),this.root.push(new Ub(e)),t.name&&this.root.push(new Bb(t.name)),t.basedOn&&this.root.push(new dt("w:basedOn",t.basedOn)),t.next&&this.root.push(new dt("w:next",t.next)),t.link&&this.root.push(new dt("w:link",t.link)),t.uiPriority!==void 0&&this.root.push(new Mb(t.uiPriority)),t.semiHidden!==void 0&&this.root.push(new de("w:semiHidden",t.semiHidden)),t.unhideWhenUsed!==void 0&&this.root.push(new de("w:unhideWhenUsed",t.unhideWhenUsed)),t.quickFormat!==void 0&&this.root.push(new de("w:qFormat",t.quickFormat))}}class Xt extends Nh{constructor(e){super({type:"paragraph",styleId:e.id},e),ne(this,"paragraphProperties"),ne(this,"runProperties"),this.paragraphProperties=new gt(e.paragraph),this.runProperties=new mt(e.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties)}}class Lt extends Nh{constructor(e){super({type:"character",styleId:e.id},ye({uiPriority:99,unhideWhenUsed:!0},e)),ne(this,"runProperties"),this.runProperties=new mt(e.run),this.root.push(this.runProperties)}}class xt extends Xt{constructor(e){super(ye({basedOn:"Normal",next:"Normal",quickFormat:!0},e))}}class Wb extends xt{constructor(e){super(ye({id:"Title",name:"Title"},e))}}class Hb extends xt{constructor(e){super(ye({id:"Heading1",name:"Heading 1"},e))}}class Gb extends xt{constructor(e){super(ye({id:"Heading2",name:"Heading 2"},e))}}class Vb extends xt{constructor(e){super(ye({id:"Heading3",name:"Heading 3"},e))}}class jb extends xt{constructor(e){super(ye({id:"Heading4",name:"Heading 4"},e))}}class Zb extends xt{constructor(e){super(ye({id:"Heading5",name:"Heading 5"},e))}}class zb extends xt{constructor(e){super(ye({id:"Heading6",name:"Heading 6"},e))}}class Xb extends xt{constructor(e){super(ye({id:"Strong",name:"Strong"},e))}}class Kb extends Xt{constructor(e){super(ye({id:"ListParagraph",name:"List Paragraph",basedOn:"Normal",quickFormat:!0},e))}}class Yb extends Xt{constructor(e){super(ye({id:"FootnoteText",name:"footnote text",link:"FootnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:Nt.AUTO}},run:{size:20}},e))}}class Jb extends Lt{constructor(e){super(ye({id:"FootnoteReference",name:"footnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}}class Qb extends Lt{constructor(e){super(ye({id:"FootnoteTextChar",name:"Footnote Text Char",basedOn:"DefaultParagraphFont",link:"FootnoteText",semiHidden:!0,run:{size:20}},e))}}class qb extends Xt{constructor(e){super(ye({id:"EndnoteText",name:"endnote text",link:"EndnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:Nt.AUTO}},run:{size:20}},e))}}class $b extends Lt{constructor(e){super(ye({id:"EndnoteReference",name:"endnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}}class e0 extends Lt{constructor(e){super(ye({id:"EndnoteTextChar",name:"Endnote Text Char",basedOn:"DefaultParagraphFont",link:"EndnoteText",semiHidden:!0,run:{size:20}},e))}}class t0 extends Lt{constructor(e){super(ye({id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:xs.SINGLE}}},e))}}class an extends q{constructor(e){if(super("w:styles"),e.initialStyles&&this.root.push(e.initialStyles),e.importedStyles)for(const t of e.importedStyles)this.root.push(t);if(e.paragraphStyles)for(const t of e.paragraphStyles)this.root.push(new Xt(t));if(e.characterStyles)for(const t of e.characterStyles)this.root.push(new Lt(t))}}class Ph extends q{constructor(e){super("w:pPrDefault"),this.root.push(new gt(e))}}class Lh extends q{constructor(e){super("w:rPrDefault"),this.root.push(new mt(e))}}class Oh extends q{constructor(e){super("w:docDefaults"),ne(this,"runPropertiesDefaults"),ne(this,"paragraphPropertiesDefaults"),this.runPropertiesDefaults=new Lh(e.run),this.paragraphPropertiesDefaults=new Ph(e.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}}class r0{newInstance(e){const t=jr.xml2js(e,{compact:!1});let n;for(const s of t.elements||[])s.name==="w:styles"&&(n=s);if(n===void 0)throw new Error("can not find styles element");const i=n.elements||[];return{initialStyles:new Jl(n.attributes),importedStyles:i.map(s=>Zr(s))}}}class ua{newInstance(e={}){var t;return{initialStyles:new yr(["mc","r","w","w14","w15"],"w14 w15"),importedStyles:[new Oh((t=e.document)!=null?t:{}),new Wb(ye({run:{size:56}},e.title)),new Hb(ye({run:{color:"2E74B5",size:32}},e.heading1)),new Gb(ye({run:{color:"2E74B5",size:26}},e.heading2)),new Vb(ye({run:{color:"1F4D78",size:24}},e.heading3)),new jb(ye({run:{color:"2E74B5",italics:!0}},e.heading4)),new Zb(ye({run:{color:"2E74B5"}},e.heading5)),new zb(ye({run:{color:"1F4D78"}},e.heading6)),new Xb(ye({run:{bold:!0}},e.strong)),new Kb(e.listParagraph||{}),new t0(e.hyperlink||{}),new Jb(e.footnoteReference||{}),new Yb(e.footnoteText||{}),new Qb(e.footnoteTextChar||{}),new $b(e.endnoteReference||{}),new qb(e.endnoteText||{}),new e0(e.endnoteTextChar||{})]}}}let Fh=class{constructor(e){ne(this,"currentRelationshipId",1),ne(this,"documentWrapper"),ne(this,"headers",[]),ne(this,"footers",[]),ne(this,"coreProperties"),ne(this,"numbering"),ne(this,"media"),ne(this,"fileRelationships"),ne(this,"footnotesWrapper"),ne(this,"endnotesWrapper"),ne(this,"settings"),ne(this,"contentTypes"),ne(this,"customProperties"),ne(this,"appProperties"),ne(this,"styles"),ne(this,"comments"),ne(this,"fontWrapper");var t,n,i,s,o,a,l,h,f,m,v,y,b;if(this.coreProperties=new Dy(Ce(ye({},e),{creator:(t=e.creator)!=null?t:"Un-named",revision:(n=e.revision)!=null?n:1,lastModifiedBy:(i=e.lastModifiedBy)!=null?i:"Un-named"})),this.numbering=new Ih(e.numbering?e.numbering:{config:[]}),this.comments=new oc((s=e.comments)!=null?s:{children:[]}),this.fileRelationships=new Et,this.customProperties=new Gy((o=e.customProperties)!=null?o:[]),this.appProperties=new Ly,this.footnotesWrapper=new pb,this.endnotesWrapper=new ob,this.contentTypes=new Fy,this.documentWrapper=new tb({background:e.background}),this.settings=new Db({compatibilityModeVersion:e.compatabilityModeVersion,compatibility:e.compatibility,evenAndOddHeaders:!!e.evenAndOddHeaderAndFooters,trackRevisions:(a=e.features)==null?void 0:a.trackRevisions,updateFields:(l=e.features)==null?void 0:l.updateFields,defaultTabStop:e.defaultTabStop,hyphenation:{autoHyphenation:(h=e.hyphenation)==null?void 0:h.autoHyphenation,hyphenationZone:(f=e.hyphenation)==null?void 0:f.hyphenationZone,consecutiveHyphenLimit:(m=e.hyphenation)==null?void 0:m.consecutiveHyphenLimit,doNotHyphenateCaps:(v=e.hyphenation)==null?void 0:v.doNotHyphenateCaps}}),this.media=new sa,e.externalStyles!==void 0){const _=new ua().newInstance((y=e.styles)==null?void 0:y.default),T=new r0().newInstance(e.externalStyles);this.styles=new an(Ce(ye({},T),{importedStyles:[..._.importedStyles,...T.importedStyles]}))}else if(e.styles){const _=new ua().newInstance(e.styles.default);this.styles=new an(ye(ye({},_),e.styles))}else{const g=new ua;this.styles=new an(g.newInstance())}this.addDefaultRelationships();for(const g of e.sections)this.addSection(g);if(e.footnotes)for(const g in e.footnotes)this.footnotesWrapper.View.createFootNote(parseFloat(g),e.footnotes[g].children);if(e.endnotes)for(const g in e.endnotes)this.endnotesWrapper.View.createEndnote(parseFloat(g),e.endnotes[g].children);this.fontWrapper=new Tc((b=e.fonts)!=null?b:[])}addSection({headers:e={},footers:t={},children:n,properties:i}){this.documentWrapper.View.Body.addSection(Ce(ye({},i),{headerWrapperGroup:{default:e.default?this.createHeader(e.default):void 0,first:e.first?this.createHeader(e.first):void 0,even:e.even?this.createHeader(e.even):void 0},footerWrapperGroup:{default:t.default?this.createFooter(t.default):void 0,first:t.first?this.createFooter(t.first):void 0,even:t.even?this.createFooter(t.even):void 0}}));for(const s of n)this.documentWrapper.View.add(s)}createHeader(e){const t=new Ah(this.media,this.currentRelationshipId++);for(const n of e.options.children)t.add(n);return this.addHeaderToDocument(t),t}createFooter(e){const t=new Eh(this.media,this.currentRelationshipId++);for(const n of e.options.children)t.add(n);return this.addFooterToDocument(t),t}addHeaderToDocument(e,t=Pt.DEFAULT){this.headers.push({header:e,type:t}),this.documentWrapper.Relationships.addRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",`header${this.headers.length}.xml`),this.contentTypes.addHeader(this.headers.length)}addFooterToDocument(e,t=Pt.DEFAULT){this.footers.push({footer:e,type:t}),this.documentWrapper.Relationships.addRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",`footer${this.footers.length}.xml`),this.contentTypes.addFooter(this.footers.length)}addDefaultRelationships(){this.fileRelationships.addRelationship(1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","word/document.xml"),this.fileRelationships.addRelationship(2,"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties","docProps/core.xml"),this.fileRelationships.addRelationship(3,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties","docProps/app.xml"),this.fileRelationships.addRelationship(4,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties","docProps/custom.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles","styles.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering","numbering.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes","footnotes.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes","endnotes.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings","settings.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments","comments.xml")}get Document(){return this.documentWrapper}get Styles(){return this.styles}get CoreProperties(){return this.coreProperties}get Numbering(){return this.numbering}get Media(){return this.media}get FileRelationships(){return this.fileRelationships}get Headers(){return this.headers.map(e=>e.header)}get Footers(){return this.footers.map(e=>e.footer)}get ContentTypes(){return this.contentTypes}get CustomProperties(){return this.customProperties}get AppProperties(){return this.appProperties}get FootNotes(){return this.footnotesWrapper}get Endnotes(){return this.endnotesWrapper}get Settings(){return this.settings}get Comments(){return this.comments}get FontTable(){return this.fontWrapper}};class n0 extends q{constructor(e={}){super("w:instrText"),ne(this,"properties"),this.properties=e,this.root.push(new ze({space:Ve.PRESERVE}));let t="TOC";if(this.properties.captionLabel&&(t=`${t} \\a "${this.properties.captionLabel}"`),this.properties.entriesFromBookmark&&(t=`${t} \\b "${this.properties.entriesFromBookmark}"`),this.properties.captionLabelIncludingNumbers&&(t=`${t} \\c "${this.properties.captionLabelIncludingNumbers}"`),this.properties.sequenceAndPageNumbersSeparator&&(t=`${t} \\d "${this.properties.sequenceAndPageNumbersSeparator}"`),this.properties.tcFieldIdentifier&&(t=`${t} \\f "${this.properties.tcFieldIdentifier}"`),this.properties.hyperlink&&(t=`${t} \\h`),this.properties.tcFieldLevelRange&&(t=`${t} \\l "${this.properties.tcFieldLevelRange}"`),this.properties.pageNumbersEntryLevelsRange&&(t=`${t} \\n "${this.properties.pageNumbersEntryLevelsRange}"`),this.properties.headingStyleRange&&(t=`${t} \\o "${this.properties.headingStyleRange}"`),this.properties.entryAndPageNumberSeparator&&(t=`${t} \\p "${this.properties.entryAndPageNumberSeparator}"`),this.properties.seqFieldIdentifierForPrefix&&(t=`${t} \\s "${this.properties.seqFieldIdentifierForPrefix}"`),this.properties.stylesWithLevels&&this.properties.stylesWithLevels.length){const n=this.properties.stylesWithLevels.map(i=>`${i.styleName},${i.level}`).join(",");t=`${t} \\t "${n}"`}this.properties.useAppliedParagraphOutlineLevel&&(t=`${t} \\u`),this.properties.preserveTabInEntries&&(t=`${t} \\w`),this.properties.preserveNewLineInEntries&&(t=`${t} \\x`),this.properties.hideTabAndPageNumbersInWebView&&(t=`${t} \\z`),this.root.push(t)}}class Dh extends q{constructor(){super("w:sdtContent")}}class Bh extends q{constructor(e){super("w:sdtPr"),e&&this.root.push(new dt("w:alias",e))}}class i0 extends gr{constructor(e="Table of Contents",t={}){var n=t,{contentChildren:i=[],cachedEntries:s=[],beginDirty:o=!0}=n,a=Ka(n,["contentChildren","cachedEntries","beginDirty"]);super("w:sdt"),this.root.push(new Bh(e));const l=new Dh,h=[new Be({children:[it(o),new n0(a),pt()]})],f=[new Be({children:[st()]})];if(s!==void 0&&s.length>0){const{stylesWithLevels:v}=a,y=s.map((g,_)=>{var d,T;const w=this.buildCachedContentParagraphChild(g,a),p=(T=(d=v==null?void 0:v.find(P=>P.level===g.level))==null?void 0:d.styleName)!=null?T:`TOC${g.level}`,E=_===0?[...h,w]:_===s.length-1?[w,...f]:[w];return new Je({style:p,tabStops:this.getTabStopsForLevel(g.level),children:E})});let b=y;s.length<=1&&(b=[...y,new Je({children:f})]);for(const g of b)l.addChildElement(g)}else{const v=new Je({children:h});l.addChildElement(v);for(const b of i)l.addChildElement(b);const y=new Je({children:f});l.addChildElement(y)}this.root.push(l)}getTabStopsForLevel(e,t=9025){return[{type:"clear",position:t+1-(e-1)*240},{type:"right",position:t,leader:"dot"}]}buildCachedContentRun(e,t){var n,i;return new Be({style:t!=null&&t.hyperlink&&e.href!==void 0?"IndexLink":void 0,children:[new ar({text:e.title}),new uc,new ar({text:(i=(n=e.page)==null?void 0:n.toString())!=null?i:""})]})}buildCachedContentParagraphChild(e,t){const n=this.buildCachedContentRun(e,t);return t!=null&&t.hyperlink&&e.href!==void 0?new gc({anchor:e.href,children:[n]}):n}}class s0{constructor(e,t){ne(this,"styleName"),ne(this,"level"),this.styleName=e,this.level=t}}class a0{constructor(e={children:[]}){ne(this,"options"),this.options=e}}class o0{constructor(e={children:[]}){ne(this,"options"),this.options=e}}class Mh extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id"})}}class Uh extends q{constructor(e){super("w:footnoteReference"),this.root.push(new Mh({id:e}))}}class l0 extends Be{constructor(e){super({style:"FootnoteReference"}),this.root.push(new Uh(e))}}class Wh extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id"})}}class Hh extends q{constructor(e){super("w:endnoteReference"),this.root.push(new Wh({id:e}))}}class u0 extends Be{constructor(e){super({style:"EndnoteReference"}),this.root.push(new Hh(e))}}class Gh extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w14:val",symbolfont:"w14:font"})}}class on extends q{constructor(e,t,n){super(e),n?this.root.push(new Gh({val:Ql(t),symbolfont:n})):this.root.push(new Gh({val:t}))}}class Vh extends q{constructor(e){var t,n,i,s,o,a,l,h;super("w14:checkbox"),ne(this,"DEFAULT_UNCHECKED_SYMBOL","2610"),ne(this,"DEFAULT_CHECKED_SYMBOL","2612"),ne(this,"DEFAULT_FONT","MS Gothic");const f=e!=null&&e.checked?"1":"0";let m,v;this.root.push(new on("w14:checked",f)),m=(t=e==null?void 0:e.checkedState)!=null&&t.value?(n=e==null?void 0:e.checkedState)==null?void 0:n.value:this.DEFAULT_CHECKED_SYMBOL,v=(i=e==null?void 0:e.checkedState)!=null&&i.font?(s=e==null?void 0:e.checkedState)==null?void 0:s.font:this.DEFAULT_FONT,this.root.push(new on("w14:checkedState",m,v)),m=(o=e==null?void 0:e.uncheckedState)!=null&&o.value?(a=e==null?void 0:e.uncheckedState)==null?void 0:a.value:this.DEFAULT_UNCHECKED_SYMBOL,v=(l=e==null?void 0:e.uncheckedState)!=null&&l.font?(h=e==null?void 0:e.uncheckedState)==null?void 0:h.font:this.DEFAULT_FONT,this.root.push(new on("w14:uncheckedState",m,v))}}class c0 extends q{constructor(e){var t,n,i,s;super("w:sdt"),ne(this,"DEFAULT_UNCHECKED_SYMBOL","2610"),ne(this,"DEFAULT_CHECKED_SYMBOL","2612"),ne(this,"DEFAULT_FONT","MS Gothic");const o=new Bh(e==null?void 0:e.alias);o.addChildElement(new Vh(e)),this.root.push(o);const a=new Dh,l=(t=e==null?void 0:e.checkedState)==null?void 0:t.font,h=(n=e==null?void 0:e.checkedState)==null?void 0:n.value,f=(i=e==null?void 0:e.uncheckedState)==null?void 0:i.font,m=(s=e==null?void 0:e.uncheckedState)==null?void 0:s.value;let v,y;e!=null&&e.checked?(v=l||this.DEFAULT_FONT,y=h||this.DEFAULT_CHECKED_SYMBOL):(v=f||this.DEFAULT_FONT,y=m||this.DEFAULT_UNCHECKED_SYMBOL);const b=new fu({char:y,symbolfont:v});a.addChildElement(b),this.root.push(a)}}const h0=({shape:r})=>new pe({name:"w:pict",children:[r]}),f0=({children:r=[]})=>new pe({name:"w:txbxContent",children:r}),d0=({style:r,children:e,inset:t})=>new pe({name:"v:textbox",attributes:{style:{key:"style",value:r},insetMode:{key:"insetmode",value:t?"custom":"auto"},inset:{key:"inset",value:t?`${t.left}, ${t.top}, ${t.right}, ${t.bottom}`:void 0}},children:[f0({children:e})]}),p0="#_x0000_t202",m0={flip:"flip",height:"height",left:"left",marginBottom:"margin-bottom",marginLeft:"margin-left",marginRight:"margin-right",marginTop:"margin-top",positionHorizontal:"mso-position-horizontal",positionHorizontalRelative:"mso-position-horizontal-relative",positionVertical:"mso-position-vertical",positionVerticalRelative:"mso-position-vertical-relative",wrapDistanceBottom:"mso-wrap-distance-bottom",wrapDistanceLeft:"mso-wrap-distance-left",wrapDistanceRight:"mso-wrap-distance-right",wrapDistanceTop:"mso-wrap-distance-top",wrapEdited:"mso-wrap-edited",wrapStyle:"mso-wrap-style",position:"position",rotation:"rotation",top:"top",visibility:"visibility",width:"width",zIndex:"z-index"},g0=r=>r?Object.entries(r).map(([e,t])=>`${m0[e]}:${t}`).join(";"):void 0,w0=({id:r,children:e,type:t=p0,style:n})=>new pe({name:"v:shape",attributes:{id:{key:"id",value:r},type:{key:"type",value:t},style:{key:"style",value:g0(n)}},children:[d0({style:"mso-fit-shape-to-text:t;",children:e})]});class y0 extends gr{constructor(e){var t=e,{style:n,children:i}=t,s=Ka(t,["style","children"]);super("w:p"),this.root.push(new gt(s)),this.root.push(h0({shape:w0({children:i,id:hr(),style:n})}))}}var b0=as();function ln(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ca={exports:{}},jh;function v0(){return jh||(jh=1,function(r,e){(function(t){r.exports=t()})(function(){return function t(n,i,s){function o(h,f){if(!i[h]){if(!n[h]){var m=typeof ln=="function"&&ln;if(!f&&m)return m(h,!0);if(a)return a(h,!0);var v=new Error("Cannot find module '"+h+"'");throw v.code="MODULE_NOT_FOUND",v}var y=i[h]={exports:{}};n[h][0].call(y.exports,function(b){var g=n[h][1][b];return o(g||b)},y,y.exports,t,n,i,s)}return i[h].exports}for(var a=typeof ln=="function"&&ln,l=0;l<s.length;l++)o(s[l]);return o}({1:[function(t,n,i){var s=t("./utils"),o=t("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(l){for(var h,f,m,v,y,b,g,_=[],d=0,T=l.length,w=T,p=s.getTypeOf(l)!=="string";d<l.length;)w=T-d,m=p?(h=l[d++],f=d<T?l[d++]:0,d<T?l[d++]:0):(h=l.charCodeAt(d++),f=d<T?l.charCodeAt(d++):0,d<T?l.charCodeAt(d++):0),v=h>>2,y=(3&h)<<4|f>>4,b=1<w?(15&f)<<2|m>>6:64,g=2<w?63&m:64,_.push(a.charAt(v)+a.charAt(y)+a.charAt(b)+a.charAt(g));return _.join("")},i.decode=function(l){var h,f,m,v,y,b,g=0,_=0,d="data:";if(l.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");var T,w=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&w--,l.charAt(l.length-2)===a.charAt(64)&&w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(T=o.uint8array?new Uint8Array(0|w):new Array(0|w);g<l.length;)h=a.indexOf(l.charAt(g++))<<2|(v=a.indexOf(l.charAt(g++)))>>4,f=(15&v)<<4|(y=a.indexOf(l.charAt(g++)))>>2,m=(3&y)<<6|(b=a.indexOf(l.charAt(g++))),T[_++]=h,y!==64&&(T[_++]=f),b!==64&&(T[_++]=m);return T}},{"./support":30,"./utils":32}],2:[function(t,n,i){var s=t("./external"),o=t("./stream/DataWorker"),a=t("./stream/Crc32Probe"),l=t("./stream/DataLengthProbe");function h(f,m,v,y,b){this.compressedSize=f,this.uncompressedSize=m,this.crc32=v,this.compression=y,this.compressedContent=b}h.prototype={getContentWorker:function(){var f=new o(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),m=this;return f.on("end",function(){if(this.streamInfo.data_length!==m.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),f},getCompressedWorker:function(){return new o(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},h.createWorkerFrom=function(f,m,v){return f.pipe(new a).pipe(new l("uncompressedSize")).pipe(m.compressWorker(v)).pipe(new l("compressedSize")).withStreamInfo("compression",m)},n.exports=h},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,n,i){var s=t("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},i.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,n,i){var s=t("./utils"),o=function(){for(var a,l=[],h=0;h<256;h++){a=h;for(var f=0;f<8;f++)a=1&a?3988292384^a>>>1:a>>>1;l[h]=a}return l}();n.exports=function(a,l){return a!==void 0&&a.length?s.getTypeOf(a)!=="string"?function(h,f,m,v){var y=o,b=v+m;h^=-1;for(var g=v;g<b;g++)h=h>>>8^y[255&(h^f[g])];return-1^h}(0|l,a,a.length,0):function(h,f,m,v){var y=o,b=v+m;h^=-1;for(var g=v;g<b;g++)h=h>>>8^y[255&(h^f.charCodeAt(g))];return-1^h}(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(t,n,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(t,n,i){var s=null;s=typeof Promise<"u"?Promise:t("lie"),n.exports={Promise:s}},{lie:37}],7:[function(t,n,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=t("pako"),a=t("./utils"),l=t("./stream/GenericWorker"),h=s?"uint8array":"array";function f(m,v){l.call(this,"FlateWorker/"+m),this._pako=null,this._pakoAction=m,this._pakoOptions=v,this.meta={}}i.magic="\b\0",a.inherits(f,l),f.prototype.processChunk=function(m){this.meta=m.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(h,m.data),!1)},f.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var m=this;this._pako.onData=function(v){m.push({data:v,meta:m.meta})}},i.compressWorker=function(m){return new f("Deflate",m)},i.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,n,i){function s(y,b){var g,_="";for(g=0;g<b;g++)_+=String.fromCharCode(255&y),y>>>=8;return _}function o(y,b,g,_,d,T){var w,p,E=y.file,P=y.compression,L=T!==h.utf8encode,M=a.transformTo("string",T(E.name)),C=a.transformTo("string",h.utf8encode(E.name)),z=E.comment,ue=a.transformTo("string",T(z)),N=a.transformTo("string",h.utf8encode(z)),W=C.length!==E.name.length,A=N.length!==z.length,Y="",re="",V="",se=E.dir,te=E.date,me={crc32:0,compressedSize:0,uncompressedSize:0};b&&!g||(me.crc32=y.crc32,me.compressedSize=y.compressedSize,me.uncompressedSize=y.uncompressedSize);var J=0;b&&(J|=8),L||!W&&!A||(J|=2048);var F=0,X=0;se&&(F|=16),d==="UNIX"?(X=798,F|=function(ie,K){var R=ie;return ie||(R=K?16893:33204),(65535&R)<<16}(E.unixPermissions,se)):(X=20,F|=function(ie){return 63&(ie||0)}(E.dosPermissions)),w=te.getUTCHours(),w<<=6,w|=te.getUTCMinutes(),w<<=5,w|=te.getUTCSeconds()/2,p=te.getUTCFullYear()-1980,p<<=4,p|=te.getUTCMonth()+1,p<<=5,p|=te.getUTCDate(),W&&(re=s(1,1)+s(f(M),4)+C,Y+="up"+s(re.length,2)+re),A&&(V=s(1,1)+s(f(ue),4)+N,Y+="uc"+s(V.length,2)+V);var Q="";return Q+=`
|
|
131
|
-
\0`,Q+=s(J,2),Q+=P.magic,Q+=s(w,2),Q+=s(p,2),Q+=s(me.crc32,4),Q+=s(me.compressedSize,4),Q+=s(me.uncompressedSize,4),Q+=s(M.length,2),Q+=s(Y.length,2),{fileRecord:m.LOCAL_FILE_HEADER+Q+M+Y,dirRecord:m.CENTRAL_FILE_HEADER+s(X,2)+Q+s(ue.length,2)+"\0\0\0\0"+s(F,4)+s(_,4)+M+Y+ue}}var a=t("../utils"),l=t("../stream/GenericWorker"),h=t("../utf8"),f=t("../crc32"),m=t("../signature");function v(y,b,g,_){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=b,this.zipPlatform=g,this.encodeFileName=_,this.streamFiles=y,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(v,l),v.prototype.push=function(y){var b=y.meta.percent||0,g=this.entriesCount,_=this._sources.length;this.accumulate?this.contentBuffer.push(y):(this.bytesWritten+=y.data.length,l.prototype.push.call(this,{data:y.data,meta:{currentFile:this.currentFile,percent:g?(b+100*(g-_-1))/g:100}}))},v.prototype.openedSource=function(y){this.currentSourceOffset=this.bytesWritten,this.currentFile=y.file.name;var b=this.streamFiles&&!y.file.dir;if(b){var g=o(y,b,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},v.prototype.closedSource=function(y){this.accumulate=!1;var b=this.streamFiles&&!y.file.dir,g=o(y,b,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),b)this.push({data:function(_){return m.DATA_DESCRIPTOR+s(_.crc32,4)+s(_.compressedSize,4)+s(_.uncompressedSize,4)}(y),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},v.prototype.flush=function(){for(var y=this.bytesWritten,b=0;b<this.dirRecords.length;b++)this.push({data:this.dirRecords[b],meta:{percent:100}});var g=this.bytesWritten-y,_=function(d,T,w,p,E){var P=a.transformTo("string",E(p));return m.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(d,2)+s(d,2)+s(T,4)+s(w,4)+s(P.length,2)+P}(this.dirRecords.length,g,y,this.zipComment,this.encodeFileName);this.push({data:_,meta:{percent:100}})},v.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},v.prototype.registerPrevious=function(y){this._sources.push(y);var b=this;return y.on("data",function(g){b.processChunk(g)}),y.on("end",function(){b.closedSource(b.previous.streamInfo),b._sources.length?b.prepareNextSource():b.end()}),y.on("error",function(g){b.error(g)}),this},v.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},v.prototype.error=function(y){var b=this._sources;if(!l.prototype.error.call(this,y))return!1;for(var g=0;g<b.length;g++)try{b[g].error(y)}catch{}return!0},v.prototype.lock=function(){l.prototype.lock.call(this);for(var y=this._sources,b=0;b<y.length;b++)y[b].lock()},n.exports=v},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,n,i){var s=t("../compressions"),o=t("./ZipFileWorker");i.generateWorker=function(a,l,h){var f=new o(l.streamFiles,h,l.platform,l.encodeFileName),m=0;try{a.forEach(function(v,y){m++;var b=function(T,w){var p=T||w,E=s[p];if(!E)throw new Error(p+" is not a valid compression method !");return E}(y.options.compression,l.compression),g=y.options.compressionOptions||l.compressionOptions||{},_=y.dir,d=y.date;y._compressWorker(b,g).withStreamInfo("file",{name:v,dir:_,date:d,comment:y.comment||"",unixPermissions:y.unixPermissions,dosPermissions:y.dosPermissions}).pipe(f)}),f.entriesCount=m}catch(v){f.error(v)}return f}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,n,i){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new s;for(var a in this)typeof this[a]!="function"&&(o[a]=this[a]);return o}}(s.prototype=t("./object")).loadAsync=t("./load"),s.support=t("./support"),s.defaults=t("./defaults"),s.version="3.10.1",s.loadAsync=function(o,a){return new s().loadAsync(o,a)},s.external=t("./external"),n.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,n,i){var s=t("./utils"),o=t("./external"),a=t("./utf8"),l=t("./zipEntries"),h=t("./stream/Crc32Probe"),f=t("./nodejsUtils");function m(v){return new o.Promise(function(y,b){var g=v.decompressed.getContentWorker().pipe(new h);g.on("error",function(_){b(_)}).on("end",function(){g.streamInfo.crc32!==v.decompressed.crc32?b(new Error("Corrupted zip : CRC32 mismatch")):y()}).resume()})}n.exports=function(v,y){var b=this;return y=s.extend(y||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),f.isNode&&f.isStream(v)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):s.prepareContent("the loaded zip file",v,!0,y.optimizedBinaryString,y.base64).then(function(g){var _=new l(y);return _.load(g),_}).then(function(g){var _=[o.Promise.resolve(g)],d=g.files;if(y.checkCRC32)for(var T=0;T<d.length;T++)_.push(m(d[T]));return o.Promise.all(_)}).then(function(g){for(var _=g.shift(),d=_.files,T=0;T<d.length;T++){var w=d[T],p=w.fileNameStr,E=s.resolve(w.fileNameStr);b.file(E,w.decompressed,{binary:!0,optimizedBinaryString:!0,date:w.date,dir:w.dir,comment:w.fileCommentStr.length?w.fileCommentStr:null,unixPermissions:w.unixPermissions,dosPermissions:w.dosPermissions,createFolders:y.createFolders}),w.dir||(b.file(E).unsafeOriginalName=p)}return _.zipComment.length&&(b.comment=_.zipComment),b})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,n,i){var s=t("../utils"),o=t("../stream/GenericWorker");function a(l,h){o.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(h)}s.inherits(a,o),a.prototype._bindStream=function(l){var h=this;(this._stream=l).pause(),l.on("data",function(f){h.push({data:f,meta:{percent:0}})}).on("error",function(f){h.isPaused?this.generatedError=f:h.error(f)}).on("end",function(){h.isPaused?h._upstreamEnded=!0:h.end()})},a.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,n,i){var s=t("readable-stream").Readable;function o(a,l,h){s.call(this,l),this._helper=a;var f=this;a.on("data",function(m,v){f.push(m)||f._helper.pause(),h&&h(v)}).on("error",function(m){f.emit("error",m)}).on("end",function(){f.push(null)})}t("../utils").inherits(o,s),o.prototype._read=function(){this._helper.resume()},n.exports=o},{"../utils":32,"readable-stream":16}],14:[function(t,n,i){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(s,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(s,o);if(typeof s=="number")throw new Error('The "data" argument must not be a number');return new Buffer(s,o)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var o=new Buffer(s);return o.fill(0),o},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s&&typeof s.on=="function"&&typeof s.pause=="function"&&typeof s.resume=="function"}}},{}],15:[function(t,n,i){function s(E,P,L){var M,C=a.getTypeOf(P),z=a.extend(L||{},f);z.date=z.date||new Date,z.compression!==null&&(z.compression=z.compression.toUpperCase()),typeof z.unixPermissions=="string"&&(z.unixPermissions=parseInt(z.unixPermissions,8)),z.unixPermissions&&16384&z.unixPermissions&&(z.dir=!0),z.dosPermissions&&16&z.dosPermissions&&(z.dir=!0),z.dir&&(E=d(E)),z.createFolders&&(M=_(E))&&T.call(this,M,!0);var ue=C==="string"&&z.binary===!1&&z.base64===!1;L&&L.binary!==void 0||(z.binary=!ue),(P instanceof m&&P.uncompressedSize===0||z.dir||!P||P.length===0)&&(z.base64=!1,z.binary=!0,P="",z.compression="STORE",C="string");var N=null;N=P instanceof m||P instanceof l?P:b.isNode&&b.isStream(P)?new g(E,P):a.prepareContent(E,P,z.binary,z.optimizedBinaryString,z.base64);var W=new v(E,N,z);this.files[E]=W}var o=t("./utf8"),a=t("./utils"),l=t("./stream/GenericWorker"),h=t("./stream/StreamHelper"),f=t("./defaults"),m=t("./compressedObject"),v=t("./zipObject"),y=t("./generate"),b=t("./nodejsUtils"),g=t("./nodejs/NodejsStreamInputAdapter"),_=function(E){E.slice(-1)==="/"&&(E=E.substring(0,E.length-1));var P=E.lastIndexOf("/");return 0<P?E.substring(0,P):""},d=function(E){return E.slice(-1)!=="/"&&(E+="/"),E},T=function(E,P){return P=P!==void 0?P:f.createFolders,E=d(E),this.files[E]||s.call(this,E,null,{dir:!0,createFolders:P}),this.files[E]};function w(E){return Object.prototype.toString.call(E)==="[object RegExp]"}var p={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(E){var P,L,M;for(P in this.files)M=this.files[P],(L=P.slice(this.root.length,P.length))&&P.slice(0,this.root.length)===this.root&&E(L,M)},filter:function(E){var P=[];return this.forEach(function(L,M){E(L,M)&&P.push(M)}),P},file:function(E,P,L){if(arguments.length!==1)return E=this.root+E,s.call(this,E,P,L),this;if(w(E)){var M=E;return this.filter(function(z,ue){return!ue.dir&&M.test(z)})}var C=this.files[this.root+E];return C&&!C.dir?C:null},folder:function(E){if(!E)return this;if(w(E))return this.filter(function(C,z){return z.dir&&E.test(C)});var P=this.root+E,L=T.call(this,P),M=this.clone();return M.root=L.name,M},remove:function(E){E=this.root+E;var P=this.files[E];if(P||(E.slice(-1)!=="/"&&(E+="/"),P=this.files[E]),P&&!P.dir)delete this.files[E];else for(var L=this.filter(function(C,z){return z.name.slice(0,E.length)===E}),M=0;M<L.length;M++)delete this.files[L[M].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(E){var P,L={};try{if((L=a.extend(E||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=L.type.toLowerCase(),L.compression=L.compression.toUpperCase(),L.type==="binarystring"&&(L.type="string"),!L.type)throw new Error("No output type specified.");a.checkSupport(L.type),L.platform!=="darwin"&&L.platform!=="freebsd"&&L.platform!=="linux"&&L.platform!=="sunos"||(L.platform="UNIX"),L.platform==="win32"&&(L.platform="DOS");var M=L.comment||this.comment||"";P=y.generateWorker(this,L,M)}catch(C){(P=new l("error")).error(C)}return new h(P,L.type||"string",L.mimeType)},generateAsync:function(E,P){return this.generateInternalStream(E).accumulate(P)},generateNodeStream:function(E,P){return(E=E||{}).type||(E.type="nodebuffer"),this.generateInternalStream(E).toNodejsStream(P)}};n.exports=p},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,n,i){n.exports=t("stream")},{stream:void 0}],17:[function(t,n,i){var s=t("./DataReader");function o(a){s.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}t("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data[this.zero+a]},o.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),h=a.charCodeAt(1),f=a.charCodeAt(2),m=a.charCodeAt(3),v=this.length-4;0<=v;--v)if(this.data[v]===l&&this.data[v+1]===h&&this.data[v+2]===f&&this.data[v+3]===m)return v-this.zero;return-1},o.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),h=a.charCodeAt(1),f=a.charCodeAt(2),m=a.charCodeAt(3),v=this.readData(4);return l===v[0]&&h===v[1]&&f===v[2]&&m===v[3]},o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./DataReader":18}],18:[function(t,n,i){var s=t("../utils");function o(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,h=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)h=(h<<8)+this.byteAt(l);return this.index+=a,h},readString:function(a){return s.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=o},{"../utils":32}],19:[function(t,n,i){var s=t("./Uint8ArrayReader");function o(a){s.call(this,a)}t("../utils").inherits(o,s),o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,n,i){var s=t("./DataReader");function o(a){s.call(this,a)}t("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./DataReader":18}],21:[function(t,n,i){var s=t("./ArrayReader");function o(a){s.call(this,a)}t("../utils").inherits(o,s),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(t,n,i){var s=t("../utils"),o=t("../support"),a=t("./ArrayReader"),l=t("./StringReader"),h=t("./NodeBufferReader"),f=t("./Uint8ArrayReader");n.exports=function(m){var v=s.getTypeOf(m);return s.checkSupport(v),v!=="string"||o.uint8array?v==="nodebuffer"?new h(m):o.uint8array?new f(s.transformTo("uint8array",m)):new a(s.transformTo("array",m)):new l(m)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,n,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,n,i){var s=t("./GenericWorker"),o=t("../utils");function a(l){s.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(a,s),a.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(t,n,i){var s=t("./GenericWorker"),o=t("../crc32");function a(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(a,s),a.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,n,i){var s=t("../utils"),o=t("./GenericWorker");function a(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}s.inherits(a,o),a.prototype.processChunk=function(l){if(l){var h=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=h+l.data.length}o.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(t,n,i){var s=t("../utils"),o=t("./GenericWorker");function a(l){o.call(this,"DataWorker");var h=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(f){h.dataIsReady=!0,h.data=f,h.max=f&&f.length||0,h.type=s.getTypeOf(f),h.isPaused||h._tickAndRepeat()},function(f){h.error(f)})}s.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,h=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,h);break;case"uint8array":l=this.data.subarray(this.index,h);break;case"array":case"nodebuffer":l=this.data.slice(this.index,h)}return this.index=h,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(t,n,i){function s(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var l=0;l<this._listeners[o].length;l++)this._listeners[o][l].call(this,a)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var a=this;return o.on("data",function(l){a.processChunk(l)}),o.on("end",function(){a.end()}),o.on("error",function(l){a.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,a){return this.extraStreamInfo[o]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},n.exports=s},{}],29:[function(t,n,i){var s=t("../utils"),o=t("./ConvertWorker"),a=t("./GenericWorker"),l=t("../base64"),h=t("../support"),f=t("../external"),m=null;if(h.nodestream)try{m=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function v(b,g){return new f.Promise(function(_,d){var T=[],w=b._internalType,p=b._outputType,E=b._mimeType;b.on("data",function(P,L){T.push(P),g&&g(L)}).on("error",function(P){T=[],d(P)}).on("end",function(){try{var P=function(L,M,C){switch(L){case"blob":return s.newBlob(s.transformTo("arraybuffer",M),C);case"base64":return l.encode(M);default:return s.transformTo(L,M)}}(p,function(L,M){var C,z=0,ue=null,N=0;for(C=0;C<M.length;C++)N+=M[C].length;switch(L){case"string":return M.join("");case"array":return Array.prototype.concat.apply([],M);case"uint8array":for(ue=new Uint8Array(N),C=0;C<M.length;C++)ue.set(M[C],z),z+=M[C].length;return ue;case"nodebuffer":return Buffer.concat(M);default:throw new Error("concat : unsupported type '"+L+"'")}}(w,T),E);_(P)}catch(L){d(L)}T=[]}).resume()})}function y(b,g,_){var d=g;switch(g){case"blob":case"arraybuffer":d="uint8array";break;case"base64":d="string"}try{this._internalType=d,this._outputType=g,this._mimeType=_,s.checkSupport(d),this._worker=b.pipe(new o(d)),b.lock()}catch(T){this._worker=new a("error"),this._worker.error(T)}}y.prototype={accumulate:function(b){return v(this,b)},on:function(b,g){var _=this;return b==="data"?this._worker.on(b,function(d){g.call(_,d.data,d.meta)}):this._worker.on(b,function(){s.delay(g,arguments,_)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(b){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new m(this,{objectMode:this._outputType!=="nodebuffer"},b)}},n.exports=y},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,n,i){if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",i.nodebuffer=typeof Buffer<"u",i.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")i.blob=!1;else{var s=new ArrayBuffer(0);try{i.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(s),i.blob=o.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!t("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(t,n,i){for(var s=t("./utils"),o=t("./support"),a=t("./nodejsUtils"),l=t("./stream/GenericWorker"),h=new Array(256),f=0;f<256;f++)h[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;h[254]=h[254]=1;function m(){l.call(this,"utf-8 decode"),this.leftOver=null}function v(){l.call(this,"utf-8 encode")}i.utf8encode=function(y){return o.nodebuffer?a.newBufferFrom(y,"utf-8"):function(b){var g,_,d,T,w,p=b.length,E=0;for(T=0;T<p;T++)(64512&(_=b.charCodeAt(T)))==55296&&T+1<p&&(64512&(d=b.charCodeAt(T+1)))==56320&&(_=65536+(_-55296<<10)+(d-56320),T++),E+=_<128?1:_<2048?2:_<65536?3:4;for(g=o.uint8array?new Uint8Array(E):new Array(E),T=w=0;w<E;T++)(64512&(_=b.charCodeAt(T)))==55296&&T+1<p&&(64512&(d=b.charCodeAt(T+1)))==56320&&(_=65536+(_-55296<<10)+(d-56320),T++),_<128?g[w++]=_:(_<2048?g[w++]=192|_>>>6:(_<65536?g[w++]=224|_>>>12:(g[w++]=240|_>>>18,g[w++]=128|_>>>12&63),g[w++]=128|_>>>6&63),g[w++]=128|63&_);return g}(y)},i.utf8decode=function(y){return o.nodebuffer?s.transformTo("nodebuffer",y).toString("utf-8"):function(b){var g,_,d,T,w=b.length,p=new Array(2*w);for(g=_=0;g<w;)if((d=b[g++])<128)p[_++]=d;else if(4<(T=h[d]))p[_++]=65533,g+=T-1;else{for(d&=T===2?31:T===3?15:7;1<T&&g<w;)d=d<<6|63&b[g++],T--;1<T?p[_++]=65533:d<65536?p[_++]=d:(d-=65536,p[_++]=55296|d>>10&1023,p[_++]=56320|1023&d)}return p.length!==_&&(p.subarray?p=p.subarray(0,_):p.length=_),s.applyFromCharCode(p)}(y=s.transformTo(o.uint8array?"uint8array":"array",y))},s.inherits(m,l),m.prototype.processChunk=function(y){var b=s.transformTo(o.uint8array?"uint8array":"array",y.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var g=b;(b=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),b.set(g,this.leftOver.length)}else b=this.leftOver.concat(b);this.leftOver=null}var _=function(T,w){var p;for((w=w||T.length)>T.length&&(w=T.length),p=w-1;0<=p&&(192&T[p])==128;)p--;return p<0||p===0?w:p+h[T[p]]>w?p:w}(b),d=b;_!==b.length&&(o.uint8array?(d=b.subarray(0,_),this.leftOver=b.subarray(_,b.length)):(d=b.slice(0,_),this.leftOver=b.slice(_,b.length))),this.push({data:i.utf8decode(d),meta:y.meta})},m.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=m,s.inherits(v,l),v.prototype.processChunk=function(y){this.push({data:i.utf8encode(y.data),meta:y.meta})},i.Utf8EncodeWorker=v},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,n,i){var s=t("./support"),o=t("./base64"),a=t("./nodejsUtils"),l=t("./external");function h(g){return g}function f(g,_){for(var d=0;d<g.length;++d)_[d]=255&g.charCodeAt(d);return _}t("setimmediate"),i.newBlob=function(g,_){i.checkSupport("blob");try{return new Blob([g],{type:_})}catch{try{var d=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return d.append(g),d.getBlob(_)}catch{throw new Error("Bug : can't construct the Blob.")}}};var m={stringifyByChunk:function(g,_,d){var T=[],w=0,p=g.length;if(p<=d)return String.fromCharCode.apply(null,g);for(;w<p;)_==="array"||_==="nodebuffer"?T.push(String.fromCharCode.apply(null,g.slice(w,Math.min(w+d,p)))):T.push(String.fromCharCode.apply(null,g.subarray(w,Math.min(w+d,p)))),w+=d;return T.join("")},stringifyByChar:function(g){for(var _="",d=0;d<g.length;d++)_+=String.fromCharCode(g[d]);return _},applyCanBeUsed:{uint8array:function(){try{return s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function v(g){var _=65536,d=i.getTypeOf(g),T=!0;if(d==="uint8array"?T=m.applyCanBeUsed.uint8array:d==="nodebuffer"&&(T=m.applyCanBeUsed.nodebuffer),T)for(;1<_;)try{return m.stringifyByChunk(g,d,_)}catch{_=Math.floor(_/2)}return m.stringifyByChar(g)}function y(g,_){for(var d=0;d<g.length;d++)_[d]=g[d];return _}i.applyFromCharCode=v;var b={};b.string={string:h,array:function(g){return f(g,new Array(g.length))},arraybuffer:function(g){return b.string.uint8array(g).buffer},uint8array:function(g){return f(g,new Uint8Array(g.length))},nodebuffer:function(g){return f(g,a.allocBuffer(g.length))}},b.array={string:v,array:h,arraybuffer:function(g){return new Uint8Array(g).buffer},uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return a.newBufferFrom(g)}},b.arraybuffer={string:function(g){return v(new Uint8Array(g))},array:function(g){return y(new Uint8Array(g),new Array(g.byteLength))},arraybuffer:h,uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return a.newBufferFrom(new Uint8Array(g))}},b.uint8array={string:v,array:function(g){return y(g,new Array(g.length))},arraybuffer:function(g){return g.buffer},uint8array:h,nodebuffer:function(g){return a.newBufferFrom(g)}},b.nodebuffer={string:v,array:function(g){return y(g,new Array(g.length))},arraybuffer:function(g){return b.nodebuffer.uint8array(g).buffer},uint8array:function(g){return y(g,new Uint8Array(g.length))},nodebuffer:h},i.transformTo=function(g,_){if(_=_||"",!g)return _;i.checkSupport(g);var d=i.getTypeOf(_);return b[d][g](_)},i.resolve=function(g){for(var _=g.split("/"),d=[],T=0;T<_.length;T++){var w=_[T];w==="."||w===""&&T!==0&&T!==_.length-1||(w===".."?d.pop():d.push(w))}return d.join("/")},i.getTypeOf=function(g){return typeof g=="string"?"string":Object.prototype.toString.call(g)==="[object Array]"?"array":s.nodebuffer&&a.isBuffer(g)?"nodebuffer":s.uint8array&&g instanceof Uint8Array?"uint8array":s.arraybuffer&&g instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(g){if(!s[g.toLowerCase()])throw new Error(g+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(g){var _,d,T="";for(d=0;d<(g||"").length;d++)T+="\\x"+((_=g.charCodeAt(d))<16?"0":"")+_.toString(16).toUpperCase();return T},i.delay=function(g,_,d){setImmediate(function(){g.apply(d||null,_||[])})},i.inherits=function(g,_){function d(){}d.prototype=_.prototype,g.prototype=new d},i.extend=function(){var g,_,d={};for(g=0;g<arguments.length;g++)for(_ in arguments[g])Object.prototype.hasOwnProperty.call(arguments[g],_)&&d[_]===void 0&&(d[_]=arguments[g][_]);return d},i.prepareContent=function(g,_,d,T,w){return l.Promise.resolve(_).then(function(p){return s.blob&&(p instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(p))!==-1)&&typeof FileReader<"u"?new l.Promise(function(E,P){var L=new FileReader;L.onload=function(M){E(M.target.result)},L.onerror=function(M){P(M.target.error)},L.readAsArrayBuffer(p)}):p}).then(function(p){var E=i.getTypeOf(p);return E?(E==="arraybuffer"?p=i.transformTo("uint8array",p):E==="string"&&(w?p=o.decode(p):d&&T!==!0&&(p=function(P){return f(P,s.uint8array?new Uint8Array(P.length):new Array(P.length))}(p))),p):l.Promise.reject(new Error("Can't read the data of '"+g+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,n,i){var s=t("./reader/readerFor"),o=t("./utils"),a=t("./signature"),l=t("./zipEntry"),h=t("./support");function f(m){this.files=[],this.loadOptions=m}f.prototype={checkSignature:function(m){if(!this.reader.readAndCheckSignature(m)){this.reader.index-=4;var v=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(v)+", expected "+o.pretty(m)+")")}},isSignature:function(m,v){var y=this.reader.index;this.reader.setIndex(m);var b=this.reader.readString(4)===v;return this.reader.setIndex(y),b},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var m=this.reader.readData(this.zipCommentLength),v=h.uint8array?"uint8array":"array",y=o.transformTo(v,m);this.zipComment=this.loadOptions.decodeFileName(y)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var m,v,y,b=this.zip64EndOfCentralSize-44;0<b;)m=this.reader.readInt(2),v=this.reader.readInt(4),y=this.reader.readData(v),this.zip64ExtensibleData[m]={id:m,length:v,value:y}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var m,v;for(m=0;m<this.files.length;m++)v=this.files[m],this.reader.setIndex(v.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),v.readLocalPart(this.reader),v.handleUTF8(),v.processAttributes()},readCentralDir:function(){var m;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(m=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(m);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var m=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(m<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(m);var v=m;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(m=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(m),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var y=this.centralDirOffset+this.centralDirSize;this.zip64&&(y+=20,y+=12+this.zip64EndOfCentralSize);var b=v-y;if(0<b)this.isSignature(v,a.CENTRAL_FILE_HEADER)||(this.reader.zero=b);else if(b<0)throw new Error("Corrupted zip: missing "+Math.abs(b)+" bytes.")},prepareReader:function(m){this.reader=s(m)},load:function(m){this.prepareReader(m),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=f},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,n,i){var s=t("./reader/readerFor"),o=t("./utils"),a=t("./compressedObject"),l=t("./crc32"),h=t("./utf8"),f=t("./compressions"),m=t("./support");function v(y,b){this.options=y,this.loadOptions=b}v.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(y){var b,g;if(y.skip(22),this.fileNameLength=y.readInt(2),g=y.readInt(2),this.fileName=y.readData(this.fileNameLength),y.skip(g),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((b=function(_){for(var d in f)if(Object.prototype.hasOwnProperty.call(f,d)&&f[d].magic===_)return f[d];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,b,y.readData(this.compressedSize))},readCentralPart:function(y){this.versionMadeBy=y.readInt(2),y.skip(2),this.bitFlag=y.readInt(2),this.compressionMethod=y.readString(2),this.date=y.readDate(),this.crc32=y.readInt(4),this.compressedSize=y.readInt(4),this.uncompressedSize=y.readInt(4);var b=y.readInt(2);if(this.extraFieldsLength=y.readInt(2),this.fileCommentLength=y.readInt(2),this.diskNumberStart=y.readInt(2),this.internalFileAttributes=y.readInt(2),this.externalFileAttributes=y.readInt(4),this.localHeaderOffset=y.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");y.skip(b),this.readExtraFields(y),this.parseZIP64ExtraField(y),this.fileComment=y.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var y=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),y==0&&(this.dosPermissions=63&this.externalFileAttributes),y==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var y=s(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=y.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=y.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=y.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=y.readInt(4))}},readExtraFields:function(y){var b,g,_,d=y.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});y.index+4<d;)b=y.readInt(2),g=y.readInt(2),_=y.readData(g),this.extraFields[b]={id:b,length:g,value:_};y.setIndex(d)},handleUTF8:function(){var y=m.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=h.utf8decode(this.fileName),this.fileCommentStr=h.utf8decode(this.fileComment);else{var b=this.findExtraFieldUnicodePath();if(b!==null)this.fileNameStr=b;else{var g=o.transformTo(y,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(g)}var _=this.findExtraFieldUnicodeComment();if(_!==null)this.fileCommentStr=_;else{var d=o.transformTo(y,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(d)}}},findExtraFieldUnicodePath:function(){var y=this.extraFields[28789];if(y){var b=s(y.value);return b.readInt(1)!==1||l(this.fileName)!==b.readInt(4)?null:h.utf8decode(b.readData(y.length-5))}return null},findExtraFieldUnicodeComment:function(){var y=this.extraFields[25461];if(y){var b=s(y.value);return b.readInt(1)!==1||l(this.fileComment)!==b.readInt(4)?null:h.utf8decode(b.readData(y.length-5))}return null}},n.exports=v},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,n,i){function s(b,g,_){this.name=b,this.dir=_.dir,this.date=_.date,this.comment=_.comment,this.unixPermissions=_.unixPermissions,this.dosPermissions=_.dosPermissions,this._data=g,this._dataBinary=_.binary,this.options={compression:_.compression,compressionOptions:_.compressionOptions}}var o=t("./stream/StreamHelper"),a=t("./stream/DataWorker"),l=t("./utf8"),h=t("./compressedObject"),f=t("./stream/GenericWorker");s.prototype={internalStream:function(b){var g=null,_="string";try{if(!b)throw new Error("No output type specified.");var d=(_=b.toLowerCase())==="string"||_==="text";_!=="binarystring"&&_!=="text"||(_="string"),g=this._decompressWorker();var T=!this._dataBinary;T&&!d&&(g=g.pipe(new l.Utf8EncodeWorker)),!T&&d&&(g=g.pipe(new l.Utf8DecodeWorker))}catch(w){(g=new f("error")).error(w)}return new o(g,_,"")},async:function(b,g){return this.internalStream(b).accumulate(g)},nodeStream:function(b,g){return this.internalStream(b||"nodebuffer").toNodejsStream(g)},_compressWorker:function(b,g){if(this._data instanceof h&&this._data.compression.magic===b.magic)return this._data.getCompressedWorker();var _=this._decompressWorker();return this._dataBinary||(_=_.pipe(new l.Utf8EncodeWorker)),h.createWorkerFrom(_,b,g)},_decompressWorker:function(){return this._data instanceof h?this._data.getContentWorker():this._data instanceof f?this._data:new a(this._data)}};for(var m=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],v=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},y=0;y<m.length;y++)s.prototype[m[y]]=v;n.exports=s},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,n,i){(function(s){var o,a,l=s.MutationObserver||s.WebKitMutationObserver;if(l){var h=0,f=new l(b),m=s.document.createTextNode("");f.observe(m,{characterData:!0}),o=function(){m.data=h=++h%2}}else if(s.setImmediate||s.MessageChannel===void 0)o="document"in s&&"onreadystatechange"in s.document.createElement("script")?function(){var g=s.document.createElement("script");g.onreadystatechange=function(){b(),g.onreadystatechange=null,g.parentNode.removeChild(g),g=null},s.document.documentElement.appendChild(g)}:function(){setTimeout(b,0)};else{var v=new s.MessageChannel;v.port1.onmessage=b,o=function(){v.port2.postMessage(0)}}var y=[];function b(){var g,_;a=!0;for(var d=y.length;d;){for(_=y,y=[],g=-1;++g<d;)_[g]();d=y.length}a=!1}n.exports=function(g){y.push(g)!==1||a||o()}}).call(this,typeof Ke<"u"?Ke:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(t,n,i){var s=t("immediate");function o(){}var a={},l=["REJECTED"],h=["FULFILLED"],f=["PENDING"];function m(d){if(typeof d!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,d!==o&&g(this,d)}function v(d,T,w){this.promise=d,typeof T=="function"&&(this.onFulfilled=T,this.callFulfilled=this.otherCallFulfilled),typeof w=="function"&&(this.onRejected=w,this.callRejected=this.otherCallRejected)}function y(d,T,w){s(function(){var p;try{p=T(w)}catch(E){return a.reject(d,E)}p===d?a.reject(d,new TypeError("Cannot resolve promise with itself")):a.resolve(d,p)})}function b(d){var T=d&&d.then;if(d&&(typeof d=="object"||typeof d=="function")&&typeof T=="function")return function(){T.apply(d,arguments)}}function g(d,T){var w=!1;function p(L){w||(w=!0,a.reject(d,L))}function E(L){w||(w=!0,a.resolve(d,L))}var P=_(function(){T(E,p)});P.status==="error"&&p(P.value)}function _(d,T){var w={};try{w.value=d(T),w.status="success"}catch(p){w.status="error",w.value=p}return w}(n.exports=m).prototype.finally=function(d){if(typeof d!="function")return this;var T=this.constructor;return this.then(function(w){return T.resolve(d()).then(function(){return w})},function(w){return T.resolve(d()).then(function(){throw w})})},m.prototype.catch=function(d){return this.then(null,d)},m.prototype.then=function(d,T){if(typeof d!="function"&&this.state===h||typeof T!="function"&&this.state===l)return this;var w=new this.constructor(o);return this.state!==f?y(w,this.state===h?d:T,this.outcome):this.queue.push(new v(w,d,T)),w},v.prototype.callFulfilled=function(d){a.resolve(this.promise,d)},v.prototype.otherCallFulfilled=function(d){y(this.promise,this.onFulfilled,d)},v.prototype.callRejected=function(d){a.reject(this.promise,d)},v.prototype.otherCallRejected=function(d){y(this.promise,this.onRejected,d)},a.resolve=function(d,T){var w=_(b,T);if(w.status==="error")return a.reject(d,w.value);var p=w.value;if(p)g(d,p);else{d.state=h,d.outcome=T;for(var E=-1,P=d.queue.length;++E<P;)d.queue[E].callFulfilled(T)}return d},a.reject=function(d,T){d.state=l,d.outcome=T;for(var w=-1,p=d.queue.length;++w<p;)d.queue[w].callRejected(T);return d},m.resolve=function(d){return d instanceof this?d:a.resolve(new this(o),d)},m.reject=function(d){var T=new this(o);return a.reject(T,d)},m.all=function(d){var T=this;if(Object.prototype.toString.call(d)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=d.length,p=!1;if(!w)return this.resolve([]);for(var E=new Array(w),P=0,L=-1,M=new this(o);++L<w;)C(d[L],L);return M;function C(z,ue){T.resolve(z).then(function(N){E[ue]=N,++P!==w||p||(p=!0,a.resolve(M,E))},function(N){p||(p=!0,a.reject(M,N))})}},m.race=function(d){var T=this;if(Object.prototype.toString.call(d)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=d.length,p=!1;if(!w)return this.resolve([]);for(var E=-1,P=new this(o);++E<w;)L=d[E],T.resolve(L).then(function(M){p||(p=!0,a.resolve(P,M))},function(M){p||(p=!0,a.reject(P,M))});var L;return P}},{immediate:36}],38:[function(t,n,i){var s={};(0,t("./lib/utils/common").assign)(s,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),n.exports=s},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,n,i){var s=t("./zlib/deflate"),o=t("./utils/common"),a=t("./utils/strings"),l=t("./zlib/messages"),h=t("./zlib/zstream"),f=Object.prototype.toString,m=0,v=-1,y=0,b=8;function g(d){if(!(this instanceof g))return new g(d);this.options=o.assign({level:v,method:b,chunkSize:16384,windowBits:15,memLevel:8,strategy:y,to:""},d||{});var T=this.options;T.raw&&0<T.windowBits?T.windowBits=-T.windowBits:T.gzip&&0<T.windowBits&&T.windowBits<16&&(T.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var w=s.deflateInit2(this.strm,T.level,T.method,T.windowBits,T.memLevel,T.strategy);if(w!==m)throw new Error(l[w]);if(T.header&&s.deflateSetHeader(this.strm,T.header),T.dictionary){var p;if(p=typeof T.dictionary=="string"?a.string2buf(T.dictionary):f.call(T.dictionary)==="[object ArrayBuffer]"?new Uint8Array(T.dictionary):T.dictionary,(w=s.deflateSetDictionary(this.strm,p))!==m)throw new Error(l[w]);this._dict_set=!0}}function _(d,T){var w=new g(T);if(w.push(d,!0),w.err)throw w.msg||l[w.err];return w.result}g.prototype.push=function(d,T){var w,p,E=this.strm,P=this.options.chunkSize;if(this.ended)return!1;p=T===~~T?T:T===!0?4:0,typeof d=="string"?E.input=a.string2buf(d):f.call(d)==="[object ArrayBuffer]"?E.input=new Uint8Array(d):E.input=d,E.next_in=0,E.avail_in=E.input.length;do{if(E.avail_out===0&&(E.output=new o.Buf8(P),E.next_out=0,E.avail_out=P),(w=s.deflate(E,p))!==1&&w!==m)return this.onEnd(w),!(this.ended=!0);E.avail_out!==0&&(E.avail_in!==0||p!==4&&p!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(o.shrinkBuf(E.output,E.next_out))):this.onData(o.shrinkBuf(E.output,E.next_out)))}while((0<E.avail_in||E.avail_out===0)&&w!==1);return p===4?(w=s.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===m):p!==2||(this.onEnd(m),!(E.avail_out=0))},g.prototype.onData=function(d){this.chunks.push(d)},g.prototype.onEnd=function(d){d===m&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=d,this.msg=this.strm.msg},i.Deflate=g,i.deflate=_,i.deflateRaw=function(d,T){return(T=T||{}).raw=!0,_(d,T)},i.gzip=function(d,T){return(T=T||{}).gzip=!0,_(d,T)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,n,i){var s=t("./zlib/inflate"),o=t("./utils/common"),a=t("./utils/strings"),l=t("./zlib/constants"),h=t("./zlib/messages"),f=t("./zlib/zstream"),m=t("./zlib/gzheader"),v=Object.prototype.toString;function y(g){if(!(this instanceof y))return new y(g);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},g||{});var _=this.options;_.raw&&0<=_.windowBits&&_.windowBits<16&&(_.windowBits=-_.windowBits,_.windowBits===0&&(_.windowBits=-15)),!(0<=_.windowBits&&_.windowBits<16)||g&&g.windowBits||(_.windowBits+=32),15<_.windowBits&&_.windowBits<48&&!(15&_.windowBits)&&(_.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var d=s.inflateInit2(this.strm,_.windowBits);if(d!==l.Z_OK)throw new Error(h[d]);this.header=new m,s.inflateGetHeader(this.strm,this.header)}function b(g,_){var d=new y(_);if(d.push(g,!0),d.err)throw d.msg||h[d.err];return d.result}y.prototype.push=function(g,_){var d,T,w,p,E,P,L=this.strm,M=this.options.chunkSize,C=this.options.dictionary,z=!1;if(this.ended)return!1;T=_===~~_?_:_===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof g=="string"?L.input=a.binstring2buf(g):v.call(g)==="[object ArrayBuffer]"?L.input=new Uint8Array(g):L.input=g,L.next_in=0,L.avail_in=L.input.length;do{if(L.avail_out===0&&(L.output=new o.Buf8(M),L.next_out=0,L.avail_out=M),(d=s.inflate(L,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&C&&(P=typeof C=="string"?a.string2buf(C):v.call(C)==="[object ArrayBuffer]"?new Uint8Array(C):C,d=s.inflateSetDictionary(this.strm,P)),d===l.Z_BUF_ERROR&&z===!0&&(d=l.Z_OK,z=!1),d!==l.Z_STREAM_END&&d!==l.Z_OK)return this.onEnd(d),!(this.ended=!0);L.next_out&&(L.avail_out!==0&&d!==l.Z_STREAM_END&&(L.avail_in!==0||T!==l.Z_FINISH&&T!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(w=a.utf8border(L.output,L.next_out),p=L.next_out-w,E=a.buf2string(L.output,w),L.next_out=p,L.avail_out=M-p,p&&o.arraySet(L.output,L.output,w,p,0),this.onData(E)):this.onData(o.shrinkBuf(L.output,L.next_out)))),L.avail_in===0&&L.avail_out===0&&(z=!0)}while((0<L.avail_in||L.avail_out===0)&&d!==l.Z_STREAM_END);return d===l.Z_STREAM_END&&(T=l.Z_FINISH),T===l.Z_FINISH?(d=s.inflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===l.Z_OK):T!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(L.avail_out=0))},y.prototype.onData=function(g){this.chunks.push(g)},y.prototype.onEnd=function(g){g===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},i.Inflate=y,i.inflate=b,i.inflateRaw=function(g,_){return(_=_||{}).raw=!0,b(g,_)},i.ungzip=b},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,n,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";i.assign=function(l){for(var h=Array.prototype.slice.call(arguments,1);h.length;){var f=h.shift();if(f){if(typeof f!="object")throw new TypeError(f+"must be non-object");for(var m in f)f.hasOwnProperty(m)&&(l[m]=f[m])}}return l},i.shrinkBuf=function(l,h){return l.length===h?l:l.subarray?l.subarray(0,h):(l.length=h,l)};var o={arraySet:function(l,h,f,m,v){if(h.subarray&&l.subarray)l.set(h.subarray(f,f+m),v);else for(var y=0;y<m;y++)l[v+y]=h[f+y]},flattenChunks:function(l){var h,f,m,v,y,b;for(h=m=0,f=l.length;h<f;h++)m+=l[h].length;for(b=new Uint8Array(m),h=v=0,f=l.length;h<f;h++)y=l[h],b.set(y,v),v+=y.length;return b}},a={arraySet:function(l,h,f,m,v){for(var y=0;y<m;y++)l[v+y]=h[f+y]},flattenChunks:function(l){return[].concat.apply([],l)}};i.setTyped=function(l){l?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,o)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,a))},i.setTyped(s)},{}],42:[function(t,n,i){var s=t("./common"),o=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new s.Buf8(256),h=0;h<256;h++)l[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;function f(m,v){if(v<65537&&(m.subarray&&a||!m.subarray&&o))return String.fromCharCode.apply(null,s.shrinkBuf(m,v));for(var y="",b=0;b<v;b++)y+=String.fromCharCode(m[b]);return y}l[254]=l[254]=1,i.string2buf=function(m){var v,y,b,g,_,d=m.length,T=0;for(g=0;g<d;g++)(64512&(y=m.charCodeAt(g)))==55296&&g+1<d&&(64512&(b=m.charCodeAt(g+1)))==56320&&(y=65536+(y-55296<<10)+(b-56320),g++),T+=y<128?1:y<2048?2:y<65536?3:4;for(v=new s.Buf8(T),g=_=0;_<T;g++)(64512&(y=m.charCodeAt(g)))==55296&&g+1<d&&(64512&(b=m.charCodeAt(g+1)))==56320&&(y=65536+(y-55296<<10)+(b-56320),g++),y<128?v[_++]=y:(y<2048?v[_++]=192|y>>>6:(y<65536?v[_++]=224|y>>>12:(v[_++]=240|y>>>18,v[_++]=128|y>>>12&63),v[_++]=128|y>>>6&63),v[_++]=128|63&y);return v},i.buf2binstring=function(m){return f(m,m.length)},i.binstring2buf=function(m){for(var v=new s.Buf8(m.length),y=0,b=v.length;y<b;y++)v[y]=m.charCodeAt(y);return v},i.buf2string=function(m,v){var y,b,g,_,d=v||m.length,T=new Array(2*d);for(y=b=0;y<d;)if((g=m[y++])<128)T[b++]=g;else if(4<(_=l[g]))T[b++]=65533,y+=_-1;else{for(g&=_===2?31:_===3?15:7;1<_&&y<d;)g=g<<6|63&m[y++],_--;1<_?T[b++]=65533:g<65536?T[b++]=g:(g-=65536,T[b++]=55296|g>>10&1023,T[b++]=56320|1023&g)}return f(T,b)},i.utf8border=function(m,v){var y;for((v=v||m.length)>m.length&&(v=m.length),y=v-1;0<=y&&(192&m[y])==128;)y--;return y<0||y===0?v:y+l[m[y]]>v?y:v}},{"./common":41}],43:[function(t,n,i){n.exports=function(s,o,a,l){for(var h=65535&s|0,f=s>>>16&65535|0,m=0;a!==0;){for(a-=m=2e3<a?2e3:a;f=f+(h=h+o[l++]|0)|0,--m;);h%=65521,f%=65521}return h|f<<16|0}},{}],44:[function(t,n,i){n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,n,i){var s=function(){for(var o,a=[],l=0;l<256;l++){o=l;for(var h=0;h<8;h++)o=1&o?3988292384^o>>>1:o>>>1;a[l]=o}return a}();n.exports=function(o,a,l,h){var f=s,m=h+l;o^=-1;for(var v=h;v<m;v++)o=o>>>8^f[255&(o^a[v])];return-1^o}},{}],46:[function(t,n,i){var s,o=t("../utils/common"),a=t("./trees"),l=t("./adler32"),h=t("./crc32"),f=t("./messages"),m=0,v=4,y=0,b=-2,g=-1,_=4,d=2,T=8,w=9,p=286,E=30,P=19,L=2*p+1,M=15,C=3,z=258,ue=z+C+1,N=42,W=113,A=1,Y=2,re=3,V=4;function se(S,$){return S.msg=f[$],$}function te(S){return(S<<1)-(4<S?9:0)}function me(S){for(var $=S.length;0<=--$;)S[$]=0}function J(S){var $=S.state,I=$.pending;I>S.avail_out&&(I=S.avail_out),I!==0&&(o.arraySet(S.output,$.pending_buf,$.pending_out,I,S.next_out),S.next_out+=I,$.pending_out+=I,S.total_out+=I,S.avail_out-=I,$.pending-=I,$.pending===0&&($.pending_out=0))}function F(S,$){a._tr_flush_block(S,0<=S.block_start?S.block_start:-1,S.strstart-S.block_start,$),S.block_start=S.strstart,J(S.strm)}function X(S,$){S.pending_buf[S.pending++]=$}function Q(S,$){S.pending_buf[S.pending++]=$>>>8&255,S.pending_buf[S.pending++]=255&$}function ie(S,$){var I,u,c=S.max_chain_length,x=S.strstart,B=S.prev_length,Z=S.nice_match,H=S.strstart>S.w_size-ue?S.strstart-(S.w_size-ue):0,ae=S.window,he=S.w_mask,oe=S.prev,ge=S.strstart+z,be=ae[x+B-1],_e=ae[x+B];S.prev_length>=S.good_match&&(c>>=2),Z>S.lookahead&&(Z=S.lookahead);do if(ae[(I=$)+B]===_e&&ae[I+B-1]===be&&ae[I]===ae[x]&&ae[++I]===ae[x+1]){x+=2,I++;do;while(ae[++x]===ae[++I]&&ae[++x]===ae[++I]&&ae[++x]===ae[++I]&&ae[++x]===ae[++I]&&ae[++x]===ae[++I]&&ae[++x]===ae[++I]&&ae[++x]===ae[++I]&&ae[++x]===ae[++I]&&x<ge);if(u=z-(ge-x),x=ge-z,B<u){if(S.match_start=$,Z<=(B=u))break;be=ae[x+B-1],_e=ae[x+B]}}while(($=oe[$&he])>H&&--c!=0);return B<=S.lookahead?B:S.lookahead}function K(S){var $,I,u,c,x,B,Z,H,ae,he,oe=S.w_size;do{if(c=S.window_size-S.lookahead-S.strstart,S.strstart>=oe+(oe-ue)){for(o.arraySet(S.window,S.window,oe,oe,0),S.match_start-=oe,S.strstart-=oe,S.block_start-=oe,$=I=S.hash_size;u=S.head[--$],S.head[$]=oe<=u?u-oe:0,--I;);for($=I=oe;u=S.prev[--$],S.prev[$]=oe<=u?u-oe:0,--I;);c+=oe}if(S.strm.avail_in===0)break;if(B=S.strm,Z=S.window,H=S.strstart+S.lookahead,ae=c,he=void 0,he=B.avail_in,ae<he&&(he=ae),I=he===0?0:(B.avail_in-=he,o.arraySet(Z,B.input,B.next_in,he,H),B.state.wrap===1?B.adler=l(B.adler,Z,he,H):B.state.wrap===2&&(B.adler=h(B.adler,Z,he,H)),B.next_in+=he,B.total_in+=he,he),S.lookahead+=I,S.lookahead+S.insert>=C)for(x=S.strstart-S.insert,S.ins_h=S.window[x],S.ins_h=(S.ins_h<<S.hash_shift^S.window[x+1])&S.hash_mask;S.insert&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[x+C-1])&S.hash_mask,S.prev[x&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=x,x++,S.insert--,!(S.lookahead+S.insert<C)););}while(S.lookahead<ue&&S.strm.avail_in!==0)}function R(S,$){for(var I,u;;){if(S.lookahead<ue){if(K(S),S.lookahead<ue&&$===m)return A;if(S.lookahead===0)break}if(I=0,S.lookahead>=C&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+C-1])&S.hash_mask,I=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart),I!==0&&S.strstart-I<=S.w_size-ue&&(S.match_length=ie(S,I)),S.match_length>=C)if(u=a._tr_tally(S,S.strstart-S.match_start,S.match_length-C),S.lookahead-=S.match_length,S.match_length<=S.max_lazy_match&&S.lookahead>=C){for(S.match_length--;S.strstart++,S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+C-1])&S.hash_mask,I=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart,--S.match_length!=0;);S.strstart++}else S.strstart+=S.match_length,S.match_length=0,S.ins_h=S.window[S.strstart],S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+1])&S.hash_mask;else u=a._tr_tally(S,0,S.window[S.strstart]),S.lookahead--,S.strstart++;if(u&&(F(S,!1),S.strm.avail_out===0))return A}return S.insert=S.strstart<C-1?S.strstart:C-1,$===v?(F(S,!0),S.strm.avail_out===0?re:V):S.last_lit&&(F(S,!1),S.strm.avail_out===0)?A:Y}function k(S,$){for(var I,u,c;;){if(S.lookahead<ue){if(K(S),S.lookahead<ue&&$===m)return A;if(S.lookahead===0)break}if(I=0,S.lookahead>=C&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+C-1])&S.hash_mask,I=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart),S.prev_length=S.match_length,S.prev_match=S.match_start,S.match_length=C-1,I!==0&&S.prev_length<S.max_lazy_match&&S.strstart-I<=S.w_size-ue&&(S.match_length=ie(S,I),S.match_length<=5&&(S.strategy===1||S.match_length===C&&4096<S.strstart-S.match_start)&&(S.match_length=C-1)),S.prev_length>=C&&S.match_length<=S.prev_length){for(c=S.strstart+S.lookahead-C,u=a._tr_tally(S,S.strstart-1-S.prev_match,S.prev_length-C),S.lookahead-=S.prev_length-1,S.prev_length-=2;++S.strstart<=c&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+C-1])&S.hash_mask,I=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart),--S.prev_length!=0;);if(S.match_available=0,S.match_length=C-1,S.strstart++,u&&(F(S,!1),S.strm.avail_out===0))return A}else if(S.match_available){if((u=a._tr_tally(S,0,S.window[S.strstart-1]))&&F(S,!1),S.strstart++,S.lookahead--,S.strm.avail_out===0)return A}else S.match_available=1,S.strstart++,S.lookahead--}return S.match_available&&(u=a._tr_tally(S,0,S.window[S.strstart-1]),S.match_available=0),S.insert=S.strstart<C-1?S.strstart:C-1,$===v?(F(S,!0),S.strm.avail_out===0?re:V):S.last_lit&&(F(S,!1),S.strm.avail_out===0)?A:Y}function j(S,$,I,u,c){this.good_length=S,this.max_lazy=$,this.nice_length=I,this.max_chain=u,this.func=c}function U(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=T,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*L),this.dyn_dtree=new o.Buf16(2*(2*E+1)),this.bl_tree=new o.Buf16(2*(2*P+1)),me(this.dyn_ltree),me(this.dyn_dtree),me(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(M+1),this.heap=new o.Buf16(2*p+1),me(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*p+1),me(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function O(S){var $;return S&&S.state?(S.total_in=S.total_out=0,S.data_type=d,($=S.state).pending=0,$.pending_out=0,$.wrap<0&&($.wrap=-$.wrap),$.status=$.wrap?N:W,S.adler=$.wrap===2?0:1,$.last_flush=m,a._tr_init($),y):se(S,b)}function D(S){var $=O(S);return $===y&&function(I){I.window_size=2*I.w_size,me(I.head),I.max_lazy_match=s[I.level].max_lazy,I.good_match=s[I.level].good_length,I.nice_match=s[I.level].nice_length,I.max_chain_length=s[I.level].max_chain,I.strstart=0,I.block_start=0,I.lookahead=0,I.insert=0,I.match_length=I.prev_length=C-1,I.match_available=0,I.ins_h=0}(S.state),$}function ee(S,$,I,u,c,x){if(!S)return b;var B=1;if($===g&&($=6),u<0?(B=0,u=-u):15<u&&(B=2,u-=16),c<1||w<c||I!==T||u<8||15<u||$<0||9<$||x<0||_<x)return se(S,b);u===8&&(u=9);var Z=new U;return(S.state=Z).strm=S,Z.wrap=B,Z.gzhead=null,Z.w_bits=u,Z.w_size=1<<Z.w_bits,Z.w_mask=Z.w_size-1,Z.hash_bits=c+7,Z.hash_size=1<<Z.hash_bits,Z.hash_mask=Z.hash_size-1,Z.hash_shift=~~((Z.hash_bits+C-1)/C),Z.window=new o.Buf8(2*Z.w_size),Z.head=new o.Buf16(Z.hash_size),Z.prev=new o.Buf16(Z.w_size),Z.lit_bufsize=1<<c+6,Z.pending_buf_size=4*Z.lit_bufsize,Z.pending_buf=new o.Buf8(Z.pending_buf_size),Z.d_buf=1*Z.lit_bufsize,Z.l_buf=3*Z.lit_bufsize,Z.level=$,Z.strategy=x,Z.method=I,D(S)}s=[new j(0,0,0,0,function(S,$){var I=65535;for(I>S.pending_buf_size-5&&(I=S.pending_buf_size-5);;){if(S.lookahead<=1){if(K(S),S.lookahead===0&&$===m)return A;if(S.lookahead===0)break}S.strstart+=S.lookahead,S.lookahead=0;var u=S.block_start+I;if((S.strstart===0||S.strstart>=u)&&(S.lookahead=S.strstart-u,S.strstart=u,F(S,!1),S.strm.avail_out===0)||S.strstart-S.block_start>=S.w_size-ue&&(F(S,!1),S.strm.avail_out===0))return A}return S.insert=0,$===v?(F(S,!0),S.strm.avail_out===0?re:V):(S.strstart>S.block_start&&(F(S,!1),S.strm.avail_out),A)}),new j(4,4,8,4,R),new j(4,5,16,8,R),new j(4,6,32,32,R),new j(4,4,16,16,k),new j(8,16,32,32,k),new j(8,16,128,128,k),new j(8,32,128,256,k),new j(32,128,258,1024,k),new j(32,258,258,4096,k)],i.deflateInit=function(S,$){return ee(S,$,T,15,8,0)},i.deflateInit2=ee,i.deflateReset=D,i.deflateResetKeep=O,i.deflateSetHeader=function(S,$){return S&&S.state?S.state.wrap!==2?b:(S.state.gzhead=$,y):b},i.deflate=function(S,$){var I,u,c,x;if(!S||!S.state||5<$||$<0)return S?se(S,b):b;if(u=S.state,!S.output||!S.input&&S.avail_in!==0||u.status===666&&$!==v)return se(S,S.avail_out===0?-5:b);if(u.strm=S,I=u.last_flush,u.last_flush=$,u.status===N)if(u.wrap===2)S.adler=0,X(u,31),X(u,139),X(u,8),u.gzhead?(X(u,(u.gzhead.text?1:0)+(u.gzhead.hcrc?2:0)+(u.gzhead.extra?4:0)+(u.gzhead.name?8:0)+(u.gzhead.comment?16:0)),X(u,255&u.gzhead.time),X(u,u.gzhead.time>>8&255),X(u,u.gzhead.time>>16&255),X(u,u.gzhead.time>>24&255),X(u,u.level===9?2:2<=u.strategy||u.level<2?4:0),X(u,255&u.gzhead.os),u.gzhead.extra&&u.gzhead.extra.length&&(X(u,255&u.gzhead.extra.length),X(u,u.gzhead.extra.length>>8&255)),u.gzhead.hcrc&&(S.adler=h(S.adler,u.pending_buf,u.pending,0)),u.gzindex=0,u.status=69):(X(u,0),X(u,0),X(u,0),X(u,0),X(u,0),X(u,u.level===9?2:2<=u.strategy||u.level<2?4:0),X(u,3),u.status=W);else{var B=T+(u.w_bits-8<<4)<<8;B|=(2<=u.strategy||u.level<2?0:u.level<6?1:u.level===6?2:3)<<6,u.strstart!==0&&(B|=32),B+=31-B%31,u.status=W,Q(u,B),u.strstart!==0&&(Q(u,S.adler>>>16),Q(u,65535&S.adler)),S.adler=1}if(u.status===69)if(u.gzhead.extra){for(c=u.pending;u.gzindex<(65535&u.gzhead.extra.length)&&(u.pending!==u.pending_buf_size||(u.gzhead.hcrc&&u.pending>c&&(S.adler=h(S.adler,u.pending_buf,u.pending-c,c)),J(S),c=u.pending,u.pending!==u.pending_buf_size));)X(u,255&u.gzhead.extra[u.gzindex]),u.gzindex++;u.gzhead.hcrc&&u.pending>c&&(S.adler=h(S.adler,u.pending_buf,u.pending-c,c)),u.gzindex===u.gzhead.extra.length&&(u.gzindex=0,u.status=73)}else u.status=73;if(u.status===73)if(u.gzhead.name){c=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>c&&(S.adler=h(S.adler,u.pending_buf,u.pending-c,c)),J(S),c=u.pending,u.pending===u.pending_buf_size)){x=1;break}x=u.gzindex<u.gzhead.name.length?255&u.gzhead.name.charCodeAt(u.gzindex++):0,X(u,x)}while(x!==0);u.gzhead.hcrc&&u.pending>c&&(S.adler=h(S.adler,u.pending_buf,u.pending-c,c)),x===0&&(u.gzindex=0,u.status=91)}else u.status=91;if(u.status===91)if(u.gzhead.comment){c=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>c&&(S.adler=h(S.adler,u.pending_buf,u.pending-c,c)),J(S),c=u.pending,u.pending===u.pending_buf_size)){x=1;break}x=u.gzindex<u.gzhead.comment.length?255&u.gzhead.comment.charCodeAt(u.gzindex++):0,X(u,x)}while(x!==0);u.gzhead.hcrc&&u.pending>c&&(S.adler=h(S.adler,u.pending_buf,u.pending-c,c)),x===0&&(u.status=103)}else u.status=103;if(u.status===103&&(u.gzhead.hcrc?(u.pending+2>u.pending_buf_size&&J(S),u.pending+2<=u.pending_buf_size&&(X(u,255&S.adler),X(u,S.adler>>8&255),S.adler=0,u.status=W)):u.status=W),u.pending!==0){if(J(S),S.avail_out===0)return u.last_flush=-1,y}else if(S.avail_in===0&&te($)<=te(I)&&$!==v)return se(S,-5);if(u.status===666&&S.avail_in!==0)return se(S,-5);if(S.avail_in!==0||u.lookahead!==0||$!==m&&u.status!==666){var Z=u.strategy===2?function(H,ae){for(var he;;){if(H.lookahead===0&&(K(H),H.lookahead===0)){if(ae===m)return A;break}if(H.match_length=0,he=a._tr_tally(H,0,H.window[H.strstart]),H.lookahead--,H.strstart++,he&&(F(H,!1),H.strm.avail_out===0))return A}return H.insert=0,ae===v?(F(H,!0),H.strm.avail_out===0?re:V):H.last_lit&&(F(H,!1),H.strm.avail_out===0)?A:Y}(u,$):u.strategy===3?function(H,ae){for(var he,oe,ge,be,_e=H.window;;){if(H.lookahead<=z){if(K(H),H.lookahead<=z&&ae===m)return A;if(H.lookahead===0)break}if(H.match_length=0,H.lookahead>=C&&0<H.strstart&&(oe=_e[ge=H.strstart-1])===_e[++ge]&&oe===_e[++ge]&&oe===_e[++ge]){be=H.strstart+z;do;while(oe===_e[++ge]&&oe===_e[++ge]&&oe===_e[++ge]&&oe===_e[++ge]&&oe===_e[++ge]&&oe===_e[++ge]&&oe===_e[++ge]&&oe===_e[++ge]&&ge<be);H.match_length=z-(be-ge),H.match_length>H.lookahead&&(H.match_length=H.lookahead)}if(H.match_length>=C?(he=a._tr_tally(H,1,H.match_length-C),H.lookahead-=H.match_length,H.strstart+=H.match_length,H.match_length=0):(he=a._tr_tally(H,0,H.window[H.strstart]),H.lookahead--,H.strstart++),he&&(F(H,!1),H.strm.avail_out===0))return A}return H.insert=0,ae===v?(F(H,!0),H.strm.avail_out===0?re:V):H.last_lit&&(F(H,!1),H.strm.avail_out===0)?A:Y}(u,$):s[u.level].func(u,$);if(Z!==re&&Z!==V||(u.status=666),Z===A||Z===re)return S.avail_out===0&&(u.last_flush=-1),y;if(Z===Y&&($===1?a._tr_align(u):$!==5&&(a._tr_stored_block(u,0,0,!1),$===3&&(me(u.head),u.lookahead===0&&(u.strstart=0,u.block_start=0,u.insert=0))),J(S),S.avail_out===0))return u.last_flush=-1,y}return $!==v?y:u.wrap<=0?1:(u.wrap===2?(X(u,255&S.adler),X(u,S.adler>>8&255),X(u,S.adler>>16&255),X(u,S.adler>>24&255),X(u,255&S.total_in),X(u,S.total_in>>8&255),X(u,S.total_in>>16&255),X(u,S.total_in>>24&255)):(Q(u,S.adler>>>16),Q(u,65535&S.adler)),J(S),0<u.wrap&&(u.wrap=-u.wrap),u.pending!==0?y:1)},i.deflateEnd=function(S){var $;return S&&S.state?($=S.state.status)!==N&&$!==69&&$!==73&&$!==91&&$!==103&&$!==W&&$!==666?se(S,b):(S.state=null,$===W?se(S,-3):y):b},i.deflateSetDictionary=function(S,$){var I,u,c,x,B,Z,H,ae,he=$.length;if(!S||!S.state||(x=(I=S.state).wrap)===2||x===1&&I.status!==N||I.lookahead)return b;for(x===1&&(S.adler=l(S.adler,$,he,0)),I.wrap=0,he>=I.w_size&&(x===0&&(me(I.head),I.strstart=0,I.block_start=0,I.insert=0),ae=new o.Buf8(I.w_size),o.arraySet(ae,$,he-I.w_size,I.w_size,0),$=ae,he=I.w_size),B=S.avail_in,Z=S.next_in,H=S.input,S.avail_in=he,S.next_in=0,S.input=$,K(I);I.lookahead>=C;){for(u=I.strstart,c=I.lookahead-(C-1);I.ins_h=(I.ins_h<<I.hash_shift^I.window[u+C-1])&I.hash_mask,I.prev[u&I.w_mask]=I.head[I.ins_h],I.head[I.ins_h]=u,u++,--c;);I.strstart=u,I.lookahead=C-1,K(I)}return I.strstart+=I.lookahead,I.block_start=I.strstart,I.insert=I.lookahead,I.lookahead=0,I.match_length=I.prev_length=C-1,I.match_available=0,S.next_in=Z,S.input=H,S.avail_in=B,I.wrap=x,y},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,n,i){n.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,n,i){n.exports=function(s,o){var a,l,h,f,m,v,y,b,g,_,d,T,w,p,E,P,L,M,C,z,ue,N,W,A,Y;a=s.state,l=s.next_in,A=s.input,h=l+(s.avail_in-5),f=s.next_out,Y=s.output,m=f-(o-s.avail_out),v=f+(s.avail_out-257),y=a.dmax,b=a.wsize,g=a.whave,_=a.wnext,d=a.window,T=a.hold,w=a.bits,p=a.lencode,E=a.distcode,P=(1<<a.lenbits)-1,L=(1<<a.distbits)-1;e:do{w<15&&(T+=A[l++]<<w,w+=8,T+=A[l++]<<w,w+=8),M=p[T&P];t:for(;;){if(T>>>=C=M>>>24,w-=C,(C=M>>>16&255)===0)Y[f++]=65535&M;else{if(!(16&C)){if(!(64&C)){M=p[(65535&M)+(T&(1<<C)-1)];continue t}if(32&C){a.mode=12;break e}s.msg="invalid literal/length code",a.mode=30;break e}z=65535&M,(C&=15)&&(w<C&&(T+=A[l++]<<w,w+=8),z+=T&(1<<C)-1,T>>>=C,w-=C),w<15&&(T+=A[l++]<<w,w+=8,T+=A[l++]<<w,w+=8),M=E[T&L];r:for(;;){if(T>>>=C=M>>>24,w-=C,!(16&(C=M>>>16&255))){if(!(64&C)){M=E[(65535&M)+(T&(1<<C)-1)];continue r}s.msg="invalid distance code",a.mode=30;break e}if(ue=65535&M,w<(C&=15)&&(T+=A[l++]<<w,(w+=8)<C&&(T+=A[l++]<<w,w+=8)),y<(ue+=T&(1<<C)-1)){s.msg="invalid distance too far back",a.mode=30;break e}if(T>>>=C,w-=C,(C=f-m)<ue){if(g<(C=ue-C)&&a.sane){s.msg="invalid distance too far back",a.mode=30;break e}if(W=d,(N=0)===_){if(N+=b-C,C<z){for(z-=C;Y[f++]=d[N++],--C;);N=f-ue,W=Y}}else if(_<C){if(N+=b+_-C,(C-=_)<z){for(z-=C;Y[f++]=d[N++],--C;);if(N=0,_<z){for(z-=C=_;Y[f++]=d[N++],--C;);N=f-ue,W=Y}}}else if(N+=_-C,C<z){for(z-=C;Y[f++]=d[N++],--C;);N=f-ue,W=Y}for(;2<z;)Y[f++]=W[N++],Y[f++]=W[N++],Y[f++]=W[N++],z-=3;z&&(Y[f++]=W[N++],1<z&&(Y[f++]=W[N++]))}else{for(N=f-ue;Y[f++]=Y[N++],Y[f++]=Y[N++],Y[f++]=Y[N++],2<(z-=3););z&&(Y[f++]=Y[N++],1<z&&(Y[f++]=Y[N++]))}break}}break}}while(l<h&&f<v);l-=z=w>>3,T&=(1<<(w-=z<<3))-1,s.next_in=l,s.next_out=f,s.avail_in=l<h?h-l+5:5-(l-h),s.avail_out=f<v?v-f+257:257-(f-v),a.hold=T,a.bits=w}},{}],49:[function(t,n,i){var s=t("../utils/common"),o=t("./adler32"),a=t("./crc32"),l=t("./inffast"),h=t("./inftrees"),f=1,m=2,v=0,y=-2,b=1,g=852,_=592;function d(N){return(N>>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<24)}function T(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(N){var W;return N&&N.state?(W=N.state,N.total_in=N.total_out=W.total=0,N.msg="",W.wrap&&(N.adler=1&W.wrap),W.mode=b,W.last=0,W.havedict=0,W.dmax=32768,W.head=null,W.hold=0,W.bits=0,W.lencode=W.lendyn=new s.Buf32(g),W.distcode=W.distdyn=new s.Buf32(_),W.sane=1,W.back=-1,v):y}function p(N){var W;return N&&N.state?((W=N.state).wsize=0,W.whave=0,W.wnext=0,w(N)):y}function E(N,W){var A,Y;return N&&N.state?(Y=N.state,W<0?(A=0,W=-W):(A=1+(W>>4),W<48&&(W&=15)),W&&(W<8||15<W)?y:(Y.window!==null&&Y.wbits!==W&&(Y.window=null),Y.wrap=A,Y.wbits=W,p(N))):y}function P(N,W){var A,Y;return N?(Y=new T,(N.state=Y).window=null,(A=E(N,W))!==v&&(N.state=null),A):y}var L,M,C=!0;function z(N){if(C){var W;for(L=new s.Buf32(512),M=new s.Buf32(32),W=0;W<144;)N.lens[W++]=8;for(;W<256;)N.lens[W++]=9;for(;W<280;)N.lens[W++]=7;for(;W<288;)N.lens[W++]=8;for(h(f,N.lens,0,288,L,0,N.work,{bits:9}),W=0;W<32;)N.lens[W++]=5;h(m,N.lens,0,32,M,0,N.work,{bits:5}),C=!1}N.lencode=L,N.lenbits=9,N.distcode=M,N.distbits=5}function ue(N,W,A,Y){var re,V=N.state;return V.window===null&&(V.wsize=1<<V.wbits,V.wnext=0,V.whave=0,V.window=new s.Buf8(V.wsize)),Y>=V.wsize?(s.arraySet(V.window,W,A-V.wsize,V.wsize,0),V.wnext=0,V.whave=V.wsize):(Y<(re=V.wsize-V.wnext)&&(re=Y),s.arraySet(V.window,W,A-Y,re,V.wnext),(Y-=re)?(s.arraySet(V.window,W,A-Y,Y,0),V.wnext=Y,V.whave=V.wsize):(V.wnext+=re,V.wnext===V.wsize&&(V.wnext=0),V.whave<V.wsize&&(V.whave+=re))),0}i.inflateReset=p,i.inflateReset2=E,i.inflateResetKeep=w,i.inflateInit=function(N){return P(N,15)},i.inflateInit2=P,i.inflate=function(N,W){var A,Y,re,V,se,te,me,J,F,X,Q,ie,K,R,k,j,U,O,D,ee,S,$,I,u,c=0,x=new s.Buf8(4),B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!N||!N.state||!N.output||!N.input&&N.avail_in!==0)return y;(A=N.state).mode===12&&(A.mode=13),se=N.next_out,re=N.output,me=N.avail_out,V=N.next_in,Y=N.input,te=N.avail_in,J=A.hold,F=A.bits,X=te,Q=me,$=v;e:for(;;)switch(A.mode){case b:if(A.wrap===0){A.mode=13;break}for(;F<16;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}if(2&A.wrap&&J===35615){x[A.check=0]=255&J,x[1]=J>>>8&255,A.check=a(A.check,x,2,0),F=J=0,A.mode=2;break}if(A.flags=0,A.head&&(A.head.done=!1),!(1&A.wrap)||(((255&J)<<8)+(J>>8))%31){N.msg="incorrect header check",A.mode=30;break}if((15&J)!=8){N.msg="unknown compression method",A.mode=30;break}if(F-=4,S=8+(15&(J>>>=4)),A.wbits===0)A.wbits=S;else if(S>A.wbits){N.msg="invalid window size",A.mode=30;break}A.dmax=1<<S,N.adler=A.check=1,A.mode=512&J?10:12,F=J=0;break;case 2:for(;F<16;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}if(A.flags=J,(255&A.flags)!=8){N.msg="unknown compression method",A.mode=30;break}if(57344&A.flags){N.msg="unknown header flags set",A.mode=30;break}A.head&&(A.head.text=J>>8&1),512&A.flags&&(x[0]=255&J,x[1]=J>>>8&255,A.check=a(A.check,x,2,0)),F=J=0,A.mode=3;case 3:for(;F<32;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}A.head&&(A.head.time=J),512&A.flags&&(x[0]=255&J,x[1]=J>>>8&255,x[2]=J>>>16&255,x[3]=J>>>24&255,A.check=a(A.check,x,4,0)),F=J=0,A.mode=4;case 4:for(;F<16;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}A.head&&(A.head.xflags=255&J,A.head.os=J>>8),512&A.flags&&(x[0]=255&J,x[1]=J>>>8&255,A.check=a(A.check,x,2,0)),F=J=0,A.mode=5;case 5:if(1024&A.flags){for(;F<16;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}A.length=J,A.head&&(A.head.extra_len=J),512&A.flags&&(x[0]=255&J,x[1]=J>>>8&255,A.check=a(A.check,x,2,0)),F=J=0}else A.head&&(A.head.extra=null);A.mode=6;case 6:if(1024&A.flags&&(te<(ie=A.length)&&(ie=te),ie&&(A.head&&(S=A.head.extra_len-A.length,A.head.extra||(A.head.extra=new Array(A.head.extra_len)),s.arraySet(A.head.extra,Y,V,ie,S)),512&A.flags&&(A.check=a(A.check,Y,ie,V)),te-=ie,V+=ie,A.length-=ie),A.length))break e;A.length=0,A.mode=7;case 7:if(2048&A.flags){if(te===0)break e;for(ie=0;S=Y[V+ie++],A.head&&S&&A.length<65536&&(A.head.name+=String.fromCharCode(S)),S&&ie<te;);if(512&A.flags&&(A.check=a(A.check,Y,ie,V)),te-=ie,V+=ie,S)break e}else A.head&&(A.head.name=null);A.length=0,A.mode=8;case 8:if(4096&A.flags){if(te===0)break e;for(ie=0;S=Y[V+ie++],A.head&&S&&A.length<65536&&(A.head.comment+=String.fromCharCode(S)),S&&ie<te;);if(512&A.flags&&(A.check=a(A.check,Y,ie,V)),te-=ie,V+=ie,S)break e}else A.head&&(A.head.comment=null);A.mode=9;case 9:if(512&A.flags){for(;F<16;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}if(J!==(65535&A.check)){N.msg="header crc mismatch",A.mode=30;break}F=J=0}A.head&&(A.head.hcrc=A.flags>>9&1,A.head.done=!0),N.adler=A.check=0,A.mode=12;break;case 10:for(;F<32;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}N.adler=A.check=d(J),F=J=0,A.mode=11;case 11:if(A.havedict===0)return N.next_out=se,N.avail_out=me,N.next_in=V,N.avail_in=te,A.hold=J,A.bits=F,2;N.adler=A.check=1,A.mode=12;case 12:if(W===5||W===6)break e;case 13:if(A.last){J>>>=7&F,F-=7&F,A.mode=27;break}for(;F<3;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}switch(A.last=1&J,F-=1,3&(J>>>=1)){case 0:A.mode=14;break;case 1:if(z(A),A.mode=20,W!==6)break;J>>>=2,F-=2;break e;case 2:A.mode=17;break;case 3:N.msg="invalid block type",A.mode=30}J>>>=2,F-=2;break;case 14:for(J>>>=7&F,F-=7&F;F<32;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}if((65535&J)!=(J>>>16^65535)){N.msg="invalid stored block lengths",A.mode=30;break}if(A.length=65535&J,F=J=0,A.mode=15,W===6)break e;case 15:A.mode=16;case 16:if(ie=A.length){if(te<ie&&(ie=te),me<ie&&(ie=me),ie===0)break e;s.arraySet(re,Y,V,ie,se),te-=ie,V+=ie,me-=ie,se+=ie,A.length-=ie;break}A.mode=12;break;case 17:for(;F<14;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}if(A.nlen=257+(31&J),J>>>=5,F-=5,A.ndist=1+(31&J),J>>>=5,F-=5,A.ncode=4+(15&J),J>>>=4,F-=4,286<A.nlen||30<A.ndist){N.msg="too many length or distance symbols",A.mode=30;break}A.have=0,A.mode=18;case 18:for(;A.have<A.ncode;){for(;F<3;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}A.lens[B[A.have++]]=7&J,J>>>=3,F-=3}for(;A.have<19;)A.lens[B[A.have++]]=0;if(A.lencode=A.lendyn,A.lenbits=7,I={bits:A.lenbits},$=h(0,A.lens,0,19,A.lencode,0,A.work,I),A.lenbits=I.bits,$){N.msg="invalid code lengths set",A.mode=30;break}A.have=0,A.mode=19;case 19:for(;A.have<A.nlen+A.ndist;){for(;j=(c=A.lencode[J&(1<<A.lenbits)-1])>>>16&255,U=65535&c,!((k=c>>>24)<=F);){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}if(U<16)J>>>=k,F-=k,A.lens[A.have++]=U;else{if(U===16){for(u=k+2;F<u;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}if(J>>>=k,F-=k,A.have===0){N.msg="invalid bit length repeat",A.mode=30;break}S=A.lens[A.have-1],ie=3+(3&J),J>>>=2,F-=2}else if(U===17){for(u=k+3;F<u;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}F-=k,S=0,ie=3+(7&(J>>>=k)),J>>>=3,F-=3}else{for(u=k+7;F<u;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}F-=k,S=0,ie=11+(127&(J>>>=k)),J>>>=7,F-=7}if(A.have+ie>A.nlen+A.ndist){N.msg="invalid bit length repeat",A.mode=30;break}for(;ie--;)A.lens[A.have++]=S}}if(A.mode===30)break;if(A.lens[256]===0){N.msg="invalid code -- missing end-of-block",A.mode=30;break}if(A.lenbits=9,I={bits:A.lenbits},$=h(f,A.lens,0,A.nlen,A.lencode,0,A.work,I),A.lenbits=I.bits,$){N.msg="invalid literal/lengths set",A.mode=30;break}if(A.distbits=6,A.distcode=A.distdyn,I={bits:A.distbits},$=h(m,A.lens,A.nlen,A.ndist,A.distcode,0,A.work,I),A.distbits=I.bits,$){N.msg="invalid distances set",A.mode=30;break}if(A.mode=20,W===6)break e;case 20:A.mode=21;case 21:if(6<=te&&258<=me){N.next_out=se,N.avail_out=me,N.next_in=V,N.avail_in=te,A.hold=J,A.bits=F,l(N,Q),se=N.next_out,re=N.output,me=N.avail_out,V=N.next_in,Y=N.input,te=N.avail_in,J=A.hold,F=A.bits,A.mode===12&&(A.back=-1);break}for(A.back=0;j=(c=A.lencode[J&(1<<A.lenbits)-1])>>>16&255,U=65535&c,!((k=c>>>24)<=F);){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}if(j&&!(240&j)){for(O=k,D=j,ee=U;j=(c=A.lencode[ee+((J&(1<<O+D)-1)>>O)])>>>16&255,U=65535&c,!(O+(k=c>>>24)<=F);){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}J>>>=O,F-=O,A.back+=O}if(J>>>=k,F-=k,A.back+=k,A.length=U,j===0){A.mode=26;break}if(32&j){A.back=-1,A.mode=12;break}if(64&j){N.msg="invalid literal/length code",A.mode=30;break}A.extra=15&j,A.mode=22;case 22:if(A.extra){for(u=A.extra;F<u;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}A.length+=J&(1<<A.extra)-1,J>>>=A.extra,F-=A.extra,A.back+=A.extra}A.was=A.length,A.mode=23;case 23:for(;j=(c=A.distcode[J&(1<<A.distbits)-1])>>>16&255,U=65535&c,!((k=c>>>24)<=F);){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}if(!(240&j)){for(O=k,D=j,ee=U;j=(c=A.distcode[ee+((J&(1<<O+D)-1)>>O)])>>>16&255,U=65535&c,!(O+(k=c>>>24)<=F);){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}J>>>=O,F-=O,A.back+=O}if(J>>>=k,F-=k,A.back+=k,64&j){N.msg="invalid distance code",A.mode=30;break}A.offset=U,A.extra=15&j,A.mode=24;case 24:if(A.extra){for(u=A.extra;F<u;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}A.offset+=J&(1<<A.extra)-1,J>>>=A.extra,F-=A.extra,A.back+=A.extra}if(A.offset>A.dmax){N.msg="invalid distance too far back",A.mode=30;break}A.mode=25;case 25:if(me===0)break e;if(ie=Q-me,A.offset>ie){if((ie=A.offset-ie)>A.whave&&A.sane){N.msg="invalid distance too far back",A.mode=30;break}K=ie>A.wnext?(ie-=A.wnext,A.wsize-ie):A.wnext-ie,ie>A.length&&(ie=A.length),R=A.window}else R=re,K=se-A.offset,ie=A.length;for(me<ie&&(ie=me),me-=ie,A.length-=ie;re[se++]=R[K++],--ie;);A.length===0&&(A.mode=21);break;case 26:if(me===0)break e;re[se++]=A.length,me--,A.mode=21;break;case 27:if(A.wrap){for(;F<32;){if(te===0)break e;te--,J|=Y[V++]<<F,F+=8}if(Q-=me,N.total_out+=Q,A.total+=Q,Q&&(N.adler=A.check=A.flags?a(A.check,re,Q,se-Q):o(A.check,re,Q,se-Q)),Q=me,(A.flags?J:d(J))!==A.check){N.msg="incorrect data check",A.mode=30;break}F=J=0}A.mode=28;case 28:if(A.wrap&&A.flags){for(;F<32;){if(te===0)break e;te--,J+=Y[V++]<<F,F+=8}if(J!==(4294967295&A.total)){N.msg="incorrect length check",A.mode=30;break}F=J=0}A.mode=29;case 29:$=1;break e;case 30:$=-3;break e;case 31:return-4;case 32:default:return y}return N.next_out=se,N.avail_out=me,N.next_in=V,N.avail_in=te,A.hold=J,A.bits=F,(A.wsize||Q!==N.avail_out&&A.mode<30&&(A.mode<27||W!==4))&&ue(N,N.output,N.next_out,Q-N.avail_out)?(A.mode=31,-4):(X-=N.avail_in,Q-=N.avail_out,N.total_in+=X,N.total_out+=Q,A.total+=Q,A.wrap&&Q&&(N.adler=A.check=A.flags?a(A.check,re,Q,N.next_out-Q):o(A.check,re,Q,N.next_out-Q)),N.data_type=A.bits+(A.last?64:0)+(A.mode===12?128:0)+(A.mode===20||A.mode===15?256:0),(X==0&&Q===0||W===4)&&$===v&&($=-5),$)},i.inflateEnd=function(N){if(!N||!N.state)return y;var W=N.state;return W.window&&(W.window=null),N.state=null,v},i.inflateGetHeader=function(N,W){var A;return N&&N.state&&2&(A=N.state).wrap?((A.head=W).done=!1,v):y},i.inflateSetDictionary=function(N,W){var A,Y=W.length;return N&&N.state?(A=N.state).wrap!==0&&A.mode!==11?y:A.mode===11&&o(1,W,Y,0)!==A.check?-3:ue(N,W,Y,Y)?(A.mode=31,-4):(A.havedict=1,v):y},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,n,i){var s=t("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],h=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];n.exports=function(f,m,v,y,b,g,_,d){var T,w,p,E,P,L,M,C,z,ue=d.bits,N=0,W=0,A=0,Y=0,re=0,V=0,se=0,te=0,me=0,J=0,F=null,X=0,Q=new s.Buf16(16),ie=new s.Buf16(16),K=null,R=0;for(N=0;N<=15;N++)Q[N]=0;for(W=0;W<y;W++)Q[m[v+W]]++;for(re=ue,Y=15;1<=Y&&Q[Y]===0;Y--);if(Y<re&&(re=Y),Y===0)return b[g++]=20971520,b[g++]=20971520,d.bits=1,0;for(A=1;A<Y&&Q[A]===0;A++);for(re<A&&(re=A),N=te=1;N<=15;N++)if(te<<=1,(te-=Q[N])<0)return-1;if(0<te&&(f===0||Y!==1))return-1;for(ie[1]=0,N=1;N<15;N++)ie[N+1]=ie[N]+Q[N];for(W=0;W<y;W++)m[v+W]!==0&&(_[ie[m[v+W]]++]=W);if(L=f===0?(F=K=_,19):f===1?(F=o,X-=257,K=a,R-=257,256):(F=l,K=h,-1),N=A,P=g,se=W=J=0,p=-1,E=(me=1<<(V=re))-1,f===1&&852<me||f===2&&592<me)return 1;for(;;){for(M=N-se,z=_[W]<L?(C=0,_[W]):_[W]>L?(C=K[R+_[W]],F[X+_[W]]):(C=96,0),T=1<<N-se,A=w=1<<V;b[P+(J>>se)+(w-=T)]=M<<24|C<<16|z|0,w!==0;);for(T=1<<N-1;J&T;)T>>=1;if(T!==0?(J&=T-1,J+=T):J=0,W++,--Q[N]==0){if(N===Y)break;N=m[v+_[W]]}if(re<N&&(J&E)!==p){for(se===0&&(se=re),P+=A,te=1<<(V=N-se);V+se<Y&&!((te-=Q[V+se])<=0);)V++,te<<=1;if(me+=1<<V,f===1&&852<me||f===2&&592<me)return 1;b[p=J&E]=re<<24|V<<16|P-g|0}}return J!==0&&(b[P+J]=N-se<<24|64<<16|0),d.bits=re,0}},{"../utils/common":41}],51:[function(t,n,i){n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,n,i){var s=t("../utils/common"),o=0,a=1;function l(c){for(var x=c.length;0<=--x;)c[x]=0}var h=0,f=29,m=256,v=m+1+f,y=30,b=19,g=2*v+1,_=15,d=16,T=7,w=256,p=16,E=17,P=18,L=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],M=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ue=new Array(2*(v+2));l(ue);var N=new Array(2*y);l(N);var W=new Array(512);l(W);var A=new Array(256);l(A);var Y=new Array(f);l(Y);var re,V,se,te=new Array(y);function me(c,x,B,Z,H){this.static_tree=c,this.extra_bits=x,this.extra_base=B,this.elems=Z,this.max_length=H,this.has_stree=c&&c.length}function J(c,x){this.dyn_tree=c,this.max_code=0,this.stat_desc=x}function F(c){return c<256?W[c]:W[256+(c>>>7)]}function X(c,x){c.pending_buf[c.pending++]=255&x,c.pending_buf[c.pending++]=x>>>8&255}function Q(c,x,B){c.bi_valid>d-B?(c.bi_buf|=x<<c.bi_valid&65535,X(c,c.bi_buf),c.bi_buf=x>>d-c.bi_valid,c.bi_valid+=B-d):(c.bi_buf|=x<<c.bi_valid&65535,c.bi_valid+=B)}function ie(c,x,B){Q(c,B[2*x],B[2*x+1])}function K(c,x){for(var B=0;B|=1&c,c>>>=1,B<<=1,0<--x;);return B>>>1}function R(c,x,B){var Z,H,ae=new Array(_+1),he=0;for(Z=1;Z<=_;Z++)ae[Z]=he=he+B[Z-1]<<1;for(H=0;H<=x;H++){var oe=c[2*H+1];oe!==0&&(c[2*H]=K(ae[oe]++,oe))}}function k(c){var x;for(x=0;x<v;x++)c.dyn_ltree[2*x]=0;for(x=0;x<y;x++)c.dyn_dtree[2*x]=0;for(x=0;x<b;x++)c.bl_tree[2*x]=0;c.dyn_ltree[2*w]=1,c.opt_len=c.static_len=0,c.last_lit=c.matches=0}function j(c){8<c.bi_valid?X(c,c.bi_buf):0<c.bi_valid&&(c.pending_buf[c.pending++]=c.bi_buf),c.bi_buf=0,c.bi_valid=0}function U(c,x,B,Z){var H=2*x,ae=2*B;return c[H]<c[ae]||c[H]===c[ae]&&Z[x]<=Z[B]}function O(c,x,B){for(var Z=c.heap[B],H=B<<1;H<=c.heap_len&&(H<c.heap_len&&U(x,c.heap[H+1],c.heap[H],c.depth)&&H++,!U(x,Z,c.heap[H],c.depth));)c.heap[B]=c.heap[H],B=H,H<<=1;c.heap[B]=Z}function D(c,x,B){var Z,H,ae,he,oe=0;if(c.last_lit!==0)for(;Z=c.pending_buf[c.d_buf+2*oe]<<8|c.pending_buf[c.d_buf+2*oe+1],H=c.pending_buf[c.l_buf+oe],oe++,Z===0?ie(c,H,x):(ie(c,(ae=A[H])+m+1,x),(he=L[ae])!==0&&Q(c,H-=Y[ae],he),ie(c,ae=F(--Z),B),(he=M[ae])!==0&&Q(c,Z-=te[ae],he)),oe<c.last_lit;);ie(c,w,x)}function ee(c,x){var B,Z,H,ae=x.dyn_tree,he=x.stat_desc.static_tree,oe=x.stat_desc.has_stree,ge=x.stat_desc.elems,be=-1;for(c.heap_len=0,c.heap_max=g,B=0;B<ge;B++)ae[2*B]!==0?(c.heap[++c.heap_len]=be=B,c.depth[B]=0):ae[2*B+1]=0;for(;c.heap_len<2;)ae[2*(H=c.heap[++c.heap_len]=be<2?++be:0)]=1,c.depth[H]=0,c.opt_len--,oe&&(c.static_len-=he[2*H+1]);for(x.max_code=be,B=c.heap_len>>1;1<=B;B--)O(c,ae,B);for(H=ge;B=c.heap[1],c.heap[1]=c.heap[c.heap_len--],O(c,ae,1),Z=c.heap[1],c.heap[--c.heap_max]=B,c.heap[--c.heap_max]=Z,ae[2*H]=ae[2*B]+ae[2*Z],c.depth[H]=(c.depth[B]>=c.depth[Z]?c.depth[B]:c.depth[Z])+1,ae[2*B+1]=ae[2*Z+1]=H,c.heap[1]=H++,O(c,ae,1),2<=c.heap_len;);c.heap[--c.heap_max]=c.heap[1],function(_e,Ge){var At,ut,Tr,Le,cn,ya,yt=Ge.dyn_tree,lf=Ge.max_code,Q0=Ge.stat_desc.static_tree,q0=Ge.stat_desc.has_stree,$0=Ge.stat_desc.extra_bits,uf=Ge.stat_desc.extra_base,Er=Ge.stat_desc.max_length,hn=0;for(Le=0;Le<=_;Le++)_e.bl_count[Le]=0;for(yt[2*_e.heap[_e.heap_max]+1]=0,At=_e.heap_max+1;At<g;At++)Er<(Le=yt[2*yt[2*(ut=_e.heap[At])+1]+1]+1)&&(Le=Er,hn++),yt[2*ut+1]=Le,lf<ut||(_e.bl_count[Le]++,cn=0,uf<=ut&&(cn=$0[ut-uf]),ya=yt[2*ut],_e.opt_len+=ya*(Le+cn),q0&&(_e.static_len+=ya*(Q0[2*ut+1]+cn)));if(hn!==0){do{for(Le=Er-1;_e.bl_count[Le]===0;)Le--;_e.bl_count[Le]--,_e.bl_count[Le+1]+=2,_e.bl_count[Er]--,hn-=2}while(0<hn);for(Le=Er;Le!==0;Le--)for(ut=_e.bl_count[Le];ut!==0;)lf<(Tr=_e.heap[--At])||(yt[2*Tr+1]!==Le&&(_e.opt_len+=(Le-yt[2*Tr+1])*yt[2*Tr],yt[2*Tr+1]=Le),ut--)}}(c,x),R(ae,be,c.bl_count)}function S(c,x,B){var Z,H,ae=-1,he=x[1],oe=0,ge=7,be=4;for(he===0&&(ge=138,be=3),x[2*(B+1)+1]=65535,Z=0;Z<=B;Z++)H=he,he=x[2*(Z+1)+1],++oe<ge&&H===he||(oe<be?c.bl_tree[2*H]+=oe:H!==0?(H!==ae&&c.bl_tree[2*H]++,c.bl_tree[2*p]++):oe<=10?c.bl_tree[2*E]++:c.bl_tree[2*P]++,ae=H,be=(oe=0)===he?(ge=138,3):H===he?(ge=6,3):(ge=7,4))}function $(c,x,B){var Z,H,ae=-1,he=x[1],oe=0,ge=7,be=4;for(he===0&&(ge=138,be=3),Z=0;Z<=B;Z++)if(H=he,he=x[2*(Z+1)+1],!(++oe<ge&&H===he)){if(oe<be)for(;ie(c,H,c.bl_tree),--oe!=0;);else H!==0?(H!==ae&&(ie(c,H,c.bl_tree),oe--),ie(c,p,c.bl_tree),Q(c,oe-3,2)):oe<=10?(ie(c,E,c.bl_tree),Q(c,oe-3,3)):(ie(c,P,c.bl_tree),Q(c,oe-11,7));ae=H,be=(oe=0)===he?(ge=138,3):H===he?(ge=6,3):(ge=7,4)}}l(te);var I=!1;function u(c,x,B,Z){Q(c,(h<<1)+(Z?1:0),3),function(H,ae,he,oe){j(H),X(H,he),X(H,~he),s.arraySet(H.pending_buf,H.window,ae,he,H.pending),H.pending+=he}(c,x,B)}i._tr_init=function(c){I||(function(){var x,B,Z,H,ae,he=new Array(_+1);for(H=Z=0;H<f-1;H++)for(Y[H]=Z,x=0;x<1<<L[H];x++)A[Z++]=H;for(A[Z-1]=H,H=ae=0;H<16;H++)for(te[H]=ae,x=0;x<1<<M[H];x++)W[ae++]=H;for(ae>>=7;H<y;H++)for(te[H]=ae<<7,x=0;x<1<<M[H]-7;x++)W[256+ae++]=H;for(B=0;B<=_;B++)he[B]=0;for(x=0;x<=143;)ue[2*x+1]=8,x++,he[8]++;for(;x<=255;)ue[2*x+1]=9,x++,he[9]++;for(;x<=279;)ue[2*x+1]=7,x++,he[7]++;for(;x<=287;)ue[2*x+1]=8,x++,he[8]++;for(R(ue,v+1,he),x=0;x<y;x++)N[2*x+1]=5,N[2*x]=K(x,5);re=new me(ue,L,m+1,v,_),V=new me(N,M,0,y,_),se=new me(new Array(0),C,0,b,T)}(),I=!0),c.l_desc=new J(c.dyn_ltree,re),c.d_desc=new J(c.dyn_dtree,V),c.bl_desc=new J(c.bl_tree,se),c.bi_buf=0,c.bi_valid=0,k(c)},i._tr_stored_block=u,i._tr_flush_block=function(c,x,B,Z){var H,ae,he=0;0<c.level?(c.strm.data_type===2&&(c.strm.data_type=function(oe){var ge,be=4093624447;for(ge=0;ge<=31;ge++,be>>>=1)if(1&be&&oe.dyn_ltree[2*ge]!==0)return o;if(oe.dyn_ltree[18]!==0||oe.dyn_ltree[20]!==0||oe.dyn_ltree[26]!==0)return a;for(ge=32;ge<m;ge++)if(oe.dyn_ltree[2*ge]!==0)return a;return o}(c)),ee(c,c.l_desc),ee(c,c.d_desc),he=function(oe){var ge;for(S(oe,oe.dyn_ltree,oe.l_desc.max_code),S(oe,oe.dyn_dtree,oe.d_desc.max_code),ee(oe,oe.bl_desc),ge=b-1;3<=ge&&oe.bl_tree[2*z[ge]+1]===0;ge--);return oe.opt_len+=3*(ge+1)+5+5+4,ge}(c),H=c.opt_len+3+7>>>3,(ae=c.static_len+3+7>>>3)<=H&&(H=ae)):H=ae=B+5,B+4<=H&&x!==-1?u(c,x,B,Z):c.strategy===4||ae===H?(Q(c,2+(Z?1:0),3),D(c,ue,N)):(Q(c,4+(Z?1:0),3),function(oe,ge,be,_e){var Ge;for(Q(oe,ge-257,5),Q(oe,be-1,5),Q(oe,_e-4,4),Ge=0;Ge<_e;Ge++)Q(oe,oe.bl_tree[2*z[Ge]+1],3);$(oe,oe.dyn_ltree,ge-1),$(oe,oe.dyn_dtree,be-1)}(c,c.l_desc.max_code+1,c.d_desc.max_code+1,he+1),D(c,c.dyn_ltree,c.dyn_dtree)),k(c),Z&&j(c)},i._tr_tally=function(c,x,B){return c.pending_buf[c.d_buf+2*c.last_lit]=x>>>8&255,c.pending_buf[c.d_buf+2*c.last_lit+1]=255&x,c.pending_buf[c.l_buf+c.last_lit]=255&B,c.last_lit++,x===0?c.dyn_ltree[2*B]++:(c.matches++,x--,c.dyn_ltree[2*(A[B]+m+1)]++,c.dyn_dtree[2*F(x)]++),c.last_lit===c.lit_bufsize-1},i._tr_align=function(c){Q(c,2,3),ie(c,w,ue),function(x){x.bi_valid===16?(X(x,x.bi_buf),x.bi_buf=0,x.bi_valid=0):8<=x.bi_valid&&(x.pending_buf[x.pending++]=255&x.bi_buf,x.bi_buf>>=8,x.bi_valid-=8)}(c)}},{"../utils/common":41}],53:[function(t,n,i){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,n,i){(function(s){(function(o,a){if(!o.setImmediate){var l,h,f,m,v=1,y={},b=!1,g=o.document,_=Object.getPrototypeOf&&Object.getPrototypeOf(o);_=_&&_.setTimeout?_:o,l={}.toString.call(o.process)==="[object process]"?function(p){Ee.nextTick(function(){T(p)})}:function(){if(o.postMessage&&!o.importScripts){var p=!0,E=o.onmessage;return o.onmessage=function(){p=!1},o.postMessage("","*"),o.onmessage=E,p}}()?(m="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",w,!1):o.attachEvent("onmessage",w),function(p){o.postMessage(m+p,"*")}):o.MessageChannel?((f=new MessageChannel).port1.onmessage=function(p){T(p.data)},function(p){f.port2.postMessage(p)}):g&&"onreadystatechange"in g.createElement("script")?(h=g.documentElement,function(p){var E=g.createElement("script");E.onreadystatechange=function(){T(p),E.onreadystatechange=null,h.removeChild(E),E=null},h.appendChild(E)}):function(p){setTimeout(T,0,p)},_.setImmediate=function(p){typeof p!="function"&&(p=new Function(""+p));for(var E=new Array(arguments.length-1),P=0;P<E.length;P++)E[P]=arguments[P+1];var L={callback:p,args:E};return y[v]=L,l(v),v++},_.clearImmediate=d}function d(p){delete y[p]}function T(p){if(b)setTimeout(T,0,p);else{var E=y[p];if(E){b=!0;try{(function(P){var L=P.callback,M=P.args;switch(M.length){case 0:L();break;case 1:L(M[0]);break;case 2:L(M[0],M[1]);break;case 3:L(M[0],M[1],M[2]);break;default:L.apply(a,M)}})(E)}finally{d(p),b=!1}}}}function w(p){p.source===o&&typeof p.data=="string"&&p.data.indexOf(m)===0&&T(+p.data.slice(m.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof Ke<"u"?Ke:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}(ca)),ca.exports}var _0=v0();const Kt=Ln(_0);var br={exports:{}},ha,Zh;function T0(){if(Zh)return ha;Zh=1;var r={"&":"&",'"':""","'":"'","<":"<",">":">"};function e(t){return t&&t.replace?t.replace(/([&"<>'])/g,function(n,i){return r[i]}):t}return ha=e,ha}var zh;function E0(){if(zh)return br.exports;zh=1;var r=T0(),e=as().Stream,t=" ";function n(h,f){typeof f!="object"&&(f={indent:f});var m=f.stream?new e:null,v="",y=!1,b=f.indent?f.indent===!0?t:f.indent:"",g=!0;function _(E){g?Ee.nextTick(E):E()}function d(E,P){if(P!==void 0&&(v+=P),E&&!y&&(m=m||new e,y=!0),E&&y){var L=v;_(function(){m.emit("data",L)}),v=""}}function T(E,P){a(d,o(E,b,b?1:0),P)}function w(){if(m){var E=v;_(function(){m.emit("data",E),m.emit("end"),m.readable=!1,m.emit("close")})}}function p(E){var P=E.encoding||"UTF-8",L={version:"1.0",encoding:P};E.standalone&&(L.standalone=E.standalone),T({"?xml":{_attr:L}}),v=v.replace("/>","?>")}return _(function(){g=!1}),f.declaration&&p(f.declaration),h&&h.forEach?h.forEach(function(E,P){var L;P+1===h.length&&(L=w),T(E,L)}):T(h,w),m?(m.readable=!0,m):v}function i(){var h=Array.prototype.slice.call(arguments),f={_elem:o(h)};return f.push=function(m){if(!this.append)throw new Error("not assigned to a parent!");var v=this,y=this._elem.indent;a(this.append,o(m,y,this._elem.icount+(y?1:0)),function(){v.append(!0)})},f.close=function(m){m!==void 0&&this.push(m),this.end&&this.end()},f}function s(h,f){return new Array(f||0).join(h||"")}function o(h,f,m){m=m||0;var v=s(f,m),y,b=h,g=!1;if(typeof h=="object"){var _=Object.keys(h);if(y=_[0],b=h[y],b&&b._elem)return b._elem.name=y,b._elem.icount=m,b._elem.indent=f,b._elem.indents=v,b._elem.interrupt=b,b._elem}var d=[],T=[],w;function p(E){var P=Object.keys(E);P.forEach(function(L){d.push(l(L,E[L]))})}switch(typeof b){case"object":if(b===null)break;b._attr&&p(b._attr),b._cdata&&T.push(("<![CDATA["+b._cdata).replace(/\]\]>/g,"]]]]><![CDATA[>")+"]]>"),b.forEach&&(w=!1,T.push(""),b.forEach(function(E){if(typeof E=="object"){var P=Object.keys(E)[0];P=="_attr"?p(E._attr):T.push(o(E,f,m+1))}else T.pop(),w=!0,T.push(r(E))}),w||T.push(""));break;default:T.push(r(b))}return{name:y,interrupt:g,attributes:d,content:T,icount:m,indents:v,indent:f}}function a(h,f,m){if(typeof f!="object")return h(!1,f);var v=f.interrupt?1:f.content.length;function y(){for(;f.content.length;){var g=f.content.shift();if(g!==void 0){if(b(g))return;a(h,g)}}h(!1,(v>1?f.indents:"")+(f.name?"</"+f.name+">":"")+(f.indent&&!m?`
|
|
132
|
-
`:"")),m&&m()}function b(g){return g.interrupt?(g.interrupt.append=
|
|
133
|
-
`:"")),!v)return
|
|
134
|
-
`:"");b(f)||y()}function l(h,f){return h+'="'+r(f)+'"'}return br.exports=n,br.exports.element=br.exports.Element=i,br.exports}var S0=E0();const ke=Ln(S0),vr=0,fa=32,x0=32,A0=(r,e)=>{const t=e.replace(/-/g,"");if(t.length!==x0)throw new Error(`Error: Cannot extract GUID from font filename: ${e}`);const i=t.replace(/(..)/g,"$1 ").trim().split(" ").map(l=>parseInt(l,16));i.reverse();const o=r.slice(vr,fa).map((l,h)=>l^i[h%i.length]),a=new Uint8Array(vr+o.length+Math.max(0,r.length-fa));return a.set(r.slice(0,vr)),a.set(o,vr),a.set(r.slice(fa),vr+o.length),a};class da{format(e,t={stack:[]}){const n=e.prepForXml(t);if(n)return n;throw Error("XMLComponent did not format correctly")}}class Xh{replace(e,t,n){let i=e;return t.forEach((s,o)=>{i=i.replace(new RegExp(`{${s.fileName}}`,"g"),(n+o).toString())}),i}getMediaData(e,t){return t.Array.filter(n=>e.search(`{${n.fileName}}`)>0)}}class k0{replace(e,t){let n=e;for(const i of t)n=n.replace(new RegExp(`{${i.reference}-${i.instance}}`,"g"),i.numId.toString());return n}}class R0{constructor(){ne(this,"formatter"),ne(this,"imageReplacer"),ne(this,"numberingReplacer"),this.formatter=new da,this.imageReplacer=new Xh,this.numberingReplacer=new k0}compile(e,t,n=[]){const i=new Kt,s=this.xmlifyFile(e,t),o=new Map(Object.entries(s));for(const[,a]of o)if(Array.isArray(a))for(const l of a)i.file(l.path,dr(l.data));else i.file(a.path,dr(a.data));for(const a of n)i.file(a.path,dr(a.data));for(const a of e.Media.Array)a.type!=="svg"?i.file(`word/media/${a.fileName}`,a.data):(i.file(`word/media/${a.fileName}`,a.data),i.file(`word/media/${a.fallback.fileName}`,a.fallback.data));for(const{data:a,name:l,fontKey:h}of e.FontTable.fontOptionsWithKey){const[f]=l.split(".");i.file(`word/fonts/${f}.odttf`,A0(a,h))}return i}xmlifyFile(e,t){const n=e.Document.Relationships.RelationshipCount+1,i=ke(this.formatter.format(e.Document.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),s=e.Comments.Relationships.RelationshipCount+1,o=ke(this.formatter.format(e.Comments,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),a=e.FootNotes.Relationships.RelationshipCount+1,l=ke(this.formatter.format(e.FootNotes.View,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),h=this.imageReplacer.getMediaData(i,e.Media),f=this.imageReplacer.getMediaData(o,e.Media),m=this.imageReplacer.getMediaData(l,e.Media);return{Relationships:{data:(h.forEach((v,y)=>{e.Document.Relationships.addRelationship(n+y,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${v.fileName}`)}),e.Document.Relationships.addRelationship(e.Document.Relationships.RelationshipCount+1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable","fontTable.xml"),ke(this.formatter.format(e.Document.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})),path:"word/_rels/document.xml.rels"},Document:{data:(()=>{const v=this.imageReplacer.replace(i,h,n);return this.numberingReplacer.replace(v,e.Numbering.ConcreteNumbering)})(),path:"word/document.xml"},Styles:{data:(()=>{const v=ke(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}});return this.numberingReplacer.replace(v,e.Numbering.ConcreteNumbering)})(),path:"word/styles.xml"},Properties:{data:ke(this.formatter.format(e.CoreProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/core.xml"},Numbering:{data:ke(this.formatter.format(e.Numbering,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/numbering.xml"},FileRelationships:{data:ke(this.formatter.format(e.FileRelationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"_rels/.rels"},HeaderRelationships:e.Headers.map((v,y)=>{const b=ke(this.formatter.format(v.View,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(b,e.Media).forEach((_,d)=>{v.Relationships.addRelationship(d,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${_.fileName}`)}),{data:ke(this.formatter.format(v.Relationships,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/header${y+1}.xml.rels`}}),FooterRelationships:e.Footers.map((v,y)=>{const b=ke(this.formatter.format(v.View,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(b,e.Media).forEach((_,d)=>{v.Relationships.addRelationship(d,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${_.fileName}`)}),{data:ke(this.formatter.format(v.Relationships,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/footer${y+1}.xml.rels`}}),Headers:e.Headers.map((v,y)=>{const b=ke(this.formatter.format(v.View,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),g=this.imageReplacer.getMediaData(b,e.Media),_=this.imageReplacer.replace(b,g,0);return{data:this.numberingReplacer.replace(_,e.Numbering.ConcreteNumbering),path:`word/header${y+1}.xml`}}),Footers:e.Footers.map((v,y)=>{const b=ke(this.formatter.format(v.View,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),g=this.imageReplacer.getMediaData(b,e.Media),_=this.imageReplacer.replace(b,g,0);return{data:this.numberingReplacer.replace(_,e.Numbering.ConcreteNumbering),path:`word/footer${y+1}.xml`}}),ContentTypes:{data:ke(this.formatter.format(e.ContentTypes,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"[Content_Types].xml"},CustomProperties:{data:ke(this.formatter.format(e.CustomProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/custom.xml"},AppProperties:{data:ke(this.formatter.format(e.AppProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/app.xml"},FootNotes:{data:(()=>{const v=this.imageReplacer.replace(l,m,a);return this.numberingReplacer.replace(v,e.Numbering.ConcreteNumbering)})(),path:"word/footnotes.xml"},FootNotesRelationships:{data:(m.forEach((v,y)=>{e.FootNotes.Relationships.addRelationship(a+y,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${v.fileName}`)}),ke(this.formatter.format(e.FootNotes.Relationships,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})),path:"word/_rels/footnotes.xml.rels"},Endnotes:{data:ke(this.formatter.format(e.Endnotes.View,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/endnotes.xml"},EndnotesRelationships:{data:ke(this.formatter.format(e.Endnotes.Relationships,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/endnotes.xml.rels"},Settings:{data:ke(this.formatter.format(e.Settings,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/settings.xml"},Comments:{data:(()=>{const v=this.imageReplacer.replace(o,f,s);return this.numberingReplacer.replace(v,e.Numbering.ConcreteNumbering)})(),path:"word/comments.xml"},CommentsRelationships:{data:(f.forEach((v,y)=>{e.Comments.Relationships.addRelationship(s+y,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${v.fileName}`)}),ke(this.formatter.format(e.Comments.Relationships,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})),path:"word/_rels/comments.xml.rels"},FontTable:{data:ke(this.formatter.format(e.FontTable.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/fontTable.xml"},FontTableRelationships:{data:ke(this.formatter.format(e.FontTable.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/fontTable.xml.rels"}}}}const Kh={NONE:"",WITH_2_BLANKS:" ",WITH_4_BLANKS:" ",WITH_TAB:" "},Yh=r=>r===!0?Kh.WITH_2_BLANKS:r===!1?void 0:r,Jh=class Jt{static pack(e,t,n){return Nn(this,arguments,function*(i,s,o,a=[]){return this.compiler.compile(i,Yh(o),a).generateAsync({type:s,mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toString(e,t,n=[]){return Jt.pack(e,"string",t,n)}static toBuffer(e,t,n=[]){return Jt.pack(e,"nodebuffer",t,n)}static toBase64String(e,t,n=[]){return Jt.pack(e,"base64",t,n)}static toBlob(e,t,n=[]){return Jt.pack(e,"blob",t,n)}static toArrayBuffer(e,t,n=[]){return Jt.pack(e,"arraybuffer",t,n)}static toStream(e,t,n=[]){const i=new b0.Stream;return this.compiler.compile(e,Yh(t),n).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"}).then(o=>{i.emit("data",o),i.emit("end")}),i}};ne(Jh,"compiler",new R0);let I0=Jh;const C0=new da,un=r=>jr.xml2js(r,{compact:!1,captureSpacesBetweenElements:!0}),Qh=r=>{var e;return(e=un(ke(C0.format(new ar({text:r})))).elements[0].elements)!=null?e:[]},qh=r=>Ce(ye({},r),{attributes:{"xml:space":"preserve"}}),pa=(r,e)=>{var t,n;return(n=(t=r.elements)==null?void 0:t.filter(i=>i.name===e)[0].elements)!=null?n:[]},Yt=(r,e,t)=>{const n=pa(r,"Types");n.some(s=>{var o,a;return s.type==="element"&&s.name==="Default"&&((o=s==null?void 0:s.attributes)==null?void 0:o.ContentType)===e&&((a=s==null?void 0:s.attributes)==null?void 0:a.Extension)===t})||n.push({attributes:{ContentType:e,Extension:t},name:"Default",type:"element"})},N0=r=>{const e=parseInt(r.substring(3),10);return isNaN(e)?0:e},P0=r=>pa(r,"Relationships").map(t=>{var n,i,s;return N0((s=(i=(n=t.attributes)==null?void 0:n.Id)==null?void 0:i.toString())!=null?s:"")}).reduce((t,n)=>Math.max(t,n),0)+1,$h=(r,e,t,n,i)=>{const s=pa(r,"Relationships");return s.push({attributes:{Id:`rId${e}`,Type:t,Target:n,TargetMode:i},name:"Relationship",type:"element"}),s};class L0 extends Error{constructor(e){super(`Token ${e} not found`),this.name="TokenNotFoundError"}}const O0=(r,e)=>{var t,n,i,s;for(let o=0;o<((t=r.elements)!=null?t:[]).length;o++){const a=r.elements[o];if(a.type==="element"&&a.name==="w:r"){const l=((n=a.elements)!=null?n:[]).filter(h=>h.type==="element"&&h.name==="w:t");for(const h of l)if((i=h.elements)!=null&&i[0]&&(s=h.elements[0].text)!=null&&s.includes(e))return o}}throw new L0(e)},F0=(r,e)=>{var t,n;let i=-1;const s=(n=(t=r.elements)==null?void 0:t.map((l,h)=>{var f,m,v;if(i!==-1)return l;if(l.type==="element"&&l.name==="w:t"){const b=((v=(m=(f=l.elements)==null?void 0:f[0])==null?void 0:m.text)!=null?v:"").split(e),g=b.map(_=>Ce(ye(ye({},l),qh(l)),{elements:Qh(_)}));return b.length>1&&(i=h),g}else return l}).flat())!=null?n:[],o=Ce(ye({},JSON.parse(JSON.stringify(r))),{elements:s.slice(0,i+1)}),a=Ce(ye({},JSON.parse(JSON.stringify(r))),{elements:s.slice(i+1)});return{left:o,right:a}},_r={START:0,MIDDLE:1,END:2},D0=({paragraphElement:r,renderedParagraph:e,originalText:t,replacementText:n})=>{const i=e.text.indexOf(t),s=i+t.length-1;let o=_r.START;for(const a of e.runs)for(const{text:l,index:h,start:f,end:m}of a.parts)switch(o){case _r.START:if(i>=f&&i<=m){const v=i-f,y=Math.min(s,m)-f,b=a.text.substring(v,y+1);if(b==="")continue;const g=l.replace(b,n);ma(r.elements[a.index].elements[h],g),o=_r.MIDDLE;continue}break;case _r.MIDDLE:if(s<=m){const v=l.substring(s-f+1);ma(r.elements[a.index].elements[h],v);const y=r.elements[a.index].elements[h];r.elements[a.index].elements[h]=qh(y),o=_r.END}else ma(r.elements[a.index].elements[h],"");break}return r},ma=(r,e)=>(r.elements=Qh(e),r),B0=r=>{if(r.element.name!=="w:p")throw new Error(`Invalid node type: ${r.element.name}`);if(!r.element.elements)return{text:"",runs:[],index:-1,pathToParagraph:[]};let e=0;const t=r.element.elements.map((i,s)=>({element:i,i:s})).filter(({element:i})=>i.name==="w:r").map(({element:i,i:s})=>{const o=M0(i,s,e);return e+=o.text.length,o}).filter(i=>!!i);return{text:t.reduce((i,s)=>i+s.text,""),runs:t,index:r.index,pathToParagraph:ef(r)}},M0=(r,e,t)=>{if(!r.elements)return{text:"",parts:[],index:-1,start:t,end:t};let n=t;const i=r.elements.map((o,a)=>{var l,h;return o.name==="w:t"&&o.elements&&o.elements.length>0?{text:(h=(l=o.elements[0].text)==null?void 0:l.toString())!=null?h:"",index:a,start:n,end:(()=>{var f,m;return n+=((m=(f=o.elements[0].text)==null?void 0:f.toString())!=null?m:"").length-1,n})()}:void 0}).filter(o=>!!o).map(o=>o);return{text:i.reduce((o,a)=>o+a.text,""),parts:i,index:e,start:t,end:n}},ef=r=>r.parent?[...ef(r.parent),r.index]:[r.index],tf=r=>{var e,t;return(t=(e=r.element.elements)==null?void 0:e.map((n,i)=>({element:n,index:i,parent:r})))!=null?t:[]},rf=r=>{let e=[];const t=[...tf({element:r,index:0,parent:void 0})];let n;for(;t.length>0;)n=t.shift(),n.element.name==="w:p"&&(e=[...e,B0(n)]),t.push(...tf(n));return e},U0=(r,e)=>rf(r).filter(t=>t.text.includes(e)),W0=new da,ga="ɵ",H0=({json:r,patch:e,patchText:t,context:n,keepOriginalStyles:i=!0})=>{const s=U0(r,t);if(s.length===0)return{element:r,didFindOccurrence:!1};for(const o of s){const a=e.children.map(l=>un(ke(W0.format(l,n)))).map(l=>l.elements[0]);switch(e.type){case wa.DOCUMENT:{const l=G0(r,o.pathToParagraph),h=V0(o.pathToParagraph);l.elements.splice(h,1,...a);break}case wa.PARAGRAPH:default:{const l=nf(r,o.pathToParagraph);D0({paragraphElement:l,renderedParagraph:o,originalText:t,replacementText:ga});const h=O0(l,ga),f=l.elements[h],{left:m,right:v}=F0(f,ga);let y=a,b=v;if(i){const g=f.elements.filter(_=>_.type==="element"&&_.name==="w:rPr");y=a.map(_=>{var d;return Ce(ye({},_),{elements:[...g,...(d=_.elements)!=null?d:[]]})}),b=Ce(ye({},v),{elements:[...g,...v.elements]})}l.elements.splice(h,1,m,...y,b);break}}}return{element:r,didFindOccurrence:!0}},nf=(r,e)=>{let t=r;for(let n=1;n<e.length;n++){const i=e[n];t=t.elements[i]}return t},G0=(r,e)=>nf(r,e.slice(0,e.length-1)),V0=r=>r[r.length-1],wa={DOCUMENT:"file",PARAGRAPH:"paragraph"},sf=new Xh,j0=new Uint8Array([255,254]),Z0=new Uint8Array([254,255]),af=(r,e)=>{if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++)if(r[t]!==e[t])return!1;return!0},z0=r=>Nn(null,[r],function*({outputType:e,data:t,patches:n,keepOriginalStyles:i,placeholderDelimiters:s={start:"{{",end:"}}"},recursive:o=!0}){var a,l,h;const f=t instanceof Kt?t:yield Kt.loadAsync(t),m=new Map,v={Media:new sa},y=new Map,b=[],g=[];let _=!1;const d=new Map;for(const[w,p]of Object.entries(f.files)){const E=yield p.async("uint8array"),P=E.slice(0,2);if(af(P,j0)||af(P,Z0)){d.set(w,E);continue}if(!w.endsWith(".xml")&&!w.endsWith(".rels")){d.set(w,E);continue}const L=un(yield p.async("text"));if(w==="word/document.xml"){const M=(a=L.elements)==null?void 0:a.find(C=>C.name==="w:document");if(M&&M.attributes){for(const C of["mc","wp","r","w15","m"])M.attributes[`xmlns:${C}`]=tn[C];M.attributes["mc:Ignorable"]=`${M.attributes["mc:Ignorable"]||""} w15`.trim()}}if(w.startsWith("word/")&&!w.endsWith(".xml.rels")){const M={file:v,viewWrapper:{Relationships:{addRelationship:(N,W,A,Y)=>{g.push({key:w,hyperlink:{id:N,link:A}})}}},stack:[]};if(m.set(w,M),!(s!=null&&s.start.trim())||!(s!=null&&s.end.trim()))throw new Error("Both start and end delimiters must be non-empty strings.");const{start:C,end:z}=s;for(const[N,W]of Object.entries(n)){const A=`${C}${N}${z}`;for(;;){const{didFindOccurrence:Y}=H0({json:L,patch:Ce(ye({},W),{children:W.children.map(re=>{if(re instanceof Zs){const V=new Gt(re.options.children,hr());return g.push({key:w,hyperlink:{id:V.linkId,link:re.options.link}}),V}else return re})}),patchText:A,context:M,keepOriginalStyles:i});if(!o||!Y)break}}const ue=sf.getMediaData(JSON.stringify(L),M.file.Media);ue.length>0&&(_=!0,b.push({key:w,mediaDatas:ue}))}y.set(w,L)}for(const{key:w,mediaDatas:p}of b){const E=`word/_rels/${w.split("/").pop()}.rels`,P=(l=y.get(E))!=null?l:of();y.set(E,P);const L=P0(P),M=sf.replace(JSON.stringify(y.get(w)),p,L);y.set(w,JSON.parse(M));for(let C=0;C<p.length;C++){const{fileName:z}=p[C];$h(P,L+C,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${z}`)}}for(const{key:w,hyperlink:p}of g){const E=`word/_rels/${w.split("/").pop()}.rels`,P=(h=y.get(E))!=null?h:of();y.set(E,P),$h(P,p.id,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",p.link,sc.EXTERNAL)}if(_){const w=y.get("[Content_Types].xml");if(!w)throw new Error("Could not find content types file");Yt(w,"image/png","png"),Yt(w,"image/jpeg","jpeg"),Yt(w,"image/jpeg","jpg"),Yt(w,"image/bmp","bmp"),Yt(w,"image/gif","gif"),Yt(w,"image/svg+xml","svg")}const T=new Kt;for(const[w,p]of y){const E=X0(p);T.file(w,dr(E))}for(const[w,p]of d)T.file(w,p);for(const{data:w,fileName:p}of v.Media.Array)T.file(`word/media/${p}`,w);return T.generateAsync({type:e,mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})}),X0=r=>jr.js2xml(r,{attributeValueFn:t=>String(t).replace(/&(?!amp;|lt;|gt;|quot;|apos;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}),of=()=>({declaration:{attributes:{version:"1.0",encoding:"UTF-8",standalone:"yes"}},elements:[{type:"element",name:"Relationships",attributes:{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},elements:[]}]}),K0=r=>Nn(null,[r],function*({data:e}){const t=e instanceof Kt?e:yield Kt.loadAsync(e),n=new Set;for(const[i,s]of Object.entries(t.files))if(!(!i.endsWith(".xml")&&!i.endsWith(".rels"))&&i.startsWith("word/")&&!i.endsWith(".xml.rels")){const o=un(yield s.async("text"));rf(o).forEach(a=>Y0(a.text).forEach(l=>n.add(l)))}return Array.from(n)}),Y0=r=>{var e;const t=new RegExp("(?<=\\{\\{).+?(?=\\}\\})","gs");return(e=r.match(t))!=null?e:[]},J0=Object.freeze(Object.defineProperty({__proto__:null,AbstractNumbering:oa,AlignmentType:Qe,AnnotationReference:Qg,Attributes:De,BaseXmlComponent:$t,Body:gh,Bookmark:wc,BookmarkEnd:bc,BookmarkStart:yc,Border:nu,BorderStyle:Kr,BuilderElement:pe,CarriageReturn:rw,CellMerge:jc,CellMergeAttributes:Vc,CharacterSet:Sw,CheckBox:c0,CheckBoxSymbolElement:on,CheckBoxUtil:Vh,Column:$y,ColumnBreak:cw,Comment:ac,CommentRangeEnd:Hg,CommentRangeStart:Wg,CommentReference:Gg,Comments:oc,ConcreteHyperlink:Gt,ConcreteNumbering:la,ContinuationSeparator:ew,DayLong:Kg,DayShort:Zg,DeletedTableCell:Gc,DeletedTableRow:Wc,DeletedTextRun:cy,Document:Fh,DocumentAttributeNamespaces:tn,DocumentAttributes:yr,DocumentBackground:yh,DocumentBackgroundAttributes:wh,DocumentDefaults:Oh,DocumentGridType:Vy,Drawing:Jr,DropCapType:Iw,EMPTY_OBJECT:Ya,EmphasisMarkType:Es,EmptyElement:Ue,EndnoteIdReference:Hh,EndnoteReference:lc,EndnoteReferenceRun:u0,EndnoteReferenceRunAttributes:Wh,Endnotes:Th,ExternalHyperlink:Zs,File:Fh,FileChild:gr,FootNoteReferenceRunAttributes:Mh,FootNotes:xh,Footer:o0,FooterWrapper:Eh,FootnoteReference:Uh,FootnoteReferenceElement:qg,FootnoteReferenceRun:l0,FrameAnchorType:Cw,FrameWrap:Nw,GridSpan:Yc,Header:a0,HeaderFooterReferenceType:Pt,HeaderFooterType:ta,HeaderWrapper:Ah,HeadingLevel:hw,HeightRule:Cy,HighlightColor:km,HorizontalPositionAlign:lm,HorizontalPositionRelativeFrom:Ou,HpsMeasureElement:Xr,HyperlinkType:ww,IgnoreIfEmptyXmlComponent:ct,ImageRun:Ig,ImportedRootElementAttributes:Jl,ImportedXmlComponent:Yl,InitializableXmlComponent:gs,InsertedTableCell:Hc,InsertedTableRow:Uc,InsertedTextRun:ay,InternalHyperlink:gc,LastRenderedPageBreak:nw,LeaderType:fw,Level:kh,LevelBase:aa,LevelForOverride:xb,LevelFormat:lt,LevelOverride:Rh,LevelSuffix:Tb,LineNumberRestartFormat:jy,LineRuleType:Nt,Math:Pw,MathAngledBrackets:ry,MathCurlyBrackets:ty,MathDegree:Lc,MathDenominator:xc,MathFraction:Fw,MathFunction:Jw,MathFunctionName:Fc,MathFunctionProperties:Dc,MathIntegral:Uw,MathLimit:Xs,MathLimitLower:Hw,MathLimitUpper:Ww,MathNumerator:Ac,MathPreSubSuperScript:Zw,MathRadical:Yw,MathRadicalProperties:Oc,MathRoundBrackets:$w,MathRun:Ow,MathSquareBrackets:ey,MathSubScript:Vw,MathSubSuperScript:jw,MathSum:Mw,MathSuperScript:Gw,Media:sa,MonthLong:Yg,MonthShort:zg,NextAttributeComponent:Pn,NoBreakHyphen:Vg,NumberFormat:cm,NumberProperties:Qr,NumberValueElement:Ht,NumberedItemReference:_w,NumberedItemReferenceFormat:vc,Numbering:Ih,OnOffElement:de,OverlapType:Sy,Packer:I0,PageBorderDisplay:Zy,PageBorderOffsetFrom:zy,PageBorderZOrder:Xy,PageBorders:uh,PageBreak:uw,PageBreakBefore:fc,PageNumber:Tt,PageNumberElement:tw,PageNumberSeparator:Ky,PageOrientation:nn,PageReference:Ew,PageTextDirection:dh,PageTextDirectionType:Yy,Paragraph:Je,ParagraphProperties:gt,ParagraphPropertiesChange:Sc,ParagraphPropertiesDefaults:Ph,ParagraphRunProperties:uu,PatchType:wa,PositionalTab:lw,PositionalTabAlignment:iw,PositionalTabLeader:aw,PositionalTabRelativeTo:sw,PrettifyType:Kh,RelativeHorizontalPosition:Ty,RelativeVerticalPosition:Ey,Run:Be,RunProperties:mt,RunPropertiesChange:cu,RunPropertiesDefaults:Lh,SectionProperties:ra,SectionPropertiesChange:mh,SectionType:Qy,Separator:$g,SequentialIdentifier:Lg,ShadingType:mm,SimpleField:Gs,SimpleMailMergeField:Fg,SoftHyphen:jg,SpaceType:Ve,StringContainer:_t,StringEnumValueElement:om,StringValueElement:dt,StyleForCharacter:Lt,StyleForParagraph:Xt,StyleLevel:s0,Styles:an,SymbolRun:fu,TDirection:Jc,Tab:uc,TabStopPosition:dw,TabStopType:js,Table:Iy,TableAnchorType:_y,TableBorders:qs,TableCell:Qs,TableCellBorders:Kc,TableLayoutType:Ay,TableOfContents:i0,TableProperties:$s,TableRow:Ny,TableRowProperties:ea,TableRowPropertiesChange:nh,TextDirection:yy,TextEffect:Am,TextRun:or,TextWrappingSide:Ju,TextWrappingType:pr,Textbox:y0,ThematicBreak:iu,UnderlineType:xs,VerticalAlign:dy,VerticalAlignSection:zc,VerticalAlignTable:Zc,VerticalAnchor:Hu,VerticalMerge:Js,VerticalMergeRevisionType:fy,VerticalMergeType:Ys,VerticalPositionAlign:um,VerticalPositionRelativeFrom:Fu,WORKAROUND2:wb,WORKAROUND3:im,WORKAROUND4:zw,WidthType:en,WpgGroupRun:Ng,WpsShapeRun:Cg,XmlAttributeComponent:we,XmlComponent:q,YearLong:Jg,YearShort:Xg,abstractNumUniqueNumericIdGen:Iu,bookmarkUniqueNumericIdGen:Pu,concreteNumUniqueNumericIdGen:Cu,convertInchesToTwip:Ye,convertMillimetersToTwip:Hm,convertToXmlComponent:Zr,createAlignment:vs,createBodyProperties:Gu,createBorderElement:Ie,createColumns:sh,createDocumentGrid:ah,createDotEmphasisMark:ym,createEmphasisMark:Ss,createFrameProperties:Ec,createHeaderFooterReference:rn,createHorizontalPosition:Uu,createIndent:su,createLineNumberType:oh,createMathAccentCharacter:kc,createMathBase:He,createMathLimitLocation:Rc,createMathNAryProperties:zs,createMathPreSubSuperScriptProperties:Pc,createMathSubScriptElement:Vt,createMathSubScriptProperties:Cc,createMathSubSuperScriptProperties:Nc,createMathSuperScriptElement:jt,createMathSuperScriptProperties:Ic,createOutlineLevel:_c,createPageMargin:ch,createPageNumberType:hh,createPageSize:fh,createParagraphStyle:mr,createRunFonts:Yr,createSectionType:ph,createShading:sr,createSimplePos:Du,createSpacing:dc,createStringElement:Wt,createTabStop:mc,createTabStopItem:pc,createTableFloatProperties:qc,createTableLayout:$c,createTableLook:th,createTableRowHeight:rh,createTableWidthElement:wr,createTransformation:Hs,createUnderline:lu,createVerticalAlign:Ks,createVerticalPosition:Wu,createWrapNone:Us,createWrapSquare:Qu,createWrapTight:qu,createWrapTopAndBottom:$u,dateTimeValue:ru,decimalNumber:Me,docPropertiesUniqueNumericIdGen:Nu,eighthPointMeasureValue:eu,encodeUtf8:dr,hashedId:Ds,hexColorValue:It,hpsMeasureValue:ql,longHexNumber:sm,measurementOrPercentValue:bs,patchDetector:K0,patchDocument:z0,percentageValue:$l,pointMeasureValue:tu,positiveUniversalMeasureValue:ys,sectionMarginDefaults:St,sectionPageSizeDefaults:sn,shortHexNumber:Ql,signedHpsMeasureValue:am,signedTwipsMeasureValue:nt,standardizeData:ic,twipsMeasureValue:Oe,uCharHexNumber:ws,uniqueId:hr,uniqueNumericIdCreator:cr,uniqueUuid:Lu,universalMeasureValue:ir,unsignedDecimalNumber:nr},Symbol.toStringTag,{value:"Module"}));Object.defineProperty(le,"AbstractRichText",{enumerable:!0,get:()=>ve.AbstractRichText}),Object.defineProperty(le,"Area",{enumerable:!0,get:()=>ve.Area}),Object.defineProperty(le,"Background",{enumerable:!0,get:()=>ve.Background}),Object.defineProperty(le,"Badge",{enumerable:!0,get:()=>ve.Badge}),Object.defineProperty(le,"CanvasEvent",{enumerable:!0,get:()=>ve.CanvasEvent}),Object.defineProperty(le,"CheckboxParticle",{enumerable:!0,get:()=>ve.CheckboxParticle}),Object.defineProperty(le,"Cursor",{enumerable:!0,get:()=>ve.Cursor}),Object.defineProperty(le,"CursorAgent",{enumerable:!0,get:()=>ve.CursorAgent}),Object.defineProperty(le,"Draw",{enumerable:!0,get:()=>ve.Draw}),Object.defineProperty(le,"FloatingBar",{enumerable:!0,get:()=>ve.FloatingBar}),Object.defineProperty(le,"Footer",{enumerable:!0,get:()=>ve.Footer}),Object.defineProperty(le,"GlobalEvent",{enumerable:!0,get:()=>ve.GlobalEvent}),Object.defineProperty(le,"Group",{enumerable:!0,get:()=>ve.Group}),Object.defineProperty(le,"Header",{enumerable:!0,get:()=>ve.Header}),Object.defineProperty(le,"Highlight",{enumerable:!0,get:()=>ve.Highlight}),Object.defineProperty(le,"HyperlinkParticle",{enumerable:!0,get:()=>ve.HyperlinkParticle}),Object.defineProperty(le,"ImageObserver",{enumerable:!0,get:()=>ve.ImageObserver}),Object.defineProperty(le,"ImageParticle",{enumerable:!0,get:()=>ve.ImageParticle}),Object.defineProperty(le,"LineBreakParticle",{enumerable:!0,get:()=>ve.LineBreakParticle}),Object.defineProperty(le,"LineNumber",{enumerable:!0,get:()=>ve.LineNumber}),Object.defineProperty(le,"ListParticle",{enumerable:!0,get:()=>ve.ListParticle}),Object.defineProperty(le,"Margin",{enumerable:!0,get:()=>ve.Margin}),Object.defineProperty(le,"MouseObserver",{enumerable:!0,get:()=>ve.MouseObserver}),Object.defineProperty(le,"Override",{enumerable:!0,get:()=>ve.Override}),Object.defineProperty(le,"PageBorder",{enumerable:!0,get:()=>ve.PageBorder}),Object.defineProperty(le,"PageBreakParticle",{enumerable:!0,get:()=>ve.PageBreakParticle}),Object.defineProperty(le,"PageNumber",{enumerable:!0,get:()=>ve.PageNumber}),Object.defineProperty(le,"ParagraphColor",{enumerable:!0,get:()=>ve.ParagraphColor}),Object.defineProperty(le,"Placeholder",{enumerable:!0,get:()=>ve.Placeholder}),Object.defineProperty(le,"Position",{enumerable:!0,get:()=>ve.Position}),Object.defineProperty(le,"Previewer",{enumerable:!0,get:()=>ve.Previewer}),Object.defineProperty(le,"RadioParticle",{enumerable:!0,get:()=>ve.RadioParticle}),Object.defineProperty(le,"Register",{enumerable:!0,get:()=>ve.Register}),Object.defineProperty(le,"ScrollObserver",{enumerable:!0,get:()=>ve.ScrollObserver}),Object.defineProperty(le,"SelectionObserver",{enumerable:!0,get:()=>ve.SelectionObserver}),Object.defineProperty(le,"SeparatorParticle",{enumerable:!0,get:()=>ve.SeparatorParticle}),Object.defineProperty(le,"Strikeout",{enumerable:!0,get:()=>ve.Strikeout}),Object.defineProperty(le,"SubscriptParticle",{enumerable:!0,get:()=>ve.SubscriptParticle}),Object.defineProperty(le,"SuperscriptParticle",{enumerable:!0,get:()=>ve.SuperscriptParticle}),Object.defineProperty(le,"TableOperate",{enumerable:!0,get:()=>ve.TableOperate}),Object.defineProperty(le,"TableParticle",{enumerable:!0,get:()=>ve.TableParticle}),Object.defineProperty(le,"TableTool",{enumerable:!0,get:()=>ve.TableTool}),Object.defineProperty(le,"TextParticle",{enumerable:!0,get:()=>ve.TextParticle}),Object.defineProperty(le,"Underline",{enumerable:!0,get:()=>ve.Underline}),Object.defineProperty(le,"Watermark",{enumerable:!0,get:()=>ve.Watermark}),Object.defineProperty(le,"BaseAdapter",{enumerable:!0,get:()=>qe.BaseAdapter}),Object.defineProperty(le,"BaseCommandAdapter",{enumerable:!0,get:()=>qe.BaseCommandAdapter}),Object.defineProperty(le,"Command",{enumerable:!0,get:()=>qe.Command}),Object.defineProperty(le,"CommandAdapt",{enumerable:!0,get:()=>qe.CommandAdapt}),Object.defineProperty(le,"PageAdapter",{enumerable:!0,get:()=>qe.PageAdapter}),Object.defineProperty(le,"ParagraphAdapter",{enumerable:!0,get:()=>qe.ParagraphAdapter}),Object.defineProperty(le,"TableAdapter",{enumerable:!0,get:()=>qe.TableAdapter}),Object.defineProperty(le,"TextStyleAdapter",{enumerable:!0,get:()=>qe.TextStyleAdapter}),Object.defineProperty(le,"EventBus",{enumerable:!0,get:()=>Qt.EventBus}),Object.defineProperty(le,"Listener",{enumerable:!0,get:()=>Qt.Listener}),Object.defineProperty(le,"RangeManager",{enumerable:!0,get:()=>Qt.RangeManager}),Object.defineProperty(le,"KeymapComponent",{enumerable:!0,get:()=>dn.KeymapComponent}),Object.defineProperty(le,"Shortcut",{enumerable:!0,get:()=>dn.Shortcut}),Object.defineProperty(le,"BlockParticle",{enumerable:!0,get:()=>Fe.BlockParticle}),Object.defineProperty(le,"CheckboxControl",{enumerable:!0,get:()=>Fe.CheckboxControl}),Object.defineProperty(le,"Control",{enumerable:!0,get:()=>Fe.Control}),Object.defineProperty(le,"ControlBorder",{enumerable:!0,get:()=>Fe.ControlBorder}),Object.defineProperty(le,"ControlComponent",{enumerable:!0,get:()=>Fe.ControlComponent}),Object.defineProperty(le,"ControlSearch",{enumerable:!0,get:()=>Fe.ControlSearch}),Object.defineProperty(le,"DateControl",{enumerable:!0,get:()=>Fe.DateControl}),Object.defineProperty(le,"DateParticle",{enumerable:!0,get:()=>Fe.DateParticle}),Object.defineProperty(le,"DatePicker",{enumerable:!0,get:()=>Fe.DatePicker}),Object.defineProperty(le,"GadgetComponent",{enumerable:!0,get:()=>Fe.GadgetComponent}),Object.defineProperty(le,"LaTexParticle",{enumerable:!0,get:()=>Fe.LaTexParticle}),Object.defineProperty(le,"NumberControl",{enumerable:!0,get:()=>Fe.NumberControl}),Object.defineProperty(le,"RadioControl",{enumerable:!0,get:()=>Fe.RadioControl}),Object.defineProperty(le,"Search",{enumerable:!0,get:()=>Fe.Search}),Object.defineProperty(le,"SelectControl",{enumerable:!0,get:()=>Fe.SelectControl}),Object.defineProperty(le,"TextControl",{enumerable:!0,get:()=>Fe.TextControl}),Object.defineProperty(le,"CommentComponent",{enumerable:!0,get:()=>Sr.CommentComponent}),Object.defineProperty(le,"RevisionComponent",{enumerable:!0,get:()=>Sr.RevisionComponent}),le.Actuator=kf,le.DocxParser=Va,le.Editor=Ra,le.ExportComponent=Sa,le.I18n=Af,le.WorkerComponent=Ta,le.WorkerManager=_a,le.createDocxParser=Za,le.default=Ra,le.getClipboardData=Rf,le.getIsClipboardContainFile=Cf,le.parseDocx=np,le.removeClipboardData=If,le.version=Nf,Object.keys(ce).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(le,r)&&Object.defineProperty(le,r,{enumerable:!0,get:()=>ce[r]})}),Object.keys(fn).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(le,r)&&Object.defineProperty(le,r,{enumerable:!0,get:()=>fn[r]})}),Object.defineProperties(le,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
110
|
+
`})}function Ga(r,e,t){e.bold&&(r.bold=!0),e.italic&&(r.italic=!0),e.underline!==void 0&&(r.underline=e.underline),e.strikeout&&(r.strikeout=!0),e.font&&(r.font=e.font),e.size&&(r.size=e.size),e.color&&(r.color=e.color),e.highlight&&(r.highlight=e.highlight),e.letterSpacing&&(r.letterSpacing=e.letterSpacing)}function Ka(r,e,t,n){const i=t.targetInnerWidth,s=t.tableWidthMode??"fit",o=t.defaultTableRowHeight??32,a=t.defaultTableTdPadding??[0,4,0,4];let l=[...r.colWidths];if(i&&s==="fit"&&l.length>0){const v=l.reduce((y,b)=>y+b,0);if(v>0){const y=i/v;l=l.map(b=>Math.round(b*y))}}const c=l.map(v=>({width:v})),f=[];for(const v of r.rows){const y=[];for(const b of v.cells){const g=[];for(let d=0;d<b.paragraphs.length;d++){const T=b.paragraphs[d];if(ep(T)){const w=T.chunks[0].table;Ka(w,g,t,n)}else Nn(T,g,t,d===0&&g.length===0,n,t.defaultSize??12)}g.length===0&&g.push({value:vt});const _={value:g,colspan:b.colspan,rowspan:b.rowspan};b.backgroundColor&&(_.backgroundColor=b.backgroundColor),b.verticalAlign&&(_.verticalAlign=Wd[b.verticalAlign]??"top"),b.borderTypes&&(_.borderTypes=b.borderTypes),b.width&&(_.width=b.width),y.push(_)}f.push({height:v.height??o,tdList:y})}const m={value:"",type:"table",colgroup:c,trList:f,tdPadding:a};r.borderType==="EMPTY"?m.borderType=0:r.borderType==="ALL"&&(m.borderType=1),r.borderColor&&(m.borderColor=r.borderColor),r.borderWidth&&(m.borderWidth=r.borderWidth),e.push(m)}function ep(r){return r.chunks.length===1&&r.chunks[0].type==="nestedTable"}function tp(r,e,t,n){const i=In();e.push({value:vt,columnId:i,columnCount:r.columns,columnGap:r.colSpace,columnSeparator:r.separator,columnWidths:r.colWidths});for(let s=0;s<r.groups.length;s++){const o=r.groups[s];s>0&&e.push({value:`
|
|
111
|
+
`,type:"columnBreak",columnId:i});let a=t.defaultSize??12;for(let l=0;l<o.length;l++){const c=l===0&&s===0;a=Nn(o[l],e,t,c,n,a);const m=e[e.length-1];m&&!m.columnId&&(m.columnId=i)}}e.push({value:vt})}class qa{constructor(e){Ee(this,"options");this.options={...e}}async parse(e){try{const t=await df.loadAsync(e),[n,i,s,o,a,l]=await Promise.all([this.readZipEntry(t,"word/document.xml"),this.readZipEntry(t,"word/styles.xml"),this.readZipEntry(t,"word/numbering.xml"),this.readZipEntry(t,"word/theme/theme1.xml"),this.readZipEntry(t,"word/_rels/document.xml.rels"),this.readZipEntry(t,"word/comments.xml")]);if(!n)return{success:!1,elements:[],error:"Missing word/document.xml"};const c=await this.extractMediaFiles(t),f=await this.extractChartRelFiles(t),m=await this.extractChartXmlFiles(t),v={documentXml:n,stylesXml:i,numberingXml:s,themeXml:o,documentRels:a,commentsXml:l,chartRelsMap:f,chartXmlMap:m,mediaMap:c,options:this.getMergedOptions()};return this.parseDocumentSync(v)}catch(t){const n=t instanceof Error?t.message:String(t);return{success:!1,elements:[],error:n}}}async parseFromFile(e){const t=await e.arrayBuffer();return this.parse(t)}async parseDocumentSync(e){try{kn.value=0;let t=null;if(e.options.chartRenderer&&Object.keys(e.chartXmlMap).length>0){const p=e.options.chartRenderer;t=(E,O,P,B)=>p.renderToDataUrl(E,O,P,B)}const n=Wf(e.themeXml),i=new $f(e.stylesXml,n),s=new rd(e.numberingXml),o=Hd(e.commentsXml),a=e.documentRels?Da(e.documentRels):new Map,c=kt(e.documentXml).documentElement.getElementsByTagNameNS(W.w,"body");if(c.length===0)return{success:!1,elements:[],error:"No <w:body> found"};const f=c[0],m=ip(f,W.w,fe),v=e.options.defaultSize??12,y=[];let b=[];const g=[],_=()=>{for(const p of b)y.push(p);b=[]},d=p=>{g.length>0&&(p.chunks.unshift(...g),g.length=0)};Oe(f,p=>{const E=p.localName,O=p.namespaceURI;if(E==="p"&&O===W.w){const P=Ft(p,i,n,s,a,e.mediaMap,m,v);d(P),rp(p,P,a,e.chartRelsMap,e.chartXmlMap,e.mediaMap,t,{c:W.c,r:W.r,wp:W.wp,w:W.w},fe);const B=fe(p,W.w,"pPr"),I=B?fe(B,W.w,"sectPr"):null;if(I){const K=ja(I);if(K.columns>1){b.push(P);const N=e.options.targetInnerWidth??600;y.push(Wa(b,K,N)),b=[]}else _(),y.push(P);const oe=K.breakType;oe!=="continuous"&&oe!=="nextColumn"&&y.push({type:"paragraph",chunks:[{type:"break",breakType:"page"}],style:{}})}else b.push(P)}else if(E==="tbl"&&O===W.w)_(),y.push(Lr(p,i,n,s,a,e.mediaMap,m));else if(E==="sdt"&&O===W.w)Va(p,b,y,_,i,n,s,a,e.mediaMap,m,v,W.w,fe,Oe);else if(E==="customXml"&&O===W.w)Oe(p,P=>{P.localName==="p"&&P.namespaceURI===W.w?b.push(Ft(P,i,n,s,a,e.mediaMap,m,v)):P.localName==="tbl"&&P.namespaceURI===W.w&&(_(),y.push(Lr(P,i,n,s,a,e.mediaMap,m)))});else if(E==="sectPr"&&O===W.w){const P=ja(p);if(P.columns>1&&b.length>0){const B=e.options.targetInnerWidth??600;y.push(Wa(b,P,B)),b=[]}}else if(E==="commentRangeStart"&&O===W.w){const P=p.getAttributeNS(W.w,"id")??p.getAttribute("w:id")??"";P&&g.push({type:"commentMarker",markType:"start",commentId:P})}else if(E==="commentRangeEnd"&&O===W.w){const P=p.getAttributeNS(W.w,"id")??p.getAttribute("w:id")??"";P&&g.push({type:"commentMarker",markType:"end",commentId:P})}}),_();const T=Gd(y,e.options,o),w=o.size>0?[...o.values()]:void 0;return{success:!0,elements:T,comments:w}}catch(t){const n=t instanceof Error?t.message:String(t);return{success:!1,elements:[],error:`Parse failed: ${n}`}}}async readZipEntry(e,t){const n=e.file(t);return n?n.async("string"):null}async extractMediaFiles(e){const t={},n={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",tiff:"image/tiff",tif:"image/tiff",svg:"image/svg+xml",emf:"image/x-emf",wmf:"image/x-wmf"},i=[];return e.forEach((s,o)=>{s.startsWith("word/media/")&&!o.dir&&i.push(o.async("base64").then(a=>{var m;const l=((m=s.split(".").pop())==null?void 0:m.toLowerCase())??"png",f=`data:${n[l]??"image/png"};base64,${a}`;t[s]=f,t[s.replace("word/","")]=f}))}),await Promise.all(i),t}async extractChartRelFiles(e){const t={},n=[];return e.forEach((i,s)=>{i.includes("charts/_rels/")&&i.endsWith(".rels")&&!s.dir&&n.push(s.async("string").then(o=>{t[i]=o}))}),await Promise.all(n),t}async extractChartXmlFiles(e){const t={},n=[];return e.forEach((i,s)=>{i.match(/^word\/charts\/chart\d+\.xml$/)&&!s.dir&&n.push(s.async("string").then(o=>{t[i]=o}))}),await Promise.all(n),t}getMergedOptions(){return{...Lf,...this.options}}}function Va(r,e,t,n,i,s,o,a,l,c,f,m,v,y){if(xd(r)){const g=kd(r,i,s,o,a,l);for(const _ of g)e.push(_);return}const b=v(r,m,"sdtContent");b&&y(b,g=>{g.localName==="p"&&g.namespaceURI===m?e.push(Ft(g,i,s,o,a,l,c,f)):g.localName==="tbl"&&g.namespaceURI===m?(n(),t.push(Lr(g,i,s,o,a,l,c))):g.localName==="sdt"&&g.namespaceURI===m&&Va(g,e,t,n,i,s,o,a,l,c,f,m,v,y)})}function rp(r,e,t,n,i,s,o,a,l){const c=r.getElementsByTagNameNS(a.w,"drawing");for(let f=0;f<c.length;f++){const m=c[f];if(!m.getElementsByTagNameNS(a.c,"chart").length)continue;let v=ud(m,t,n,s);!v&&o&&(v=np(m,t,i,o,a,l)),v&&e.chunks.push(v)}}function np(r,e,t,n,i,s){const o=r.getElementsByTagNameNS(i.c,"chart");if(o.length===0)return null;const a=o[0].getAttributeNS(i.r,"id")??o[0].getAttribute("r:id")??"";if(!a)return null;const l=e.get(a);if(!l)return null;const c=l.target.startsWith("word/")?l.target:`word/${l.target.replace(/^\.\.\//,"")}`,f=t[c];if(!f)return null;let m=400,v=300;const y=s(r,i.wp,"inline")??s(r,i.wp,"anchor");if(y){const g=s(y,i.wp,"extent");if(g){const _=g.getAttribute("cx"),d=g.getAttribute("cy");_&&(m=Math.round(parseInt(_,10)/9525)),d&&(v=Math.round(parseInt(d,10)/9525))}}const b=Nd(f);if(!b)return null;try{return{type:"image",src:n(b,m,v,2),width:m,height:v}}catch{return null}}function ip(r,e,t){const n={top:72,bottom:72,left:90,right:90},i=t(r,e,"sectPr");if(!i)return n;const s=t(i,e,"pgMar");if(!s)return n;const o=v=>v?parseInt(v,10):null,a=v=>v/1440*96,l=o(s.getAttributeNS(e,"top")??s.getAttribute("w:top")),c=o(s.getAttributeNS(e,"bottom")??s.getAttribute("w:bottom")),f=o(s.getAttributeNS(e,"left")??s.getAttribute("w:left")),m=o(s.getAttributeNS(e,"right")??s.getAttribute("w:right"));return{top:l!==null?a(l):n.top,bottom:c!==null?a(c):n.bottom,left:f!==null?a(f):n.left,right:m!==null?a(m):n.right}}function $a(r){return new qa(r)}async function sp(r,e){const t=$a(e);return r instanceof File?t.parseFromFile(r):t.parse(r)}var ap=Object.defineProperty,op=Object.defineProperties,lp=Object.getOwnPropertyDescriptors,Fr=Object.getOwnPropertySymbols,Xa=Object.prototype.hasOwnProperty,Ya=Object.prototype.propertyIsEnumerable,On=(r,e,t)=>e in r?ap(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ye=(r,e)=>{for(var t in e||(e={}))Xa.call(e,t)&&On(r,t,e[t]);if(Fr)for(var t of Fr(e))Ya.call(e,t)&&On(r,t,e[t]);return r},Ne=(r,e)=>op(r,lp(e)),Za=(r,e)=>{var t={};for(var n in r)Xa.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&Fr)for(var n of Fr(r))e.indexOf(n)<0&&Ya.call(r,n)&&(t[n]=r[n]);return t},ne=(r,e,t)=>On(r,typeof e!="symbol"?e+"":e,t),Pn=(r,e,t)=>new Promise((n,i)=>{var s=l=>{try{a(t.next(l))}catch(c){i(c)}},o=l=>{try{a(t.throw(l))}catch(c){i(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((t=t.apply(r,e)).next())});class er{constructor(e){ne(this,"rootKey"),this.rootKey=e}}const Ja=Object.seal({});class J extends er{constructor(e){super(e),ne(this,"root"),this.root=new Array}prepForXml(e){var t;e.stack.push(this);const n=this.root.map(i=>i instanceof er?i.prepForXml(e):i).filter(i=>i!==void 0);return e.stack.pop(),{[this.rootKey]:n.length?n.length===1&&((t=n[0])!=null&&t._attr)?n[0]:n:Ja}}addChildElement(e){return this.root.push(e),this}}class ct extends J{constructor(e,t){super(e),ne(this,"includeIfEmpty"),this.includeIfEmpty=t}prepForXml(e){const t=super.prepForXml(e);if(this.includeIfEmpty||t&&(typeof t[this.rootKey]!="object"||Object.keys(t[this.rootKey]).length))return t}}class we extends er{constructor(e){super("_attr"),ne(this,"xmlKeys"),this.root=e}prepForXml(e){const t={};return Object.entries(this.root).forEach(([n,i])=>{if(i!==void 0){const s=this.xmlKeys&&this.xmlKeys[n]||n;t[s]=i}}),{_attr:t}}}class Ln extends er{constructor(e){super("_attr"),this.root=e}prepForXml(e){return{_attr:Object.values(this.root).filter(({value:n})=>n!==void 0).reduce((n,{key:i,value:s})=>Ne(ye({},n),{[i]:s}),{})}}}class Fe extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w:val",color:"w:color",fill:"w:fill",space:"w:space",sz:"w:sz",type:"w:type",rsidR:"w:rsidR",rsidRPr:"w:rsidRPr",rsidSect:"w:rsidSect",w:"w:w",h:"w:h",top:"w:top",right:"w:right",bottom:"w:bottom",left:"w:left",header:"w:header",footer:"w:footer",gutter:"w:gutter",linePitch:"w:linePitch",pos:"w:pos"})}}var $e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Fn={},Br={exports:{}},Qa;function Bn(){if(Qa)return Br.exports;Qa=1;var r=typeof Reflect=="object"?Reflect:null,e=r&&typeof r.apply=="function"?r.apply:function(E,O,P){return Function.prototype.apply.call(E,O,P)},t;r&&typeof r.ownKeys=="function"?t=r.ownKeys:Object.getOwnPropertySymbols?t=function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:t=function(E){return Object.getOwnPropertyNames(E)};function n(p){console&&console.warn&&console.warn(p)}var i=Number.isNaN||function(E){return E!==E};function s(){s.init.call(this)}Br.exports=s,Br.exports.once=d,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(p){if(typeof p!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof p)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(p){if(typeof p!="number"||p<0||i(p))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+p+".");o=p}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(E){if(typeof E!="number"||E<0||i(E))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+E+".");return this._maxListeners=E,this};function l(p){return p._maxListeners===void 0?s.defaultMaxListeners:p._maxListeners}s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(E){for(var O=[],P=1;P<arguments.length;P++)O.push(arguments[P]);var B=E==="error",I=this._events;if(I!==void 0)B=B&&I.error===void 0;else if(!B)return!1;if(B){var K;if(O.length>0&&(K=O[0]),K instanceof Error)throw K;var oe=new Error("Unhandled error."+(K?" ("+K.message+")":""));throw oe.context=K,oe}var N=I[E];if(N===void 0)return!1;if(typeof N=="function")e(N,this,O);else for(var U=N.length,x=b(N,U),P=0;P<U;++P)e(x[P],this,O);return!0};function c(p,E,O,P){var B,I,K;if(a(O),I=p._events,I===void 0?(I=p._events=Object.create(null),p._eventsCount=0):(I.newListener!==void 0&&(p.emit("newListener",E,O.listener?O.listener:O),I=p._events),K=I[E]),K===void 0)K=I[E]=O,++p._eventsCount;else if(typeof K=="function"?K=I[E]=P?[O,K]:[K,O]:P?K.unshift(O):K.push(O),B=l(p),B>0&&K.length>B&&!K.warned){K.warned=!0;var oe=new Error("Possible EventEmitter memory leak detected. "+K.length+" "+String(E)+" listeners added. Use emitter.setMaxListeners() to increase limit");oe.name="MaxListenersExceededWarning",oe.emitter=p,oe.type=E,oe.count=K.length,n(oe)}return p}s.prototype.addListener=function(E,O){return c(this,E,O,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(E,O){return c(this,E,O,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(p,E,O){var P={fired:!1,wrapFn:void 0,target:p,type:E,listener:O},B=f.bind(P);return B.listener=O,P.wrapFn=B,B}s.prototype.once=function(E,O){return a(O),this.on(E,m(this,E,O)),this},s.prototype.prependOnceListener=function(E,O){return a(O),this.prependListener(E,m(this,E,O)),this},s.prototype.removeListener=function(E,O){var P,B,I,K,oe;if(a(O),B=this._events,B===void 0)return this;if(P=B[E],P===void 0)return this;if(P===O||P.listener===O)--this._eventsCount===0?this._events=Object.create(null):(delete B[E],B.removeListener&&this.emit("removeListener",E,P.listener||O));else if(typeof P!="function"){for(I=-1,K=P.length-1;K>=0;K--)if(P[K]===O||P[K].listener===O){oe=P[K].listener,I=K;break}if(I<0)return this;I===0?P.shift():g(P,I),P.length===1&&(B[E]=P[0]),B.removeListener!==void 0&&this.emit("removeListener",E,oe||O)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(E){var O,P,B;if(P=this._events,P===void 0)return this;if(P.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):P[E]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete P[E]),this;if(arguments.length===0){var I=Object.keys(P),K;for(B=0;B<I.length;++B)K=I[B],K!=="removeListener"&&this.removeAllListeners(K);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(O=P[E],typeof O=="function")this.removeListener(E,O);else if(O!==void 0)for(B=O.length-1;B>=0;B--)this.removeListener(E,O[B]);return this};function v(p,E,O){var P=p._events;if(P===void 0)return[];var B=P[E];return B===void 0?[]:typeof B=="function"?O?[B.listener||B]:[B]:O?_(B):b(B,B.length)}s.prototype.listeners=function(E){return v(this,E,!0)},s.prototype.rawListeners=function(E){return v(this,E,!1)},s.listenerCount=function(p,E){return typeof p.listenerCount=="function"?p.listenerCount(E):y.call(p,E)},s.prototype.listenerCount=y;function y(p){var E=this._events;if(E!==void 0){var O=E[p];if(typeof O=="function")return 1;if(O!==void 0)return O.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function b(p,E){for(var O=new Array(E),P=0;P<E;++P)O[P]=p[P];return O}function g(p,E){for(;E+1<p.length;E++)p[E]=p[E+1];p.pop()}function _(p){for(var E=new Array(p.length),O=0;O<E.length;++O)E[O]=p[O].listener||p[O];return E}function d(p,E){return new Promise(function(O,P){function B(K){p.removeListener(E,I),P(K)}function I(){typeof p.removeListener=="function"&&p.removeListener("error",B),O([].slice.call(arguments))}w(p,E,I,{once:!0}),E!=="error"&&T(p,B,{once:!0})})}function T(p,E,O){typeof p.on=="function"&&w(p,"error",E,O)}function w(p,E,O,P){if(typeof p.on=="function")P.once?p.once(E,O):p.on(E,O);else if(typeof p.addEventListener=="function")p.addEventListener(E,function B(I){P.once&&p.removeEventListener(E,B),O(I)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof p)}return Br.exports}var Mr={exports:{}},eo;function bt(){return eo||(eo=1,typeof Object.create=="function"?Mr.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Mr.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),Mr.exports}function up(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var to={exports:{}},Pe=to.exports={},tt,rt;function Mn(){throw new Error("setTimeout has not been defined")}function Hn(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?tt=setTimeout:tt=Mn}catch{tt=Mn}try{typeof clearTimeout=="function"?rt=clearTimeout:rt=Hn}catch{rt=Hn}})();function ro(r){if(tt===setTimeout)return setTimeout(r,0);if((tt===Mn||!tt)&&setTimeout)return tt=setTimeout,setTimeout(r,0);try{return tt(r,0)}catch{try{return tt.call(null,r,0)}catch{return tt.call(this,r,0)}}}function cp(r){if(rt===clearTimeout)return clearTimeout(r);if((rt===Hn||!rt)&&clearTimeout)return rt=clearTimeout,clearTimeout(r);try{return rt(r)}catch{try{return rt.call(null,r)}catch{return rt.call(this,r)}}}var ht=[],Bt=!1,Ct,Hr=-1;function hp(){!Bt||!Ct||(Bt=!1,Ct.length?ht=Ct.concat(ht):Hr=-1,ht.length&&no())}function no(){if(!Bt){var r=ro(hp);Bt=!0;for(var e=ht.length;e;){for(Ct=ht,ht=[];++Hr<e;)Ct&&Ct[Hr].run();Hr=-1,e=ht.length}Ct=null,Bt=!1,cp(r)}}Pe.nextTick=function(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];ht.push(new io(r,e)),ht.length===1&&!Bt&&ro(no)};function io(r,e){this.fun=r,this.array=e}io.prototype.run=function(){this.fun.apply(null,this.array)},Pe.title="browser",Pe.browser=!0,Pe.env={},Pe.argv=[],Pe.version="",Pe.versions={};function ft(){}Pe.on=ft,Pe.addListener=ft,Pe.once=ft,Pe.off=ft,Pe.removeListener=ft,Pe.removeAllListeners=ft,Pe.emit=ft,Pe.prependListener=ft,Pe.prependOnceListener=ft,Pe.listeners=function(r){return[]},Pe.binding=function(r){throw new Error("process.binding is not supported")},Pe.cwd=function(){return"/"},Pe.chdir=function(r){throw new Error("process.chdir is not supported")},Pe.umask=function(){return 0};var fp=to.exports;const Ae=up(fp);var Un,so;function ao(){return so||(so=1,Un=Bn().EventEmitter),Un}var jn={},tr={},oo;function dp(){if(oo)return tr;oo=1,tr.byteLength=a,tr.toByteArray=c,tr.fromByteArray=v;for(var r=[],e=[],t=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=n.length;i<s;++i)r[i]=n[i],e[n.charCodeAt(i)]=i;e[45]=62,e[95]=63;function o(y){var b=y.length;if(b%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=y.indexOf("=");g===-1&&(g=b);var _=g===b?0:4-g%4;return[g,_]}function a(y){var b=o(y),g=b[0],_=b[1];return(g+_)*3/4-_}function l(y,b,g){return(b+g)*3/4-g}function c(y){var b,g=o(y),_=g[0],d=g[1],T=new t(l(y,_,d)),w=0,p=d>0?_-4:_,E;for(E=0;E<p;E+=4)b=e[y.charCodeAt(E)]<<18|e[y.charCodeAt(E+1)]<<12|e[y.charCodeAt(E+2)]<<6|e[y.charCodeAt(E+3)],T[w++]=b>>16&255,T[w++]=b>>8&255,T[w++]=b&255;return d===2&&(b=e[y.charCodeAt(E)]<<2|e[y.charCodeAt(E+1)]>>4,T[w++]=b&255),d===1&&(b=e[y.charCodeAt(E)]<<10|e[y.charCodeAt(E+1)]<<4|e[y.charCodeAt(E+2)]>>2,T[w++]=b>>8&255,T[w++]=b&255),T}function f(y){return r[y>>18&63]+r[y>>12&63]+r[y>>6&63]+r[y&63]}function m(y,b,g){for(var _,d=[],T=b;T<g;T+=3)_=(y[T]<<16&16711680)+(y[T+1]<<8&65280)+(y[T+2]&255),d.push(f(_));return d.join("")}function v(y){for(var b,g=y.length,_=g%3,d=[],T=16383,w=0,p=g-_;w<p;w+=T)d.push(m(y,w,w+T>p?p:w+T));return _===1?(b=y[g-1],d.push(r[b>>2]+r[b<<4&63]+"==")):_===2&&(b=(y[g-2]<<8)+y[g-1],d.push(r[b>>10]+r[b>>4&63]+r[b<<2&63]+"=")),d.join("")}return tr}var Ur={},lo;function pp(){return lo||(lo=1,Ur.read=function(r,e,t,n,i){var s,o,a=i*8-n-1,l=(1<<a)-1,c=l>>1,f=-7,m=t?i-1:0,v=t?-1:1,y=r[e+m];for(m+=v,s=y&(1<<-f)-1,y>>=-f,f+=a;f>0;s=s*256+r[e+m],m+=v,f-=8);for(o=s&(1<<-f)-1,s>>=-f,f+=n;f>0;o=o*256+r[e+m],m+=v,f-=8);if(s===0)s=1-c;else{if(s===l)return o?NaN:(y?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-c}return(y?-1:1)*o*Math.pow(2,s-n)},Ur.write=function(r,e,t,n,i,s){var o,a,l,c=s*8-i-1,f=(1<<c)-1,m=f>>1,v=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:s-1,b=n?1:-1,g=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=f):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+m>=1?e+=v/l:e+=v*Math.pow(2,1-m),e*l>=2&&(o++,l/=2),o+m>=f?(a=0,o=f):o+m>=1?(a=(e*l-1)*Math.pow(2,i),o=o+m):(a=e*Math.pow(2,m-1)*Math.pow(2,i),o=0));i>=8;r[t+y]=a&255,y+=b,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;r[t+y]=o&255,y+=b,o/=256,c-=8);r[t+y-b]|=g*128}),Ur}var uo;function jr(){return uo||(uo=1,(function(r){var e=dp(),t=pp(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=a,r.SlowBuffer=T,r.INSPECT_MAX_BYTES=50;var i=2147483647;r.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=s(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{var R=new Uint8Array(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,Uint8Array.prototype),Object.setPrototypeOf(R,u),R.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(R){if(R>i)throw new RangeError('The value "'+R+'" is invalid for option "size"');var u=new Uint8Array(R);return Object.setPrototypeOf(u,a.prototype),u}function a(R,u,h){if(typeof R=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return m(R)}return l(R,u,h)}a.poolSize=8192;function l(R,u,h){if(typeof R=="string")return v(R,u);if(ArrayBuffer.isView(R))return b(R);if(R==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R);if(te(R,ArrayBuffer)||R&&te(R.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(te(R,SharedArrayBuffer)||R&&te(R.buffer,SharedArrayBuffer)))return g(R,u,h);if(typeof R=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var S=R.valueOf&&R.valueOf();if(S!=null&&S!==R)return a.from(S,u,h);var M=_(R);if(M)return M;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof R[Symbol.toPrimitive]=="function")return a.from(R[Symbol.toPrimitive]("string"),u,h);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R)}a.from=function(R,u,h){return l(R,u,h)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function c(R){if(typeof R!="number")throw new TypeError('"size" argument must be of type number');if(R<0)throw new RangeError('The value "'+R+'" is invalid for option "size"')}function f(R,u,h){return c(R),R<=0?o(R):u!==void 0?typeof h=="string"?o(R).fill(u,h):o(R).fill(u):o(R)}a.alloc=function(R,u,h){return f(R,u,h)};function m(R){return c(R),o(R<0?0:d(R)|0)}a.allocUnsafe=function(R){return m(R)},a.allocUnsafeSlow=function(R){return m(R)};function v(R,u){if((typeof u!="string"||u==="")&&(u="utf8"),!a.isEncoding(u))throw new TypeError("Unknown encoding: "+u);var h=w(R,u)|0,S=o(h),M=S.write(R,u);return M!==h&&(S=S.slice(0,M)),S}function y(R){for(var u=R.length<0?0:d(R.length)|0,h=o(u),S=0;S<u;S+=1)h[S]=R[S]&255;return h}function b(R){if(te(R,Uint8Array)){var u=new Uint8Array(R);return g(u.buffer,u.byteOffset,u.byteLength)}return y(R)}function g(R,u,h){if(u<0||R.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(R.byteLength<u+(h||0))throw new RangeError('"length" is outside of buffer bounds');var S;return u===void 0&&h===void 0?S=new Uint8Array(R):h===void 0?S=new Uint8Array(R,u):S=new Uint8Array(R,u,h),Object.setPrototypeOf(S,a.prototype),S}function _(R){if(a.isBuffer(R)){var u=d(R.length)|0,h=o(u);return h.length===0||R.copy(h,0,0,u),h}if(R.length!==void 0)return typeof R.length!="number"||A(R.length)?o(0):y(R);if(R.type==="Buffer"&&Array.isArray(R.data))return y(R.data)}function d(R){if(R>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return R|0}function T(R){return+R!=R&&(R=0),a.alloc(+R)}a.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==a.prototype},a.compare=function(u,h){if(te(u,Uint8Array)&&(u=a.from(u,u.offset,u.byteLength)),te(h,Uint8Array)&&(h=a.from(h,h.offset,h.byteLength)),!a.isBuffer(u)||!a.isBuffer(h))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===h)return 0;for(var S=u.length,M=h.length,q=0,j=Math.min(S,M);q<j;++q)if(u[q]!==h[q]){S=u[q],M=h[q];break}return S<M?-1:M<S?1:0},a.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(u,h){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return a.alloc(0);var S;if(h===void 0)for(h=0,S=0;S<u.length;++S)h+=u[S].length;var M=a.allocUnsafe(h),q=0;for(S=0;S<u.length;++S){var j=u[S];if(te(j,Uint8Array))q+j.length>M.length?a.from(j).copy(M,q):Uint8Array.prototype.set.call(M,j,q);else if(a.isBuffer(j))j.copy(M,q);else throw new TypeError('"list" argument must be an Array of Buffers');q+=j.length}return M};function w(R,u){if(a.isBuffer(R))return R.length;if(ArrayBuffer.isView(R)||te(R,ArrayBuffer))return R.byteLength;if(typeof R!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof R);var h=R.length,S=arguments.length>2&&arguments[2]===!0;if(!S&&h===0)return 0;for(var M=!1;;)switch(u){case"ascii":case"latin1":case"binary":return h;case"utf8":case"utf-8":return k(R).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h*2;case"hex":return h>>>1;case"base64":return D(R).length;default:if(M)return S?-1:k(R).length;u=(""+u).toLowerCase(),M=!0}}a.byteLength=w;function p(R,u,h){var S=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((h===void 0||h>this.length)&&(h=this.length),h<=0)||(h>>>=0,u>>>=0,h<=u))return"";for(R||(R="utf8");;)switch(R){case"hex":return Q(this,u,h);case"utf8":case"utf-8":return x(this,u,h);case"ascii":return z(this,u,h);case"latin1":case"binary":return se(this,u,h);case"base64":return U(this,u,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,u,h);default:if(S)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),S=!0}}a.prototype._isBuffer=!0;function E(R,u,h){var S=R[u];R[u]=R[h],R[h]=S}a.prototype.swap16=function(){var u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var h=0;h<u;h+=2)E(this,h,h+1);return this},a.prototype.swap32=function(){var u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var h=0;h<u;h+=4)E(this,h,h+3),E(this,h+1,h+2);return this},a.prototype.swap64=function(){var u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var h=0;h<u;h+=8)E(this,h,h+7),E(this,h+1,h+6),E(this,h+2,h+5),E(this,h+3,h+4);return this},a.prototype.toString=function(){var u=this.length;return u===0?"":arguments.length===0?x(this,0,u):p.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(u){if(!a.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:a.compare(this,u)===0},a.prototype.inspect=function(){var u="",h=r.INSPECT_MAX_BYTES;return u=this.toString("hex",0,h).replace(/(.{2})/g,"$1 ").trim(),this.length>h&&(u+=" ... "),"<Buffer "+u+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(u,h,S,M,q){if(te(u,Uint8Array)&&(u=a.from(u,u.offset,u.byteLength)),!a.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(h===void 0&&(h=0),S===void 0&&(S=u?u.length:0),M===void 0&&(M=0),q===void 0&&(q=this.length),h<0||S>u.length||M<0||q>this.length)throw new RangeError("out of range index");if(M>=q&&h>=S)return 0;if(M>=q)return-1;if(h>=S)return 1;if(h>>>=0,S>>>=0,M>>>=0,q>>>=0,this===u)return 0;for(var j=q-M,ae=S-h,he=Math.min(j,ae),le=this.slice(M,q),ge=u.slice(h,S),ve=0;ve<he;++ve)if(le[ve]!==ge[ve]){j=le[ve],ae=ge[ve];break}return j<ae?-1:ae<j?1:0};function O(R,u,h,S,M){if(R.length===0)return-1;if(typeof h=="string"?(S=h,h=0):h>2147483647?h=2147483647:h<-2147483648&&(h=-2147483648),h=+h,A(h)&&(h=M?0:R.length-1),h<0&&(h=R.length+h),h>=R.length){if(M)return-1;h=R.length-1}else if(h<0)if(M)h=0;else return-1;if(typeof u=="string"&&(u=a.from(u,S)),a.isBuffer(u))return u.length===0?-1:P(R,u,h,S,M);if(typeof u=="number")return u=u&255,typeof Uint8Array.prototype.indexOf=="function"?M?Uint8Array.prototype.indexOf.call(R,u,h):Uint8Array.prototype.lastIndexOf.call(R,u,h):P(R,[u],h,S,M);throw new TypeError("val must be string, number or Buffer")}function P(R,u,h,S,M){var q=1,j=R.length,ae=u.length;if(S!==void 0&&(S=String(S).toLowerCase(),S==="ucs2"||S==="ucs-2"||S==="utf16le"||S==="utf-16le")){if(R.length<2||u.length<2)return-1;q=2,j/=2,ae/=2,h/=2}function he(We,xt){return q===1?We[xt]:We.readUInt16BE(xt*q)}var le;if(M){var ge=-1;for(le=h;le<j;le++)if(he(R,le)===he(u,ge===-1?0:le-ge)){if(ge===-1&&(ge=le),le-ge+1===ae)return ge*q}else ge!==-1&&(le-=le-ge),ge=-1}else for(h+ae>j&&(h=j-ae),le=h;le>=0;le--){for(var ve=!0,_e=0;_e<ae;_e++)if(he(R,le+_e)!==he(u,_e)){ve=!1;break}if(ve)return le}return-1}a.prototype.includes=function(u,h,S){return this.indexOf(u,h,S)!==-1},a.prototype.indexOf=function(u,h,S){return O(this,u,h,S,!0)},a.prototype.lastIndexOf=function(u,h,S){return O(this,u,h,S,!1)};function B(R,u,h,S){h=Number(h)||0;var M=R.length-h;S?(S=Number(S),S>M&&(S=M)):S=M;var q=u.length;S>q/2&&(S=q/2);for(var j=0;j<S;++j){var ae=parseInt(u.substr(j*2,2),16);if(A(ae))return j;R[h+j]=ae}return j}function I(R,u,h,S){return F(k(u,R.length-h),R,h,S)}function K(R,u,h,S){return F(G(u),R,h,S)}function oe(R,u,h,S){return F(D(u),R,h,S)}function N(R,u,h,S){return F(H(u,R.length-h),R,h,S)}a.prototype.write=function(u,h,S,M){if(h===void 0)M="utf8",S=this.length,h=0;else if(S===void 0&&typeof h=="string")M=h,S=this.length,h=0;else if(isFinite(h))h=h>>>0,isFinite(S)?(S=S>>>0,M===void 0&&(M="utf8")):(M=S,S=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var q=this.length-h;if((S===void 0||S>q)&&(S=q),u.length>0&&(S<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");M||(M="utf8");for(var j=!1;;)switch(M){case"hex":return B(this,u,h,S);case"utf8":case"utf-8":return I(this,u,h,S);case"ascii":case"latin1":case"binary":return K(this,u,h,S);case"base64":return oe(this,u,h,S);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,u,h,S);default:if(j)throw new TypeError("Unknown encoding: "+M);M=(""+M).toLowerCase(),j=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(R,u,h){return u===0&&h===R.length?e.fromByteArray(R):e.fromByteArray(R.slice(u,h))}function x(R,u,h){h=Math.min(R.length,h);for(var S=[],M=u;M<h;){var q=R[M],j=null,ae=q>239?4:q>223?3:q>191?2:1;if(M+ae<=h){var he,le,ge,ve;switch(ae){case 1:q<128&&(j=q);break;case 2:he=R[M+1],(he&192)===128&&(ve=(q&31)<<6|he&63,ve>127&&(j=ve));break;case 3:he=R[M+1],le=R[M+2],(he&192)===128&&(le&192)===128&&(ve=(q&15)<<12|(he&63)<<6|le&63,ve>2047&&(ve<55296||ve>57343)&&(j=ve));break;case 4:he=R[M+1],le=R[M+2],ge=R[M+3],(he&192)===128&&(le&192)===128&&(ge&192)===128&&(ve=(q&15)<<18|(he&63)<<12|(le&63)<<6|ge&63,ve>65535&&ve<1114112&&(j=ve))}}j===null?(j=65533,ae=1):j>65535&&(j-=65536,S.push(j>>>10&1023|55296),j=56320|j&1023),S.push(j),M+=ae}return re(S)}var X=4096;function re(R){var u=R.length;if(u<=X)return String.fromCharCode.apply(String,R);for(var h="",S=0;S<u;)h+=String.fromCharCode.apply(String,R.slice(S,S+=X));return h}function z(R,u,h){var S="";h=Math.min(R.length,h);for(var M=u;M<h;++M)S+=String.fromCharCode(R[M]&127);return S}function se(R,u,h){var S="";h=Math.min(R.length,h);for(var M=u;M<h;++M)S+=String.fromCharCode(R[M]);return S}function Q(R,u,h){var S=R.length;(!u||u<0)&&(u=0),(!h||h<0||h>S)&&(h=S);for(var M="",q=u;q<h;++q)M+=ee[R[q]];return M}function me(R,u,h){for(var S=R.slice(u,h),M="",q=0;q<S.length-1;q+=2)M+=String.fromCharCode(S[q]+S[q+1]*256);return M}a.prototype.slice=function(u,h){var S=this.length;u=~~u,h=h===void 0?S:~~h,u<0?(u+=S,u<0&&(u=0)):u>S&&(u=S),h<0?(h+=S,h<0&&(h=0)):h>S&&(h=S),h<u&&(h=u);var M=this.subarray(u,h);return Object.setPrototypeOf(M,a.prototype),M};function Y(R,u,h){if(R%1!==0||R<0)throw new RangeError("offset is not uint");if(R+u>h)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(u,h,S){u=u>>>0,h=h>>>0,S||Y(u,h,this.length);for(var M=this[u],q=1,j=0;++j<h&&(q*=256);)M+=this[u+j]*q;return M},a.prototype.readUintBE=a.prototype.readUIntBE=function(u,h,S){u=u>>>0,h=h>>>0,S||Y(u,h,this.length);for(var M=this[u+--h],q=1;h>0&&(q*=256);)M+=this[u+--h]*q;return M},a.prototype.readUint8=a.prototype.readUInt8=function(u,h){return u=u>>>0,h||Y(u,1,this.length),this[u]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(u,h){return u=u>>>0,h||Y(u,2,this.length),this[u]|this[u+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(u,h){return u=u>>>0,h||Y(u,2,this.length),this[u]<<8|this[u+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(u,h){return u=u>>>0,h||Y(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(u,h){return u=u>>>0,h||Y(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},a.prototype.readIntLE=function(u,h,S){u=u>>>0,h=h>>>0,S||Y(u,h,this.length);for(var M=this[u],q=1,j=0;++j<h&&(q*=256);)M+=this[u+j]*q;return q*=128,M>=q&&(M-=Math.pow(2,8*h)),M},a.prototype.readIntBE=function(u,h,S){u=u>>>0,h=h>>>0,S||Y(u,h,this.length);for(var M=h,q=1,j=this[u+--M];M>0&&(q*=256);)j+=this[u+--M]*q;return q*=128,j>=q&&(j-=Math.pow(2,8*h)),j},a.prototype.readInt8=function(u,h){return u=u>>>0,h||Y(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},a.prototype.readInt16LE=function(u,h){u=u>>>0,h||Y(u,2,this.length);var S=this[u]|this[u+1]<<8;return S&32768?S|4294901760:S},a.prototype.readInt16BE=function(u,h){u=u>>>0,h||Y(u,2,this.length);var S=this[u+1]|this[u]<<8;return S&32768?S|4294901760:S},a.prototype.readInt32LE=function(u,h){return u=u>>>0,h||Y(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},a.prototype.readInt32BE=function(u,h){return u=u>>>0,h||Y(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},a.prototype.readFloatLE=function(u,h){return u=u>>>0,h||Y(u,4,this.length),t.read(this,u,!0,23,4)},a.prototype.readFloatBE=function(u,h){return u=u>>>0,h||Y(u,4,this.length),t.read(this,u,!1,23,4)},a.prototype.readDoubleLE=function(u,h){return u=u>>>0,h||Y(u,8,this.length),t.read(this,u,!0,52,8)},a.prototype.readDoubleBE=function(u,h){return u=u>>>0,h||Y(u,8,this.length),t.read(this,u,!1,52,8)};function L(R,u,h,S,M,q){if(!a.isBuffer(R))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>M||u<q)throw new RangeError('"value" argument is out of bounds');if(h+S>R.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(u,h,S,M){if(u=+u,h=h>>>0,S=S>>>0,!M){var q=Math.pow(2,8*S)-1;L(this,u,h,S,q,0)}var j=1,ae=0;for(this[h]=u&255;++ae<S&&(j*=256);)this[h+ae]=u/j&255;return h+S},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(u,h,S,M){if(u=+u,h=h>>>0,S=S>>>0,!M){var q=Math.pow(2,8*S)-1;L(this,u,h,S,q,0)}var j=S-1,ae=1;for(this[h+j]=u&255;--j>=0&&(ae*=256);)this[h+j]=u/ae&255;return h+S},a.prototype.writeUint8=a.prototype.writeUInt8=function(u,h,S){return u=+u,h=h>>>0,S||L(this,u,h,1,255,0),this[h]=u&255,h+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(u,h,S){return u=+u,h=h>>>0,S||L(this,u,h,2,65535,0),this[h]=u&255,this[h+1]=u>>>8,h+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(u,h,S){return u=+u,h=h>>>0,S||L(this,u,h,2,65535,0),this[h]=u>>>8,this[h+1]=u&255,h+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(u,h,S){return u=+u,h=h>>>0,S||L(this,u,h,4,4294967295,0),this[h+3]=u>>>24,this[h+2]=u>>>16,this[h+1]=u>>>8,this[h]=u&255,h+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(u,h,S){return u=+u,h=h>>>0,S||L(this,u,h,4,4294967295,0),this[h]=u>>>24,this[h+1]=u>>>16,this[h+2]=u>>>8,this[h+3]=u&255,h+4},a.prototype.writeIntLE=function(u,h,S,M){if(u=+u,h=h>>>0,!M){var q=Math.pow(2,8*S-1);L(this,u,h,S,q-1,-q)}var j=0,ae=1,he=0;for(this[h]=u&255;++j<S&&(ae*=256);)u<0&&he===0&&this[h+j-1]!==0&&(he=1),this[h+j]=(u/ae>>0)-he&255;return h+S},a.prototype.writeIntBE=function(u,h,S,M){if(u=+u,h=h>>>0,!M){var q=Math.pow(2,8*S-1);L(this,u,h,S,q-1,-q)}var j=S-1,ae=1,he=0;for(this[h+j]=u&255;--j>=0&&(ae*=256);)u<0&&he===0&&this[h+j+1]!==0&&(he=1),this[h+j]=(u/ae>>0)-he&255;return h+S},a.prototype.writeInt8=function(u,h,S){return u=+u,h=h>>>0,S||L(this,u,h,1,127,-128),u<0&&(u=255+u+1),this[h]=u&255,h+1},a.prototype.writeInt16LE=function(u,h,S){return u=+u,h=h>>>0,S||L(this,u,h,2,32767,-32768),this[h]=u&255,this[h+1]=u>>>8,h+2},a.prototype.writeInt16BE=function(u,h,S){return u=+u,h=h>>>0,S||L(this,u,h,2,32767,-32768),this[h]=u>>>8,this[h+1]=u&255,h+2},a.prototype.writeInt32LE=function(u,h,S){return u=+u,h=h>>>0,S||L(this,u,h,4,2147483647,-2147483648),this[h]=u&255,this[h+1]=u>>>8,this[h+2]=u>>>16,this[h+3]=u>>>24,h+4},a.prototype.writeInt32BE=function(u,h,S){return u=+u,h=h>>>0,S||L(this,u,h,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[h]=u>>>24,this[h+1]=u>>>16,this[h+2]=u>>>8,this[h+3]=u&255,h+4};function V(R,u,h,S,M,q){if(h+S>R.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("Index out of range")}function Z(R,u,h,S,M){return u=+u,h=h>>>0,M||V(R,u,h,4),t.write(R,u,h,S,23,4),h+4}a.prototype.writeFloatLE=function(u,h,S){return Z(this,u,h,!0,S)},a.prototype.writeFloatBE=function(u,h,S){return Z(this,u,h,!1,S)};function ie(R,u,h,S,M){return u=+u,h=h>>>0,M||V(R,u,h,8),t.write(R,u,h,S,52,8),h+8}a.prototype.writeDoubleLE=function(u,h,S){return ie(this,u,h,!0,S)},a.prototype.writeDoubleBE=function(u,h,S){return ie(this,u,h,!1,S)},a.prototype.copy=function(u,h,S,M){if(!a.isBuffer(u))throw new TypeError("argument should be a Buffer");if(S||(S=0),!M&&M!==0&&(M=this.length),h>=u.length&&(h=u.length),h||(h=0),M>0&&M<S&&(M=S),M===S||u.length===0||this.length===0)return 0;if(h<0)throw new RangeError("targetStart out of bounds");if(S<0||S>=this.length)throw new RangeError("Index out of range");if(M<0)throw new RangeError("sourceEnd out of bounds");M>this.length&&(M=this.length),u.length-h<M-S&&(M=u.length-h+S);var q=M-S;return this===u&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(h,S,M):Uint8Array.prototype.set.call(u,this.subarray(S,M),h),q},a.prototype.fill=function(u,h,S,M){if(typeof u=="string"){if(typeof h=="string"?(M=h,h=0,S=this.length):typeof S=="string"&&(M=S,S=this.length),M!==void 0&&typeof M!="string")throw new TypeError("encoding must be a string");if(typeof M=="string"&&!a.isEncoding(M))throw new TypeError("Unknown encoding: "+M);if(u.length===1){var q=u.charCodeAt(0);(M==="utf8"&&q<128||M==="latin1")&&(u=q)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(h<0||this.length<h||this.length<S)throw new RangeError("Out of range index");if(S<=h)return this;h=h>>>0,S=S===void 0?this.length:S>>>0,u||(u=0);var j;if(typeof u=="number")for(j=h;j<S;++j)this[j]=u;else{var ae=a.isBuffer(u)?u:a.from(u,M),he=ae.length;if(he===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(j=0;j<S-h;++j)this[j+h]=ae[j%he]}return this};var $=/[^+/0-9A-Za-z-_]/g;function C(R){if(R=R.split("=")[0],R=R.trim().replace($,""),R.length<2)return"";for(;R.length%4!==0;)R=R+"=";return R}function k(R,u){u=u||1/0;for(var h,S=R.length,M=null,q=[],j=0;j<S;++j){if(h=R.charCodeAt(j),h>55295&&h<57344){if(!M){if(h>56319){(u-=3)>-1&&q.push(239,191,189);continue}else if(j+1===S){(u-=3)>-1&&q.push(239,191,189);continue}M=h;continue}if(h<56320){(u-=3)>-1&&q.push(239,191,189),M=h;continue}h=(M-55296<<10|h-56320)+65536}else M&&(u-=3)>-1&&q.push(239,191,189);if(M=null,h<128){if((u-=1)<0)break;q.push(h)}else if(h<2048){if((u-=2)<0)break;q.push(h>>6|192,h&63|128)}else if(h<65536){if((u-=3)<0)break;q.push(h>>12|224,h>>6&63|128,h&63|128)}else if(h<1114112){if((u-=4)<0)break;q.push(h>>18|240,h>>12&63|128,h>>6&63|128,h&63|128)}else throw new Error("Invalid code point")}return q}function G(R){for(var u=[],h=0;h<R.length;++h)u.push(R.charCodeAt(h)&255);return u}function H(R,u){for(var h,S,M,q=[],j=0;j<R.length&&!((u-=2)<0);++j)h=R.charCodeAt(j),S=h>>8,M=h%256,q.push(M),q.push(S);return q}function D(R){return e.toByteArray(C(R))}function F(R,u,h,S){for(var M=0;M<S&&!(M+h>=u.length||M>=R.length);++M)u[M+h]=R[M];return M}function te(R,u){return R instanceof u||R!=null&&R.constructor!=null&&R.constructor.name!=null&&R.constructor.name===u.name}function A(R){return R!==R}var ee=(function(){for(var R="0123456789abcdef",u=new Array(256),h=0;h<16;++h)for(var S=h*16,M=0;M<16;++M)u[S+M]=R[h]+R[M];return u})()})(jn)),jn}var Wn={},zn={},Gn,co;function ho(){return co||(co=1,Gn=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==i||a.enumerable!==!0)return!1}return!0}),Gn}var Kn,fo;function qn(){if(fo)return Kn;fo=1;var r=ho();return Kn=function(){return r()&&!!Symbol.toStringTag},Kn}var Vn,po;function mo(){return po||(po=1,Vn=Object),Vn}var $n,go;function mp(){return go||(go=1,$n=Error),$n}var Xn,wo;function gp(){return wo||(wo=1,Xn=EvalError),Xn}var Yn,yo;function wp(){return yo||(yo=1,Yn=RangeError),Yn}var Zn,vo;function yp(){return vo||(vo=1,Zn=ReferenceError),Zn}var Jn,bo;function _o(){return bo||(bo=1,Jn=SyntaxError),Jn}var Qn,To;function Wr(){return To||(To=1,Qn=TypeError),Qn}var ei,Eo;function vp(){return Eo||(Eo=1,ei=URIError),ei}var ti,Ao;function bp(){return Ao||(Ao=1,ti=Math.abs),ti}var ri,So;function _p(){return So||(So=1,ri=Math.floor),ri}var ni,xo;function Tp(){return xo||(xo=1,ni=Math.max),ni}var ii,ko;function Ep(){return ko||(ko=1,ii=Math.min),ii}var si,Co;function Ap(){return Co||(Co=1,si=Math.pow),si}var ai,Ro;function Sp(){return Ro||(Ro=1,ai=Math.round),ai}var oi,Io;function xp(){return Io||(Io=1,oi=Number.isNaN||function(e){return e!==e}),oi}var li,No;function kp(){if(No)return li;No=1;var r=xp();return li=function(t){return r(t)||t===0?t:t<0?-1:1},li}var ui,Oo;function Cp(){return Oo||(Oo=1,ui=Object.getOwnPropertyDescriptor),ui}var ci,Po;function rr(){if(Po)return ci;Po=1;var r=Cp();if(r)try{r([],"length")}catch{r=null}return ci=r,ci}var hi,Lo;function zr(){if(Lo)return hi;Lo=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return hi=r,hi}var fi,Do;function Rp(){if(Do)return fi;Do=1;var r=typeof Symbol<"u"&&Symbol,e=ho();return fi=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},fi}var di,Fo;function Bo(){return Fo||(Fo=1,di=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),di}var pi,Mo;function Ho(){if(Mo)return pi;Mo=1;var r=mo();return pi=r.getPrototypeOf||null,pi}var mi,Uo;function Ip(){if(Uo)return mi;Uo=1;var r="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,n="[object Function]",i=function(l,c){for(var f=[],m=0;m<l.length;m+=1)f[m]=l[m];for(var v=0;v<c.length;v+=1)f[v+l.length]=c[v];return f},s=function(l,c){for(var f=[],m=c,v=0;m<l.length;m+=1,v+=1)f[v]=l[m];return f},o=function(a,l){for(var c="",f=0;f<a.length;f+=1)c+=a[f],f+1<a.length&&(c+=l);return c};return mi=function(l){var c=this;if(typeof c!="function"||e.apply(c)!==n)throw new TypeError(r+c);for(var f=s(arguments,1),m,v=function(){if(this instanceof m){var d=c.apply(this,i(f,arguments));return Object(d)===d?d:this}return c.apply(l,i(f,arguments))},y=t(0,c.length-f.length),b=[],g=0;g<y;g++)b[g]="$"+g;if(m=Function("binder","return function ("+o(b,",")+"){ return binder.apply(this,arguments); }")(v),c.prototype){var _=function(){};_.prototype=c.prototype,m.prototype=new _,_.prototype=null}return m},mi}var gi,jo;function nr(){if(jo)return gi;jo=1;var r=Ip();return gi=Function.prototype.bind||r,gi}var wi,Wo;function yi(){return Wo||(Wo=1,wi=Function.prototype.call),wi}var vi,zo;function bi(){return zo||(zo=1,vi=Function.prototype.apply),vi}var _i,Go;function Np(){return Go||(Go=1,_i=typeof Reflect<"u"&&Reflect&&Reflect.apply),_i}var Ti,Ko;function qo(){if(Ko)return Ti;Ko=1;var r=nr(),e=bi(),t=yi(),n=Np();return Ti=n||r.call(t,e),Ti}var Ei,Vo;function Ai(){if(Vo)return Ei;Vo=1;var r=nr(),e=Wr(),t=yi(),n=qo();return Ei=function(s){if(s.length<1||typeof s[0]!="function")throw new e("a function is required");return n(r,t,s)},Ei}var Si,$o;function Op(){if($o)return Si;$o=1;var r=Ai(),e=rr(),t;try{t=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var n=!!t&&e&&e(Object.prototype,"__proto__"),i=Object,s=i.getPrototypeOf;return Si=n&&typeof n.get=="function"?r([n.get]):typeof s=="function"?(function(a){return s(a==null?a:i(a))}):!1,Si}var xi,Xo;function Yo(){if(Xo)return xi;Xo=1;var r=Bo(),e=Ho(),t=Op();return xi=r?function(i){return r(i)}:e?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return e(i)}:t?function(i){return t(i)}:null,xi}var ki,Zo;function Pp(){if(Zo)return ki;Zo=1;var r=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=nr();return ki=t.call(r,e),ki}var Ci,Jo;function Qo(){if(Jo)return Ci;Jo=1;var r,e=mo(),t=mp(),n=gp(),i=wp(),s=yp(),o=_o(),a=Wr(),l=vp(),c=bp(),f=_p(),m=Tp(),v=Ep(),y=Ap(),b=Sp(),g=kp(),_=Function,d=function(G){try{return _('"use strict"; return ('+G+").constructor;")()}catch{}},T=rr(),w=zr(),p=function(){throw new a},E=T?(function(){try{return arguments.callee,p}catch{try{return T(arguments,"callee").get}catch{return p}}})():p,O=Rp()(),P=Yo(),B=Ho(),I=Bo(),K=bi(),oe=yi(),N={},U=typeof Uint8Array>"u"||!P?r:P(Uint8Array),x={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":O&&P?P([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":_,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":O&&P?P(P([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!O||!P?r:P(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":T,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":i,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!O||!P?r:P(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":O&&P?P(""[Symbol.iterator]()):r,"%Symbol%":O?Symbol:r,"%SyntaxError%":o,"%ThrowTypeError%":E,"%TypedArray%":U,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":oe,"%Function.prototype.apply%":K,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":B,"%Math.abs%":c,"%Math.floor%":f,"%Math.max%":m,"%Math.min%":v,"%Math.pow%":y,"%Math.round%":b,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(P)try{null.error}catch(G){var X=P(P(G));x["%Error.prototype%"]=X}var re=function G(H){var D;if(H==="%AsyncFunction%")D=d("async function () {}");else if(H==="%GeneratorFunction%")D=d("function* () {}");else if(H==="%AsyncGeneratorFunction%")D=d("async function* () {}");else if(H==="%AsyncGenerator%"){var F=G("%AsyncGeneratorFunction%");F&&(D=F.prototype)}else if(H==="%AsyncIteratorPrototype%"){var te=G("%AsyncGenerator%");te&&P&&(D=P(te.prototype))}return x[H]=D,D},z={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},se=nr(),Q=Pp(),me=se.call(oe,Array.prototype.concat),Y=se.call(K,Array.prototype.splice),L=se.call(oe,String.prototype.replace),V=se.call(oe,String.prototype.slice),Z=se.call(oe,RegExp.prototype.exec),ie=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$=/\\(\\)?/g,C=function(H){var D=V(H,0,1),F=V(H,-1);if(D==="%"&&F!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(F==="%"&&D!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var te=[];return L(H,ie,function(A,ee,R,u){te[te.length]=R?L(u,$,"$1"):ee||A}),te},k=function(H,D){var F=H,te;if(Q(z,F)&&(te=z[F],F="%"+te[0]+"%"),Q(x,F)){var A=x[F];if(A===N&&(A=re(F)),typeof A>"u"&&!D)throw new a("intrinsic "+H+" exists, but is not available. Please file an issue!");return{alias:te,name:F,value:A}}throw new o("intrinsic "+H+" does not exist!")};return Ci=function(H,D){if(typeof H!="string"||H.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof D!="boolean")throw new a('"allowMissing" argument must be a boolean');if(Z(/^%?[^%]*%?$/,H)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var F=C(H),te=F.length>0?F[0]:"",A=k("%"+te+"%",D),ee=A.name,R=A.value,u=!1,h=A.alias;h&&(te=h[0],Y(F,me([0,1],h)));for(var S=1,M=!0;S<F.length;S+=1){var q=F[S],j=V(q,0,1),ae=V(q,-1);if((j==='"'||j==="'"||j==="`"||ae==='"'||ae==="'"||ae==="`")&&j!==ae)throw new o("property names with quotes must have matching quotes");if((q==="constructor"||!M)&&(u=!0),te+="."+q,ee="%"+te+"%",Q(x,ee))R=x[ee];else if(R!=null){if(!(q in R)){if(!D)throw new a("base intrinsic for "+H+" exists, but the property is not available.");return}if(T&&S+1>=F.length){var he=T(R,q);M=!!he,M&&"get"in he&&!("originalValue"in he.get)?R=he.get:R=R[q]}else M=Q(R,q),R=R[q];M&&!u&&(x[ee]=R)}}return R},Ci}var Ri,el;function tl(){if(el)return Ri;el=1;var r=Qo(),e=Ai(),t=e([r("%String.prototype.indexOf%")]);return Ri=function(i,s){var o=r(i,!!s);return typeof o=="function"&&t(i,".prototype.")>-1?e([o]):o},Ri}var Ii,rl;function Lp(){if(rl)return Ii;rl=1;var r=qn()(),e=tl(),t=e("Object.prototype.toString"),n=function(a){return r&&a&&typeof a=="object"&&Symbol.toStringTag in a?!1:t(a)==="[object Arguments]"},i=function(a){return n(a)?!0:a!==null&&typeof a=="object"&&"length"in a&&typeof a.length=="number"&&a.length>=0&&t(a)!=="[object Array]"&&"callee"in a&&t(a.callee)==="[object Function]"},s=(function(){return n(arguments)})();return n.isLegacyArguments=i,Ii=s?n:i,Ii}var Ni,nl;function Dp(){if(nl)return Ni;nl=1;var r=Object.prototype.toString,e=Function.prototype.toString,t=/^\s*(?:function)?\*/,n=qn()(),i=Object.getPrototypeOf,s=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch{}},o;return Ni=function(l){if(typeof l!="function")return!1;if(t.test(e.call(l)))return!0;if(!n){var c=r.call(l);return c==="[object GeneratorFunction]"}if(!i)return!1;if(typeof o>"u"){var f=s();o=f?i(f):!1}return i(l)===o},Ni}var Oi,il;function Fp(){if(il)return Oi;il=1;var r=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,t,n;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},e(function(){throw 42},null,t)}catch(T){T!==n&&(e=null)}else e=null;var i=/^\s*class\b/,s=function(w){try{var p=r.call(w);return i.test(p)}catch{return!1}},o=function(w){try{return s(w)?!1:(r.call(w),!0)}catch{return!1}},a=Object.prototype.toString,l="[object Object]",c="[object Function]",f="[object GeneratorFunction]",m="[object HTMLAllCollection]",v="[object HTML document.all class]",y="[object HTMLCollection]",b=typeof Symbol=="function"&&!!Symbol.toStringTag,g=!(0 in[,]),_=function(){return!1};if(typeof document=="object"){var d=document.all;a.call(d)===a.call(document.all)&&(_=function(w){if((g||!w)&&(typeof w>"u"||typeof w=="object"))try{var p=a.call(w);return(p===m||p===v||p===y||p===l)&&w("")==null}catch{}return!1})}return Oi=e?function(w){if(_(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{e(w,null,t)}catch(p){if(p!==n)return!1}return!s(w)&&o(w)}:function(w){if(_(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;if(b)return o(w);if(s(w))return!1;var p=a.call(w);return p!==c&&p!==f&&!/^\[object HTML/.test(p)?!1:o(w)},Oi}var Pi,sl;function Bp(){if(sl)return Pi;sl=1;var r=Fp(),e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,n=function(l,c,f){for(var m=0,v=l.length;m<v;m++)t.call(l,m)&&(f==null?c(l[m],m,l):c.call(f,l[m],m,l))},i=function(l,c,f){for(var m=0,v=l.length;m<v;m++)f==null?c(l.charAt(m),m,l):c.call(f,l.charAt(m),m,l)},s=function(l,c,f){for(var m in l)t.call(l,m)&&(f==null?c(l[m],m,l):c.call(f,l[m],m,l))};function o(a){return e.call(a)==="[object Array]"}return Pi=function(l,c,f){if(!r(c))throw new TypeError("iterator must be a function");var m;arguments.length>=3&&(m=f),o(l)?n(l,c,m):typeof l=="string"?i(l,c,m):s(l,c,m)},Pi}var Li,al;function Mp(){return al||(al=1,Li=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Li}var Di,ol;function Hp(){if(ol)return Di;ol=1;var r=Mp(),e=typeof globalThis>"u"?$e:globalThis;return Di=function(){for(var n=[],i=0;i<r.length;i++)typeof e[r[i]]=="function"&&(n[n.length]=r[i]);return n},Di}var Fi={exports:{}},Bi,ll;function Up(){if(ll)return Bi;ll=1;var r=zr(),e=_o(),t=Wr(),n=rr();return Bi=function(s,o,a){if(!s||typeof s!="object"&&typeof s!="function")throw new t("`obj` must be an object or a function`");if(typeof o!="string"&&typeof o!="symbol")throw new t("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new t("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new t("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new t("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new t("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,m=arguments.length>6?arguments[6]:!1,v=!!n&&n(s,o);if(r)r(s,o,{configurable:f===null&&v?v.configurable:!f,enumerable:l===null&&v?v.enumerable:!l,value:a,writable:c===null&&v?v.writable:!c});else if(m||!l&&!c&&!f)s[o]=a;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Bi}var Mi,ul;function jp(){if(ul)return Mi;ul=1;var r=zr(),e=function(){return!!r};return e.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},Mi=e,Mi}var Hi,cl;function Wp(){if(cl)return Hi;cl=1;var r=Qo(),e=Up(),t=jp()(),n=rr(),i=Wr(),s=r("%Math.floor%");return Hi=function(a,l){if(typeof a!="function")throw new i("`fn` is not a function");if(typeof l!="number"||l<0||l>4294967295||s(l)!==l)throw new i("`length` must be a positive 32-bit integer");var c=arguments.length>2&&!!arguments[2],f=!0,m=!0;if("length"in a&&n){var v=n(a,"length");v&&!v.configurable&&(f=!1),v&&!v.writable&&(m=!1)}return(f||m||!c)&&(t?e(a,"length",l,!0,!0):e(a,"length",l)),a},Hi}var Ui,hl;function zp(){if(hl)return Ui;hl=1;var r=nr(),e=bi(),t=qo();return Ui=function(){return t(r,e,arguments)},Ui}var fl;function Gp(){return fl||(fl=1,(function(r){var e=Wp(),t=zr(),n=Ai(),i=zp();r.exports=function(o){var a=n(arguments),l=o.length-(arguments.length-1);return e(a,1+(l>0?l:0),!0)},t?t(r.exports,"apply",{value:i}):r.exports.apply=i})(Fi)),Fi.exports}var ji,dl;function pl(){if(dl)return ji;dl=1;var r=Bp(),e=Hp(),t=Gp(),n=tl(),i=rr(),s=Yo(),o=n("Object.prototype.toString"),a=qn()(),l=typeof globalThis>"u"?$e:globalThis,c=e(),f=n("String.prototype.slice"),m=n("Array.prototype.indexOf",!0)||function(_,d){for(var T=0;T<_.length;T+=1)if(_[T]===d)return T;return-1},v={__proto__:null};a&&i&&s?r(c,function(g){var _=new l[g];if(Symbol.toStringTag in _&&s){var d=s(_),T=i(d,Symbol.toStringTag);if(!T&&d){var w=s(d);T=i(w,Symbol.toStringTag)}v["$"+g]=t(T.get)}}):r(c,function(g){var _=new l[g],d=_.slice||_.set;d&&(v["$"+g]=t(d))});var y=function(_){var d=!1;return r(v,function(T,w){if(!d)try{"$"+T(_)===w&&(d=f(w,1))}catch{}}),d},b=function(_){var d=!1;return r(v,function(T,w){if(!d)try{T(_),d=f(w,1)}catch{}}),d};return ji=function(_){if(!_||typeof _!="object")return!1;if(!a){var d=f(o(_),8,-1);return m(c,d)>-1?d:d!=="Object"?!1:b(_)}return i?y(_):null},ji}var Wi,ml;function Kp(){if(ml)return Wi;ml=1;var r=pl();return Wi=function(t){return!!r(t)},Wi}var gl;function qp(){return gl||(gl=1,(function(r){var e=Lp(),t=Dp(),n=pl(),i=Kp();function s(S){return S.call.bind(S)}var o=typeof BigInt<"u",a=typeof Symbol<"u",l=s(Object.prototype.toString),c=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),m=s(Boolean.prototype.valueOf);if(o)var v=s(BigInt.prototype.valueOf);if(a)var y=s(Symbol.prototype.valueOf);function b(S,M){if(typeof S!="object")return!1;try{return M(S),!0}catch{return!1}}r.isArgumentsObject=e,r.isGeneratorFunction=t,r.isTypedArray=i;function g(S){return typeof Promise<"u"&&S instanceof Promise||S!==null&&typeof S=="object"&&typeof S.then=="function"&&typeof S.catch=="function"}r.isPromise=g;function _(S){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(S):i(S)||V(S)}r.isArrayBufferView=_;function d(S){return n(S)==="Uint8Array"}r.isUint8Array=d;function T(S){return n(S)==="Uint8ClampedArray"}r.isUint8ClampedArray=T;function w(S){return n(S)==="Uint16Array"}r.isUint16Array=w;function p(S){return n(S)==="Uint32Array"}r.isUint32Array=p;function E(S){return n(S)==="Int8Array"}r.isInt8Array=E;function O(S){return n(S)==="Int16Array"}r.isInt16Array=O;function P(S){return n(S)==="Int32Array"}r.isInt32Array=P;function B(S){return n(S)==="Float32Array"}r.isFloat32Array=B;function I(S){return n(S)==="Float64Array"}r.isFloat64Array=I;function K(S){return n(S)==="BigInt64Array"}r.isBigInt64Array=K;function oe(S){return n(S)==="BigUint64Array"}r.isBigUint64Array=oe;function N(S){return l(S)==="[object Map]"}N.working=typeof Map<"u"&&N(new Map);function U(S){return typeof Map>"u"?!1:N.working?N(S):S instanceof Map}r.isMap=U;function x(S){return l(S)==="[object Set]"}x.working=typeof Set<"u"&&x(new Set);function X(S){return typeof Set>"u"?!1:x.working?x(S):S instanceof Set}r.isSet=X;function re(S){return l(S)==="[object WeakMap]"}re.working=typeof WeakMap<"u"&&re(new WeakMap);function z(S){return typeof WeakMap>"u"?!1:re.working?re(S):S instanceof WeakMap}r.isWeakMap=z;function se(S){return l(S)==="[object WeakSet]"}se.working=typeof WeakSet<"u"&&se(new WeakSet);function Q(S){return se(S)}r.isWeakSet=Q;function me(S){return l(S)==="[object ArrayBuffer]"}me.working=typeof ArrayBuffer<"u"&&me(new ArrayBuffer);function Y(S){return typeof ArrayBuffer>"u"?!1:me.working?me(S):S instanceof ArrayBuffer}r.isArrayBuffer=Y;function L(S){return l(S)==="[object DataView]"}L.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&L(new DataView(new ArrayBuffer(1),0,1));function V(S){return typeof DataView>"u"?!1:L.working?L(S):S instanceof DataView}r.isDataView=V;var Z=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ie(S){return l(S)==="[object SharedArrayBuffer]"}function $(S){return typeof Z>"u"?!1:(typeof ie.working>"u"&&(ie.working=ie(new Z)),ie.working?ie(S):S instanceof Z)}r.isSharedArrayBuffer=$;function C(S){return l(S)==="[object AsyncFunction]"}r.isAsyncFunction=C;function k(S){return l(S)==="[object Map Iterator]"}r.isMapIterator=k;function G(S){return l(S)==="[object Set Iterator]"}r.isSetIterator=G;function H(S){return l(S)==="[object Generator]"}r.isGeneratorObject=H;function D(S){return l(S)==="[object WebAssembly.Module]"}r.isWebAssemblyCompiledModule=D;function F(S){return b(S,c)}r.isNumberObject=F;function te(S){return b(S,f)}r.isStringObject=te;function A(S){return b(S,m)}r.isBooleanObject=A;function ee(S){return o&&b(S,v)}r.isBigIntObject=ee;function R(S){return a&&b(S,y)}r.isSymbolObject=R;function u(S){return F(S)||te(S)||A(S)||ee(S)||R(S)}r.isBoxedPrimitive=u;function h(S){return typeof Uint8Array<"u"&&(Y(S)||$(S))}r.isAnyArrayBuffer=h,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(S){Object.defineProperty(r,S,{enumerable:!1,value:function(){throw new Error(S+" is not supported in userland")}})})})(zn)),zn}var zi,wl;function Vp(){return wl||(wl=1,zi=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),zi}var yl;function vl(){return yl||(yl=1,(function(r){var e=Object.getOwnPropertyDescriptors||function(V){for(var Z=Object.keys(V),ie={},$=0;$<Z.length;$++)ie[Z[$]]=Object.getOwnPropertyDescriptor(V,Z[$]);return ie},t=/%[sdj%]/g;r.format=function(L){if(!E(L)){for(var V=[],Z=0;Z<arguments.length;Z++)V.push(o(arguments[Z]));return V.join(" ")}for(var Z=1,ie=arguments,$=ie.length,C=String(L).replace(t,function(G){if(G==="%%")return"%";if(Z>=$)return G;switch(G){case"%s":return String(ie[Z++]);case"%d":return Number(ie[Z++]);case"%j":try{return JSON.stringify(ie[Z++])}catch{return"[Circular]"}default:return G}}),k=ie[Z];Z<$;k=ie[++Z])T(k)||!I(k)?C+=" "+k:C+=" "+o(k);return C},r.deprecate=function(L,V){if(typeof Ae<"u"&&Ae.noDeprecation===!0)return L;if(typeof Ae>"u")return function(){return r.deprecate(L,V).apply(this,arguments)};var Z=!1;function ie(){if(!Z){if(Ae.throwDeprecation)throw new Error(V);Ae.traceDeprecation?console.trace(V):console.error(V),Z=!0}return L.apply(this,arguments)}return ie};var n={},i=/^$/;if(Ae.env.NODE_DEBUG){var s=Ae.env.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+s+"$","i")}r.debuglog=function(L){if(L=L.toUpperCase(),!n[L])if(i.test(L)){var V=Ae.pid;n[L]=function(){var Z=r.format.apply(r,arguments);console.error("%s %d: %s",L,V,Z)}}else n[L]=function(){};return n[L]};function o(L,V){var Z={seen:[],stylize:l};return arguments.length>=3&&(Z.depth=arguments[2]),arguments.length>=4&&(Z.colors=arguments[3]),d(V)?Z.showHidden=V:V&&r._extend(Z,V),P(Z.showHidden)&&(Z.showHidden=!1),P(Z.depth)&&(Z.depth=2),P(Z.colors)&&(Z.colors=!1),P(Z.customInspect)&&(Z.customInspect=!0),Z.colors&&(Z.stylize=a),f(Z,L,Z.depth)}r.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function a(L,V){var Z=o.styles[V];return Z?"\x1B["+o.colors[Z][0]+"m"+L+"\x1B["+o.colors[Z][1]+"m":L}function l(L,V){return L}function c(L){var V={};return L.forEach(function(Z,ie){V[Z]=!0}),V}function f(L,V,Z){if(L.customInspect&&V&&N(V.inspect)&&V.inspect!==r.inspect&&!(V.constructor&&V.constructor.prototype===V)){var ie=V.inspect(Z,L);return E(ie)||(ie=f(L,ie,Z)),ie}var $=m(L,V);if($)return $;var C=Object.keys(V),k=c(C);if(L.showHidden&&(C=Object.getOwnPropertyNames(V)),oe(V)&&(C.indexOf("message")>=0||C.indexOf("description")>=0))return v(V);if(C.length===0){if(N(V)){var G=V.name?": "+V.name:"";return L.stylize("[Function"+G+"]","special")}if(B(V))return L.stylize(RegExp.prototype.toString.call(V),"regexp");if(K(V))return L.stylize(Date.prototype.toString.call(V),"date");if(oe(V))return v(V)}var H="",D=!1,F=["{","}"];if(_(V)&&(D=!0,F=["[","]"]),N(V)){var te=V.name?": "+V.name:"";H=" [Function"+te+"]"}if(B(V)&&(H=" "+RegExp.prototype.toString.call(V)),K(V)&&(H=" "+Date.prototype.toUTCString.call(V)),oe(V)&&(H=" "+v(V)),C.length===0&&(!D||V.length==0))return F[0]+H+F[1];if(Z<0)return B(V)?L.stylize(RegExp.prototype.toString.call(V),"regexp"):L.stylize("[Object]","special");L.seen.push(V);var A;return D?A=y(L,V,Z,k,C):A=C.map(function(ee){return b(L,V,Z,k,ee,D)}),L.seen.pop(),g(A,H,F)}function m(L,V){if(P(V))return L.stylize("undefined","undefined");if(E(V)){var Z="'"+JSON.stringify(V).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return L.stylize(Z,"string")}if(p(V))return L.stylize(""+V,"number");if(d(V))return L.stylize(""+V,"boolean");if(T(V))return L.stylize("null","null")}function v(L){return"["+Error.prototype.toString.call(L)+"]"}function y(L,V,Z,ie,$){for(var C=[],k=0,G=V.length;k<G;++k)se(V,String(k))?C.push(b(L,V,Z,ie,String(k),!0)):C.push("");return $.forEach(function(H){H.match(/^\d+$/)||C.push(b(L,V,Z,ie,H,!0))}),C}function b(L,V,Z,ie,$,C){var k,G,H;if(H=Object.getOwnPropertyDescriptor(V,$)||{value:V[$]},H.get?H.set?G=L.stylize("[Getter/Setter]","special"):G=L.stylize("[Getter]","special"):H.set&&(G=L.stylize("[Setter]","special")),se(ie,$)||(k="["+$+"]"),G||(L.seen.indexOf(H.value)<0?(T(Z)?G=f(L,H.value,null):G=f(L,H.value,Z-1),G.indexOf(`
|
|
112
|
+
`)>-1&&(C?G=G.split(`
|
|
113
|
+
`).map(function(D){return" "+D}).join(`
|
|
114
|
+
`).slice(2):G=`
|
|
115
|
+
`+G.split(`
|
|
116
|
+
`).map(function(D){return" "+D}).join(`
|
|
117
|
+
`))):G=L.stylize("[Circular]","special")),P(k)){if(C&&$.match(/^\d+$/))return G;k=JSON.stringify(""+$),k.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(k=k.slice(1,-1),k=L.stylize(k,"name")):(k=k.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),k=L.stylize(k,"string"))}return k+": "+G}function g(L,V,Z){var ie=L.reduce(function($,C){return C.indexOf(`
|
|
118
|
+
`)>=0,$+C.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ie>60?Z[0]+(V===""?"":V+`
|
|
119
|
+
`)+" "+L.join(`,
|
|
120
|
+
`)+" "+Z[1]:Z[0]+V+" "+L.join(", ")+" "+Z[1]}r.types=qp();function _(L){return Array.isArray(L)}r.isArray=_;function d(L){return typeof L=="boolean"}r.isBoolean=d;function T(L){return L===null}r.isNull=T;function w(L){return L==null}r.isNullOrUndefined=w;function p(L){return typeof L=="number"}r.isNumber=p;function E(L){return typeof L=="string"}r.isString=E;function O(L){return typeof L=="symbol"}r.isSymbol=O;function P(L){return L===void 0}r.isUndefined=P;function B(L){return I(L)&&x(L)==="[object RegExp]"}r.isRegExp=B,r.types.isRegExp=B;function I(L){return typeof L=="object"&&L!==null}r.isObject=I;function K(L){return I(L)&&x(L)==="[object Date]"}r.isDate=K,r.types.isDate=K;function oe(L){return I(L)&&(x(L)==="[object Error]"||L instanceof Error)}r.isError=oe,r.types.isNativeError=oe;function N(L){return typeof L=="function"}r.isFunction=N;function U(L){return L===null||typeof L=="boolean"||typeof L=="number"||typeof L=="string"||typeof L=="symbol"||typeof L>"u"}r.isPrimitive=U,r.isBuffer=Vp();function x(L){return Object.prototype.toString.call(L)}function X(L){return L<10?"0"+L.toString(10):L.toString(10)}var re=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function z(){var L=new Date,V=[X(L.getHours()),X(L.getMinutes()),X(L.getSeconds())].join(":");return[L.getDate(),re[L.getMonth()],V].join(" ")}r.log=function(){console.log("%s - %s",z(),r.format.apply(r,arguments))},r.inherits=bt(),r._extend=function(L,V){if(!V||!I(V))return L;for(var Z=Object.keys(V),ie=Z.length;ie--;)L[Z[ie]]=V[Z[ie]];return L};function se(L,V){return Object.prototype.hasOwnProperty.call(L,V)}var Q=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;r.promisify=function(V){if(typeof V!="function")throw new TypeError('The "original" argument must be of type Function');if(Q&&V[Q]){var Z=V[Q];if(typeof Z!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Z,Q,{value:Z,enumerable:!1,writable:!1,configurable:!0}),Z}function Z(){for(var ie,$,C=new Promise(function(H,D){ie=H,$=D}),k=[],G=0;G<arguments.length;G++)k.push(arguments[G]);k.push(function(H,D){H?$(H):ie(D)});try{V.apply(this,k)}catch(H){$(H)}return C}return Object.setPrototypeOf(Z,Object.getPrototypeOf(V)),Q&&Object.defineProperty(Z,Q,{value:Z,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(Z,e(V))},r.promisify.custom=Q;function me(L,V){if(!L){var Z=new Error("Promise was rejected with a falsy value");Z.reason=L,L=Z}return V(L)}function Y(L){if(typeof L!="function")throw new TypeError('The "original" argument must be of type Function');function V(){for(var Z=[],ie=0;ie<arguments.length;ie++)Z.push(arguments[ie]);var $=Z.pop();if(typeof $!="function")throw new TypeError("The last argument must be of type Function");var C=this,k=function(){return $.apply(C,arguments)};L.apply(this,Z).then(function(G){Ae.nextTick(k.bind(null,null,G))},function(G){Ae.nextTick(me.bind(null,G,k))})}return Object.setPrototypeOf(V,Object.getPrototypeOf(L)),Object.defineProperties(V,e(L)),V}r.callbackify=Y})(Wn)),Wn}var Gi,bl;function $p(){if(bl)return Gi;bl=1;function r(b,g){var _=Object.keys(b);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(b);g&&(d=d.filter(function(T){return Object.getOwnPropertyDescriptor(b,T).enumerable})),_.push.apply(_,d)}return _}function e(b){for(var g=1;g<arguments.length;g++){var _=arguments[g]!=null?arguments[g]:{};g%2?r(Object(_),!0).forEach(function(d){t(b,d,_[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(_)):r(Object(_)).forEach(function(d){Object.defineProperty(b,d,Object.getOwnPropertyDescriptor(_,d))})}return b}function t(b,g,_){return g=o(g),g in b?Object.defineProperty(b,g,{value:_,enumerable:!0,configurable:!0,writable:!0}):b[g]=_,b}function n(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function i(b,g){for(var _=0;_<g.length;_++){var d=g[_];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(b,o(d.key),d)}}function s(b,g,_){return g&&i(b.prototype,g),Object.defineProperty(b,"prototype",{writable:!1}),b}function o(b){var g=a(b,"string");return typeof g=="symbol"?g:String(g)}function a(b,g){if(typeof b!="object"||b===null)return b;var _=b[Symbol.toPrimitive];if(_!==void 0){var d=_.call(b,g);if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(b)}var l=jr(),c=l.Buffer,f=vl(),m=f.inspect,v=m&&m.custom||"inspect";function y(b,g,_){c.prototype.copy.call(b,g,_)}return Gi=(function(){function b(){n(this,b),this.head=null,this.tail=null,this.length=0}return s(b,[{key:"push",value:function(_){var d={data:_,next:null};this.length>0?this.tail.next=d:this.head=d,this.tail=d,++this.length}},{key:"unshift",value:function(_){var d={data:_,next:this.head};this.length===0&&(this.tail=d),this.head=d,++this.length}},{key:"shift",value:function(){if(this.length!==0){var _=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,_}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(_){if(this.length===0)return"";for(var d=this.head,T=""+d.data;d=d.next;)T+=_+d.data;return T}},{key:"concat",value:function(_){if(this.length===0)return c.alloc(0);for(var d=c.allocUnsafe(_>>>0),T=this.head,w=0;T;)y(T.data,d,w),w+=T.data.length,T=T.next;return d}},{key:"consume",value:function(_,d){var T;return _<this.head.data.length?(T=this.head.data.slice(0,_),this.head.data=this.head.data.slice(_)):_===this.head.data.length?T=this.shift():T=d?this._getString(_):this._getBuffer(_),T}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(_){var d=this.head,T=1,w=d.data;for(_-=w.length;d=d.next;){var p=d.data,E=_>p.length?p.length:_;if(E===p.length?w+=p:w+=p.slice(0,_),_-=E,_===0){E===p.length?(++T,d.next?this.head=d.next:this.head=this.tail=null):(this.head=d,d.data=p.slice(E));break}++T}return this.length-=T,w}},{key:"_getBuffer",value:function(_){var d=c.allocUnsafe(_),T=this.head,w=1;for(T.data.copy(d),_-=T.data.length;T=T.next;){var p=T.data,E=_>p.length?p.length:_;if(p.copy(d,d.length-_,0,E),_-=E,_===0){E===p.length?(++w,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=p.slice(E));break}++w}return this.length-=w,d}},{key:v,value:function(_,d){return m(this,e(e({},d),{},{depth:0,customInspect:!1}))}}]),b})(),Gi}var Ki,_l;function Tl(){if(_l)return Ki;_l=1;function r(o,a){var l=this,c=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return c||f?(a?a(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Ae.nextTick(i,this,o)):Ae.nextTick(i,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(m){!a&&m?l._writableState?l._writableState.errorEmitted?Ae.nextTick(t,l):(l._writableState.errorEmitted=!0,Ae.nextTick(e,l,m)):Ae.nextTick(e,l,m):a?(Ae.nextTick(t,l),a(m)):Ae.nextTick(t,l)}),this)}function e(o,a){i(o,a),t(o)}function t(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function n(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(o,a){o.emit("error",a)}function s(o,a){var l=o._readableState,c=o._writableState;l&&l.autoDestroy||c&&c.autoDestroy?o.destroy(a):o.emit("error",a)}return Ki={destroy:r,undestroy:n,errorOrDestroy:s},Ki}var qi={},El;function Mt(){if(El)return qi;El=1;function r(a,l){a.prototype=Object.create(l.prototype),a.prototype.constructor=a,a.__proto__=l}var e={};function t(a,l,c){c||(c=Error);function f(v,y,b){return typeof l=="string"?l:l(v,y,b)}var m=(function(v){r(y,v);function y(b,g,_){return v.call(this,f(b,g,_))||this}return y})(c);m.prototype.name=c.name,m.prototype.code=a,e[a]=m}function n(a,l){if(Array.isArray(a)){var c=a.length;return a=a.map(function(f){return String(f)}),c>2?"one of ".concat(l," ").concat(a.slice(0,c-1).join(", "),", or ")+a[c-1]:c===2?"one of ".concat(l," ").concat(a[0]," or ").concat(a[1]):"of ".concat(l," ").concat(a[0])}else return"of ".concat(l," ").concat(String(a))}function i(a,l,c){return a.substr(0,l.length)===l}function s(a,l,c){return(c===void 0||c>a.length)&&(c=a.length),a.substring(c-l.length,c)===l}function o(a,l,c){return typeof c!="number"&&(c=0),c+l.length>a.length?!1:a.indexOf(l,c)!==-1}return t("ERR_INVALID_OPT_VALUE",function(a,l){return'The value "'+l+'" is invalid for option "'+a+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(a,l,c){var f;typeof l=="string"&&i(l,"not ")?(f="must not be",l=l.replace(/^not /,"")):f="must be";var m;if(s(a," argument"))m="The ".concat(a," ").concat(f," ").concat(n(l,"type"));else{var v=o(a,".")?"property":"argument";m='The "'.concat(a,'" ').concat(v," ").concat(f," ").concat(n(l,"type"))}return m+=". Received type ".concat(typeof c),m},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),qi.codes=e,qi}var Vi,Al;function Sl(){if(Al)return Vi;Al=1;var r=Mt().codes.ERR_INVALID_OPT_VALUE;function e(n,i,s){return n.highWaterMark!=null?n.highWaterMark:i?n[s]:null}function t(n,i,s,o){var a=e(i,o,s);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var l=o?s:"highWaterMark";throw new r(l,a)}return Math.floor(a)}return n.objectMode?16:16*1024}return Vi={getHighWaterMark:t},Vi}var $i,xl;function Xp(){if(xl)return $i;xl=1,$i=r;function r(t,n){if(e("noDeprecation"))return t;var i=!1;function s(){if(!i){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return t.apply(this,arguments)}return s}function e(t){try{if(!$e.localStorage)return!1}catch{return!1}var n=$e.localStorage[t];return n==null?!1:String(n).toLowerCase()==="true"}return $i}var Xi,kl;function Cl(){if(kl)return Xi;kl=1,Xi=B;function r($){var C=this;this.next=null,this.entry=null,this.finish=function(){ie(C,$)}}var e;B.WritableState=O;var t={deprecate:Xp()},n=ao(),i=jr().Buffer,s=(typeof $e<"u"?$e:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o($){return i.from($)}function a($){return i.isBuffer($)||$ instanceof s}var l=Tl(),c=Sl(),f=c.getHighWaterMark,m=Mt().codes,v=m.ERR_INVALID_ARG_TYPE,y=m.ERR_METHOD_NOT_IMPLEMENTED,b=m.ERR_MULTIPLE_CALLBACK,g=m.ERR_STREAM_CANNOT_PIPE,_=m.ERR_STREAM_DESTROYED,d=m.ERR_STREAM_NULL_VALUES,T=m.ERR_STREAM_WRITE_AFTER_END,w=m.ERR_UNKNOWN_ENCODING,p=l.errorOrDestroy;bt()(B,n);function E(){}function O($,C,k){e=e||Ht(),$=$||{},typeof k!="boolean"&&(k=C instanceof e),this.objectMode=!!$.objectMode,k&&(this.objectMode=this.objectMode||!!$.writableObjectMode),this.highWaterMark=f(this,$,"writableHighWaterMark",k),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var G=$.decodeStrings===!1;this.decodeStrings=!G,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){re(C,H)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=$.emitClose!==!1,this.autoDestroy=!!$.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}O.prototype.getBuffer=function(){for(var C=this.bufferedRequest,k=[];C;)k.push(C),C=C.next;return k},(function(){try{Object.defineProperty(O.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var P;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(P=Function.prototype[Symbol.hasInstance],Object.defineProperty(B,Symbol.hasInstance,{value:function(C){return P.call(this,C)?!0:this!==B?!1:C&&C._writableState instanceof O}})):P=function(C){return C instanceof this};function B($){e=e||Ht();var C=this instanceof e;if(!C&&!P.call(B,this))return new B($);this._writableState=new O($,this,C),this.writable=!0,$&&(typeof $.write=="function"&&(this._write=$.write),typeof $.writev=="function"&&(this._writev=$.writev),typeof $.destroy=="function"&&(this._destroy=$.destroy),typeof $.final=="function"&&(this._final=$.final)),n.call(this)}B.prototype.pipe=function(){p(this,new g)};function I($,C){var k=new T;p($,k),Ae.nextTick(C,k)}function K($,C,k,G){var H;return k===null?H=new d:typeof k!="string"&&!C.objectMode&&(H=new v("chunk",["string","Buffer"],k)),H?(p($,H),Ae.nextTick(G,H),!1):!0}B.prototype.write=function($,C,k){var G=this._writableState,H=!1,D=!G.objectMode&&a($);return D&&!i.isBuffer($)&&($=o($)),typeof C=="function"&&(k=C,C=null),D?C="buffer":C||(C=G.defaultEncoding),typeof k!="function"&&(k=E),G.ending?I(this,k):(D||K(this,G,$,k))&&(G.pendingcb++,H=N(this,G,D,$,C,k)),H},B.prototype.cork=function(){this._writableState.corked++},B.prototype.uncork=function(){var $=this._writableState;$.corked&&($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest&&Q(this,$))},B.prototype.setDefaultEncoding=function(C){if(typeof C=="string"&&(C=C.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((C+"").toLowerCase())>-1))throw new w(C);return this._writableState.defaultEncoding=C,this},Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function oe($,C,k){return!$.objectMode&&$.decodeStrings!==!1&&typeof C=="string"&&(C=i.from(C,k)),C}Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N($,C,k,G,H,D){if(!k){var F=oe(C,G,H);G!==F&&(k=!0,H="buffer",G=F)}var te=C.objectMode?1:G.length;C.length+=te;var A=C.length<C.highWaterMark;if(A||(C.needDrain=!0),C.writing||C.corked){var ee=C.lastBufferedRequest;C.lastBufferedRequest={chunk:G,encoding:H,isBuf:k,callback:D,next:null},ee?ee.next=C.lastBufferedRequest:C.bufferedRequest=C.lastBufferedRequest,C.bufferedRequestCount+=1}else U($,C,!1,te,G,H,D);return A}function U($,C,k,G,H,D,F){C.writelen=G,C.writecb=F,C.writing=!0,C.sync=!0,C.destroyed?C.onwrite(new _("write")):k?$._writev(H,C.onwrite):$._write(H,D,C.onwrite),C.sync=!1}function x($,C,k,G,H){--C.pendingcb,k?(Ae.nextTick(H,G),Ae.nextTick(V,$,C),$._writableState.errorEmitted=!0,p($,G)):(H(G),$._writableState.errorEmitted=!0,p($,G),V($,C))}function X($){$.writing=!1,$.writecb=null,$.length-=$.writelen,$.writelen=0}function re($,C){var k=$._writableState,G=k.sync,H=k.writecb;if(typeof H!="function")throw new b;if(X(k),C)x($,k,G,C,H);else{var D=me(k)||$.destroyed;!D&&!k.corked&&!k.bufferProcessing&&k.bufferedRequest&&Q($,k),G?Ae.nextTick(z,$,k,D,H):z($,k,D,H)}}function z($,C,k,G){k||se($,C),C.pendingcb--,G(),V($,C)}function se($,C){C.length===0&&C.needDrain&&(C.needDrain=!1,$.emit("drain"))}function Q($,C){C.bufferProcessing=!0;var k=C.bufferedRequest;if($._writev&&k&&k.next){var G=C.bufferedRequestCount,H=new Array(G),D=C.corkedRequestsFree;D.entry=k;for(var F=0,te=!0;k;)H[F]=k,k.isBuf||(te=!1),k=k.next,F+=1;H.allBuffers=te,U($,C,!0,C.length,H,"",D.finish),C.pendingcb++,C.lastBufferedRequest=null,D.next?(C.corkedRequestsFree=D.next,D.next=null):C.corkedRequestsFree=new r(C),C.bufferedRequestCount=0}else{for(;k;){var A=k.chunk,ee=k.encoding,R=k.callback,u=C.objectMode?1:A.length;if(U($,C,!1,u,A,ee,R),k=k.next,C.bufferedRequestCount--,C.writing)break}k===null&&(C.lastBufferedRequest=null)}C.bufferedRequest=k,C.bufferProcessing=!1}B.prototype._write=function($,C,k){k(new y("_write()"))},B.prototype._writev=null,B.prototype.end=function($,C,k){var G=this._writableState;return typeof $=="function"?(k=$,$=null,C=null):typeof C=="function"&&(k=C,C=null),$!=null&&this.write($,C),G.corked&&(G.corked=1,this.uncork()),G.ending||Z(this,G,k),this},Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function me($){return $.ending&&$.length===0&&$.bufferedRequest===null&&!$.finished&&!$.writing}function Y($,C){$._final(function(k){C.pendingcb--,k&&p($,k),C.prefinished=!0,$.emit("prefinish"),V($,C)})}function L($,C){!C.prefinished&&!C.finalCalled&&(typeof $._final=="function"&&!C.destroyed?(C.pendingcb++,C.finalCalled=!0,Ae.nextTick(Y,$,C)):(C.prefinished=!0,$.emit("prefinish")))}function V($,C){var k=me(C);if(k&&(L($,C),C.pendingcb===0&&(C.finished=!0,$.emit("finish"),C.autoDestroy))){var G=$._readableState;(!G||G.autoDestroy&&G.endEmitted)&&$.destroy()}return k}function Z($,C,k){C.ending=!0,V($,C),k&&(C.finished?Ae.nextTick(k):$.once("finish",k)),C.ended=!0,$.writable=!1}function ie($,C,k){var G=$.entry;for($.entry=null;G;){var H=G.callback;C.pendingcb--,H(k),G=G.next}C.corkedRequestsFree.next=$}return Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(C){this._writableState&&(this._writableState.destroyed=C)}}),B.prototype.destroy=l.destroy,B.prototype._undestroy=l.undestroy,B.prototype._destroy=function($,C){C($)},Xi}var Yi,Rl;function Ht(){if(Rl)return Yi;Rl=1;var r=Object.keys||function(c){var f=[];for(var m in c)f.push(m);return f};Yi=o;var e=Fl(),t=Cl();bt()(o,e);for(var n=r(t.prototype),i=0;i<n.length;i++){var s=n[i];o.prototype[s]||(o.prototype[s]=t.prototype[s])}function o(c){if(!(this instanceof o))return new o(c);e.call(this,c),t.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",a)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function a(){this._writableState.ended||Ae.nextTick(l,this)}function l(c){c.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),Yi}var Zi={},Gr={exports:{}},Il;function Yp(){return Il||(Il=1,(function(r,e){var t=jr(),n=t.Buffer;function i(o,a){for(var l in o)a[l]=o[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?r.exports=t:(i(t,e),e.Buffer=s);function s(o,a,l){return n(o,a,l)}i(n,s),s.from=function(o,a,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,l)},s.alloc=function(o,a,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=n(o);return a!==void 0?typeof l=="string"?c.fill(a,l):c.fill(a):c.fill(0),c},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}})(Gr,Gr.exports)),Gr.exports}var Nl;function Ji(){if(Nl)return Zi;Nl=1;var r=Yp().Buffer,e=r.isEncoding||function(d){switch(d=""+d,d&&d.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(d){if(!d)return"utf8";for(var T;;)switch(d){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return d;default:if(T)return;d=(""+d).toLowerCase(),T=!0}}function n(d){var T=t(d);if(typeof T!="string"&&(r.isEncoding===e||!e(d)))throw new Error("Unknown encoding: "+d);return T||d}Zi.StringDecoder=i;function i(d){this.encoding=n(d);var T;switch(this.encoding){case"utf16le":this.text=m,this.end=v,T=4;break;case"utf8":this.fillLast=l,T=4;break;case"base64":this.text=y,this.end=b,T=3;break;default:this.write=g,this.end=_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(T)}i.prototype.write=function(d){if(d.length===0)return"";var T,w;if(this.lastNeed){if(T=this.fillLast(d),T===void 0)return"";w=this.lastNeed,this.lastNeed=0}else w=0;return w<d.length?T?T+this.text(d,w):this.text(d,w):T||""},i.prototype.end=f,i.prototype.text=c,i.prototype.fillLast=function(d){if(this.lastNeed<=d.length)return d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,d.length),this.lastNeed-=d.length};function s(d){return d<=127?0:d>>5===6?2:d>>4===14?3:d>>3===30?4:d>>6===2?-1:-2}function o(d,T,w){var p=T.length-1;if(p<w)return 0;var E=s(T[p]);return E>=0?(E>0&&(d.lastNeed=E-1),E):--p<w||E===-2?0:(E=s(T[p]),E>=0?(E>0&&(d.lastNeed=E-2),E):--p<w||E===-2?0:(E=s(T[p]),E>=0?(E>0&&(E===2?E=0:d.lastNeed=E-3),E):0))}function a(d,T,w){if((T[0]&192)!==128)return d.lastNeed=0,"�";if(d.lastNeed>1&&T.length>1){if((T[1]&192)!==128)return d.lastNeed=1,"�";if(d.lastNeed>2&&T.length>2&&(T[2]&192)!==128)return d.lastNeed=2,"�"}}function l(d){var T=this.lastTotal-this.lastNeed,w=a(this,d);if(w!==void 0)return w;if(this.lastNeed<=d.length)return d.copy(this.lastChar,T,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,T,0,d.length),this.lastNeed-=d.length}function c(d,T){var w=o(this,d,T);if(!this.lastNeed)return d.toString("utf8",T);this.lastTotal=w;var p=d.length-(w-this.lastNeed);return d.copy(this.lastChar,0,p),d.toString("utf8",T,p)}function f(d){var T=d&&d.length?this.write(d):"";return this.lastNeed?T+"�":T}function m(d,T){if((d.length-T)%2===0){var w=d.toString("utf16le",T);if(w){var p=w.charCodeAt(w.length-1);if(p>=55296&&p<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=d[d.length-1],d.toString("utf16le",T,d.length-1)}function v(d){var T=d&&d.length?this.write(d):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return T+this.lastChar.toString("utf16le",0,w)}return T}function y(d,T){var w=(d.length-T)%3;return w===0?d.toString("base64",T):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=d[d.length-1]:(this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1]),d.toString("base64",T,d.length-w))}function b(d){var T=d&&d.length?this.write(d):"";return this.lastNeed?T+this.lastChar.toString("base64",0,3-this.lastNeed):T}function g(d){return d.toString(this.encoding)}function _(d){return d&&d.length?this.write(d):""}return Zi}var Qi,Ol;function es(){if(Ol)return Qi;Ol=1;var r=Mt().codes.ERR_STREAM_PREMATURE_CLOSE;function e(s){var o=!1;return function(){if(!o){o=!0;for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];s.apply(this,l)}}}function t(){}function n(s){return s.setHeader&&typeof s.abort=="function"}function i(s,o,a){if(typeof o=="function")return i(s,null,o);o||(o={}),a=e(a||t);var l=o.readable||o.readable!==!1&&s.readable,c=o.writable||o.writable!==!1&&s.writable,f=function(){s.writable||v()},m=s._writableState&&s._writableState.finished,v=function(){c=!1,m=!0,l||a.call(s)},y=s._readableState&&s._readableState.endEmitted,b=function(){l=!1,y=!0,c||a.call(s)},g=function(w){a.call(s,w)},_=function(){var w;if(l&&!y)return(!s._readableState||!s._readableState.ended)&&(w=new r),a.call(s,w);if(c&&!m)return(!s._writableState||!s._writableState.ended)&&(w=new r),a.call(s,w)},d=function(){s.req.on("finish",v)};return n(s)?(s.on("complete",v),s.on("abort",_),s.req?d():s.on("request",d)):c&&!s._writableState&&(s.on("end",f),s.on("close",f)),s.on("end",b),s.on("finish",v),o.error!==!1&&s.on("error",g),s.on("close",_),function(){s.removeListener("complete",v),s.removeListener("abort",_),s.removeListener("request",d),s.req&&s.req.removeListener("finish",v),s.removeListener("end",f),s.removeListener("close",f),s.removeListener("finish",v),s.removeListener("end",b),s.removeListener("error",g),s.removeListener("close",_)}}return Qi=i,Qi}var ts,Pl;function Zp(){if(Pl)return ts;Pl=1;var r;function e(w,p,E){return p=t(p),p in w?Object.defineProperty(w,p,{value:E,enumerable:!0,configurable:!0,writable:!0}):w[p]=E,w}function t(w){var p=n(w,"string");return typeof p=="symbol"?p:String(p)}function n(w,p){if(typeof w!="object"||w===null)return w;var E=w[Symbol.toPrimitive];if(E!==void 0){var O=E.call(w,p);if(typeof O!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(w)}var i=es(),s=Symbol("lastResolve"),o=Symbol("lastReject"),a=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),f=Symbol("handlePromise"),m=Symbol("stream");function v(w,p){return{value:w,done:p}}function y(w){var p=w[s];if(p!==null){var E=w[m].read();E!==null&&(w[c]=null,w[s]=null,w[o]=null,p(v(E,!1)))}}function b(w){Ae.nextTick(y,w)}function g(w,p){return function(E,O){w.then(function(){if(p[l]){E(v(void 0,!0));return}p[f](E,O)},O)}}var _=Object.getPrototypeOf(function(){}),d=Object.setPrototypeOf((r={get stream(){return this[m]},next:function(){var p=this,E=this[a];if(E!==null)return Promise.reject(E);if(this[l])return Promise.resolve(v(void 0,!0));if(this[m].destroyed)return new Promise(function(I,K){Ae.nextTick(function(){p[a]?K(p[a]):I(v(void 0,!0))})});var O=this[c],P;if(O)P=new Promise(g(O,this));else{var B=this[m].read();if(B!==null)return Promise.resolve(v(B,!1));P=new Promise(this[f])}return this[c]=P,P}},e(r,Symbol.asyncIterator,function(){return this}),e(r,"return",function(){var p=this;return new Promise(function(E,O){p[m].destroy(null,function(P){if(P){O(P);return}E(v(void 0,!0))})})}),r),_),T=function(p){var E,O=Object.create(d,(E={},e(E,m,{value:p,writable:!0}),e(E,s,{value:null,writable:!0}),e(E,o,{value:null,writable:!0}),e(E,a,{value:null,writable:!0}),e(E,l,{value:p._readableState.endEmitted,writable:!0}),e(E,f,{value:function(B,I){var K=O[m].read();K?(O[c]=null,O[s]=null,O[o]=null,B(v(K,!1))):(O[s]=B,O[o]=I)},writable:!0}),E));return O[c]=null,i(p,function(P){if(P&&P.code!=="ERR_STREAM_PREMATURE_CLOSE"){var B=O[o];B!==null&&(O[c]=null,O[s]=null,O[o]=null,B(P)),O[a]=P;return}var I=O[s];I!==null&&(O[c]=null,O[s]=null,O[o]=null,I(v(void 0,!0))),O[l]=!0}),p.on("readable",b.bind(null,O)),O};return ts=T,ts}var rs,Ll;function Jp(){return Ll||(Ll=1,rs=function(){throw new Error("Readable.from is not available in the browser")}),rs}var ns,Dl;function Fl(){if(Dl)return ns;Dl=1,ns=I;var r;I.ReadableState=B,Bn().EventEmitter;var e=function(F,te){return F.listeners(te).length},t=ao(),n=jr().Buffer,i=(typeof $e<"u"?$e:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(D){return n.from(D)}function o(D){return n.isBuffer(D)||D instanceof i}var a=vl(),l;a&&a.debuglog?l=a.debuglog("stream"):l=function(){};var c=$p(),f=Tl(),m=Sl(),v=m.getHighWaterMark,y=Mt().codes,b=y.ERR_INVALID_ARG_TYPE,g=y.ERR_STREAM_PUSH_AFTER_EOF,_=y.ERR_METHOD_NOT_IMPLEMENTED,d=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,T,w,p;bt()(I,t);var E=f.errorOrDestroy,O=["error","close","destroy","pause","resume"];function P(D,F,te){if(typeof D.prependListener=="function")return D.prependListener(F,te);!D._events||!D._events[F]?D.on(F,te):Array.isArray(D._events[F])?D._events[F].unshift(te):D._events[F]=[te,D._events[F]]}function B(D,F,te){r=r||Ht(),D=D||{},typeof te!="boolean"&&(te=F instanceof r),this.objectMode=!!D.objectMode,te&&(this.objectMode=this.objectMode||!!D.readableObjectMode),this.highWaterMark=v(this,D,"readableHighWaterMark",te),this.buffer=new c,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=D.emitClose!==!1,this.autoDestroy=!!D.autoDestroy,this.destroyed=!1,this.defaultEncoding=D.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,D.encoding&&(T||(T=Ji().StringDecoder),this.decoder=new T(D.encoding),this.encoding=D.encoding)}function I(D){if(r=r||Ht(),!(this instanceof I))return new I(D);var F=this instanceof r;this._readableState=new B(D,this,F),this.readable=!0,D&&(typeof D.read=="function"&&(this._read=D.read),typeof D.destroy=="function"&&(this._destroy=D.destroy)),t.call(this)}Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(F){this._readableState&&(this._readableState.destroyed=F)}}),I.prototype.destroy=f.destroy,I.prototype._undestroy=f.undestroy,I.prototype._destroy=function(D,F){F(D)},I.prototype.push=function(D,F){var te=this._readableState,A;return te.objectMode?A=!0:typeof D=="string"&&(F=F||te.defaultEncoding,F!==te.encoding&&(D=n.from(D,F),F=""),A=!0),K(this,D,F,!1,A)},I.prototype.unshift=function(D){return K(this,D,null,!0,!1)};function K(D,F,te,A,ee){l("readableAddChunk",F);var R=D._readableState;if(F===null)R.reading=!1,re(D,R);else{var u;if(ee||(u=N(R,F)),u)E(D,u);else if(R.objectMode||F&&F.length>0)if(typeof F!="string"&&!R.objectMode&&Object.getPrototypeOf(F)!==n.prototype&&(F=s(F)),A)R.endEmitted?E(D,new d):oe(D,R,F,!0);else if(R.ended)E(D,new g);else{if(R.destroyed)return!1;R.reading=!1,R.decoder&&!te?(F=R.decoder.write(F),R.objectMode||F.length!==0?oe(D,R,F,!1):Q(D,R)):oe(D,R,F,!1)}else A||(R.reading=!1,Q(D,R))}return!R.ended&&(R.length<R.highWaterMark||R.length===0)}function oe(D,F,te,A){F.flowing&&F.length===0&&!F.sync?(F.awaitDrain=0,D.emit("data",te)):(F.length+=F.objectMode?1:te.length,A?F.buffer.unshift(te):F.buffer.push(te),F.needReadable&&z(D)),Q(D,F)}function N(D,F){var te;return!o(F)&&typeof F!="string"&&F!==void 0&&!D.objectMode&&(te=new b("chunk",["string","Buffer","Uint8Array"],F)),te}I.prototype.isPaused=function(){return this._readableState.flowing===!1},I.prototype.setEncoding=function(D){T||(T=Ji().StringDecoder);var F=new T(D);this._readableState.decoder=F,this._readableState.encoding=this._readableState.decoder.encoding;for(var te=this._readableState.buffer.head,A="";te!==null;)A+=F.write(te.data),te=te.next;return this._readableState.buffer.clear(),A!==""&&this._readableState.buffer.push(A),this._readableState.length=A.length,this};var U=1073741824;function x(D){return D>=U?D=U:(D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++),D}function X(D,F){return D<=0||F.length===0&&F.ended?0:F.objectMode?1:D!==D?F.flowing&&F.length?F.buffer.head.data.length:F.length:(D>F.highWaterMark&&(F.highWaterMark=x(D)),D<=F.length?D:F.ended?F.length:(F.needReadable=!0,0))}I.prototype.read=function(D){l("read",D),D=parseInt(D,10);var F=this._readableState,te=D;if(D!==0&&(F.emittedReadable=!1),D===0&&F.needReadable&&((F.highWaterMark!==0?F.length>=F.highWaterMark:F.length>0)||F.ended))return l("read: emitReadable",F.length,F.ended),F.length===0&&F.ended?k(this):z(this),null;if(D=X(D,F),D===0&&F.ended)return F.length===0&&k(this),null;var A=F.needReadable;l("need readable",A),(F.length===0||F.length-D<F.highWaterMark)&&(A=!0,l("length less than watermark",A)),F.ended||F.reading?(A=!1,l("reading or ended",A)):A&&(l("do read"),F.reading=!0,F.sync=!0,F.length===0&&(F.needReadable=!0),this._read(F.highWaterMark),F.sync=!1,F.reading||(D=X(te,F)));var ee;return D>0?ee=C(D,F):ee=null,ee===null?(F.needReadable=F.length<=F.highWaterMark,D=0):(F.length-=D,F.awaitDrain=0),F.length===0&&(F.ended||(F.needReadable=!0),te!==D&&F.ended&&k(this)),ee!==null&&this.emit("data",ee),ee};function re(D,F){if(l("onEofChunk"),!F.ended){if(F.decoder){var te=F.decoder.end();te&&te.length&&(F.buffer.push(te),F.length+=F.objectMode?1:te.length)}F.ended=!0,F.sync?z(D):(F.needReadable=!1,F.emittedReadable||(F.emittedReadable=!0,se(D)))}}function z(D){var F=D._readableState;l("emitReadable",F.needReadable,F.emittedReadable),F.needReadable=!1,F.emittedReadable||(l("emitReadable",F.flowing),F.emittedReadable=!0,Ae.nextTick(se,D))}function se(D){var F=D._readableState;l("emitReadable_",F.destroyed,F.length,F.ended),!F.destroyed&&(F.length||F.ended)&&(D.emit("readable"),F.emittedReadable=!1),F.needReadable=!F.flowing&&!F.ended&&F.length<=F.highWaterMark,$(D)}function Q(D,F){F.readingMore||(F.readingMore=!0,Ae.nextTick(me,D,F))}function me(D,F){for(;!F.reading&&!F.ended&&(F.length<F.highWaterMark||F.flowing&&F.length===0);){var te=F.length;if(l("maybeReadMore read 0"),D.read(0),te===F.length)break}F.readingMore=!1}I.prototype._read=function(D){E(this,new _("_read()"))},I.prototype.pipe=function(D,F){var te=this,A=this._readableState;switch(A.pipesCount){case 0:A.pipes=D;break;case 1:A.pipes=[A.pipes,D];break;default:A.pipes.push(D);break}A.pipesCount+=1,l("pipe count=%d opts=%j",A.pipesCount,F);var ee=(!F||F.end!==!1)&&D!==Ae.stdout&&D!==Ae.stderr,R=ee?h:ge;A.endEmitted?Ae.nextTick(R):te.once("end",R),D.on("unpipe",u);function u(ve,_e){l("onunpipe"),ve===te&&_e&&_e.hasUnpiped===!1&&(_e.hasUnpiped=!0,q())}function h(){l("onend"),D.end()}var S=Y(te);D.on("drain",S);var M=!1;function q(){l("cleanup"),D.removeListener("close",he),D.removeListener("finish",le),D.removeListener("drain",S),D.removeListener("error",ae),D.removeListener("unpipe",u),te.removeListener("end",h),te.removeListener("end",ge),te.removeListener("data",j),M=!0,A.awaitDrain&&(!D._writableState||D._writableState.needDrain)&&S()}te.on("data",j);function j(ve){l("ondata");var _e=D.write(ve);l("dest.write",_e),_e===!1&&((A.pipesCount===1&&A.pipes===D||A.pipesCount>1&&H(A.pipes,D)!==-1)&&!M&&(l("false write response, pause",A.awaitDrain),A.awaitDrain++),te.pause())}function ae(ve){l("onerror",ve),ge(),D.removeListener("error",ae),e(D,"error")===0&&E(D,ve)}P(D,"error",ae);function he(){D.removeListener("finish",le),ge()}D.once("close",he);function le(){l("onfinish"),D.removeListener("close",he),ge()}D.once("finish",le);function ge(){l("unpipe"),te.unpipe(D)}return D.emit("pipe",te),A.flowing||(l("pipe resume"),te.resume()),D};function Y(D){return function(){var te=D._readableState;l("pipeOnDrain",te.awaitDrain),te.awaitDrain&&te.awaitDrain--,te.awaitDrain===0&&e(D,"data")&&(te.flowing=!0,$(D))}}I.prototype.unpipe=function(D){var F=this._readableState,te={hasUnpiped:!1};if(F.pipesCount===0)return this;if(F.pipesCount===1)return D&&D!==F.pipes?this:(D||(D=F.pipes),F.pipes=null,F.pipesCount=0,F.flowing=!1,D&&D.emit("unpipe",this,te),this);if(!D){var A=F.pipes,ee=F.pipesCount;F.pipes=null,F.pipesCount=0,F.flowing=!1;for(var R=0;R<ee;R++)A[R].emit("unpipe",this,{hasUnpiped:!1});return this}var u=H(F.pipes,D);return u===-1?this:(F.pipes.splice(u,1),F.pipesCount-=1,F.pipesCount===1&&(F.pipes=F.pipes[0]),D.emit("unpipe",this,te),this)},I.prototype.on=function(D,F){var te=t.prototype.on.call(this,D,F),A=this._readableState;return D==="data"?(A.readableListening=this.listenerCount("readable")>0,A.flowing!==!1&&this.resume()):D==="readable"&&!A.endEmitted&&!A.readableListening&&(A.readableListening=A.needReadable=!0,A.flowing=!1,A.emittedReadable=!1,l("on readable",A.length,A.reading),A.length?z(this):A.reading||Ae.nextTick(V,this)),te},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(D,F){var te=t.prototype.removeListener.call(this,D,F);return D==="readable"&&Ae.nextTick(L,this),te},I.prototype.removeAllListeners=function(D){var F=t.prototype.removeAllListeners.apply(this,arguments);return(D==="readable"||D===void 0)&&Ae.nextTick(L,this),F};function L(D){var F=D._readableState;F.readableListening=D.listenerCount("readable")>0,F.resumeScheduled&&!F.paused?F.flowing=!0:D.listenerCount("data")>0&&D.resume()}function V(D){l("readable nexttick read 0"),D.read(0)}I.prototype.resume=function(){var D=this._readableState;return D.flowing||(l("resume"),D.flowing=!D.readableListening,Z(this,D)),D.paused=!1,this};function Z(D,F){F.resumeScheduled||(F.resumeScheduled=!0,Ae.nextTick(ie,D,F))}function ie(D,F){l("resume",F.reading),F.reading||D.read(0),F.resumeScheduled=!1,D.emit("resume"),$(D),F.flowing&&!F.reading&&D.read(0)}I.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function $(D){var F=D._readableState;for(l("flow",F.flowing);F.flowing&&D.read()!==null;);}I.prototype.wrap=function(D){var F=this,te=this._readableState,A=!1;D.on("end",function(){if(l("wrapped end"),te.decoder&&!te.ended){var u=te.decoder.end();u&&u.length&&F.push(u)}F.push(null)}),D.on("data",function(u){if(l("wrapped data"),te.decoder&&(u=te.decoder.write(u)),!(te.objectMode&&u==null)&&!(!te.objectMode&&(!u||!u.length))){var h=F.push(u);h||(A=!0,D.pause())}});for(var ee in D)this[ee]===void 0&&typeof D[ee]=="function"&&(this[ee]=(function(h){return function(){return D[h].apply(D,arguments)}})(ee));for(var R=0;R<O.length;R++)D.on(O[R],this.emit.bind(this,O[R]));return this._read=function(u){l("wrapped _read",u),A&&(A=!1,D.resume())},this},typeof Symbol=="function"&&(I.prototype[Symbol.asyncIterator]=function(){return w===void 0&&(w=Zp()),w(this)}),Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(I.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(I.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(F){this._readableState&&(this._readableState.flowing=F)}}),I._fromList=C,Object.defineProperty(I.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function C(D,F){if(F.length===0)return null;var te;return F.objectMode?te=F.buffer.shift():!D||D>=F.length?(F.decoder?te=F.buffer.join(""):F.buffer.length===1?te=F.buffer.first():te=F.buffer.concat(F.length),F.buffer.clear()):te=F.buffer.consume(D,F.decoder),te}function k(D){var F=D._readableState;l("endReadable",F.endEmitted),F.endEmitted||(F.ended=!0,Ae.nextTick(G,F,D))}function G(D,F){if(l("endReadableNT",D.endEmitted,D.length),!D.endEmitted&&D.length===0&&(D.endEmitted=!0,F.readable=!1,F.emit("end"),D.autoDestroy)){var te=F._writableState;(!te||te.autoDestroy&&te.finished)&&F.destroy()}}typeof Symbol=="function"&&(I.from=function(D,F){return p===void 0&&(p=Jp()),p(I,D,F)});function H(D,F){for(var te=0,A=D.length;te<A;te++)if(D[te]===F)return te;return-1}return ns}var is,Bl;function Ml(){if(Bl)return is;Bl=1,is=a;var r=Mt().codes,e=r.ERR_METHOD_NOT_IMPLEMENTED,t=r.ERR_MULTIPLE_CALLBACK,n=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=r.ERR_TRANSFORM_WITH_LENGTH_0,s=Ht();bt()(a,s);function o(f,m){var v=this._transformState;v.transforming=!1;var y=v.writecb;if(y===null)return this.emit("error",new t);v.writechunk=null,v.writecb=null,m!=null&&this.push(m),y(f);var b=this._readableState;b.reading=!1,(b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}function a(f){if(!(this instanceof a))return new a(f);s.call(this,f),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",l)}function l(){var f=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(m,v){c(f,m,v)}):c(this,null,null)}a.prototype.push=function(f,m){return this._transformState.needTransform=!1,s.prototype.push.call(this,f,m)},a.prototype._transform=function(f,m,v){v(new e("_transform()"))},a.prototype._write=function(f,m,v){var y=this._transformState;if(y.writecb=v,y.writechunk=f,y.writeencoding=m,!y.transforming){var b=this._readableState;(y.needTransform||b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}},a.prototype._read=function(f){var m=this._transformState;m.writechunk!==null&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},a.prototype._destroy=function(f,m){s.prototype._destroy.call(this,f,function(v){m(v)})};function c(f,m,v){if(m)return f.emit("error",m);if(v!=null&&f.push(v),f._writableState.length)throw new i;if(f._transformState.transforming)throw new n;return f.push(null)}return is}var ss,Hl;function Qp(){if(Hl)return ss;Hl=1,ss=e;var r=Ml();bt()(e,r);function e(t){if(!(this instanceof e))return new e(t);r.call(this,t)}return e.prototype._transform=function(t,n,i){i(null,t)},ss}var as,Ul;function em(){if(Ul)return as;Ul=1;var r;function e(v){var y=!1;return function(){y||(y=!0,v.apply(void 0,arguments))}}var t=Mt().codes,n=t.ERR_MISSING_ARGS,i=t.ERR_STREAM_DESTROYED;function s(v){if(v)throw v}function o(v){return v.setHeader&&typeof v.abort=="function"}function a(v,y,b,g){g=e(g);var _=!1;v.on("close",function(){_=!0}),r===void 0&&(r=es()),r(v,{readable:y,writable:b},function(T){if(T)return g(T);_=!0,g()});var d=!1;return function(T){if(!_&&!d){if(d=!0,o(v))return v.abort();if(typeof v.destroy=="function")return v.destroy();g(T||new i("pipe"))}}}function l(v){v()}function c(v,y){return v.pipe(y)}function f(v){return!v.length||typeof v[v.length-1]!="function"?s:v.pop()}function m(){for(var v=arguments.length,y=new Array(v),b=0;b<v;b++)y[b]=arguments[b];var g=f(y);if(Array.isArray(y[0])&&(y=y[0]),y.length<2)throw new n("streams");var _,d=y.map(function(T,w){var p=w<y.length-1,E=w>0;return a(T,p,E,function(O){_||(_=O),O&&d.forEach(l),!p&&(d.forEach(l),g(_))})});return y.reduce(c)}return as=m,as}var os,jl;function ls(){if(jl)return os;jl=1,os=t;var r=Bn().EventEmitter,e=bt();e(t,r),t.Readable=Fl(),t.Writable=Cl(),t.Duplex=Ht(),t.Transform=Ml(),t.PassThrough=Qp(),t.finished=es(),t.pipeline=em(),t.Stream=t;function t(){r.call(this)}return t.prototype.pipe=function(n,i){var s=this;function o(y){n.writable&&n.write(y)===!1&&s.pause&&s.pause()}s.on("data",o);function a(){s.readable&&s.resume&&s.resume()}n.on("drain",a),!n._isStdio&&(!i||i.end!==!1)&&(s.on("end",c),s.on("close",f));var l=!1;function c(){l||(l=!0,n.end())}function f(){l||(l=!0,typeof n.destroy=="function"&&n.destroy())}function m(y){if(v(),r.listenerCount(this,"error")===0)throw y}s.on("error",m),n.on("error",m);function v(){s.removeListener("data",o),n.removeListener("drain",a),s.removeListener("end",c),s.removeListener("close",f),s.removeListener("error",m),n.removeListener("error",m),s.removeListener("end",v),s.removeListener("close",v),n.removeListener("close",v)}return s.on("end",v),s.on("close",v),n.on("close",v),n.emit("pipe",s),n},os}var Wl;function tm(){return Wl||(Wl=1,(function(r){(function(e){e.parser=function(C,k){return new n(C,k)},e.SAXParser=n,e.SAXStream=f,e.createStream=c,e.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function n(C,k){if(!(this instanceof n))return new n(C,k);var G=this;s(G),G.q=G.c="",G.bufferCheckPosition=e.MAX_BUFFER_LENGTH,G.opt=k||{},G.opt.lowercase=G.opt.lowercase||G.opt.lowercasetags,G.looseCase=G.opt.lowercase?"toLowerCase":"toUpperCase",G.tags=[],G.closed=G.closedRoot=G.sawRoot=!1,G.tag=G.error=null,G.strict=!!C,G.noscript=!!(C||G.opt.noscript),G.state=I.BEGIN,G.strictEntities=G.opt.strictEntities,G.ENTITIES=G.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),G.attribList=[],G.opt.xmlns&&(G.ns=Object.create(g)),G.trackPosition=G.opt.position!==!1,G.trackPosition&&(G.position=G.line=G.column=0),oe(G,"onready")}Object.create||(Object.create=function(C){function k(){}k.prototype=C;var G=new k;return G}),Object.keys||(Object.keys=function(C){var k=[];for(var G in C)C.hasOwnProperty(G)&&k.push(G);return k});function i(C){for(var k=Math.max(e.MAX_BUFFER_LENGTH,10),G=0,H=0,D=t.length;H<D;H++){var F=C[t[H]].length;if(F>k)switch(t[H]){case"textNode":U(C);break;case"cdata":N(C,"oncdata",C.cdata),C.cdata="";break;case"script":N(C,"onscript",C.script),C.script="";break;default:X(C,"Max buffer length exceeded: "+t[H])}G=Math.max(G,F)}var te=e.MAX_BUFFER_LENGTH-G;C.bufferCheckPosition=te+C.position}function s(C){for(var k=0,G=t.length;k<G;k++)C[t[k]]=""}function o(C){U(C),C.cdata!==""&&(N(C,"oncdata",C.cdata),C.cdata=""),C.script!==""&&(N(C,"onscript",C.script),C.script="")}n.prototype={end:function(){re(this)},write:$,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){o(this)}};var a;try{a=ls().Stream}catch{a=function(){}}var l=e.EVENTS.filter(function(C){return C!=="error"&&C!=="end"});function c(C,k){return new f(C,k)}function f(C,k){if(!(this instanceof f))return new f(C,k);a.apply(this),this._parser=new n(C,k),this.writable=!0,this.readable=!0;var G=this;this._parser.onend=function(){G.emit("end")},this._parser.onerror=function(H){G.emit("error",H),G._parser.error=null},this._decoder=null,l.forEach(function(H){Object.defineProperty(G,"on"+H,{get:function(){return G._parser["on"+H]},set:function(D){if(!D)return G.removeAllListeners(H),G._parser["on"+H]=D,D;G.on(H,D)},enumerable:!0,configurable:!1})})}f.prototype=Object.create(a.prototype,{constructor:{value:f}}),f.prototype.write=function(C){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(C)){if(!this._decoder){var k=Ji().StringDecoder;this._decoder=new k("utf8")}C=this._decoder.write(C)}return this._parser.write(C.toString()),this.emit("data",C),!0},f.prototype.end=function(C){return C&&C.length&&this.write(C),this._parser.end(),!0},f.prototype.on=function(C,k){var G=this;return!G._parser["on"+C]&&l.indexOf(C)!==-1&&(G._parser["on"+C]=function(){var H=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);H.splice(0,0,C),G.emit.apply(G,H)}),a.prototype.on.call(G,C,k)};var m="[CDATA[",v="DOCTYPE",y="http://www.w3.org/XML/1998/namespace",b="http://www.w3.org/2000/xmlns/",g={xml:y,xmlns:b},_=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,d=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,T=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,w=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function p(C){return C===" "||C===`
|
|
121
|
+
`||C==="\r"||C===" "}function E(C){return C==='"'||C==="'"}function O(C){return C===">"||p(C)}function P(C,k){return C.test(k)}function B(C,k){return!P(C,k)}var I=0;e.STATE={BEGIN:I++,BEGIN_WHITESPACE:I++,TEXT:I++,TEXT_ENTITY:I++,OPEN_WAKA:I++,SGML_DECL:I++,SGML_DECL_QUOTED:I++,DOCTYPE:I++,DOCTYPE_QUOTED:I++,DOCTYPE_DTD:I++,DOCTYPE_DTD_QUOTED:I++,COMMENT_STARTING:I++,COMMENT:I++,COMMENT_ENDING:I++,COMMENT_ENDED:I++,CDATA:I++,CDATA_ENDING:I++,CDATA_ENDING_2:I++,PROC_INST:I++,PROC_INST_BODY:I++,PROC_INST_ENDING:I++,OPEN_TAG:I++,OPEN_TAG_SLASH:I++,ATTRIB:I++,ATTRIB_NAME:I++,ATTRIB_NAME_SAW_WHITE:I++,ATTRIB_VALUE:I++,ATTRIB_VALUE_QUOTED:I++,ATTRIB_VALUE_CLOSED:I++,ATTRIB_VALUE_UNQUOTED:I++,ATTRIB_VALUE_ENTITY_Q:I++,ATTRIB_VALUE_ENTITY_U:I++,CLOSE_TAG:I++,CLOSE_TAG_SAW_WHITE:I++,SCRIPT:I++,SCRIPT_ENDING:I++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(C){var k=e.ENTITIES[C],G=typeof k=="number"?String.fromCharCode(k):k;e.ENTITIES[C]=G});for(var K in e.STATE)e.STATE[e.STATE[K]]=K;I=e.STATE;function oe(C,k,G){C[k]&&C[k](G)}function N(C,k,G){C.textNode&&U(C),oe(C,k,G)}function U(C){C.textNode=x(C.opt,C.textNode),C.textNode&&oe(C,"ontext",C.textNode),C.textNode=""}function x(C,k){return C.trim&&(k=k.trim()),C.normalize&&(k=k.replace(/\s+/g," ")),k}function X(C,k){return U(C),C.trackPosition&&(k+=`
|
|
122
|
+
Line: `+C.line+`
|
|
123
|
+
Column: `+C.column+`
|
|
124
|
+
Char: `+C.c),k=new Error(k),C.error=k,oe(C,"onerror",k),C}function re(C){return C.sawRoot&&!C.closedRoot&&z(C,"Unclosed root tag"),C.state!==I.BEGIN&&C.state!==I.BEGIN_WHITESPACE&&C.state!==I.TEXT&&X(C,"Unexpected end"),U(C),C.c="",C.closed=!0,oe(C,"onend"),n.call(C,C.strict,C.opt),C}function z(C,k){if(typeof C!="object"||!(C instanceof n))throw new Error("bad call to strictFail");C.strict&&X(C,k)}function se(C){C.strict||(C.tagName=C.tagName[C.looseCase]());var k=C.tags[C.tags.length-1]||C,G=C.tag={name:C.tagName,attributes:{}};C.opt.xmlns&&(G.ns=k.ns),C.attribList.length=0,N(C,"onopentagstart",G)}function Q(C,k){var G=C.indexOf(":"),H=G<0?["",C]:C.split(":"),D=H[0],F=H[1];return k&&C==="xmlns"&&(D="xmlns",F=""),{prefix:D,local:F}}function me(C){if(C.strict||(C.attribName=C.attribName[C.looseCase]()),C.attribList.indexOf(C.attribName)!==-1||C.tag.attributes.hasOwnProperty(C.attribName)){C.attribName=C.attribValue="";return}if(C.opt.xmlns){var k=Q(C.attribName,!0),G=k.prefix,H=k.local;if(G==="xmlns")if(H==="xml"&&C.attribValue!==y)z(C,"xml: prefix must be bound to "+y+`
|
|
125
|
+
Actual: `+C.attribValue);else if(H==="xmlns"&&C.attribValue!==b)z(C,"xmlns: prefix must be bound to "+b+`
|
|
126
|
+
Actual: `+C.attribValue);else{var D=C.tag,F=C.tags[C.tags.length-1]||C;D.ns===F.ns&&(D.ns=Object.create(F.ns)),D.ns[H]=C.attribValue}C.attribList.push([C.attribName,C.attribValue])}else C.tag.attributes[C.attribName]=C.attribValue,N(C,"onattribute",{name:C.attribName,value:C.attribValue});C.attribName=C.attribValue=""}function Y(C,k){if(C.opt.xmlns){var G=C.tag,H=Q(C.tagName);G.prefix=H.prefix,G.local=H.local,G.uri=G.ns[H.prefix]||"",G.prefix&&!G.uri&&(z(C,"Unbound namespace prefix: "+JSON.stringify(C.tagName)),G.uri=H.prefix);var D=C.tags[C.tags.length-1]||C;G.ns&&D.ns!==G.ns&&Object.keys(G.ns).forEach(function(j){N(C,"onopennamespace",{prefix:j,uri:G.ns[j]})});for(var F=0,te=C.attribList.length;F<te;F++){var A=C.attribList[F],ee=A[0],R=A[1],u=Q(ee,!0),h=u.prefix,S=u.local,M=h===""?"":G.ns[h]||"",q={name:ee,value:R,prefix:h,local:S,uri:M};h&&h!=="xmlns"&&!M&&(z(C,"Unbound namespace prefix: "+JSON.stringify(h)),q.uri=h),C.tag.attributes[ee]=q,N(C,"onattribute",q)}C.attribList.length=0}C.tag.isSelfClosing=!!k,C.sawRoot=!0,C.tags.push(C.tag),N(C,"onopentag",C.tag),k||(!C.noscript&&C.tagName.toLowerCase()==="script"?C.state=I.SCRIPT:C.state=I.TEXT,C.tag=null,C.tagName=""),C.attribName=C.attribValue="",C.attribList.length=0}function L(C){if(!C.tagName){z(C,"Weird empty close tag."),C.textNode+="</>",C.state=I.TEXT;return}if(C.script){if(C.tagName!=="script"){C.script+="</"+C.tagName+">",C.tagName="",C.state=I.SCRIPT;return}N(C,"onscript",C.script),C.script=""}var k=C.tags.length,G=C.tagName;C.strict||(G=G[C.looseCase]());for(var H=G;k--;){var D=C.tags[k];if(D.name!==H)z(C,"Unexpected close tag");else break}if(k<0){z(C,"Unmatched closing tag: "+C.tagName),C.textNode+="</"+C.tagName+">",C.state=I.TEXT;return}C.tagName=G;for(var F=C.tags.length;F-- >k;){var te=C.tag=C.tags.pop();C.tagName=C.tag.name,N(C,"onclosetag",C.tagName);var A={};for(var ee in te.ns)A[ee]=te.ns[ee];var R=C.tags[C.tags.length-1]||C;C.opt.xmlns&&te.ns!==R.ns&&Object.keys(te.ns).forEach(function(u){var h=te.ns[u];N(C,"onclosenamespace",{prefix:u,uri:h})})}k===0&&(C.closedRoot=!0),C.tagName=C.attribValue=C.attribName="",C.attribList.length=0,C.state=I.TEXT}function V(C){var k=C.entity,G=k.toLowerCase(),H,D="";return C.ENTITIES[k]?C.ENTITIES[k]:C.ENTITIES[G]?C.ENTITIES[G]:(k=G,k.charAt(0)==="#"&&(k.charAt(1)==="x"?(k=k.slice(2),H=parseInt(k,16),D=H.toString(16)):(k=k.slice(1),H=parseInt(k,10),D=H.toString(10))),k=k.replace(/^0+/,""),isNaN(H)||D.toLowerCase()!==k?(z(C,"Invalid character entity"),"&"+C.entity+";"):String.fromCodePoint(H))}function Z(C,k){k==="<"?(C.state=I.OPEN_WAKA,C.startTagPosition=C.position):p(k)||(z(C,"Non-whitespace before first tag."),C.textNode=k,C.state=I.TEXT)}function ie(C,k){var G="";return k<C.length&&(G=C.charAt(k)),G}function $(C){var k=this;if(this.error)throw this.error;if(k.closed)return X(k,"Cannot write after close. Assign an onready handler.");if(C===null)return re(k);typeof C=="object"&&(C=C.toString());for(var G=0,H="";H=ie(C,G++),k.c=H,!!H;)switch(k.trackPosition&&(k.position++,H===`
|
|
127
|
+
`?(k.line++,k.column=0):k.column++),k.state){case I.BEGIN:if(k.state=I.BEGIN_WHITESPACE,H==="\uFEFF")continue;Z(k,H);continue;case I.BEGIN_WHITESPACE:Z(k,H);continue;case I.TEXT:if(k.sawRoot&&!k.closedRoot){for(var D=G-1;H&&H!=="<"&&H!=="&";)H=ie(C,G++),H&&k.trackPosition&&(k.position++,H===`
|
|
128
|
+
`?(k.line++,k.column=0):k.column++);k.textNode+=C.substring(D,G-1)}H==="<"&&!(k.sawRoot&&k.closedRoot&&!k.strict)?(k.state=I.OPEN_WAKA,k.startTagPosition=k.position):(!p(H)&&(!k.sawRoot||k.closedRoot)&&z(k,"Text data outside of root node."),H==="&"?k.state=I.TEXT_ENTITY:k.textNode+=H);continue;case I.SCRIPT:H==="<"?k.state=I.SCRIPT_ENDING:k.script+=H;continue;case I.SCRIPT_ENDING:H==="/"?k.state=I.CLOSE_TAG:(k.script+="<"+H,k.state=I.SCRIPT);continue;case I.OPEN_WAKA:if(H==="!")k.state=I.SGML_DECL,k.sgmlDecl="";else if(!p(H))if(P(_,H))k.state=I.OPEN_TAG,k.tagName=H;else if(H==="/")k.state=I.CLOSE_TAG,k.tagName="";else if(H==="?")k.state=I.PROC_INST,k.procInstName=k.procInstBody="";else{if(z(k,"Unencoded <"),k.startTagPosition+1<k.position){var F=k.position-k.startTagPosition;H=new Array(F).join(" ")+H}k.textNode+="<"+H,k.state=I.TEXT}continue;case I.SGML_DECL:(k.sgmlDecl+H).toUpperCase()===m?(N(k,"onopencdata"),k.state=I.CDATA,k.sgmlDecl="",k.cdata=""):k.sgmlDecl+H==="--"?(k.state=I.COMMENT,k.comment="",k.sgmlDecl=""):(k.sgmlDecl+H).toUpperCase()===v?(k.state=I.DOCTYPE,(k.doctype||k.sawRoot)&&z(k,"Inappropriately located doctype declaration"),k.doctype="",k.sgmlDecl=""):H===">"?(N(k,"onsgmldeclaration",k.sgmlDecl),k.sgmlDecl="",k.state=I.TEXT):(E(H)&&(k.state=I.SGML_DECL_QUOTED),k.sgmlDecl+=H);continue;case I.SGML_DECL_QUOTED:H===k.q&&(k.state=I.SGML_DECL,k.q=""),k.sgmlDecl+=H;continue;case I.DOCTYPE:H===">"?(k.state=I.TEXT,N(k,"ondoctype",k.doctype),k.doctype=!0):(k.doctype+=H,H==="["?k.state=I.DOCTYPE_DTD:E(H)&&(k.state=I.DOCTYPE_QUOTED,k.q=H));continue;case I.DOCTYPE_QUOTED:k.doctype+=H,H===k.q&&(k.q="",k.state=I.DOCTYPE);continue;case I.DOCTYPE_DTD:k.doctype+=H,H==="]"?k.state=I.DOCTYPE:E(H)&&(k.state=I.DOCTYPE_DTD_QUOTED,k.q=H);continue;case I.DOCTYPE_DTD_QUOTED:k.doctype+=H,H===k.q&&(k.state=I.DOCTYPE_DTD,k.q="");continue;case I.COMMENT:H==="-"?k.state=I.COMMENT_ENDING:k.comment+=H;continue;case I.COMMENT_ENDING:H==="-"?(k.state=I.COMMENT_ENDED,k.comment=x(k.opt,k.comment),k.comment&&N(k,"oncomment",k.comment),k.comment=""):(k.comment+="-"+H,k.state=I.COMMENT);continue;case I.COMMENT_ENDED:H!==">"?(z(k,"Malformed comment"),k.comment+="--"+H,k.state=I.COMMENT):k.state=I.TEXT;continue;case I.CDATA:H==="]"?k.state=I.CDATA_ENDING:k.cdata+=H;continue;case I.CDATA_ENDING:H==="]"?k.state=I.CDATA_ENDING_2:(k.cdata+="]"+H,k.state=I.CDATA);continue;case I.CDATA_ENDING_2:H===">"?(k.cdata&&N(k,"oncdata",k.cdata),N(k,"onclosecdata"),k.cdata="",k.state=I.TEXT):H==="]"?k.cdata+="]":(k.cdata+="]]"+H,k.state=I.CDATA);continue;case I.PROC_INST:H==="?"?k.state=I.PROC_INST_ENDING:p(H)?k.state=I.PROC_INST_BODY:k.procInstName+=H;continue;case I.PROC_INST_BODY:if(!k.procInstBody&&p(H))continue;H==="?"?k.state=I.PROC_INST_ENDING:k.procInstBody+=H;continue;case I.PROC_INST_ENDING:H===">"?(N(k,"onprocessinginstruction",{name:k.procInstName,body:k.procInstBody}),k.procInstName=k.procInstBody="",k.state=I.TEXT):(k.procInstBody+="?"+H,k.state=I.PROC_INST_BODY);continue;case I.OPEN_TAG:P(d,H)?k.tagName+=H:(se(k),H===">"?Y(k):H==="/"?k.state=I.OPEN_TAG_SLASH:(p(H)||z(k,"Invalid character in tag name"),k.state=I.ATTRIB));continue;case I.OPEN_TAG_SLASH:H===">"?(Y(k,!0),L(k)):(z(k,"Forward-slash in opening tag not followed by >"),k.state=I.ATTRIB);continue;case I.ATTRIB:if(p(H))continue;H===">"?Y(k):H==="/"?k.state=I.OPEN_TAG_SLASH:P(_,H)?(k.attribName=H,k.attribValue="",k.state=I.ATTRIB_NAME):z(k,"Invalid attribute name");continue;case I.ATTRIB_NAME:H==="="?k.state=I.ATTRIB_VALUE:H===">"?(z(k,"Attribute without value"),k.attribValue=k.attribName,me(k),Y(k)):p(H)?k.state=I.ATTRIB_NAME_SAW_WHITE:P(d,H)?k.attribName+=H:z(k,"Invalid attribute name");continue;case I.ATTRIB_NAME_SAW_WHITE:if(H==="=")k.state=I.ATTRIB_VALUE;else{if(p(H))continue;z(k,"Attribute without value"),k.tag.attributes[k.attribName]="",k.attribValue="",N(k,"onattribute",{name:k.attribName,value:""}),k.attribName="",H===">"?Y(k):P(_,H)?(k.attribName=H,k.state=I.ATTRIB_NAME):(z(k,"Invalid attribute name"),k.state=I.ATTRIB)}continue;case I.ATTRIB_VALUE:if(p(H))continue;E(H)?(k.q=H,k.state=I.ATTRIB_VALUE_QUOTED):(z(k,"Unquoted attribute value"),k.state=I.ATTRIB_VALUE_UNQUOTED,k.attribValue=H);continue;case I.ATTRIB_VALUE_QUOTED:if(H!==k.q){H==="&"?k.state=I.ATTRIB_VALUE_ENTITY_Q:k.attribValue+=H;continue}me(k),k.q="",k.state=I.ATTRIB_VALUE_CLOSED;continue;case I.ATTRIB_VALUE_CLOSED:p(H)?k.state=I.ATTRIB:H===">"?Y(k):H==="/"?k.state=I.OPEN_TAG_SLASH:P(_,H)?(z(k,"No whitespace between attributes"),k.attribName=H,k.attribValue="",k.state=I.ATTRIB_NAME):z(k,"Invalid attribute name");continue;case I.ATTRIB_VALUE_UNQUOTED:if(!O(H)){H==="&"?k.state=I.ATTRIB_VALUE_ENTITY_U:k.attribValue+=H;continue}me(k),H===">"?Y(k):k.state=I.ATTRIB;continue;case I.CLOSE_TAG:if(k.tagName)H===">"?L(k):P(d,H)?k.tagName+=H:k.script?(k.script+="</"+k.tagName,k.tagName="",k.state=I.SCRIPT):(p(H)||z(k,"Invalid tagname in closing tag"),k.state=I.CLOSE_TAG_SAW_WHITE);else{if(p(H))continue;B(_,H)?k.script?(k.script+="</"+H,k.state=I.SCRIPT):z(k,"Invalid tagname in closing tag."):k.tagName=H}continue;case I.CLOSE_TAG_SAW_WHITE:if(p(H))continue;H===">"?L(k):z(k,"Invalid characters in closing tag");continue;case I.TEXT_ENTITY:case I.ATTRIB_VALUE_ENTITY_Q:case I.ATTRIB_VALUE_ENTITY_U:var te,A;switch(k.state){case I.TEXT_ENTITY:te=I.TEXT,A="textNode";break;case I.ATTRIB_VALUE_ENTITY_Q:te=I.ATTRIB_VALUE_QUOTED,A="attribValue";break;case I.ATTRIB_VALUE_ENTITY_U:te=I.ATTRIB_VALUE_UNQUOTED,A="attribValue";break}H===";"?(k[A]+=V(k),k.entity="",k.state=te):P(k.entity.length?w:T,H)?k.entity+=H:(z(k,"Invalid character in entity name"),k[A]+="&"+k.entity+H,k.entity="",k.state=te);continue;default:throw new Error(k,"Unknown state: "+k.state)}return k.position>=k.bufferCheckPosition&&i(k),k}String.fromCodePoint||(function(){var C=String.fromCharCode,k=Math.floor,G=function(){var H=16384,D=[],F,te,A=-1,ee=arguments.length;if(!ee)return"";for(var R="";++A<ee;){var u=Number(arguments[A]);if(!isFinite(u)||u<0||u>1114111||k(u)!==u)throw RangeError("Invalid code point: "+u);u<=65535?D.push(u):(u-=65536,F=(u>>10)+55296,te=u%1024+56320,D.push(F,te)),(A+1===ee||D.length>H)&&(R+=C.apply(null,D),D.length=0)}return R};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:G,configurable:!0,writable:!0}):String.fromCodePoint=G})()})(r)})(Fn)),Fn}var us,zl;function cs(){return zl||(zl=1,us={isArray:function(r){return Array.isArray?Array.isArray(r):Object.prototype.toString.call(r)==="[object Array]"}}),us}var hs,Gl;function fs(){if(Gl)return hs;Gl=1;var r=cs().isArray;return hs={copyOptions:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n},ensureFlagExists:function(e,t){(!(e in t)||typeof t[e]!="boolean")&&(t[e]=!1)},ensureSpacesExists:function(e){(!("spaces"in e)||typeof e.spaces!="number"&&typeof e.spaces!="string")&&(e.spaces=0)},ensureAlwaysArrayExists:function(e){(!("alwaysArray"in e)||typeof e.alwaysArray!="boolean"&&!r(e.alwaysArray))&&(e.alwaysArray=!1)},ensureKeyExists:function(e,t){(!(e+"Key"in t)||typeof t[e+"Key"]!="string")&&(t[e+"Key"]=t.compact?"_"+e:e)},checkFnExists:function(e,t){return e+"Fn"in t}},hs}var ds,Kl;function ql(){if(Kl)return ds;Kl=1;var r=tm(),e=fs(),t=cs().isArray,n,i;function s(d){return n=e.copyOptions(d),e.ensureFlagExists("ignoreDeclaration",n),e.ensureFlagExists("ignoreInstruction",n),e.ensureFlagExists("ignoreAttributes",n),e.ensureFlagExists("ignoreText",n),e.ensureFlagExists("ignoreComment",n),e.ensureFlagExists("ignoreCdata",n),e.ensureFlagExists("ignoreDoctype",n),e.ensureFlagExists("compact",n),e.ensureFlagExists("alwaysChildren",n),e.ensureFlagExists("addParent",n),e.ensureFlagExists("trim",n),e.ensureFlagExists("nativeType",n),e.ensureFlagExists("nativeTypeAttributes",n),e.ensureFlagExists("sanitize",n),e.ensureFlagExists("instructionHasAttributes",n),e.ensureFlagExists("captureSpacesBetweenElements",n),e.ensureAlwaysArrayExists(n),e.ensureKeyExists("declaration",n),e.ensureKeyExists("instruction",n),e.ensureKeyExists("attributes",n),e.ensureKeyExists("text",n),e.ensureKeyExists("comment",n),e.ensureKeyExists("cdata",n),e.ensureKeyExists("doctype",n),e.ensureKeyExists("type",n),e.ensureKeyExists("name",n),e.ensureKeyExists("elements",n),e.ensureKeyExists("parent",n),e.checkFnExists("doctype",n),e.checkFnExists("instruction",n),e.checkFnExists("cdata",n),e.checkFnExists("comment",n),e.checkFnExists("text",n),e.checkFnExists("instructionName",n),e.checkFnExists("elementName",n),e.checkFnExists("attributeName",n),e.checkFnExists("attributeValue",n),e.checkFnExists("attributes",n),n}function o(d){var T=Number(d);if(!isNaN(T))return T;var w=d.toLowerCase();return w==="true"?!0:w==="false"?!1:d}function a(d,T){var w;if(n.compact){if(!i[n[d+"Key"]]&&(t(n.alwaysArray)?n.alwaysArray.indexOf(n[d+"Key"])!==-1:n.alwaysArray)&&(i[n[d+"Key"]]=[]),i[n[d+"Key"]]&&!t(i[n[d+"Key"]])&&(i[n[d+"Key"]]=[i[n[d+"Key"]]]),d+"Fn"in n&&typeof T=="string"&&(T=n[d+"Fn"](T,i)),d==="instruction"&&("instructionFn"in n||"instructionNameFn"in n)){for(w in T)if(T.hasOwnProperty(w))if("instructionFn"in n)T[w]=n.instructionFn(T[w],w,i);else{var p=T[w];delete T[w],T[n.instructionNameFn(w,p,i)]=p}}t(i[n[d+"Key"]])?i[n[d+"Key"]].push(T):i[n[d+"Key"]]=T}else{i[n.elementsKey]||(i[n.elementsKey]=[]);var E={};if(E[n.typeKey]=d,d==="instruction"){for(w in T)if(T.hasOwnProperty(w))break;E[n.nameKey]="instructionNameFn"in n?n.instructionNameFn(w,T,i):w,n.instructionHasAttributes?(E[n.attributesKey]=T[w][n.attributesKey],"instructionFn"in n&&(E[n.attributesKey]=n.instructionFn(E[n.attributesKey],w,i))):("instructionFn"in n&&(T[w]=n.instructionFn(T[w],w,i)),E[n.instructionKey]=T[w])}else d+"Fn"in n&&(T=n[d+"Fn"](T,i)),E[n[d+"Key"]]=T;n.addParent&&(E[n.parentKey]=i),i[n.elementsKey].push(E)}}function l(d){if("attributesFn"in n&&d&&(d=n.attributesFn(d,i)),(n.trim||"attributeValueFn"in n||"attributeNameFn"in n||n.nativeTypeAttributes)&&d){var T;for(T in d)if(d.hasOwnProperty(T)&&(n.trim&&(d[T]=d[T].trim()),n.nativeTypeAttributes&&(d[T]=o(d[T])),"attributeValueFn"in n&&(d[T]=n.attributeValueFn(d[T],T,i)),"attributeNameFn"in n)){var w=d[T];delete d[T],d[n.attributeNameFn(T,d[T],i)]=w}}return d}function c(d){var T={};if(d.body&&(d.name.toLowerCase()==="xml"||n.instructionHasAttributes)){for(var w=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,p;(p=w.exec(d.body))!==null;)T[p[1]]=p[2]||p[3]||p[4];T=l(T)}if(d.name.toLowerCase()==="xml"){if(n.ignoreDeclaration)return;i[n.declarationKey]={},Object.keys(T).length&&(i[n.declarationKey][n.attributesKey]=T),n.addParent&&(i[n.declarationKey][n.parentKey]=i)}else{if(n.ignoreInstruction)return;n.trim&&(d.body=d.body.trim());var E={};n.instructionHasAttributes&&Object.keys(T).length?(E[d.name]={},E[d.name][n.attributesKey]=T):E[d.name]=d.body,a("instruction",E)}}function f(d,T){var w;if(typeof d=="object"&&(T=d.attributes,d=d.name),T=l(T),"elementNameFn"in n&&(d=n.elementNameFn(d,i)),n.compact){if(w={},!n.ignoreAttributes&&T&&Object.keys(T).length){w[n.attributesKey]={};var p;for(p in T)T.hasOwnProperty(p)&&(w[n.attributesKey][p]=T[p])}!(d in i)&&(t(n.alwaysArray)?n.alwaysArray.indexOf(d)!==-1:n.alwaysArray)&&(i[d]=[]),i[d]&&!t(i[d])&&(i[d]=[i[d]]),t(i[d])?i[d].push(w):i[d]=w}else i[n.elementsKey]||(i[n.elementsKey]=[]),w={},w[n.typeKey]="element",w[n.nameKey]=d,!n.ignoreAttributes&&T&&Object.keys(T).length&&(w[n.attributesKey]=T),n.alwaysChildren&&(w[n.elementsKey]=[]),i[n.elementsKey].push(w);w[n.parentKey]=i,i=w}function m(d){n.ignoreText||!d.trim()&&!n.captureSpacesBetweenElements||(n.trim&&(d=d.trim()),n.nativeType&&(d=o(d)),n.sanitize&&(d=d.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")),a("text",d))}function v(d){n.ignoreComment||(n.trim&&(d=d.trim()),a("comment",d))}function y(d){var T=i[n.parentKey];n.addParent||delete i[n.parentKey],i=T}function b(d){n.ignoreCdata||(n.trim&&(d=d.trim()),a("cdata",d))}function g(d){n.ignoreDoctype||(d=d.replace(/^ /,""),n.trim&&(d=d.trim()),a("doctype",d))}function _(d){d.note=d}return ds=function(d,T){var w=r.parser(!0,{}),p={};if(i=p,n=s(T),w.opt={strictEntities:!0},w.onopentag=f,w.ontext=m,w.oncomment=v,w.onclosetag=y,w.onerror=_,w.oncdata=b,w.ondoctype=g,w.onprocessinginstruction=c,w.write(d).close(),p[n.elementsKey]){var E=p[n.elementsKey];delete p[n.elementsKey],p[n.elementsKey]=E,delete p.text}return p},ds}var ps,Vl;function rm(){if(Vl)return ps;Vl=1;var r=fs(),e=ql();function t(n){var i=r.copyOptions(n);return r.ensureSpacesExists(i),i}return ps=function(n,i){var s,o,a,l;return s=t(i),o=e(n,s),l="compact"in s&&s.compact?"_parent":"parent","addParent"in s&&s.addParent?a=JSON.stringify(o,function(c,f){return c===l?"_":f},s.spaces):a=JSON.stringify(o,null,s.spaces),a.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")},ps}var ms,$l;function Xl(){if($l)return ms;$l=1;var r=fs(),e=cs().isArray,t,n;function i(w){var p=r.copyOptions(w);return r.ensureFlagExists("ignoreDeclaration",p),r.ensureFlagExists("ignoreInstruction",p),r.ensureFlagExists("ignoreAttributes",p),r.ensureFlagExists("ignoreText",p),r.ensureFlagExists("ignoreComment",p),r.ensureFlagExists("ignoreCdata",p),r.ensureFlagExists("ignoreDoctype",p),r.ensureFlagExists("compact",p),r.ensureFlagExists("indentText",p),r.ensureFlagExists("indentCdata",p),r.ensureFlagExists("indentAttributes",p),r.ensureFlagExists("indentInstruction",p),r.ensureFlagExists("fullTagEmptyElement",p),r.ensureFlagExists("noQuotesForNativeAttributes",p),r.ensureSpacesExists(p),typeof p.spaces=="number"&&(p.spaces=Array(p.spaces+1).join(" ")),r.ensureKeyExists("declaration",p),r.ensureKeyExists("instruction",p),r.ensureKeyExists("attributes",p),r.ensureKeyExists("text",p),r.ensureKeyExists("comment",p),r.ensureKeyExists("cdata",p),r.ensureKeyExists("doctype",p),r.ensureKeyExists("type",p),r.ensureKeyExists("name",p),r.ensureKeyExists("elements",p),r.checkFnExists("doctype",p),r.checkFnExists("instruction",p),r.checkFnExists("cdata",p),r.checkFnExists("comment",p),r.checkFnExists("text",p),r.checkFnExists("instructionName",p),r.checkFnExists("elementName",p),r.checkFnExists("attributeName",p),r.checkFnExists("attributeValue",p),r.checkFnExists("attributes",p),r.checkFnExists("fullTagEmptyElement",p),p}function s(w,p,E){return(!E&&w.spaces?`
|
|
129
|
+
`:"")+Array(p+1).join(w.spaces)}function o(w,p,E){if(p.ignoreAttributes)return"";"attributesFn"in p&&(w=p.attributesFn(w,n,t));var O,P,B,I,K=[];for(O in w)w.hasOwnProperty(O)&&w[O]!==null&&w[O]!==void 0&&(I=p.noQuotesForNativeAttributes&&typeof w[O]!="string"?"":'"',P=""+w[O],P=P.replace(/"/g,"""),B="attributeNameFn"in p?p.attributeNameFn(O,P,n,t):O,K.push(p.spaces&&p.indentAttributes?s(p,E+1,!1):" "),K.push(B+"="+I+("attributeValueFn"in p?p.attributeValueFn(P,O,n,t):P)+I));return w&&Object.keys(w).length&&p.spaces&&p.indentAttributes&&K.push(s(p,E,!1)),K.join("")}function a(w,p,E){return t=w,n="xml",p.ignoreDeclaration?"":"<?xml"+o(w[p.attributesKey],p,E)+"?>"}function l(w,p,E){if(p.ignoreInstruction)return"";var O;for(O in w)if(w.hasOwnProperty(O))break;var P="instructionNameFn"in p?p.instructionNameFn(O,w[O],n,t):O;if(typeof w[O]=="object")return t=w,n=P,"<?"+P+o(w[O][p.attributesKey],p,E)+"?>";var B=w[O]?w[O]:"";return"instructionFn"in p&&(B=p.instructionFn(B,O,n,t)),"<?"+P+(B?" "+B:"")+"?>"}function c(w,p){return p.ignoreComment?"":"<!--"+("commentFn"in p?p.commentFn(w,n,t):w)+"-->"}function f(w,p){return p.ignoreCdata?"":"<![CDATA["+("cdataFn"in p?p.cdataFn(w,n,t):w.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function m(w,p){return p.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in p?p.doctypeFn(w,n,t):w)+">"}function v(w,p){return p.ignoreText?"":(w=""+w,w=w.replace(/&/g,"&"),w=w.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),"textFn"in p?p.textFn(w,n,t):w)}function y(w,p){var E;if(w.elements&&w.elements.length)for(E=0;E<w.elements.length;++E)switch(w.elements[E][p.typeKey]){case"text":if(p.indentText)return!0;break;case"cdata":if(p.indentCdata)return!0;break;case"instruction":if(p.indentInstruction)return!0;break;case"doctype":case"comment":case"element":return!0;default:return!0}return!1}function b(w,p,E){t=w,n=w.name;var O=[],P="elementNameFn"in p?p.elementNameFn(w.name,w):w.name;O.push("<"+P),w[p.attributesKey]&&O.push(o(w[p.attributesKey],p,E));var B=w[p.elementsKey]&&w[p.elementsKey].length||w[p.attributesKey]&&w[p.attributesKey]["xml:space"]==="preserve";return B||("fullTagEmptyElementFn"in p?B=p.fullTagEmptyElementFn(w.name,w):B=p.fullTagEmptyElement),B?(O.push(">"),w[p.elementsKey]&&w[p.elementsKey].length&&(O.push(g(w[p.elementsKey],p,E+1)),t=w,n=w.name),O.push(p.spaces&&y(w,p)?`
|
|
130
|
+
`+Array(E+1).join(p.spaces):""),O.push("</"+P+">")):O.push("/>"),O.join("")}function g(w,p,E,O){return w.reduce(function(P,B){var I=s(p,E,O&&!P);switch(B.type){case"element":return P+I+b(B,p,E);case"comment":return P+I+c(B[p.commentKey],p);case"doctype":return P+I+m(B[p.doctypeKey],p);case"cdata":return P+(p.indentCdata?I:"")+f(B[p.cdataKey],p);case"text":return P+(p.indentText?I:"")+v(B[p.textKey],p);case"instruction":var K={};return K[B[p.nameKey]]=B[p.attributesKey]?B:B[p.instructionKey],P+(p.indentInstruction?I:"")+l(K,p,E)}},"")}function _(w,p,E){var O;for(O in w)if(w.hasOwnProperty(O))switch(O){case p.parentKey:case p.attributesKey:break;case p.textKey:if(p.indentText||E)return!0;break;case p.cdataKey:if(p.indentCdata||E)return!0;break;case p.instructionKey:if(p.indentInstruction||E)return!0;break;case p.doctypeKey:case p.commentKey:return!0;default:return!0}return!1}function d(w,p,E,O,P){t=w,n=p;var B="elementNameFn"in E?E.elementNameFn(p,w):p;if(typeof w>"u"||w===null||w==="")return"fullTagEmptyElementFn"in E&&E.fullTagEmptyElementFn(p,w)||E.fullTagEmptyElement?"<"+B+"></"+B+">":"<"+B+"/>";var I=[];if(p){if(I.push("<"+B),typeof w!="object")return I.push(">"+v(w,E)+"</"+B+">"),I.join("");w[E.attributesKey]&&I.push(o(w[E.attributesKey],E,O));var K=_(w,E,!0)||w[E.attributesKey]&&w[E.attributesKey]["xml:space"]==="preserve";if(K||("fullTagEmptyElementFn"in E?K=E.fullTagEmptyElementFn(p,w):K=E.fullTagEmptyElement),K)I.push(">");else return I.push("/>"),I.join("")}return I.push(T(w,E,O+1,!1)),t=w,n=p,p&&I.push((P?s(E,O,!1):"")+"</"+B+">"),I.join("")}function T(w,p,E,O){var P,B,I,K=[];for(B in w)if(w.hasOwnProperty(B))for(I=e(w[B])?w[B]:[w[B]],P=0;P<I.length;++P){switch(B){case p.declarationKey:K.push(a(I[P],p,E));break;case p.instructionKey:K.push((p.indentInstruction?s(p,E,O):"")+l(I[P],p,E));break;case p.attributesKey:case p.parentKey:break;case p.textKey:K.push((p.indentText?s(p,E,O):"")+v(I[P],p));break;case p.cdataKey:K.push((p.indentCdata?s(p,E,O):"")+f(I[P],p));break;case p.doctypeKey:K.push(s(p,E,O)+m(I[P],p));break;case p.commentKey:K.push(s(p,E,O)+c(I[P],p));break;default:K.push(s(p,E,O)+d(I[P],B,p,E,_(I[P],p)))}O=O&&!K.length}return K.join("")}return ms=function(w,p){p=i(p);var E=[];return t=w,n="_root_",p.compact?E.push(T(w,p,0,!0)):(w[p.declarationKey]&&E.push(a(w[p.declarationKey],p,0)),w[p.elementsKey]&&w[p.elementsKey].length&&E.push(g(w[p.elementsKey],p,0,!E.length))),E.join("")},ms}var gs,Yl;function nm(){if(Yl)return gs;Yl=1;var r=Xl();return gs=function(e,t){e instanceof Buffer&&(e=e.toString());var n=null;if(typeof e=="string")try{n=JSON.parse(e)}catch{throw new Error("The JSON structure is invalid")}else n=e;return r(n,t)},gs}var ws,Zl;function im(){if(Zl)return ws;Zl=1;var r=ql(),e=rm(),t=Xl(),n=nm();return ws={xml2js:r,xml2json:e,js2xml:t,json2xml:n},ws}var Kr=im();const qr=r=>{switch(r.type){case void 0:case"element":const e=new Jl(r.name,r.attributes),t=r.elements||[];for(const n of t){const i=qr(n);i!==void 0&&e.push(i)}return e;case"text":return r.text;default:return}};class sm extends we{}class Jl extends J{static fromXmlString(e){const t=Kr.xml2js(e,{compact:!1});return qr(t)}constructor(e,t){super(e),t&&this.root.push(new sm(t))}push(e){this.root.push(e)}}class Ql extends J{constructor(e){super(""),this._attr=e}prepForXml(e){return{_attr:this._attr}}}const am="";class ys extends J{constructor(e,t){super(e),t&&(this.root=t.root)}}const Me=r=>{if(isNaN(r))throw new Error(`Invalid value '${r}' specified. Must be an integer.`);return Math.floor(r)},ir=r=>{const e=Me(r);if(e<0)throw new Error(`Invalid value '${r}' specified. Must be a positive integer.`);return e},Vr=(r,e)=>{const t=e*2;if(r.length!==t||isNaN(+`0x${r}`))throw new Error(`Invalid hex value '${r}'. Expected ${t} digit hex value`);return r},om=r=>Vr(r,4),eu=r=>Vr(r,2),vs=r=>Vr(r,1),sr=r=>{const e=r.slice(-2),t=r.substring(0,r.length-2);return`${Number(t)}${e}`},bs=r=>{const e=sr(r);if(parseFloat(e)<0)throw new Error(`Invalid value '${e}' specified. Expected a positive number.`);return e},Rt=r=>{if(r==="auto")return r;const e=r.charAt(0)==="#"?r.substring(1):r;return Vr(e,3)},nt=r=>typeof r=="string"?sr(r):Me(r),tu=r=>typeof r=="string"?bs(r):ir(r),lm=r=>typeof r=="string"?sr(r):Me(r),De=r=>typeof r=="string"?bs(r):ir(r),ru=r=>{const e=r.substring(0,r.length-1);return`${Number(e)}%`},_s=r=>typeof r=="number"?Me(r):r.slice(-1)==="%"?ru(r):sr(r),nu=ir,iu=ir,su=r=>r.toISOString();class de extends J{constructor(e,t=!0){super(e),t!==!0&&this.root.push(new Fe({val:t}))}}class $r extends J{constructor(e,t){super(e),this.root.push(new Fe({val:tu(t)}))}}class He extends J{}class dt extends J{constructor(e,t){super(e),this.root.push(new Fe({val:t}))}}const Ut=(r,e)=>new pe({name:r,attributes:{value:{key:"w:val",value:e}}});class jt extends J{constructor(e,t){super(e),this.root.push(new Fe({val:t}))}}class um extends J{constructor(e,t){super(e),this.root.push(new Fe({val:t}))}}class _t extends J{constructor(e,t){super(e),this.root.push(t)}}class pe extends J{constructor({name:e,attributes:t,children:n}){super(e),t&&this.root.push(new Ln(t)),n&&this.root.push(...n)}}const Ze={START:"start",CENTER:"center",END:"end",BOTH:"both",MEDIUM_KASHIDA:"mediumKashida",DISTRIBUTE:"distribute",NUM_TAB:"numTab",HIGH_KASHIDA:"highKashida",LOW_KASHIDA:"lowKashida",THAI_DISTRIBUTE:"thaiDistribute",LEFT:"left",RIGHT:"right",JUSTIFIED:"both"},Ts=r=>new pe({name:"w:jc",attributes:{val:{key:"w:val",value:r}}}),Re=(r,{color:e,size:t,space:n,style:i})=>new pe({name:r,attributes:{style:{key:"w:val",value:i},color:{key:"w:color",value:e===void 0?void 0:Rt(e)},size:{key:"w:sz",value:t===void 0?void 0:nu(t)},space:{key:"w:space",value:n===void 0?void 0:iu(n)}}}),Xr={SINGLE:"single",DASH_DOT_STROKED:"dashDotStroked",DASHED:"dashed",DASH_SMALL_GAP:"dashSmallGap",DOT_DASH:"dotDash",DOT_DOT_DASH:"dotDotDash",DOTTED:"dotted",DOUBLE:"double",DOUBLE_WAVE:"doubleWave",INSET:"inset",NIL:"nil",NONE:"none",OUTSET:"outset",THICK:"thick",THICK_THIN_LARGE_GAP:"thickThinLargeGap",THICK_THIN_MEDIUM_GAP:"thickThinMediumGap",THICK_THIN_SMALL_GAP:"thickThinSmallGap",THIN_THICK_LARGE_GAP:"thinThickLargeGap",THIN_THICK_MEDIUM_GAP:"thinThickMediumGap",THIN_THICK_SMALL_GAP:"thinThickSmallGap",THIN_THICK_THIN_LARGE_GAP:"thinThickThinLargeGap",THIN_THICK_THIN_MEDIUM_GAP:"thinThickThinMediumGap",THIN_THICK_THIN_SMALL_GAP:"thinThickThinSmallGap",THREE_D_EMBOSS:"threeDEmboss",THREE_D_ENGRAVE:"threeDEngrave",TRIPLE:"triple",WAVE:"wave"};class au extends ct{constructor(e){super("w:pBdr"),e.top&&this.root.push(Re("w:top",e.top)),e.bottom&&this.root.push(Re("w:bottom",e.bottom)),e.left&&this.root.push(Re("w:left",e.left)),e.right&&this.root.push(Re("w:right",e.right)),e.between&&this.root.push(Re("w:between",e.between))}}class ou extends J{constructor(){super("w:pBdr");const e=Re("w:bottom",{color:"auto",space:1,style:Xr.SINGLE,size:6});this.root.push(e)}}const lu=({start:r,end:e,left:t,right:n,hanging:i,firstLine:s})=>new pe({name:"w:ind",attributes:{start:{key:"w:start",value:r===void 0?void 0:nt(r)},end:{key:"w:end",value:e===void 0?void 0:nt(e)},left:{key:"w:left",value:t===void 0?void 0:nt(t)},right:{key:"w:right",value:n===void 0?void 0:nt(n)},hanging:{key:"w:hanging",value:i===void 0?void 0:De(i)},firstLine:{key:"w:firstLine",value:s===void 0?void 0:De(s)}}}),uu=()=>new pe({name:"w:br"}),Es={BEGIN:"begin",END:"end",SEPARATE:"separate"},As=(r,e)=>new pe({name:"w:fldChar",attributes:{type:{key:"w:fldCharType",value:r},dirty:{key:"w:dirty",value:e}}}),it=r=>As(Es.BEGIN,r),pt=r=>As(Es.SEPARATE,r),st=r=>As(Es.END,r),cm={CENTER:"center",INSIDE:"inside",LEFT:"left",OUTSIDE:"outside",RIGHT:"right"},hm={BOTTOM:"bottom",CENTER:"center",INSIDE:"inside",OUTSIDE:"outside",TOP:"top"},fm={DECIMAL:"decimal",UPPER_ROMAN:"upperRoman",LOWER_ROMAN:"lowerRoman",UPPER_LETTER:"upperLetter",LOWER_LETTER:"lowerLetter",ORDINAL:"ordinal",CARDINAL_TEXT:"cardinalText",ORDINAL_TEXT:"ordinalText",HEX:"hex",CHICAGO:"chicago",IDEOGRAPH_DIGITAL:"ideographDigital",JAPANESE_COUNTING:"japaneseCounting",AIUEO:"aiueo",IROHA:"iroha",DECIMAL_FULL_WIDTH:"decimalFullWidth",DECIMAL_HALF_WIDTH:"decimalHalfWidth",JAPANESE_LEGAL:"japaneseLegal",JAPANESE_DIGITAL_TEN_THOUSAND:"japaneseDigitalTenThousand",DECIMAL_ENCLOSED_CIRCLE:"decimalEnclosedCircle",DECIMAL_FULL_WIDTH_2:"decimalFullWidth2",AIUEO_FULL_WIDTH:"aiueoFullWidth",IROHA_FULL_WIDTH:"irohaFullWidth",DECIMAL_ZERO:"decimalZero",BULLET:"bullet",GANADA:"ganada",CHOSUNG:"chosung",DECIMAL_ENCLOSED_FULL_STOP:"decimalEnclosedFullstop",DECIMAL_ENCLOSED_PAREN:"decimalEnclosedParen",DECIMAL_ENCLOSED_CIRCLE_CHINESE:"decimalEnclosedCircleChinese",IDEOGRAPH_ENCLOSED_CIRCLE:"ideographEnclosedCircle",IDEOGRAPH_TRADITIONAL:"ideographTraditional",IDEOGRAPH_ZODIAC:"ideographZodiac",IDEOGRAPH_ZODIAC_TRADITIONAL:"ideographZodiacTraditional",TAIWANESE_COUNTING:"taiwaneseCounting",IDEOGRAPH_LEGAL_TRADITIONAL:"ideographLegalTraditional",TAIWANESE_COUNTING_THOUSAND:"taiwaneseCountingThousand",TAIWANESE_DIGITAL:"taiwaneseDigital",CHINESE_COUNTING:"chineseCounting",CHINESE_LEGAL_SIMPLIFIED:"chineseLegalSimplified",CHINESE_COUNTING_TEN_THOUSAND:"chineseCountingThousand",KOREAN_DIGITAL:"koreanDigital",KOREAN_COUNTING:"koreanCounting",KOREAN_LEGAL:"koreanLegal",KOREAN_DIGITAL_2:"koreanDigital2",VIETNAMESE_COUNTING:"vietnameseCounting",RUSSIAN_LOWER:"russianLower",RUSSIAN_UPPER:"russianUpper",NONE:"none",NUMBER_IN_DASH:"numberInDash",HEBREW_1:"hebrew1",HEBREW_2:"hebrew2",ARABIC_ALPHA:"arabicAlpha",ARABIC_ABJAD:"arabicAbjad",HINDI_VOWELS:"hindiVowels",HINDI_CONSONANTS:"hindiConsonants",HINDI_NUMBERS:"hindiNumbers",HINDI_COUNTING:"hindiCounting",THAI_LETTERS:"thaiLetters",THAI_NUMBERS:"thaiNumbers",THAI_COUNTING:"thaiCounting",BAHT_TEXT:"bahtText",DOLLAR_TEXT:"dollarText"},ze={DEFAULT:"default",PRESERVE:"preserve"};class qe extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{space:"xml:space"})}}class dm extends J{constructor(){super("w:instrText"),this.root.push(new qe({space:ze.PRESERVE})),this.root.push("PAGE")}}class pm extends J{constructor(){super("w:instrText"),this.root.push(new qe({space:ze.PRESERVE})),this.root.push("NUMPAGES")}}class mm extends J{constructor(){super("w:instrText"),this.root.push(new qe({space:ze.PRESERVE})),this.root.push("SECTIONPAGES")}}class gm extends J{constructor(){super("w:instrText"),this.root.push(new qe({space:ze.PRESERVE})),this.root.push("SECTION")}}const ar=({fill:r,color:e,type:t})=>new pe({name:"w:shd",attributes:{fill:{key:"w:fill",value:r===void 0?void 0:Rt(r)},color:{key:"w:color",value:e===void 0?void 0:Rt(e)},type:{key:"w:val",value:t}}}),wm={CLEAR:"clear",DIAGONAL_CROSS:"diagCross",DIAGONAL_STRIPE:"diagStripe",HORIZONTAL_CROSS:"horzCross",HORIZONTAL_STRIPE:"horzStripe",NIL:"nil",PERCENT_5:"pct5",PERCENT_10:"pct10",PERCENT_12:"pct12",PERCENT_15:"pct15",PERCENT_20:"pct20",PERCENT_25:"pct25",PERCENT_30:"pct30",PERCENT_35:"pct35",PERCENT_37:"pct37",PERCENT_40:"pct40",PERCENT_45:"pct45",PERCENT_50:"pct50",PERCENT_55:"pct55",PERCENT_60:"pct60",PERCENT_62:"pct62",PERCENT_65:"pct65",PERCENT_70:"pct70",PERCENT_75:"pct75",PERCENT_80:"pct80",PERCENT_85:"pct85",PERCENT_87:"pct87",PERCENT_90:"pct90",PERCENT_95:"pct95",REVERSE_DIAGONAL_STRIPE:"reverseDiagStripe",SOLID:"solid",THIN_DIAGONAL_CROSS:"thinDiagCross",THIN_DIAGONAL_STRIPE:"thinDiagStripe",THIN_HORIZONTAL_CROSS:"thinHorzCross",THIN_REVERSE_DIAGONAL_STRIPE:"thinReverseDiagStripe",THIN_VERTICAL_STRIPE:"thinVertStripe",VERTICAL_STRIPE:"vertStripe"};class Ge extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date"})}}class ym extends J{constructor(e){super("w:del"),this.root.push(new Ge({id:e.id,author:e.author,date:e.date}))}}class vm extends J{constructor(e){super("w:ins"),this.root.push(new Ge({id:e.id,author:e.author,date:e.date}))}}const Ss={DOT:"dot"},xs=(r=Ss.DOT)=>new pe({name:"w:em",attributes:{val:{key:"w:val",value:r}}}),bm=()=>xs(Ss.DOT);class _m extends J{constructor(e){super("w:spacing"),this.root.push(new Fe({val:nt(e)}))}}class Tm extends J{constructor(e){super("w:color"),this.root.push(new Fe({val:Rt(e)}))}}class Em extends J{constructor(e){super("w:highlight"),this.root.push(new Fe({val:e}))}}class Am extends J{constructor(e){super("w:highlightCs"),this.root.push(new Fe({val:e}))}}const Sm=r=>new pe({name:"w:lang",attributes:{value:{key:"w:val",value:r.value},eastAsia:{key:"w:eastAsia",value:r.eastAsia},bidirectional:{key:"w:bidi",value:r.bidirectional}}}),Yr=(r,e)=>{if(typeof r=="string"){const n=r;return new pe({name:"w:rFonts",attributes:{ascii:{key:"w:ascii",value:n},cs:{key:"w:cs",value:n},eastAsia:{key:"w:eastAsia",value:n},hAnsi:{key:"w:hAnsi",value:n},hint:{key:"w:hint",value:e}}})}const t=r;return new pe({name:"w:rFonts",attributes:{ascii:{key:"w:ascii",value:t.ascii},cs:{key:"w:cs",value:t.cs},eastAsia:{key:"w:eastAsia",value:t.eastAsia},hAnsi:{key:"w:hAnsi",value:t.hAnsi},hint:{key:"w:hint",value:t.hint}}})},cu=r=>new pe({name:"w:vertAlign",attributes:{val:{key:"w:val",value:r}}}),xm=()=>cu("superscript"),km=()=>cu("subscript"),ks={SINGLE:"single",WORDS:"words",DOUBLE:"double",THICK:"thick",DOTTED:"dotted",DOTTEDHEAVY:"dottedHeavy",DASH:"dash",DASHEDHEAVY:"dashedHeavy",DASHLONG:"dashLong",DASHLONGHEAVY:"dashLongHeavy",DOTDASH:"dotDash",DASHDOTHEAVY:"dashDotHeavy",DOTDOTDASH:"dotDotDash",DASHDOTDOTHEAVY:"dashDotDotHeavy",WAVE:"wave",WAVYHEAVY:"wavyHeavy",WAVYDOUBLE:"wavyDouble",NONE:"none"},hu=(r=ks.SINGLE,e)=>new pe({name:"w:u",attributes:{val:{key:"w:val",value:r},color:{key:"w:color",value:e===void 0?void 0:Rt(e)}}}),Cm={BLINK_BACKGROUND:"blinkBackground",LIGHTS:"lights",ANTS_BLACK:"antsBlack",ANTS_RED:"antsRed",SHIMMER:"shimmer",SPARKLE:"sparkle",NONE:"none"},Rm={BLACK:"black",BLUE:"blue",CYAN:"cyan",DARK_BLUE:"darkBlue",DARK_CYAN:"darkCyan",DARK_GRAY:"darkGray",DARK_GREEN:"darkGreen",DARK_MAGENTA:"darkMagenta",DARK_RED:"darkRed",DARK_YELLOW:"darkYellow",GREEN:"green",LIGHT_GRAY:"lightGray",MAGENTA:"magenta",NONE:"none",RED:"red",WHITE:"white",YELLOW:"yellow"};class mt extends ct{constructor(e){var t,n;if(super("w:rPr"),!e)return;e.style&&this.push(new dt("w:rStyle",e.style)),e.font&&(typeof e.font=="string"?this.push(Yr(e.font)):"name"in e.font?this.push(Yr(e.font.name,e.font.hint)):this.push(Yr(e.font))),e.bold!==void 0&&this.push(new de("w:b",e.bold)),(e.boldComplexScript===void 0&&e.bold!==void 0||e.boldComplexScript)&&this.push(new de("w:bCs",(t=e.boldComplexScript)!=null?t:e.bold)),e.italics!==void 0&&this.push(new de("w:i",e.italics)),(e.italicsComplexScript===void 0&&e.italics!==void 0||e.italicsComplexScript)&&this.push(new de("w:iCs",(n=e.italicsComplexScript)!=null?n:e.italics)),e.smallCaps!==void 0?this.push(new de("w:smallCaps",e.smallCaps)):e.allCaps!==void 0&&this.push(new de("w:caps",e.allCaps)),e.strike!==void 0&&this.push(new de("w:strike",e.strike)),e.doubleStrike!==void 0&&this.push(new de("w:dstrike",e.doubleStrike)),e.emboss!==void 0&&this.push(new de("w:emboss",e.emboss)),e.imprint!==void 0&&this.push(new de("w:imprint",e.imprint)),e.noProof!==void 0&&this.push(new de("w:noProof",e.noProof)),e.snapToGrid!==void 0&&this.push(new de("w:snapToGrid",e.snapToGrid)),e.vanish&&this.push(new de("w:vanish",e.vanish)),e.color&&this.push(new Tm(e.color)),e.characterSpacing&&this.push(new _m(e.characterSpacing)),e.scale!==void 0&&this.push(new jt("w:w",e.scale)),e.kern&&this.push(new $r("w:kern",e.kern)),e.position&&this.push(new dt("w:position",e.position)),e.size!==void 0&&this.push(new $r("w:sz",e.size));const i=e.sizeComplexScript===void 0||e.sizeComplexScript===!0?e.size:e.sizeComplexScript;i&&this.push(new $r("w:szCs",i)),e.highlight&&this.push(new Em(e.highlight));const s=e.highlightComplexScript===void 0||e.highlightComplexScript===!0?e.highlight:e.highlightComplexScript;s&&this.push(new Am(s)),e.underline&&this.push(hu(e.underline.type,e.underline.color)),e.effect&&this.push(new dt("w:effect",e.effect)),e.border&&this.push(Re("w:bdr",e.border)),e.shading&&this.push(ar(e.shading)),e.subScript&&this.push(km()),e.superScript&&this.push(xm()),e.rightToLeft!==void 0&&this.push(new de("w:rtl",e.rightToLeft)),e.emphasisMark&&this.push(xs(e.emphasisMark.type)),e.language&&this.push(Sm(e.language)),e.specVanish&&this.push(new de("w:specVanish",e.vanish)),e.math&&this.push(new de("w:oMath",e.math)),e.revision&&this.push(new du(e.revision))}push(e){this.root.push(e)}}class fu extends mt{constructor(e){super(e),e!=null&&e.insertion&&this.push(new vm(e.insertion)),e!=null&&e.deletion&&this.push(new ym(e.deletion))}}class du extends J{constructor(e){super("w:rPrChange"),this.root.push(new Ge({id:e.id,author:e.author,date:e.date})),this.addChildElement(new mt(e))}}class or extends J{constructor(e){var t;super("w:t"),typeof e=="string"?(this.root.push(new qe({space:ze.PRESERVE})),this.root.push(e)):(this.root.push(new qe({space:(t=e.space)!=null?t:ze.DEFAULT})),this.root.push(e.text))}}const Tt={CURRENT:"CURRENT",TOTAL_PAGES:"TOTAL_PAGES",TOTAL_PAGES_IN_SECTION:"TOTAL_PAGES_IN_SECTION",CURRENT_SECTION:"SECTION"};class Be extends J{constructor(e){if(super("w:r"),ne(this,"properties"),this.properties=new mt(e),this.root.push(this.properties),e.break)for(let t=0;t<e.break;t++)this.root.push(uu());if(e.children)for(const t of e.children){if(typeof t=="string"){switch(t){case Tt.CURRENT:this.root.push(it()),this.root.push(new dm),this.root.push(pt()),this.root.push(st());break;case Tt.TOTAL_PAGES:this.root.push(it()),this.root.push(new pm),this.root.push(pt()),this.root.push(st());break;case Tt.TOTAL_PAGES_IN_SECTION:this.root.push(it()),this.root.push(new mm),this.root.push(pt()),this.root.push(st());break;case Tt.CURRENT_SECTION:this.root.push(it()),this.root.push(new gm),this.root.push(pt()),this.root.push(st());break;default:this.root.push(new or(t));break}continue}this.root.push(t)}else e.text!==void 0&&this.root.push(new or(e.text))}}class lr extends Be{constructor(e){super(typeof e=="string"?{text:e}:e)}}class Im extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{char:"w:char",symbolfont:"w:font"})}}let pu=class extends J{constructor(e="",t="Wingdings"){super("w:sym"),this.root.push(new Im({char:e,symbolfont:t}))}};class mu extends Be{constructor(e){if(typeof e=="string")return super({}),this.root.push(new pu(e)),this;super(e),this.root.push(new pu(e.char,e.symbolfont))}}var Cs={},xe={},Rs,gu;function ur(){if(gu)return Rs;gu=1,Rs=r;function r(e,t){if(!e)throw new Error(t||"Assertion failed")}return r.equal=function(t,n,i){if(t!=n)throw new Error(i||"Assertion failed: "+t+" != "+n)},Rs}var wu;function at(){if(wu)return xe;wu=1;var r=ur(),e=bt();xe.inherits=e;function t(N,U){return(N.charCodeAt(U)&64512)!==55296||U<0||U+1>=N.length?!1:(N.charCodeAt(U+1)&64512)===56320}function n(N,U){if(Array.isArray(N))return N.slice();if(!N)return[];var x=[];if(typeof N=="string")if(U){if(U==="hex")for(N=N.replace(/[^a-z0-9]+/ig,""),N.length%2!==0&&(N="0"+N),re=0;re<N.length;re+=2)x.push(parseInt(N[re]+N[re+1],16))}else for(var X=0,re=0;re<N.length;re++){var z=N.charCodeAt(re);z<128?x[X++]=z:z<2048?(x[X++]=z>>6|192,x[X++]=z&63|128):t(N,re)?(z=65536+((z&1023)<<10)+(N.charCodeAt(++re)&1023),x[X++]=z>>18|240,x[X++]=z>>12&63|128,x[X++]=z>>6&63|128,x[X++]=z&63|128):(x[X++]=z>>12|224,x[X++]=z>>6&63|128,x[X++]=z&63|128)}else for(re=0;re<N.length;re++)x[re]=N[re]|0;return x}xe.toArray=n;function i(N){for(var U="",x=0;x<N.length;x++)U+=a(N[x].toString(16));return U}xe.toHex=i;function s(N){var U=N>>>24|N>>>8&65280|N<<8&16711680|(N&255)<<24;return U>>>0}xe.htonl=s;function o(N,U){for(var x="",X=0;X<N.length;X++){var re=N[X];U==="little"&&(re=s(re)),x+=l(re.toString(16))}return x}xe.toHex32=o;function a(N){return N.length===1?"0"+N:N}xe.zero2=a;function l(N){return N.length===7?"0"+N:N.length===6?"00"+N:N.length===5?"000"+N:N.length===4?"0000"+N:N.length===3?"00000"+N:N.length===2?"000000"+N:N.length===1?"0000000"+N:N}xe.zero8=l;function c(N,U,x,X){var re=x-U;r(re%4===0);for(var z=new Array(re/4),se=0,Q=U;se<z.length;se++,Q+=4){var me;X==="big"?me=N[Q]<<24|N[Q+1]<<16|N[Q+2]<<8|N[Q+3]:me=N[Q+3]<<24|N[Q+2]<<16|N[Q+1]<<8|N[Q],z[se]=me>>>0}return z}xe.join32=c;function f(N,U){for(var x=new Array(N.length*4),X=0,re=0;X<N.length;X++,re+=4){var z=N[X];U==="big"?(x[re]=z>>>24,x[re+1]=z>>>16&255,x[re+2]=z>>>8&255,x[re+3]=z&255):(x[re+3]=z>>>24,x[re+2]=z>>>16&255,x[re+1]=z>>>8&255,x[re]=z&255)}return x}xe.split32=f;function m(N,U){return N>>>U|N<<32-U}xe.rotr32=m;function v(N,U){return N<<U|N>>>32-U}xe.rotl32=v;function y(N,U){return N+U>>>0}xe.sum32=y;function b(N,U,x){return N+U+x>>>0}xe.sum32_3=b;function g(N,U,x,X){return N+U+x+X>>>0}xe.sum32_4=g;function _(N,U,x,X,re){return N+U+x+X+re>>>0}xe.sum32_5=_;function d(N,U,x,X){var re=N[U],z=N[U+1],se=X+z>>>0,Q=(se<X?1:0)+x+re;N[U]=Q>>>0,N[U+1]=se}xe.sum64=d;function T(N,U,x,X){var re=U+X>>>0,z=(re<U?1:0)+N+x;return z>>>0}xe.sum64_hi=T;function w(N,U,x,X){var re=U+X;return re>>>0}xe.sum64_lo=w;function p(N,U,x,X,re,z,se,Q){var me=0,Y=U;Y=Y+X>>>0,me+=Y<U?1:0,Y=Y+z>>>0,me+=Y<z?1:0,Y=Y+Q>>>0,me+=Y<Q?1:0;var L=N+x+re+se+me;return L>>>0}xe.sum64_4_hi=p;function E(N,U,x,X,re,z,se,Q){var me=U+X+z+Q;return me>>>0}xe.sum64_4_lo=E;function O(N,U,x,X,re,z,se,Q,me,Y){var L=0,V=U;V=V+X>>>0,L+=V<U?1:0,V=V+z>>>0,L+=V<z?1:0,V=V+Q>>>0,L+=V<Q?1:0,V=V+Y>>>0,L+=V<Y?1:0;var Z=N+x+re+se+me+L;return Z>>>0}xe.sum64_5_hi=O;function P(N,U,x,X,re,z,se,Q,me,Y){var L=U+X+z+Q+Y;return L>>>0}xe.sum64_5_lo=P;function B(N,U,x){var X=U<<32-x|N>>>x;return X>>>0}xe.rotr64_hi=B;function I(N,U,x){var X=N<<32-x|U>>>x;return X>>>0}xe.rotr64_lo=I;function K(N,U,x){return N>>>x}xe.shr64_hi=K;function oe(N,U,x){var X=N<<32-x|U>>>x;return X>>>0}return xe.shr64_lo=oe,xe}var Is={},yu;function cr(){if(yu)return Is;yu=1;var r=at(),e=ur();function t(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return Is.BlockHash=t,t.prototype.update=function(i,s){if(i=r.toArray(i,s),this.pending?this.pending=this.pending.concat(i):this.pending=i,this.pendingTotal+=i.length,this.pending.length>=this._delta8){i=this.pending;var o=i.length%this._delta8;this.pending=i.slice(i.length-o,i.length),this.pending.length===0&&(this.pending=null),i=r.join32(i,0,i.length-o,this.endian);for(var a=0;a<i.length;a+=this._delta32)this._update(i,a,a+this._delta32)}return this},t.prototype.digest=function(i){return this.update(this._pad()),e(this.pending===null),this._digest(i)},t.prototype._pad=function(){var i=this.pendingTotal,s=this._delta8,o=s-(i+this.padLength)%s,a=new Array(o+this.padLength);a[0]=128;for(var l=1;l<o;l++)a[l]=0;if(i<<=3,this.endian==="big"){for(var c=8;c<this.padLength;c++)a[l++]=0;a[l++]=0,a[l++]=0,a[l++]=0,a[l++]=0,a[l++]=i>>>24&255,a[l++]=i>>>16&255,a[l++]=i>>>8&255,a[l++]=i&255}else for(a[l++]=i&255,a[l++]=i>>>8&255,a[l++]=i>>>16&255,a[l++]=i>>>24&255,a[l++]=0,a[l++]=0,a[l++]=0,a[l++]=0,c=8;c<this.padLength;c++)a[l++]=0;return a},Is}var It={},ot={},vu;function bu(){if(vu)return ot;vu=1;var r=at(),e=r.rotr32;function t(f,m,v,y){if(f===0)return n(m,v,y);if(f===1||f===3)return s(m,v,y);if(f===2)return i(m,v,y)}ot.ft_1=t;function n(f,m,v){return f&m^~f&v}ot.ch32=n;function i(f,m,v){return f&m^f&v^m&v}ot.maj32=i;function s(f,m,v){return f^m^v}ot.p32=s;function o(f){return e(f,2)^e(f,13)^e(f,22)}ot.s0_256=o;function a(f){return e(f,6)^e(f,11)^e(f,25)}ot.s1_256=a;function l(f){return e(f,7)^e(f,18)^f>>>3}ot.g0_256=l;function c(f){return e(f,17)^e(f,19)^f>>>10}return ot.g1_256=c,ot}var Ns,_u;function Nm(){if(_u)return Ns;_u=1;var r=at(),e=cr(),t=bu(),n=r.rotl32,i=r.sum32,s=r.sum32_5,o=t.ft_1,a=e.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function c(){if(!(this instanceof c))return new c;a.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return r.inherits(c,a),Ns=c,c.blockSize=512,c.outSize=160,c.hmacStrength=80,c.padLength=64,c.prototype._update=function(m,v){for(var y=this.W,b=0;b<16;b++)y[b]=m[v+b];for(;b<y.length;b++)y[b]=n(y[b-3]^y[b-8]^y[b-14]^y[b-16],1);var g=this.h[0],_=this.h[1],d=this.h[2],T=this.h[3],w=this.h[4];for(b=0;b<y.length;b++){var p=~~(b/20),E=s(n(g,5),o(p,_,d,T),w,y[b],l[p]);w=T,T=d,d=n(_,30),_=g,g=E}this.h[0]=i(this.h[0],g),this.h[1]=i(this.h[1],_),this.h[2]=i(this.h[2],d),this.h[3]=i(this.h[3],T),this.h[4]=i(this.h[4],w)},c.prototype._digest=function(m){return m==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},Ns}var Os,Tu;function Eu(){if(Tu)return Os;Tu=1;var r=at(),e=cr(),t=bu(),n=ur(),i=r.sum32,s=r.sum32_4,o=r.sum32_5,a=t.ch32,l=t.maj32,c=t.s0_256,f=t.s1_256,m=t.g0_256,v=t.g1_256,y=e.BlockHash,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function g(){if(!(this instanceof g))return new g;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}return r.inherits(g,y),Os=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(d,T){for(var w=this.W,p=0;p<16;p++)w[p]=d[T+p];for(;p<w.length;p++)w[p]=s(v(w[p-2]),w[p-7],m(w[p-15]),w[p-16]);var E=this.h[0],O=this.h[1],P=this.h[2],B=this.h[3],I=this.h[4],K=this.h[5],oe=this.h[6],N=this.h[7];for(n(this.k.length===w.length),p=0;p<w.length;p++){var U=o(N,f(I),a(I,K,oe),this.k[p],w[p]),x=i(c(E),l(E,O,P));N=oe,oe=K,K=I,I=i(B,U),B=P,P=O,O=E,E=i(U,x)}this.h[0]=i(this.h[0],E),this.h[1]=i(this.h[1],O),this.h[2]=i(this.h[2],P),this.h[3]=i(this.h[3],B),this.h[4]=i(this.h[4],I),this.h[5]=i(this.h[5],K),this.h[6]=i(this.h[6],oe),this.h[7]=i(this.h[7],N)},g.prototype._digest=function(d){return d==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},Os}var Ps,Au;function Om(){if(Au)return Ps;Au=1;var r=at(),e=Eu();function t(){if(!(this instanceof t))return new t;e.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return r.inherits(t,e),Ps=t,t.blockSize=512,t.outSize=224,t.hmacStrength=192,t.padLength=64,t.prototype._digest=function(i){return i==="hex"?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")},Ps}var Ls,Su;function xu(){if(Su)return Ls;Su=1;var r=at(),e=cr(),t=ur(),n=r.rotr64_hi,i=r.rotr64_lo,s=r.shr64_hi,o=r.shr64_lo,a=r.sum64,l=r.sum64_hi,c=r.sum64_lo,f=r.sum64_4_hi,m=r.sum64_4_lo,v=r.sum64_5_hi,y=r.sum64_5_lo,b=e.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function _(){if(!(this instanceof _))return new _;b.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}r.inherits(_,b),Ls=_,_.blockSize=1024,_.outSize=512,_.hmacStrength=192,_.padLength=128,_.prototype._prepareBlock=function(x,X){for(var re=this.W,z=0;z<32;z++)re[z]=x[X+z];for(;z<re.length;z+=2){var se=oe(re[z-4],re[z-3]),Q=N(re[z-4],re[z-3]),me=re[z-14],Y=re[z-13],L=I(re[z-30],re[z-29]),V=K(re[z-30],re[z-29]),Z=re[z-32],ie=re[z-31];re[z]=f(se,Q,me,Y,L,V,Z,ie),re[z+1]=m(se,Q,me,Y,L,V,Z,ie)}},_.prototype._update=function(x,X){this._prepareBlock(x,X);var re=this.W,z=this.h[0],se=this.h[1],Q=this.h[2],me=this.h[3],Y=this.h[4],L=this.h[5],V=this.h[6],Z=this.h[7],ie=this.h[8],$=this.h[9],C=this.h[10],k=this.h[11],G=this.h[12],H=this.h[13],D=this.h[14],F=this.h[15];t(this.k.length===re.length);for(var te=0;te<re.length;te+=2){var A=D,ee=F,R=P(ie,$),u=B(ie,$),h=d(ie,$,C,k,G),S=T(ie,$,C,k,G,H),M=this.k[te],q=this.k[te+1],j=re[te],ae=re[te+1],he=v(A,ee,R,u,h,S,M,q,j,ae),le=y(A,ee,R,u,h,S,M,q,j,ae);A=E(z,se),ee=O(z,se),R=w(z,se,Q,me,Y),u=p(z,se,Q,me,Y,L);var ge=l(A,ee,R,u),ve=c(A,ee,R,u);D=G,F=H,G=C,H=k,C=ie,k=$,ie=l(V,Z,he,le),$=c(Z,Z,he,le),V=Y,Z=L,Y=Q,L=me,Q=z,me=se,z=l(he,le,ge,ve),se=c(he,le,ge,ve)}a(this.h,0,z,se),a(this.h,2,Q,me),a(this.h,4,Y,L),a(this.h,6,V,Z),a(this.h,8,ie,$),a(this.h,10,C,k),a(this.h,12,G,H),a(this.h,14,D,F)},_.prototype._digest=function(x){return x==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")};function d(U,x,X,re,z){var se=U&X^~U&z;return se<0&&(se+=4294967296),se}function T(U,x,X,re,z,se){var Q=x&re^~x&se;return Q<0&&(Q+=4294967296),Q}function w(U,x,X,re,z){var se=U&X^U&z^X&z;return se<0&&(se+=4294967296),se}function p(U,x,X,re,z,se){var Q=x&re^x&se^re&se;return Q<0&&(Q+=4294967296),Q}function E(U,x){var X=n(U,x,28),re=n(x,U,2),z=n(x,U,7),se=X^re^z;return se<0&&(se+=4294967296),se}function O(U,x){var X=i(U,x,28),re=i(x,U,2),z=i(x,U,7),se=X^re^z;return se<0&&(se+=4294967296),se}function P(U,x){var X=n(U,x,14),re=n(U,x,18),z=n(x,U,9),se=X^re^z;return se<0&&(se+=4294967296),se}function B(U,x){var X=i(U,x,14),re=i(U,x,18),z=i(x,U,9),se=X^re^z;return se<0&&(se+=4294967296),se}function I(U,x){var X=n(U,x,1),re=n(U,x,8),z=s(U,x,7),se=X^re^z;return se<0&&(se+=4294967296),se}function K(U,x){var X=i(U,x,1),re=i(U,x,8),z=o(U,x,7),se=X^re^z;return se<0&&(se+=4294967296),se}function oe(U,x){var X=n(U,x,19),re=n(x,U,29),z=s(U,x,6),se=X^re^z;return se<0&&(se+=4294967296),se}function N(U,x){var X=i(U,x,19),re=i(x,U,29),z=o(U,x,6),se=X^re^z;return se<0&&(se+=4294967296),se}return Ls}var Ds,ku;function Pm(){if(ku)return Ds;ku=1;var r=at(),e=xu();function t(){if(!(this instanceof t))return new t;e.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return r.inherits(t,e),Ds=t,t.blockSize=1024,t.outSize=384,t.hmacStrength=192,t.padLength=128,t.prototype._digest=function(i){return i==="hex"?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")},Ds}var Cu;function Lm(){return Cu||(Cu=1,It.sha1=Nm(),It.sha224=Om(),It.sha256=Eu(),It.sha384=Pm(),It.sha512=xu()),It}var Fs={},Ru;function Dm(){if(Ru)return Fs;Ru=1;var r=at(),e=cr(),t=r.rotl32,n=r.sum32,i=r.sum32_3,s=r.sum32_4,o=e.BlockHash;function a(){if(!(this instanceof a))return new a;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}r.inherits(a,o),Fs.ripemd160=a,a.blockSize=512,a.outSize=160,a.hmacStrength=192,a.padLength=64,a.prototype._update=function(_,d){for(var T=this.h[0],w=this.h[1],p=this.h[2],E=this.h[3],O=this.h[4],P=T,B=w,I=p,K=E,oe=O,N=0;N<80;N++){var U=n(t(s(T,l(N,w,p,E),_[m[N]+d],c(N)),y[N]),O);T=O,O=E,E=t(p,10),p=w,w=U,U=n(t(s(P,l(79-N,B,I,K),_[v[N]+d],f(N)),b[N]),oe),P=oe,oe=K,K=t(I,10),I=B,B=U}U=i(this.h[1],p,K),this.h[1]=i(this.h[2],E,oe),this.h[2]=i(this.h[3],O,P),this.h[3]=i(this.h[4],T,B),this.h[4]=i(this.h[0],w,I),this.h[0]=U},a.prototype._digest=function(_){return _==="hex"?r.toHex32(this.h,"little"):r.split32(this.h,"little")};function l(g,_,d,T){return g<=15?_^d^T:g<=31?_&d|~_&T:g<=47?(_|~d)^T:g<=63?_&T|d&~T:_^(d|~T)}function c(g){return g<=15?0:g<=31?1518500249:g<=47?1859775393:g<=63?2400959708:2840853838}function f(g){return g<=15?1352829926:g<=31?1548603684:g<=47?1836072691:g<=63?2053994217:0}var m=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],v=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],b=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return Fs}var Bs,Iu;function Fm(){if(Iu)return Bs;Iu=1;var r=at(),e=ur();function t(n,i,s){if(!(this instanceof t))return new t(n,i,s);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(i,s))}return Bs=t,t.prototype._init=function(i){i.length>this.blockSize&&(i=new this.Hash().update(i).digest()),e(i.length<=this.blockSize);for(var s=i.length;s<this.blockSize;s++)i.push(0);for(s=0;s<i.length;s++)i[s]^=54;for(this.inner=new this.Hash().update(i),s=0;s<i.length;s++)i[s]^=106;this.outer=new this.Hash().update(i)},t.prototype.update=function(i,s){return this.inner.update(i,s),this},t.prototype.digest=function(i){return this.outer.update(this.inner.digest()),this.outer.digest(i)},Bs}var Nu;function Bm(){return Nu||(Nu=1,(function(r){var e=r;e.utils=at(),e.common=cr(),e.sha=Lm(),e.ripemd=Dm(),e.hmac=Fm(),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160})(Cs)),Cs}var Mm=Bm();const Hm=Dn(Mm);let Um="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",jm=(r,e=21)=>(t=e)=>{let n="",i=t|0;for(;i--;)n+=r[Math.random()*r.length|0];return n},Wm=(r=21)=>{let e="",t=r|0;for(;t--;)e+=Um[Math.random()*64|0];return e};const zm=r=>Math.floor(r/25.4*72*20),Xe=r=>Math.floor(r*72*20),hr=(r=0)=>{let e=r;return()=>++e},Ou=()=>hr(),Pu=()=>hr(1),Lu=()=>hr(),Du=()=>hr(),fr=()=>Wm().toLowerCase(),Ms=r=>Hm.sha1().update(r instanceof ArrayBuffer?new Uint8Array(r):r).digest("hex"),dr=r=>jm("1234567890abcdef",r)(),Fu=()=>`${dr(8)}-${dr(4)}-${dr(4)}-${dr(4)}-${dr(12)}`,pr=r=>new Uint8Array(new TextEncoder().encode(r)),Bu={CHARACTER:"character",COLUMN:"column",INSIDE_MARGIN:"insideMargin",LEFT_MARGIN:"leftMargin",MARGIN:"margin",OUTSIDE_MARGIN:"outsideMargin",PAGE:"page",RIGHT_MARGIN:"rightMargin"},Mu={BOTTOM_MARGIN:"bottomMargin",INSIDE_MARGIN:"insideMargin",LINE:"line",MARGIN:"margin",OUTSIDE_MARGIN:"outsideMargin",PAGE:"page",PARAGRAPH:"paragraph",TOP_MARGIN:"topMargin"},Hu=()=>new pe({name:"wp:simplePos",attributes:{x:{key:"x",value:0},y:{key:"y",value:0}}}),Uu=r=>new pe({name:"wp:align",children:[r]}),ju=r=>new pe({name:"wp:posOffset",children:[r.toString()]}),Wu=({relative:r,align:e,offset:t})=>new pe({name:"wp:positionH",attributes:{relativeFrom:{key:"relativeFrom",value:r??Bu.PAGE}},children:[(()=>{if(e)return Uu(e);if(t!==void 0)return ju(t);throw new Error("There is no configuration provided for floating position (Align or offset)")})()]}),zu=({relative:r,align:e,offset:t})=>new pe({name:"wp:positionV",attributes:{relativeFrom:{key:"relativeFrom",value:r??Mu.PAGE}},children:[(()=>{if(e)return Uu(e);if(t!==void 0)return ju(t);throw new Error("There is no configuration provided for floating position (Align or offset)")})()]});var Gu=(r=>(r.CENTER="ctr",r.TOP="t",r.BOTTOM="b",r))(Gu||{});const Ku=(r={})=>{var e,t,n,i;return new pe({name:"wps:bodyPr",attributes:{lIns:{key:"lIns",value:(e=r.margins)==null?void 0:e.left},rIns:{key:"rIns",value:(t=r.margins)==null?void 0:t.right},tIns:{key:"tIns",value:(n=r.margins)==null?void 0:n.top},bIns:{key:"bIns",value:(i=r.margins)==null?void 0:i.bottom},anchor:{key:"anchor",value:r.verticalAnchor}},children:[...r.noAutoFit?[new de("a:noAutofit",r.noAutoFit)]:[]]})},Gm=(r={txBox:"1"})=>new pe({name:"wps:cNvSpPr",attributes:{txBox:{key:"txBox",value:r.txBox}}}),Km=r=>new pe({name:"w:txbxContent",children:[...r]}),qm=r=>new pe({name:"wps:txbx",children:[Km(r)]});class Vm extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{cx:"cx",cy:"cy"})}}class $m extends J{constructor(e,t){super("a:ext"),ne(this,"attributes"),this.attributes=new Vm({cx:e,cy:t}),this.root.push(this.attributes)}}class Xm extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{x:"x",y:"y"})}}class Ym extends J{constructor(e,t){super("a:off"),this.root.push(new Xm({x:e??0,y:t??0}))}}class Zm extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{flipVertical:"flipV",flipHorizontal:"flipH",rotation:"rot"})}}class qu extends J{constructor(e){var t,n,i,s,o,a;super("a:xfrm"),ne(this,"extents"),ne(this,"offset"),this.root.push(new Zm({flipVertical:(t=e.flip)==null?void 0:t.vertical,flipHorizontal:(n=e.flip)==null?void 0:n.horizontal,rotation:e.rotation})),this.offset=new Ym((s=(i=e.offset)==null?void 0:i.emus)==null?void 0:s.x,(a=(o=e.offset)==null?void 0:o.emus)==null?void 0:a.y),this.extents=new $m(e.emus.x,e.emus.y),this.root.push(this.offset),this.root.push(this.extents)}}const Vu=()=>new pe({name:"a:noFill"}),Jm=r=>new pe({name:"a:srgbClr",attributes:{value:{key:"val",value:r.value}}}),Qm=r=>new pe({name:"a:schemeClr",attributes:{value:{key:"val",value:r.value}}}),Hs=r=>new pe({name:"a:solidFill",children:[r.type==="rgb"?Jm(r):Qm(r)]}),eg=r=>new pe({name:"a:ln",attributes:{width:{key:"w",value:r.width},cap:{key:"cap",value:r.cap},compoundLine:{key:"cmpd",value:r.compoundLine},align:{key:"algn",value:r.align}},children:[r.type==="noFill"?Vu():r.solidFillType==="rgb"?Hs({type:"rgb",value:r.value}):Hs({type:"scheme",value:r.value})]});class tg extends J{constructor(){super("a:avLst")}}class rg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{prst:"prst"})}}class ng extends J{constructor(){super("a:prstGeom"),this.root.push(new rg({prst:"rect"})),this.root.push(new tg)}}class ig extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{bwMode:"bwMode"})}}class $u extends J{constructor({element:e,outline:t,solidFill:n,transform:i}){super(`${e}:spPr`),ne(this,"form"),this.root.push(new ig({bwMode:"auto"})),this.form=new qu(i),this.root.push(this.form),this.root.push(new ng),t&&(this.root.push(Vu()),this.root.push(eg(t))),n&&this.root.push(Hs(n))}}const Xu=r=>new pe({name:"wps:wsp",children:[Gm(r.nonVisualProperties),new $u({element:"wps",transform:r.transformation,outline:r.outline,solidFill:r.solidFill}),qm(r.children),Ku(r.bodyProperties)]});class Us extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{uri:"uri"})}}const sg=r=>new pe({name:"asvg:svgBlip",attributes:{asvg:{key:"xmlns:asvg",value:"http://schemas.microsoft.com/office/drawing/2016/SVG/main"},embed:{key:"r:embed",value:`rId{${r.fileName}}`}}}),ag=r=>new pe({name:"a:ext",attributes:{uri:{key:"uri",value:"{96DAC541-7B7A-43D3-8B79-37D633B846F1}"}},children:[sg(r)]}),og=r=>new pe({name:"a:extLst",children:[ag(r)]}),lg=r=>new pe({name:"a:blip",attributes:{embed:{key:"r:embed",value:`rId{${r.type==="svg"?r.fallback.fileName:r.fileName}}`},cstate:{key:"cstate",value:"none"}},children:r.type==="svg"?[og(r)]:[]});class ug extends J{constructor(){super("a:srcRect")}}class cg extends J{constructor(){super("a:fillRect")}}class hg extends J{constructor(){super("a:stretch"),this.root.push(new cg)}}class fg extends J{constructor(e){super("pic:blipFill"),this.root.push(lg(e)),this.root.push(new ug),this.root.push(new hg)}}class dg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{noChangeAspect:"noChangeAspect",noChangeArrowheads:"noChangeArrowheads"})}}class pg extends J{constructor(){super("a:picLocks"),this.root.push(new dg({noChangeAspect:1,noChangeArrowheads:1}))}}class mg extends J{constructor(){super("pic:cNvPicPr"),this.root.push(new pg)}}const Yu=(r,e)=>new pe({name:"a:hlinkClick",attributes:Ne(ye({},e?{xmlns:{key:"xmlns:a",value:"http://schemas.openxmlformats.org/drawingml/2006/main"}}:{}),{id:{key:"r:id",value:`rId${r}`}})});class gg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"id",name:"name",descr:"descr"})}}class wg extends J{constructor(){super("pic:cNvPr"),this.root.push(new gg({id:0,name:"",descr:""}))}prepForXml(e){for(let t=e.stack.length-1;t>=0;t--){const n=e.stack[t];if(n instanceof Wt){this.root.push(Yu(n.linkId,!1));break}}return super.prepForXml(e)}}class yg extends J{constructor(){super("pic:nvPicPr"),this.root.push(new wg),this.root.push(new mg)}}class vg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{xmlns:"xmlns:pic"})}}class Zu extends J{constructor({mediaData:e,transform:t,outline:n}){super("pic:pic"),this.root.push(new vg({xmlns:"http://schemas.openxmlformats.org/drawingml/2006/picture"})),this.root.push(new yg),this.root.push(new fg(e)),this.root.push(new $u({element:"pic",transform:t,outline:n}))}}const bg=r=>new pe({name:"wpg:grpSpPr",children:[new qu(r)]}),_g=()=>new pe({name:"wpg:cNvGrpSpPr"}),Tg=r=>new pe({name:"wpg:wgp",children:[_g(),bg(r.transformation),...r.children]});class Eg extends J{constructor({mediaData:e,transform:t,outline:n,solidFill:i}){if(super("a:graphicData"),e.type==="wps"){this.root.push(new Us({uri:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}));const s=Xu(Ne(ye({},e.data),{transformation:t,outline:n,solidFill:i}));this.root.push(s)}else if(e.type==="wpg"){this.root.push(new Us({uri:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"}));const o=e.children.map(l=>l.type==="wps"?Xu(Ne(ye({},l.data),{transformation:l.transformation,outline:l.outline,solidFill:l.solidFill})):new Zu({mediaData:l,transform:l.transformation,outline:l.outline})),a=Tg({children:o,transformation:t});this.root.push(a)}else{this.root.push(new Us({uri:"http://schemas.openxmlformats.org/drawingml/2006/picture"}));const s=e,o=new Zu({mediaData:s,transform:t,outline:n});this.root.push(o)}}}class Ag extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{a:"xmlns:a"})}}class Ju extends J{constructor({mediaData:e,transform:t,outline:n,solidFill:i}){super("a:graphic"),ne(this,"data"),this.root.push(new Ag({a:"http://schemas.openxmlformats.org/drawingml/2006/main"})),this.data=new Eg({mediaData:e,transform:t,outline:n,solidFill:i}),this.root.push(this.data)}}const mr={NONE:0,SQUARE:1,TIGHT:2,TOP_AND_BOTTOM:3},Qu={BOTH_SIDES:"bothSides",LEFT:"left",RIGHT:"right",LARGEST:"largest"},js=()=>new pe({name:"wp:wrapNone"}),ec=(r,e={top:0,bottom:0,left:0,right:0})=>new pe({name:"wp:wrapSquare",attributes:{wrapText:{key:"wrapText",value:r.side||Qu.BOTH_SIDES},distT:{key:"distT",value:e.top},distB:{key:"distB",value:e.bottom},distL:{key:"distL",value:e.left},distR:{key:"distR",value:e.right}}}),tc=(r={top:0,bottom:0})=>new pe({name:"wp:wrapTight",attributes:{distT:{key:"distT",value:r.top},distB:{key:"distB",value:r.bottom}}}),rc=(r={top:0,bottom:0})=>new pe({name:"wp:wrapTopAndBottom",attributes:{distT:{key:"distT",value:r.top},distB:{key:"distB",value:r.bottom}}});class nc extends J{constructor({name:e,description:t,title:n,id:i}={name:"",description:"",title:""}){super("wp:docPr"),ne(this,"docPropertiesUniqueNumericId",Lu());const s={id:{key:"id",value:i??this.docPropertiesUniqueNumericId()},name:{key:"name",value:e}};t!=null&&(s.description={key:"descr",value:t}),n!=null&&(s.title={key:"title",value:n}),this.root.push(new Ln(s))}prepForXml(e){for(let t=e.stack.length-1;t>=0;t--){const n=e.stack[t];if(n instanceof Wt){this.root.push(Yu(n.linkId,!0));break}}return super.prepForXml(e)}}const ic=({top:r,right:e,bottom:t,left:n})=>new pe({name:"wp:effectExtent",attributes:{top:{key:"t",value:r},right:{key:"r",value:e},bottom:{key:"b",value:t},left:{key:"l",value:n}}}),sc=({x:r,y:e})=>new pe({name:"wp:extent",attributes:{x:{key:"cx",value:r},y:{key:"cy",value:e}}});class Sg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{xmlns:"xmlns:a",noChangeAspect:"noChangeAspect"})}}class xg extends J{constructor(){super("a:graphicFrameLocks"),this.root.push(new Sg({xmlns:"http://schemas.openxmlformats.org/drawingml/2006/main",noChangeAspect:1}))}}const ac=()=>new pe({name:"wp:cNvGraphicFramePr",children:[new xg]});class kg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{distT:"distT",distB:"distB",distL:"distL",distR:"distR",allowOverlap:"allowOverlap",behindDoc:"behindDoc",layoutInCell:"layoutInCell",locked:"locked",relativeHeight:"relativeHeight",simplePos:"simplePos"})}}class Cg extends J{constructor({mediaData:e,transform:t,drawingOptions:n}){super("wp:anchor");const i=ye({allowOverlap:!0,behindDocument:!1,lockAnchor:!1,layoutInCell:!0,verticalPosition:{},horizontalPosition:{}},n.floating);if(this.root.push(new kg({distT:i.margins&&i.margins.top||0,distB:i.margins&&i.margins.bottom||0,distL:i.margins&&i.margins.left||0,distR:i.margins&&i.margins.right||0,simplePos:"0",allowOverlap:i.allowOverlap===!0?"1":"0",behindDoc:i.behindDocument===!0?"1":"0",locked:i.lockAnchor===!0?"1":"0",layoutInCell:i.layoutInCell===!0?"1":"0",relativeHeight:i.zIndex?i.zIndex:t.emus.y})),this.root.push(Hu()),this.root.push(Wu(i.horizontalPosition)),this.root.push(zu(i.verticalPosition)),this.root.push(sc({x:t.emus.x,y:t.emus.y})),this.root.push(ic({top:0,right:0,bottom:0,left:0})),n.floating!==void 0&&n.floating.wrap!==void 0)switch(n.floating.wrap.type){case mr.SQUARE:this.root.push(ec(n.floating.wrap,n.floating.margins));break;case mr.TIGHT:this.root.push(tc(n.floating.margins));break;case mr.TOP_AND_BOTTOM:this.root.push(rc(n.floating.margins));break;case mr.NONE:default:this.root.push(js())}else this.root.push(js());this.root.push(new nc(n.docProperties)),this.root.push(ac()),this.root.push(new Ju({mediaData:e,transform:t,outline:n.outline,solidFill:n.solidFill}))}}const Rg=({mediaData:r,transform:e,docProperties:t,outline:n,solidFill:i})=>{var s,o,a,l;return new pe({name:"wp:inline",attributes:{distanceTop:{key:"distT",value:0},distanceBottom:{key:"distB",value:0},distanceLeft:{key:"distL",value:0},distanceRight:{key:"distR",value:0}},children:[sc({x:e.emus.x,y:e.emus.y}),ic(n?{top:((s=n.width)!=null?s:9525)*2,right:((o=n.width)!=null?o:9525)*2,bottom:((a=n.width)!=null?a:9525)*2,left:((l=n.width)!=null?l:9525)*2}:{top:0,right:0,bottom:0,left:0}),new nc(t),ac(),new Ju({mediaData:r,transform:e,outline:n,solidFill:i})]})};class Zr extends J{constructor(e,t={}){super("w:drawing"),t.floating?this.root.push(new Cg({mediaData:e,transform:e.transformation,drawingOptions:t})):this.root.push(Rg({mediaData:e,transform:e.transformation,docProperties:t.docProperties,outline:t.outline,solidFill:t.solidFill}))}}const Ig=r=>{const e=";base64,",t=r.indexOf(e),n=t===-1?0:t+e.length;return new Uint8Array(atob(r.substring(n)).split("").map(i=>i.charCodeAt(0)))},oc=r=>typeof r=="string"?Ig(r):r,Ws=(r,e)=>({data:oc(r.data),fileName:e,transformation:{pixels:{x:Math.round(r.transformation.width),y:Math.round(r.transformation.height)},emus:{x:Math.round(r.transformation.width*9525),y:Math.round(r.transformation.height*9525)},flip:r.transformation.flip,rotation:r.transformation.rotation?r.transformation.rotation*6e4:void 0}});class Ng extends Be{constructor(e){super({}),ne(this,"imageData");const n=`${Ms(e.data)}.${e.type}`;this.imageData=e.type==="svg"?Ne(ye({type:e.type},Ws(e,n)),{fallback:ye({type:e.fallback.type},Ws(Ne(ye({},e.fallback),{transformation:e.transformation}),`${Ms(e.fallback.data)}.${e.fallback.type}`))}):ye({type:e.type},Ws(e,n));const i=new Zr(this.imageData,{floating:e.floating,docProperties:e.altText,outline:e.outline});this.root.push(i)}prepForXml(e){return e.file.Media.addImage(this.imageData.fileName,this.imageData),this.imageData.type==="svg"&&e.file.Media.addImage(this.imageData.fallback.fileName,this.imageData.fallback),super.prepForXml(e)}}const zs=r=>{var e,t,n,i,s,o,a,l;return{offset:{pixels:{x:Math.round((t=(e=r.offset)==null?void 0:e.left)!=null?t:0),y:Math.round((i=(n=r.offset)==null?void 0:n.top)!=null?i:0)},emus:{x:Math.round(((o=(s=r.offset)==null?void 0:s.left)!=null?o:0)*9525),y:Math.round(((l=(a=r.offset)==null?void 0:a.top)!=null?l:0)*9525)}},pixels:{x:Math.round(r.width),y:Math.round(r.height)},emus:{x:Math.round(r.width*9525),y:Math.round(r.height*9525)},flip:r.flip,rotation:r.rotation?r.rotation*6e4:void 0}};class Og extends Be{constructor(e){super({}),ne(this,"wpsShapeData"),this.wpsShapeData={type:e.type,transformation:zs(e.transformation),data:ye({},e)};const t=new Zr(this.wpsShapeData,{floating:e.floating,docProperties:e.altText,outline:e.outline,solidFill:e.solidFill});this.root.push(t)}}class Pg extends Be{constructor(e){super({}),ne(this,"wpgGroupData"),ne(this,"mediaDatas"),this.wpgGroupData={type:e.type,transformation:zs(e.transformation),children:e.children};const t=new Zr(this.wpgGroupData,{floating:e.floating,docProperties:e.altText});this.mediaDatas=e.children.filter(n=>n.type!=="wps").map(n=>n),this.root.push(t)}prepForXml(e){return this.mediaDatas.forEach(t=>{e.file.Media.addImage(t.fileName,t),t.type==="svg"&&e.file.Media.addImage(t.fallback.fileName,t.fallback)}),super.prepForXml(e)}}class Lg extends J{constructor(e){super("w:instrText"),this.root.push(new qe({space:ze.PRESERVE})),this.root.push(`SEQ ${e}`)}}class Dg extends Be{constructor(e){super({}),this.root.push(it(!0)),this.root.push(new Lg(e)),this.root.push(pt()),this.root.push(st())}}class Fg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{instr:"w:instr"})}}class Gs extends J{constructor(e,t){super("w:fldSimple"),this.root.push(new Fg({instr:e})),t!==void 0&&this.root.push(new lr(t))}}class Bg extends Gs{constructor(e){super(` MERGEFIELD ${e} `,`«${e}»`)}}class Mg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{xmlns:"xmlns"})}}const lc={EXTERNAL:"External"},Hg=(r,e,t,n)=>new pe({name:"Relationship",attributes:{id:{key:"Id",value:r},type:{key:"Type",value:e},target:{key:"Target",value:t},targetMode:{key:"TargetMode",value:n}}});class Et extends J{constructor(){super("Relationships"),this.root.push(new Mg({xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}))}addRelationship(e,t,n,i){this.root.push(Hg(`rId${e}`,t,n,i))}get RelationshipCount(){return this.root.length-1}}class Ug extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id",initials:"w:initials",author:"w:author",date:"w:date"})}}class Ks extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id"})}}class jg extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{"xmlns:cx":"xmlns:cx","xmlns:cx1":"xmlns:cx1","xmlns:cx2":"xmlns:cx2","xmlns:cx3":"xmlns:cx3","xmlns:cx4":"xmlns:cx4","xmlns:cx5":"xmlns:cx5","xmlns:cx6":"xmlns:cx6","xmlns:cx7":"xmlns:cx7","xmlns:cx8":"xmlns:cx8","xmlns:mc":"xmlns:mc","xmlns:aink":"xmlns:aink","xmlns:am3d":"xmlns:am3d","xmlns:o":"xmlns:o","xmlns:r":"xmlns:r","xmlns:m":"xmlns:m","xmlns:v":"xmlns:v","xmlns:wp14":"xmlns:wp14","xmlns:wp":"xmlns:wp","xmlns:w10":"xmlns:w10","xmlns:w":"xmlns:w","xmlns:w14":"xmlns:w14","xmlns:w15":"xmlns:w15","xmlns:w16cex":"xmlns:w16cex","xmlns:w16cid":"xmlns:w16cid","xmlns:w16":"xmlns:w16","xmlns:w16sdtdh":"xmlns:w16sdtdh","xmlns:w16se":"xmlns:w16se","xmlns:wpg":"xmlns:wpg","xmlns:wpi":"xmlns:wpi","xmlns:wne":"xmlns:wne","xmlns:wps":"xmlns:wps"})}}class Wg extends J{constructor(e){super("w:commentRangeStart"),this.root.push(new Ks({id:e}))}}class zg extends J{constructor(e){super("w:commentRangeEnd"),this.root.push(new Ks({id:e}))}}class Gg extends J{constructor(e){super("w:commentReference"),this.root.push(new Ks({id:e}))}}class uc extends J{constructor({id:e,initials:t,author:n,date:i=new Date,children:s}){super("w:comment"),this.root.push(new Ug({id:e,initials:t,author:n,date:i.toISOString()}));for(const o of s)this.root.push(o)}}class cc extends J{constructor({children:e}){super("w:comments"),ne(this,"relationships"),this.root.push(new jg({"xmlns:cx":"http://schemas.microsoft.com/office/drawing/2014/chartex","xmlns:cx1":"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex","xmlns:cx2":"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex","xmlns:cx3":"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex","xmlns:cx4":"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex","xmlns:cx5":"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex","xmlns:cx6":"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex","xmlns:cx7":"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex","xmlns:cx8":"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:aink":"http://schemas.microsoft.com/office/drawing/2016/ink","xmlns:am3d":"http://schemas.microsoft.com/office/drawing/2017/model3d","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:m":"http://schemas.openxmlformats.org/officeDocument/2006/math","xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:wp14":"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing","xmlns:wp":"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing","xmlns:w10":"urn:schemas-microsoft-com:office:word","xmlns:w":"http://schemas.openxmlformats.org/wordprocessingml/2006/main","xmlns:w14":"http://schemas.microsoft.com/office/word/2010/wordml","xmlns:w15":"http://schemas.microsoft.com/office/word/2012/wordml","xmlns:w16cex":"http://schemas.microsoft.com/office/word/2018/wordml/cex","xmlns:w16cid":"http://schemas.microsoft.com/office/word/2016/wordml/cid","xmlns:w16":"http://schemas.microsoft.com/office/word/2018/wordml","xmlns:w16sdtdh":"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash","xmlns:w16se":"http://schemas.microsoft.com/office/word/2015/wordml/symex","xmlns:wpg":"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup","xmlns:wpi":"http://schemas.microsoft.com/office/word/2010/wordprocessingInk","xmlns:wne":"http://schemas.microsoft.com/office/word/2006/wordml","xmlns:wps":"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}));for(const t of e)this.root.push(new uc(t));this.relationships=new Et}get Relationships(){return this.relationships}}class Kg extends He{constructor(){super("w:noBreakHyphen")}}class qg extends He{constructor(){super("w:softHyphen")}}class Vg extends He{constructor(){super("w:dayShort")}}class $g extends He{constructor(){super("w:monthShort")}}class Xg extends He{constructor(){super("w:yearShort")}}class Yg extends He{constructor(){super("w:dayLong")}}class Zg extends He{constructor(){super("w:monthLong")}}class Jg extends He{constructor(){super("w:yearLong")}}class Qg extends He{constructor(){super("w:annotationRef")}}class ew extends He{constructor(){super("w:footnoteRef")}}class hc extends He{constructor(){super("w:endnoteRef")}}class tw extends He{constructor(){super("w:separator")}}class rw extends He{constructor(){super("w:continuationSeparator")}}class nw extends He{constructor(){super("w:pgNum")}}class iw extends He{constructor(){super("w:cr")}}class fc extends He{constructor(){super("w:tab")}}class sw extends He{constructor(){super("w:lastRenderedPageBreak")}}const aw={LEFT:"left",CENTER:"center",RIGHT:"right"},ow={MARGIN:"margin",INDENT:"indent"},lw={NONE:"none",DOT:"dot",HYPHEN:"hyphen",UNDERSCORE:"underscore",MIDDLE_DOT:"middleDot"};class uw extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{alignment:"w:alignment",relativeTo:"w:relativeTo",leader:"w:leader"})}}class cw extends J{constructor(e){super("w:ptab"),this.root.push(new uw({alignment:e.alignment,relativeTo:e.relativeTo,leader:e.leader}))}}const dc={COLUMN:"column",PAGE:"page"};class pc extends J{constructor(e){super("w:br"),this.root.push(new Fe({type:e}))}}class hw extends Be{constructor(){super({}),this.root.push(new pc(dc.PAGE))}}class fw extends Be{constructor(){super({}),this.root.push(new pc(dc.COLUMN))}}class mc extends J{constructor(){super("w:pageBreakBefore")}}const Nt={AT_LEAST:"atLeast",EXACTLY:"exactly",EXACT:"exact",AUTO:"auto"},gc=({after:r,before:e,line:t,lineRule:n,beforeAutoSpacing:i,afterAutoSpacing:s})=>new pe({name:"w:spacing",attributes:{after:{key:"w:after",value:r},before:{key:"w:before",value:e},line:{key:"w:line",value:t},lineRule:{key:"w:lineRule",value:n},beforeAutoSpacing:{key:"w:beforeAutospacing",value:i},afterAutoSpacing:{key:"w:afterAutospacing",value:s}}}),dw={HEADING_1:"Heading1",HEADING_2:"Heading2",HEADING_3:"Heading3",HEADING_4:"Heading4",HEADING_5:"Heading5",HEADING_6:"Heading6",TITLE:"Title"},gr=r=>new pe({name:"w:pStyle",attributes:{val:{key:"w:val",value:r}}}),qs={LEFT:"left",RIGHT:"right",CENTER:"center",BAR:"bar",CLEAR:"clear",DECIMAL:"decimal",END:"end",NUM:"num",START:"start"},pw={DOT:"dot",HYPHEN:"hyphen",MIDDLE_DOT:"middleDot",NONE:"none",UNDERSCORE:"underscore"},mw={MAX:9026},wc=({type:r,position:e,leader:t})=>new pe({name:"w:tab",attributes:{val:{key:"w:val",value:r},pos:{key:"w:pos",value:e},leader:{key:"w:leader",value:t}}}),yc=r=>new pe({name:"w:tabs",children:r.map(e=>wc(e))});class Jr extends J{constructor(e,t){super("w:numPr"),this.root.push(new gw(t)),this.root.push(new ww(e))}}class gw extends J{constructor(e){if(super("w:ilvl"),e>9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new Fe({val:e}))}}class ww extends J{constructor(e){super("w:numId"),this.root.push(new Fe({val:typeof e=="string"?`{${e}}`:e}))}}class wr extends J{constructor(){super(...arguments),ne(this,"fileChild",Symbol())}}class yw extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"r:id",history:"w:history",anchor:"w:anchor"})}}const vw={INTERNAL:"INTERNAL",EXTERNAL:"EXTERNAL"};class Wt extends J{constructor(e,t,n){super("w:hyperlink"),ne(this,"linkId"),this.linkId=t;const i={history:1,anchor:n||void 0,id:n?void 0:`rId${this.linkId}`},s=new yw(i);this.root.push(s),e.forEach(o=>{this.root.push(o)})}}class vc extends Wt{constructor(e){super(e.children,fr(),e.anchor)}}class Vs extends J{constructor(e){super("w:externalHyperlink"),this.options=e}}class bw extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id",name:"w:name"})}}class _w extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id"})}}class bc{constructor(e){ne(this,"bookmarkUniqueNumericId",Du()),ne(this,"start"),ne(this,"children"),ne(this,"end");const t=this.bookmarkUniqueNumericId();this.start=new _c(e.id,t),this.children=e.children,this.end=new Tc(t)}}class _c extends J{constructor(e,t){super("w:bookmarkStart");const n=new bw({name:e,id:t});this.root.push(n)}}class Tc extends J{constructor(e){super("w:bookmarkEnd");const t=new _w({id:e});this.root.push(t)}}var Ec=(r=>(r.NONE="none",r.RELATIVE="relative",r.NO_CONTEXT="no_context",r.FULL_CONTEXT="full_context",r))(Ec||{});const Tw={relative:"\\r",no_context:"\\n",full_context:"\\w",none:void 0};class Ew extends Gs{constructor(e,t,n={}){const{hyperlink:i=!0,referenceFormat:s="full_context"}=n,o=`REF ${e}`,a=[...i?["\\h"]:[],...[Tw[s]].filter(c=>!!c)],l=`${o} ${a.join(" ")}`;super(l,t)}}const Ac=r=>new pe({name:"w:outlineLvl",attributes:{val:{key:"w:val",value:r}}});class Aw extends J{constructor(e,t={}){super("w:instrText"),this.root.push(new qe({space:ze.PRESERVE}));let n=`PAGEREF ${e}`;t.hyperlink&&(n=`${n} \\h`),t.useRelativePosition&&(n=`${n} \\p`),this.root.push(n)}}class Sw extends Be{constructor(e,t={}){super({children:[it(!0),new Aw(e,t),st()]})}}const xw={ANSI:"00",DEFAULT:"01",SYMBOL:"02",MAC:"4D",JIS:"80",HANGUL:"81",JOHAB:"82",GB_2312:"86",CHINESEBIG5:"88",GREEK:"A1",TURKISH:"A2",VIETNAMESE:"A3",HEBREW:"B1",ARABIC:"B2",BALTIC:"BA",RUSSIAN:"CC",THAI:"DE",EASTEUROPE:"EE",OEM:"FF"},Qr=({id:r,fontKey:e,subsetted:t},n)=>new pe({name:n,attributes:ye({id:{key:"r:id",value:r}},e?{fontKey:{key:"w:fontKey",value:`{${e}}`}}:{}),children:[...t?[new de("w:subsetted",t)]:[]]}),kw=({name:r,altName:e,panose1:t,charset:n,family:i,notTrueType:s,pitch:o,sig:a,embedRegular:l,embedBold:c,embedItalic:f,embedBoldItalic:m})=>new pe({name:"w:font",attributes:{name:{key:"w:name",value:r}},children:[...e?[Ut("w:altName",e)]:[],...t?[Ut("w:panose1",t)]:[],...n?[Ut("w:charset",n)]:[],Ut("w:family",i),...s?[new de("w:notTrueType",s)]:[],Ut("w:pitch",o),...a?[new pe({name:"w:sig",attributes:{usb0:{key:"w:usb0",value:a.usb0},usb1:{key:"w:usb1",value:a.usb1},usb2:{key:"w:usb2",value:a.usb2},usb3:{key:"w:usb3",value:a.usb3},csb0:{key:"w:csb0",value:a.csb0},csb1:{key:"w:csb1",value:a.csb1}}})]:[],...l?[Qr(l,"w:embedRegular")]:[],...c?[Qr(c,"w:embedBold")]:[],...f?[Qr(f,"w:embedItalic")]:[],...m?[Qr(m,"w:embedBoldItalic")]:[]]}),Cw=({name:r,index:e,fontKey:t,characterSet:n})=>kw({name:r,sig:{usb0:"E0002AFF",usb1:"C000247B",usb2:"00000009",usb3:"00000000",csb0:"000001FF",csb1:"00000000"},charset:n,family:"auto",pitch:"variable",embedRegular:{fontKey:t,id:`rId${e}`}}),Rw=r=>new pe({name:"w:fonts",attributes:{mc:{key:"xmlns:mc",value:"http://schemas.openxmlformats.org/markup-compatibility/2006"},r:{key:"xmlns:r",value:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},w:{key:"xmlns:w",value:"http://schemas.openxmlformats.org/wordprocessingml/2006/main"},w14:{key:"xmlns:w14",value:"http://schemas.microsoft.com/office/word/2010/wordml"},w15:{key:"xmlns:w15",value:"http://schemas.microsoft.com/office/word/2012/wordml"},w16cex:{key:"xmlns:w16cex",value:"http://schemas.microsoft.com/office/word/2018/wordml/cex"},w16cid:{key:"xmlns:w16cid",value:"http://schemas.microsoft.com/office/word/2016/wordml/cid"},w16:{key:"xmlns:w16",value:"http://schemas.microsoft.com/office/word/2018/wordml"},w16sdtdh:{key:"xmlns:w16sdtdh",value:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash"},w16se:{key:"xmlns:w16se",value:"http://schemas.microsoft.com/office/word/2015/wordml/symex"},Ignorable:{key:"mc:Ignorable",value:"w14 w15 w16se w16cid w16 w16cex w16sdtdh"}},children:r.map((e,t)=>Cw({name:e.name,index:t+1,fontKey:e.fontKey,characterSet:e.characterSet}))});class Sc{constructor(e){ne(this,"fontTable"),ne(this,"relationships"),ne(this,"fontOptionsWithKey",[]),this.options=e,this.fontOptionsWithKey=e.map(t=>Ne(ye({},t),{fontKey:Fu()})),this.fontTable=Rw(this.fontOptionsWithKey),this.relationships=new Et;for(let t=0;t<e.length;t++)this.relationships.addRelationship(t+1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/font",`fonts/${e[t].name}.odttf`)}get View(){return this.fontTable}get Relationships(){return this.relationships}}const Iw=()=>new pe({name:"w:wordWrap",attributes:{val:{key:"w:val",value:0}}}),Nw={NONE:"none",DROP:"drop",MARGIN:"margin"},Ow={MARGIN:"margin",PAGE:"page",TEXT:"text"},Pw={AROUND:"around",AUTO:"auto",NONE:"none",NOT_BESIDE:"notBeside",THROUGH:"through",TIGHT:"tight"},xc=r=>{var e,t;return new pe({name:"w:framePr",attributes:{anchorLock:{key:"w:anchorLock",value:r.anchorLock},dropCap:{key:"w:dropCap",value:r.dropCap},width:{key:"w:w",value:r.width},height:{key:"w:h",value:r.height},x:{key:"w:x",value:r.position?r.position.x:void 0},y:{key:"w:y",value:r.position?r.position.y:void 0},anchorHorizontal:{key:"w:hAnchor",value:r.anchor.horizontal},anchorVertical:{key:"w:vAnchor",value:r.anchor.vertical},spaceHorizontal:{key:"w:hSpace",value:(e=r.space)==null?void 0:e.horizontal},spaceVertical:{key:"w:vSpace",value:(t=r.space)==null?void 0:t.vertical},rule:{key:"w:hRule",value:r.rule},alignmentX:{key:"w:xAlign",value:r.alignment?r.alignment.x:void 0},alignmentY:{key:"w:yAlign",value:r.alignment?r.alignment.y:void 0},lines:{key:"w:lines",value:r.lines},wrap:{key:"w:wrap",value:r.wrap}}})};class gt extends ct{constructor(e){var t,n;if(super("w:pPr",e==null?void 0:e.includeIfEmpty),ne(this,"numberingReferences",[]),!e)return this;e.heading&&this.push(gr(e.heading)),e.bullet&&this.push(gr("ListParagraph")),e.numbering&&!e.style&&!e.heading&&(e.numbering.custom||this.push(gr("ListParagraph"))),e.style&&this.push(gr(e.style)),e.keepNext!==void 0&&this.push(new de("w:keepNext",e.keepNext)),e.keepLines!==void 0&&this.push(new de("w:keepLines",e.keepLines)),e.pageBreakBefore&&this.push(new mc),e.frame&&this.push(xc(e.frame)),e.widowControl!==void 0&&this.push(new de("w:widowControl",e.widowControl)),e.bullet&&this.push(new Jr(1,e.bullet.level)),e.numbering?(this.numberingReferences.push({reference:e.numbering.reference,instance:(t=e.numbering.instance)!=null?t:0}),this.push(new Jr(`${e.numbering.reference}-${(n=e.numbering.instance)!=null?n:0}`,e.numbering.level))):e.numbering===!1&&this.push(new Jr(0,0)),e.border&&this.push(new au(e.border)),e.thematicBreak&&this.push(new ou),e.shading&&this.push(ar(e.shading)),e.wordWrap&&this.push(Iw()),e.overflowPunctuation&&this.push(new de("w:overflowPunct",e.overflowPunctuation));const i=[...e.rightTabStop!==void 0?[{type:qs.RIGHT,position:e.rightTabStop}]:[],...e.tabStops?e.tabStops:[],...e.leftTabStop!==void 0?[{type:qs.LEFT,position:e.leftTabStop}]:[]];i.length>0&&this.push(yc(i)),e.bidirectional!==void 0&&this.push(new de("w:bidi",e.bidirectional)),e.spacing&&this.push(gc(e.spacing)),e.indent&&this.push(lu(e.indent)),e.contextualSpacing!==void 0&&this.push(new de("w:contextualSpacing",e.contextualSpacing)),e.alignment&&this.push(Ts(e.alignment)),e.outlineLevel!==void 0&&this.push(Ac(e.outlineLevel)),e.suppressLineNumbers!==void 0&&this.push(new de("w:suppressLineNumbers",e.suppressLineNumbers)),e.autoSpaceEastAsianText!==void 0&&this.push(new de("w:autoSpaceDN",e.autoSpaceEastAsianText)),e.run&&this.push(new fu(e.run)),e.revision&&this.push(new kc(e.revision))}push(e){this.root.push(e)}prepForXml(e){if(!(e.viewWrapper instanceof Sc))for(const t of this.numberingReferences)e.file.Numbering.createConcreteNumberingInstance(t.reference,t.instance);return super.prepForXml(e)}}class kc extends J{constructor(e){super("w:pPrChange"),this.root.push(new Ge({id:e.id,author:e.author,date:e.date})),this.root.push(new gt(Ne(ye({},e),{includeIfEmpty:!0})))}}class Ye extends wr{constructor(e){if(super("w:p"),ne(this,"properties"),typeof e=="string")return this.properties=new gt({}),this.root.push(this.properties),this.root.push(new lr(e)),this;if(this.properties=new gt(e),this.root.push(this.properties),e.text&&this.root.push(new lr(e.text)),e.children)for(const t of e.children){if(t instanceof bc){this.root.push(t.start);for(const n of t.children)this.root.push(n);this.root.push(t.end);continue}this.root.push(t)}}prepForXml(e){for(const t of this.root)if(t instanceof Vs){const n=this.root.indexOf(t),i=new Wt(t.options.children,fr());e.viewWrapper.Relationships.addRelationship(i.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",t.options.link,lc.EXTERNAL),this.root[n]=i}return super.prepForXml(e)}addRunToFront(e){return this.root.splice(1,0,e),this}}let Lw=class extends J{constructor(e){super("m:oMath");for(const t of e.children)this.root.push(t)}};class Dw extends J{constructor(e){super("m:t"),this.root.push(e)}}class Fw extends J{constructor(e){super("m:r"),this.root.push(new Dw(e))}}class Cc extends J{constructor(e){super("m:den");for(const t of e)this.root.push(t)}}class Rc extends J{constructor(e){super("m:num");for(const t of e)this.root.push(t)}}class Bw extends J{constructor(e){super("m:f"),this.root.push(new Rc(e.numerator)),this.root.push(new Cc(e.denominator))}}const Ic=({accent:r})=>new pe({name:"m:chr",attributes:{accent:{key:"m:val",value:r}}}),je=({children:r})=>new pe({name:"m:e",children:r}),Nc=({value:r})=>new pe({name:"m:limLoc",attributes:{value:{key:"m:val",value:r||"undOvr"}}}),Mw=()=>new pe({name:"m:subHide",attributes:{hide:{key:"m:val",value:1}}}),Hw=()=>new pe({name:"m:supHide",attributes:{hide:{key:"m:val",value:1}}}),$s=({accent:r,hasSuperScript:e,hasSubScript:t,limitLocationVal:n})=>new pe({name:"m:naryPr",children:[...r?[Ic({accent:r})]:[],Nc({value:n}),...e?[]:[Hw()],...t?[]:[Mw()]]}),zt=({children:r})=>new pe({name:"m:sub",children:r}),Gt=({children:r})=>new pe({name:"m:sup",children:r});class Uw extends J{constructor(e){super("m:nary"),this.root.push($s({accent:"∑",hasSuperScript:!!e.superScript,hasSubScript:!!e.subScript})),e.subScript&&this.root.push(zt({children:e.subScript})),e.superScript&&this.root.push(Gt({children:e.superScript})),this.root.push(je({children:e.children}))}}class jw extends J{constructor(e){super("m:nary"),this.root.push($s({accent:"",hasSuperScript:!!e.superScript,hasSubScript:!!e.subScript,limitLocationVal:"subSup"})),e.subScript&&this.root.push(zt({children:e.subScript})),e.superScript&&this.root.push(Gt({children:e.superScript})),this.root.push(je({children:e.children}))}}class Xs extends J{constructor(e){super("m:lim");for(const t of e)this.root.push(t)}}class Ww extends J{constructor(e){super("m:limUpp"),this.root.push(je({children:e.children})),this.root.push(new Xs(e.limit))}}class zw extends J{constructor(e){super("m:limLow"),this.root.push(je({children:e.children})),this.root.push(new Xs(e.limit))}}const Oc=()=>new pe({name:"m:sSupPr"});class Gw extends J{constructor(e){super("m:sSup"),this.root.push(Oc()),this.root.push(je({children:e.children})),this.root.push(Gt({children:e.superScript}))}}const Pc=()=>new pe({name:"m:sSubPr"});class Kw extends J{constructor(e){super("m:sSub"),this.root.push(Pc()),this.root.push(je({children:e.children})),this.root.push(zt({children:e.subScript}))}}const Lc=()=>new pe({name:"m:sSubSupPr"});class qw extends J{constructor(e){super("m:sSubSup"),this.root.push(Lc()),this.root.push(je({children:e.children})),this.root.push(zt({children:e.subScript})),this.root.push(Gt({children:e.superScript}))}}const Dc=()=>new pe({name:"m:sPrePr"});class Vw extends pe{constructor({children:e,subScript:t,superScript:n}){super({name:"m:sPre",children:[Dc(),je({children:e}),zt({children:t}),Gt({children:n})]})}}const $w="";class Fc extends J{constructor(e){if(super("m:deg"),e)for(const t of e)this.root.push(t)}}class Xw extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{hide:"m:val"})}}class Yw extends J{constructor(){super("m:degHide"),this.root.push(new Xw({hide:1}))}}class Bc extends J{constructor(e){super("m:radPr"),e||this.root.push(new Yw)}}class Zw extends J{constructor(e){super("m:rad"),this.root.push(new Bc(!!e.degree)),this.root.push(new Fc(e.degree)),this.root.push(je({children:e.children}))}}class Mc extends J{constructor(e){super("m:fName");for(const t of e)this.root.push(t)}}class Hc extends J{constructor(){super("m:funcPr")}}class Jw extends J{constructor(e){super("m:func"),this.root.push(new Hc),this.root.push(new Mc(e.name)),this.root.push(je({children:e.children}))}}const Qw=({character:r})=>new pe({name:"m:begChr",attributes:{character:{key:"m:val",value:r}}}),ey=({character:r})=>new pe({name:"m:endChr",attributes:{character:{key:"m:val",value:r}}}),en=({characters:r})=>new pe({name:"m:dPr",children:r?[Qw({character:r.beginningCharacter}),ey({character:r.endingCharacter})]:[]});class ty extends J{constructor(e){super("m:d"),this.root.push(en({})),this.root.push(je({children:e.children}))}}class ry extends J{constructor(e){super("m:d"),this.root.push(en({characters:{beginningCharacter:"[",endingCharacter:"]"}})),this.root.push(je({children:e.children}))}}class ny extends J{constructor(e){super("m:d"),this.root.push(en({characters:{beginningCharacter:"{",endingCharacter:"}"}})),this.root.push(je({children:e.children}))}}class iy extends J{constructor(e){super("m:d"),this.root.push(en({characters:{beginningCharacter:"〈",endingCharacter:"〉"}})),this.root.push(je({children:e.children}))}}const sy=r=>new pe({name:"w:gridCol",attributes:r!==void 0?{width:{key:"w:w",value:De(r)}}:void 0});class Uc extends J{constructor(e,t){super("w:tblGrid");for(const n of e)this.root.push(sy(n));t&&this.root.push(new oy(t))}}class ay extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id"})}}class oy extends J{constructor(e){super("w:tblGridChange"),this.root.push(new ay({id:e.id})),this.root.push(new Uc(e.columnWidths))}}class ly extends J{constructor(e){super("w:ins"),this.root.push(new Ge({id:e.id,author:e.author,date:e.date})),this.addChildElement(new lr(e))}}class uy extends J{constructor(){super("w:delInstrText"),this.root.push(new qe({space:ze.PRESERVE})),this.root.push("PAGE")}}class cy extends J{constructor(){super("w:delInstrText"),this.root.push(new qe({space:ze.PRESERVE})),this.root.push("NUMPAGES")}}class hy extends J{constructor(){super("w:delInstrText"),this.root.push(new qe({space:ze.PRESERVE})),this.root.push("SECTIONPAGES")}}class jc extends J{constructor(e){super("w:delText"),this.root.push(new qe({space:ze.PRESERVE})),this.root.push(e)}}class fy extends J{constructor(e){super("w:del"),ne(this,"deletedTextRunWrapper"),this.root.push(new Ge({id:e.id,author:e.author,date:e.date})),this.deletedTextRunWrapper=new dy(e),this.addChildElement(this.deletedTextRunWrapper)}}class dy extends J{constructor(e){if(super("w:r"),this.root.push(new mt(e)),e.children)for(const t of e.children){if(typeof t=="string"){switch(t){case Tt.CURRENT:this.root.push(it()),this.root.push(new uy),this.root.push(pt()),this.root.push(st());break;case Tt.TOTAL_PAGES:this.root.push(it()),this.root.push(new cy),this.root.push(pt()),this.root.push(st());break;case Tt.TOTAL_PAGES_IN_SECTION:this.root.push(it()),this.root.push(new hy),this.root.push(pt()),this.root.push(st());break;default:this.root.push(new jc(t));break}continue}this.root.push(t)}else e.text&&this.root.push(new jc(e.text));if(e.break)for(let t=0;t<e.break;t++)this.root.splice(1,0,uu())}}class Wc extends J{constructor(e){super("w:ins"),this.root.push(new Ge({id:e.id,author:e.author,date:e.date}))}}class zc extends J{constructor(e){super("w:del"),this.root.push(new Ge({id:e.id,author:e.author,date:e.date}))}}class Gc extends J{constructor(e){super("w:cellIns"),this.root.push(new Ge({id:e.id,author:e.author,date:e.date}))}}class Kc extends J{constructor(e){super("w:cellDel"),this.root.push(new Ge({id:e.id,author:e.author,date:e.date}))}}const py={CONTINUE:"cont",RESTART:"rest"};class qc extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date",verticalMerge:"w:vMerge",verticalMergeOriginal:"w:vMergeOrig"})}}class Vc extends J{constructor(e){super("w:cellMerge"),this.root.push(new qc(e))}}const $c={TOP:"top",CENTER:"center",BOTTOM:"bottom"},Xc=Ne(ye({},$c),{BOTH:"both"}),my=Xc,Ys=r=>new pe({name:"w:vAlign",attributes:{verticalAlign:{key:"w:val",value:r}}}),Yc=({marginUnitType:r=tn.DXA,top:e,left:t,bottom:n,right:i})=>[{name:"w:top",size:e},{name:"w:left",size:t},{name:"w:bottom",size:n},{name:"w:right",size:i}].filter(s=>s.size!==void 0).map(({name:s,size:o})=>yr(s,{type:r,size:o})),gy=r=>{const e=Yc(r);if(e.length!==0)return new pe({name:"w:tblCellMar",children:e})},wy=r=>{const e=Yc(r);if(e.length!==0)return new pe({name:"w:tcMar",children:e})},tn={AUTO:"auto",DXA:"dxa",NIL:"nil",PERCENTAGE:"pct"},yr=(r,{type:e=tn.AUTO,size:t})=>{let n=t;return e===tn.PERCENTAGE&&typeof t=="number"&&(n=`${t}%`),new pe({name:r,attributes:{type:{key:"w:type",value:e},size:{key:"w:w",value:_s(n)}}})};class Zc extends ct{constructor(e){super("w:tcBorders"),e.top&&this.root.push(Re("w:top",e.top)),e.start&&this.root.push(Re("w:start",e.start)),e.left&&this.root.push(Re("w:left",e.left)),e.bottom&&this.root.push(Re("w:bottom",e.bottom)),e.end&&this.root.push(Re("w:end",e.end)),e.right&&this.root.push(Re("w:right",e.right))}}class yy extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w:val"})}}class Jc extends J{constructor(e){super("w:gridSpan"),this.root.push(new yy({val:Me(e)}))}}const Zs={CONTINUE:"continue",RESTART:"restart"};class vy extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w:val"})}}class Js extends J{constructor(e){super("w:vMerge"),this.root.push(new vy({val:e}))}}const by={BOTTOM_TO_TOP_LEFT_TO_RIGHT:"btLr",LEFT_TO_RIGHT_TOP_TO_BOTTOM:"lrTb",TOP_TO_BOTTOM_RIGHT_TO_LEFT:"tbRl"};class _y extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w:val"})}}class Qc extends J{constructor(e){super("w:textDirection"),this.root.push(new _y({val:e}))}}class eh extends ct{constructor(e){if(super("w:tcPr",e.includeIfEmpty),e.width&&this.root.push(yr("w:tcW",e.width)),e.columnSpan&&this.root.push(new Jc(e.columnSpan)),e.verticalMerge?this.root.push(new Js(e.verticalMerge)):e.rowSpan&&e.rowSpan>1&&this.root.push(new Js(Zs.RESTART)),e.borders&&this.root.push(new Zc(e.borders)),e.shading&&this.root.push(ar(e.shading)),e.margins){const t=wy(e.margins);t&&this.root.push(t)}e.textDirection&&this.root.push(new Qc(e.textDirection)),e.verticalAlign&&this.root.push(Ys(e.verticalAlign)),e.insertion&&this.root.push(new Gc(e.insertion)),e.deletion&&this.root.push(new Kc(e.deletion)),e.revision&&this.root.push(new Ty(e.revision)),e.cellMerge&&this.root.push(new Vc(e.cellMerge))}}class Ty extends J{constructor(e){super("w:tcPrChange"),this.root.push(new Ge({id:e.id,author:e.author,date:e.date})),this.root.push(new eh(Ne(ye({},e),{includeIfEmpty:!0})))}}class Qs extends J{constructor(e){super("w:tc"),this.options=e,this.root.push(new eh(e));for(const t of e.children)this.root.push(t)}prepForXml(e){return this.root[this.root.length-1]instanceof Ye||this.root.push(new Ye({})),super.prepForXml(e)}}const Kt={style:Xr.NONE,size:0,color:"auto"},qt={style:Xr.SINGLE,size:4,color:"auto"};class ea extends J{constructor(e){var t,n,i,s,o,a;super("w:tblBorders"),this.root.push(Re("w:top",(t=e.top)!=null?t:qt)),this.root.push(Re("w:left",(n=e.left)!=null?n:qt)),this.root.push(Re("w:bottom",(i=e.bottom)!=null?i:qt)),this.root.push(Re("w:right",(s=e.right)!=null?s:qt)),this.root.push(Re("w:insideH",(o=e.insideHorizontal)!=null?o:qt)),this.root.push(Re("w:insideV",(a=e.insideVertical)!=null?a:qt))}}ne(ea,"NONE",{top:Kt,bottom:Kt,left:Kt,right:Kt,insideHorizontal:Kt,insideVertical:Kt});const Ey={MARGIN:"margin",PAGE:"page",TEXT:"text"},Ay={CENTER:"center",INSIDE:"inside",LEFT:"left",OUTSIDE:"outside",RIGHT:"right"},Sy={CENTER:"center",INSIDE:"inside",BOTTOM:"bottom",OUTSIDE:"outside",INLINE:"inline",TOP:"top"},xy={NEVER:"never",OVERLAP:"overlap"},ky=r=>new pe({name:"w:tblOverlap",attributes:{val:{key:"w:val",value:r}}}),th=({horizontalAnchor:r,verticalAnchor:e,absoluteHorizontalPosition:t,relativeHorizontalPosition:n,absoluteVerticalPosition:i,relativeVerticalPosition:s,bottomFromText:o,topFromText:a,leftFromText:l,rightFromText:c,overlap:f})=>new pe({name:"w:tblpPr",attributes:{leftFromText:{key:"w:leftFromText",value:l===void 0?void 0:De(l)},rightFromText:{key:"w:rightFromText",value:c===void 0?void 0:De(c)},topFromText:{key:"w:topFromText",value:a===void 0?void 0:De(a)},bottomFromText:{key:"w:bottomFromText",value:o===void 0?void 0:De(o)},absoluteHorizontalPosition:{key:"w:tblpX",value:t===void 0?void 0:nt(t)},absoluteVerticalPosition:{key:"w:tblpY",value:i===void 0?void 0:nt(i)},horizontalAnchor:{key:"w:horzAnchor",value:r},relativeHorizontalPosition:{key:"w:tblpXSpec",value:n},relativeVerticalPosition:{key:"w:tblpYSpec",value:s},verticalAnchor:{key:"w:vertAnchor",value:e}},children:f?[ky(f)]:void 0}),Cy={AUTOFIT:"autofit",FIXED:"fixed"},rh=r=>new pe({name:"w:tblLayout",attributes:{type:{key:"w:type",value:r}}}),Ry={DXA:"dxa"},nh=({type:r=Ry.DXA,value:e})=>new pe({name:"w:tblCellSpacing",attributes:{type:{key:"w:type",value:r},value:{key:"w:w",value:_s(e)}}}),ih=({firstRow:r,lastRow:e,firstColumn:t,lastColumn:n,noHBand:i,noVBand:s})=>new pe({name:"w:tblLook",attributes:{firstRow:{key:"w:firstRow",value:r},lastRow:{key:"w:lastRow",value:e},firstColumn:{key:"w:firstColumn",value:t},lastColumn:{key:"w:lastColumn",value:n},noHBand:{key:"w:noHBand",value:i},noVBand:{key:"w:noVBand",value:s}}});class ta extends ct{constructor(e){if(super("w:tblPr",e.includeIfEmpty),e.style&&this.root.push(new dt("w:tblStyle",e.style)),e.float&&this.root.push(th(e.float)),e.visuallyRightToLeft!==void 0&&this.root.push(new de("w:bidiVisual",e.visuallyRightToLeft)),e.width&&this.root.push(yr("w:tblW",e.width)),e.alignment&&this.root.push(Ts(e.alignment)),e.indent&&this.root.push(yr("w:tblInd",e.indent)),e.borders&&this.root.push(new ea(e.borders)),e.shading&&this.root.push(ar(e.shading)),e.layout&&this.root.push(rh(e.layout)),e.cellMargin){const t=gy(e.cellMargin);t&&this.root.push(t)}e.tableLook&&this.root.push(ih(e.tableLook)),e.cellSpacing&&this.root.push(nh(e.cellSpacing)),e.revision&&this.root.push(new Iy(e.revision))}}class Iy extends J{constructor(e){super("w:tblPrChange"),this.root.push(new Ge({id:e.id,author:e.author,date:e.date})),this.root.push(new ta(Ne(ye({},e),{includeIfEmpty:!0})))}}class Ny extends wr{constructor({rows:e,width:t,columnWidths:n=Array(Math.max(...e.map(_=>_.CellCount))).fill(100),columnWidthsRevision:i,margins:s,indent:o,float:a,layout:l,style:c,borders:f,alignment:m,visuallyRightToLeft:v,tableLook:y,cellSpacing:b,revision:g}){super("w:tbl"),this.root.push(new ta({borders:f??{},width:t??{size:100},indent:o,float:a,layout:l,style:c,alignment:m,cellMargin:s,visuallyRightToLeft:v,tableLook:y,cellSpacing:b,revision:g})),this.root.push(new Uc(n,i));for(const _ of e)this.root.push(_);e.forEach((_,d)=>{if(d===e.length-1)return;let T=0;_.cells.forEach(w=>{if(w.options.rowSpan&&w.options.rowSpan>1){const p=new Qs({rowSpan:w.options.rowSpan-1,columnSpan:w.options.columnSpan,borders:w.options.borders,children:[],verticalMerge:Zs.CONTINUE});e[d+1].addCellToColumnIndex(p,T)}T+=w.options.columnSpan||1})})}}const Oy={AUTO:"auto",ATLEAST:"atLeast",EXACT:"exact"},sh=(r,e)=>new pe({name:"w:trHeight",attributes:{value:{key:"w:val",value:De(r)},rule:{key:"w:hRule",value:e}}});class ra extends ct{constructor(e){super("w:trPr",e.includeIfEmpty),e.cantSplit!==void 0&&this.root.push(new de("w:cantSplit",e.cantSplit)),e.tableHeader!==void 0&&this.root.push(new de("w:tblHeader",e.tableHeader)),e.height&&this.root.push(sh(e.height.value,e.height.rule)),e.cellSpacing&&this.root.push(nh(e.cellSpacing)),e.insertion&&this.root.push(new Wc(e.insertion)),e.deletion&&this.root.push(new zc(e.deletion)),e.revision&&this.root.push(new ah(e.revision))}}class ah extends J{constructor(e){super("w:trPrChange"),this.root.push(new Ge({id:e.id,author:e.author,date:e.date})),this.root.push(new ra(Ne(ye({},e),{includeIfEmpty:!0})))}}class Py extends J{constructor(e){super("w:tr"),this.options=e,this.root.push(new ra(e));for(const t of e.children)this.root.push(t)}get CellCount(){return this.options.children.length}get cells(){return this.root.filter(e=>e instanceof Qs)}addCellToIndex(e,t){this.root.splice(t+1,0,e)}addCellToColumnIndex(e,t){const n=this.columnIndexToRootIndex(t,!0);this.addCellToIndex(e,n-1)}rootIndexToColumnIndex(e){if(e<1||e>=this.root.length)throw new Error(`cell 'rootIndex' should between 1 to ${this.root.length-1}`);let t=0;for(let n=1;n<e;n++){const i=this.root[n];t+=i.options.columnSpan||1}return t}columnIndexToRootIndex(e,t=!1){if(e<0)throw new Error("cell 'columnIndex' should not less than zero");let n=0,i=1;for(;n<=e;){if(i>=this.root.length){if(t)return this.root.length;throw new Error(`cell 'columnIndex' should not great than ${n-1}`)}const s=this.root[i];i+=1,n+=s&&s.options.columnSpan||1}return i-1}}class Ly extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class Dy extends J{constructor(){super("Properties"),this.root.push(new Ly({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}))}}class Fy extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{xmlns:"xmlns"})}}const wt=(r,e)=>new pe({name:"Default",attributes:{contentType:{key:"ContentType",value:r},extension:{key:"Extension",value:e}}}),Ve=(r,e)=>new pe({name:"Override",attributes:{contentType:{key:"ContentType",value:r},partName:{key:"PartName",value:e}}});class By extends J{constructor(){super("Types"),this.root.push(new Fy({xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"})),this.root.push(wt("image/png","png")),this.root.push(wt("image/jpeg","jpeg")),this.root.push(wt("image/jpeg","jpg")),this.root.push(wt("image/bmp","bmp")),this.root.push(wt("image/gif","gif")),this.root.push(wt("image/svg+xml","svg")),this.root.push(wt("application/vnd.openxmlformats-package.relationships+xml","rels")),this.root.push(wt("application/xml","xml")),this.root.push(wt("application/vnd.openxmlformats-officedocument.obfuscatedFont","odttf")),this.root.push(Ve("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","/word/document.xml")),this.root.push(Ve("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml","/word/styles.xml")),this.root.push(Ve("application/vnd.openxmlformats-package.core-properties+xml","/docProps/core.xml")),this.root.push(Ve("application/vnd.openxmlformats-officedocument.custom-properties+xml","/docProps/custom.xml")),this.root.push(Ve("application/vnd.openxmlformats-officedocument.extended-properties+xml","/docProps/app.xml")),this.root.push(Ve("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml","/word/numbering.xml")),this.root.push(Ve("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml","/word/footnotes.xml")),this.root.push(Ve("application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml","/word/endnotes.xml")),this.root.push(Ve("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml","/word/settings.xml")),this.root.push(Ve("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml","/word/comments.xml")),this.root.push(Ve("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml","/word/fontTable.xml"))}addFooter(e){this.root.push(Ve("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",`/word/footer${e}.xml`))}addHeader(e){this.root.push(Ve("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",`/word/header${e}.xml`))}}const rn={wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",aink:"http://schemas.microsoft.com/office/drawing/2016/ink",am3d:"http://schemas.microsoft.com/office/drawing/2017/model3d",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16:"http://schemas.microsoft.com/office/word/2018/wordml",w16sdtdh:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex"};class vr extends we{constructor(e,t){super(ye({Ignorable:t},Object.fromEntries(e.map(n=>[n,rn[n]])))),ne(this,"xmlKeys",ye({Ignorable:"mc:Ignorable"},Object.fromEntries(Object.keys(rn).map(n=>[n,`xmlns:${n}`]))))}}class My extends J{constructor(e){super("cp:coreProperties"),this.root.push(new vr(["cp","dc","dcterms","dcmitype","xsi"])),e.title&&this.root.push(new _t("dc:title",e.title)),e.subject&&this.root.push(new _t("dc:subject",e.subject)),e.creator&&this.root.push(new _t("dc:creator",e.creator)),e.keywords&&this.root.push(new _t("cp:keywords",e.keywords)),e.description&&this.root.push(new _t("dc:description",e.description)),e.lastModifiedBy&&this.root.push(new _t("cp:lastModifiedBy",e.lastModifiedBy)),e.revision&&this.root.push(new _t("cp:revision",String(e.revision))),this.root.push(new oh("dcterms:created")),this.root.push(new oh("dcterms:modified"))}}class Hy extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{type:"xsi:type"})}}class oh extends J{constructor(e){super(e),this.root.push(new Hy({type:"dcterms:W3CDTF"})),this.root.push(su(new Date))}}class Uy extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class jy extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{formatId:"fmtid",pid:"pid",name:"name"})}}class Wy extends J{constructor(e,t){super("property"),this.root.push(new jy({formatId:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e.toString(),name:t.name})),this.root.push(new zy(t.value))}}class zy extends J{constructor(e){super("vt:lpwstr"),this.root.push(e)}}class Gy extends J{constructor(e){super("Properties"),ne(this,"nextId"),ne(this,"properties",[]),this.root.push(new Uy({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"})),this.nextId=2;for(const t of e)this.addCustomProperty(t)}prepForXml(e){return this.properties.forEach(t=>this.root.push(t)),super.prepForXml(e)}addCustomProperty(e){this.properties.push(new Wy(this.nextId++,e))}}const lh=({space:r,count:e,separate:t,equalWidth:n,children:i})=>new pe({name:"w:cols",attributes:{space:{key:"w:space",value:r===void 0?void 0:De(r)},count:{key:"w:num",value:e===void 0?void 0:Me(e)},separate:{key:"w:sep",value:t},equalWidth:{key:"w:equalWidth",value:n}},children:!n&&i?i:void 0}),Ky={DEFAULT:"default",LINES:"lines",LINES_AND_CHARS:"linesAndChars",SNAP_TO_CHARS:"snapToChars"},uh=({type:r,linePitch:e,charSpace:t})=>new pe({name:"w:docGrid",attributes:{type:{key:"w:type",value:r},linePitch:{key:"w:linePitch",value:Me(e)},charSpace:{key:"w:charSpace",value:t?Me(t):void 0}}}),Ot={DEFAULT:"default",FIRST:"first",EVEN:"even"},na={HEADER:"w:headerReference",FOOTER:"w:footerReference"},nn=(r,e)=>new pe({name:r,attributes:{type:{key:"w:type",value:e.type||Ot.DEFAULT},id:{key:"r:id",value:`rId${e.id}`}}}),qy={NEW_PAGE:"newPage",NEW_SECTION:"newSection",CONTINUOUS:"continuous"},ch=({countBy:r,start:e,restart:t,distance:n})=>new pe({name:"w:lnNumType",attributes:{countBy:{key:"w:countBy",value:r===void 0?void 0:Me(r)},start:{key:"w:start",value:e===void 0?void 0:Me(e)},restart:{key:"w:restart",value:t},distance:{key:"w:distance",value:n===void 0?void 0:De(n)}}}),Vy={ALL_PAGES:"allPages",FIRST_PAGE:"firstPage",NOT_FIRST_PAGE:"notFirstPage"},$y={PAGE:"page",TEXT:"text"},Xy={BACK:"back",FRONT:"front"};class hh extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{display:"w:display",offsetFrom:"w:offsetFrom",zOrder:"w:zOrder"})}}class fh extends ct{constructor(e){if(super("w:pgBorders"),!e)return this;e.pageBorders?this.root.push(new hh({display:e.pageBorders.display,offsetFrom:e.pageBorders.offsetFrom,zOrder:e.pageBorders.zOrder})):this.root.push(new hh({})),e.pageBorderTop&&this.root.push(Re("w:top",e.pageBorderTop)),e.pageBorderLeft&&this.root.push(Re("w:left",e.pageBorderLeft)),e.pageBorderBottom&&this.root.push(Re("w:bottom",e.pageBorderBottom)),e.pageBorderRight&&this.root.push(Re("w:right",e.pageBorderRight))}}const dh=(r,e,t,n,i,s,o)=>new pe({name:"w:pgMar",attributes:{top:{key:"w:top",value:nt(r)},right:{key:"w:right",value:De(e)},bottom:{key:"w:bottom",value:nt(t)},left:{key:"w:left",value:De(n)},header:{key:"w:header",value:De(i)},footer:{key:"w:footer",value:De(s)},gutter:{key:"w:gutter",value:De(o)}}}),Yy={HYPHEN:"hyphen",PERIOD:"period",COLON:"colon",EM_DASH:"emDash",EN_DASH:"endash"},ph=({start:r,formatType:e,separator:t})=>new pe({name:"w:pgNumType",attributes:{start:{key:"w:start",value:r===void 0?void 0:Me(r)},formatType:{key:"w:fmt",value:e},separator:{key:"w:chapSep",value:t}}}),sn={PORTRAIT:"portrait",LANDSCAPE:"landscape"},mh=({width:r,height:e,orientation:t,code:n})=>{const i=De(r),s=De(e);return new pe({name:"w:pgSz",attributes:{width:{key:"w:w",value:t===sn.LANDSCAPE?s:i},height:{key:"w:h",value:t===sn.LANDSCAPE?i:s},orientation:{key:"w:orient",value:t},code:{key:"w:code",value:n}}})},Zy={LEFT_TO_RIGHT_TOP_TO_BOTTOM:"lrTb",TOP_TO_BOTTOM_RIGHT_TO_LEFT:"tbRl"};class Jy extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w:val"})}}class gh extends J{constructor(e){super("w:textDirection"),this.root.push(new Jy({val:e}))}}const Qy={NEXT_PAGE:"nextPage",NEXT_COLUMN:"nextColumn",CONTINUOUS:"continuous",EVEN_PAGE:"evenPage",ODD_PAGE:"oddPage"},wh=r=>new pe({name:"w:type",attributes:{val:{key:"w:val",value:r}}}),At={TOP:1440,RIGHT:1440,BOTTOM:1440,LEFT:1440,HEADER:708,FOOTER:708,GUTTER:0},an={WIDTH:11906,HEIGHT:16838,ORIENTATION:sn.PORTRAIT};class ia extends J{constructor({page:{size:{width:e=an.WIDTH,height:t=an.HEIGHT,orientation:n=an.ORIENTATION}={},margin:{top:i=At.TOP,right:s=At.RIGHT,bottom:o=At.BOTTOM,left:a=At.LEFT,header:l=At.HEADER,footer:c=At.FOOTER,gutter:f=At.GUTTER}={},pageNumbers:m={},borders:v,textDirection:y}={},grid:{linePitch:b=360,charSpace:g,type:_}={},headerWrapperGroup:d={},footerWrapperGroup:T={},lineNumbers:w,titlePage:p,verticalAlign:E,column:O,type:P,revision:B}={}){super("w:sectPr"),this.addHeaderFooterGroup(na.HEADER,d),this.addHeaderFooterGroup(na.FOOTER,T),P&&this.root.push(wh(P)),this.root.push(mh({width:e,height:t,orientation:n})),this.root.push(dh(i,s,o,a,l,c,f)),v&&this.root.push(new fh(v)),w&&this.root.push(ch(w)),this.root.push(ph(m)),O&&this.root.push(lh(O)),E&&this.root.push(Ys(E)),p!==void 0&&this.root.push(new de("w:titlePg",p)),y&&this.root.push(new gh(y)),B&&this.root.push(new yh(B)),this.root.push(uh({linePitch:b,charSpace:g,type:_}))}addHeaderFooterGroup(e,t){t.default&&this.root.push(nn(e,{type:Ot.DEFAULT,id:t.default.View.ReferenceId})),t.first&&this.root.push(nn(e,{type:Ot.FIRST,id:t.first.View.ReferenceId})),t.even&&this.root.push(nn(e,{type:Ot.EVEN,id:t.even.View.ReferenceId}))}}class yh extends J{constructor(e){super("w:sectPrChange"),this.root.push(new Ge({id:e.id,author:e.author,date:e.date})),this.root.push(new ia(e))}}class ev extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{width:"w:w",space:"w:space"})}}class tv extends J{constructor(e){super("w:col"),this.root.push(new ev({width:De(e.width),space:e.space===void 0?void 0:De(e.space)}))}}class vh extends J{constructor(){super("w:body"),ne(this,"sections",[])}addSection(e){const t=this.sections.pop();this.root.push(this.createSectionParagraph(t)),this.sections.push(new ia(e))}prepForXml(e){return this.sections.length===1&&(this.root.splice(0,1),this.root.push(this.sections.pop())),super.prepForXml(e)}push(e){this.root.push(e)}createSectionParagraph(e){const t=new Ye({}),n=new gt({});return n.push(e),t.addChildElement(n),t}}class bh extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{color:"w:color",themeColor:"w:themeColor",themeShade:"w:themeShade",themeTint:"w:themeTint"})}}class _h extends J{constructor(e){super("w:background"),this.root.push(new bh({color:e.color===void 0?void 0:Rt(e.color),themeColor:e.themeColor,themeShade:e.themeShade===void 0?void 0:vs(e.themeShade),themeTint:e.themeTint===void 0?void 0:vs(e.themeTint)}))}}class rv extends J{constructor(e){super("w:document"),ne(this,"body"),this.root.push(new vr(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps","cx","cx1","cx2","cx3","cx4","cx5","cx6","cx7","cx8","aink","am3d","w16cex","w16cid","w16","w16sdtdh","w16se"],"w14 w15 wp14")),this.body=new vh,e.background&&this.root.push(new _h(e.background)),this.root.push(this.body)}add(e){return this.body.push(e),this}get Body(){return this.body}}class nv{constructor(e){ne(this,"document"),ne(this,"relationships"),this.document=new rv(e),this.relationships=new Et}get View(){return this.document}get Relationships(){return this.relationships}}class iv extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class sv extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{type:"w:type",id:"w:id"})}}class av extends Be{constructor(){super({style:"EndnoteReference"}),this.root.push(new hc)}}const Th={SEPARATOR:"separator",CONTINUATION_SEPARATOR:"continuationSeparator"};class sa extends J{constructor(e){super("w:endnote"),this.root.push(new sv({type:e.type,id:e.id}));for(let t=0;t<e.children.length;t++){const n=e.children[t];t===0&&n.addRunToFront(new av),this.root.push(n)}}}class ov extends J{constructor(){super("w:continuationSeparator")}}class Eh extends Be{constructor(){super({}),this.root.push(new ov)}}class lv extends J{constructor(){super("w:separator")}}class Ah extends Be{constructor(){super({}),this.root.push(new lv)}}class Sh extends J{constructor(){super("w:endnotes"),this.root.push(new iv({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));const e=new sa({id:-1,type:Th.SEPARATOR,children:[new Ye({spacing:{after:0,line:240,lineRule:Nt.AUTO},children:[new Ah]})]});this.root.push(e);const t=new sa({id:0,type:Th.CONTINUATION_SEPARATOR,children:[new Ye({spacing:{after:0,line:240,lineRule:Nt.AUTO},children:[new Eh]})]});this.root.push(t)}createEndnote(e,t){const n=new sa({id:e,children:t});this.root.push(n)}}class uv{constructor(){ne(this,"endnotes"),ne(this,"relationships"),this.endnotes=new Sh,this.relationships=new Et}get View(){return this.endnotes}get Relationships(){return this.relationships}}class cv extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type"})}}let hv=class extends ys{constructor(e,t){super("w:ftr",t),ne(this,"refId"),this.refId=e,t||this.root.push(new cv({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}};class xh{constructor(e,t,n){ne(this,"footer"),ne(this,"relationships"),this.media=e,this.footer=new hv(t,n),this.relationships=new Et}add(e){this.footer.add(e)}addChildElement(e){this.footer.addChildElement(e)}get View(){return this.footer}get Relationships(){return this.relationships}get Media(){return this.media}}class fv extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{type:"w:type",id:"w:id"})}}class dv extends J{constructor(){super("w:footnoteRef")}}class pv extends Be{constructor(){super({style:"FootnoteReference"}),this.root.push(new dv)}}const kh={SEPERATOR:"separator",CONTINUATION_SEPERATOR:"continuationSeparator"};class aa extends J{constructor(e){super("w:footnote"),this.root.push(new fv({type:e.type,id:e.id}));for(let t=0;t<e.children.length;t++){const n=e.children[t];t===0&&n.addRunToFront(new pv),this.root.push(n)}}}class mv extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class Ch extends J{constructor(){super("w:footnotes"),this.root.push(new mv({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));const e=new aa({id:-1,type:kh.SEPERATOR,children:[new Ye({spacing:{after:0,line:240,lineRule:Nt.AUTO},children:[new Ah]})]});this.root.push(e);const t=new aa({id:0,type:kh.CONTINUATION_SEPERATOR,children:[new Ye({spacing:{after:0,line:240,lineRule:Nt.AUTO},children:[new Eh]})]});this.root.push(t)}createFootNote(e,t){const n=new aa({id:e,children:t});this.root.push(n)}}class gv{constructor(){ne(this,"footnotess"),ne(this,"relationships"),this.footnotess=new Ch,this.relationships=new Et}get View(){return this.footnotess}get Relationships(){return this.relationships}}class wv extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type",cx:"xmlns:cx",cx1:"xmlns:cx1",cx2:"xmlns:cx2",cx3:"xmlns:cx3",cx4:"xmlns:cx4",cx5:"xmlns:cx5",cx6:"xmlns:cx6",cx7:"xmlns:cx7",cx8:"xmlns:cx8",w16cid:"xmlns:w16cid",w16se:"xmlns:w16se"})}}let yv=class extends ys{constructor(e,t){super("w:hdr",t),ne(this,"refId"),this.refId=e,t||this.root.push(new wv({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}};class Rh{constructor(e,t,n){ne(this,"header"),ne(this,"relationships"),this.media=e,this.header=new yv(t,n),this.relationships=new Et}add(e){return this.header.add(e),this}addChildElement(e){this.header.addChildElement(e)}get View(){return this.header}get Relationships(){return this.relationships}get Media(){return this.media}}class oa{constructor(){ne(this,"map"),this.map=new Map}addImage(e,t){this.map.set(e,t)}get Array(){return Array.from(this.map.values())}}const vv="",lt={DECIMAL:"decimal",UPPER_ROMAN:"upperRoman",LOWER_ROMAN:"lowerRoman",UPPER_LETTER:"upperLetter",LOWER_LETTER:"lowerLetter",ORDINAL:"ordinal",CARDINAL_TEXT:"cardinalText",ORDINAL_TEXT:"ordinalText",HEX:"hex",CHICAGO:"chicago",IDEOGRAPH__DIGITAL:"ideographDigital",JAPANESE_COUNTING:"japaneseCounting",AIUEO:"aiueo",IROHA:"iroha",DECIMAL_FULL_WIDTH:"decimalFullWidth",DECIMAL_HALF_WIDTH:"decimalHalfWidth",JAPANESE_LEGAL:"japaneseLegal",JAPANESE_DIGITAL_TEN_THOUSAND:"japaneseDigitalTenThousand",DECIMAL_ENCLOSED_CIRCLE:"decimalEnclosedCircle",DECIMAL_FULL_WIDTH2:"decimalFullWidth2",AIUEO_FULL_WIDTH:"aiueoFullWidth",IROHA_FULL_WIDTH:"irohaFullWidth",DECIMAL_ZERO:"decimalZero",BULLET:"bullet",GANADA:"ganada",CHOSUNG:"chosung",DECIMAL_ENCLOSED_FULLSTOP:"decimalEnclosedFullstop",DECIMAL_ENCLOSED_PARENTHESES:"decimalEnclosedParen",DECIMAL_ENCLOSED_CIRCLE_CHINESE:"decimalEnclosedCircleChinese",IDEOGRAPH_ENCLOSED_CIRCLE:"ideographEnclosedCircle",IDEOGRAPH_TRADITIONAL:"ideographTraditional",IDEOGRAPH_ZODIAC:"ideographZodiac",IDEOGRAPH_ZODIAC_TRADITIONAL:"ideographZodiacTraditional",TAIWANESE_COUNTING:"taiwaneseCounting",IDEOGRAPH_LEGAL_TRADITIONAL:"ideographLegalTraditional",TAIWANESE_COUNTING_THOUSAND:"taiwaneseCountingThousand",TAIWANESE_DIGITAL:"taiwaneseDigital",CHINESE_COUNTING:"chineseCounting",CHINESE_LEGAL_SIMPLIFIED:"chineseLegalSimplified",CHINESE_COUNTING_THOUSAND:"chineseCountingThousand",KOREAN_DIGITAL:"koreanDigital",KOREAN_COUNTING:"koreanCounting",KOREAN_LEGAL:"koreanLegal",KOREAN_DIGITAL2:"koreanDigital2",VIETNAMESE_COUNTING:"vietnameseCounting",RUSSIAN_LOWER:"russianLower",RUSSIAN_UPPER:"russianUpper",NONE:"none",NUMBER_IN_DASH:"numberInDash",HEBREW1:"hebrew1",HEBREW2:"hebrew2",ARABIC_ALPHA:"arabicAlpha",ARABIC_ABJAD:"arabicAbjad",HINDI_VOWELS:"hindiVowels",HINDI_CONSONANTS:"hindiConsonants",HINDI_NUMBERS:"hindiNumbers",HINDI_COUNTING:"hindiCounting",THAI_LETTERS:"thaiLetters",THAI_NUMBERS:"thaiNumbers",THAI_COUNTING:"thaiCounting",BAHT_TEXT:"bahtText",DOLLAR_TEXT:"dollarText",CUSTOM:"custom"};class bv extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{ilvl:"w:ilvl",tentative:"w15:tentative"})}}class _v extends J{constructor(e){super("w:numFmt"),this.root.push(new Fe({val:e}))}}class Tv extends J{constructor(e){super("w:lvlText"),this.root.push(new Fe({val:e}))}}class Ev extends J{constructor(e){super("w:lvlJc"),this.root.push(new Fe({val:e}))}}const Av={NOTHING:"nothing",SPACE:"space",TAB:"tab"};class Sv extends J{constructor(e){super("w:suff"),this.root.push(new Fe({val:e}))}}class xv extends J{constructor(){super("w:isLgl")}}class la extends J{constructor({level:e,format:t,text:n,alignment:i=Ze.START,start:s=1,style:o,suffix:a,isLegalNumberingStyle:l}){if(super("w:lvl"),ne(this,"paragraphProperties"),ne(this,"runProperties"),this.root.push(new jt("w:start",Me(s))),t&&this.root.push(new _v(t)),a&&this.root.push(new Sv(a)),l&&this.root.push(new xv),n&&this.root.push(new Tv(n)),this.root.push(new Ev(i)),this.paragraphProperties=new gt(o&&o.paragraph),this.runProperties=new mt(o&&o.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties),e>9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new bv({ilvl:Me(e),tentative:1}))}}class Ih extends la{}class kv extends la{}class Cv extends J{constructor(e){super("w:multiLevelType"),this.root.push(new Fe({val:e}))}}class Rv extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{abstractNumId:"w:abstractNumId",restartNumberingAfterBreak:"w15:restartNumberingAfterBreak"})}}class ua extends J{constructor(e,t){super("w:abstractNum"),ne(this,"id"),this.root.push(new Rv({abstractNumId:Me(e),restartNumberingAfterBreak:0})),this.root.push(new Cv("hybridMultilevel")),this.id=e;for(const n of t)this.root.push(new Ih(n))}}class Iv extends J{constructor(e){super("w:abstractNumId"),this.root.push(new Fe({val:e}))}}class Nv extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{numId:"w:numId"})}}class ca extends J{constructor(e){if(super("w:num"),ne(this,"numId"),ne(this,"reference"),ne(this,"instance"),this.numId=e.numId,this.reference=e.reference,this.instance=e.instance,this.root.push(new Nv({numId:Me(e.numId)})),this.root.push(new Iv(Me(e.abstractNumId))),e.overrideLevels&&e.overrideLevels.length)for(const t of e.overrideLevels)this.root.push(new Nh(t.num,t.start))}}class Ov extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{ilvl:"w:ilvl"})}}class Nh extends J{constructor(e,t){super("w:lvlOverride"),this.root.push(new Ov({ilvl:e})),t!==void 0&&this.root.push(new Lv(t))}}class Pv extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w:val"})}}class Lv extends J{constructor(e){super("w:startOverride"),this.root.push(new Pv({val:e}))}}class Oh extends J{constructor(e){super("w:numbering"),ne(this,"abstractNumberingMap",new Map),ne(this,"concreteNumberingMap",new Map),ne(this,"referenceConfigMap",new Map),ne(this,"abstractNumUniqueNumericId",Ou()),ne(this,"concreteNumUniqueNumericId",Pu()),this.root.push(new vr(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps"],"w14 w15 wp14"));const t=new ua(this.abstractNumUniqueNumericId(),[{level:0,format:lt.BULLET,text:"●",alignment:Ze.LEFT,style:{paragraph:{indent:{left:Xe(.5),hanging:Xe(.25)}}}},{level:1,format:lt.BULLET,text:"○",alignment:Ze.LEFT,style:{paragraph:{indent:{left:Xe(1),hanging:Xe(.25)}}}},{level:2,format:lt.BULLET,text:"■",alignment:Ze.LEFT,style:{paragraph:{indent:{left:2160,hanging:Xe(.25)}}}},{level:3,format:lt.BULLET,text:"●",alignment:Ze.LEFT,style:{paragraph:{indent:{left:2880,hanging:Xe(.25)}}}},{level:4,format:lt.BULLET,text:"○",alignment:Ze.LEFT,style:{paragraph:{indent:{left:3600,hanging:Xe(.25)}}}},{level:5,format:lt.BULLET,text:"■",alignment:Ze.LEFT,style:{paragraph:{indent:{left:4320,hanging:Xe(.25)}}}},{level:6,format:lt.BULLET,text:"●",alignment:Ze.LEFT,style:{paragraph:{indent:{left:5040,hanging:Xe(.25)}}}},{level:7,format:lt.BULLET,text:"●",alignment:Ze.LEFT,style:{paragraph:{indent:{left:5760,hanging:Xe(.25)}}}},{level:8,format:lt.BULLET,text:"●",alignment:Ze.LEFT,style:{paragraph:{indent:{left:6480,hanging:Xe(.25)}}}}]);this.concreteNumberingMap.set("default-bullet-numbering",new ca({numId:1,abstractNumId:t.id,reference:"default-bullet-numbering",instance:0,overrideLevels:[{num:0,start:1}]})),this.abstractNumberingMap.set("default-bullet-numbering",t);for(const n of e.config)this.abstractNumberingMap.set(n.reference,new ua(this.abstractNumUniqueNumericId(),n.levels)),this.referenceConfigMap.set(n.reference,n.levels)}prepForXml(e){for(const t of this.abstractNumberingMap.values())this.root.push(t);for(const t of this.concreteNumberingMap.values())this.root.push(t);return super.prepForXml(e)}createConcreteNumberingInstance(e,t){const n=this.abstractNumberingMap.get(e);if(!n)return;const i=`${e}-${t}`;if(this.concreteNumberingMap.has(i))return;const s=this.referenceConfigMap.get(e),o=s&&s[0].start,a={numId:this.concreteNumUniqueNumericId(),abstractNumId:n.id,reference:e,instance:t,overrideLevels:[typeof o=="number"&&Number.isInteger(o)?{num:0,start:o}:{num:0,start:1}]};this.concreteNumberingMap.set(i,new ca(a))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}}const Dv=r=>new pe({name:"w:compatSetting",attributes:{version:{key:"w:val",value:r},name:{key:"w:name",value:"compatibilityMode"},uri:{key:"w:uri",value:"http://schemas.microsoft.com/office/word"}}});class Fv extends J{constructor(e){super("w:compat"),e.version&&this.root.push(Dv(e.version)),e.useSingleBorderforContiguousCells&&this.root.push(new de("w:useSingleBorderforContiguousCells",e.useSingleBorderforContiguousCells)),e.wordPerfectJustification&&this.root.push(new de("w:wpJustification",e.wordPerfectJustification)),e.noTabStopForHangingIndent&&this.root.push(new de("w:noTabHangInd",e.noTabStopForHangingIndent)),e.noLeading&&this.root.push(new de("w:noLeading",e.noLeading)),e.spaceForUnderline&&this.root.push(new de("w:spaceForUL",e.spaceForUnderline)),e.noColumnBalance&&this.root.push(new de("w:noColumnBalance",e.noColumnBalance)),e.balanceSingleByteDoubleByteWidth&&this.root.push(new de("w:balanceSingleByteDoubleByteWidth",e.balanceSingleByteDoubleByteWidth)),e.noExtraLineSpacing&&this.root.push(new de("w:noExtraLineSpacing",e.noExtraLineSpacing)),e.doNotLeaveBackslashAlone&&this.root.push(new de("w:doNotLeaveBackslashAlone",e.doNotLeaveBackslashAlone)),e.underlineTrailingSpaces&&this.root.push(new de("w:ulTrailSpace",e.underlineTrailingSpaces)),e.doNotExpandShiftReturn&&this.root.push(new de("w:doNotExpandShiftReturn",e.doNotExpandShiftReturn)),e.spacingInWholePoints&&this.root.push(new de("w:spacingInWholePoints",e.spacingInWholePoints)),e.lineWrapLikeWord6&&this.root.push(new de("w:lineWrapLikeWord6",e.lineWrapLikeWord6)),e.printBodyTextBeforeHeader&&this.root.push(new de("w:printBodyTextBeforeHeader",e.printBodyTextBeforeHeader)),e.printColorsBlack&&this.root.push(new de("w:printColBlack",e.printColorsBlack)),e.spaceWidth&&this.root.push(new de("w:wpSpaceWidth",e.spaceWidth)),e.showBreaksInFrames&&this.root.push(new de("w:showBreaksInFrames",e.showBreaksInFrames)),e.subFontBySize&&this.root.push(new de("w:subFontBySize",e.subFontBySize)),e.suppressBottomSpacing&&this.root.push(new de("w:suppressBottomSpacing",e.suppressBottomSpacing)),e.suppressTopSpacing&&this.root.push(new de("w:suppressTopSpacing",e.suppressTopSpacing)),e.suppressSpacingAtTopOfPage&&this.root.push(new de("w:suppressSpacingAtTopOfPage",e.suppressSpacingAtTopOfPage)),e.suppressTopSpacingWP&&this.root.push(new de("w:suppressTopSpacingWP",e.suppressTopSpacingWP)),e.suppressSpBfAfterPgBrk&&this.root.push(new de("w:suppressSpBfAfterPgBrk",e.suppressSpBfAfterPgBrk)),e.swapBordersFacingPages&&this.root.push(new de("w:swapBordersFacingPages",e.swapBordersFacingPages)),e.convertMailMergeEsc&&this.root.push(new de("w:convMailMergeEsc",e.convertMailMergeEsc)),e.truncateFontHeightsLikeWP6&&this.root.push(new de("w:truncateFontHeightsLikeWP6",e.truncateFontHeightsLikeWP6)),e.macWordSmallCaps&&this.root.push(new de("w:mwSmallCaps",e.macWordSmallCaps)),e.usePrinterMetrics&&this.root.push(new de("w:usePrinterMetrics",e.usePrinterMetrics)),e.doNotSuppressParagraphBorders&&this.root.push(new de("w:doNotSuppressParagraphBorders",e.doNotSuppressParagraphBorders)),e.wrapTrailSpaces&&this.root.push(new de("w:wrapTrailSpaces",e.wrapTrailSpaces)),e.footnoteLayoutLikeWW8&&this.root.push(new de("w:footnoteLayoutLikeWW8",e.footnoteLayoutLikeWW8)),e.shapeLayoutLikeWW8&&this.root.push(new de("w:shapeLayoutLikeWW8",e.shapeLayoutLikeWW8)),e.alignTablesRowByRow&&this.root.push(new de("w:alignTablesRowByRow",e.alignTablesRowByRow)),e.forgetLastTabAlignment&&this.root.push(new de("w:forgetLastTabAlignment",e.forgetLastTabAlignment)),e.adjustLineHeightInTable&&this.root.push(new de("w:adjustLineHeightInTable",e.adjustLineHeightInTable)),e.autoSpaceLikeWord95&&this.root.push(new de("w:autoSpaceLikeWord95",e.autoSpaceLikeWord95)),e.noSpaceRaiseLower&&this.root.push(new de("w:noSpaceRaiseLower",e.noSpaceRaiseLower)),e.doNotUseHTMLParagraphAutoSpacing&&this.root.push(new de("w:doNotUseHTMLParagraphAutoSpacing",e.doNotUseHTMLParagraphAutoSpacing)),e.layoutRawTableWidth&&this.root.push(new de("w:layoutRawTableWidth",e.layoutRawTableWidth)),e.layoutTableRowsApart&&this.root.push(new de("w:layoutTableRowsApart",e.layoutTableRowsApart)),e.useWord97LineBreakRules&&this.root.push(new de("w:useWord97LineBreakRules",e.useWord97LineBreakRules)),e.doNotBreakWrappedTables&&this.root.push(new de("w:doNotBreakWrappedTables",e.doNotBreakWrappedTables)),e.doNotSnapToGridInCell&&this.root.push(new de("w:doNotSnapToGridInCell",e.doNotSnapToGridInCell)),e.selectFieldWithFirstOrLastCharacter&&this.root.push(new de("w:selectFldWithFirstOrLastChar",e.selectFieldWithFirstOrLastCharacter)),e.applyBreakingRules&&this.root.push(new de("w:applyBreakingRules",e.applyBreakingRules)),e.doNotWrapTextWithPunctuation&&this.root.push(new de("w:doNotWrapTextWithPunct",e.doNotWrapTextWithPunctuation)),e.doNotUseEastAsianBreakRules&&this.root.push(new de("w:doNotUseEastAsianBreakRules",e.doNotUseEastAsianBreakRules)),e.useWord2002TableStyleRules&&this.root.push(new de("w:useWord2002TableStyleRules",e.useWord2002TableStyleRules)),e.growAutofit&&this.root.push(new de("w:growAutofit",e.growAutofit)),e.useFELayout&&this.root.push(new de("w:useFELayout",e.useFELayout)),e.useNormalStyleForList&&this.root.push(new de("w:useNormalStyleForList",e.useNormalStyleForList)),e.doNotUseIndentAsNumberingTabStop&&this.root.push(new de("w:doNotUseIndentAsNumberingTabStop",e.doNotUseIndentAsNumberingTabStop)),e.useAlternateEastAsianLineBreakRules&&this.root.push(new de("w:useAltKinsokuLineBreakRules",e.useAlternateEastAsianLineBreakRules)),e.allowSpaceOfSameStyleInTable&&this.root.push(new de("w:allowSpaceOfSameStyleInTable",e.allowSpaceOfSameStyleInTable)),e.doNotSuppressIndentation&&this.root.push(new de("w:doNotSuppressIndentation",e.doNotSuppressIndentation)),e.doNotAutofitConstrainedTables&&this.root.push(new de("w:doNotAutofitConstrainedTables",e.doNotAutofitConstrainedTables)),e.autofitToFirstFixedWidthCell&&this.root.push(new de("w:autofitToFirstFixedWidthCell",e.autofitToFirstFixedWidthCell)),e.underlineTabInNumberingList&&this.root.push(new de("w:underlineTabInNumList",e.underlineTabInNumberingList)),e.displayHangulFixedWidth&&this.root.push(new de("w:displayHangulFixedWidth",e.displayHangulFixedWidth)),e.splitPgBreakAndParaMark&&this.root.push(new de("w:splitPgBreakAndParaMark",e.splitPgBreakAndParaMark)),e.doNotVerticallyAlignCellWithSp&&this.root.push(new de("w:doNotVertAlignCellWithSp",e.doNotVerticallyAlignCellWithSp)),e.doNotBreakConstrainedForcedTable&&this.root.push(new de("w:doNotBreakConstrainedForcedTable",e.doNotBreakConstrainedForcedTable)),e.ignoreVerticalAlignmentInTextboxes&&this.root.push(new de("w:doNotVertAlignInTxbx",e.ignoreVerticalAlignmentInTextboxes)),e.useAnsiKerningPairs&&this.root.push(new de("w:useAnsiKerningPairs",e.useAnsiKerningPairs)),e.cachedColumnBalance&&this.root.push(new de("w:cachedColBalance",e.cachedColumnBalance))}}class Bv extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class Mv extends J{constructor(e){var t,n,i,s,o,a,l,c;super("w:settings"),this.root.push(new Bv({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"})),this.root.push(new de("w:displayBackgroundShape",!0)),e.trackRevisions!==void 0&&this.root.push(new de("w:trackRevisions",e.trackRevisions)),e.evenAndOddHeaders!==void 0&&this.root.push(new de("w:evenAndOddHeaders",e.evenAndOddHeaders)),e.updateFields!==void 0&&this.root.push(new de("w:updateFields",e.updateFields)),e.defaultTabStop!==void 0&&this.root.push(new jt("w:defaultTabStop",e.defaultTabStop)),((t=e.hyphenation)==null?void 0:t.autoHyphenation)!==void 0&&this.root.push(new de("w:autoHyphenation",e.hyphenation.autoHyphenation)),((n=e.hyphenation)==null?void 0:n.hyphenationZone)!==void 0&&this.root.push(new jt("w:hyphenationZone",e.hyphenation.hyphenationZone)),((i=e.hyphenation)==null?void 0:i.consecutiveHyphenLimit)!==void 0&&this.root.push(new jt("w:consecutiveHyphenLimit",e.hyphenation.consecutiveHyphenLimit)),((s=e.hyphenation)==null?void 0:s.doNotHyphenateCaps)!==void 0&&this.root.push(new de("w:doNotHyphenateCaps",e.hyphenation.doNotHyphenateCaps)),this.root.push(new Fv(Ne(ye({},(o=e.compatibility)!=null?o:{}),{version:(c=(l=(a=e.compatibility)==null?void 0:a.version)!=null?l:e.compatibilityModeVersion)!=null?c:15})))}}class Ph extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w:val"})}}class Hv extends J{constructor(e){super("w:name"),this.root.push(new Ph({val:e}))}}class Uv extends J{constructor(e){super("w:uiPriority"),this.root.push(new Ph({val:Me(e)}))}}class jv extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{type:"w:type",styleId:"w:styleId",default:"w:default",customStyle:"w:customStyle"})}}class Lh extends J{constructor(e,t){super("w:style"),this.root.push(new jv(e)),t.name&&this.root.push(new Hv(t.name)),t.basedOn&&this.root.push(new dt("w:basedOn",t.basedOn)),t.next&&this.root.push(new dt("w:next",t.next)),t.link&&this.root.push(new dt("w:link",t.link)),t.uiPriority!==void 0&&this.root.push(new Uv(t.uiPriority)),t.semiHidden!==void 0&&this.root.push(new de("w:semiHidden",t.semiHidden)),t.unhideWhenUsed!==void 0&&this.root.push(new de("w:unhideWhenUsed",t.unhideWhenUsed)),t.quickFormat!==void 0&&this.root.push(new de("w:qFormat",t.quickFormat))}}class Vt extends Lh{constructor(e){super({type:"paragraph",styleId:e.id},e),ne(this,"paragraphProperties"),ne(this,"runProperties"),this.paragraphProperties=new gt(e.paragraph),this.runProperties=new mt(e.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties)}}class Pt extends Lh{constructor(e){super({type:"character",styleId:e.id},ye({uiPriority:99,unhideWhenUsed:!0},e)),ne(this,"runProperties"),this.runProperties=new mt(e.run),this.root.push(this.runProperties)}}class St extends Vt{constructor(e){super(ye({basedOn:"Normal",next:"Normal",quickFormat:!0},e))}}class Wv extends St{constructor(e){super(ye({id:"Title",name:"Title"},e))}}class zv extends St{constructor(e){super(ye({id:"Heading1",name:"Heading 1"},e))}}class Gv extends St{constructor(e){super(ye({id:"Heading2",name:"Heading 2"},e))}}class Kv extends St{constructor(e){super(ye({id:"Heading3",name:"Heading 3"},e))}}class qv extends St{constructor(e){super(ye({id:"Heading4",name:"Heading 4"},e))}}class Vv extends St{constructor(e){super(ye({id:"Heading5",name:"Heading 5"},e))}}class $v extends St{constructor(e){super(ye({id:"Heading6",name:"Heading 6"},e))}}class Xv extends St{constructor(e){super(ye({id:"Strong",name:"Strong"},e))}}class Yv extends Vt{constructor(e){super(ye({id:"ListParagraph",name:"List Paragraph",basedOn:"Normal",quickFormat:!0},e))}}class Zv extends Vt{constructor(e){super(ye({id:"FootnoteText",name:"footnote text",link:"FootnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:Nt.AUTO}},run:{size:20}},e))}}class Jv extends Pt{constructor(e){super(ye({id:"FootnoteReference",name:"footnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}}class Qv extends Pt{constructor(e){super(ye({id:"FootnoteTextChar",name:"Footnote Text Char",basedOn:"DefaultParagraphFont",link:"FootnoteText",semiHidden:!0,run:{size:20}},e))}}class eb extends Vt{constructor(e){super(ye({id:"EndnoteText",name:"endnote text",link:"EndnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:Nt.AUTO}},run:{size:20}},e))}}class tb extends Pt{constructor(e){super(ye({id:"EndnoteReference",name:"endnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}}class rb extends Pt{constructor(e){super(ye({id:"EndnoteTextChar",name:"Endnote Text Char",basedOn:"DefaultParagraphFont",link:"EndnoteText",semiHidden:!0,run:{size:20}},e))}}class nb extends Pt{constructor(e){super(ye({id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:ks.SINGLE}}},e))}}class on extends J{constructor(e){if(super("w:styles"),e.initialStyles&&this.root.push(e.initialStyles),e.importedStyles)for(const t of e.importedStyles)this.root.push(t);if(e.paragraphStyles)for(const t of e.paragraphStyles)this.root.push(new Vt(t));if(e.characterStyles)for(const t of e.characterStyles)this.root.push(new Pt(t))}}class Dh extends J{constructor(e){super("w:pPrDefault"),this.root.push(new gt(e))}}class Fh extends J{constructor(e){super("w:rPrDefault"),this.root.push(new mt(e))}}class Bh extends J{constructor(e){super("w:docDefaults"),ne(this,"runPropertiesDefaults"),ne(this,"paragraphPropertiesDefaults"),this.runPropertiesDefaults=new Fh(e.run),this.paragraphPropertiesDefaults=new Dh(e.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}}class ib{newInstance(e){const t=Kr.xml2js(e,{compact:!1});let n;for(const s of t.elements||[])s.name==="w:styles"&&(n=s);if(n===void 0)throw new Error("can not find styles element");const i=n.elements||[];return{initialStyles:new Ql(n.attributes),importedStyles:i.map(s=>qr(s))}}}class ha{newInstance(e={}){var t;return{initialStyles:new vr(["mc","r","w","w14","w15"],"w14 w15"),importedStyles:[new Bh((t=e.document)!=null?t:{}),new Wv(ye({run:{size:56}},e.title)),new zv(ye({run:{color:"2E74B5",size:32}},e.heading1)),new Gv(ye({run:{color:"2E74B5",size:26}},e.heading2)),new Kv(ye({run:{color:"1F4D78",size:24}},e.heading3)),new qv(ye({run:{color:"2E74B5",italics:!0}},e.heading4)),new Vv(ye({run:{color:"2E74B5"}},e.heading5)),new $v(ye({run:{color:"1F4D78"}},e.heading6)),new Xv(ye({run:{bold:!0}},e.strong)),new Yv(e.listParagraph||{}),new nb(e.hyperlink||{}),new Jv(e.footnoteReference||{}),new Zv(e.footnoteText||{}),new Qv(e.footnoteTextChar||{}),new tb(e.endnoteReference||{}),new eb(e.endnoteText||{}),new rb(e.endnoteTextChar||{})]}}}let Mh=class{constructor(e){ne(this,"currentRelationshipId",1),ne(this,"documentWrapper"),ne(this,"headers",[]),ne(this,"footers",[]),ne(this,"coreProperties"),ne(this,"numbering"),ne(this,"media"),ne(this,"fileRelationships"),ne(this,"footnotesWrapper"),ne(this,"endnotesWrapper"),ne(this,"settings"),ne(this,"contentTypes"),ne(this,"customProperties"),ne(this,"appProperties"),ne(this,"styles"),ne(this,"comments"),ne(this,"fontWrapper");var t,n,i,s,o,a,l,c,f,m,v,y,b;if(this.coreProperties=new My(Ne(ye({},e),{creator:(t=e.creator)!=null?t:"Un-named",revision:(n=e.revision)!=null?n:1,lastModifiedBy:(i=e.lastModifiedBy)!=null?i:"Un-named"})),this.numbering=new Oh(e.numbering?e.numbering:{config:[]}),this.comments=new cc((s=e.comments)!=null?s:{children:[]}),this.fileRelationships=new Et,this.customProperties=new Gy((o=e.customProperties)!=null?o:[]),this.appProperties=new Dy,this.footnotesWrapper=new gv,this.endnotesWrapper=new uv,this.contentTypes=new By,this.documentWrapper=new nv({background:e.background}),this.settings=new Mv({compatibilityModeVersion:e.compatabilityModeVersion,compatibility:e.compatibility,evenAndOddHeaders:!!e.evenAndOddHeaderAndFooters,trackRevisions:(a=e.features)==null?void 0:a.trackRevisions,updateFields:(l=e.features)==null?void 0:l.updateFields,defaultTabStop:e.defaultTabStop,hyphenation:{autoHyphenation:(c=e.hyphenation)==null?void 0:c.autoHyphenation,hyphenationZone:(f=e.hyphenation)==null?void 0:f.hyphenationZone,consecutiveHyphenLimit:(m=e.hyphenation)==null?void 0:m.consecutiveHyphenLimit,doNotHyphenateCaps:(v=e.hyphenation)==null?void 0:v.doNotHyphenateCaps}}),this.media=new oa,e.externalStyles!==void 0){const _=new ha().newInstance((y=e.styles)==null?void 0:y.default),T=new ib().newInstance(e.externalStyles);this.styles=new on(Ne(ye({},T),{importedStyles:[..._.importedStyles,...T.importedStyles]}))}else if(e.styles){const _=new ha().newInstance(e.styles.default);this.styles=new on(ye(ye({},_),e.styles))}else{const g=new ha;this.styles=new on(g.newInstance())}this.addDefaultRelationships();for(const g of e.sections)this.addSection(g);if(e.footnotes)for(const g in e.footnotes)this.footnotesWrapper.View.createFootNote(parseFloat(g),e.footnotes[g].children);if(e.endnotes)for(const g in e.endnotes)this.endnotesWrapper.View.createEndnote(parseFloat(g),e.endnotes[g].children);this.fontWrapper=new Sc((b=e.fonts)!=null?b:[])}addSection({headers:e={},footers:t={},children:n,properties:i}){this.documentWrapper.View.Body.addSection(Ne(ye({},i),{headerWrapperGroup:{default:e.default?this.createHeader(e.default):void 0,first:e.first?this.createHeader(e.first):void 0,even:e.even?this.createHeader(e.even):void 0},footerWrapperGroup:{default:t.default?this.createFooter(t.default):void 0,first:t.first?this.createFooter(t.first):void 0,even:t.even?this.createFooter(t.even):void 0}}));for(const s of n)this.documentWrapper.View.add(s)}createHeader(e){const t=new Rh(this.media,this.currentRelationshipId++);for(const n of e.options.children)t.add(n);return this.addHeaderToDocument(t),t}createFooter(e){const t=new xh(this.media,this.currentRelationshipId++);for(const n of e.options.children)t.add(n);return this.addFooterToDocument(t),t}addHeaderToDocument(e,t=Ot.DEFAULT){this.headers.push({header:e,type:t}),this.documentWrapper.Relationships.addRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",`header${this.headers.length}.xml`),this.contentTypes.addHeader(this.headers.length)}addFooterToDocument(e,t=Ot.DEFAULT){this.footers.push({footer:e,type:t}),this.documentWrapper.Relationships.addRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",`footer${this.footers.length}.xml`),this.contentTypes.addFooter(this.footers.length)}addDefaultRelationships(){this.fileRelationships.addRelationship(1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","word/document.xml"),this.fileRelationships.addRelationship(2,"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties","docProps/core.xml"),this.fileRelationships.addRelationship(3,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties","docProps/app.xml"),this.fileRelationships.addRelationship(4,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties","docProps/custom.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles","styles.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering","numbering.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes","footnotes.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes","endnotes.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings","settings.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments","comments.xml")}get Document(){return this.documentWrapper}get Styles(){return this.styles}get CoreProperties(){return this.coreProperties}get Numbering(){return this.numbering}get Media(){return this.media}get FileRelationships(){return this.fileRelationships}get Headers(){return this.headers.map(e=>e.header)}get Footers(){return this.footers.map(e=>e.footer)}get ContentTypes(){return this.contentTypes}get CustomProperties(){return this.customProperties}get AppProperties(){return this.appProperties}get FootNotes(){return this.footnotesWrapper}get Endnotes(){return this.endnotesWrapper}get Settings(){return this.settings}get Comments(){return this.comments}get FontTable(){return this.fontWrapper}};class sb extends J{constructor(e={}){super("w:instrText"),ne(this,"properties"),this.properties=e,this.root.push(new qe({space:ze.PRESERVE}));let t="TOC";if(this.properties.captionLabel&&(t=`${t} \\a "${this.properties.captionLabel}"`),this.properties.entriesFromBookmark&&(t=`${t} \\b "${this.properties.entriesFromBookmark}"`),this.properties.captionLabelIncludingNumbers&&(t=`${t} \\c "${this.properties.captionLabelIncludingNumbers}"`),this.properties.sequenceAndPageNumbersSeparator&&(t=`${t} \\d "${this.properties.sequenceAndPageNumbersSeparator}"`),this.properties.tcFieldIdentifier&&(t=`${t} \\f "${this.properties.tcFieldIdentifier}"`),this.properties.hyperlink&&(t=`${t} \\h`),this.properties.tcFieldLevelRange&&(t=`${t} \\l "${this.properties.tcFieldLevelRange}"`),this.properties.pageNumbersEntryLevelsRange&&(t=`${t} \\n "${this.properties.pageNumbersEntryLevelsRange}"`),this.properties.headingStyleRange&&(t=`${t} \\o "${this.properties.headingStyleRange}"`),this.properties.entryAndPageNumberSeparator&&(t=`${t} \\p "${this.properties.entryAndPageNumberSeparator}"`),this.properties.seqFieldIdentifierForPrefix&&(t=`${t} \\s "${this.properties.seqFieldIdentifierForPrefix}"`),this.properties.stylesWithLevels&&this.properties.stylesWithLevels.length){const n=this.properties.stylesWithLevels.map(i=>`${i.styleName},${i.level}`).join(",");t=`${t} \\t "${n}"`}this.properties.useAppliedParagraphOutlineLevel&&(t=`${t} \\u`),this.properties.preserveTabInEntries&&(t=`${t} \\w`),this.properties.preserveNewLineInEntries&&(t=`${t} \\x`),this.properties.hideTabAndPageNumbersInWebView&&(t=`${t} \\z`),this.root.push(t)}}class Hh extends J{constructor(){super("w:sdtContent")}}class Uh extends J{constructor(e){super("w:sdtPr"),e&&this.root.push(new dt("w:alias",e))}}class ab extends wr{constructor(e="Table of Contents",t={}){var n=t,{contentChildren:i=[],cachedEntries:s=[],beginDirty:o=!0}=n,a=Za(n,["contentChildren","cachedEntries","beginDirty"]);super("w:sdt"),this.root.push(new Uh(e));const l=new Hh,c=[new Be({children:[it(o),new sb(a),pt()]})],f=[new Be({children:[st()]})];if(s!==void 0&&s.length>0){const{stylesWithLevels:v}=a,y=s.map((g,_)=>{var d,T;const w=this.buildCachedContentParagraphChild(g,a),p=(T=(d=v==null?void 0:v.find(O=>O.level===g.level))==null?void 0:d.styleName)!=null?T:`TOC${g.level}`,E=_===0?[...c,w]:_===s.length-1?[w,...f]:[w];return new Ye({style:p,tabStops:this.getTabStopsForLevel(g.level),children:E})});let b=y;s.length<=1&&(b=[...y,new Ye({children:f})]);for(const g of b)l.addChildElement(g)}else{const v=new Ye({children:c});l.addChildElement(v);for(const b of i)l.addChildElement(b);const y=new Ye({children:f});l.addChildElement(y)}this.root.push(l)}getTabStopsForLevel(e,t=9025){return[{type:"clear",position:t+1-(e-1)*240},{type:"right",position:t,leader:"dot"}]}buildCachedContentRun(e,t){var n,i;return new Be({style:t!=null&&t.hyperlink&&e.href!==void 0?"IndexLink":void 0,children:[new or({text:e.title}),new fc,new or({text:(i=(n=e.page)==null?void 0:n.toString())!=null?i:""})]})}buildCachedContentParagraphChild(e,t){const n=this.buildCachedContentRun(e,t);return t!=null&&t.hyperlink&&e.href!==void 0?new vc({anchor:e.href,children:[n]}):n}}class ob{constructor(e,t){ne(this,"styleName"),ne(this,"level"),this.styleName=e,this.level=t}}class lb{constructor(e={children:[]}){ne(this,"options"),this.options=e}}class ub{constructor(e={children:[]}){ne(this,"options"),this.options=e}}class jh extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id"})}}class Wh extends J{constructor(e){super("w:footnoteReference"),this.root.push(new jh({id:e}))}}class cb extends Be{constructor(e){super({style:"FootnoteReference"}),this.root.push(new Wh(e))}}class zh extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{id:"w:id"})}}class Gh extends J{constructor(e){super("w:endnoteReference"),this.root.push(new zh({id:e}))}}class hb extends Be{constructor(e){super({style:"EndnoteReference"}),this.root.push(new Gh(e))}}class Kh extends we{constructor(){super(...arguments),ne(this,"xmlKeys",{val:"w14:val",symbolfont:"w14:font"})}}class ln extends J{constructor(e,t,n){super(e),n?this.root.push(new Kh({val:eu(t),symbolfont:n})):this.root.push(new Kh({val:t}))}}class qh extends J{constructor(e){var t,n,i,s,o,a,l,c;super("w14:checkbox"),ne(this,"DEFAULT_UNCHECKED_SYMBOL","2610"),ne(this,"DEFAULT_CHECKED_SYMBOL","2612"),ne(this,"DEFAULT_FONT","MS Gothic");const f=e!=null&&e.checked?"1":"0";let m,v;this.root.push(new ln("w14:checked",f)),m=(t=e==null?void 0:e.checkedState)!=null&&t.value?(n=e==null?void 0:e.checkedState)==null?void 0:n.value:this.DEFAULT_CHECKED_SYMBOL,v=(i=e==null?void 0:e.checkedState)!=null&&i.font?(s=e==null?void 0:e.checkedState)==null?void 0:s.font:this.DEFAULT_FONT,this.root.push(new ln("w14:checkedState",m,v)),m=(o=e==null?void 0:e.uncheckedState)!=null&&o.value?(a=e==null?void 0:e.uncheckedState)==null?void 0:a.value:this.DEFAULT_UNCHECKED_SYMBOL,v=(l=e==null?void 0:e.uncheckedState)!=null&&l.font?(c=e==null?void 0:e.uncheckedState)==null?void 0:c.font:this.DEFAULT_FONT,this.root.push(new ln("w14:uncheckedState",m,v))}}class fb extends J{constructor(e){var t,n,i,s;super("w:sdt"),ne(this,"DEFAULT_UNCHECKED_SYMBOL","2610"),ne(this,"DEFAULT_CHECKED_SYMBOL","2612"),ne(this,"DEFAULT_FONT","MS Gothic");const o=new Uh(e==null?void 0:e.alias);o.addChildElement(new qh(e)),this.root.push(o);const a=new Hh,l=(t=e==null?void 0:e.checkedState)==null?void 0:t.font,c=(n=e==null?void 0:e.checkedState)==null?void 0:n.value,f=(i=e==null?void 0:e.uncheckedState)==null?void 0:i.font,m=(s=e==null?void 0:e.uncheckedState)==null?void 0:s.value;let v,y;e!=null&&e.checked?(v=l||this.DEFAULT_FONT,y=c||this.DEFAULT_CHECKED_SYMBOL):(v=f||this.DEFAULT_FONT,y=m||this.DEFAULT_UNCHECKED_SYMBOL);const b=new mu({char:y,symbolfont:v});a.addChildElement(b),this.root.push(a)}}const db=({shape:r})=>new pe({name:"w:pict",children:[r]}),pb=({children:r=[]})=>new pe({name:"w:txbxContent",children:r}),mb=({style:r,children:e,inset:t})=>new pe({name:"v:textbox",attributes:{style:{key:"style",value:r},insetMode:{key:"insetmode",value:t?"custom":"auto"},inset:{key:"inset",value:t?`${t.left}, ${t.top}, ${t.right}, ${t.bottom}`:void 0}},children:[pb({children:e})]}),gb="#_x0000_t202",wb={flip:"flip",height:"height",left:"left",marginBottom:"margin-bottom",marginLeft:"margin-left",marginRight:"margin-right",marginTop:"margin-top",positionHorizontal:"mso-position-horizontal",positionHorizontalRelative:"mso-position-horizontal-relative",positionVertical:"mso-position-vertical",positionVerticalRelative:"mso-position-vertical-relative",wrapDistanceBottom:"mso-wrap-distance-bottom",wrapDistanceLeft:"mso-wrap-distance-left",wrapDistanceRight:"mso-wrap-distance-right",wrapDistanceTop:"mso-wrap-distance-top",wrapEdited:"mso-wrap-edited",wrapStyle:"mso-wrap-style",position:"position",rotation:"rotation",top:"top",visibility:"visibility",width:"width",zIndex:"z-index"},yb=r=>r?Object.entries(r).map(([e,t])=>`${wb[e]}:${t}`).join(";"):void 0,vb=({id:r,children:e,type:t=gb,style:n})=>new pe({name:"v:shape",attributes:{id:{key:"id",value:r},type:{key:"type",value:t},style:{key:"style",value:yb(n)}},children:[mb({style:"mso-fit-shape-to-text:t;",children:e})]});class bb extends wr{constructor(e){var t=e,{style:n,children:i}=t,s=Za(t,["style","children"]);super("w:p"),this.root.push(new gt(s)),this.root.push(db({shape:vb({children:i,id:fr(),style:n})}))}}var _b=ls();function un(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var fa={exports:{}},Vh;function Tb(){return Vh||(Vh=1,(function(r,e){(function(t){r.exports=t()})(function(){return(function t(n,i,s){function o(c,f){if(!i[c]){if(!n[c]){var m=typeof un=="function"&&un;if(!f&&m)return m(c,!0);if(a)return a(c,!0);var v=new Error("Cannot find module '"+c+"'");throw v.code="MODULE_NOT_FOUND",v}var y=i[c]={exports:{}};n[c][0].call(y.exports,function(b){var g=n[c][1][b];return o(g||b)},y,y.exports,t,n,i,s)}return i[c].exports}for(var a=typeof un=="function"&&un,l=0;l<s.length;l++)o(s[l]);return o})({1:[function(t,n,i){var s=t("./utils"),o=t("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(l){for(var c,f,m,v,y,b,g,_=[],d=0,T=l.length,w=T,p=s.getTypeOf(l)!=="string";d<l.length;)w=T-d,m=p?(c=l[d++],f=d<T?l[d++]:0,d<T?l[d++]:0):(c=l.charCodeAt(d++),f=d<T?l.charCodeAt(d++):0,d<T?l.charCodeAt(d++):0),v=c>>2,y=(3&c)<<4|f>>4,b=1<w?(15&f)<<2|m>>6:64,g=2<w?63&m:64,_.push(a.charAt(v)+a.charAt(y)+a.charAt(b)+a.charAt(g));return _.join("")},i.decode=function(l){var c,f,m,v,y,b,g=0,_=0,d="data:";if(l.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");var T,w=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&w--,l.charAt(l.length-2)===a.charAt(64)&&w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(T=o.uint8array?new Uint8Array(0|w):new Array(0|w);g<l.length;)c=a.indexOf(l.charAt(g++))<<2|(v=a.indexOf(l.charAt(g++)))>>4,f=(15&v)<<4|(y=a.indexOf(l.charAt(g++)))>>2,m=(3&y)<<6|(b=a.indexOf(l.charAt(g++))),T[_++]=c,y!==64&&(T[_++]=f),b!==64&&(T[_++]=m);return T}},{"./support":30,"./utils":32}],2:[function(t,n,i){var s=t("./external"),o=t("./stream/DataWorker"),a=t("./stream/Crc32Probe"),l=t("./stream/DataLengthProbe");function c(f,m,v,y,b){this.compressedSize=f,this.uncompressedSize=m,this.crc32=v,this.compression=y,this.compressedContent=b}c.prototype={getContentWorker:function(){var f=new o(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),m=this;return f.on("end",function(){if(this.streamInfo.data_length!==m.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),f},getCompressedWorker:function(){return new o(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(f,m,v){return f.pipe(new a).pipe(new l("uncompressedSize")).pipe(m.compressWorker(v)).pipe(new l("compressedSize")).withStreamInfo("compression",m)},n.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,n,i){var s=t("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},i.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,n,i){var s=t("./utils"),o=(function(){for(var a,l=[],c=0;c<256;c++){a=c;for(var f=0;f<8;f++)a=1&a?3988292384^a>>>1:a>>>1;l[c]=a}return l})();n.exports=function(a,l){return a!==void 0&&a.length?s.getTypeOf(a)!=="string"?(function(c,f,m,v){var y=o,b=v+m;c^=-1;for(var g=v;g<b;g++)c=c>>>8^y[255&(c^f[g])];return-1^c})(0|l,a,a.length,0):(function(c,f,m,v){var y=o,b=v+m;c^=-1;for(var g=v;g<b;g++)c=c>>>8^y[255&(c^f.charCodeAt(g))];return-1^c})(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(t,n,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(t,n,i){var s=null;s=typeof Promise<"u"?Promise:t("lie"),n.exports={Promise:s}},{lie:37}],7:[function(t,n,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=t("pako"),a=t("./utils"),l=t("./stream/GenericWorker"),c=s?"uint8array":"array";function f(m,v){l.call(this,"FlateWorker/"+m),this._pako=null,this._pakoAction=m,this._pakoOptions=v,this.meta={}}i.magic="\b\0",a.inherits(f,l),f.prototype.processChunk=function(m){this.meta=m.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(c,m.data),!1)},f.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var m=this;this._pako.onData=function(v){m.push({data:v,meta:m.meta})}},i.compressWorker=function(m){return new f("Deflate",m)},i.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,n,i){function s(y,b){var g,_="";for(g=0;g<b;g++)_+=String.fromCharCode(255&y),y>>>=8;return _}function o(y,b,g,_,d,T){var w,p,E=y.file,O=y.compression,P=T!==c.utf8encode,B=a.transformTo("string",T(E.name)),I=a.transformTo("string",c.utf8encode(E.name)),K=E.comment,oe=a.transformTo("string",T(K)),N=a.transformTo("string",c.utf8encode(K)),U=I.length!==E.name.length,x=N.length!==K.length,X="",re="",z="",se=E.dir,Q=E.date,me={crc32:0,compressedSize:0,uncompressedSize:0};b&&!g||(me.crc32=y.crc32,me.compressedSize=y.compressedSize,me.uncompressedSize=y.uncompressedSize);var Y=0;b&&(Y|=8),P||!U&&!x||(Y|=2048);var L=0,V=0;se&&(L|=16),d==="UNIX"?(V=798,L|=(function(ie,$){var C=ie;return ie||(C=$?16893:33204),(65535&C)<<16})(E.unixPermissions,se)):(V=20,L|=(function(ie){return 63&(ie||0)})(E.dosPermissions)),w=Q.getUTCHours(),w<<=6,w|=Q.getUTCMinutes(),w<<=5,w|=Q.getUTCSeconds()/2,p=Q.getUTCFullYear()-1980,p<<=4,p|=Q.getUTCMonth()+1,p<<=5,p|=Q.getUTCDate(),U&&(re=s(1,1)+s(f(B),4)+I,X+="up"+s(re.length,2)+re),x&&(z=s(1,1)+s(f(oe),4)+N,X+="uc"+s(z.length,2)+z);var Z="";return Z+=`
|
|
131
|
+
\0`,Z+=s(Y,2),Z+=O.magic,Z+=s(w,2),Z+=s(p,2),Z+=s(me.crc32,4),Z+=s(me.compressedSize,4),Z+=s(me.uncompressedSize,4),Z+=s(B.length,2),Z+=s(X.length,2),{fileRecord:m.LOCAL_FILE_HEADER+Z+B+X,dirRecord:m.CENTRAL_FILE_HEADER+s(V,2)+Z+s(oe.length,2)+"\0\0\0\0"+s(L,4)+s(_,4)+B+X+oe}}var a=t("../utils"),l=t("../stream/GenericWorker"),c=t("../utf8"),f=t("../crc32"),m=t("../signature");function v(y,b,g,_){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=b,this.zipPlatform=g,this.encodeFileName=_,this.streamFiles=y,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(v,l),v.prototype.push=function(y){var b=y.meta.percent||0,g=this.entriesCount,_=this._sources.length;this.accumulate?this.contentBuffer.push(y):(this.bytesWritten+=y.data.length,l.prototype.push.call(this,{data:y.data,meta:{currentFile:this.currentFile,percent:g?(b+100*(g-_-1))/g:100}}))},v.prototype.openedSource=function(y){this.currentSourceOffset=this.bytesWritten,this.currentFile=y.file.name;var b=this.streamFiles&&!y.file.dir;if(b){var g=o(y,b,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},v.prototype.closedSource=function(y){this.accumulate=!1;var b=this.streamFiles&&!y.file.dir,g=o(y,b,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),b)this.push({data:(function(_){return m.DATA_DESCRIPTOR+s(_.crc32,4)+s(_.compressedSize,4)+s(_.uncompressedSize,4)})(y),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},v.prototype.flush=function(){for(var y=this.bytesWritten,b=0;b<this.dirRecords.length;b++)this.push({data:this.dirRecords[b],meta:{percent:100}});var g=this.bytesWritten-y,_=(function(d,T,w,p,E){var O=a.transformTo("string",E(p));return m.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(d,2)+s(d,2)+s(T,4)+s(w,4)+s(O.length,2)+O})(this.dirRecords.length,g,y,this.zipComment,this.encodeFileName);this.push({data:_,meta:{percent:100}})},v.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},v.prototype.registerPrevious=function(y){this._sources.push(y);var b=this;return y.on("data",function(g){b.processChunk(g)}),y.on("end",function(){b.closedSource(b.previous.streamInfo),b._sources.length?b.prepareNextSource():b.end()}),y.on("error",function(g){b.error(g)}),this},v.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},v.prototype.error=function(y){var b=this._sources;if(!l.prototype.error.call(this,y))return!1;for(var g=0;g<b.length;g++)try{b[g].error(y)}catch{}return!0},v.prototype.lock=function(){l.prototype.lock.call(this);for(var y=this._sources,b=0;b<y.length;b++)y[b].lock()},n.exports=v},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,n,i){var s=t("../compressions"),o=t("./ZipFileWorker");i.generateWorker=function(a,l,c){var f=new o(l.streamFiles,c,l.platform,l.encodeFileName),m=0;try{a.forEach(function(v,y){m++;var b=(function(T,w){var p=T||w,E=s[p];if(!E)throw new Error(p+" is not a valid compression method !");return E})(y.options.compression,l.compression),g=y.options.compressionOptions||l.compressionOptions||{},_=y.dir,d=y.date;y._compressWorker(b,g).withStreamInfo("file",{name:v,dir:_,date:d,comment:y.comment||"",unixPermissions:y.unixPermissions,dosPermissions:y.dosPermissions}).pipe(f)}),f.entriesCount=m}catch(v){f.error(v)}return f}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,n,i){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new s;for(var a in this)typeof this[a]!="function"&&(o[a]=this[a]);return o}}(s.prototype=t("./object")).loadAsync=t("./load"),s.support=t("./support"),s.defaults=t("./defaults"),s.version="3.10.1",s.loadAsync=function(o,a){return new s().loadAsync(o,a)},s.external=t("./external"),n.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,n,i){var s=t("./utils"),o=t("./external"),a=t("./utf8"),l=t("./zipEntries"),c=t("./stream/Crc32Probe"),f=t("./nodejsUtils");function m(v){return new o.Promise(function(y,b){var g=v.decompressed.getContentWorker().pipe(new c);g.on("error",function(_){b(_)}).on("end",function(){g.streamInfo.crc32!==v.decompressed.crc32?b(new Error("Corrupted zip : CRC32 mismatch")):y()}).resume()})}n.exports=function(v,y){var b=this;return y=s.extend(y||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),f.isNode&&f.isStream(v)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):s.prepareContent("the loaded zip file",v,!0,y.optimizedBinaryString,y.base64).then(function(g){var _=new l(y);return _.load(g),_}).then(function(g){var _=[o.Promise.resolve(g)],d=g.files;if(y.checkCRC32)for(var T=0;T<d.length;T++)_.push(m(d[T]));return o.Promise.all(_)}).then(function(g){for(var _=g.shift(),d=_.files,T=0;T<d.length;T++){var w=d[T],p=w.fileNameStr,E=s.resolve(w.fileNameStr);b.file(E,w.decompressed,{binary:!0,optimizedBinaryString:!0,date:w.date,dir:w.dir,comment:w.fileCommentStr.length?w.fileCommentStr:null,unixPermissions:w.unixPermissions,dosPermissions:w.dosPermissions,createFolders:y.createFolders}),w.dir||(b.file(E).unsafeOriginalName=p)}return _.zipComment.length&&(b.comment=_.zipComment),b})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,n,i){var s=t("../utils"),o=t("../stream/GenericWorker");function a(l,c){o.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}s.inherits(a,o),a.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(f){c.push({data:f,meta:{percent:0}})}).on("error",function(f){c.isPaused?this.generatedError=f:c.error(f)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},a.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,n,i){var s=t("readable-stream").Readable;function o(a,l,c){s.call(this,l),this._helper=a;var f=this;a.on("data",function(m,v){f.push(m)||f._helper.pause(),c&&c(v)}).on("error",function(m){f.emit("error",m)}).on("end",function(){f.push(null)})}t("../utils").inherits(o,s),o.prototype._read=function(){this._helper.resume()},n.exports=o},{"../utils":32,"readable-stream":16}],14:[function(t,n,i){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(s,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(s,o);if(typeof s=="number")throw new Error('The "data" argument must not be a number');return new Buffer(s,o)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var o=new Buffer(s);return o.fill(0),o},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s&&typeof s.on=="function"&&typeof s.pause=="function"&&typeof s.resume=="function"}}},{}],15:[function(t,n,i){function s(E,O,P){var B,I=a.getTypeOf(O),K=a.extend(P||{},f);K.date=K.date||new Date,K.compression!==null&&(K.compression=K.compression.toUpperCase()),typeof K.unixPermissions=="string"&&(K.unixPermissions=parseInt(K.unixPermissions,8)),K.unixPermissions&&16384&K.unixPermissions&&(K.dir=!0),K.dosPermissions&&16&K.dosPermissions&&(K.dir=!0),K.dir&&(E=d(E)),K.createFolders&&(B=_(E))&&T.call(this,B,!0);var oe=I==="string"&&K.binary===!1&&K.base64===!1;P&&P.binary!==void 0||(K.binary=!oe),(O instanceof m&&O.uncompressedSize===0||K.dir||!O||O.length===0)&&(K.base64=!1,K.binary=!0,O="",K.compression="STORE",I="string");var N=null;N=O instanceof m||O instanceof l?O:b.isNode&&b.isStream(O)?new g(E,O):a.prepareContent(E,O,K.binary,K.optimizedBinaryString,K.base64);var U=new v(E,N,K);this.files[E]=U}var o=t("./utf8"),a=t("./utils"),l=t("./stream/GenericWorker"),c=t("./stream/StreamHelper"),f=t("./defaults"),m=t("./compressedObject"),v=t("./zipObject"),y=t("./generate"),b=t("./nodejsUtils"),g=t("./nodejs/NodejsStreamInputAdapter"),_=function(E){E.slice(-1)==="/"&&(E=E.substring(0,E.length-1));var O=E.lastIndexOf("/");return 0<O?E.substring(0,O):""},d=function(E){return E.slice(-1)!=="/"&&(E+="/"),E},T=function(E,O){return O=O!==void 0?O:f.createFolders,E=d(E),this.files[E]||s.call(this,E,null,{dir:!0,createFolders:O}),this.files[E]};function w(E){return Object.prototype.toString.call(E)==="[object RegExp]"}var p={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(E){var O,P,B;for(O in this.files)B=this.files[O],(P=O.slice(this.root.length,O.length))&&O.slice(0,this.root.length)===this.root&&E(P,B)},filter:function(E){var O=[];return this.forEach(function(P,B){E(P,B)&&O.push(B)}),O},file:function(E,O,P){if(arguments.length!==1)return E=this.root+E,s.call(this,E,O,P),this;if(w(E)){var B=E;return this.filter(function(K,oe){return!oe.dir&&B.test(K)})}var I=this.files[this.root+E];return I&&!I.dir?I:null},folder:function(E){if(!E)return this;if(w(E))return this.filter(function(I,K){return K.dir&&E.test(I)});var O=this.root+E,P=T.call(this,O),B=this.clone();return B.root=P.name,B},remove:function(E){E=this.root+E;var O=this.files[E];if(O||(E.slice(-1)!=="/"&&(E+="/"),O=this.files[E]),O&&!O.dir)delete this.files[E];else for(var P=this.filter(function(I,K){return K.name.slice(0,E.length)===E}),B=0;B<P.length;B++)delete this.files[P[B].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(E){var O,P={};try{if((P=a.extend(E||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=P.type.toLowerCase(),P.compression=P.compression.toUpperCase(),P.type==="binarystring"&&(P.type="string"),!P.type)throw new Error("No output type specified.");a.checkSupport(P.type),P.platform!=="darwin"&&P.platform!=="freebsd"&&P.platform!=="linux"&&P.platform!=="sunos"||(P.platform="UNIX"),P.platform==="win32"&&(P.platform="DOS");var B=P.comment||this.comment||"";O=y.generateWorker(this,P,B)}catch(I){(O=new l("error")).error(I)}return new c(O,P.type||"string",P.mimeType)},generateAsync:function(E,O){return this.generateInternalStream(E).accumulate(O)},generateNodeStream:function(E,O){return(E=E||{}).type||(E.type="nodebuffer"),this.generateInternalStream(E).toNodejsStream(O)}};n.exports=p},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,n,i){n.exports=t("stream")},{stream:void 0}],17:[function(t,n,i){var s=t("./DataReader");function o(a){s.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}t("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data[this.zero+a]},o.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),c=a.charCodeAt(1),f=a.charCodeAt(2),m=a.charCodeAt(3),v=this.length-4;0<=v;--v)if(this.data[v]===l&&this.data[v+1]===c&&this.data[v+2]===f&&this.data[v+3]===m)return v-this.zero;return-1},o.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),c=a.charCodeAt(1),f=a.charCodeAt(2),m=a.charCodeAt(3),v=this.readData(4);return l===v[0]&&c===v[1]&&f===v[2]&&m===v[3]},o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./DataReader":18}],18:[function(t,n,i){var s=t("../utils");function o(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,c=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=a,c},readString:function(a){return s.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=o},{"../utils":32}],19:[function(t,n,i){var s=t("./Uint8ArrayReader");function o(a){s.call(this,a)}t("../utils").inherits(o,s),o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,n,i){var s=t("./DataReader");function o(a){s.call(this,a)}t("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./DataReader":18}],21:[function(t,n,i){var s=t("./ArrayReader");function o(a){s.call(this,a)}t("../utils").inherits(o,s),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(t,n,i){var s=t("../utils"),o=t("../support"),a=t("./ArrayReader"),l=t("./StringReader"),c=t("./NodeBufferReader"),f=t("./Uint8ArrayReader");n.exports=function(m){var v=s.getTypeOf(m);return s.checkSupport(v),v!=="string"||o.uint8array?v==="nodebuffer"?new c(m):o.uint8array?new f(s.transformTo("uint8array",m)):new a(s.transformTo("array",m)):new l(m)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,n,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,n,i){var s=t("./GenericWorker"),o=t("../utils");function a(l){s.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(a,s),a.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(t,n,i){var s=t("./GenericWorker"),o=t("../crc32");function a(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(a,s),a.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,n,i){var s=t("../utils"),o=t("./GenericWorker");function a(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}s.inherits(a,o),a.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}o.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(t,n,i){var s=t("../utils"),o=t("./GenericWorker");function a(l){o.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(f){c.dataIsReady=!0,c.data=f,c.max=f&&f.length||0,c.type=s.getTypeOf(f),c.isPaused||c._tickAndRepeat()},function(f){c.error(f)})}s.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(t,n,i){function s(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var l=0;l<this._listeners[o].length;l++)this._listeners[o][l].call(this,a)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var a=this;return o.on("data",function(l){a.processChunk(l)}),o.on("end",function(){a.end()}),o.on("error",function(l){a.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,a){return this.extraStreamInfo[o]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},n.exports=s},{}],29:[function(t,n,i){var s=t("../utils"),o=t("./ConvertWorker"),a=t("./GenericWorker"),l=t("../base64"),c=t("../support"),f=t("../external"),m=null;if(c.nodestream)try{m=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function v(b,g){return new f.Promise(function(_,d){var T=[],w=b._internalType,p=b._outputType,E=b._mimeType;b.on("data",function(O,P){T.push(O),g&&g(P)}).on("error",function(O){T=[],d(O)}).on("end",function(){try{var O=(function(P,B,I){switch(P){case"blob":return s.newBlob(s.transformTo("arraybuffer",B),I);case"base64":return l.encode(B);default:return s.transformTo(P,B)}})(p,(function(P,B){var I,K=0,oe=null,N=0;for(I=0;I<B.length;I++)N+=B[I].length;switch(P){case"string":return B.join("");case"array":return Array.prototype.concat.apply([],B);case"uint8array":for(oe=new Uint8Array(N),I=0;I<B.length;I++)oe.set(B[I],K),K+=B[I].length;return oe;case"nodebuffer":return Buffer.concat(B);default:throw new Error("concat : unsupported type '"+P+"'")}})(w,T),E);_(O)}catch(P){d(P)}T=[]}).resume()})}function y(b,g,_){var d=g;switch(g){case"blob":case"arraybuffer":d="uint8array";break;case"base64":d="string"}try{this._internalType=d,this._outputType=g,this._mimeType=_,s.checkSupport(d),this._worker=b.pipe(new o(d)),b.lock()}catch(T){this._worker=new a("error"),this._worker.error(T)}}y.prototype={accumulate:function(b){return v(this,b)},on:function(b,g){var _=this;return b==="data"?this._worker.on(b,function(d){g.call(_,d.data,d.meta)}):this._worker.on(b,function(){s.delay(g,arguments,_)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(b){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new m(this,{objectMode:this._outputType!=="nodebuffer"},b)}},n.exports=y},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,n,i){if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",i.nodebuffer=typeof Buffer<"u",i.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")i.blob=!1;else{var s=new ArrayBuffer(0);try{i.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(s),i.blob=o.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!t("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(t,n,i){for(var s=t("./utils"),o=t("./support"),a=t("./nodejsUtils"),l=t("./stream/GenericWorker"),c=new Array(256),f=0;f<256;f++)c[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;c[254]=c[254]=1;function m(){l.call(this,"utf-8 decode"),this.leftOver=null}function v(){l.call(this,"utf-8 encode")}i.utf8encode=function(y){return o.nodebuffer?a.newBufferFrom(y,"utf-8"):(function(b){var g,_,d,T,w,p=b.length,E=0;for(T=0;T<p;T++)(64512&(_=b.charCodeAt(T)))==55296&&T+1<p&&(64512&(d=b.charCodeAt(T+1)))==56320&&(_=65536+(_-55296<<10)+(d-56320),T++),E+=_<128?1:_<2048?2:_<65536?3:4;for(g=o.uint8array?new Uint8Array(E):new Array(E),T=w=0;w<E;T++)(64512&(_=b.charCodeAt(T)))==55296&&T+1<p&&(64512&(d=b.charCodeAt(T+1)))==56320&&(_=65536+(_-55296<<10)+(d-56320),T++),_<128?g[w++]=_:(_<2048?g[w++]=192|_>>>6:(_<65536?g[w++]=224|_>>>12:(g[w++]=240|_>>>18,g[w++]=128|_>>>12&63),g[w++]=128|_>>>6&63),g[w++]=128|63&_);return g})(y)},i.utf8decode=function(y){return o.nodebuffer?s.transformTo("nodebuffer",y).toString("utf-8"):(function(b){var g,_,d,T,w=b.length,p=new Array(2*w);for(g=_=0;g<w;)if((d=b[g++])<128)p[_++]=d;else if(4<(T=c[d]))p[_++]=65533,g+=T-1;else{for(d&=T===2?31:T===3?15:7;1<T&&g<w;)d=d<<6|63&b[g++],T--;1<T?p[_++]=65533:d<65536?p[_++]=d:(d-=65536,p[_++]=55296|d>>10&1023,p[_++]=56320|1023&d)}return p.length!==_&&(p.subarray?p=p.subarray(0,_):p.length=_),s.applyFromCharCode(p)})(y=s.transformTo(o.uint8array?"uint8array":"array",y))},s.inherits(m,l),m.prototype.processChunk=function(y){var b=s.transformTo(o.uint8array?"uint8array":"array",y.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var g=b;(b=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),b.set(g,this.leftOver.length)}else b=this.leftOver.concat(b);this.leftOver=null}var _=(function(T,w){var p;for((w=w||T.length)>T.length&&(w=T.length),p=w-1;0<=p&&(192&T[p])==128;)p--;return p<0||p===0?w:p+c[T[p]]>w?p:w})(b),d=b;_!==b.length&&(o.uint8array?(d=b.subarray(0,_),this.leftOver=b.subarray(_,b.length)):(d=b.slice(0,_),this.leftOver=b.slice(_,b.length))),this.push({data:i.utf8decode(d),meta:y.meta})},m.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=m,s.inherits(v,l),v.prototype.processChunk=function(y){this.push({data:i.utf8encode(y.data),meta:y.meta})},i.Utf8EncodeWorker=v},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,n,i){var s=t("./support"),o=t("./base64"),a=t("./nodejsUtils"),l=t("./external");function c(g){return g}function f(g,_){for(var d=0;d<g.length;++d)_[d]=255&g.charCodeAt(d);return _}t("setimmediate"),i.newBlob=function(g,_){i.checkSupport("blob");try{return new Blob([g],{type:_})}catch{try{var d=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return d.append(g),d.getBlob(_)}catch{throw new Error("Bug : can't construct the Blob.")}}};var m={stringifyByChunk:function(g,_,d){var T=[],w=0,p=g.length;if(p<=d)return String.fromCharCode.apply(null,g);for(;w<p;)_==="array"||_==="nodebuffer"?T.push(String.fromCharCode.apply(null,g.slice(w,Math.min(w+d,p)))):T.push(String.fromCharCode.apply(null,g.subarray(w,Math.min(w+d,p)))),w+=d;return T.join("")},stringifyByChar:function(g){for(var _="",d=0;d<g.length;d++)_+=String.fromCharCode(g[d]);return _},applyCanBeUsed:{uint8array:(function(){try{return s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}})()}};function v(g){var _=65536,d=i.getTypeOf(g),T=!0;if(d==="uint8array"?T=m.applyCanBeUsed.uint8array:d==="nodebuffer"&&(T=m.applyCanBeUsed.nodebuffer),T)for(;1<_;)try{return m.stringifyByChunk(g,d,_)}catch{_=Math.floor(_/2)}return m.stringifyByChar(g)}function y(g,_){for(var d=0;d<g.length;d++)_[d]=g[d];return _}i.applyFromCharCode=v;var b={};b.string={string:c,array:function(g){return f(g,new Array(g.length))},arraybuffer:function(g){return b.string.uint8array(g).buffer},uint8array:function(g){return f(g,new Uint8Array(g.length))},nodebuffer:function(g){return f(g,a.allocBuffer(g.length))}},b.array={string:v,array:c,arraybuffer:function(g){return new Uint8Array(g).buffer},uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return a.newBufferFrom(g)}},b.arraybuffer={string:function(g){return v(new Uint8Array(g))},array:function(g){return y(new Uint8Array(g),new Array(g.byteLength))},arraybuffer:c,uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return a.newBufferFrom(new Uint8Array(g))}},b.uint8array={string:v,array:function(g){return y(g,new Array(g.length))},arraybuffer:function(g){return g.buffer},uint8array:c,nodebuffer:function(g){return a.newBufferFrom(g)}},b.nodebuffer={string:v,array:function(g){return y(g,new Array(g.length))},arraybuffer:function(g){return b.nodebuffer.uint8array(g).buffer},uint8array:function(g){return y(g,new Uint8Array(g.length))},nodebuffer:c},i.transformTo=function(g,_){if(_=_||"",!g)return _;i.checkSupport(g);var d=i.getTypeOf(_);return b[d][g](_)},i.resolve=function(g){for(var _=g.split("/"),d=[],T=0;T<_.length;T++){var w=_[T];w==="."||w===""&&T!==0&&T!==_.length-1||(w===".."?d.pop():d.push(w))}return d.join("/")},i.getTypeOf=function(g){return typeof g=="string"?"string":Object.prototype.toString.call(g)==="[object Array]"?"array":s.nodebuffer&&a.isBuffer(g)?"nodebuffer":s.uint8array&&g instanceof Uint8Array?"uint8array":s.arraybuffer&&g instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(g){if(!s[g.toLowerCase()])throw new Error(g+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(g){var _,d,T="";for(d=0;d<(g||"").length;d++)T+="\\x"+((_=g.charCodeAt(d))<16?"0":"")+_.toString(16).toUpperCase();return T},i.delay=function(g,_,d){setImmediate(function(){g.apply(d||null,_||[])})},i.inherits=function(g,_){function d(){}d.prototype=_.prototype,g.prototype=new d},i.extend=function(){var g,_,d={};for(g=0;g<arguments.length;g++)for(_ in arguments[g])Object.prototype.hasOwnProperty.call(arguments[g],_)&&d[_]===void 0&&(d[_]=arguments[g][_]);return d},i.prepareContent=function(g,_,d,T,w){return l.Promise.resolve(_).then(function(p){return s.blob&&(p instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(p))!==-1)&&typeof FileReader<"u"?new l.Promise(function(E,O){var P=new FileReader;P.onload=function(B){E(B.target.result)},P.onerror=function(B){O(B.target.error)},P.readAsArrayBuffer(p)}):p}).then(function(p){var E=i.getTypeOf(p);return E?(E==="arraybuffer"?p=i.transformTo("uint8array",p):E==="string"&&(w?p=o.decode(p):d&&T!==!0&&(p=(function(O){return f(O,s.uint8array?new Uint8Array(O.length):new Array(O.length))})(p))),p):l.Promise.reject(new Error("Can't read the data of '"+g+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,n,i){var s=t("./reader/readerFor"),o=t("./utils"),a=t("./signature"),l=t("./zipEntry"),c=t("./support");function f(m){this.files=[],this.loadOptions=m}f.prototype={checkSignature:function(m){if(!this.reader.readAndCheckSignature(m)){this.reader.index-=4;var v=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(v)+", expected "+o.pretty(m)+")")}},isSignature:function(m,v){var y=this.reader.index;this.reader.setIndex(m);var b=this.reader.readString(4)===v;return this.reader.setIndex(y),b},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var m=this.reader.readData(this.zipCommentLength),v=c.uint8array?"uint8array":"array",y=o.transformTo(v,m);this.zipComment=this.loadOptions.decodeFileName(y)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var m,v,y,b=this.zip64EndOfCentralSize-44;0<b;)m=this.reader.readInt(2),v=this.reader.readInt(4),y=this.reader.readData(v),this.zip64ExtensibleData[m]={id:m,length:v,value:y}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var m,v;for(m=0;m<this.files.length;m++)v=this.files[m],this.reader.setIndex(v.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),v.readLocalPart(this.reader),v.handleUTF8(),v.processAttributes()},readCentralDir:function(){var m;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(m=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(m);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var m=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(m<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(m);var v=m;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(m=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(m),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var y=this.centralDirOffset+this.centralDirSize;this.zip64&&(y+=20,y+=12+this.zip64EndOfCentralSize);var b=v-y;if(0<b)this.isSignature(v,a.CENTRAL_FILE_HEADER)||(this.reader.zero=b);else if(b<0)throw new Error("Corrupted zip: missing "+Math.abs(b)+" bytes.")},prepareReader:function(m){this.reader=s(m)},load:function(m){this.prepareReader(m),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=f},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,n,i){var s=t("./reader/readerFor"),o=t("./utils"),a=t("./compressedObject"),l=t("./crc32"),c=t("./utf8"),f=t("./compressions"),m=t("./support");function v(y,b){this.options=y,this.loadOptions=b}v.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(y){var b,g;if(y.skip(22),this.fileNameLength=y.readInt(2),g=y.readInt(2),this.fileName=y.readData(this.fileNameLength),y.skip(g),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((b=(function(_){for(var d in f)if(Object.prototype.hasOwnProperty.call(f,d)&&f[d].magic===_)return f[d];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,b,y.readData(this.compressedSize))},readCentralPart:function(y){this.versionMadeBy=y.readInt(2),y.skip(2),this.bitFlag=y.readInt(2),this.compressionMethod=y.readString(2),this.date=y.readDate(),this.crc32=y.readInt(4),this.compressedSize=y.readInt(4),this.uncompressedSize=y.readInt(4);var b=y.readInt(2);if(this.extraFieldsLength=y.readInt(2),this.fileCommentLength=y.readInt(2),this.diskNumberStart=y.readInt(2),this.internalFileAttributes=y.readInt(2),this.externalFileAttributes=y.readInt(4),this.localHeaderOffset=y.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");y.skip(b),this.readExtraFields(y),this.parseZIP64ExtraField(y),this.fileComment=y.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var y=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),y==0&&(this.dosPermissions=63&this.externalFileAttributes),y==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var y=s(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=y.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=y.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=y.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=y.readInt(4))}},readExtraFields:function(y){var b,g,_,d=y.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});y.index+4<d;)b=y.readInt(2),g=y.readInt(2),_=y.readData(g),this.extraFields[b]={id:b,length:g,value:_};y.setIndex(d)},handleUTF8:function(){var y=m.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var b=this.findExtraFieldUnicodePath();if(b!==null)this.fileNameStr=b;else{var g=o.transformTo(y,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(g)}var _=this.findExtraFieldUnicodeComment();if(_!==null)this.fileCommentStr=_;else{var d=o.transformTo(y,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(d)}}},findExtraFieldUnicodePath:function(){var y=this.extraFields[28789];if(y){var b=s(y.value);return b.readInt(1)!==1||l(this.fileName)!==b.readInt(4)?null:c.utf8decode(b.readData(y.length-5))}return null},findExtraFieldUnicodeComment:function(){var y=this.extraFields[25461];if(y){var b=s(y.value);return b.readInt(1)!==1||l(this.fileComment)!==b.readInt(4)?null:c.utf8decode(b.readData(y.length-5))}return null}},n.exports=v},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,n,i){function s(b,g,_){this.name=b,this.dir=_.dir,this.date=_.date,this.comment=_.comment,this.unixPermissions=_.unixPermissions,this.dosPermissions=_.dosPermissions,this._data=g,this._dataBinary=_.binary,this.options={compression:_.compression,compressionOptions:_.compressionOptions}}var o=t("./stream/StreamHelper"),a=t("./stream/DataWorker"),l=t("./utf8"),c=t("./compressedObject"),f=t("./stream/GenericWorker");s.prototype={internalStream:function(b){var g=null,_="string";try{if(!b)throw new Error("No output type specified.");var d=(_=b.toLowerCase())==="string"||_==="text";_!=="binarystring"&&_!=="text"||(_="string"),g=this._decompressWorker();var T=!this._dataBinary;T&&!d&&(g=g.pipe(new l.Utf8EncodeWorker)),!T&&d&&(g=g.pipe(new l.Utf8DecodeWorker))}catch(w){(g=new f("error")).error(w)}return new o(g,_,"")},async:function(b,g){return this.internalStream(b).accumulate(g)},nodeStream:function(b,g){return this.internalStream(b||"nodebuffer").toNodejsStream(g)},_compressWorker:function(b,g){if(this._data instanceof c&&this._data.compression.magic===b.magic)return this._data.getCompressedWorker();var _=this._decompressWorker();return this._dataBinary||(_=_.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(_,b,g)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof f?this._data:new a(this._data)}};for(var m=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],v=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},y=0;y<m.length;y++)s.prototype[m[y]]=v;n.exports=s},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,n,i){(function(s){var o,a,l=s.MutationObserver||s.WebKitMutationObserver;if(l){var c=0,f=new l(b),m=s.document.createTextNode("");f.observe(m,{characterData:!0}),o=function(){m.data=c=++c%2}}else if(s.setImmediate||s.MessageChannel===void 0)o="document"in s&&"onreadystatechange"in s.document.createElement("script")?function(){var g=s.document.createElement("script");g.onreadystatechange=function(){b(),g.onreadystatechange=null,g.parentNode.removeChild(g),g=null},s.document.documentElement.appendChild(g)}:function(){setTimeout(b,0)};else{var v=new s.MessageChannel;v.port1.onmessage=b,o=function(){v.port2.postMessage(0)}}var y=[];function b(){var g,_;a=!0;for(var d=y.length;d;){for(_=y,y=[],g=-1;++g<d;)_[g]();d=y.length}a=!1}n.exports=function(g){y.push(g)!==1||a||o()}}).call(this,typeof $e<"u"?$e:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(t,n,i){var s=t("immediate");function o(){}var a={},l=["REJECTED"],c=["FULFILLED"],f=["PENDING"];function m(d){if(typeof d!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,d!==o&&g(this,d)}function v(d,T,w){this.promise=d,typeof T=="function"&&(this.onFulfilled=T,this.callFulfilled=this.otherCallFulfilled),typeof w=="function"&&(this.onRejected=w,this.callRejected=this.otherCallRejected)}function y(d,T,w){s(function(){var p;try{p=T(w)}catch(E){return a.reject(d,E)}p===d?a.reject(d,new TypeError("Cannot resolve promise with itself")):a.resolve(d,p)})}function b(d){var T=d&&d.then;if(d&&(typeof d=="object"||typeof d=="function")&&typeof T=="function")return function(){T.apply(d,arguments)}}function g(d,T){var w=!1;function p(P){w||(w=!0,a.reject(d,P))}function E(P){w||(w=!0,a.resolve(d,P))}var O=_(function(){T(E,p)});O.status==="error"&&p(O.value)}function _(d,T){var w={};try{w.value=d(T),w.status="success"}catch(p){w.status="error",w.value=p}return w}(n.exports=m).prototype.finally=function(d){if(typeof d!="function")return this;var T=this.constructor;return this.then(function(w){return T.resolve(d()).then(function(){return w})},function(w){return T.resolve(d()).then(function(){throw w})})},m.prototype.catch=function(d){return this.then(null,d)},m.prototype.then=function(d,T){if(typeof d!="function"&&this.state===c||typeof T!="function"&&this.state===l)return this;var w=new this.constructor(o);return this.state!==f?y(w,this.state===c?d:T,this.outcome):this.queue.push(new v(w,d,T)),w},v.prototype.callFulfilled=function(d){a.resolve(this.promise,d)},v.prototype.otherCallFulfilled=function(d){y(this.promise,this.onFulfilled,d)},v.prototype.callRejected=function(d){a.reject(this.promise,d)},v.prototype.otherCallRejected=function(d){y(this.promise,this.onRejected,d)},a.resolve=function(d,T){var w=_(b,T);if(w.status==="error")return a.reject(d,w.value);var p=w.value;if(p)g(d,p);else{d.state=c,d.outcome=T;for(var E=-1,O=d.queue.length;++E<O;)d.queue[E].callFulfilled(T)}return d},a.reject=function(d,T){d.state=l,d.outcome=T;for(var w=-1,p=d.queue.length;++w<p;)d.queue[w].callRejected(T);return d},m.resolve=function(d){return d instanceof this?d:a.resolve(new this(o),d)},m.reject=function(d){var T=new this(o);return a.reject(T,d)},m.all=function(d){var T=this;if(Object.prototype.toString.call(d)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=d.length,p=!1;if(!w)return this.resolve([]);for(var E=new Array(w),O=0,P=-1,B=new this(o);++P<w;)I(d[P],P);return B;function I(K,oe){T.resolve(K).then(function(N){E[oe]=N,++O!==w||p||(p=!0,a.resolve(B,E))},function(N){p||(p=!0,a.reject(B,N))})}},m.race=function(d){var T=this;if(Object.prototype.toString.call(d)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=d.length,p=!1;if(!w)return this.resolve([]);for(var E=-1,O=new this(o);++E<w;)P=d[E],T.resolve(P).then(function(B){p||(p=!0,a.resolve(O,B))},function(B){p||(p=!0,a.reject(O,B))});var P;return O}},{immediate:36}],38:[function(t,n,i){var s={};(0,t("./lib/utils/common").assign)(s,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),n.exports=s},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,n,i){var s=t("./zlib/deflate"),o=t("./utils/common"),a=t("./utils/strings"),l=t("./zlib/messages"),c=t("./zlib/zstream"),f=Object.prototype.toString,m=0,v=-1,y=0,b=8;function g(d){if(!(this instanceof g))return new g(d);this.options=o.assign({level:v,method:b,chunkSize:16384,windowBits:15,memLevel:8,strategy:y,to:""},d||{});var T=this.options;T.raw&&0<T.windowBits?T.windowBits=-T.windowBits:T.gzip&&0<T.windowBits&&T.windowBits<16&&(T.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var w=s.deflateInit2(this.strm,T.level,T.method,T.windowBits,T.memLevel,T.strategy);if(w!==m)throw new Error(l[w]);if(T.header&&s.deflateSetHeader(this.strm,T.header),T.dictionary){var p;if(p=typeof T.dictionary=="string"?a.string2buf(T.dictionary):f.call(T.dictionary)==="[object ArrayBuffer]"?new Uint8Array(T.dictionary):T.dictionary,(w=s.deflateSetDictionary(this.strm,p))!==m)throw new Error(l[w]);this._dict_set=!0}}function _(d,T){var w=new g(T);if(w.push(d,!0),w.err)throw w.msg||l[w.err];return w.result}g.prototype.push=function(d,T){var w,p,E=this.strm,O=this.options.chunkSize;if(this.ended)return!1;p=T===~~T?T:T===!0?4:0,typeof d=="string"?E.input=a.string2buf(d):f.call(d)==="[object ArrayBuffer]"?E.input=new Uint8Array(d):E.input=d,E.next_in=0,E.avail_in=E.input.length;do{if(E.avail_out===0&&(E.output=new o.Buf8(O),E.next_out=0,E.avail_out=O),(w=s.deflate(E,p))!==1&&w!==m)return this.onEnd(w),!(this.ended=!0);E.avail_out!==0&&(E.avail_in!==0||p!==4&&p!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(o.shrinkBuf(E.output,E.next_out))):this.onData(o.shrinkBuf(E.output,E.next_out)))}while((0<E.avail_in||E.avail_out===0)&&w!==1);return p===4?(w=s.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===m):p!==2||(this.onEnd(m),!(E.avail_out=0))},g.prototype.onData=function(d){this.chunks.push(d)},g.prototype.onEnd=function(d){d===m&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=d,this.msg=this.strm.msg},i.Deflate=g,i.deflate=_,i.deflateRaw=function(d,T){return(T=T||{}).raw=!0,_(d,T)},i.gzip=function(d,T){return(T=T||{}).gzip=!0,_(d,T)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,n,i){var s=t("./zlib/inflate"),o=t("./utils/common"),a=t("./utils/strings"),l=t("./zlib/constants"),c=t("./zlib/messages"),f=t("./zlib/zstream"),m=t("./zlib/gzheader"),v=Object.prototype.toString;function y(g){if(!(this instanceof y))return new y(g);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},g||{});var _=this.options;_.raw&&0<=_.windowBits&&_.windowBits<16&&(_.windowBits=-_.windowBits,_.windowBits===0&&(_.windowBits=-15)),!(0<=_.windowBits&&_.windowBits<16)||g&&g.windowBits||(_.windowBits+=32),15<_.windowBits&&_.windowBits<48&&(15&_.windowBits)==0&&(_.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var d=s.inflateInit2(this.strm,_.windowBits);if(d!==l.Z_OK)throw new Error(c[d]);this.header=new m,s.inflateGetHeader(this.strm,this.header)}function b(g,_){var d=new y(_);if(d.push(g,!0),d.err)throw d.msg||c[d.err];return d.result}y.prototype.push=function(g,_){var d,T,w,p,E,O,P=this.strm,B=this.options.chunkSize,I=this.options.dictionary,K=!1;if(this.ended)return!1;T=_===~~_?_:_===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof g=="string"?P.input=a.binstring2buf(g):v.call(g)==="[object ArrayBuffer]"?P.input=new Uint8Array(g):P.input=g,P.next_in=0,P.avail_in=P.input.length;do{if(P.avail_out===0&&(P.output=new o.Buf8(B),P.next_out=0,P.avail_out=B),(d=s.inflate(P,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&I&&(O=typeof I=="string"?a.string2buf(I):v.call(I)==="[object ArrayBuffer]"?new Uint8Array(I):I,d=s.inflateSetDictionary(this.strm,O)),d===l.Z_BUF_ERROR&&K===!0&&(d=l.Z_OK,K=!1),d!==l.Z_STREAM_END&&d!==l.Z_OK)return this.onEnd(d),!(this.ended=!0);P.next_out&&(P.avail_out!==0&&d!==l.Z_STREAM_END&&(P.avail_in!==0||T!==l.Z_FINISH&&T!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(w=a.utf8border(P.output,P.next_out),p=P.next_out-w,E=a.buf2string(P.output,w),P.next_out=p,P.avail_out=B-p,p&&o.arraySet(P.output,P.output,w,p,0),this.onData(E)):this.onData(o.shrinkBuf(P.output,P.next_out)))),P.avail_in===0&&P.avail_out===0&&(K=!0)}while((0<P.avail_in||P.avail_out===0)&&d!==l.Z_STREAM_END);return d===l.Z_STREAM_END&&(T=l.Z_FINISH),T===l.Z_FINISH?(d=s.inflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===l.Z_OK):T!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(P.avail_out=0))},y.prototype.onData=function(g){this.chunks.push(g)},y.prototype.onEnd=function(g){g===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},i.Inflate=y,i.inflate=b,i.inflateRaw=function(g,_){return(_=_||{}).raw=!0,b(g,_)},i.ungzip=b},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,n,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";i.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var f=c.shift();if(f){if(typeof f!="object")throw new TypeError(f+"must be non-object");for(var m in f)f.hasOwnProperty(m)&&(l[m]=f[m])}}return l},i.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var o={arraySet:function(l,c,f,m,v){if(c.subarray&&l.subarray)l.set(c.subarray(f,f+m),v);else for(var y=0;y<m;y++)l[v+y]=c[f+y]},flattenChunks:function(l){var c,f,m,v,y,b;for(c=m=0,f=l.length;c<f;c++)m+=l[c].length;for(b=new Uint8Array(m),c=v=0,f=l.length;c<f;c++)y=l[c],b.set(y,v),v+=y.length;return b}},a={arraySet:function(l,c,f,m,v){for(var y=0;y<m;y++)l[v+y]=c[f+y]},flattenChunks:function(l){return[].concat.apply([],l)}};i.setTyped=function(l){l?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,o)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,a))},i.setTyped(s)},{}],42:[function(t,n,i){var s=t("./common"),o=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new s.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function f(m,v){if(v<65537&&(m.subarray&&a||!m.subarray&&o))return String.fromCharCode.apply(null,s.shrinkBuf(m,v));for(var y="",b=0;b<v;b++)y+=String.fromCharCode(m[b]);return y}l[254]=l[254]=1,i.string2buf=function(m){var v,y,b,g,_,d=m.length,T=0;for(g=0;g<d;g++)(64512&(y=m.charCodeAt(g)))==55296&&g+1<d&&(64512&(b=m.charCodeAt(g+1)))==56320&&(y=65536+(y-55296<<10)+(b-56320),g++),T+=y<128?1:y<2048?2:y<65536?3:4;for(v=new s.Buf8(T),g=_=0;_<T;g++)(64512&(y=m.charCodeAt(g)))==55296&&g+1<d&&(64512&(b=m.charCodeAt(g+1)))==56320&&(y=65536+(y-55296<<10)+(b-56320),g++),y<128?v[_++]=y:(y<2048?v[_++]=192|y>>>6:(y<65536?v[_++]=224|y>>>12:(v[_++]=240|y>>>18,v[_++]=128|y>>>12&63),v[_++]=128|y>>>6&63),v[_++]=128|63&y);return v},i.buf2binstring=function(m){return f(m,m.length)},i.binstring2buf=function(m){for(var v=new s.Buf8(m.length),y=0,b=v.length;y<b;y++)v[y]=m.charCodeAt(y);return v},i.buf2string=function(m,v){var y,b,g,_,d=v||m.length,T=new Array(2*d);for(y=b=0;y<d;)if((g=m[y++])<128)T[b++]=g;else if(4<(_=l[g]))T[b++]=65533,y+=_-1;else{for(g&=_===2?31:_===3?15:7;1<_&&y<d;)g=g<<6|63&m[y++],_--;1<_?T[b++]=65533:g<65536?T[b++]=g:(g-=65536,T[b++]=55296|g>>10&1023,T[b++]=56320|1023&g)}return f(T,b)},i.utf8border=function(m,v){var y;for((v=v||m.length)>m.length&&(v=m.length),y=v-1;0<=y&&(192&m[y])==128;)y--;return y<0||y===0?v:y+l[m[y]]>v?y:v}},{"./common":41}],43:[function(t,n,i){n.exports=function(s,o,a,l){for(var c=65535&s|0,f=s>>>16&65535|0,m=0;a!==0;){for(a-=m=2e3<a?2e3:a;f=f+(c=c+o[l++]|0)|0,--m;);c%=65521,f%=65521}return c|f<<16|0}},{}],44:[function(t,n,i){n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,n,i){var s=(function(){for(var o,a=[],l=0;l<256;l++){o=l;for(var c=0;c<8;c++)o=1&o?3988292384^o>>>1:o>>>1;a[l]=o}return a})();n.exports=function(o,a,l,c){var f=s,m=c+l;o^=-1;for(var v=c;v<m;v++)o=o>>>8^f[255&(o^a[v])];return-1^o}},{}],46:[function(t,n,i){var s,o=t("../utils/common"),a=t("./trees"),l=t("./adler32"),c=t("./crc32"),f=t("./messages"),m=0,v=4,y=0,b=-2,g=-1,_=4,d=2,T=8,w=9,p=286,E=30,O=19,P=2*p+1,B=15,I=3,K=258,oe=K+I+1,N=42,U=113,x=1,X=2,re=3,z=4;function se(A,ee){return A.msg=f[ee],ee}function Q(A){return(A<<1)-(4<A?9:0)}function me(A){for(var ee=A.length;0<=--ee;)A[ee]=0}function Y(A){var ee=A.state,R=ee.pending;R>A.avail_out&&(R=A.avail_out),R!==0&&(o.arraySet(A.output,ee.pending_buf,ee.pending_out,R,A.next_out),A.next_out+=R,ee.pending_out+=R,A.total_out+=R,A.avail_out-=R,ee.pending-=R,ee.pending===0&&(ee.pending_out=0))}function L(A,ee){a._tr_flush_block(A,0<=A.block_start?A.block_start:-1,A.strstart-A.block_start,ee),A.block_start=A.strstart,Y(A.strm)}function V(A,ee){A.pending_buf[A.pending++]=ee}function Z(A,ee){A.pending_buf[A.pending++]=ee>>>8&255,A.pending_buf[A.pending++]=255&ee}function ie(A,ee){var R,u,h=A.max_chain_length,S=A.strstart,M=A.prev_length,q=A.nice_match,j=A.strstart>A.w_size-oe?A.strstart-(A.w_size-oe):0,ae=A.window,he=A.w_mask,le=A.prev,ge=A.strstart+K,ve=ae[S+M-1],_e=ae[S+M];A.prev_length>=A.good_match&&(h>>=2),q>A.lookahead&&(q=A.lookahead);do if(ae[(R=ee)+M]===_e&&ae[R+M-1]===ve&&ae[R]===ae[S]&&ae[++R]===ae[S+1]){S+=2,R++;do;while(ae[++S]===ae[++R]&&ae[++S]===ae[++R]&&ae[++S]===ae[++R]&&ae[++S]===ae[++R]&&ae[++S]===ae[++R]&&ae[++S]===ae[++R]&&ae[++S]===ae[++R]&&ae[++S]===ae[++R]&&S<ge);if(u=K-(ge-S),S=ge-K,M<u){if(A.match_start=ee,q<=(M=u))break;ve=ae[S+M-1],_e=ae[S+M]}}while((ee=le[ee&he])>j&&--h!=0);return M<=A.lookahead?M:A.lookahead}function $(A){var ee,R,u,h,S,M,q,j,ae,he,le=A.w_size;do{if(h=A.window_size-A.lookahead-A.strstart,A.strstart>=le+(le-oe)){for(o.arraySet(A.window,A.window,le,le,0),A.match_start-=le,A.strstart-=le,A.block_start-=le,ee=R=A.hash_size;u=A.head[--ee],A.head[ee]=le<=u?u-le:0,--R;);for(ee=R=le;u=A.prev[--ee],A.prev[ee]=le<=u?u-le:0,--R;);h+=le}if(A.strm.avail_in===0)break;if(M=A.strm,q=A.window,j=A.strstart+A.lookahead,ae=h,he=void 0,he=M.avail_in,ae<he&&(he=ae),R=he===0?0:(M.avail_in-=he,o.arraySet(q,M.input,M.next_in,he,j),M.state.wrap===1?M.adler=l(M.adler,q,he,j):M.state.wrap===2&&(M.adler=c(M.adler,q,he,j)),M.next_in+=he,M.total_in+=he,he),A.lookahead+=R,A.lookahead+A.insert>=I)for(S=A.strstart-A.insert,A.ins_h=A.window[S],A.ins_h=(A.ins_h<<A.hash_shift^A.window[S+1])&A.hash_mask;A.insert&&(A.ins_h=(A.ins_h<<A.hash_shift^A.window[S+I-1])&A.hash_mask,A.prev[S&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=S,S++,A.insert--,!(A.lookahead+A.insert<I)););}while(A.lookahead<oe&&A.strm.avail_in!==0)}function C(A,ee){for(var R,u;;){if(A.lookahead<oe){if($(A),A.lookahead<oe&&ee===m)return x;if(A.lookahead===0)break}if(R=0,A.lookahead>=I&&(A.ins_h=(A.ins_h<<A.hash_shift^A.window[A.strstart+I-1])&A.hash_mask,R=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart),R!==0&&A.strstart-R<=A.w_size-oe&&(A.match_length=ie(A,R)),A.match_length>=I)if(u=a._tr_tally(A,A.strstart-A.match_start,A.match_length-I),A.lookahead-=A.match_length,A.match_length<=A.max_lazy_match&&A.lookahead>=I){for(A.match_length--;A.strstart++,A.ins_h=(A.ins_h<<A.hash_shift^A.window[A.strstart+I-1])&A.hash_mask,R=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart,--A.match_length!=0;);A.strstart++}else A.strstart+=A.match_length,A.match_length=0,A.ins_h=A.window[A.strstart],A.ins_h=(A.ins_h<<A.hash_shift^A.window[A.strstart+1])&A.hash_mask;else u=a._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++;if(u&&(L(A,!1),A.strm.avail_out===0))return x}return A.insert=A.strstart<I-1?A.strstart:I-1,ee===v?(L(A,!0),A.strm.avail_out===0?re:z):A.last_lit&&(L(A,!1),A.strm.avail_out===0)?x:X}function k(A,ee){for(var R,u,h;;){if(A.lookahead<oe){if($(A),A.lookahead<oe&&ee===m)return x;if(A.lookahead===0)break}if(R=0,A.lookahead>=I&&(A.ins_h=(A.ins_h<<A.hash_shift^A.window[A.strstart+I-1])&A.hash_mask,R=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart),A.prev_length=A.match_length,A.prev_match=A.match_start,A.match_length=I-1,R!==0&&A.prev_length<A.max_lazy_match&&A.strstart-R<=A.w_size-oe&&(A.match_length=ie(A,R),A.match_length<=5&&(A.strategy===1||A.match_length===I&&4096<A.strstart-A.match_start)&&(A.match_length=I-1)),A.prev_length>=I&&A.match_length<=A.prev_length){for(h=A.strstart+A.lookahead-I,u=a._tr_tally(A,A.strstart-1-A.prev_match,A.prev_length-I),A.lookahead-=A.prev_length-1,A.prev_length-=2;++A.strstart<=h&&(A.ins_h=(A.ins_h<<A.hash_shift^A.window[A.strstart+I-1])&A.hash_mask,R=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart),--A.prev_length!=0;);if(A.match_available=0,A.match_length=I-1,A.strstart++,u&&(L(A,!1),A.strm.avail_out===0))return x}else if(A.match_available){if((u=a._tr_tally(A,0,A.window[A.strstart-1]))&&L(A,!1),A.strstart++,A.lookahead--,A.strm.avail_out===0)return x}else A.match_available=1,A.strstart++,A.lookahead--}return A.match_available&&(u=a._tr_tally(A,0,A.window[A.strstart-1]),A.match_available=0),A.insert=A.strstart<I-1?A.strstart:I-1,ee===v?(L(A,!0),A.strm.avail_out===0?re:z):A.last_lit&&(L(A,!1),A.strm.avail_out===0)?x:X}function G(A,ee,R,u,h){this.good_length=A,this.max_lazy=ee,this.nice_length=R,this.max_chain=u,this.func=h}function H(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=T,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*P),this.dyn_dtree=new o.Buf16(2*(2*E+1)),this.bl_tree=new o.Buf16(2*(2*O+1)),me(this.dyn_ltree),me(this.dyn_dtree),me(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(B+1),this.heap=new o.Buf16(2*p+1),me(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*p+1),me(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function D(A){var ee;return A&&A.state?(A.total_in=A.total_out=0,A.data_type=d,(ee=A.state).pending=0,ee.pending_out=0,ee.wrap<0&&(ee.wrap=-ee.wrap),ee.status=ee.wrap?N:U,A.adler=ee.wrap===2?0:1,ee.last_flush=m,a._tr_init(ee),y):se(A,b)}function F(A){var ee=D(A);return ee===y&&(function(R){R.window_size=2*R.w_size,me(R.head),R.max_lazy_match=s[R.level].max_lazy,R.good_match=s[R.level].good_length,R.nice_match=s[R.level].nice_length,R.max_chain_length=s[R.level].max_chain,R.strstart=0,R.block_start=0,R.lookahead=0,R.insert=0,R.match_length=R.prev_length=I-1,R.match_available=0,R.ins_h=0})(A.state),ee}function te(A,ee,R,u,h,S){if(!A)return b;var M=1;if(ee===g&&(ee=6),u<0?(M=0,u=-u):15<u&&(M=2,u-=16),h<1||w<h||R!==T||u<8||15<u||ee<0||9<ee||S<0||_<S)return se(A,b);u===8&&(u=9);var q=new H;return(A.state=q).strm=A,q.wrap=M,q.gzhead=null,q.w_bits=u,q.w_size=1<<q.w_bits,q.w_mask=q.w_size-1,q.hash_bits=h+7,q.hash_size=1<<q.hash_bits,q.hash_mask=q.hash_size-1,q.hash_shift=~~((q.hash_bits+I-1)/I),q.window=new o.Buf8(2*q.w_size),q.head=new o.Buf16(q.hash_size),q.prev=new o.Buf16(q.w_size),q.lit_bufsize=1<<h+6,q.pending_buf_size=4*q.lit_bufsize,q.pending_buf=new o.Buf8(q.pending_buf_size),q.d_buf=1*q.lit_bufsize,q.l_buf=3*q.lit_bufsize,q.level=ee,q.strategy=S,q.method=R,F(A)}s=[new G(0,0,0,0,function(A,ee){var R=65535;for(R>A.pending_buf_size-5&&(R=A.pending_buf_size-5);;){if(A.lookahead<=1){if($(A),A.lookahead===0&&ee===m)return x;if(A.lookahead===0)break}A.strstart+=A.lookahead,A.lookahead=0;var u=A.block_start+R;if((A.strstart===0||A.strstart>=u)&&(A.lookahead=A.strstart-u,A.strstart=u,L(A,!1),A.strm.avail_out===0)||A.strstart-A.block_start>=A.w_size-oe&&(L(A,!1),A.strm.avail_out===0))return x}return A.insert=0,ee===v?(L(A,!0),A.strm.avail_out===0?re:z):(A.strstart>A.block_start&&(L(A,!1),A.strm.avail_out),x)}),new G(4,4,8,4,C),new G(4,5,16,8,C),new G(4,6,32,32,C),new G(4,4,16,16,k),new G(8,16,32,32,k),new G(8,16,128,128,k),new G(8,32,128,256,k),new G(32,128,258,1024,k),new G(32,258,258,4096,k)],i.deflateInit=function(A,ee){return te(A,ee,T,15,8,0)},i.deflateInit2=te,i.deflateReset=F,i.deflateResetKeep=D,i.deflateSetHeader=function(A,ee){return A&&A.state?A.state.wrap!==2?b:(A.state.gzhead=ee,y):b},i.deflate=function(A,ee){var R,u,h,S;if(!A||!A.state||5<ee||ee<0)return A?se(A,b):b;if(u=A.state,!A.output||!A.input&&A.avail_in!==0||u.status===666&&ee!==v)return se(A,A.avail_out===0?-5:b);if(u.strm=A,R=u.last_flush,u.last_flush=ee,u.status===N)if(u.wrap===2)A.adler=0,V(u,31),V(u,139),V(u,8),u.gzhead?(V(u,(u.gzhead.text?1:0)+(u.gzhead.hcrc?2:0)+(u.gzhead.extra?4:0)+(u.gzhead.name?8:0)+(u.gzhead.comment?16:0)),V(u,255&u.gzhead.time),V(u,u.gzhead.time>>8&255),V(u,u.gzhead.time>>16&255),V(u,u.gzhead.time>>24&255),V(u,u.level===9?2:2<=u.strategy||u.level<2?4:0),V(u,255&u.gzhead.os),u.gzhead.extra&&u.gzhead.extra.length&&(V(u,255&u.gzhead.extra.length),V(u,u.gzhead.extra.length>>8&255)),u.gzhead.hcrc&&(A.adler=c(A.adler,u.pending_buf,u.pending,0)),u.gzindex=0,u.status=69):(V(u,0),V(u,0),V(u,0),V(u,0),V(u,0),V(u,u.level===9?2:2<=u.strategy||u.level<2?4:0),V(u,3),u.status=U);else{var M=T+(u.w_bits-8<<4)<<8;M|=(2<=u.strategy||u.level<2?0:u.level<6?1:u.level===6?2:3)<<6,u.strstart!==0&&(M|=32),M+=31-M%31,u.status=U,Z(u,M),u.strstart!==0&&(Z(u,A.adler>>>16),Z(u,65535&A.adler)),A.adler=1}if(u.status===69)if(u.gzhead.extra){for(h=u.pending;u.gzindex<(65535&u.gzhead.extra.length)&&(u.pending!==u.pending_buf_size||(u.gzhead.hcrc&&u.pending>h&&(A.adler=c(A.adler,u.pending_buf,u.pending-h,h)),Y(A),h=u.pending,u.pending!==u.pending_buf_size));)V(u,255&u.gzhead.extra[u.gzindex]),u.gzindex++;u.gzhead.hcrc&&u.pending>h&&(A.adler=c(A.adler,u.pending_buf,u.pending-h,h)),u.gzindex===u.gzhead.extra.length&&(u.gzindex=0,u.status=73)}else u.status=73;if(u.status===73)if(u.gzhead.name){h=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>h&&(A.adler=c(A.adler,u.pending_buf,u.pending-h,h)),Y(A),h=u.pending,u.pending===u.pending_buf_size)){S=1;break}S=u.gzindex<u.gzhead.name.length?255&u.gzhead.name.charCodeAt(u.gzindex++):0,V(u,S)}while(S!==0);u.gzhead.hcrc&&u.pending>h&&(A.adler=c(A.adler,u.pending_buf,u.pending-h,h)),S===0&&(u.gzindex=0,u.status=91)}else u.status=91;if(u.status===91)if(u.gzhead.comment){h=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>h&&(A.adler=c(A.adler,u.pending_buf,u.pending-h,h)),Y(A),h=u.pending,u.pending===u.pending_buf_size)){S=1;break}S=u.gzindex<u.gzhead.comment.length?255&u.gzhead.comment.charCodeAt(u.gzindex++):0,V(u,S)}while(S!==0);u.gzhead.hcrc&&u.pending>h&&(A.adler=c(A.adler,u.pending_buf,u.pending-h,h)),S===0&&(u.status=103)}else u.status=103;if(u.status===103&&(u.gzhead.hcrc?(u.pending+2>u.pending_buf_size&&Y(A),u.pending+2<=u.pending_buf_size&&(V(u,255&A.adler),V(u,A.adler>>8&255),A.adler=0,u.status=U)):u.status=U),u.pending!==0){if(Y(A),A.avail_out===0)return u.last_flush=-1,y}else if(A.avail_in===0&&Q(ee)<=Q(R)&&ee!==v)return se(A,-5);if(u.status===666&&A.avail_in!==0)return se(A,-5);if(A.avail_in!==0||u.lookahead!==0||ee!==m&&u.status!==666){var q=u.strategy===2?(function(j,ae){for(var he;;){if(j.lookahead===0&&($(j),j.lookahead===0)){if(ae===m)return x;break}if(j.match_length=0,he=a._tr_tally(j,0,j.window[j.strstart]),j.lookahead--,j.strstart++,he&&(L(j,!1),j.strm.avail_out===0))return x}return j.insert=0,ae===v?(L(j,!0),j.strm.avail_out===0?re:z):j.last_lit&&(L(j,!1),j.strm.avail_out===0)?x:X})(u,ee):u.strategy===3?(function(j,ae){for(var he,le,ge,ve,_e=j.window;;){if(j.lookahead<=K){if($(j),j.lookahead<=K&&ae===m)return x;if(j.lookahead===0)break}if(j.match_length=0,j.lookahead>=I&&0<j.strstart&&(le=_e[ge=j.strstart-1])===_e[++ge]&&le===_e[++ge]&&le===_e[++ge]){ve=j.strstart+K;do;while(le===_e[++ge]&&le===_e[++ge]&&le===_e[++ge]&&le===_e[++ge]&&le===_e[++ge]&&le===_e[++ge]&&le===_e[++ge]&&le===_e[++ge]&&ge<ve);j.match_length=K-(ve-ge),j.match_length>j.lookahead&&(j.match_length=j.lookahead)}if(j.match_length>=I?(he=a._tr_tally(j,1,j.match_length-I),j.lookahead-=j.match_length,j.strstart+=j.match_length,j.match_length=0):(he=a._tr_tally(j,0,j.window[j.strstart]),j.lookahead--,j.strstart++),he&&(L(j,!1),j.strm.avail_out===0))return x}return j.insert=0,ae===v?(L(j,!0),j.strm.avail_out===0?re:z):j.last_lit&&(L(j,!1),j.strm.avail_out===0)?x:X})(u,ee):s[u.level].func(u,ee);if(q!==re&&q!==z||(u.status=666),q===x||q===re)return A.avail_out===0&&(u.last_flush=-1),y;if(q===X&&(ee===1?a._tr_align(u):ee!==5&&(a._tr_stored_block(u,0,0,!1),ee===3&&(me(u.head),u.lookahead===0&&(u.strstart=0,u.block_start=0,u.insert=0))),Y(A),A.avail_out===0))return u.last_flush=-1,y}return ee!==v?y:u.wrap<=0?1:(u.wrap===2?(V(u,255&A.adler),V(u,A.adler>>8&255),V(u,A.adler>>16&255),V(u,A.adler>>24&255),V(u,255&A.total_in),V(u,A.total_in>>8&255),V(u,A.total_in>>16&255),V(u,A.total_in>>24&255)):(Z(u,A.adler>>>16),Z(u,65535&A.adler)),Y(A),0<u.wrap&&(u.wrap=-u.wrap),u.pending!==0?y:1)},i.deflateEnd=function(A){var ee;return A&&A.state?(ee=A.state.status)!==N&&ee!==69&&ee!==73&&ee!==91&&ee!==103&&ee!==U&&ee!==666?se(A,b):(A.state=null,ee===U?se(A,-3):y):b},i.deflateSetDictionary=function(A,ee){var R,u,h,S,M,q,j,ae,he=ee.length;if(!A||!A.state||(S=(R=A.state).wrap)===2||S===1&&R.status!==N||R.lookahead)return b;for(S===1&&(A.adler=l(A.adler,ee,he,0)),R.wrap=0,he>=R.w_size&&(S===0&&(me(R.head),R.strstart=0,R.block_start=0,R.insert=0),ae=new o.Buf8(R.w_size),o.arraySet(ae,ee,he-R.w_size,R.w_size,0),ee=ae,he=R.w_size),M=A.avail_in,q=A.next_in,j=A.input,A.avail_in=he,A.next_in=0,A.input=ee,$(R);R.lookahead>=I;){for(u=R.strstart,h=R.lookahead-(I-1);R.ins_h=(R.ins_h<<R.hash_shift^R.window[u+I-1])&R.hash_mask,R.prev[u&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=u,u++,--h;);R.strstart=u,R.lookahead=I-1,$(R)}return R.strstart+=R.lookahead,R.block_start=R.strstart,R.insert=R.lookahead,R.lookahead=0,R.match_length=R.prev_length=I-1,R.match_available=0,A.next_in=q,A.input=j,A.avail_in=M,R.wrap=S,y},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,n,i){n.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,n,i){n.exports=function(s,o){var a,l,c,f,m,v,y,b,g,_,d,T,w,p,E,O,P,B,I,K,oe,N,U,x,X;a=s.state,l=s.next_in,x=s.input,c=l+(s.avail_in-5),f=s.next_out,X=s.output,m=f-(o-s.avail_out),v=f+(s.avail_out-257),y=a.dmax,b=a.wsize,g=a.whave,_=a.wnext,d=a.window,T=a.hold,w=a.bits,p=a.lencode,E=a.distcode,O=(1<<a.lenbits)-1,P=(1<<a.distbits)-1;e:do{w<15&&(T+=x[l++]<<w,w+=8,T+=x[l++]<<w,w+=8),B=p[T&O];t:for(;;){if(T>>>=I=B>>>24,w-=I,(I=B>>>16&255)===0)X[f++]=65535&B;else{if(!(16&I)){if((64&I)==0){B=p[(65535&B)+(T&(1<<I)-1)];continue t}if(32&I){a.mode=12;break e}s.msg="invalid literal/length code",a.mode=30;break e}K=65535&B,(I&=15)&&(w<I&&(T+=x[l++]<<w,w+=8),K+=T&(1<<I)-1,T>>>=I,w-=I),w<15&&(T+=x[l++]<<w,w+=8,T+=x[l++]<<w,w+=8),B=E[T&P];r:for(;;){if(T>>>=I=B>>>24,w-=I,!(16&(I=B>>>16&255))){if((64&I)==0){B=E[(65535&B)+(T&(1<<I)-1)];continue r}s.msg="invalid distance code",a.mode=30;break e}if(oe=65535&B,w<(I&=15)&&(T+=x[l++]<<w,(w+=8)<I&&(T+=x[l++]<<w,w+=8)),y<(oe+=T&(1<<I)-1)){s.msg="invalid distance too far back",a.mode=30;break e}if(T>>>=I,w-=I,(I=f-m)<oe){if(g<(I=oe-I)&&a.sane){s.msg="invalid distance too far back",a.mode=30;break e}if(U=d,(N=0)===_){if(N+=b-I,I<K){for(K-=I;X[f++]=d[N++],--I;);N=f-oe,U=X}}else if(_<I){if(N+=b+_-I,(I-=_)<K){for(K-=I;X[f++]=d[N++],--I;);if(N=0,_<K){for(K-=I=_;X[f++]=d[N++],--I;);N=f-oe,U=X}}}else if(N+=_-I,I<K){for(K-=I;X[f++]=d[N++],--I;);N=f-oe,U=X}for(;2<K;)X[f++]=U[N++],X[f++]=U[N++],X[f++]=U[N++],K-=3;K&&(X[f++]=U[N++],1<K&&(X[f++]=U[N++]))}else{for(N=f-oe;X[f++]=X[N++],X[f++]=X[N++],X[f++]=X[N++],2<(K-=3););K&&(X[f++]=X[N++],1<K&&(X[f++]=X[N++]))}break}}break}}while(l<c&&f<v);l-=K=w>>3,T&=(1<<(w-=K<<3))-1,s.next_in=l,s.next_out=f,s.avail_in=l<c?c-l+5:5-(l-c),s.avail_out=f<v?v-f+257:257-(f-v),a.hold=T,a.bits=w}},{}],49:[function(t,n,i){var s=t("../utils/common"),o=t("./adler32"),a=t("./crc32"),l=t("./inffast"),c=t("./inftrees"),f=1,m=2,v=0,y=-2,b=1,g=852,_=592;function d(N){return(N>>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<24)}function T(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(N){var U;return N&&N.state?(U=N.state,N.total_in=N.total_out=U.total=0,N.msg="",U.wrap&&(N.adler=1&U.wrap),U.mode=b,U.last=0,U.havedict=0,U.dmax=32768,U.head=null,U.hold=0,U.bits=0,U.lencode=U.lendyn=new s.Buf32(g),U.distcode=U.distdyn=new s.Buf32(_),U.sane=1,U.back=-1,v):y}function p(N){var U;return N&&N.state?((U=N.state).wsize=0,U.whave=0,U.wnext=0,w(N)):y}function E(N,U){var x,X;return N&&N.state?(X=N.state,U<0?(x=0,U=-U):(x=1+(U>>4),U<48&&(U&=15)),U&&(U<8||15<U)?y:(X.window!==null&&X.wbits!==U&&(X.window=null),X.wrap=x,X.wbits=U,p(N))):y}function O(N,U){var x,X;return N?(X=new T,(N.state=X).window=null,(x=E(N,U))!==v&&(N.state=null),x):y}var P,B,I=!0;function K(N){if(I){var U;for(P=new s.Buf32(512),B=new s.Buf32(32),U=0;U<144;)N.lens[U++]=8;for(;U<256;)N.lens[U++]=9;for(;U<280;)N.lens[U++]=7;for(;U<288;)N.lens[U++]=8;for(c(f,N.lens,0,288,P,0,N.work,{bits:9}),U=0;U<32;)N.lens[U++]=5;c(m,N.lens,0,32,B,0,N.work,{bits:5}),I=!1}N.lencode=P,N.lenbits=9,N.distcode=B,N.distbits=5}function oe(N,U,x,X){var re,z=N.state;return z.window===null&&(z.wsize=1<<z.wbits,z.wnext=0,z.whave=0,z.window=new s.Buf8(z.wsize)),X>=z.wsize?(s.arraySet(z.window,U,x-z.wsize,z.wsize,0),z.wnext=0,z.whave=z.wsize):(X<(re=z.wsize-z.wnext)&&(re=X),s.arraySet(z.window,U,x-X,re,z.wnext),(X-=re)?(s.arraySet(z.window,U,x-X,X,0),z.wnext=X,z.whave=z.wsize):(z.wnext+=re,z.wnext===z.wsize&&(z.wnext=0),z.whave<z.wsize&&(z.whave+=re))),0}i.inflateReset=p,i.inflateReset2=E,i.inflateResetKeep=w,i.inflateInit=function(N){return O(N,15)},i.inflateInit2=O,i.inflate=function(N,U){var x,X,re,z,se,Q,me,Y,L,V,Z,ie,$,C,k,G,H,D,F,te,A,ee,R,u,h=0,S=new s.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!N||!N.state||!N.output||!N.input&&N.avail_in!==0)return y;(x=N.state).mode===12&&(x.mode=13),se=N.next_out,re=N.output,me=N.avail_out,z=N.next_in,X=N.input,Q=N.avail_in,Y=x.hold,L=x.bits,V=Q,Z=me,ee=v;e:for(;;)switch(x.mode){case b:if(x.wrap===0){x.mode=13;break}for(;L<16;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}if(2&x.wrap&&Y===35615){S[x.check=0]=255&Y,S[1]=Y>>>8&255,x.check=a(x.check,S,2,0),L=Y=0,x.mode=2;break}if(x.flags=0,x.head&&(x.head.done=!1),!(1&x.wrap)||(((255&Y)<<8)+(Y>>8))%31){N.msg="incorrect header check",x.mode=30;break}if((15&Y)!=8){N.msg="unknown compression method",x.mode=30;break}if(L-=4,A=8+(15&(Y>>>=4)),x.wbits===0)x.wbits=A;else if(A>x.wbits){N.msg="invalid window size",x.mode=30;break}x.dmax=1<<A,N.adler=x.check=1,x.mode=512&Y?10:12,L=Y=0;break;case 2:for(;L<16;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}if(x.flags=Y,(255&x.flags)!=8){N.msg="unknown compression method",x.mode=30;break}if(57344&x.flags){N.msg="unknown header flags set",x.mode=30;break}x.head&&(x.head.text=Y>>8&1),512&x.flags&&(S[0]=255&Y,S[1]=Y>>>8&255,x.check=a(x.check,S,2,0)),L=Y=0,x.mode=3;case 3:for(;L<32;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}x.head&&(x.head.time=Y),512&x.flags&&(S[0]=255&Y,S[1]=Y>>>8&255,S[2]=Y>>>16&255,S[3]=Y>>>24&255,x.check=a(x.check,S,4,0)),L=Y=0,x.mode=4;case 4:for(;L<16;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}x.head&&(x.head.xflags=255&Y,x.head.os=Y>>8),512&x.flags&&(S[0]=255&Y,S[1]=Y>>>8&255,x.check=a(x.check,S,2,0)),L=Y=0,x.mode=5;case 5:if(1024&x.flags){for(;L<16;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}x.length=Y,x.head&&(x.head.extra_len=Y),512&x.flags&&(S[0]=255&Y,S[1]=Y>>>8&255,x.check=a(x.check,S,2,0)),L=Y=0}else x.head&&(x.head.extra=null);x.mode=6;case 6:if(1024&x.flags&&(Q<(ie=x.length)&&(ie=Q),ie&&(x.head&&(A=x.head.extra_len-x.length,x.head.extra||(x.head.extra=new Array(x.head.extra_len)),s.arraySet(x.head.extra,X,z,ie,A)),512&x.flags&&(x.check=a(x.check,X,ie,z)),Q-=ie,z+=ie,x.length-=ie),x.length))break e;x.length=0,x.mode=7;case 7:if(2048&x.flags){if(Q===0)break e;for(ie=0;A=X[z+ie++],x.head&&A&&x.length<65536&&(x.head.name+=String.fromCharCode(A)),A&&ie<Q;);if(512&x.flags&&(x.check=a(x.check,X,ie,z)),Q-=ie,z+=ie,A)break e}else x.head&&(x.head.name=null);x.length=0,x.mode=8;case 8:if(4096&x.flags){if(Q===0)break e;for(ie=0;A=X[z+ie++],x.head&&A&&x.length<65536&&(x.head.comment+=String.fromCharCode(A)),A&&ie<Q;);if(512&x.flags&&(x.check=a(x.check,X,ie,z)),Q-=ie,z+=ie,A)break e}else x.head&&(x.head.comment=null);x.mode=9;case 9:if(512&x.flags){for(;L<16;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}if(Y!==(65535&x.check)){N.msg="header crc mismatch",x.mode=30;break}L=Y=0}x.head&&(x.head.hcrc=x.flags>>9&1,x.head.done=!0),N.adler=x.check=0,x.mode=12;break;case 10:for(;L<32;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}N.adler=x.check=d(Y),L=Y=0,x.mode=11;case 11:if(x.havedict===0)return N.next_out=se,N.avail_out=me,N.next_in=z,N.avail_in=Q,x.hold=Y,x.bits=L,2;N.adler=x.check=1,x.mode=12;case 12:if(U===5||U===6)break e;case 13:if(x.last){Y>>>=7&L,L-=7&L,x.mode=27;break}for(;L<3;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}switch(x.last=1&Y,L-=1,3&(Y>>>=1)){case 0:x.mode=14;break;case 1:if(K(x),x.mode=20,U!==6)break;Y>>>=2,L-=2;break e;case 2:x.mode=17;break;case 3:N.msg="invalid block type",x.mode=30}Y>>>=2,L-=2;break;case 14:for(Y>>>=7&L,L-=7&L;L<32;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}if((65535&Y)!=(Y>>>16^65535)){N.msg="invalid stored block lengths",x.mode=30;break}if(x.length=65535&Y,L=Y=0,x.mode=15,U===6)break e;case 15:x.mode=16;case 16:if(ie=x.length){if(Q<ie&&(ie=Q),me<ie&&(ie=me),ie===0)break e;s.arraySet(re,X,z,ie,se),Q-=ie,z+=ie,me-=ie,se+=ie,x.length-=ie;break}x.mode=12;break;case 17:for(;L<14;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}if(x.nlen=257+(31&Y),Y>>>=5,L-=5,x.ndist=1+(31&Y),Y>>>=5,L-=5,x.ncode=4+(15&Y),Y>>>=4,L-=4,286<x.nlen||30<x.ndist){N.msg="too many length or distance symbols",x.mode=30;break}x.have=0,x.mode=18;case 18:for(;x.have<x.ncode;){for(;L<3;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}x.lens[M[x.have++]]=7&Y,Y>>>=3,L-=3}for(;x.have<19;)x.lens[M[x.have++]]=0;if(x.lencode=x.lendyn,x.lenbits=7,R={bits:x.lenbits},ee=c(0,x.lens,0,19,x.lencode,0,x.work,R),x.lenbits=R.bits,ee){N.msg="invalid code lengths set",x.mode=30;break}x.have=0,x.mode=19;case 19:for(;x.have<x.nlen+x.ndist;){for(;G=(h=x.lencode[Y&(1<<x.lenbits)-1])>>>16&255,H=65535&h,!((k=h>>>24)<=L);){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}if(H<16)Y>>>=k,L-=k,x.lens[x.have++]=H;else{if(H===16){for(u=k+2;L<u;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}if(Y>>>=k,L-=k,x.have===0){N.msg="invalid bit length repeat",x.mode=30;break}A=x.lens[x.have-1],ie=3+(3&Y),Y>>>=2,L-=2}else if(H===17){for(u=k+3;L<u;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}L-=k,A=0,ie=3+(7&(Y>>>=k)),Y>>>=3,L-=3}else{for(u=k+7;L<u;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}L-=k,A=0,ie=11+(127&(Y>>>=k)),Y>>>=7,L-=7}if(x.have+ie>x.nlen+x.ndist){N.msg="invalid bit length repeat",x.mode=30;break}for(;ie--;)x.lens[x.have++]=A}}if(x.mode===30)break;if(x.lens[256]===0){N.msg="invalid code -- missing end-of-block",x.mode=30;break}if(x.lenbits=9,R={bits:x.lenbits},ee=c(f,x.lens,0,x.nlen,x.lencode,0,x.work,R),x.lenbits=R.bits,ee){N.msg="invalid literal/lengths set",x.mode=30;break}if(x.distbits=6,x.distcode=x.distdyn,R={bits:x.distbits},ee=c(m,x.lens,x.nlen,x.ndist,x.distcode,0,x.work,R),x.distbits=R.bits,ee){N.msg="invalid distances set",x.mode=30;break}if(x.mode=20,U===6)break e;case 20:x.mode=21;case 21:if(6<=Q&&258<=me){N.next_out=se,N.avail_out=me,N.next_in=z,N.avail_in=Q,x.hold=Y,x.bits=L,l(N,Z),se=N.next_out,re=N.output,me=N.avail_out,z=N.next_in,X=N.input,Q=N.avail_in,Y=x.hold,L=x.bits,x.mode===12&&(x.back=-1);break}for(x.back=0;G=(h=x.lencode[Y&(1<<x.lenbits)-1])>>>16&255,H=65535&h,!((k=h>>>24)<=L);){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}if(G&&(240&G)==0){for(D=k,F=G,te=H;G=(h=x.lencode[te+((Y&(1<<D+F)-1)>>D)])>>>16&255,H=65535&h,!(D+(k=h>>>24)<=L);){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}Y>>>=D,L-=D,x.back+=D}if(Y>>>=k,L-=k,x.back+=k,x.length=H,G===0){x.mode=26;break}if(32&G){x.back=-1,x.mode=12;break}if(64&G){N.msg="invalid literal/length code",x.mode=30;break}x.extra=15&G,x.mode=22;case 22:if(x.extra){for(u=x.extra;L<u;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}x.length+=Y&(1<<x.extra)-1,Y>>>=x.extra,L-=x.extra,x.back+=x.extra}x.was=x.length,x.mode=23;case 23:for(;G=(h=x.distcode[Y&(1<<x.distbits)-1])>>>16&255,H=65535&h,!((k=h>>>24)<=L);){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}if((240&G)==0){for(D=k,F=G,te=H;G=(h=x.distcode[te+((Y&(1<<D+F)-1)>>D)])>>>16&255,H=65535&h,!(D+(k=h>>>24)<=L);){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}Y>>>=D,L-=D,x.back+=D}if(Y>>>=k,L-=k,x.back+=k,64&G){N.msg="invalid distance code",x.mode=30;break}x.offset=H,x.extra=15&G,x.mode=24;case 24:if(x.extra){for(u=x.extra;L<u;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}x.offset+=Y&(1<<x.extra)-1,Y>>>=x.extra,L-=x.extra,x.back+=x.extra}if(x.offset>x.dmax){N.msg="invalid distance too far back",x.mode=30;break}x.mode=25;case 25:if(me===0)break e;if(ie=Z-me,x.offset>ie){if((ie=x.offset-ie)>x.whave&&x.sane){N.msg="invalid distance too far back",x.mode=30;break}$=ie>x.wnext?(ie-=x.wnext,x.wsize-ie):x.wnext-ie,ie>x.length&&(ie=x.length),C=x.window}else C=re,$=se-x.offset,ie=x.length;for(me<ie&&(ie=me),me-=ie,x.length-=ie;re[se++]=C[$++],--ie;);x.length===0&&(x.mode=21);break;case 26:if(me===0)break e;re[se++]=x.length,me--,x.mode=21;break;case 27:if(x.wrap){for(;L<32;){if(Q===0)break e;Q--,Y|=X[z++]<<L,L+=8}if(Z-=me,N.total_out+=Z,x.total+=Z,Z&&(N.adler=x.check=x.flags?a(x.check,re,Z,se-Z):o(x.check,re,Z,se-Z)),Z=me,(x.flags?Y:d(Y))!==x.check){N.msg="incorrect data check",x.mode=30;break}L=Y=0}x.mode=28;case 28:if(x.wrap&&x.flags){for(;L<32;){if(Q===0)break e;Q--,Y+=X[z++]<<L,L+=8}if(Y!==(4294967295&x.total)){N.msg="incorrect length check",x.mode=30;break}L=Y=0}x.mode=29;case 29:ee=1;break e;case 30:ee=-3;break e;case 31:return-4;case 32:default:return y}return N.next_out=se,N.avail_out=me,N.next_in=z,N.avail_in=Q,x.hold=Y,x.bits=L,(x.wsize||Z!==N.avail_out&&x.mode<30&&(x.mode<27||U!==4))&&oe(N,N.output,N.next_out,Z-N.avail_out)?(x.mode=31,-4):(V-=N.avail_in,Z-=N.avail_out,N.total_in+=V,N.total_out+=Z,x.total+=Z,x.wrap&&Z&&(N.adler=x.check=x.flags?a(x.check,re,Z,N.next_out-Z):o(x.check,re,Z,N.next_out-Z)),N.data_type=x.bits+(x.last?64:0)+(x.mode===12?128:0)+(x.mode===20||x.mode===15?256:0),(V==0&&Z===0||U===4)&&ee===v&&(ee=-5),ee)},i.inflateEnd=function(N){if(!N||!N.state)return y;var U=N.state;return U.window&&(U.window=null),N.state=null,v},i.inflateGetHeader=function(N,U){var x;return N&&N.state?(2&(x=N.state).wrap)==0?y:((x.head=U).done=!1,v):y},i.inflateSetDictionary=function(N,U){var x,X=U.length;return N&&N.state?(x=N.state).wrap!==0&&x.mode!==11?y:x.mode===11&&o(1,U,X,0)!==x.check?-3:oe(N,U,X,X)?(x.mode=31,-4):(x.havedict=1,v):y},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,n,i){var s=t("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];n.exports=function(f,m,v,y,b,g,_,d){var T,w,p,E,O,P,B,I,K,oe=d.bits,N=0,U=0,x=0,X=0,re=0,z=0,se=0,Q=0,me=0,Y=0,L=null,V=0,Z=new s.Buf16(16),ie=new s.Buf16(16),$=null,C=0;for(N=0;N<=15;N++)Z[N]=0;for(U=0;U<y;U++)Z[m[v+U]]++;for(re=oe,X=15;1<=X&&Z[X]===0;X--);if(X<re&&(re=X),X===0)return b[g++]=20971520,b[g++]=20971520,d.bits=1,0;for(x=1;x<X&&Z[x]===0;x++);for(re<x&&(re=x),N=Q=1;N<=15;N++)if(Q<<=1,(Q-=Z[N])<0)return-1;if(0<Q&&(f===0||X!==1))return-1;for(ie[1]=0,N=1;N<15;N++)ie[N+1]=ie[N]+Z[N];for(U=0;U<y;U++)m[v+U]!==0&&(_[ie[m[v+U]]++]=U);if(P=f===0?(L=$=_,19):f===1?(L=o,V-=257,$=a,C-=257,256):(L=l,$=c,-1),N=x,O=g,se=U=Y=0,p=-1,E=(me=1<<(z=re))-1,f===1&&852<me||f===2&&592<me)return 1;for(;;){for(B=N-se,K=_[U]<P?(I=0,_[U]):_[U]>P?(I=$[C+_[U]],L[V+_[U]]):(I=96,0),T=1<<N-se,x=w=1<<z;b[O+(Y>>se)+(w-=T)]=B<<24|I<<16|K|0,w!==0;);for(T=1<<N-1;Y&T;)T>>=1;if(T!==0?(Y&=T-1,Y+=T):Y=0,U++,--Z[N]==0){if(N===X)break;N=m[v+_[U]]}if(re<N&&(Y&E)!==p){for(se===0&&(se=re),O+=x,Q=1<<(z=N-se);z+se<X&&!((Q-=Z[z+se])<=0);)z++,Q<<=1;if(me+=1<<z,f===1&&852<me||f===2&&592<me)return 1;b[p=Y&E]=re<<24|z<<16|O-g|0}}return Y!==0&&(b[O+Y]=N-se<<24|64<<16|0),d.bits=re,0}},{"../utils/common":41}],51:[function(t,n,i){n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,n,i){var s=t("../utils/common"),o=0,a=1;function l(h){for(var S=h.length;0<=--S;)h[S]=0}var c=0,f=29,m=256,v=m+1+f,y=30,b=19,g=2*v+1,_=15,d=16,T=7,w=256,p=16,E=17,O=18,P=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],B=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],oe=new Array(2*(v+2));l(oe);var N=new Array(2*y);l(N);var U=new Array(512);l(U);var x=new Array(256);l(x);var X=new Array(f);l(X);var re,z,se,Q=new Array(y);function me(h,S,M,q,j){this.static_tree=h,this.extra_bits=S,this.extra_base=M,this.elems=q,this.max_length=j,this.has_stree=h&&h.length}function Y(h,S){this.dyn_tree=h,this.max_code=0,this.stat_desc=S}function L(h){return h<256?U[h]:U[256+(h>>>7)]}function V(h,S){h.pending_buf[h.pending++]=255&S,h.pending_buf[h.pending++]=S>>>8&255}function Z(h,S,M){h.bi_valid>d-M?(h.bi_buf|=S<<h.bi_valid&65535,V(h,h.bi_buf),h.bi_buf=S>>d-h.bi_valid,h.bi_valid+=M-d):(h.bi_buf|=S<<h.bi_valid&65535,h.bi_valid+=M)}function ie(h,S,M){Z(h,M[2*S],M[2*S+1])}function $(h,S){for(var M=0;M|=1&h,h>>>=1,M<<=1,0<--S;);return M>>>1}function C(h,S,M){var q,j,ae=new Array(_+1),he=0;for(q=1;q<=_;q++)ae[q]=he=he+M[q-1]<<1;for(j=0;j<=S;j++){var le=h[2*j+1];le!==0&&(h[2*j]=$(ae[le]++,le))}}function k(h){var S;for(S=0;S<v;S++)h.dyn_ltree[2*S]=0;for(S=0;S<y;S++)h.dyn_dtree[2*S]=0;for(S=0;S<b;S++)h.bl_tree[2*S]=0;h.dyn_ltree[2*w]=1,h.opt_len=h.static_len=0,h.last_lit=h.matches=0}function G(h){8<h.bi_valid?V(h,h.bi_buf):0<h.bi_valid&&(h.pending_buf[h.pending++]=h.bi_buf),h.bi_buf=0,h.bi_valid=0}function H(h,S,M,q){var j=2*S,ae=2*M;return h[j]<h[ae]||h[j]===h[ae]&&q[S]<=q[M]}function D(h,S,M){for(var q=h.heap[M],j=M<<1;j<=h.heap_len&&(j<h.heap_len&&H(S,h.heap[j+1],h.heap[j],h.depth)&&j++,!H(S,q,h.heap[j],h.depth));)h.heap[M]=h.heap[j],M=j,j<<=1;h.heap[M]=q}function F(h,S,M){var q,j,ae,he,le=0;if(h.last_lit!==0)for(;q=h.pending_buf[h.d_buf+2*le]<<8|h.pending_buf[h.d_buf+2*le+1],j=h.pending_buf[h.l_buf+le],le++,q===0?ie(h,j,S):(ie(h,(ae=x[j])+m+1,S),(he=P[ae])!==0&&Z(h,j-=X[ae],he),ie(h,ae=L(--q),M),(he=B[ae])!==0&&Z(h,q-=Q[ae],he)),le<h.last_lit;);ie(h,w,S)}function te(h,S){var M,q,j,ae=S.dyn_tree,he=S.stat_desc.static_tree,le=S.stat_desc.has_stree,ge=S.stat_desc.elems,ve=-1;for(h.heap_len=0,h.heap_max=g,M=0;M<ge;M++)ae[2*M]!==0?(h.heap[++h.heap_len]=ve=M,h.depth[M]=0):ae[2*M+1]=0;for(;h.heap_len<2;)ae[2*(j=h.heap[++h.heap_len]=ve<2?++ve:0)]=1,h.depth[j]=0,h.opt_len--,le&&(h.static_len-=he[2*j+1]);for(S.max_code=ve,M=h.heap_len>>1;1<=M;M--)D(h,ae,M);for(j=ge;M=h.heap[1],h.heap[1]=h.heap[h.heap_len--],D(h,ae,1),q=h.heap[1],h.heap[--h.heap_max]=M,h.heap[--h.heap_max]=q,ae[2*j]=ae[2*M]+ae[2*q],h.depth[j]=(h.depth[M]>=h.depth[q]?h.depth[M]:h.depth[q])+1,ae[2*M+1]=ae[2*q+1]=j,h.heap[1]=j++,D(h,ae,1),2<=h.heap_len;);h.heap[--h.heap_max]=h.heap[1],(function(_e,We){var xt,ut,Er,Le,hn,ba,yt=We.dyn_tree,hf=We.max_code,Qb=We.stat_desc.static_tree,e0=We.stat_desc.has_stree,t0=We.stat_desc.extra_bits,ff=We.stat_desc.extra_base,Ar=We.stat_desc.max_length,fn=0;for(Le=0;Le<=_;Le++)_e.bl_count[Le]=0;for(yt[2*_e.heap[_e.heap_max]+1]=0,xt=_e.heap_max+1;xt<g;xt++)Ar<(Le=yt[2*yt[2*(ut=_e.heap[xt])+1]+1]+1)&&(Le=Ar,fn++),yt[2*ut+1]=Le,hf<ut||(_e.bl_count[Le]++,hn=0,ff<=ut&&(hn=t0[ut-ff]),ba=yt[2*ut],_e.opt_len+=ba*(Le+hn),e0&&(_e.static_len+=ba*(Qb[2*ut+1]+hn)));if(fn!==0){do{for(Le=Ar-1;_e.bl_count[Le]===0;)Le--;_e.bl_count[Le]--,_e.bl_count[Le+1]+=2,_e.bl_count[Ar]--,fn-=2}while(0<fn);for(Le=Ar;Le!==0;Le--)for(ut=_e.bl_count[Le];ut!==0;)hf<(Er=_e.heap[--xt])||(yt[2*Er+1]!==Le&&(_e.opt_len+=(Le-yt[2*Er+1])*yt[2*Er],yt[2*Er+1]=Le),ut--)}})(h,S),C(ae,ve,h.bl_count)}function A(h,S,M){var q,j,ae=-1,he=S[1],le=0,ge=7,ve=4;for(he===0&&(ge=138,ve=3),S[2*(M+1)+1]=65535,q=0;q<=M;q++)j=he,he=S[2*(q+1)+1],++le<ge&&j===he||(le<ve?h.bl_tree[2*j]+=le:j!==0?(j!==ae&&h.bl_tree[2*j]++,h.bl_tree[2*p]++):le<=10?h.bl_tree[2*E]++:h.bl_tree[2*O]++,ae=j,ve=(le=0)===he?(ge=138,3):j===he?(ge=6,3):(ge=7,4))}function ee(h,S,M){var q,j,ae=-1,he=S[1],le=0,ge=7,ve=4;for(he===0&&(ge=138,ve=3),q=0;q<=M;q++)if(j=he,he=S[2*(q+1)+1],!(++le<ge&&j===he)){if(le<ve)for(;ie(h,j,h.bl_tree),--le!=0;);else j!==0?(j!==ae&&(ie(h,j,h.bl_tree),le--),ie(h,p,h.bl_tree),Z(h,le-3,2)):le<=10?(ie(h,E,h.bl_tree),Z(h,le-3,3)):(ie(h,O,h.bl_tree),Z(h,le-11,7));ae=j,ve=(le=0)===he?(ge=138,3):j===he?(ge=6,3):(ge=7,4)}}l(Q);var R=!1;function u(h,S,M,q){Z(h,(c<<1)+(q?1:0),3),(function(j,ae,he,le){G(j),V(j,he),V(j,~he),s.arraySet(j.pending_buf,j.window,ae,he,j.pending),j.pending+=he})(h,S,M)}i._tr_init=function(h){R||((function(){var S,M,q,j,ae,he=new Array(_+1);for(j=q=0;j<f-1;j++)for(X[j]=q,S=0;S<1<<P[j];S++)x[q++]=j;for(x[q-1]=j,j=ae=0;j<16;j++)for(Q[j]=ae,S=0;S<1<<B[j];S++)U[ae++]=j;for(ae>>=7;j<y;j++)for(Q[j]=ae<<7,S=0;S<1<<B[j]-7;S++)U[256+ae++]=j;for(M=0;M<=_;M++)he[M]=0;for(S=0;S<=143;)oe[2*S+1]=8,S++,he[8]++;for(;S<=255;)oe[2*S+1]=9,S++,he[9]++;for(;S<=279;)oe[2*S+1]=7,S++,he[7]++;for(;S<=287;)oe[2*S+1]=8,S++,he[8]++;for(C(oe,v+1,he),S=0;S<y;S++)N[2*S+1]=5,N[2*S]=$(S,5);re=new me(oe,P,m+1,v,_),z=new me(N,B,0,y,_),se=new me(new Array(0),I,0,b,T)})(),R=!0),h.l_desc=new Y(h.dyn_ltree,re),h.d_desc=new Y(h.dyn_dtree,z),h.bl_desc=new Y(h.bl_tree,se),h.bi_buf=0,h.bi_valid=0,k(h)},i._tr_stored_block=u,i._tr_flush_block=function(h,S,M,q){var j,ae,he=0;0<h.level?(h.strm.data_type===2&&(h.strm.data_type=(function(le){var ge,ve=4093624447;for(ge=0;ge<=31;ge++,ve>>>=1)if(1&ve&&le.dyn_ltree[2*ge]!==0)return o;if(le.dyn_ltree[18]!==0||le.dyn_ltree[20]!==0||le.dyn_ltree[26]!==0)return a;for(ge=32;ge<m;ge++)if(le.dyn_ltree[2*ge]!==0)return a;return o})(h)),te(h,h.l_desc),te(h,h.d_desc),he=(function(le){var ge;for(A(le,le.dyn_ltree,le.l_desc.max_code),A(le,le.dyn_dtree,le.d_desc.max_code),te(le,le.bl_desc),ge=b-1;3<=ge&&le.bl_tree[2*K[ge]+1]===0;ge--);return le.opt_len+=3*(ge+1)+5+5+4,ge})(h),j=h.opt_len+3+7>>>3,(ae=h.static_len+3+7>>>3)<=j&&(j=ae)):j=ae=M+5,M+4<=j&&S!==-1?u(h,S,M,q):h.strategy===4||ae===j?(Z(h,2+(q?1:0),3),F(h,oe,N)):(Z(h,4+(q?1:0),3),(function(le,ge,ve,_e){var We;for(Z(le,ge-257,5),Z(le,ve-1,5),Z(le,_e-4,4),We=0;We<_e;We++)Z(le,le.bl_tree[2*K[We]+1],3);ee(le,le.dyn_ltree,ge-1),ee(le,le.dyn_dtree,ve-1)})(h,h.l_desc.max_code+1,h.d_desc.max_code+1,he+1),F(h,h.dyn_ltree,h.dyn_dtree)),k(h),q&&G(h)},i._tr_tally=function(h,S,M){return h.pending_buf[h.d_buf+2*h.last_lit]=S>>>8&255,h.pending_buf[h.d_buf+2*h.last_lit+1]=255&S,h.pending_buf[h.l_buf+h.last_lit]=255&M,h.last_lit++,S===0?h.dyn_ltree[2*M]++:(h.matches++,S--,h.dyn_ltree[2*(x[M]+m+1)]++,h.dyn_dtree[2*L(S)]++),h.last_lit===h.lit_bufsize-1},i._tr_align=function(h){Z(h,2,3),ie(h,w,oe),(function(S){S.bi_valid===16?(V(S,S.bi_buf),S.bi_buf=0,S.bi_valid=0):8<=S.bi_valid&&(S.pending_buf[S.pending++]=255&S.bi_buf,S.bi_buf>>=8,S.bi_valid-=8)})(h)}},{"../utils/common":41}],53:[function(t,n,i){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,n,i){(function(s){(function(o,a){if(!o.setImmediate){var l,c,f,m,v=1,y={},b=!1,g=o.document,_=Object.getPrototypeOf&&Object.getPrototypeOf(o);_=_&&_.setTimeout?_:o,l={}.toString.call(o.process)==="[object process]"?function(p){Ae.nextTick(function(){T(p)})}:(function(){if(o.postMessage&&!o.importScripts){var p=!0,E=o.onmessage;return o.onmessage=function(){p=!1},o.postMessage("","*"),o.onmessage=E,p}})()?(m="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",w,!1):o.attachEvent("onmessage",w),function(p){o.postMessage(m+p,"*")}):o.MessageChannel?((f=new MessageChannel).port1.onmessage=function(p){T(p.data)},function(p){f.port2.postMessage(p)}):g&&"onreadystatechange"in g.createElement("script")?(c=g.documentElement,function(p){var E=g.createElement("script");E.onreadystatechange=function(){T(p),E.onreadystatechange=null,c.removeChild(E),E=null},c.appendChild(E)}):function(p){setTimeout(T,0,p)},_.setImmediate=function(p){typeof p!="function"&&(p=new Function(""+p));for(var E=new Array(arguments.length-1),O=0;O<E.length;O++)E[O]=arguments[O+1];var P={callback:p,args:E};return y[v]=P,l(v),v++},_.clearImmediate=d}function d(p){delete y[p]}function T(p){if(b)setTimeout(T,0,p);else{var E=y[p];if(E){b=!0;try{(function(O){var P=O.callback,B=O.args;switch(B.length){case 0:P();break;case 1:P(B[0]);break;case 2:P(B[0],B[1]);break;case 3:P(B[0],B[1],B[2]);break;default:P.apply(a,B)}})(E)}finally{d(p),b=!1}}}}function w(p){p.source===o&&typeof p.data=="string"&&p.data.indexOf(m)===0&&T(+p.data.slice(m.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof $e<"u"?$e:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(fa)),fa.exports}var Eb=Tb();const $t=Dn(Eb);var br={exports:{}},da,$h;function Ab(){if($h)return da;$h=1;var r={"&":"&",'"':""","'":"'","<":"<",">":">"};function e(t){return t&&t.replace?t.replace(/([&"<>'])/g,function(n,i){return r[i]}):t}return da=e,da}var Xh;function Sb(){if(Xh)return br.exports;Xh=1;var r=Ab(),e=ls().Stream,t=" ";function n(c,f){typeof f!="object"&&(f={indent:f});var m=f.stream?new e:null,v="",y=!1,b=f.indent?f.indent===!0?t:f.indent:"",g=!0;function _(E){g?Ae.nextTick(E):E()}function d(E,O){if(O!==void 0&&(v+=O),E&&!y&&(m=m||new e,y=!0),E&&y){var P=v;_(function(){m.emit("data",P)}),v=""}}function T(E,O){a(d,o(E,b,b?1:0),O)}function w(){if(m){var E=v;_(function(){m.emit("data",E),m.emit("end"),m.readable=!1,m.emit("close")})}}function p(E){var O=E.encoding||"UTF-8",P={version:"1.0",encoding:O};E.standalone&&(P.standalone=E.standalone),T({"?xml":{_attr:P}}),v=v.replace("/>","?>")}return _(function(){g=!1}),f.declaration&&p(f.declaration),c&&c.forEach?c.forEach(function(E,O){var P;O+1===c.length&&(P=w),T(E,P)}):T(c,w),m?(m.readable=!0,m):v}function i(){var c=Array.prototype.slice.call(arguments),f={_elem:o(c)};return f.push=function(m){if(!this.append)throw new Error("not assigned to a parent!");var v=this,y=this._elem.indent;a(this.append,o(m,y,this._elem.icount+(y?1:0)),function(){v.append(!0)})},f.close=function(m){m!==void 0&&this.push(m),this.end&&this.end()},f}function s(c,f){return new Array(f||0).join(c||"")}function o(c,f,m){m=m||0;var v=s(f,m),y,b=c,g=!1;if(typeof c=="object"){var _=Object.keys(c);if(y=_[0],b=c[y],b&&b._elem)return b._elem.name=y,b._elem.icount=m,b._elem.indent=f,b._elem.indents=v,b._elem.interrupt=b,b._elem}var d=[],T=[],w;function p(E){var O=Object.keys(E);O.forEach(function(P){d.push(l(P,E[P]))})}switch(typeof b){case"object":if(b===null)break;b._attr&&p(b._attr),b._cdata&&T.push(("<![CDATA["+b._cdata).replace(/\]\]>/g,"]]]]><![CDATA[>")+"]]>"),b.forEach&&(w=!1,T.push(""),b.forEach(function(E){if(typeof E=="object"){var O=Object.keys(E)[0];O=="_attr"?p(E._attr):T.push(o(E,f,m+1))}else T.pop(),w=!0,T.push(r(E))}),w||T.push(""));break;default:T.push(r(b))}return{name:y,interrupt:g,attributes:d,content:T,icount:m,indents:v,indent:f}}function a(c,f,m){if(typeof f!="object")return c(!1,f);var v=f.interrupt?1:f.content.length;function y(){for(;f.content.length;){var g=f.content.shift();if(g!==void 0){if(b(g))return;a(c,g)}}c(!1,(v>1?f.indents:"")+(f.name?"</"+f.name+">":"")+(f.indent&&!m?`
|
|
132
|
+
`:"")),m&&m()}function b(g){return g.interrupt?(g.interrupt.append=c,g.interrupt.end=y,g.interrupt=!1,c(!0),!0):!1}if(c(!1,f.indents+(f.name?"<"+f.name:"")+(f.attributes.length?" "+f.attributes.join(" "):"")+(v?f.name?">":"":f.name?"/>":"")+(f.indent&&v>1?`
|
|
133
|
+
`:"")),!v)return c(!1,f.indent?`
|
|
134
|
+
`:"");b(f)||y()}function l(c,f){return c+'="'+r(f)+'"'}return br.exports=n,br.exports.element=br.exports.Element=i,br.exports}var xb=Sb();const ke=Dn(xb),_r=0,pa=32,kb=32,Cb=(r,e)=>{const t=e.replace(/-/g,"");if(t.length!==kb)throw new Error(`Error: Cannot extract GUID from font filename: ${e}`);const i=t.replace(/(..)/g,"$1 ").trim().split(" ").map(l=>parseInt(l,16));i.reverse();const o=r.slice(_r,pa).map((l,c)=>l^i[c%i.length]),a=new Uint8Array(_r+o.length+Math.max(0,r.length-pa));return a.set(r.slice(0,_r)),a.set(o,_r),a.set(r.slice(pa),_r+o.length),a};class ma{format(e,t={stack:[]}){const n=e.prepForXml(t);if(n)return n;throw Error("XMLComponent did not format correctly")}}class Yh{replace(e,t,n){let i=e;return t.forEach((s,o)=>{i=i.replace(new RegExp(`{${s.fileName}}`,"g"),(n+o).toString())}),i}getMediaData(e,t){return t.Array.filter(n=>e.search(`{${n.fileName}}`)>0)}}class Rb{replace(e,t){let n=e;for(const i of t)n=n.replace(new RegExp(`{${i.reference}-${i.instance}}`,"g"),i.numId.toString());return n}}class Ib{constructor(){ne(this,"formatter"),ne(this,"imageReplacer"),ne(this,"numberingReplacer"),this.formatter=new ma,this.imageReplacer=new Yh,this.numberingReplacer=new Rb}compile(e,t,n=[]){const i=new $t,s=this.xmlifyFile(e,t),o=new Map(Object.entries(s));for(const[,a]of o)if(Array.isArray(a))for(const l of a)i.file(l.path,pr(l.data));else i.file(a.path,pr(a.data));for(const a of n)i.file(a.path,pr(a.data));for(const a of e.Media.Array)a.type!=="svg"?i.file(`word/media/${a.fileName}`,a.data):(i.file(`word/media/${a.fileName}`,a.data),i.file(`word/media/${a.fallback.fileName}`,a.fallback.data));for(const{data:a,name:l,fontKey:c}of e.FontTable.fontOptionsWithKey){const[f]=l.split(".");i.file(`word/fonts/${f}.odttf`,Cb(a,c))}return i}xmlifyFile(e,t){const n=e.Document.Relationships.RelationshipCount+1,i=ke(this.formatter.format(e.Document.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),s=e.Comments.Relationships.RelationshipCount+1,o=ke(this.formatter.format(e.Comments,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),a=e.FootNotes.Relationships.RelationshipCount+1,l=ke(this.formatter.format(e.FootNotes.View,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),c=this.imageReplacer.getMediaData(i,e.Media),f=this.imageReplacer.getMediaData(o,e.Media),m=this.imageReplacer.getMediaData(l,e.Media);return{Relationships:{data:(c.forEach((v,y)=>{e.Document.Relationships.addRelationship(n+y,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${v.fileName}`)}),e.Document.Relationships.addRelationship(e.Document.Relationships.RelationshipCount+1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable","fontTable.xml"),ke(this.formatter.format(e.Document.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})),path:"word/_rels/document.xml.rels"},Document:{data:(()=>{const v=this.imageReplacer.replace(i,c,n);return this.numberingReplacer.replace(v,e.Numbering.ConcreteNumbering)})(),path:"word/document.xml"},Styles:{data:(()=>{const v=ke(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}});return this.numberingReplacer.replace(v,e.Numbering.ConcreteNumbering)})(),path:"word/styles.xml"},Properties:{data:ke(this.formatter.format(e.CoreProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/core.xml"},Numbering:{data:ke(this.formatter.format(e.Numbering,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/numbering.xml"},FileRelationships:{data:ke(this.formatter.format(e.FileRelationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"_rels/.rels"},HeaderRelationships:e.Headers.map((v,y)=>{const b=ke(this.formatter.format(v.View,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(b,e.Media).forEach((_,d)=>{v.Relationships.addRelationship(d,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${_.fileName}`)}),{data:ke(this.formatter.format(v.Relationships,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/header${y+1}.xml.rels`}}),FooterRelationships:e.Footers.map((v,y)=>{const b=ke(this.formatter.format(v.View,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(b,e.Media).forEach((_,d)=>{v.Relationships.addRelationship(d,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${_.fileName}`)}),{data:ke(this.formatter.format(v.Relationships,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/footer${y+1}.xml.rels`}}),Headers:e.Headers.map((v,y)=>{const b=ke(this.formatter.format(v.View,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),g=this.imageReplacer.getMediaData(b,e.Media),_=this.imageReplacer.replace(b,g,0);return{data:this.numberingReplacer.replace(_,e.Numbering.ConcreteNumbering),path:`word/header${y+1}.xml`}}),Footers:e.Footers.map((v,y)=>{const b=ke(this.formatter.format(v.View,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),g=this.imageReplacer.getMediaData(b,e.Media),_=this.imageReplacer.replace(b,g,0);return{data:this.numberingReplacer.replace(_,e.Numbering.ConcreteNumbering),path:`word/footer${y+1}.xml`}}),ContentTypes:{data:ke(this.formatter.format(e.ContentTypes,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"[Content_Types].xml"},CustomProperties:{data:ke(this.formatter.format(e.CustomProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/custom.xml"},AppProperties:{data:ke(this.formatter.format(e.AppProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/app.xml"},FootNotes:{data:(()=>{const v=this.imageReplacer.replace(l,m,a);return this.numberingReplacer.replace(v,e.Numbering.ConcreteNumbering)})(),path:"word/footnotes.xml"},FootNotesRelationships:{data:(m.forEach((v,y)=>{e.FootNotes.Relationships.addRelationship(a+y,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${v.fileName}`)}),ke(this.formatter.format(e.FootNotes.Relationships,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})),path:"word/_rels/footnotes.xml.rels"},Endnotes:{data:ke(this.formatter.format(e.Endnotes.View,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/endnotes.xml"},EndnotesRelationships:{data:ke(this.formatter.format(e.Endnotes.Relationships,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/endnotes.xml.rels"},Settings:{data:ke(this.formatter.format(e.Settings,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/settings.xml"},Comments:{data:(()=>{const v=this.imageReplacer.replace(o,f,s);return this.numberingReplacer.replace(v,e.Numbering.ConcreteNumbering)})(),path:"word/comments.xml"},CommentsRelationships:{data:(f.forEach((v,y)=>{e.Comments.Relationships.addRelationship(s+y,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${v.fileName}`)}),ke(this.formatter.format(e.Comments.Relationships,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})),path:"word/_rels/comments.xml.rels"},FontTable:{data:ke(this.formatter.format(e.FontTable.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/fontTable.xml"},FontTableRelationships:{data:ke(this.formatter.format(e.FontTable.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/fontTable.xml.rels"}}}}const Zh={NONE:"",WITH_2_BLANKS:" ",WITH_4_BLANKS:" ",WITH_TAB:" "},Jh=r=>r===!0?Zh.WITH_2_BLANKS:r===!1?void 0:r,Qh=class Yt{static pack(e,t,n){return Pn(this,arguments,function*(i,s,o,a=[]){return this.compiler.compile(i,Jh(o),a).generateAsync({type:s,mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toString(e,t,n=[]){return Yt.pack(e,"string",t,n)}static toBuffer(e,t,n=[]){return Yt.pack(e,"nodebuffer",t,n)}static toBase64String(e,t,n=[]){return Yt.pack(e,"base64",t,n)}static toBlob(e,t,n=[]){return Yt.pack(e,"blob",t,n)}static toArrayBuffer(e,t,n=[]){return Yt.pack(e,"arraybuffer",t,n)}static toStream(e,t,n=[]){const i=new _b.Stream;return this.compiler.compile(e,Jh(t),n).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"}).then(o=>{i.emit("data",o),i.emit("end")}),i}};ne(Qh,"compiler",new Ib);let Nb=Qh;const Ob=new ma,cn=r=>Kr.xml2js(r,{compact:!1,captureSpacesBetweenElements:!0}),ef=r=>{var e;return(e=cn(ke(Ob.format(new or({text:r})))).elements[0].elements)!=null?e:[]},tf=r=>Ne(ye({},r),{attributes:{"xml:space":"preserve"}}),ga=(r,e)=>{var t,n;return(n=(t=r.elements)==null?void 0:t.filter(i=>i.name===e)[0].elements)!=null?n:[]},Xt=(r,e,t)=>{const n=ga(r,"Types");n.some(s=>{var o,a;return s.type==="element"&&s.name==="Default"&&((o=s==null?void 0:s.attributes)==null?void 0:o.ContentType)===e&&((a=s==null?void 0:s.attributes)==null?void 0:a.Extension)===t})||n.push({attributes:{ContentType:e,Extension:t},name:"Default",type:"element"})},Pb=r=>{const e=parseInt(r.substring(3),10);return isNaN(e)?0:e},Lb=r=>ga(r,"Relationships").map(t=>{var n,i,s;return Pb((s=(i=(n=t.attributes)==null?void 0:n.Id)==null?void 0:i.toString())!=null?s:"")}).reduce((t,n)=>Math.max(t,n),0)+1,rf=(r,e,t,n,i)=>{const s=ga(r,"Relationships");return s.push({attributes:{Id:`rId${e}`,Type:t,Target:n,TargetMode:i},name:"Relationship",type:"element"}),s};class Db extends Error{constructor(e){super(`Token ${e} not found`),this.name="TokenNotFoundError"}}const Fb=(r,e)=>{var t,n,i,s;for(let o=0;o<((t=r.elements)!=null?t:[]).length;o++){const a=r.elements[o];if(a.type==="element"&&a.name==="w:r"){const l=((n=a.elements)!=null?n:[]).filter(c=>c.type==="element"&&c.name==="w:t");for(const c of l)if((i=c.elements)!=null&&i[0]&&(s=c.elements[0].text)!=null&&s.includes(e))return o}}throw new Db(e)},Bb=(r,e)=>{var t,n;let i=-1;const s=(n=(t=r.elements)==null?void 0:t.map((l,c)=>{var f,m,v;if(i!==-1)return l;if(l.type==="element"&&l.name==="w:t"){const b=((v=(m=(f=l.elements)==null?void 0:f[0])==null?void 0:m.text)!=null?v:"").split(e),g=b.map(_=>Ne(ye(ye({},l),tf(l)),{elements:ef(_)}));return b.length>1&&(i=c),g}else return l}).flat())!=null?n:[],o=Ne(ye({},JSON.parse(JSON.stringify(r))),{elements:s.slice(0,i+1)}),a=Ne(ye({},JSON.parse(JSON.stringify(r))),{elements:s.slice(i+1)});return{left:o,right:a}},Tr={START:0,MIDDLE:1,END:2},Mb=({paragraphElement:r,renderedParagraph:e,originalText:t,replacementText:n})=>{const i=e.text.indexOf(t),s=i+t.length-1;let o=Tr.START;for(const a of e.runs)for(const{text:l,index:c,start:f,end:m}of a.parts)switch(o){case Tr.START:if(i>=f&&i<=m){const v=i-f,y=Math.min(s,m)-f,b=a.text.substring(v,y+1);if(b==="")continue;const g=l.replace(b,n);wa(r.elements[a.index].elements[c],g),o=Tr.MIDDLE;continue}break;case Tr.MIDDLE:if(s<=m){const v=l.substring(s-f+1);wa(r.elements[a.index].elements[c],v);const y=r.elements[a.index].elements[c];r.elements[a.index].elements[c]=tf(y),o=Tr.END}else wa(r.elements[a.index].elements[c],"");break}return r},wa=(r,e)=>(r.elements=ef(e),r),Hb=r=>{if(r.element.name!=="w:p")throw new Error(`Invalid node type: ${r.element.name}`);if(!r.element.elements)return{text:"",runs:[],index:-1,pathToParagraph:[]};let e=0;const t=r.element.elements.map((i,s)=>({element:i,i:s})).filter(({element:i})=>i.name==="w:r").map(({element:i,i:s})=>{const o=Ub(i,s,e);return e+=o.text.length,o}).filter(i=>!!i);return{text:t.reduce((i,s)=>i+s.text,""),runs:t,index:r.index,pathToParagraph:nf(r)}},Ub=(r,e,t)=>{if(!r.elements)return{text:"",parts:[],index:-1,start:t,end:t};let n=t;const i=r.elements.map((o,a)=>{var l,c;return o.name==="w:t"&&o.elements&&o.elements.length>0?{text:(c=(l=o.elements[0].text)==null?void 0:l.toString())!=null?c:"",index:a,start:n,end:(()=>{var f,m;return n+=((m=(f=o.elements[0].text)==null?void 0:f.toString())!=null?m:"").length-1,n})()}:void 0}).filter(o=>!!o).map(o=>o);return{text:i.reduce((o,a)=>o+a.text,""),parts:i,index:e,start:t,end:n}},nf=r=>r.parent?[...nf(r.parent),r.index]:[r.index],sf=r=>{var e,t;return(t=(e=r.element.elements)==null?void 0:e.map((n,i)=>({element:n,index:i,parent:r})))!=null?t:[]},af=r=>{let e=[];const t=[...sf({element:r,index:0,parent:void 0})];let n;for(;t.length>0;)n=t.shift(),n.element.name==="w:p"&&(e=[...e,Hb(n)]),t.push(...sf(n));return e},jb=(r,e)=>af(r).filter(t=>t.text.includes(e)),Wb=new ma,ya="ɵ",zb=({json:r,patch:e,patchText:t,context:n,keepOriginalStyles:i=!0})=>{const s=jb(r,t);if(s.length===0)return{element:r,didFindOccurrence:!1};for(const o of s){const a=e.children.map(l=>cn(ke(Wb.format(l,n)))).map(l=>l.elements[0]);switch(e.type){case va.DOCUMENT:{const l=Gb(r,o.pathToParagraph),c=Kb(o.pathToParagraph);l.elements.splice(c,1,...a);break}case va.PARAGRAPH:default:{const l=of(r,o.pathToParagraph);Mb({paragraphElement:l,renderedParagraph:o,originalText:t,replacementText:ya});const c=Fb(l,ya),f=l.elements[c],{left:m,right:v}=Bb(f,ya);let y=a,b=v;if(i){const g=f.elements.filter(_=>_.type==="element"&&_.name==="w:rPr");y=a.map(_=>{var d;return Ne(ye({},_),{elements:[...g,...(d=_.elements)!=null?d:[]]})}),b=Ne(ye({},v),{elements:[...g,...v.elements]})}l.elements.splice(c,1,m,...y,b);break}}}return{element:r,didFindOccurrence:!0}},of=(r,e)=>{let t=r;for(let n=1;n<e.length;n++){const i=e[n];t=t.elements[i]}return t},Gb=(r,e)=>of(r,e.slice(0,e.length-1)),Kb=r=>r[r.length-1],va={DOCUMENT:"file",PARAGRAPH:"paragraph"},lf=new Yh,qb=new Uint8Array([255,254]),Vb=new Uint8Array([254,255]),uf=(r,e)=>{if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++)if(r[t]!==e[t])return!1;return!0},$b=r=>Pn(null,[r],function*({outputType:e,data:t,patches:n,keepOriginalStyles:i,placeholderDelimiters:s={start:"{{",end:"}}"},recursive:o=!0}){var a,l,c;const f=t instanceof $t?t:yield $t.loadAsync(t),m=new Map,v={Media:new oa},y=new Map,b=[],g=[];let _=!1;const d=new Map;for(const[w,p]of Object.entries(f.files)){const E=yield p.async("uint8array"),O=E.slice(0,2);if(uf(O,qb)||uf(O,Vb)){d.set(w,E);continue}if(!w.endsWith(".xml")&&!w.endsWith(".rels")){d.set(w,E);continue}const P=cn(yield p.async("text"));if(w==="word/document.xml"){const B=(a=P.elements)==null?void 0:a.find(I=>I.name==="w:document");if(B&&B.attributes){for(const I of["mc","wp","r","w15","m"])B.attributes[`xmlns:${I}`]=rn[I];B.attributes["mc:Ignorable"]=`${B.attributes["mc:Ignorable"]||""} w15`.trim()}}if(w.startsWith("word/")&&!w.endsWith(".xml.rels")){const B={file:v,viewWrapper:{Relationships:{addRelationship:(N,U,x,X)=>{g.push({key:w,hyperlink:{id:N,link:x}})}}},stack:[]};if(m.set(w,B),!(s!=null&&s.start.trim())||!(s!=null&&s.end.trim()))throw new Error("Both start and end delimiters must be non-empty strings.");const{start:I,end:K}=s;for(const[N,U]of Object.entries(n)){const x=`${I}${N}${K}`;for(;;){const{didFindOccurrence:X}=zb({json:P,patch:Ne(ye({},U),{children:U.children.map(re=>{if(re instanceof Vs){const z=new Wt(re.options.children,fr());return g.push({key:w,hyperlink:{id:z.linkId,link:re.options.link}}),z}else return re})}),patchText:x,context:B,keepOriginalStyles:i});if(!o||!X)break}}const oe=lf.getMediaData(JSON.stringify(P),B.file.Media);oe.length>0&&(_=!0,b.push({key:w,mediaDatas:oe}))}y.set(w,P)}for(const{key:w,mediaDatas:p}of b){const E=`word/_rels/${w.split("/").pop()}.rels`,O=(l=y.get(E))!=null?l:cf();y.set(E,O);const P=Lb(O),B=lf.replace(JSON.stringify(y.get(w)),p,P);y.set(w,JSON.parse(B));for(let I=0;I<p.length;I++){const{fileName:K}=p[I];rf(O,P+I,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${K}`)}}for(const{key:w,hyperlink:p}of g){const E=`word/_rels/${w.split("/").pop()}.rels`,O=(c=y.get(E))!=null?c:cf();y.set(E,O),rf(O,p.id,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",p.link,lc.EXTERNAL)}if(_){const w=y.get("[Content_Types].xml");if(!w)throw new Error("Could not find content types file");Xt(w,"image/png","png"),Xt(w,"image/jpeg","jpeg"),Xt(w,"image/jpeg","jpg"),Xt(w,"image/bmp","bmp"),Xt(w,"image/gif","gif"),Xt(w,"image/svg+xml","svg")}const T=new $t;for(const[w,p]of y){const E=Xb(p);T.file(w,pr(E))}for(const[w,p]of d)T.file(w,p);for(const{data:w,fileName:p}of v.Media.Array)T.file(`word/media/${p}`,w);return T.generateAsync({type:e,mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})}),Xb=r=>Kr.js2xml(r,{attributeValueFn:t=>String(t).replace(/&(?!amp;|lt;|gt;|quot;|apos;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}),cf=()=>({declaration:{attributes:{version:"1.0",encoding:"UTF-8",standalone:"yes"}},elements:[{type:"element",name:"Relationships",attributes:{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},elements:[]}]}),Yb=r=>Pn(null,[r],function*({data:e}){const t=e instanceof $t?e:yield $t.loadAsync(e),n=new Set;for(const[i,s]of Object.entries(t.files))if(!(!i.endsWith(".xml")&&!i.endsWith(".rels"))&&i.startsWith("word/")&&!i.endsWith(".xml.rels")){const o=cn(yield s.async("text"));af(o).forEach(a=>Zb(a.text).forEach(l=>n.add(l)))}return Array.from(n)}),Zb=r=>{var e;const t=new RegExp("(?<=\\{\\{).+?(?=\\}\\})","gs");return(e=r.match(t))!=null?e:[]},Jb=Object.freeze(Object.defineProperty({__proto__:null,AbstractNumbering:ua,AlignmentType:Ze,AnnotationReference:Qg,Attributes:Fe,BaseXmlComponent:er,Body:vh,Bookmark:bc,BookmarkEnd:Tc,BookmarkStart:_c,Border:au,BorderStyle:Xr,BuilderElement:pe,CarriageReturn:iw,CellMerge:Vc,CellMergeAttributes:qc,CharacterSet:xw,CheckBox:fb,CheckBoxSymbolElement:ln,CheckBoxUtil:qh,Column:tv,ColumnBreak:fw,Comment:uc,CommentRangeEnd:zg,CommentRangeStart:Wg,CommentReference:Gg,Comments:cc,ConcreteHyperlink:Wt,ConcreteNumbering:ca,ContinuationSeparator:rw,DayLong:Yg,DayShort:Vg,DeletedTableCell:Kc,DeletedTableRow:zc,DeletedTextRun:fy,Document:Mh,DocumentAttributeNamespaces:rn,DocumentAttributes:vr,DocumentBackground:_h,DocumentBackgroundAttributes:bh,DocumentDefaults:Bh,DocumentGridType:Ky,Drawing:Zr,DropCapType:Nw,EMPTY_OBJECT:Ja,EmphasisMarkType:Ss,EmptyElement:He,EndnoteIdReference:Gh,EndnoteReference:hc,EndnoteReferenceRun:hb,EndnoteReferenceRunAttributes:zh,Endnotes:Sh,ExternalHyperlink:Vs,File:Mh,FileChild:wr,FootNoteReferenceRunAttributes:jh,FootNotes:Ch,Footer:ub,FooterWrapper:xh,FootnoteReference:Wh,FootnoteReferenceElement:ew,FootnoteReferenceRun:cb,FrameAnchorType:Ow,FrameWrap:Pw,GridSpan:Jc,Header:lb,HeaderFooterReferenceType:Ot,HeaderFooterType:na,HeaderWrapper:Rh,HeadingLevel:dw,HeightRule:Oy,HighlightColor:Rm,HorizontalPositionAlign:cm,HorizontalPositionRelativeFrom:Bu,HpsMeasureElement:$r,HyperlinkType:vw,IgnoreIfEmptyXmlComponent:ct,ImageRun:Ng,ImportedRootElementAttributes:Ql,ImportedXmlComponent:Jl,InitializableXmlComponent:ys,InsertedTableCell:Gc,InsertedTableRow:Wc,InsertedTextRun:ly,InternalHyperlink:vc,LastRenderedPageBreak:sw,LeaderType:pw,Level:Ih,LevelBase:la,LevelForOverride:kv,LevelFormat:lt,LevelOverride:Nh,LevelSuffix:Av,LineNumberRestartFormat:qy,LineRuleType:Nt,Math:Lw,MathAngledBrackets:iy,MathCurlyBrackets:ny,MathDegree:Fc,MathDenominator:Cc,MathFraction:Bw,MathFunction:Jw,MathFunctionName:Mc,MathFunctionProperties:Hc,MathIntegral:jw,MathLimit:Xs,MathLimitLower:zw,MathLimitUpper:Ww,MathNumerator:Rc,MathPreSubSuperScript:Vw,MathRadical:Zw,MathRadicalProperties:Bc,MathRoundBrackets:ty,MathRun:Fw,MathSquareBrackets:ry,MathSubScript:Kw,MathSubSuperScript:qw,MathSum:Uw,MathSuperScript:Gw,Media:oa,MonthLong:Zg,MonthShort:$g,NextAttributeComponent:Ln,NoBreakHyphen:Kg,NumberFormat:fm,NumberProperties:Jr,NumberValueElement:jt,NumberedItemReference:Ew,NumberedItemReferenceFormat:Ec,Numbering:Oh,OnOffElement:de,OverlapType:xy,Packer:Nb,PageBorderDisplay:Vy,PageBorderOffsetFrom:$y,PageBorderZOrder:Xy,PageBorders:fh,PageBreak:hw,PageBreakBefore:mc,PageNumber:Tt,PageNumberElement:nw,PageNumberSeparator:Yy,PageOrientation:sn,PageReference:Sw,PageTextDirection:gh,PageTextDirectionType:Zy,Paragraph:Ye,ParagraphProperties:gt,ParagraphPropertiesChange:kc,ParagraphPropertiesDefaults:Dh,ParagraphRunProperties:fu,PatchType:va,PositionalTab:cw,PositionalTabAlignment:aw,PositionalTabLeader:lw,PositionalTabRelativeTo:ow,PrettifyType:Zh,RelativeHorizontalPosition:Ay,RelativeVerticalPosition:Sy,Run:Be,RunProperties:mt,RunPropertiesChange:du,RunPropertiesDefaults:Fh,SectionProperties:ia,SectionPropertiesChange:yh,SectionType:Qy,Separator:tw,SequentialIdentifier:Dg,ShadingType:wm,SimpleField:Gs,SimpleMailMergeField:Bg,SoftHyphen:qg,SpaceType:ze,StringContainer:_t,StringEnumValueElement:um,StringValueElement:dt,StyleForCharacter:Pt,StyleForParagraph:Vt,StyleLevel:ob,Styles:on,SymbolRun:mu,TDirection:Qc,Tab:fc,TabStopPosition:mw,TabStopType:qs,Table:Ny,TableAnchorType:Ey,TableBorders:ea,TableCell:Qs,TableCellBorders:Zc,TableLayoutType:Cy,TableOfContents:ab,TableProperties:ta,TableRow:Py,TableRowProperties:ra,TableRowPropertiesChange:ah,TextDirection:by,TextEffect:Cm,TextRun:lr,TextWrappingSide:Qu,TextWrappingType:mr,Textbox:bb,ThematicBreak:ou,UnderlineType:ks,VerticalAlign:my,VerticalAlignSection:Xc,VerticalAlignTable:$c,VerticalAnchor:Gu,VerticalMerge:Js,VerticalMergeRevisionType:py,VerticalMergeType:Zs,VerticalPositionAlign:hm,VerticalPositionRelativeFrom:Mu,WORKAROUND2:vv,WORKAROUND3:am,WORKAROUND4:$w,WidthType:tn,WpgGroupRun:Pg,WpsShapeRun:Og,XmlAttributeComponent:we,XmlComponent:J,YearLong:Jg,YearShort:Xg,abstractNumUniqueNumericIdGen:Ou,bookmarkUniqueNumericIdGen:Du,concreteNumUniqueNumericIdGen:Pu,convertInchesToTwip:Xe,convertMillimetersToTwip:zm,convertToXmlComponent:qr,createAlignment:Ts,createBodyProperties:Ku,createBorderElement:Re,createColumns:lh,createDocumentGrid:uh,createDotEmphasisMark:bm,createEmphasisMark:xs,createFrameProperties:xc,createHeaderFooterReference:nn,createHorizontalPosition:Wu,createIndent:lu,createLineNumberType:ch,createMathAccentCharacter:Ic,createMathBase:je,createMathLimitLocation:Nc,createMathNAryProperties:$s,createMathPreSubSuperScriptProperties:Dc,createMathSubScriptElement:zt,createMathSubScriptProperties:Pc,createMathSubSuperScriptProperties:Lc,createMathSuperScriptElement:Gt,createMathSuperScriptProperties:Oc,createOutlineLevel:Ac,createPageMargin:dh,createPageNumberType:ph,createPageSize:mh,createParagraphStyle:gr,createRunFonts:Yr,createSectionType:wh,createShading:ar,createSimplePos:Hu,createSpacing:gc,createStringElement:Ut,createTabStop:yc,createTabStopItem:wc,createTableFloatProperties:th,createTableLayout:rh,createTableLook:ih,createTableRowHeight:sh,createTableWidthElement:yr,createTransformation:zs,createUnderline:hu,createVerticalAlign:Ys,createVerticalPosition:zu,createWrapNone:js,createWrapSquare:ec,createWrapTight:tc,createWrapTopAndBottom:rc,dateTimeValue:su,decimalNumber:Me,docPropertiesUniqueNumericIdGen:Lu,eighthPointMeasureValue:nu,encodeUtf8:pr,hashedId:Ms,hexColorValue:Rt,hpsMeasureValue:tu,longHexNumber:om,measurementOrPercentValue:_s,patchDetector:Yb,patchDocument:$b,percentageValue:ru,pointMeasureValue:iu,positiveUniversalMeasureValue:bs,sectionMarginDefaults:At,sectionPageSizeDefaults:an,shortHexNumber:eu,signedHpsMeasureValue:lm,signedTwipsMeasureValue:nt,standardizeData:oc,twipsMeasureValue:De,uCharHexNumber:vs,uniqueId:fr,uniqueNumericIdCreator:hr,uniqueUuid:Fu,universalMeasureValue:sr,unsignedDecimalNumber:ir},Symbol.toStringTag,{value:"Module"}));Object.defineProperty(ue,"AbstractRichText",{enumerable:!0,get:()=>be.AbstractRichText}),Object.defineProperty(ue,"Area",{enumerable:!0,get:()=>be.Area}),Object.defineProperty(ue,"Background",{enumerable:!0,get:()=>be.Background}),Object.defineProperty(ue,"Badge",{enumerable:!0,get:()=>be.Badge}),Object.defineProperty(ue,"CanvasEvent",{enumerable:!0,get:()=>be.CanvasEvent}),Object.defineProperty(ue,"CheckboxParticle",{enumerable:!0,get:()=>be.CheckboxParticle}),Object.defineProperty(ue,"Cursor",{enumerable:!0,get:()=>be.Cursor}),Object.defineProperty(ue,"CursorAgent",{enumerable:!0,get:()=>be.CursorAgent}),Object.defineProperty(ue,"Draw",{enumerable:!0,get:()=>be.Draw}),Object.defineProperty(ue,"FloatingBar",{enumerable:!0,get:()=>be.FloatingBar}),Object.defineProperty(ue,"Footer",{enumerable:!0,get:()=>be.Footer}),Object.defineProperty(ue,"GlobalEvent",{enumerable:!0,get:()=>be.GlobalEvent}),Object.defineProperty(ue,"Group",{enumerable:!0,get:()=>be.Group}),Object.defineProperty(ue,"Header",{enumerable:!0,get:()=>be.Header}),Object.defineProperty(ue,"Highlight",{enumerable:!0,get:()=>be.Highlight}),Object.defineProperty(ue,"HyperlinkParticle",{enumerable:!0,get:()=>be.HyperlinkParticle}),Object.defineProperty(ue,"ImageObserver",{enumerable:!0,get:()=>be.ImageObserver}),Object.defineProperty(ue,"ImageParticle",{enumerable:!0,get:()=>be.ImageParticle}),Object.defineProperty(ue,"LineBreakParticle",{enumerable:!0,get:()=>be.LineBreakParticle}),Object.defineProperty(ue,"LineNumber",{enumerable:!0,get:()=>be.LineNumber}),Object.defineProperty(ue,"ListParticle",{enumerable:!0,get:()=>be.ListParticle}),Object.defineProperty(ue,"Margin",{enumerable:!0,get:()=>be.Margin}),Object.defineProperty(ue,"MouseObserver",{enumerable:!0,get:()=>be.MouseObserver}),Object.defineProperty(ue,"Override",{enumerable:!0,get:()=>be.Override}),Object.defineProperty(ue,"PageBorder",{enumerable:!0,get:()=>be.PageBorder}),Object.defineProperty(ue,"PageBreakParticle",{enumerable:!0,get:()=>be.PageBreakParticle}),Object.defineProperty(ue,"PageNumber",{enumerable:!0,get:()=>be.PageNumber}),Object.defineProperty(ue,"ParagraphColor",{enumerable:!0,get:()=>be.ParagraphColor}),Object.defineProperty(ue,"Placeholder",{enumerable:!0,get:()=>be.Placeholder}),Object.defineProperty(ue,"Position",{enumerable:!0,get:()=>be.Position}),Object.defineProperty(ue,"Previewer",{enumerable:!0,get:()=>be.Previewer}),Object.defineProperty(ue,"RadioParticle",{enumerable:!0,get:()=>be.RadioParticle}),Object.defineProperty(ue,"Register",{enumerable:!0,get:()=>be.Register}),Object.defineProperty(ue,"ScrollObserver",{enumerable:!0,get:()=>be.ScrollObserver}),Object.defineProperty(ue,"SelectionObserver",{enumerable:!0,get:()=>be.SelectionObserver}),Object.defineProperty(ue,"SeparatorParticle",{enumerable:!0,get:()=>be.SeparatorParticle}),Object.defineProperty(ue,"Strikeout",{enumerable:!0,get:()=>be.Strikeout}),Object.defineProperty(ue,"SubscriptParticle",{enumerable:!0,get:()=>be.SubscriptParticle}),Object.defineProperty(ue,"SuperscriptParticle",{enumerable:!0,get:()=>be.SuperscriptParticle}),Object.defineProperty(ue,"TableOperate",{enumerable:!0,get:()=>be.TableOperate}),Object.defineProperty(ue,"TableParticle",{enumerable:!0,get:()=>be.TableParticle}),Object.defineProperty(ue,"TableTool",{enumerable:!0,get:()=>be.TableTool}),Object.defineProperty(ue,"TextParticle",{enumerable:!0,get:()=>be.TextParticle}),Object.defineProperty(ue,"Underline",{enumerable:!0,get:()=>be.Underline}),Object.defineProperty(ue,"Watermark",{enumerable:!0,get:()=>be.Watermark}),Object.defineProperty(ue,"BaseAdapter",{enumerable:!0,get:()=>Je.BaseAdapter}),Object.defineProperty(ue,"BaseCommandAdapter",{enumerable:!0,get:()=>Je.BaseCommandAdapter}),Object.defineProperty(ue,"Command",{enumerable:!0,get:()=>Je.Command}),Object.defineProperty(ue,"CommandAdapt",{enumerable:!0,get:()=>Je.CommandAdapt}),Object.defineProperty(ue,"PageAdapter",{enumerable:!0,get:()=>Je.PageAdapter}),Object.defineProperty(ue,"ParagraphAdapter",{enumerable:!0,get:()=>Je.ParagraphAdapter}),Object.defineProperty(ue,"TableAdapter",{enumerable:!0,get:()=>Je.TableAdapter}),Object.defineProperty(ue,"TextStyleAdapter",{enumerable:!0,get:()=>Je.TextStyleAdapter}),Object.defineProperty(ue,"EventBus",{enumerable:!0,get:()=>Zt.EventBus}),Object.defineProperty(ue,"Listener",{enumerable:!0,get:()=>Zt.Listener}),Object.defineProperty(ue,"RangeManager",{enumerable:!0,get:()=>Zt.RangeManager}),Object.defineProperty(ue,"KeymapComponent",{enumerable:!0,get:()=>pn.KeymapComponent}),Object.defineProperty(ue,"Shortcut",{enumerable:!0,get:()=>pn.Shortcut}),Object.defineProperty(ue,"BlockParticle",{enumerable:!0,get:()=>Ie.BlockParticle}),Object.defineProperty(ue,"CheckboxControl",{enumerable:!0,get:()=>Ie.CheckboxControl}),Object.defineProperty(ue,"Control",{enumerable:!0,get:()=>Ie.Control}),Object.defineProperty(ue,"ControlBorder",{enumerable:!0,get:()=>Ie.ControlBorder}),Object.defineProperty(ue,"ControlComponent",{enumerable:!0,get:()=>Ie.ControlComponent}),Object.defineProperty(ue,"ControlSearch",{enumerable:!0,get:()=>Ie.ControlSearch}),Object.defineProperty(ue,"DateControl",{enumerable:!0,get:()=>Ie.DateControl}),Object.defineProperty(ue,"DateParticle",{enumerable:!0,get:()=>Ie.DateParticle}),Object.defineProperty(ue,"DatePicker",{enumerable:!0,get:()=>Ie.DatePicker}),Object.defineProperty(ue,"GadgetComponent",{enumerable:!0,get:()=>Ie.GadgetComponent}),Object.defineProperty(ue,"LaTexParticle",{enumerable:!0,get:()=>Ie.LaTexParticle}),Object.defineProperty(ue,"NumberControl",{enumerable:!0,get:()=>Ie.NumberControl}),Object.defineProperty(ue,"RadioControl",{enumerable:!0,get:()=>Ie.RadioControl}),Object.defineProperty(ue,"Search",{enumerable:!0,get:()=>Ie.Search}),Object.defineProperty(ue,"SelectControl",{enumerable:!0,get:()=>Ie.SelectControl}),Object.defineProperty(ue,"TextControl",{enumerable:!0,get:()=>Ie.TextControl}),Object.defineProperty(ue,"CommentComponent",{enumerable:!0,get:()=>Sr.CommentComponent}),Object.defineProperty(ue,"RevisionComponent",{enumerable:!0,get:()=>Sr.RevisionComponent}),ue.Actuator=Rf,ue.DocxParser=qa,ue.Editor=Na,ue.ExportComponent=xa,ue.I18n=Ia,ue.WorkerComponent=Aa,ue.WorkerManager=Ea,ue.createDocxParser=$a,ue.default=Na,ue.getClipboardData=If,ue.getIsClipboardContainFile=Of,ue.parseDocx=sp,ue.removeClipboardData=Nf,ue.version=Pf,Object.keys(ce).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(ue,r)&&Object.defineProperty(ue,r,{enumerable:!0,get:()=>ce[r]})}),Object.keys(dn).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(ue,r)&&Object.defineProperty(ue,r,{enumerable:!0,get:()=>dn[r]})}),Object.defineProperties(ue,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
135
135
|
//# sourceMappingURL=core.umd.cjs.map
|