@univerjs/sheets-ui 0.6.0-nightly.202502121606 → 0.6.0-nightly.202502141606

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/lib/index.css CHANGED
@@ -1 +1 @@
1
- .univer-absolute{position:absolute}.univer-right-0{right:0}.univer-z-\[1001\]{z-index:1001}.univer-m-0{margin:0}.univer-mb-2{margin-bottom:.5rem}.univer-box-border{box-sizing:border-box}.univer-flex{display:flex}.univer-h-full{height:100%}.univer-max-h-\[360px\]{max-height:360px}.univer-w-\[300px\]{width:300px}.univer-w-\[50\%\]{width:50%}.univer-w-full{width:100%}.univer-flex-shrink-0{flex-shrink:0}.univer-cursor-not-allowed{cursor:not-allowed}.univer-cursor-pointer{cursor:pointer}.univer-list-none{list-style-type:none}.univer-appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.univer-items-center{align-items:center}.univer-justify-center{justify-content:center}.univer-justify-between{justify-content:space-between}.univer-gap-2{gap:.5rem}.univer-overflow-hidden{overflow:hidden}.univer-overflow-y-auto{overflow-y:auto}.univer-text-ellipsis{text-overflow:ellipsis}.univer-whitespace-nowrap{white-space:nowrap}.univer-border{border-width:1px}.univer-border-0{border-width:0px}.univer-border-b{border-bottom-width:1px}.univer-border-solid{border-style:solid}.univer-border-none{border-style:none}.univer-border-gray-200{--tw-border-opacity: 1;border-color:#e3e5ea;border-color:rgba(227,229,234,var(--tw-border-opacity, 1))}.univer-bg-transparent{background-color:transparent}.univer-p-0{padding:0}.univer-p-2{padding:.5rem}.univer-px-1{padding-left:.25rem;padding-right:.25rem}.univer-px-1\.5{padding-left:.375rem;padding-right:.375rem}.univer-px-2{padding-left:.5rem;padding-right:.5rem}.univer-py-1{padding-top:.25rem;padding-bottom:.25rem}.univer-text-sm{font-size:.875rem;line-height:1.25rem}.univer-text-xs{font-size:.75rem;line-height:1rem}.univer-font-semibold{font-weight:600}.univer-text-gray-300{--tw-text-opacity: 1;color:#cdd0d8;color:rgba(205,208,216,var(--tw-text-opacity, 1))}.univer-text-gray-400{--tw-text-opacity: 1;color:#979dac;color:rgba(151,157,172,var(--tw-text-opacity, 1))}.univer-text-gray-600{--tw-text-opacity: 1;color:#414657;color:rgba(65,70,87,var(--tw-text-opacity, 1))}.univer-text-gray-700{--tw-text-opacity: 1;color:#2c3040;color:rgba(44,48,64,var(--tw-text-opacity, 1))}.univer-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.univer-duration-200{transition-duration:.2s}.univer-scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.univer-scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.univer-scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.univer-scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.univer-scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.univer-scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.univer-scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.univer-scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.univer-scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.univer-scrollbar-thin{scrollbar-width:thin;scrollbar-color:initial initial;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.univer-scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.univer-scrollbar-track-transparent{--scrollbar-track: transparent !important}.univer-scrollbar-thumb-gray-300{--scrollbar-thumb: #CDD0D8 !important}.hover\:univer-bg-gray-100:hover{--tw-bg-opacity: 1;background-color:#eeeff1;background-color:rgba(238,239,241,var(--tw-bg-opacity, 1))}.hover\:univer-bg-neutral-100:hover{--tw-bg-opacity: 1;background-color:#f5f5f5;background-color:rgba(245,245,245,var(--tw-bg-opacity, 1))}.hover\:univer-bg-transparent:hover{background-color:transparent}.focus\:univer-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.dark\:hover\:univer-bg-gray-600:hover:where(.univer-dark,.univer-dark *){--tw-bg-opacity: 1;background-color:#414657;background-color:rgba(65,70,87,var(--tw-bg-opacity, 1))}.univer-sheets-ui-context-menu-input{display:flex;gap:var(--margin-sm);align-items:center}.univer-sheets-ui-context-menu-input-container{width:72px}.univer-sheets-ui-context-menu-input-number{height:24px}.univer-ui-plugin-sheets-border-panel{display:grid;grid-gap:var(--margin-sm);gap:var(--margin-sm)}.univer-ui-plugin-sheets-border-panel-position{display:grid;grid-template-columns:repeat(5,1fr);grid-gap:var(--margin-xxs);gap:var(--margin-xxs);box-sizing:border-box;padding-bottom:var(--padding-base);border-bottom:1px solid rgb(var(--border-color))}.univer-ui-plugin-sheets-border-panel-position-item{display:flex;align-items:center;justify-content:center;width:24px;height:24px;font-size:var(--font-size-lg);border-radius:var(--border-radius-base)}.univer-ui-plugin-sheets-border-panel-position-item:hover,.univer-ui-plugin-sheets-border-panel-position-item-active{background-color:rgb(var(--bg-color-hover))}.univer-ui-plugin-sheets-border-panel-styles{display:flex;gap:var(--margin-xs);align-items:center;justify-content:space-around}.univer-ui-plugin-sheets-border-panel-board{box-sizing:border-box;padding:var(--padding-base);background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-base)}.univer-ui-plugin-sheets-border-panel-button{cursor:pointer;position:relative;display:flex;gap:var(--margin-xs);align-items:center;height:24px;padding:0 var(--padding-xs);font-size:var(--font-size-lg);border-radius:var(--border-radius-base);transition:all .15s}.univer-ui-plugin-sheets-border-panel-button:hover{background-color:rgb(var(--bg-color-hover))}.univer-ui-plugin-sheets-border-panel-more-icon{color:rgb(var(--grey-400))}.univer-defined-name{display:flex;position:relative;transition:height .15s;border-right:1px solid rgb(var(--border-color));height:100%;width:100px;box-sizing:border-box}.univer-defined-name-overlay{position:relative;width:300px;background-color:rgb(var(--color-white))}.univer-defined-name-overlay-container{position:relative;height:100%;max-height:400px;width:100%;overflow:hidden;overflow-y:auto;scrollbar-color:rgba(var(--scrollbar-color),.7) transparent;scrollbar-gutter:auto;scrollbar-width:thin}.univer-defined-name-overlay-item{display:flex;align-items:center;justify-content:space-between;padding:var(--padding-xs);border-bottom:1px solid rgb(var(--border-color));-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}.univer-defined-name-overlay-item:hover{background-color:rgb(var(--grey-50))}.univer-defined-name-overlay-item-name{font-size:var(--font-size-md);color:rgb(var(--grey-900));margin:5px 0;overflow:hidden;text-overflow:ellipsis;flex:1}.univer-defined-name-overlay-item-name-for-sheet{font-size:var(--font-size-xxs);color:rgb(var(--grey-400));margin-left:5px;font-weight:400}.univer-defined-name-overlay-item-formula{font-size:var(--font-size-xs);color:rgb(var(--grey-800));margin:5px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.univer-defined-name-overlay-manager{display:flex;flex-direction:column;overflow-y:auto;width:100%;cursor:pointer;overflow:hidden;background-color:rgb(var(--color-white))}.univer-defined-name-overlay-manager:hover{background-color:rgb(var(--grey-50))}.univer-defined-name-overlay-manager-title{font-size:var(--font-size-xs);font-weight:700;margin:var(--margin-xs);margin-bottom:0;color:rgb(var(--grey-800))}.univer-defined-name-overlay-manager-content{font-size:var(--font-size-xxs);margin:var(--margin-xs);color:rgb(var(--grey-500))}.univer-defined-name-container{width:100%;position:relative}.univer-defined-name-container-scroll{width:100%;overflow:hidden;overflow-y:auto;position:absolute}.univer-defined-name-container-addButton{display:flex;align-items:center;justify-content:center;width:100%;height:40px;border-top:1px solid rgb(var(--border-color));border-bottom:1px solid rgb(var(--border-color));font-size:var(--font-size-md);color:rgb(var(--primary-color))}.univer-defined-name-container-addButton:hover{background-color:rgb(var(--grey-50));cursor:pointer}.univer-defined-name-container-addButton-text{margin-left:5px}.univer-defined-name-container-item{position:relative;display:flex;align-items:center;justify-content:space-between;padding:var(--padding-xs);border-bottom:1px solid rgb(var(--border-color));-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:default}.univer-defined-name-container-item-name{font-size:var(--font-size-sm);font-weight:500;color:rgb(var(--color-black));margin:5px 0;max-width:190px;max-height:100px;overflow:hidden}.univer-defined-name-container-item-name-for-sheet{font-size:var(--font-size-xxs);color:rgb(var(--grey-400));margin-left:5px;font-weight:400}.univer-defined-name-container-item-formula-or-refString{font-size:var(--font-size-xs);color:rgb(var(--grey-500));font-weight:400;margin:5px 0;max-height:100px;text-overflow:ellipsis;overflow:hidden}.univer-defined-name-container-item-update{position:absolute;font-size:var(--font-size-xs);color:rgb(var(--primary-color));cursor:pointer;padding:4px;transform:translateY(-50%);border-radius:var(--border-radius-base);right:60px;top:20px}.univer-defined-name-container-item-update:hover{background-color:rgb(var(--hyacinth-50))}.univer-defined-name-container-item-delete{position:absolute;font-size:var(--font-size-xs);color:rgb(var(--error-color));cursor:pointer;padding:4px;right:20px;top:20px;transform:translateY(-50%);border-radius:var(--border-radius-base)}.univer-defined-name-container-item-delete:hover{background-color:rgb(var(--hyacinth-50))}.univer-defined-name-container-item-show{display:none}.univer-defined-name-container-item:hover{background-color:rgb(var(--grey-50))}.univer-defined-name-container-item:hover .univer-defined-name-container-item-show{display:block}.univer-defined-name-input{display:flex;align-items:center;justify-content:left;border-bottom:1px solid rgb(var(--border-color));padding-bottom:5px}.univer-defined-name-input>div{margin-top:16px}.univer-defined-name-input-formula-selector-text-wrap{margin-top:16px;height:100%;position:relative;padding:0 0 0 6px;border:1px solid rgb(var(--border-color));transition:all .15s;border-radius:var(--border-radius-base)}.univer-defined-name-input-text-editor-container{position:relative;width:95%;height:30px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.univer-defined-name-input-validation{display:flex;align-items:center;justify-content:left;color:rgb(var(--error-color));font-size:var(--font-size-xs)}.univer-defined-name-input-validation>span{margin-right:2px}.univer-defined-name-input-disable{color:rgb(var(--grey-200));cursor:not-allowed}.univer-count-bar{display:flex;flex:0 0 260px;justify-content:flex-end}.univer-editor-container{position:absolute;z-index:10;top:200px;left:100px;display:flex;width:100px;height:50px;border:1px solid rgb(var(--primary-color));box-shadow:none;box-sizing:content-box}.univer-editor-container .univer-editor-input{position:relative;display:flex;width:100%;height:100%}.univer-editor-container .univer-editor-input canvas{position:absolute}.univer-editor-container .univer-editor-input .univer-sheet-embedding-formula-editor-wrap{height:auto;border:none;padding:0;border-radius:0}.univer-formula-box{display:flex;box-sizing:border-box;height:28px;background:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color));transition:height .15s}.univer-formula-box .univer-name-ranges{box-sizing:border-box;width:100px;height:100%;position:relative}.univer-formula-box .univer-formula-bar{display:flex;width:100%;height:100%}.univer-formula-box .univer-formula-bar .univer-formula-icon{padding:6px 0}.univer-formula-box .univer-formula-bar .univer-formula-icon-disable{color:rgb(var(--grey-200));cursor:not-allowed}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:80px;height:100%;font-size:var(--font-size-xs);border-right:1px solid rgb(var(--border-color))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container{display:flex;align-items:center;justify-content:center;padding:var(--padding-xs);font-size:var(--font-size-lg);border-radius:var(--border-radius-base)}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-success.univer-formula-active{cursor:pointer;color:rgb(var(--success-color))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-success.univer-formula-active:hover{background-color:rgb(var(--grey-50))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-error.univer-formula-active{cursor:pointer;color:rgb(var(--error-color))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-error.univer-formula-active:hover{background-color:rgb(var(--grey-50))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-fx{cursor:pointer}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-fx:hover{background-color:rgb(var(--grey-50))}.univer-formula-box .univer-formula-bar .univer-formula-input{flex:1;position:relative}.univer-formula-box .univer-formula-bar .univer-formula-input-mask{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:100}.univer-formula-box .univer-formula-bar .univer-formula-container{overflow:hidden;display:flex;flex:1;width:100%;padding:0 0 0 10px}.univer-formula-box .univer-formula-bar .univer-formula-container .univer-sheet-embedding-formula-editor-wrap{height:auto;border:none;padding:0;border-radius:0;height:100%}.univer-formula-box .univer-formula-bar .univer-formula-container .univer-formula-content{position:relative;width:100%;height:100%;word-wrap:break-word;outline:none}.univer-formula-box .univer-formula-bar .univer-formula-container .univer-arrow-container{cursor:pointer;display:flex;align-items:center;justify-content:center;width:20px;height:100%;font-size:var(--font-size-xs);color:rgb(var(--text-color-secondary))}.univer-formula-box .univer-formula-bar .univer-formula-container .univer-arrow-container-disable{color:rgb(var(--grey-200));cursor:not-allowed}.univer-operate-container{position:absolute;z-index:10;right:0;left:0;width:0;height:0}.univer-auto-fill-popup-menu{display:grid;grid-gap:var(--margin-xxs);gap:var(--margin-xxs);align-items:center;box-sizing:border-box;min-width:128px;margin-top:0;margin-bottom:0;padding:var(--padding-sm);font-size:var(--font-size-base);background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-lg)}.univer-auto-fill-popup-menu li{list-style:none}.univer-auto-fill-popup-menu-item{cursor:pointer;position:relative;display:flex;align-items:center;box-sizing:border-box;width:134px;height:28px;padding:var(--padding-xs) 0 var(--padding-xs) 36px;font-size:13px;font-weight:400;font-style:normal;line-height:20px;color:rgb(#35322b);color:rgb(var(--black, #35322b));text-align:left;border-radius:4px;border-radius:var(--border-radius-base);transition:background .2s}.univer-auto-fill-popup-menu-item:hover{background-color:rgb(var(--bg-color-hover))}.univer-auto-fill-popup-menu-item-icon{position:absolute;top:50%;left:var(--padding-xs);transform:translateY(-50%);display:flex;align-items:center;justify-content:center}.univer-auto-fill-popup-menu-item-title{padding:var(--padding-xs) var(--padding-xs) var(--padding-xs) 0;vertical-align:middle}.univer-auto-fill-popup-menu-item-hide{color:rgb(var(--text-color-secondary))}.univer-auto-fill-popup-menu-item:hover{background:rgb(var(--grey-100))}.univer-btn-container{display:flex;align-items:center;justify-content:center;padding:3px;background:#fff;border:1px solid rgb(#e5e5e5);border:1px solid rgb(var(--grey-200, #e5e5e5));border-radius:4px}.univer-btn-container:hover,.univer-btn-container.univer-btn-container-expand{background:rgb(#f5f5f5);background:rgb(var(--grey-100, #f5f5f5))}.univer-sheet-bar{position:relative;display:flex;flex:1 1 0px;flex-direction:row;min-width:calc(100% - 592px);max-width:calc(100% - 260px);height:100%;background-color:rgb(var(--bg-color-secondary))}.univer-sheet-bar-options{display:flex;flex-direction:row;align-items:center;margin:var(--margin-xxs);transition:display .2s}.univer-sheet-bar-options-divider:after{content:"";display:block;width:1px;height:16px;margin:0 var(--margin-xs);background-color:rgb(var(--grey-400))}.univer-sheet-bar-btn{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;font-size:var(--font-size-lg);color:rgb(var(--text-color-secondary-darker));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none}.univer-sheet-bar-btn:not([disabled]):hover{background-color:rgb(var(--bg-color-hover))}.univer-sheet-bar-btn[disabled]{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-sheet-container{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;height:36px;padding:0 var(--padding-xl);background-color:rgb(var(--bg-color-secondary))}.univer-sheet-container>span:not(:last-of-type){margin-right:4px}.univer-sheet-bar-menu{max-height:calc(100vh - 36px);display:grid;grid-gap:var(--margin-xxs);gap:var(--margin-xxs);align-items:center;overflow-y:auto;box-sizing:border-box;margin:0;padding:var(--padding-sm);background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-lg)}.univer-sheet-bar-menu li{list-style:none}.univer-sheet-bar-menu-item{cursor:pointer;position:relative;display:flex;box-sizing:border-box;padding:var(--padding-xs) 24px;color:rgb(var(--text-color));border-radius:var(--border-radius-base);transition:background .2s}.univer-sheet-bar-menu-item:hover{background-color:rgb(var(--bg-color-hover))}.univer-sheet-bar-menu-item-icon{position:absolute;top:50%;left:var(--margin-xxs);transform:translateY(-50%);color:transparent}.univer-sheet-bar-menu-item-hide .univer-sheet-bar-menu-item-icon{display:flex;align-items:center;justify-content:center;width:16px;height:16px;color:rgb(var(--grey-400))}.univer-sheet-bar-menu-item-select{font-weight:500;color:rgb(var(--primary-color))}.univer-sheet-bar-menu-item-select .univer-sheet-bar-menu-item-icon{display:flex;align-items:center;justify-content:center;width:16px;height:16px;color:rgb(var(--primary-color))}.univer-sheet-bar-menu-item-label{font-size:var(--font-size-xs);font-weight:400;line-height:20px;display:flex;align-items:center}.univer-slide-tab-bar-container{overflow:hidden;max-width:calc(100% - 112px)}.univer-slide-tab-bar-container .univer-slide-tab-bar{-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden;display:flex;flex-direction:row;align-items:center;padding:var(--padding-xs) 6px;transition:box-shadow .2s}.univer-slide-tab-item{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;flex-direction:row;flex-grow:1;align-items:center;box-sizing:border-box;margin:0 var(--margin-xxs);font-size:var(--font-size-xs);line-height:16px;color:rgb(var(--grey-1000));border-radius:var(--border-radius-base)}.univer-slide-tab-item:not(.univer-slide-tab-active):hover{background-color:rgb(var(--bg-color-hover))}.univer-slide-tab-item .univer-slide-tab-div{box-sizing:border-box;padding:var(--padding-xs) var(--padding-sm);white-space:nowrap;border:2px solid transparent;border-radius:var(--border-radius-base);display:flex;align-items:center}.univer-slide-tab-item .univer-slide-tab-div-edit{cursor:text;outline:none}.univer-slide-tab-item .univer-slide-tab-div-edit::-moz-selection{color:rgb(var(--color-white));background-color:rgb(var(--primary-color))}.univer-slide-tab-item .univer-slide-tab-div-edit::selection{color:rgb(var(--color-white));background-color:rgb(var(--primary-color))}.univer-slide-tab-active{font-weight:700;color:rgb(var(--primary-color));background-color:rgb(var(--bg-color-secondary));box-shadow:0 0 8px #00000014;transition:box-shadow .2s;display:flex;justify-content:center}.univer-slide-tab-item-dropdown{-webkit-user-select:none;-moz-user-select:none;user-select:none;min-width:auto!important}.univer-status-bar{display:flex;align-items:center;max-width:332px}.univer-status-bar.univer-single-mode{max-width:136px}.univer-status-bar-div{width:1px;height:16px;margin-left:10px;background:rgb(#ccc);background:rgb(var(--grey-400, #ccc))}.univer-statistic-list{display:flex}.univer-statistic-list-column{flex-direction:column}.univer-statistic-list-column .univer-statistic-item{font-size:12px;line-height:140%;color:rgb(var(--grey-500))}.univer-statistic-item{cursor:default;overflow:hidden;display:flex;justify-content:flex-start;max-width:106px;margin-right:8px;font-size:var(--font-size-xxs);font-weight:400;font-style:normal;line-height:20px;color:rgb(var(--grey-900));text-align:center;text-overflow:ellipsis;white-space:nowrap}.univer-statistic-item:hover{color:rgb(var(--color-black))}.univer-statistic-picker{display:grid;grid-gap:var(--margin-sm);gap:var(--margin-sm);align-items:center;box-sizing:border-box;width:196px;padding:var(--padding-base);font-size:var(--font-size-xs);background-color:rgb(var(--color-white));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-lg)}.univer-statistic-picker-item{display:flex;align-items:center;justify-content:flex-start}.univer-statistic-more{transform:rotate(90deg);display:flex;align-items:center;justify-content:center;width:24px;height:24px;font-size:12px;color:rgb(#e8e8e8);color:rgb(var(--grey-600, #e8e8e8));border-radius:4px}.univer-statistic-more:hover{background:rgb(#e8e8e8);background:rgb(var(--grey-300, #e8e8e8))}.univer-cell-alert{box-sizing:border-box;box-shadow:var(--box-shadow-base);padding:var(--padding-sm) var(--padding-base);border-radius:var(--border-radius-lg);color:rgba(var(--color-black));background:rgba(var(--color-white));z-index:100;width:156px}.univer-cell-alert-title{height:20px;font-size:var(--font-size-sm);font-weight:500;display:flex;flex-direction:row;align-items:center;margin-bottom:6px;line-height:20px}.univer-cell-alert-icon{margin-right:6px}.univer-cell-alert-icon-error{color:rgba(var(--red-400))}.univer-cell-alert-icon-info{color:rgba(var(--blue-500))}.univer-cell-alert-icon-warning{color:rgba(var(--gold-400))}.univer-cell-alert-content{font-size:var(--font-size-sm)}.univer-sheet-paste-options-wrapper{position:absolute;display:flex;background-color:#fff;z-index:10;border-radius:4px}.univer-sheet-paste-options-icon-wrapper{display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid rgb(#e5e5e5);border:1px solid rgb(var(--grey-200, #e5e5e5));border-radius:4px;padding:3px}.univer-sheet-paste-options-menu{border:1px solid rgb(#e5e5e5);border:1px solid rgb(var(--grey-200, #e5e5e5));box-shadow:var(--box-shadow-base);border-radius:4px}.univer-sheet-paste-options-menu ul{list-style-type:none;padding:0;margin:8px}.univer-sheet-paste-options-menu-item{padding:8px 4px;cursor:pointer;position:relative}.univer-sheet-paste-options-menu-item:hover{background-color:rgb(#f5f5f5);background-color:rgb(var(--grey-100, #f5f5f5))}.univer-sheet-paste-options-menu-item-title{font-size:13px;color:rgb(#35322b);color:rgb(var(--black, #35322b));margin-left:20px}.univer-sheet-paste-options-menu-item-icon{position:absolute}.univer-mobile-sheet-bar-container{width:100%;overflow-x:scroll;height:32px;background-color:rgb(var(--bg-color))}.univer-mobile-sheet-bar-slider{display:flex;flex-wrap:nowrap;align-items:center;height:32px}.univer-mobile-sheet-bar-item{align-items:center;box-sizing:border-box;flex-grow:1;flex-shrink:0;flex-wrap:nowrap;font-size:12px;height:100%;line-height:28px;min-width:48px;overflow:hidden;padding:2px 4px;text-align:center;white-space:nowrap;border-right:1px solid rgb(var(--border-color));background-color:rgb(var(--bg-color));text-overflow:ellipsis;max-width:120px}.univer-mobile-sheet-bar-item.univer-mobile-sheet-bar-item-activated{color:rgb(var(--primary-color));background-color:rgb(var(--bg-color-secondary))}.univer-permission-panel-detail-wrapper{margin-top:16px;height:calc(100% - 16px);display:flex;flex-direction:column}.univer-radio-group-vertical{display:flex;flex-direction:column;font-weight:400}.univer-sheet-permission-design-person-panel{height:270px;border:1px solid rgb(var(--grey-200));border-radius:var(--border-radius-lg);padding:var(--padding-base);margin-bottom:var(--margin-xs);display:flex;flex-direction:column}.univer-sheet-permission-design-person-panel-header{display:flex;justify-content:space-between;align-items:center}.univer-sheet-permission-design-person-panel-header-add{cursor:pointer;color:rgb(var(--blue-500))}.univer-sheet-permission-design-person-panel-split{height:1px;background-color:rgb(var(--grey-200));margin:var(--margin-xs) 0}.univer-sheet-permission-design-person-panel-content-item{height:28px;line-height:28px;margin-bottom:var(--margin-sm);display:flex;align-items:center}.univer-sheet-permission-design-person-panel-content-item:last-child{margin-bottom:0}.univer-sheet-permission-design-person-panel-content-item-name{width:130px;color:rgb(var(--color-black));white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-left:6px}.univer-sheet-permission-design-person-panel-content-item-select{width:90px;cursor:pointer}.univer-sheet-permission-design-person-panel .univer-sheet-permission-design-person-panel-content-item-select.univer-select-single:not(.univer-select-customize-input) .univer-select-selector{border:none;padding:0;color:rgb(var(--grey-900))}.univer-sheet-permission-design-person-panel .univer-sheet-permission-design-person-panel-content-item-select.univer-select-show-arrow .univer-select-arrow{right:0}.univer-sheet-permission-design-person-panel-content{flex:1}.univer-sheet-permission-panel-title{font-weight:500}.univer-sheet-permission-panel-footer{display:flex;flex-direction:row-reverse;padding:20px 0;margin-top:auto}.univer-sheet-permission-panel-footer button:first-child{margin-left:8px}.univer-permission-range-selector{font-weight:400}.univer-permission-range-selector-error,.univer-sheet-permission-panel-name-input-error,.univer-permission-range-selector-error:hover,.univer-sheet-permission-panel-name-input-error:hover{border:1px solid rgb(var(--red-400))}.univer-permission-range-selector-error-text,.univer-sheet-permission-panel-name-input-error-text{height:20px;line-height:20px;color:rgb(var(--red-400));font-size:var(--font-size-xs);font-weight:400}.univer-sheet-permission-list-panel-wrapper{margin-top:var(--margin-xs);height:calc(100% - 8px);display:flex;flex-direction:column}.univer-sheet-permission-list-panel-header{display:flex;padding:var(--padding-sm) 0;height:30px}.univer-sheet-permission-list-panel-header-type{display:flex;flex-direction:column;align-items:center;margin-right:var(--margin-lg);cursor:pointer}.univer-sheet-permission-list-panel-header-type div{height:24px;line-height:24px}.univer-sheet-permission-list-panel-header-type-bottom{height:2px;width:24px;background-color:rgb(var(--blue-500));margin-top:var(--margin-xxs)}.univer-sheet-permission-list-panel-header-select{color:rgb(var(--blue-500));height:24px;line-height:24px;font-size:var(--font-size-lg);font-weight:500}.univer-sheet-permission-list-item-header-icon{border-radius:var(--border-radius-base);height:24px;padding:4px;box-sizing:border-box}.univer-sheet-permission-list-item-header-icon:hover{background-color:rgb(var(--grey-200))}.univer-sheet-permission-list-item{margin-top:var(--margin-sm);border-radius:var(--border-radius-lg);border:1px solid rgb(var(--grey-200));padding:var(--padding-base)}.univer-sheet-permission-list-item:hover{background-color:rgb(var(--grey-50))}.univer-sheet-permission-list-item-header{height:20px;line-height:20px;display:flex;justify-content:space-between}.univer-sheet-permission-list-item-header-name{font-weight:500;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.univer-sheet-permission-list-item-header-operator{display:flex;align-items:center}.univer-sheet-permission-list-item-header-operator div{margin-left:var(--margin-xs)}.univer-sheet-permission-list-item-split{height:1px;background-color:rgb(var(--grey-200));margin:var(--margin-xs) 0}.univer-sheet-permission-list-item-content-edit{display:flex;align-items:center}.univer-sheet-permission-list-item-content-view{display:flex;align-items:center;margin-top:var(--margin-xs)}.univer-sheet-permission-list-item-content-desc{font-size:12px;color:rgb(var(--grey-400));max-width:256px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:var(--margin-xs)}.univer-sheet-permission-list-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1}.univer-sheet-permission-list-empty-text{width:240px;word-wrap:break-word;color:rgb(var(--grey-400));font-size:13px}.univer-sheet-permission-list-item-content-title{font-size:12px;height:16px;line-height:16px;flex-grow:1;color:rgb(var(--color-black))}.univer-sheet-permission-list-item-content-sub{font-size:12px;height:16px;line-height:16px;color:rgb(var(--grey-600))}.univer-sheet-permission-panel-add-wrapper{padding:20px 0;margin-top:auto}.univer-sheet-permission-panel-add-button{width:100%;display:flex;align-items:center;justify-content:center}.univer-sheet-permission-panel-add-button div{margin-right:4px}.univer-spin-container{position:relative;width:100%;height:100%}.univer-spin-overlay{position:absolute;top:-2px;left:-2px;right:-2px;bottom:-2px;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background-color:#ffffff80;z-index:10}.univer-spinner{width:40px;height:40px;border:4px solid #f3f3f3;border-top:4px solid #3498db;border-radius:50%;animation:univer-spin 2s linear infinite}.univer-content-blur{filter:blur(2px);pointer-events:none}@keyframes univer-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.univer-sheet-permission-dialog-wrapper{display:flex;flex-direction:column;padding:2px}.univer-sheet-permission-dialog-split{height:1px;background-color:rgb(var(--grey-200))}.univer-sheet-permission-dialog-item{display:flex;align-items:center;justify-content:space-between;height:20px;line-height:20px;margin:6px 0}.univer-sheet-permission-user-dialog-footer{height:36px;padding:var(--padding-xs) 0;display:flex;justify-content:flex-end;align-items:center;margin-top:var(--margin-xs)}.univer-sheet-permission-user-dialog-button{height:32px;line-height:32px;padding:0px var(--padding-base)}.univer-sheet-permission-user-dialog-wrapper{height:329px;padding:var(--padding-base);box-sizing:content-box}.univer-sheet-permission-user-dialog-search-input{width:256px;height:32px}.univer-sheet-permission-user-list{height:240px;overflow-y:auto}.univer-sheet-permission-user-list-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.univer-sheet-permission-user-list-empty-text{width:240px;word-wrap:break-word;color:rgb(var(--grey-400));font-size:13px}.univer-sheet-permission-user-item{display:flex;align-items:center;margin:var(--margin-xs) 0;border-radius:6px;padding:var(--padding-xs) var(--padding-sm)}.univer-sheet-permission-user-item:hover{background-color:rgb(var(--grey-50))}.univer-sheet-permission-user-item div{margin-left:6px}.univer-sheet-permission-user-item-name{width:186px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.univer-sheet-permission-split{height:1px;background-color:rgb(var(--grey-200))}.univer-sheet-permission-user-dialog-footer{padding:var(--padding-xs) 0;display:flex;justify-content:flex-end;align-items:center;margin-top:var(--margin-xs);height:28px}.univer-sheet-permission-user-dialog-footer-confirm{margin-left:var(--margin-sm)}.univer-sheet-permission-user-dialog-button{height:28px;line-height:28px;padding:0px var(--padding-base)}.univer-sheet-permission-alert-dialog{padding:var(--padding-xl) 24px}.univer-sheet-permission-alert-dialog-title{font-size:var(--font-size-lg);font-weight:500;margin-bottom:var(--margin-base)}.univer-sheet-permission-alert-dialog-button{margin-top:var(--margin-lg);display:flex;justify-content:flex-end}.sheet-permission-user-dialog .univer-dialog-close,.sheet-permission-user-dialog .univer-dialog-header{display:none}.sheet-permission-user-dialog .univer-dialog-body{padding:0}
1
+ .univer-absolute{position:absolute}.univer-right-0{right:0}.univer-z-\[1001\]{z-index:1001}.univer-m-0{margin:0}.univer-mb-2{margin-bottom:.5rem}.univer-box-border{box-sizing:border-box}.univer-flex{display:flex}.univer-h-full{height:100%}.univer-max-h-\[360px\]{max-height:360px}.univer-w-\[300px\]{width:300px}.univer-w-\[50\%\]{width:50%}.univer-w-full{width:100%}.univer-flex-shrink-0{flex-shrink:0}.univer-cursor-not-allowed{cursor:not-allowed}.univer-cursor-pointer{cursor:pointer}.univer-list-none{list-style-type:none}.univer-appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.univer-items-center{align-items:center}.univer-justify-center{justify-content:center}.univer-justify-between{justify-content:space-between}.univer-gap-2{gap:.5rem}.univer-overflow-hidden{overflow:hidden}.univer-overflow-y-auto{overflow-y:auto}.univer-text-ellipsis{text-overflow:ellipsis}.univer-whitespace-nowrap{white-space:nowrap}.univer-border{border-width:1px}.univer-border-0{border-width:0px}.univer-border-b{border-bottom-width:1px}.univer-border-solid{border-style:solid}.univer-border-none{border-style:none}.univer-border-gray-200{--tw-border-opacity: 1;border-color:#e3e5ea;border-color:rgba(227,229,234,var(--tw-border-opacity, 1))}.univer-bg-transparent{background-color:transparent}.univer-p-0{padding:0}.univer-p-2{padding:.5rem}.univer-px-1{padding-left:.25rem;padding-right:.25rem}.univer-px-1\.5{padding-left:.375rem;padding-right:.375rem}.univer-px-2{padding-left:.5rem;padding-right:.5rem}.univer-py-1{padding-top:.25rem;padding-bottom:.25rem}.univer-text-sm{font-size:.875rem;line-height:1.25rem}.univer-text-xs{font-size:.75rem;line-height:1rem}.univer-font-semibold{font-weight:600}.univer-text-gray-300{--tw-text-opacity: 1;color:#cdd0d8;color:rgba(205,208,216,var(--tw-text-opacity, 1))}.univer-text-gray-400{--tw-text-opacity: 1;color:#979dac;color:rgba(151,157,172,var(--tw-text-opacity, 1))}.univer-text-gray-600{--tw-text-opacity: 1;color:#414657;color:rgba(65,70,87,var(--tw-text-opacity, 1))}.univer-text-gray-700{--tw-text-opacity: 1;color:#2c3040;color:rgba(44,48,64,var(--tw-text-opacity, 1))}.univer-opacity-100{opacity:1}.univer-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.univer-duration-200{transition-duration:.2s}.univer-scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.univer-scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.univer-scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.univer-scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.univer-scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.univer-scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.univer-scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.univer-scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.univer-scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.univer-scrollbar-thin{scrollbar-width:thin;scrollbar-color:initial initial;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.univer-scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.univer-scrollbar-track-transparent{--scrollbar-track: transparent !important}.univer-scrollbar-thumb-gray-300{--scrollbar-thumb: #CDD0D8 !important}.hover\:univer-bg-gray-100:hover{--tw-bg-opacity: 1;background-color:#eeeff1;background-color:rgba(238,239,241,var(--tw-bg-opacity, 1))}.hover\:univer-bg-neutral-100:hover{--tw-bg-opacity: 1;background-color:#f5f5f5;background-color:rgba(245,245,245,var(--tw-bg-opacity, 1))}.hover\:univer-bg-transparent:hover{background-color:transparent}.focus\:univer-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.dark\:hover\:univer-bg-gray-600:hover:where(.univer-dark,.univer-dark *){--tw-bg-opacity: 1;background-color:#414657;background-color:rgba(65,70,87,var(--tw-bg-opacity, 1))}.univer-sheets-ui-context-menu-input{display:flex;gap:var(--margin-sm);align-items:center}.univer-sheets-ui-context-menu-input-container{width:72px}.univer-sheets-ui-context-menu-input-number{height:24px}.univer-ui-plugin-sheets-border-panel{display:grid;grid-gap:var(--margin-sm);gap:var(--margin-sm)}.univer-ui-plugin-sheets-border-panel-position{display:grid;grid-template-columns:repeat(5,1fr);grid-gap:var(--margin-xxs);gap:var(--margin-xxs);box-sizing:border-box;padding-bottom:var(--padding-base);border-bottom:1px solid rgb(var(--border-color))}.univer-ui-plugin-sheets-border-panel-position-item{display:flex;align-items:center;justify-content:center;width:24px;height:24px;font-size:var(--font-size-lg);border-radius:var(--border-radius-base)}.univer-ui-plugin-sheets-border-panel-position-item:hover,.univer-ui-plugin-sheets-border-panel-position-item-active{background-color:rgb(var(--bg-color-hover))}.univer-ui-plugin-sheets-border-panel-styles{display:flex;gap:var(--margin-xs);align-items:center;justify-content:space-around}.univer-ui-plugin-sheets-border-panel-board{box-sizing:border-box;padding:var(--padding-base);background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-base)}.univer-ui-plugin-sheets-border-panel-button{cursor:pointer;position:relative;display:flex;gap:var(--margin-xs);align-items:center;height:24px;padding:0 var(--padding-xs);font-size:var(--font-size-lg);border-radius:var(--border-radius-base);transition:all .15s}.univer-ui-plugin-sheets-border-panel-button:hover{background-color:rgb(var(--bg-color-hover))}.univer-ui-plugin-sheets-border-panel-more-icon{color:rgb(var(--grey-400))}.univer-defined-name{display:flex;position:relative;transition:height .15s;border-right:1px solid rgb(var(--border-color));height:100%;width:100px;box-sizing:border-box}.univer-defined-name-overlay{position:relative;width:300px;background-color:rgb(var(--color-white))}.univer-defined-name-overlay-container{position:relative;height:100%;max-height:400px;width:100%;overflow:hidden;overflow-y:auto;scrollbar-color:rgba(var(--scrollbar-color),.7) transparent;scrollbar-gutter:auto;scrollbar-width:thin}.univer-defined-name-overlay-item{display:flex;align-items:center;justify-content:space-between;padding:var(--padding-xs);border-bottom:1px solid rgb(var(--border-color));-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}.univer-defined-name-overlay-item:hover{background-color:rgb(var(--grey-50))}.univer-defined-name-overlay-item-name{font-size:var(--font-size-md);color:rgb(var(--grey-900));margin:5px 0;overflow:hidden;text-overflow:ellipsis;flex:1}.univer-defined-name-overlay-item-name-for-sheet{font-size:var(--font-size-xxs);color:rgb(var(--grey-400));margin-left:5px;font-weight:400}.univer-defined-name-overlay-item-formula{font-size:var(--font-size-xs);color:rgb(var(--grey-800));margin:5px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.univer-defined-name-overlay-manager{display:flex;flex-direction:column;overflow-y:auto;width:100%;cursor:pointer;overflow:hidden;background-color:rgb(var(--color-white))}.univer-defined-name-overlay-manager:hover{background-color:rgb(var(--grey-50))}.univer-defined-name-overlay-manager-title{font-size:var(--font-size-xs);font-weight:700;margin:var(--margin-xs);margin-bottom:0;color:rgb(var(--grey-800))}.univer-defined-name-overlay-manager-content{font-size:var(--font-size-xxs);margin:var(--margin-xs);color:rgb(var(--grey-500))}.univer-defined-name-container{width:100%;position:relative}.univer-defined-name-container-scroll{width:100%;overflow:hidden;overflow-y:auto;position:absolute}.univer-defined-name-container-addButton{display:flex;align-items:center;justify-content:center;width:100%;height:40px;border-top:1px solid rgb(var(--border-color));border-bottom:1px solid rgb(var(--border-color));font-size:var(--font-size-md);color:rgb(var(--primary-color))}.univer-defined-name-container-addButton:hover{background-color:rgb(var(--grey-50));cursor:pointer}.univer-defined-name-container-addButton-text{margin-left:5px}.univer-defined-name-container-item{position:relative;display:flex;align-items:center;justify-content:space-between;padding:var(--padding-xs);border-bottom:1px solid rgb(var(--border-color));-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:default}.univer-defined-name-container-item-name{font-size:var(--font-size-sm);font-weight:500;color:rgb(var(--color-black));margin:5px 0;max-width:190px;max-height:100px;overflow:hidden}.univer-defined-name-container-item-name-for-sheet{font-size:var(--font-size-xxs);color:rgb(var(--grey-400));margin-left:5px;font-weight:400}.univer-defined-name-container-item-formula-or-refString{font-size:var(--font-size-xs);color:rgb(var(--grey-500));font-weight:400;margin:5px 0;max-height:100px;text-overflow:ellipsis;overflow:hidden}.univer-defined-name-container-item-update{position:absolute;font-size:var(--font-size-xs);color:rgb(var(--primary-color));cursor:pointer;padding:4px;transform:translateY(-50%);border-radius:var(--border-radius-base);right:60px;top:20px}.univer-defined-name-container-item-update:hover{background-color:rgb(var(--hyacinth-50))}.univer-defined-name-container-item-delete{position:absolute;font-size:var(--font-size-xs);color:rgb(var(--error-color));cursor:pointer;padding:4px;right:20px;top:20px;transform:translateY(-50%);border-radius:var(--border-radius-base)}.univer-defined-name-container-item-delete:hover{background-color:rgb(var(--hyacinth-50))}.univer-defined-name-container-item-show{display:none}.univer-defined-name-container-item:hover{background-color:rgb(var(--grey-50))}.univer-defined-name-container-item:hover .univer-defined-name-container-item-show{display:block}.univer-defined-name-input{display:flex;align-items:center;justify-content:left;border-bottom:1px solid rgb(var(--border-color));padding-bottom:5px}.univer-defined-name-input>div{margin-top:16px}.univer-defined-name-input-formula-selector-text-wrap{margin-top:16px;height:100%;position:relative;padding:0 0 0 6px;border:1px solid rgb(var(--border-color));transition:all .15s;border-radius:var(--border-radius-base)}.univer-defined-name-input-text-editor-container{position:relative;width:95%;height:30px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.univer-defined-name-input-validation{display:flex;align-items:center;justify-content:left;color:rgb(var(--error-color));font-size:var(--font-size-xs)}.univer-defined-name-input-validation>span{margin-right:2px}.univer-defined-name-input-disable{color:rgb(var(--grey-200));cursor:not-allowed}.univer-count-bar{display:flex;flex:0 0 260px;justify-content:flex-end}.univer-editor-container{position:absolute;z-index:10;top:200px;left:100px;display:flex;width:100px;height:50px;border:1px solid rgb(var(--primary-color));box-shadow:none;box-sizing:content-box}.univer-editor-container .univer-editor-input{position:relative;display:flex;width:100%;height:100%}.univer-editor-container .univer-editor-input canvas{position:absolute}.univer-editor-container .univer-editor-input .univer-sheet-embedding-formula-editor-wrap{height:auto;border:none;padding:0;border-radius:0}.univer-formula-box{display:flex;box-sizing:border-box;height:28px;background:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color));transition:height .15s}.univer-formula-box .univer-name-ranges{box-sizing:border-box;width:100px;height:100%;position:relative}.univer-formula-box .univer-formula-bar{display:flex;width:100%;height:100%}.univer-formula-box .univer-formula-bar .univer-formula-icon{padding:6px 0}.univer-formula-box .univer-formula-bar .univer-formula-icon-disable{color:rgb(var(--grey-200));cursor:not-allowed}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:80px;height:100%;font-size:var(--font-size-xs);border-right:1px solid rgb(var(--border-color))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container{display:flex;align-items:center;justify-content:center;padding:var(--padding-xs);font-size:var(--font-size-lg);border-radius:var(--border-radius-base)}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-success.univer-formula-active{cursor:pointer;color:rgb(var(--success-color))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-success.univer-formula-active:hover{background-color:rgb(var(--grey-50))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-error.univer-formula-active{cursor:pointer;color:rgb(var(--error-color))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-error.univer-formula-active:hover{background-color:rgb(var(--grey-50))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-fx{cursor:pointer}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-fx:hover{background-color:rgb(var(--grey-50))}.univer-formula-box .univer-formula-bar .univer-formula-input{flex:1;position:relative}.univer-formula-box .univer-formula-bar .univer-formula-input-mask{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:100}.univer-formula-box .univer-formula-bar .univer-formula-container{overflow:hidden;display:flex;flex:1;width:100%;padding:0 0 0 10px}.univer-formula-box .univer-formula-bar .univer-formula-container .univer-sheet-embedding-formula-editor-wrap{height:auto;border:none;padding:0;border-radius:0;height:100%}.univer-formula-box .univer-formula-bar .univer-formula-container .univer-formula-content{position:relative;width:100%;height:100%;word-wrap:break-word;outline:none}.univer-formula-box .univer-formula-bar .univer-formula-container .univer-arrow-container{cursor:pointer;display:flex;align-items:center;justify-content:center;width:20px;height:100%;font-size:var(--font-size-xs);color:rgb(var(--text-color-secondary))}.univer-formula-box .univer-formula-bar .univer-formula-container .univer-arrow-container-disable{color:rgb(var(--grey-200));cursor:not-allowed}.univer-operate-container{position:absolute;z-index:10;right:0;left:0;width:0;height:0}.univer-auto-fill-popup-menu{display:grid;grid-gap:var(--margin-xxs);gap:var(--margin-xxs);align-items:center;box-sizing:border-box;min-width:128px;margin-top:0;margin-bottom:0;padding:var(--padding-sm);font-size:var(--font-size-base);background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-lg)}.univer-auto-fill-popup-menu li{list-style:none}.univer-auto-fill-popup-menu-item{cursor:pointer;position:relative;display:flex;align-items:center;box-sizing:border-box;width:134px;height:28px;padding:var(--padding-xs) 0 var(--padding-xs) 36px;font-size:13px;font-weight:400;font-style:normal;line-height:20px;color:rgb(#35322b);color:rgb(var(--black, #35322b));text-align:left;border-radius:4px;border-radius:var(--border-radius-base);transition:background .2s}.univer-auto-fill-popup-menu-item:hover{background-color:rgb(var(--bg-color-hover))}.univer-auto-fill-popup-menu-item-icon{position:absolute;top:50%;left:var(--padding-xs);transform:translateY(-50%);display:flex;align-items:center;justify-content:center}.univer-auto-fill-popup-menu-item-title{padding:var(--padding-xs) var(--padding-xs) var(--padding-xs) 0;vertical-align:middle}.univer-auto-fill-popup-menu-item-hide{color:rgb(var(--text-color-secondary))}.univer-auto-fill-popup-menu-item:hover{background:rgb(var(--grey-100))}.univer-btn-container{display:flex;align-items:center;justify-content:center;padding:3px;background:#fff;border:1px solid rgb(#e5e5e5);border:1px solid rgb(var(--grey-200, #e5e5e5));border-radius:4px}.univer-btn-container:hover,.univer-btn-container.univer-btn-container-expand{background:rgb(#f5f5f5);background:rgb(var(--grey-100, #f5f5f5))}.univer-sheet-bar{position:relative;display:flex;flex:1 1 0px;flex-direction:row;min-width:calc(100% - 592px);max-width:calc(100% - 260px);height:100%;background-color:rgb(var(--bg-color-secondary))}.univer-sheet-bar-options{display:flex;flex-direction:row;align-items:center;margin:var(--margin-xxs);transition:display .2s}.univer-sheet-bar-options-divider:after{content:"";display:block;width:1px;height:16px;margin:0 var(--margin-xs);background-color:rgb(var(--grey-400))}.univer-sheet-bar-btn{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;font-size:var(--font-size-lg);color:rgb(var(--text-color-secondary-darker));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none}.univer-sheet-bar-btn:not([disabled]):hover{background-color:rgb(var(--bg-color-hover))}.univer-sheet-bar-btn[disabled]{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-sheet-container{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;height:36px;padding:0 var(--padding-xl);background-color:rgb(var(--bg-color-secondary))}.univer-sheet-container>span:not(:last-of-type){margin-right:4px}.univer-sheet-bar-menu{max-height:calc(100vh - 36px);display:grid;grid-gap:var(--margin-xxs);gap:var(--margin-xxs);align-items:center;overflow-y:auto;box-sizing:border-box;margin:0;padding:var(--padding-sm);background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-lg)}.univer-sheet-bar-menu li{list-style:none}.univer-sheet-bar-menu-item{cursor:pointer;position:relative;display:flex;box-sizing:border-box;padding:var(--padding-xs) 24px;color:rgb(var(--text-color));border-radius:var(--border-radius-base);transition:background .2s}.univer-sheet-bar-menu-item:hover{background-color:rgb(var(--bg-color-hover))}.univer-sheet-bar-menu-item-icon{position:absolute;top:50%;left:var(--margin-xxs);transform:translateY(-50%);color:transparent}.univer-sheet-bar-menu-item-hide .univer-sheet-bar-menu-item-icon{display:flex;align-items:center;justify-content:center;width:16px;height:16px;color:rgb(var(--grey-400))}.univer-sheet-bar-menu-item-select{font-weight:500;color:rgb(var(--primary-color))}.univer-sheet-bar-menu-item-select .univer-sheet-bar-menu-item-icon{display:flex;align-items:center;justify-content:center;width:16px;height:16px;color:rgb(var(--primary-color))}.univer-sheet-bar-menu-item-label{font-size:var(--font-size-xs);font-weight:400;line-height:20px;display:flex;align-items:center}.univer-slide-tab-bar-container{overflow:hidden;max-width:calc(100% - 112px)}.univer-slide-tab-bar-container .univer-slide-tab-bar{-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden;display:flex;flex-direction:row;align-items:center;padding:var(--padding-xs) 6px;transition:box-shadow .2s}.univer-slide-tab-item{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;flex-direction:row;flex-grow:1;align-items:center;box-sizing:border-box;margin:0 var(--margin-xxs);font-size:var(--font-size-xs);line-height:16px;color:rgb(var(--grey-1000));border-radius:var(--border-radius-base)}.univer-slide-tab-item:not(.univer-slide-tab-active):hover{background-color:rgb(var(--bg-color-hover))}.univer-slide-tab-item .univer-slide-tab-div{box-sizing:border-box;padding:var(--padding-xs) var(--padding-sm);white-space:nowrap;border:2px solid transparent;border-radius:var(--border-radius-base);display:flex;align-items:center}.univer-slide-tab-item .univer-slide-tab-div-edit{cursor:text;outline:none}.univer-slide-tab-item .univer-slide-tab-div-edit::-moz-selection{color:rgb(var(--color-white));background-color:rgb(var(--primary-color))}.univer-slide-tab-item .univer-slide-tab-div-edit::selection{color:rgb(var(--color-white));background-color:rgb(var(--primary-color))}.univer-slide-tab-active{font-weight:700;color:rgb(var(--primary-color));background-color:rgb(var(--bg-color-secondary));box-shadow:0 0 8px #00000014;transition:box-shadow .2s;display:flex;justify-content:center}.univer-slide-tab-item-dropdown{-webkit-user-select:none;-moz-user-select:none;user-select:none;min-width:auto!important}.univer-status-bar{display:flex;align-items:center;max-width:332px}.univer-status-bar.univer-single-mode{max-width:136px}.univer-status-bar-div{width:1px;height:16px;margin-left:10px;background:rgb(#ccc);background:rgb(var(--grey-400, #ccc))}.univer-statistic-list{display:flex}.univer-statistic-list-column{flex-direction:column}.univer-statistic-list-column .univer-statistic-item{font-size:12px;line-height:140%;color:rgb(var(--grey-500))}.univer-statistic-item{cursor:default;overflow:hidden;display:flex;justify-content:flex-start;max-width:106px;margin-right:8px;font-size:var(--font-size-xxs);font-weight:400;font-style:normal;line-height:20px;color:rgb(var(--grey-900));text-align:center;text-overflow:ellipsis;white-space:nowrap}.univer-statistic-item:hover{color:rgb(var(--color-black))}.univer-statistic-picker{display:grid;grid-gap:var(--margin-sm);gap:var(--margin-sm);align-items:center;box-sizing:border-box;width:196px;padding:var(--padding-base);font-size:var(--font-size-xs);background-color:rgb(var(--color-white));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-lg)}.univer-statistic-picker-item{display:flex;align-items:center;justify-content:flex-start}.univer-statistic-more{transform:rotate(90deg);display:flex;align-items:center;justify-content:center;width:24px;height:24px;font-size:12px;color:rgb(#e8e8e8);color:rgb(var(--grey-600, #e8e8e8));border-radius:4px}.univer-statistic-more:hover{background:rgb(#e8e8e8);background:rgb(var(--grey-300, #e8e8e8))}.univer-cell-alert{box-sizing:border-box;box-shadow:var(--box-shadow-base);padding:var(--padding-sm) var(--padding-base);border-radius:var(--border-radius-lg);color:rgba(var(--color-black));background:rgba(var(--color-white));z-index:100;width:156px}.univer-cell-alert-title{height:20px;font-size:var(--font-size-sm);font-weight:500;display:flex;flex-direction:row;align-items:center;margin-bottom:6px;line-height:20px}.univer-cell-alert-icon{margin-right:6px}.univer-cell-alert-icon-error{color:rgba(var(--red-400))}.univer-cell-alert-icon-info{color:rgba(var(--blue-500))}.univer-cell-alert-icon-warning{color:rgba(var(--gold-400))}.univer-cell-alert-content{font-size:var(--font-size-sm)}.univer-sheet-paste-options-wrapper{position:absolute;display:flex;background-color:#fff;z-index:10;border-radius:4px}.univer-sheet-paste-options-icon-wrapper{display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid rgb(#e5e5e5);border:1px solid rgb(var(--grey-200, #e5e5e5));border-radius:4px;padding:3px}.univer-sheet-paste-options-menu{border:1px solid rgb(#e5e5e5);border:1px solid rgb(var(--grey-200, #e5e5e5));box-shadow:var(--box-shadow-base);border-radius:4px}.univer-sheet-paste-options-menu ul{list-style-type:none;padding:0;margin:8px}.univer-sheet-paste-options-menu-item{padding:8px 4px;cursor:pointer;position:relative}.univer-sheet-paste-options-menu-item:hover{background-color:rgb(#f5f5f5);background-color:rgb(var(--grey-100, #f5f5f5))}.univer-sheet-paste-options-menu-item-title{font-size:13px;color:rgb(#35322b);color:rgb(var(--black, #35322b));margin-left:20px}.univer-sheet-paste-options-menu-item-icon{position:absolute}.univer-mobile-sheet-bar-container{width:100%;overflow-x:scroll;height:32px;background-color:rgb(var(--bg-color))}.univer-mobile-sheet-bar-slider{display:flex;flex-wrap:nowrap;align-items:center;height:32px}.univer-mobile-sheet-bar-item{align-items:center;box-sizing:border-box;flex-grow:1;flex-shrink:0;flex-wrap:nowrap;font-size:12px;height:100%;line-height:28px;min-width:48px;overflow:hidden;padding:2px 4px;text-align:center;white-space:nowrap;border-right:1px solid rgb(var(--border-color));background-color:rgb(var(--bg-color));text-overflow:ellipsis;max-width:120px}.univer-mobile-sheet-bar-item.univer-mobile-sheet-bar-item-activated{color:rgb(var(--primary-color));background-color:rgb(var(--bg-color-secondary))}.univer-permission-panel-detail-wrapper{margin-top:16px;height:calc(100% - 16px);display:flex;flex-direction:column}.univer-radio-group-vertical{display:flex;flex-direction:column;font-weight:400}.univer-sheet-permission-design-person-panel{height:270px;border:1px solid rgb(var(--grey-200));border-radius:var(--border-radius-lg);padding:var(--padding-base);margin-bottom:var(--margin-xs);display:flex;flex-direction:column}.univer-sheet-permission-design-person-panel-header{display:flex;justify-content:space-between;align-items:center}.univer-sheet-permission-design-person-panel-header-add{cursor:pointer;color:rgb(var(--blue-500))}.univer-sheet-permission-design-person-panel-split{height:1px;background-color:rgb(var(--grey-200));margin:var(--margin-xs) 0}.univer-sheet-permission-design-person-panel-content-item{height:28px;line-height:28px;margin-bottom:var(--margin-sm);display:flex;align-items:center}.univer-sheet-permission-design-person-panel-content-item:last-child{margin-bottom:0}.univer-sheet-permission-design-person-panel-content-item-name{width:130px;color:rgb(var(--color-black));white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-left:6px}.univer-sheet-permission-design-person-panel-content-item-select{width:90px;cursor:pointer}.univer-sheet-permission-design-person-panel .univer-sheet-permission-design-person-panel-content-item-select.univer-select-single:not(.univer-select-customize-input) .univer-select-selector{border:none;padding:0;color:rgb(var(--grey-900))}.univer-sheet-permission-design-person-panel .univer-sheet-permission-design-person-panel-content-item-select.univer-select-show-arrow .univer-select-arrow{right:0}.univer-sheet-permission-design-person-panel-content{flex:1}.univer-sheet-permission-panel-title{font-weight:500}.univer-sheet-permission-panel-footer{display:flex;flex-direction:row-reverse;padding:20px 0;margin-top:auto}.univer-sheet-permission-panel-footer button:first-child{margin-left:8px}.univer-permission-range-selector{font-weight:400}.univer-permission-range-selector-error,.univer-sheet-permission-panel-name-input-error,.univer-permission-range-selector-error:hover,.univer-sheet-permission-panel-name-input-error:hover{border:1px solid rgb(var(--red-400))}.univer-permission-range-selector-error-text,.univer-sheet-permission-panel-name-input-error-text{height:20px;line-height:20px;color:rgb(var(--red-400));font-size:var(--font-size-xs);font-weight:400}.univer-sheet-permission-list-panel-wrapper{margin-top:var(--margin-xs);height:calc(100% - 8px);display:flex;flex-direction:column}.univer-sheet-permission-list-panel-header{display:flex;padding:var(--padding-sm) 0;height:30px}.univer-sheet-permission-list-panel-header-type{display:flex;flex-direction:column;align-items:center;margin-right:var(--margin-lg);cursor:pointer}.univer-sheet-permission-list-panel-header-type div{height:24px;line-height:24px}.univer-sheet-permission-list-panel-header-type-bottom{height:2px;width:24px;background-color:rgb(var(--blue-500));margin-top:var(--margin-xxs)}.univer-sheet-permission-list-panel-header-select{color:rgb(var(--blue-500));height:24px;line-height:24px;font-size:var(--font-size-lg);font-weight:500}.univer-sheet-permission-list-item-header-icon{border-radius:var(--border-radius-base);height:24px;padding:4px;box-sizing:border-box}.univer-sheet-permission-list-item-header-icon:hover{background-color:rgb(var(--grey-200))}.univer-sheet-permission-list-item{margin-top:var(--margin-sm);border-radius:var(--border-radius-lg);border:1px solid rgb(var(--grey-200));padding:var(--padding-base)}.univer-sheet-permission-list-item:hover{background-color:rgb(var(--grey-50))}.univer-sheet-permission-list-item-header{height:20px;line-height:20px;display:flex;justify-content:space-between}.univer-sheet-permission-list-item-header-name{font-weight:500;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.univer-sheet-permission-list-item-header-operator{display:flex;align-items:center}.univer-sheet-permission-list-item-header-operator div{margin-left:var(--margin-xs)}.univer-sheet-permission-list-item-split{height:1px;background-color:rgb(var(--grey-200));margin:var(--margin-xs) 0}.univer-sheet-permission-list-item-content-edit{display:flex;align-items:center}.univer-sheet-permission-list-item-content-view{display:flex;align-items:center;margin-top:var(--margin-xs)}.univer-sheet-permission-list-item-content-desc{font-size:12px;color:rgb(var(--grey-400));max-width:256px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:var(--margin-xs)}.univer-sheet-permission-list-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1}.univer-sheet-permission-list-empty-text{width:240px;word-wrap:break-word;color:rgb(var(--grey-400));font-size:13px}.univer-sheet-permission-list-item-content-title{font-size:12px;height:16px;line-height:16px;flex-grow:1;color:rgb(var(--color-black))}.univer-sheet-permission-list-item-content-sub{font-size:12px;height:16px;line-height:16px;color:rgb(var(--grey-600))}.univer-sheet-permission-panel-add-wrapper{padding:20px 0;margin-top:auto}.univer-sheet-permission-panel-add-button{width:100%;display:flex;align-items:center;justify-content:center}.univer-sheet-permission-panel-add-button div{margin-right:4px}.univer-spin-container{position:relative;width:100%;height:100%}.univer-spin-overlay{position:absolute;top:-2px;left:-2px;right:-2px;bottom:-2px;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background-color:#ffffff80;z-index:10}.univer-spinner{width:40px;height:40px;border:4px solid #f3f3f3;border-top:4px solid #3498db;border-radius:50%;animation:univer-spin 2s linear infinite}.univer-content-blur{filter:blur(2px);pointer-events:none}@keyframes univer-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.univer-sheet-permission-dialog-wrapper{display:flex;flex-direction:column;padding:2px}.univer-sheet-permission-dialog-split{height:1px;background-color:rgb(var(--grey-200))}.univer-sheet-permission-dialog-item{display:flex;align-items:center;justify-content:space-between;height:20px;line-height:20px;margin:6px 0}.univer-sheet-permission-user-dialog-footer{height:36px;padding:var(--padding-xs) 0;display:flex;justify-content:flex-end;align-items:center;margin-top:var(--margin-xs)}.univer-sheet-permission-user-dialog-button{height:32px;line-height:32px;padding:0px var(--padding-base)}.univer-sheet-permission-user-dialog-wrapper{height:329px;padding:var(--padding-base);box-sizing:content-box}.univer-sheet-permission-user-dialog-search-input{width:256px;height:32px}.univer-sheet-permission-user-list{height:240px;overflow-y:auto}.univer-sheet-permission-user-list-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.univer-sheet-permission-user-list-empty-text{width:240px;word-wrap:break-word;color:rgb(var(--grey-400));font-size:13px}.univer-sheet-permission-user-item{display:flex;align-items:center;margin:var(--margin-xs) 0;border-radius:6px;padding:var(--padding-xs) var(--padding-sm)}.univer-sheet-permission-user-item:hover{background-color:rgb(var(--grey-50))}.univer-sheet-permission-user-item div{margin-left:6px}.univer-sheet-permission-user-item-name{width:186px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.univer-sheet-permission-split{height:1px;background-color:rgb(var(--grey-200))}.univer-sheet-permission-user-dialog-footer{padding:var(--padding-xs) 0;display:flex;justify-content:flex-end;align-items:center;margin-top:var(--margin-xs);height:28px}.univer-sheet-permission-user-dialog-footer-confirm{margin-left:var(--margin-sm)}.univer-sheet-permission-user-dialog-button{height:28px;line-height:28px;padding:0px var(--padding-base)}.univer-sheet-permission-alert-dialog{padding:var(--padding-xl) 24px}.univer-sheet-permission-alert-dialog-title{font-size:var(--font-size-lg);font-weight:500;margin-bottom:var(--margin-base)}.univer-sheet-permission-alert-dialog-button{margin-top:var(--margin-lg);display:flex;justify-content:flex-end}.sheet-permission-user-dialog .univer-dialog-close,.sheet-permission-user-dialog .univer-dialog-header{display:none}.sheet-permission-user-dialog .univer-dialog-body{padding:0}
@@ -1,4 +1,5 @@
1
- import { IEventBase, IRange, RichTextValue, FEventName } from '@univerjs/core';
1
+ import { IRange, RichTextValue } from '@univerjs/core';
2
+ import { IEventBase } from '@univerjs/core/facade';
2
3
  import { DeviceInputEventType, SpreadsheetSkeleton } from '@univerjs/engine-render';
3
4
  import { CommandListenerSkeletonChange } from '@univerjs/sheets';
4
5
  import { FRange, FWorkbook, FWorksheet } from '@univerjs/sheets/facade';
@@ -491,7 +492,7 @@ export interface IFSheetsUIEventNameMixin {
491
492
  */
492
493
  readonly SheetSkeletonChanged: 'SheetSkeletonChanged';
493
494
  }
494
- export declare class FSheetsUIEventName extends FEventName implements IFSheetsUIEventNameMixin {
495
+ export declare class FSheetsUIEventName implements IFSheetsUIEventNameMixin {
495
496
  get BeforeClipboardChange(): 'BeforeClipboardChange';
496
497
  get ClipboardChanged(): 'ClipboardChanged';
497
498
  get BeforeClipboardPaste(): 'BeforeClipboardPaste';
@@ -522,6 +523,8 @@ export declare class FSheetsUIEventName extends FEventName implements IFSheetsUI
522
523
  get ColumnHeaderPointerUp(): 'ColumnHeaderPointerUp';
523
524
  get ColumnHeaderHover(): 'ColumnHeaderHover';
524
525
  get SheetSkeletonChanged(): 'SheetSkeletonChanged';
526
+ get BeforeSheetZoomChange(): 'BeforeSheetZoomChange';
527
+ get SheetZoomChanged(): 'SheetZoomChanged';
525
528
  }
526
529
  /**
527
530
  * @ignore
@@ -658,7 +661,7 @@ export interface IFSheetsUIEventParamConfig {
658
661
  BeforeSheetZoomChange: ISheetZoomEvent;
659
662
  SheetSkeletonChanged: ISheetSkeletonChangedEvent;
660
663
  }
661
- declare module '@univerjs/core' {
664
+ declare module '@univerjs/core/facade' {
662
665
  interface FEventName extends IFSheetsUIEventNameMixin {
663
666
  }
664
667
  interface IEventParamConfig extends IFSheetsUIEventParamConfig {
@@ -1,5 +1,6 @@
1
- import { IDisposable, Injector, FUniver } from '@univerjs/core';
1
+ import { IDisposable, Injector } from '@univerjs/core';
2
2
  import { IColumnsHeaderCfgParam, IRowsHeaderCfgParam, SheetExtension } from '@univerjs/engine-render';
3
+ import { FUniver } from '@univerjs/core/facade';
3
4
  import { FSheetHooks } from '@univerjs/sheets/facade';
4
5
  /**
5
6
  * @ignore
@@ -86,7 +87,7 @@ export declare class FUniverSheetsUIMixin extends FUniver implements IFUniverShe
86
87
  */
87
88
  getSheetHooks(): FSheetHooks;
88
89
  }
89
- declare module '@univerjs/core' {
90
+ declare module '@univerjs/core/facade' {
90
91
  interface FUniver extends IFUniverSheetsUIMixin {
91
92
  }
92
93
  }
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- (function(f,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("@univerjs/core"),require("@univerjs/docs"),require("@univerjs/engine-render"),require("@univerjs/sheets"),require("@univerjs/sheets-ui"),require("@univerjs/sheets/facade"),require("@univerjs/ui"),require("rxjs")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/docs","@univerjs/engine-render","@univerjs/sheets","@univerjs/sheets-ui","@univerjs/sheets/facade","@univerjs/ui","rxjs"],d):(f=typeof globalThis<"u"?globalThis:f||self,d(f.UniverSheetsUiFacade={},f.UniverCore,f.UniverDocs,f.UniverEngineRender,f.UniverSheets,f.UniverSheetsUi,f.UniverSheetsFacade,f.UniverUi,f.rxjs))})(this,function(f,d,y,m,P,a,w,E,p){"use strict";class D extends d.FUniver{_initSheetUIEvent(e){const r=e.get(d.ICommandService);this.registerEventHandler(this.Event.BeforeSheetEditStart,()=>r.beforeCommandExecuted(t=>{if(t.id!==a.SetCellEditVisibleOperation.id)return;const n=this.getActiveSheet();if(!n)return;const{workbook:o,worksheet:s}=n,l=e.get(a.IEditorBridgeService),S=t.params,{visible:u,keycode:v,eventType:b}=S,C=l.getEditLocation();if(u){const g={row:C.row,column:C.column,eventType:b,keycode:v,workbook:o,worksheet:s,isZenEditor:!1};if(this.fireEvent(this.Event.BeforeSheetEditStart,g),g.cancel)throw new d.CanceledError}})),this.registerEventHandler(this.Event.BeforeSheetEditEnd,()=>r.beforeCommandExecuted(t=>{if(t.id!==a.SetCellEditVisibleOperation.id)return;const n=this.getActiveSheet();if(!n)return;const{workbook:o,worksheet:s}=n,l=e.get(a.IEditorBridgeService),S=e.get(d.IUniverInstanceService),u=t.params,{visible:v,keycode:b,eventType:C}=u,g=l.getEditLocation();if(!v){const _={row:g.row,column:g.column,eventType:C,keycode:b,workbook:o,worksheet:s,isZenEditor:!1,value:d.RichTextValue.create(S.getUnit(d.DOCS_NORMAL_EDITOR_UNIT_ID_KEY).getSnapshot()),isConfirm:b!==E.KeyCode.ESC};if(this.fireEvent(this.Event.BeforeSheetEditEnd,_),_.cancel)throw new d.CanceledError}})),this.registerEventHandler(this.Event.SheetEditStarted,()=>r.onCommandExecuted(t=>{if(t.id!==a.SetCellEditVisibleOperation.id)return;const n=this.getCommandSheetTarget(t);if(!n)return;const{workbook:o,worksheet:s}=n,l=e.get(a.IEditorBridgeService),S=t.params,{visible:u,keycode:v,eventType:b}=S,C=l.getEditLocation();if(u){const g={row:C.row,column:C.column,eventType:b,keycode:v,workbook:o,worksheet:s,isZenEditor:!1};this.fireEvent(this.Event.SheetEditStarted,g)}})),this.registerEventHandler(this.Event.SheetEditEnded,()=>r.onCommandExecuted(t=>{if(t.id!==a.SetCellEditVisibleOperation.id)return;const n=this.getCommandSheetTarget(t);if(!n)return;const{workbook:o,worksheet:s}=n,l=e.get(a.IEditorBridgeService),S=t.params,{visible:u,keycode:v,eventType:b}=S,C=l.getEditLocation();if(!u){const g={row:C.row,column:C.column,eventType:b,keycode:v,workbook:o,worksheet:s,isZenEditor:!1,isConfirm:v!==E.KeyCode.ESC};this.fireEvent(this.Event.SheetEditEnded,g)}})),this.registerEventHandler(this.Event.SheetEditChanging,()=>r.onCommandExecuted(t=>{if(t.id!==y.RichTextEditingMutation.id)return;const n=this.getCommandSheetTarget(t);if(!n)return;const{workbook:o,worksheet:s}=n,l=e.get(a.IEditorBridgeService),S=e.get(d.IUniverInstanceService),u=t.params;if(!l.isVisible().visible)return;const{unitId:v}=u;if(v===d.DOCS_NORMAL_EDITOR_UNIT_ID_KEY){const{row:b,column:C}=l.getEditLocation(),g={workbook:o,worksheet:s,row:b,column:C,value:d.RichTextValue.create(S.getUnit(d.DOCS_NORMAL_EDITOR_UNIT_ID_KEY).getSnapshot()),isZenEditor:!1};this.fireEvent(this.Event.SheetEditChanging,g)}})),this.registerEventHandler(this.Event.BeforeSheetZoomChange,()=>r.beforeCommandExecuted(t=>{if(t.id!==a.SetZoomRatioCommand.id)return;const n=this.getCommandSheetTarget(t);if(!n)return;const{workbook:o,worksheet:s}=n;this.fireEvent(this.Event.BeforeSheetZoomChange,{zoom:t.params.zoomRatio,workbook:o,worksheet:s})})),this.registerEventHandler(this.Event.SheetZoomChanged,()=>r.onCommandExecuted(t=>{if(t.id!==a.SetZoomRatioCommand.id)return;const n=this.getCommandSheetTarget(t);if(!n)return;const{workbook:o,worksheet:s}=n;this.fireEvent(this.Event.SheetZoomChanged,{zoom:s.getZoom(),workbook:o,worksheet:s})}))}_initObserverListener(e){const t=e.get(d.IUniverInstanceService).getFocusedUnit(),n=t==null?void 0:t.getUnitId(),o=e.get(m.IRenderManagerService);if(n){const v=e.get(d.LifecycleService),b=new d.DisposableCollection;this.disposeWithMe(v.lifecycle$.subscribe(C=>{if(C<d.LifecycleStages.Rendered)return;b.dispose();const g=e.get(a.HoverManagerService),_=e.get(a.DragManagerService);g&&(this.registerEventHandler(this.Event.CellClicked,()=>{var h;return(h=g.currentClickedCell$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.location.unitId,i.location.subUnitId);c&&this.fireEvent(this.Event.CellClicked,{...c,...i,row:i.location.row,column:i.location.col})})}),this.registerEventHandler(this.Event.CellHover,()=>{var h;return(h=g.currentRichText$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.CellHover,{...c,...i,row:i.row,column:i.col})})}),this.registerEventHandler(this.Event.CellPointerDown,()=>{var h;return(h=g.currentPointerDownCell$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.CellPointerDown,{...c,...i,row:i.row,column:i.col})})}),this.registerEventHandler(this.Event.CellPointerUp,()=>{var h;return(h=g.currentPointerUpCell$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.CellPointerUp,{...c,...i,row:i.row,column:i.col})})}),this.registerEventHandler(this.Event.CellPointerMove,()=>{var h;return(h=g.currentCellPosWithEvent$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.CellPointerMove,{...c,...i,row:i.row,column:i.col})})}),this.registerEventHandler(this.Event.DragOver,()=>{var h;return(h=_.currentCell$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.location.unitId,i.location.subUnitId);c&&this.fireEvent(this.Event.DragOver,{...c,...i,row:i.location.row,column:i.location.col})})}),this.registerEventHandler(this.Event.Drop,()=>{var h;return(h=_.endCell$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.location.unitId,i.location.subUnitId);c&&this.fireEvent(this.Event.Drop,{...c,...i,row:i.location.row,column:i.location.col})})}),this.registerEventHandler(this.Event.RowHeaderClick,()=>{var h;return(h=g.currentRowHeaderClick$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.RowHeaderClick,{...c,row:i.index})})}),this.registerEventHandler(this.Event.RowHeaderPointerDown,()=>{var h;return(h=g.currentRowHeaderPointerDown$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.RowHeaderPointerDown,{...c,row:i.index})})}),this.registerEventHandler(this.Event.RowHeaderPointerUp,()=>{var h;return(h=g.currentRowHeaderPointerUp$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.RowHeaderPointerUp,{...c,row:i.index})})}),this.registerEventHandler(this.Event.RowHeaderHover,()=>{var h;return(h=g.currentHoveredRowHeader$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.RowHeaderHover,{...c,row:i.index})})}),this.registerEventHandler(this.Event.ColumnHeaderClick,()=>{var h;return(h=g.currentColHeaderClick$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.ColumnHeaderClick,{...c,column:i.index})})}),this.registerEventHandler(this.Event.ColumnHeaderPointerDown,()=>{var h;return(h=g.currentColHeaderPointerDown$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.ColumnHeaderPointerDown,{...c,column:i.index})})}),this.registerEventHandler(this.Event.ColumnHeaderPointerUp,()=>{var h;return(h=g.currentColHeaderPointerUp$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.ColumnHeaderPointerUp,{...c,column:i.index})})}),this.registerEventHandler(this.Event.ColumnHeaderHover,()=>{var h;return(h=g.currentHoveredColHeader$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.ColumnHeaderHover,{...c,column:i.index})})}))})),this.disposeWithMe(b)}const s=new Map;let l;const S=e.get(d.LifecycleService),u=p.combineLatest([o.created$,S.lifecycle$]);this.disposeWithMe(u.subscribe(([v,b])=>{var i;if(v.type===d.UniverInstanceType.UNIVER_SHEET&&(l=v),b<=d.LifecycleStages.Rendered)return;const C=new d.DisposableCollection;if(!l)return;const g=this.getWorkbook(l.unitId);if(!g)return;s.get(l.unitId)&&((i=s.get(l.unitId))==null||i.dispose()),s.set(l.unitId,C);const _=l.with(a.SheetScrollManagerService),h=l.with(P.SheetsSelectionsService);C.add(this.registerEventHandler(this.Event.Scroll,()=>_.validViewportScrollInfo$.subscribe(c=>{c&&this.fireEvent(this.Event.Scroll,{workbook:g,worksheet:g.getActiveSheet(),...c})}))),C.add(this.registerEventHandler(this.Event.SelectionMoveStart,()=>h.selectionMoveStart$.subscribe(c=>{var I;this.fireEvent(this.Event.SelectionMoveStart,{workbook:g,worksheet:g.getActiveSheet(),selections:(I=c==null?void 0:c.map(M=>M.range))!=null?I:[]})}))),C.add(this.registerEventHandler(this.Event.SelectionMoving,()=>h.selectionMoving$.subscribe(c=>{var I;this.fireEvent(this.Event.SelectionMoving,{workbook:g,worksheet:g.getActiveSheet(),selections:(I=c==null?void 0:c.map(M=>M.range))!=null?I:[]})}))),C.add(this.registerEventHandler(this.Event.SelectionMoveEnd,()=>h.selectionMoveEnd$.subscribe(c=>{var I;this.fireEvent(this.Event.SelectionMoveEnd,{workbook:g,worksheet:g.getActiveSheet(),selections:(I=c==null?void 0:c.map(M=>M.range))!=null?I:[]})}))),C.add(this.registerEventHandler(this.Event.SelectionChanged,()=>h.selectionChanged$.subscribe(c=>{var I;this.fireEvent(this.Event.SelectionChanged,{workbook:g,worksheet:g.getActiveSheet(),selections:(I=c==null?void 0:c.map(M=>M.range))!=null?I:[]})}))),l=null,this.disposeWithMe(C)})),this.disposeWithMe(o.disposed$.subscribe(v=>{var b;(b=s.get(v))==null||b.dispose(),s.delete(v)})),this.disposeWithMe(()=>{s.forEach(v=>{v.dispose()})})}_initialize(e){this._initSheetUIEvent(e),this._initObserverListener(e);const r=e.get(d.ICommandService);this.registerEventHandler(this.Event.BeforeClipboardChange,()=>{const t=new d.DisposableCollection;return t.add(r.beforeCommandExecuted(n=>{switch(n.id){case E.CopyCommand.id:case E.CutCommand.id:this._beforeClipboardChange();break}})),t}),this.registerEventHandler(this.Event.ClipboardChanged,()=>{const t=new d.DisposableCollection;return t.add(r.beforeCommandExecuted(n=>{switch(n.id){case a.SheetPasteShortKeyCommand.id:this._beforeClipboardPaste(n.params);break}})),t.add(r.beforeCommandExecuted(async n=>{switch(n.id){case E.PasteCommand.id:await this._beforeClipboardPasteAsync();break}})),t}),this.disposeWithMe(r.onCommandExecuted(t=>{if(P.COMMAND_LISTENER_SKELETON_CHANGE.indexOf(t.id)>-1){const n=this.getActiveSheet();if(!n)return;const o=P.getSkeletonChangedEffectedRange(t,n.worksheet.getMaxColumns()).map(s=>{var l,S;return(S=(l=this.getWorkbook(s.unitId))==null?void 0:l.getSheetBySheetId(s.subUnitId))==null?void 0:S.getRange(s.range)}).filter(Boolean);if(!o.length)return;this.fireEvent(this.Event.SheetSkeletonChanged,{workbook:n.workbook,worksheet:n.worksheet,payload:t,skeleton:n.worksheet.getSkeleton(),effectedRanges:o})}})),this.registerEventHandler(this.Event.ClipboardChanged,()=>r.beforeCommandExecuted(t=>{switch(t.id){case E.CopyCommand.id:case E.CutCommand.id:this._clipboardChanged();break}})),this.registerEventHandler(this.Event.ClipboardPasted,()=>r.beforeCommandExecuted(t=>{switch(t.id){case a.SheetPasteShortKeyCommand.id:this._clipboardPaste(t.params);break;case E.PasteCommand.id:this._clipboardPasteAsync();break}}))}_generateClipboardCopyParam(){const e=this.getActiveWorkbook(),r=e==null?void 0:e.getActiveSheet(),t=e==null?void 0:e.getActiveRange();if(!e||!r||!t)return;const o=this._injector.get(a.ISheetClipboardService).generateCopyContent(e.getId(),r.getSheetId(),t.getRange());if(!o)return;const{html:s,plain:l}=o;return{workbook:e,worksheet:r,text:l,html:s,fromSheet:r,fromRange:t}}_beforeClipboardChange(){const e=this._generateClipboardCopyParam();if(e&&(this.fireEvent(this.Event.BeforeClipboardChange,e),e.cancel))throw new Error("Before clipboard change is canceled")}_clipboardChanged(){const e=this._generateClipboardCopyParam();if(e&&(this.fireEvent(this.Event.ClipboardChanged,e),e.cancel))throw new Error("Clipboard changed is canceled")}_generateClipboardPasteParam(e){if(!e)return;const{htmlContent:r,textContent:t}=e,n=this.getActiveWorkbook(),o=n==null?void 0:n.getActiveSheet();return!n||!o?void 0:{workbook:n,worksheet:o,text:t,html:r}}async _generateClipboardPasteParamAsync(){const e=this.getActiveWorkbook(),r=e==null?void 0:e.getActiveSheet();if(!e||!r)return;const o=(await this._injector.get(E.IClipboardInterfaceService).read())[0];let s;if(o){const l=o.types,S=l.indexOf(E.PLAIN_TEXT_CLIPBOARD_MIME_TYPE)!==-1?await o.getType(E.PLAIN_TEXT_CLIPBOARD_MIME_TYPE).then(v=>v&&v.text()):"",u=l.indexOf(E.HTML_CLIPBOARD_MIME_TYPE)!==-1?await o.getType(E.HTML_CLIPBOARD_MIME_TYPE).then(v=>v&&v.text()):"";s={workbook:e,worksheet:r,text:S,html:u}}return s}_beforeClipboardPaste(e){const r=this._generateClipboardPasteParam(e);if(r&&(this.fireEvent(this.Event.BeforeClipboardPaste,r),r.cancel))throw new Error("Before clipboard paste is canceled")}_clipboardPaste(e){const r=this._generateClipboardPasteParam(e);if(r&&(this.fireEvent(this.Event.ClipboardPasted,r),r.cancel))throw new Error("Clipboard pasted is canceled")}async _beforeClipboardPasteAsync(){if(!E.supportClipboardAPI()){this._injector.get(d.ILogService).warn("[Facade]: The navigator object only supports the browser environment");return}const e=await this._generateClipboardPasteParamAsync();if(e&&(this.fireEvent(this.Event.BeforeClipboardPaste,e),e.cancel))throw new Error("Before clipboard paste is canceled")}async _clipboardPasteAsync(){if(!E.supportClipboardAPI()){this._injector.get(d.ILogService).warn("[Facade]: The navigator object only supports the browser environment");return}const e=await this._generateClipboardPasteParamAsync();if(e&&(this.fireEvent(this.Event.ClipboardPasted,e),e.cancel))throw new Error("Clipboard pasted is canceled")}customizeColumnHeader(e){var u,v;const r=this.getActiveWorkbook();if(!r){console.error("WorkBook not exist");return}const t=r==null?void 0:r.getId(),n=this._injector.get(m.IRenderManagerService),o=r.getActiveSheet(),s=o.getSheetId(),l=n.getRenderById(t);l&&((u=e.headerStyle)!=null&&u.size)&&(l.with(a.SheetSkeletonManagerService).setColumnHeaderSize(l,s,(v=e.headerStyle)==null?void 0:v.size),o==null||o.refreshCanvas()),this._getSheetRenderComponent(t,a.SHEET_VIEW_KEY.COLUMN).setCustomHeader(e),o==null||o.refreshCanvas()}customizeRowHeader(e){const r=this.getActiveWorkbook();if(!r){console.error("WorkBook not exist");return}const t=r==null?void 0:r.getId();this._getSheetRenderComponent(t,a.SHEET_VIEW_KEY.ROW).setCustomHeader(e)}registerSheetRowHeaderExtension(e,...r){const t=this._getSheetRenderComponent(e,a.SHEET_VIEW_KEY.ROW),n=t.register(...r);return d.toDisposable(()=>{n.dispose(),t.makeDirty(!0)})}registerSheetColumnHeaderExtension(e,...r){const t=this._getSheetRenderComponent(e,a.SHEET_VIEW_KEY.COLUMN),n=t.register(...r);return d.toDisposable(()=>{n.dispose(),t.makeDirty(!0)})}registerSheetMainExtension(e,...r){const t=this._getSheetRenderComponent(e,a.SHEET_VIEW_KEY.MAIN),n=t.register(...r);return d.toDisposable(()=>{n.dispose(),t.makeDirty(!0)})}_getSheetRenderComponent(e,r){const n=this._injector.get(m.IRenderManagerService).getRenderById(e);if(!n)throw new Error(`Render Unit with unitId ${e} not found`);const{components:o}=n,s=o.get(r);if(!s)throw new Error("Render component not found");return s}getSheetHooks(){return this._injector.createInstance(w.FSheetHooks)}}d.FUniver.extend(D);class T extends w.FWorkbook{openSiderbar(e){return this._logDeprecation("openSiderbar"),this._injector.get(E.ISidebarService).open(e)}openDialog(e){this._logDeprecation("openDialog");const t=this._injector.get(E.IDialogService).open({...e,onClose:()=>{t.dispose()}});return t}_logDeprecation(e){this._injector.get(d.ILogService).warn("[FWorkbook]",`${e} is deprecated. Please use the function of the same name on "FUniver".`)}generateCellParams(e){const r=this.getActiveSheet();return{row:e.row,column:e.col,workbook:this,worksheet:r}}onCellClick(e){const r=this._injector.get(a.HoverManagerService);return d.toDisposable(r.currentClickedCell$.pipe(p.filter(t=>!!t)).subscribe(t=>{e(t)}))}onCellHover(e){const r=this._injector.get(a.HoverManagerService);return d.toDisposable(r.currentRichText$.pipe(p.filter(t=>!!t)).subscribe(e))}onCellPointerDown(e){const r=this._injector.get(a.HoverManagerService);return d.toDisposable(r.currentPointerDownCell$.subscribe(e))}onCellPointerUp(e){const r=this._injector.get(a.HoverManagerService);return d.toDisposable(r.currentPointerUpCell$.subscribe(e))}onCellPointerMove(e){const r=this._injector.get(a.HoverManagerService);return d.toDisposable(r.currentCellPosWithEvent$.pipe(p.filter(t=>!!t)).subscribe(t=>{e(t,t.event)}))}onDragOver(e){const r=this._injector.get(a.DragManagerService);return d.toDisposable(r.currentCell$.pipe(p.filter(t=>!!t)).subscribe(t=>{e(t)}))}onDrop(e){const r=this._injector.get(a.DragManagerService);return d.toDisposable(r.endCell$.pipe(p.filter(t=>!!t)).subscribe(t=>{e(t)}))}startEditing(){return this._injector.get(d.ICommandService).syncExecuteCommand(a.SetCellEditVisibleOperation.id,{eventType:m.DeviceInputEventType.Dblclick,unitId:this._workbook.getUnitId(),visible:!0})}async endEditing(e){return this._injector.get(d.ICommandService).syncExecuteCommand(a.SetCellEditVisibleOperation.id,{eventType:m.DeviceInputEventType.Keyboard,keycode:e?E.KeyCode.ENTER:E.KeyCode.ESC,visible:!1,unitId:this._workbook.getUnitId()}),await d.awaitTime(0),!0}endEditingAsync(e=!0){return this.endEditing(e)}getScrollStateBySheetId(e){const r=this._workbook.getUnitId(),n=this._injector.get(m.IRenderManagerService).getRenderById(r);return n?n.with(a.SheetScrollManagerService).getScrollStateByParam({unitId:r,sheetId:e}):null}disableSelection(){const e=this._workbook.getUnitId(),t=this._injector.get(m.IRenderManagerService).getRenderById(e);return t&&t.with(a.ISheetSelectionRenderService).disableSelection(),this}enableSelection(){const e=this._workbook.getUnitId(),t=this._injector.get(m.IRenderManagerService).getRenderById(e);return t&&t.with(a.ISheetSelectionRenderService).enableSelection(),this}transparentSelection(){const e=this._workbook.getUnitId(),t=this._injector.get(m.IRenderManagerService).getRenderById(e);return t&&t.with(a.ISheetSelectionRenderService).transparentSelection(),this}showSelection(){const e=this._workbook.getUnitId(),t=this._injector.get(m.IRenderManagerService).getRenderById(e);return t&&t.with(a.ISheetSelectionRenderService).showSelection(),this}}w.FWorkbook.extend(T);class x extends w.FWorksheet{refreshCanvas(){const e=this._injector.get(m.IRenderManagerService),r=this._fWorkbook.id,t=e.getRenderById(r);if(!t)throw new Error(`Render Unit with unitId ${r} not found`);t.with(a.SheetSkeletonManagerService).reCalculate();const n=t.mainComponent;if(!n)throw new Error("Main component not found");return n.makeDirty(),this}zoom(e){return this._injector.get(d.ICommandService).syncExecuteCommand(a.ChangeZoomRatioCommand.id,{unitId:this._workbook.getUnitId(),subUnitId:this._worksheet.getSheetId(),zoomRatio:e}),this}getZoom(){return this._worksheet.getZoomRatio()}getVisibleRange(){const e=this._workbook.getUnitId(),t=this._injector.get(m.IRenderManagerService).getRenderById(e);let n={startColumn:0,startRow:0,endColumn:0,endRow:0};if(!t)return n;const s=t.with(a.SheetSkeletonManagerService).getCurrentSkeleton();if(!s)return n;const l=s==null?void 0:s.getVisibleRanges();if(!l)return n;n=s.getVisibleRangeByViewport(m.SHEET_VIEWPORT_KEY.VIEW_MAIN);for(const[S,u]of l)m.sheetContentViewportKeys.indexOf(S)!==-1&&(n.startColumn=Math.min(n.startColumn,u.startColumn),n.startRow=Math.min(n.startRow,u.startRow),n.endColumn=Math.max(n.endColumn,u.endColumn),n.endRow=Math.max(n.endRow,u.endRow));return n}scrollToCell(e,r){const t=this._workbook.getUnitId(),o=this._injector.get(m.IRenderManagerService).getRenderById(t);return o&&(o==null?void 0:o.with(a.SheetsScrollRenderController)).scrollToCell(e,r),this}getScrollState(){const e={offsetX:0,offsetY:0,sheetViewStartColumn:0,sheetViewStartRow:0},r=this._workbook.getUnitId(),t=this._worksheet.getSheetId(),o=this._injector.get(m.IRenderManagerService).getRenderById(r);return o&&o.with(a.SheetScrollManagerService).getScrollStateByParam({unitId:r,sheetId:t})||e}onScroll(e){var o;const r=this._workbook.getUnitId(),n=(o=this._injector.get(m.IRenderManagerService).getRenderById(r))==null?void 0:o.with(a.SheetScrollManagerService);if(n){const s=n.validViewportScrollInfo$.subscribe(l=>{e(l)});return d.toDisposable(s)}return d.toDisposable(()=>{})}getSkeleton(){var r,t;const e=(r=this._injector.get(m.IRenderManagerService).getRenderById(this._workbook.getUnitId()))==null?void 0:r.with(a.SheetSkeletonManagerService);return(t=e==null?void 0:e.getWorksheetSkeleton(this._worksheet.getSheetId()))==null?void 0:t.skeleton}setColumnAutoWidth(e,r){const t=this._workbook.getUnitId(),n=this._worksheet.getSheetId(),o=[{startColumn:e,endColumn:e+r-1,startRow:0,endRow:this._worksheet.getRowCount()-1}];return this._commandService.syncExecuteCommand(a.SetWorksheetColAutoWidthCommand.id,{unitId:t,subUnitId:n,ranges:o}),this}customizeColumnHeader(e){var S,u;const r=this,t=this._fWorkbook.getId(),n=this._injector.get(m.IRenderManagerService),o=r.getSheetId(),s=n.getRenderById(t);s&&((S=e.headerStyle)!=null&&S.size)&&(s.with(a.SheetSkeletonManagerService).setColumnHeaderSize(s,o,(u=e.headerStyle)==null?void 0:u.size),r==null||r.refreshCanvas());const l=this._getSheetRenderComponent(t,a.SHEET_VIEW_KEY.COLUMN);l&&(l.setCustomHeader(e),r==null||r.refreshCanvas())}customizeRowHeader(e){const r=this._fWorkbook.getId();this._getSheetRenderComponent(r,a.SHEET_VIEW_KEY.ROW).setCustomHeader(e)}setColumnHeaderHeight(e){const r=this,t=this._fWorkbook.getId(),n=r.getSheetId();return this._commandService.executeCommand(a.SetColumnHeaderHeightCommand.id,{unitId:t,subUnitId:n,size:e}),r==null||r.refreshCanvas(),this}setRowHeaderWidth(e){const r=this,t=this._fWorkbook.getId(),n=r.getSheetId();this._commandService.executeCommand(a.SetRowHeaderWidthCommand.id,{unitId:t,subUnitId:n,size:e});const o=this._getSheetRenderComponent(t,a.SHEET_VIEW_KEY.ROW);return o&&o.setCustomHeader({headerStyle:{size:e}}),r==null||r.refreshCanvas(),this}_getSheetRenderComponent(e,r){const n=this._injector.get(m.IRenderManagerService).getRenderById(e);if(!n)throw new Error(`Render Unit with unitId ${e} not found`);const{components:o}=n,s=o.get(r);if(!s)throw new Error("Render component not found");return s}}w.FWorksheet.extend(x);class B extends w.FPermission{setPermissionDialogVisible(e){this._permissionService.setShowComponents(e)}}w.FPermission.extend(B);class A extends w.FSheetHooks{onCellPointerMove(e){return d.toDisposable(this._injector.get(a.HoverManagerService).currentPosition$.subscribe(e))}onCellPointerOver(e){return d.toDisposable(this._injector.get(a.HoverManagerService).currentCell$.subscribe(e))}onCellDragOver(e){return d.toDisposable(this._injector.get(a.DragManagerService).currentCell$.subscribe(e))}onCellDrop(e){return d.toDisposable(this._injector.get(a.DragManagerService).endCell$.subscribe(e))}onCellRender(e,r=d.InterceptorEffectEnum.Style,t=P.InterceptCellContentPriority.DATA_VALIDATION){return this._injector.get(P.SheetInterceptorService).intercept(P.INTERCEPTOR_POINT.CELL_CONTENT,{effect:r,handler:(n,o,s)=>s({...n,customRender:[...(n==null?void 0:n.customRender)||[],...e||[]]}),priority:t})}onBeforeCellEdit(e){return this._injector.get(d.ICommandService).beforeCommandExecuted(r=>{const t=r.params;r.id===a.SetCellEditVisibleOperation.id&&t.visible&&e(t)})}onAfterCellEdit(e){return this._injector.get(d.ICommandService).onCommandExecuted(r=>{const t=r.params;r.id===a.SetCellEditVisibleOperation.id&&!t.visible&&e(t)})}}w.FSheetHooks.extend(A);const R={CellClicked:"CellClicked",CellPointerDown:"CellPointerDown",CellPointerUp:"CellPointerUp",CellPointerMove:"CellPointerMove",CellHover:"CellHover",DragOver:"DragOver",Drop:"Drop",Scroll:"Scroll",SelectionMoveStart:"SelectionMoveStart",SelectionMoving:"SelectionMoving",SelectionMoveEnd:"SelectionMoveEnd",SelectionChanged:"SelectionChanged"};class O extends d.FEventName{get BeforeClipboardChange(){return"BeforeClipboardChange"}get ClipboardChanged(){return"ClipboardChanged"}get BeforeClipboardPaste(){return"BeforeClipboardPaste"}get ClipboardPasted(){return"ClipboardPasted"}get BeforeSheetEditStart(){return"BeforeSheetEditStart"}get SheetEditStarted(){return"SheetEditStarted"}get SheetEditChanging(){return"SheetEditChanging"}get BeforeSheetEditEnd(){return"BeforeSheetEditEnd"}get SheetEditEnded(){return"SheetEditEnded"}get CellClicked(){return R.CellClicked}get CellHover(){return R.CellHover}get CellPointerDown(){return R.CellPointerDown}get CellPointerUp(){return R.CellPointerUp}get CellPointerMove(){return R.CellPointerMove}get DragOver(){return"DragOver"}get Drop(){return"Drop"}get Scroll(){return"Scroll"}get SelectionMoveStart(){return"SelectionMoveStart"}get SelectionChanged(){return"SelectionChanged"}get SelectionMoving(){return"SelectionMoving"}get SelectionMoveEnd(){return"SelectionMoveEnd"}get RowHeaderClick(){return"RowHeaderClick"}get RowHeaderPointerDown(){return"RowHeaderPointerDown"}get RowHeaderPointerUp(){return"RowHeaderPointerUp"}get RowHeaderHover(){return"RowHeaderHover"}get ColumnHeaderClick(){return"ColumnHeaderClick"}get ColumnHeaderPointerDown(){return"ColumnHeaderPointerDown"}get ColumnHeaderPointerUp(){return"ColumnHeaderPointerUp"}get ColumnHeaderHover(){return"ColumnHeaderHover"}get SheetSkeletonChanged(){return"SheetSkeletonChanged"}}d.FEventName.extend(O);class W extends w.FRange{getCell(){var l;const e=this._injector.get(m.IRenderManagerService),r=this._injector.get(d.ILogService),t=this._workbook.getUnitId(),n=this._worksheet.getSheetId(),o=e.getRenderById(t),s=(l=o==null?void 0:o.with(a.SheetSkeletonManagerService).getSkeletonParam(n))==null?void 0:l.skeleton;if(!s)throw r.error("[Facade]: `FRange.getCell` can only be called in current worksheet"),new Error("`FRange.getCell` can only be called in current worksheet");return s.getCellWithCoordByIndex(this._range.startRow,this._range.startColumn)}getCellRect(){const{startX:e,startY:r,endX:t,endY:n}=this.getCell(),o={x:e,y:r,width:t-e,height:n-r,top:r,left:e,bottom:n,right:t};return{...o,toJSON:()=>JSON.stringify(o)}}generateHTML(){var r;const e=this._injector.get(a.ISheetClipboardService).generateCopyContent(this._workbook.getUnitId(),this._worksheet.getSheetId(),this._range);return(r=e==null?void 0:e.html)!=null?r:""}attachPopup(e){var s,l,S;e.direction=(s=e.direction)!=null?s:"horizontal",e.extraProps=(l=e.extraProps)!=null?l:{},e.offset=(S=e.offset)!=null?S:[0,0];const{key:r,disposableCollection:t}=H(e,this._injector.get(E.ComponentManager)),o=this._injector.get(a.SheetCanvasPopManagerService).attachPopupToCell(this._range.startRow,this._range.startColumn,{...e,componentKey:r},this.getUnitId(),this._worksheet.getSheetId());return o?(t.add(o),t):(t.dispose(),null)}attachAlertPopup(e){const r=this._injector.get(a.CellAlertManagerService),t={workbook:this._workbook,worksheet:this._worksheet,row:this._range.startRow,col:this._range.startColumn,unitId:this.getUnitId(),subUnitId:this._worksheet.getSheetId()};return r.showAlert({...e,location:t}),{dispose:()=>{r.removeAlert(e.key)}}}attachRangePopup(e){var s,l,S;e.direction=(s=e.direction)!=null?s:"top-center",e.extraProps=(l=e.extraProps)!=null?l:{},e.offset=(S=e.offset)!=null?S:[0,0];const{key:r,disposableCollection:t}=H(e,this._injector.get(E.ComponentManager)),o=this._injector.get(a.SheetCanvasPopManagerService).attachRangePopup(this._range,{...e,componentKey:r},this.getUnitId(),this._worksheet.getSheetId());return o?(t.add(o),t):(t.dispose(),null)}highlight(e,r){const t=this._injector.get(a.IMarkSelectionService),n=t.addShape({range:this._range,style:e,primary:r});if(!n)throw new Error("Failed to highlight current range");return d.toDisposable(()=>{t.removeShape(n)})}}w.FRange.extend(W);function H(k,e){const{componentKey:r,isVue3:t}=k;let n;const o=new d.DisposableCollection;return typeof r=="string"?n=r:(n=`External_${d.generateRandomId(6)}`,o.add(e.register(n,r,{framework:t?"vue3":"react"}))),{key:n,disposableCollection:o}}f.transformComponentKey=H,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
1
+ (function(f,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("@univerjs/core"),require("@univerjs/core/facade"),require("@univerjs/docs"),require("@univerjs/engine-render"),require("@univerjs/sheets"),require("@univerjs/sheets-ui"),require("@univerjs/sheets/facade"),require("@univerjs/ui"),require("rxjs")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/core/facade","@univerjs/docs","@univerjs/engine-render","@univerjs/sheets","@univerjs/sheets-ui","@univerjs/sheets/facade","@univerjs/ui","rxjs"],d):(f=typeof globalThis<"u"?globalThis:f||self,d(f.UniverSheetsUiFacade={},f.UniverCore,f.UniverCoreFacade,f.UniverDocs,f.UniverEngineRender,f.UniverSheets,f.UniverSheetsUi,f.UniverSheetsFacade,f.UniverUi,f.rxjs))})(this,function(f,d,H,D,m,M,a,w,E,p){"use strict";class T extends H.FUniver{_initSheetUIEvent(e){const r=e.get(d.ICommandService);this.registerEventHandler(this.Event.BeforeSheetEditStart,()=>r.beforeCommandExecuted(t=>{if(t.id!==a.SetCellEditVisibleOperation.id)return;const n=this.getActiveSheet();if(!n)return;const{workbook:o,worksheet:s}=n,l=e.get(a.IEditorBridgeService),u=t.params,{visible:S,keycode:v,eventType:b}=u,C=l.getEditLocation();if(S){const g={row:C.row,column:C.column,eventType:b,keycode:v,workbook:o,worksheet:s,isZenEditor:!1};if(this.fireEvent(this.Event.BeforeSheetEditStart,g),g.cancel)throw new d.CanceledError}})),this.registerEventHandler(this.Event.BeforeSheetEditEnd,()=>r.beforeCommandExecuted(t=>{if(t.id!==a.SetCellEditVisibleOperation.id)return;const n=this.getActiveSheet();if(!n)return;const{workbook:o,worksheet:s}=n,l=e.get(a.IEditorBridgeService),u=e.get(d.IUniverInstanceService),S=t.params,{visible:v,keycode:b,eventType:C}=S,g=l.getEditLocation();if(!v){const _={row:g.row,column:g.column,eventType:C,keycode:b,workbook:o,worksheet:s,isZenEditor:!1,value:d.RichTextValue.create(u.getUnit(d.DOCS_NORMAL_EDITOR_UNIT_ID_KEY).getSnapshot()),isConfirm:b!==E.KeyCode.ESC};if(this.fireEvent(this.Event.BeforeSheetEditEnd,_),_.cancel)throw new d.CanceledError}})),this.registerEventHandler(this.Event.SheetEditStarted,()=>r.onCommandExecuted(t=>{if(t.id!==a.SetCellEditVisibleOperation.id)return;const n=this.getCommandSheetTarget(t);if(!n)return;const{workbook:o,worksheet:s}=n,l=e.get(a.IEditorBridgeService),u=t.params,{visible:S,keycode:v,eventType:b}=u,C=l.getEditLocation();if(S){const g={row:C.row,column:C.column,eventType:b,keycode:v,workbook:o,worksheet:s,isZenEditor:!1};this.fireEvent(this.Event.SheetEditStarted,g)}})),this.registerEventHandler(this.Event.SheetEditEnded,()=>r.onCommandExecuted(t=>{if(t.id!==a.SetCellEditVisibleOperation.id)return;const n=this.getCommandSheetTarget(t);if(!n)return;const{workbook:o,worksheet:s}=n,l=e.get(a.IEditorBridgeService),u=t.params,{visible:S,keycode:v,eventType:b}=u,C=l.getEditLocation();if(!S){const g={row:C.row,column:C.column,eventType:b,keycode:v,workbook:o,worksheet:s,isZenEditor:!1,isConfirm:v!==E.KeyCode.ESC};this.fireEvent(this.Event.SheetEditEnded,g)}})),this.registerEventHandler(this.Event.SheetEditChanging,()=>r.onCommandExecuted(t=>{if(t.id!==D.RichTextEditingMutation.id)return;const n=this.getActiveSheet();if(!n)return;const{workbook:o,worksheet:s}=n,l=e.get(a.IEditorBridgeService),u=e.get(d.IUniverInstanceService),S=t.params;if(!l.isVisible().visible)return;const{unitId:v}=S;if(v===d.DOCS_NORMAL_EDITOR_UNIT_ID_KEY){const{row:b,column:C}=l.getEditLocation(),g={workbook:o,worksheet:s,row:b,column:C,value:d.RichTextValue.create(u.getUnit(d.DOCS_NORMAL_EDITOR_UNIT_ID_KEY).getSnapshot()),isZenEditor:!1};this.fireEvent(this.Event.SheetEditChanging,g)}})),this.registerEventHandler(this.Event.BeforeSheetZoomChange,()=>r.beforeCommandExecuted(t=>{if(t.id!==a.SetZoomRatioCommand.id)return;const n=this.getCommandSheetTarget(t);if(!n)return;const{workbook:o,worksheet:s}=n;this.fireEvent(this.Event.BeforeSheetZoomChange,{zoom:t.params.zoomRatio,workbook:o,worksheet:s})})),this.registerEventHandler(this.Event.SheetZoomChanged,()=>r.onCommandExecuted(t=>{if(t.id!==a.SetZoomRatioCommand.id)return;const n=this.getCommandSheetTarget(t);if(!n)return;const{workbook:o,worksheet:s}=n;this.fireEvent(this.Event.SheetZoomChanged,{zoom:s.getZoom(),workbook:o,worksheet:s})}))}_initObserverListener(e){const t=e.get(d.IUniverInstanceService).getFocusedUnit(),n=t==null?void 0:t.getUnitId(),o=e.get(m.IRenderManagerService);if(n){const v=e.get(d.LifecycleService),b=new d.DisposableCollection;this.disposeWithMe(v.lifecycle$.subscribe(C=>{if(C<d.LifecycleStages.Rendered)return;b.dispose();const g=e.get(a.HoverManagerService),_=e.get(a.DragManagerService);g&&(this.registerEventHandler(this.Event.CellClicked,()=>{var h;return(h=g.currentClickedCell$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.location.unitId,i.location.subUnitId);c&&this.fireEvent(this.Event.CellClicked,{...c,...i,row:i.location.row,column:i.location.col})})}),this.registerEventHandler(this.Event.CellHover,()=>{var h;return(h=g.currentRichText$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.CellHover,{...c,...i,row:i.row,column:i.col})})}),this.registerEventHandler(this.Event.CellPointerDown,()=>{var h;return(h=g.currentPointerDownCell$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.CellPointerDown,{...c,...i,row:i.row,column:i.col})})}),this.registerEventHandler(this.Event.CellPointerUp,()=>{var h;return(h=g.currentPointerUpCell$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.CellPointerUp,{...c,...i,row:i.row,column:i.col})})}),this.registerEventHandler(this.Event.CellPointerMove,()=>{var h;return(h=g.currentCellPosWithEvent$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.CellPointerMove,{...c,...i,row:i.row,column:i.col})})}),this.registerEventHandler(this.Event.DragOver,()=>{var h;return(h=_.currentCell$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.location.unitId,i.location.subUnitId);c&&this.fireEvent(this.Event.DragOver,{...c,...i,row:i.location.row,column:i.location.col})})}),this.registerEventHandler(this.Event.Drop,()=>{var h;return(h=_.endCell$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.location.unitId,i.location.subUnitId);c&&this.fireEvent(this.Event.Drop,{...c,...i,row:i.location.row,column:i.location.col})})}),this.registerEventHandler(this.Event.RowHeaderClick,()=>{var h;return(h=g.currentRowHeaderClick$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.RowHeaderClick,{...c,row:i.index})})}),this.registerEventHandler(this.Event.RowHeaderPointerDown,()=>{var h;return(h=g.currentRowHeaderPointerDown$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.RowHeaderPointerDown,{...c,row:i.index})})}),this.registerEventHandler(this.Event.RowHeaderPointerUp,()=>{var h;return(h=g.currentRowHeaderPointerUp$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.RowHeaderPointerUp,{...c,row:i.index})})}),this.registerEventHandler(this.Event.RowHeaderHover,()=>{var h;return(h=g.currentHoveredRowHeader$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.RowHeaderHover,{...c,row:i.index})})}),this.registerEventHandler(this.Event.ColumnHeaderClick,()=>{var h;return(h=g.currentColHeaderClick$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.ColumnHeaderClick,{...c,column:i.index})})}),this.registerEventHandler(this.Event.ColumnHeaderPointerDown,()=>{var h;return(h=g.currentColHeaderPointerDown$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.ColumnHeaderPointerDown,{...c,column:i.index})})}),this.registerEventHandler(this.Event.ColumnHeaderPointerUp,()=>{var h;return(h=g.currentColHeaderPointerUp$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.ColumnHeaderPointerUp,{...c,column:i.index})})}),this.registerEventHandler(this.Event.ColumnHeaderHover,()=>{var h;return(h=g.currentHoveredColHeader$)==null?void 0:h.pipe(p.filter(i=>!!i)).subscribe(i=>{const c=this.getSheetTarget(i.unitId,i.subUnitId);c&&this.fireEvent(this.Event.ColumnHeaderHover,{...c,column:i.index})})}))})),this.disposeWithMe(b)}const s=new Map;let l;const u=e.get(d.LifecycleService),S=p.combineLatest([o.created$,u.lifecycle$]);this.disposeWithMe(S.subscribe(([v,b])=>{var i;if(v.type===d.UniverInstanceType.UNIVER_SHEET&&(l=v),b<=d.LifecycleStages.Rendered)return;const C=new d.DisposableCollection;if(!l)return;const g=this.getWorkbook(l.unitId);if(!g)return;s.get(l.unitId)&&((i=s.get(l.unitId))==null||i.dispose()),s.set(l.unitId,C);const _=l.with(a.SheetScrollManagerService),h=l.with(M.SheetsSelectionsService);C.add(this.registerEventHandler(this.Event.Scroll,()=>_.validViewportScrollInfo$.subscribe(c=>{c&&this.fireEvent(this.Event.Scroll,{workbook:g,worksheet:g.getActiveSheet(),...c})}))),C.add(this.registerEventHandler(this.Event.SelectionMoveStart,()=>h.selectionMoveStart$.subscribe(c=>{var I;this.fireEvent(this.Event.SelectionMoveStart,{workbook:g,worksheet:g.getActiveSheet(),selections:(I=c==null?void 0:c.map(P=>P.range))!=null?I:[]})}))),C.add(this.registerEventHandler(this.Event.SelectionMoving,()=>h.selectionMoving$.subscribe(c=>{var I;this.fireEvent(this.Event.SelectionMoving,{workbook:g,worksheet:g.getActiveSheet(),selections:(I=c==null?void 0:c.map(P=>P.range))!=null?I:[]})}))),C.add(this.registerEventHandler(this.Event.SelectionMoveEnd,()=>h.selectionMoveEnd$.subscribe(c=>{var I;this.fireEvent(this.Event.SelectionMoveEnd,{workbook:g,worksheet:g.getActiveSheet(),selections:(I=c==null?void 0:c.map(P=>P.range))!=null?I:[]})}))),C.add(this.registerEventHandler(this.Event.SelectionChanged,()=>h.selectionChanged$.subscribe(c=>{var I;this.fireEvent(this.Event.SelectionChanged,{workbook:g,worksheet:g.getActiveSheet(),selections:(I=c==null?void 0:c.map(P=>P.range))!=null?I:[]})}))),l=null,this.disposeWithMe(C)})),this.disposeWithMe(o.disposed$.subscribe(v=>{var b;(b=s.get(v))==null||b.dispose(),s.delete(v)})),this.disposeWithMe(()=>{s.forEach(v=>{v.dispose()})})}_initialize(e){this._initSheetUIEvent(e),this._initObserverListener(e);const r=e.get(d.ICommandService);this.registerEventHandler(this.Event.BeforeClipboardChange,()=>{const t=new d.DisposableCollection;return t.add(r.beforeCommandExecuted(n=>{switch(n.id){case E.CopyCommand.id:case E.CutCommand.id:this._beforeClipboardChange();break}})),t}),this.registerEventHandler(this.Event.ClipboardChanged,()=>{const t=new d.DisposableCollection;return t.add(r.beforeCommandExecuted(n=>{switch(n.id){case a.SheetPasteShortKeyCommand.id:this._beforeClipboardPaste(n.params);break}})),t.add(r.beforeCommandExecuted(async n=>{switch(n.id){case E.PasteCommand.id:await this._beforeClipboardPasteAsync();break}})),t}),this.disposeWithMe(r.onCommandExecuted(t=>{if(M.COMMAND_LISTENER_SKELETON_CHANGE.indexOf(t.id)>-1){const n=this.getActiveSheet();if(!n)return;const o=M.getSkeletonChangedEffectedRange(t,n.worksheet.getMaxColumns()).map(s=>{var l,u;return(u=(l=this.getWorkbook(s.unitId))==null?void 0:l.getSheetBySheetId(s.subUnitId))==null?void 0:u.getRange(s.range)}).filter(Boolean);if(!o.length)return;this.fireEvent(this.Event.SheetSkeletonChanged,{workbook:n.workbook,worksheet:n.worksheet,payload:t,skeleton:n.worksheet.getSkeleton(),effectedRanges:o})}})),this.registerEventHandler(this.Event.ClipboardChanged,()=>r.beforeCommandExecuted(t=>{switch(t.id){case E.CopyCommand.id:case E.CutCommand.id:this._clipboardChanged();break}})),this.registerEventHandler(this.Event.ClipboardPasted,()=>r.beforeCommandExecuted(t=>{switch(t.id){case a.SheetPasteShortKeyCommand.id:this._clipboardPaste(t.params);break;case E.PasteCommand.id:this._clipboardPasteAsync();break}}))}_generateClipboardCopyParam(){const e=this.getActiveWorkbook(),r=e==null?void 0:e.getActiveSheet(),t=e==null?void 0:e.getActiveRange();if(!e||!r||!t)return;const o=this._injector.get(a.ISheetClipboardService).generateCopyContent(e.getId(),r.getSheetId(),t.getRange());if(!o)return;const{html:s,plain:l}=o;return{workbook:e,worksheet:r,text:l,html:s,fromSheet:r,fromRange:t}}_beforeClipboardChange(){const e=this._generateClipboardCopyParam();if(e&&(this.fireEvent(this.Event.BeforeClipboardChange,e),e.cancel))throw new Error("Before clipboard change is canceled")}_clipboardChanged(){const e=this._generateClipboardCopyParam();if(e&&(this.fireEvent(this.Event.ClipboardChanged,e),e.cancel))throw new Error("Clipboard changed is canceled")}_generateClipboardPasteParam(e){if(!e)return;const{htmlContent:r,textContent:t}=e,n=this.getActiveWorkbook(),o=n==null?void 0:n.getActiveSheet();return!n||!o?void 0:{workbook:n,worksheet:o,text:t,html:r}}async _generateClipboardPasteParamAsync(){const e=this.getActiveWorkbook(),r=e==null?void 0:e.getActiveSheet();if(!e||!r)return;const o=(await this._injector.get(E.IClipboardInterfaceService).read())[0];let s;if(o){const l=o.types,u=l.indexOf(E.PLAIN_TEXT_CLIPBOARD_MIME_TYPE)!==-1?await o.getType(E.PLAIN_TEXT_CLIPBOARD_MIME_TYPE).then(v=>v&&v.text()):"",S=l.indexOf(E.HTML_CLIPBOARD_MIME_TYPE)!==-1?await o.getType(E.HTML_CLIPBOARD_MIME_TYPE).then(v=>v&&v.text()):"";s={workbook:e,worksheet:r,text:u,html:S}}return s}_beforeClipboardPaste(e){const r=this._generateClipboardPasteParam(e);if(r&&(this.fireEvent(this.Event.BeforeClipboardPaste,r),r.cancel))throw new Error("Before clipboard paste is canceled")}_clipboardPaste(e){const r=this._generateClipboardPasteParam(e);if(r&&(this.fireEvent(this.Event.ClipboardPasted,r),r.cancel))throw new Error("Clipboard pasted is canceled")}async _beforeClipboardPasteAsync(){if(!E.supportClipboardAPI()){this._injector.get(d.ILogService).warn("[Facade]: The navigator object only supports the browser environment");return}const e=await this._generateClipboardPasteParamAsync();if(e&&(this.fireEvent(this.Event.BeforeClipboardPaste,e),e.cancel))throw new Error("Before clipboard paste is canceled")}async _clipboardPasteAsync(){if(!E.supportClipboardAPI()){this._injector.get(d.ILogService).warn("[Facade]: The navigator object only supports the browser environment");return}const e=await this._generateClipboardPasteParamAsync();if(e&&(this.fireEvent(this.Event.ClipboardPasted,e),e.cancel))throw new Error("Clipboard pasted is canceled")}customizeColumnHeader(e){var S,v;const r=this.getActiveWorkbook();if(!r){console.error("WorkBook not exist");return}const t=r==null?void 0:r.getId(),n=this._injector.get(m.IRenderManagerService),o=r.getActiveSheet(),s=o.getSheetId(),l=n.getRenderById(t);l&&((S=e.headerStyle)!=null&&S.size)&&(l.with(a.SheetSkeletonManagerService).setColumnHeaderSize(l,s,(v=e.headerStyle)==null?void 0:v.size),o==null||o.refreshCanvas()),this._getSheetRenderComponent(t,a.SHEET_VIEW_KEY.COLUMN).setCustomHeader(e),o==null||o.refreshCanvas()}customizeRowHeader(e){const r=this.getActiveWorkbook();if(!r){console.error("WorkBook not exist");return}const t=r==null?void 0:r.getId();this._getSheetRenderComponent(t,a.SHEET_VIEW_KEY.ROW).setCustomHeader(e)}registerSheetRowHeaderExtension(e,...r){const t=this._getSheetRenderComponent(e,a.SHEET_VIEW_KEY.ROW),n=t.register(...r);return d.toDisposable(()=>{n.dispose(),t.makeDirty(!0)})}registerSheetColumnHeaderExtension(e,...r){const t=this._getSheetRenderComponent(e,a.SHEET_VIEW_KEY.COLUMN),n=t.register(...r);return d.toDisposable(()=>{n.dispose(),t.makeDirty(!0)})}registerSheetMainExtension(e,...r){const t=this._getSheetRenderComponent(e,a.SHEET_VIEW_KEY.MAIN),n=t.register(...r);return d.toDisposable(()=>{n.dispose(),t.makeDirty(!0)})}_getSheetRenderComponent(e,r){const n=this._injector.get(m.IRenderManagerService).getRenderById(e);if(!n)throw new Error(`Render Unit with unitId ${e} not found`);const{components:o}=n,s=o.get(r);if(!s)throw new Error("Render component not found");return s}getSheetHooks(){return this._injector.createInstance(w.FSheetHooks)}}H.FUniver.extend(T);class B extends w.FWorkbook{openSiderbar(e){return this._logDeprecation("openSiderbar"),this._injector.get(E.ISidebarService).open(e)}openDialog(e){this._logDeprecation("openDialog");const t=this._injector.get(E.IDialogService).open({...e,onClose:()=>{t.dispose()}});return t}_logDeprecation(e){this._injector.get(d.ILogService).warn("[FWorkbook]",`${e} is deprecated. Please use the function of the same name on "FUniver".`)}generateCellParams(e){const r=this.getActiveSheet();return{row:e.row,column:e.col,workbook:this,worksheet:r}}onCellClick(e){const r=this._injector.get(a.HoverManagerService);return d.toDisposable(r.currentClickedCell$.pipe(p.filter(t=>!!t)).subscribe(t=>{e(t)}))}onCellHover(e){const r=this._injector.get(a.HoverManagerService);return d.toDisposable(r.currentRichText$.pipe(p.filter(t=>!!t)).subscribe(e))}onCellPointerDown(e){const r=this._injector.get(a.HoverManagerService);return d.toDisposable(r.currentPointerDownCell$.subscribe(e))}onCellPointerUp(e){const r=this._injector.get(a.HoverManagerService);return d.toDisposable(r.currentPointerUpCell$.subscribe(e))}onCellPointerMove(e){const r=this._injector.get(a.HoverManagerService);return d.toDisposable(r.currentCellPosWithEvent$.pipe(p.filter(t=>!!t)).subscribe(t=>{e(t,t.event)}))}onDragOver(e){const r=this._injector.get(a.DragManagerService);return d.toDisposable(r.currentCell$.pipe(p.filter(t=>!!t)).subscribe(t=>{e(t)}))}onDrop(e){const r=this._injector.get(a.DragManagerService);return d.toDisposable(r.endCell$.pipe(p.filter(t=>!!t)).subscribe(t=>{e(t)}))}startEditing(){return this._injector.get(d.ICommandService).syncExecuteCommand(a.SetCellEditVisibleOperation.id,{eventType:m.DeviceInputEventType.Dblclick,unitId:this._workbook.getUnitId(),visible:!0})}async endEditing(e){return this._injector.get(d.ICommandService).syncExecuteCommand(a.SetCellEditVisibleOperation.id,{eventType:m.DeviceInputEventType.Keyboard,keycode:e?E.KeyCode.ENTER:E.KeyCode.ESC,visible:!1,unitId:this._workbook.getUnitId()}),await d.awaitTime(0),!0}endEditingAsync(e=!0){return this.endEditing(e)}getScrollStateBySheetId(e){const r=this._workbook.getUnitId(),n=this._injector.get(m.IRenderManagerService).getRenderById(r);return n?n.with(a.SheetScrollManagerService).getScrollStateByParam({unitId:r,sheetId:e}):null}disableSelection(){const e=this._workbook.getUnitId(),t=this._injector.get(m.IRenderManagerService).getRenderById(e);return t&&t.with(a.ISheetSelectionRenderService).disableSelection(),this}enableSelection(){const e=this._workbook.getUnitId(),t=this._injector.get(m.IRenderManagerService).getRenderById(e);return t&&t.with(a.ISheetSelectionRenderService).enableSelection(),this}transparentSelection(){const e=this._workbook.getUnitId(),t=this._injector.get(m.IRenderManagerService).getRenderById(e);return t&&t.with(a.ISheetSelectionRenderService).transparentSelection(),this}showSelection(){const e=this._workbook.getUnitId(),t=this._injector.get(m.IRenderManagerService).getRenderById(e);return t&&t.with(a.ISheetSelectionRenderService).showSelection(),this}}w.FWorkbook.extend(B);class x extends w.FWorksheet{refreshCanvas(){const e=this._injector.get(m.IRenderManagerService),r=this._fWorkbook.id,t=e.getRenderById(r);if(!t)throw new Error(`Render Unit with unitId ${r} not found`);t.with(a.SheetSkeletonManagerService).reCalculate();const n=t.mainComponent;if(!n)throw new Error("Main component not found");return n.makeDirty(),this}zoom(e){return this._injector.get(d.ICommandService).syncExecuteCommand(a.ChangeZoomRatioCommand.id,{unitId:this._workbook.getUnitId(),subUnitId:this._worksheet.getSheetId(),zoomRatio:e}),this}getZoom(){return this._worksheet.getZoomRatio()}getVisibleRange(){const e=this._workbook.getUnitId(),t=this._injector.get(m.IRenderManagerService).getRenderById(e);let n={startColumn:0,startRow:0,endColumn:0,endRow:0};if(!t)return n;const s=t.with(a.SheetSkeletonManagerService).getCurrentSkeleton();if(!s)return n;const l=s==null?void 0:s.getVisibleRanges();if(!l)return n;n=s.getVisibleRangeByViewport(m.SHEET_VIEWPORT_KEY.VIEW_MAIN);for(const[u,S]of l)m.sheetContentViewportKeys.indexOf(u)!==-1&&(n.startColumn=Math.min(n.startColumn,S.startColumn),n.startRow=Math.min(n.startRow,S.startRow),n.endColumn=Math.max(n.endColumn,S.endColumn),n.endRow=Math.max(n.endRow,S.endRow));return n}scrollToCell(e,r){const t=this._workbook.getUnitId(),o=this._injector.get(m.IRenderManagerService).getRenderById(t);return o&&(o==null?void 0:o.with(a.SheetsScrollRenderController)).scrollToCell(e,r),this}getScrollState(){const e={offsetX:0,offsetY:0,sheetViewStartColumn:0,sheetViewStartRow:0},r=this._workbook.getUnitId(),t=this._worksheet.getSheetId(),o=this._injector.get(m.IRenderManagerService).getRenderById(r);return o&&o.with(a.SheetScrollManagerService).getScrollStateByParam({unitId:r,sheetId:t})||e}onScroll(e){var o;const r=this._workbook.getUnitId(),n=(o=this._injector.get(m.IRenderManagerService).getRenderById(r))==null?void 0:o.with(a.SheetScrollManagerService);if(n){const s=n.validViewportScrollInfo$.subscribe(l=>{e(l)});return d.toDisposable(s)}return d.toDisposable(()=>{})}getSkeleton(){var r,t;const e=(r=this._injector.get(m.IRenderManagerService).getRenderById(this._workbook.getUnitId()))==null?void 0:r.with(a.SheetSkeletonManagerService);return(t=e==null?void 0:e.getWorksheetSkeleton(this._worksheet.getSheetId()))==null?void 0:t.skeleton}setColumnAutoWidth(e,r){const t=this._workbook.getUnitId(),n=this._worksheet.getSheetId(),o=[{startColumn:e,endColumn:e+r-1,startRow:0,endRow:this._worksheet.getRowCount()-1}];return this._commandService.syncExecuteCommand(a.SetWorksheetColAutoWidthCommand.id,{unitId:t,subUnitId:n,ranges:o}),this}customizeColumnHeader(e){var u,S;const r=this,t=this._fWorkbook.getId(),n=this._injector.get(m.IRenderManagerService),o=r.getSheetId(),s=n.getRenderById(t);s&&((u=e.headerStyle)!=null&&u.size)&&(s.with(a.SheetSkeletonManagerService).setColumnHeaderSize(s,o,(S=e.headerStyle)==null?void 0:S.size),r==null||r.refreshCanvas());const l=this._getSheetRenderComponent(t,a.SHEET_VIEW_KEY.COLUMN);l&&(l.setCustomHeader(e),r==null||r.refreshCanvas())}customizeRowHeader(e){const r=this._fWorkbook.getId();this._getSheetRenderComponent(r,a.SHEET_VIEW_KEY.ROW).setCustomHeader(e)}setColumnHeaderHeight(e){const r=this,t=this._fWorkbook.getId(),n=r.getSheetId();return this._commandService.executeCommand(a.SetColumnHeaderHeightCommand.id,{unitId:t,subUnitId:n,size:e}),r==null||r.refreshCanvas(),this}setRowHeaderWidth(e){const r=this,t=this._fWorkbook.getId(),n=r.getSheetId();this._commandService.executeCommand(a.SetRowHeaderWidthCommand.id,{unitId:t,subUnitId:n,size:e});const o=this._getSheetRenderComponent(t,a.SHEET_VIEW_KEY.ROW);return o&&o.setCustomHeader({headerStyle:{size:e}}),r==null||r.refreshCanvas(),this}_getSheetRenderComponent(e,r){const n=this._injector.get(m.IRenderManagerService).getRenderById(e);if(!n)throw new Error(`Render Unit with unitId ${e} not found`);const{components:o}=n,s=o.get(r);if(!s)throw new Error("Render component not found");return s}}w.FWorksheet.extend(x);class A extends w.FPermission{setPermissionDialogVisible(e){this._permissionService.setShowComponents(e)}}w.FPermission.extend(A);class O extends w.FSheetHooks{onCellPointerMove(e){return d.toDisposable(this._injector.get(a.HoverManagerService).currentPosition$.subscribe(e))}onCellPointerOver(e){return d.toDisposable(this._injector.get(a.HoverManagerService).currentCell$.subscribe(e))}onCellDragOver(e){return d.toDisposable(this._injector.get(a.DragManagerService).currentCell$.subscribe(e))}onCellDrop(e){return d.toDisposable(this._injector.get(a.DragManagerService).endCell$.subscribe(e))}onCellRender(e,r=d.InterceptorEffectEnum.Style,t=M.InterceptCellContentPriority.DATA_VALIDATION){return this._injector.get(M.SheetInterceptorService).intercept(M.INTERCEPTOR_POINT.CELL_CONTENT,{effect:r,handler:(n,o,s)=>s({...n,customRender:[...(n==null?void 0:n.customRender)||[],...e||[]]}),priority:t})}onBeforeCellEdit(e){return this._injector.get(d.ICommandService).beforeCommandExecuted(r=>{const t=r.params;r.id===a.SetCellEditVisibleOperation.id&&t.visible&&e(t)})}onAfterCellEdit(e){return this._injector.get(d.ICommandService).onCommandExecuted(r=>{const t=r.params;r.id===a.SetCellEditVisibleOperation.id&&!t.visible&&e(t)})}}w.FSheetHooks.extend(O);const R={CellClicked:"CellClicked",CellPointerDown:"CellPointerDown",CellPointerUp:"CellPointerUp",CellPointerMove:"CellPointerMove",CellHover:"CellHover"};class W{get BeforeClipboardChange(){return"BeforeClipboardChange"}get ClipboardChanged(){return"ClipboardChanged"}get BeforeClipboardPaste(){return"BeforeClipboardPaste"}get ClipboardPasted(){return"ClipboardPasted"}get BeforeSheetEditStart(){return"BeforeSheetEditStart"}get SheetEditStarted(){return"SheetEditStarted"}get SheetEditChanging(){return"SheetEditChanging"}get BeforeSheetEditEnd(){return"BeforeSheetEditEnd"}get SheetEditEnded(){return"SheetEditEnded"}get CellClicked(){return R.CellClicked}get CellHover(){return R.CellHover}get CellPointerDown(){return R.CellPointerDown}get CellPointerUp(){return R.CellPointerUp}get CellPointerMove(){return R.CellPointerMove}get DragOver(){return"DragOver"}get Drop(){return"Drop"}get Scroll(){return"Scroll"}get SelectionMoveStart(){return"SelectionMoveStart"}get SelectionChanged(){return"SelectionChanged"}get SelectionMoving(){return"SelectionMoving"}get SelectionMoveEnd(){return"SelectionMoveEnd"}get RowHeaderClick(){return"RowHeaderClick"}get RowHeaderPointerDown(){return"RowHeaderPointerDown"}get RowHeaderPointerUp(){return"RowHeaderPointerUp"}get RowHeaderHover(){return"RowHeaderHover"}get ColumnHeaderClick(){return"ColumnHeaderClick"}get ColumnHeaderPointerDown(){return"ColumnHeaderPointerDown"}get ColumnHeaderPointerUp(){return"ColumnHeaderPointerUp"}get ColumnHeaderHover(){return"ColumnHeaderHover"}get SheetSkeletonChanged(){return"SheetSkeletonChanged"}get BeforeSheetZoomChange(){return"BeforeSheetZoomChange"}get SheetZoomChanged(){return"SheetZoomChanged"}}H.FEventName.extend(W);class U extends w.FRange{getCell(){var l;const e=this._injector.get(m.IRenderManagerService),r=this._injector.get(d.ILogService),t=this._workbook.getUnitId(),n=this._worksheet.getSheetId(),o=e.getRenderById(t),s=(l=o==null?void 0:o.with(a.SheetSkeletonManagerService).getSkeletonParam(n))==null?void 0:l.skeleton;if(!s)throw r.error("[Facade]: `FRange.getCell` can only be called in current worksheet"),new Error("`FRange.getCell` can only be called in current worksheet");return s.getCellWithCoordByIndex(this._range.startRow,this._range.startColumn)}getCellRect(){const{startX:e,startY:r,endX:t,endY:n}=this.getCell(),o={x:e,y:r,width:t-e,height:n-r,top:r,left:e,bottom:n,right:t};return{...o,toJSON:()=>JSON.stringify(o)}}generateHTML(){var r;const e=this._injector.get(a.ISheetClipboardService).generateCopyContent(this._workbook.getUnitId(),this._worksheet.getSheetId(),this._range);return(r=e==null?void 0:e.html)!=null?r:""}attachPopup(e){var s,l,u;e.direction=(s=e.direction)!=null?s:"horizontal",e.extraProps=(l=e.extraProps)!=null?l:{},e.offset=(u=e.offset)!=null?u:[0,0];const{key:r,disposableCollection:t}=y(e,this._injector.get(E.ComponentManager)),o=this._injector.get(a.SheetCanvasPopManagerService).attachPopupToCell(this._range.startRow,this._range.startColumn,{...e,componentKey:r},this.getUnitId(),this._worksheet.getSheetId());return o?(t.add(o),t):(t.dispose(),null)}attachAlertPopup(e){const r=this._injector.get(a.CellAlertManagerService),t={workbook:this._workbook,worksheet:this._worksheet,row:this._range.startRow,col:this._range.startColumn,unitId:this.getUnitId(),subUnitId:this._worksheet.getSheetId()};return r.showAlert({...e,location:t}),{dispose:()=>{r.removeAlert(e.key)}}}attachRangePopup(e){var s,l,u;e.direction=(s=e.direction)!=null?s:"top-center",e.extraProps=(l=e.extraProps)!=null?l:{},e.offset=(u=e.offset)!=null?u:[0,0];const{key:r,disposableCollection:t}=y(e,this._injector.get(E.ComponentManager)),o=this._injector.get(a.SheetCanvasPopManagerService).attachRangePopup(this._range,{...e,componentKey:r},this.getUnitId(),this._worksheet.getSheetId());return o?(t.add(o),t):(t.dispose(),null)}highlight(e,r){const t=this._injector.get(a.IMarkSelectionService),n=t.addShape({range:this._range,style:e,primary:r});if(!n)throw new Error("Failed to highlight current range");return d.toDisposable(()=>{t.removeShape(n)})}}w.FRange.extend(U);function y(k,e){const{componentKey:r,isVue3:t}=k;let n;const o=new d.DisposableCollection;return typeof r=="string"?n=r:(n=`External_${d.generateRandomId(6)}`,o.add(e.register(n,r,{framework:t?"vue3":"react"}))),{key:n,disposableCollection:o}}f.transformComponentKey=y,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});