Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@revolist/revogrid

Package Overview
Dependencies
Maintainers
0
Versions
522
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@revolist/revogrid - npm Package Compare versions

Comparing version 4.11.0 to 4.11.1

dist/cjs/column.drag.plugin-16a106da.js

2

dist/cjs/index.cjs.js

@@ -8,3 +8,3 @@ /*!

const column_drag_plugin = require('./column.drag.plugin-5978b75e.js');
const column_drag_plugin = require('./column.drag.plugin-16a106da.js');
const headerCellRenderer = require('./header-cell-renderer-64a361f7.js');

@@ -11,0 +11,0 @@ const index = require('./index-10d10c55.js');

@@ -172,3 +172,3 @@ /*!

*/
onRangeApply(newData, range) {
onRangeApply(newData, newRange, oldRange) {
this.sv.rangeDataApply({

@@ -178,4 +178,6 @@ data: newData,

type: this.sv.dataStore.get('type'),
oldRange,
newRange
});
this.sv.setRange(range);
this.sv.setRange(newRange);
}

@@ -206,3 +208,3 @@ /** Apply range and copy data during range application */

}
this.onRangeApply(rangeData.newData, newRange);
this.onRangeApply(rangeData.newData, newRange, rangeToCopy);
}

@@ -209,0 +211,0 @@ /**

@@ -410,3 +410,3 @@ /*!

}
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(changed, range);
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(changed, range, range);
}

@@ -427,3 +427,3 @@ async focusNext() {

const data = this.columnService.getRangeStaticData(range, '');
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(data, range);
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(data, range, range);
}

@@ -1237,3 +1237,3 @@ else if (this.canEdit()) {

"original": "BeforeRangeSaveDataDetails",
"resolved": "{ data: DataLookup; models: Partial<DataLookup>; type: DimensionRows; }",
"resolved": "{ data: DataLookup; models: Partial<DataLookup>; type: DimensionRows; newRange: RangeArea | null; oldRange: RangeArea | null; }",
"references": {

@@ -1240,0 +1240,0 @@ "BeforeRangeSaveDataDetails": {

@@ -77,10 +77,10 @@ /*!

this.addEventListener('beforeheaderclick', (e) => {
var _a, _b;
var _a, _b, _c, _d;
if (e.defaultPrevented) {
return;
}
if (!e.detail.column.sortable) {
if (!((_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.column) === null || _b === void 0 ? void 0 : _b.sortable)) {
return;
}
this.headerclick(e.detail.column, e.detail.index, (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.originalEvent) === null || _b === void 0 ? void 0 : _b.shiftKey);
this.headerclick(e.detail.column, e.detail.index, (_d = (_c = e.detail) === null || _c === void 0 ? void 0 : _c.originalEvent) === null || _d === void 0 ? void 0 : _d.shiftKey);
});

@@ -87,0 +87,0 @@ }

/*!
* Built by Revolist OU ❤️
*/
import { B as BasePlugin } from './column.drag.plugin-7756231e.js';
export { A as AutoSizeColumnPlugin, B as BasePlugin, C as ColumnMovePlugin, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, d as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, e as FILTE_PANEL, f as FilterPlugin, G as GroupingRowPlugin, l as SortingPlugin, S as StretchColumn, c as columnTypes, g as filterCoreFunctionsIndexedByType, j as filterNames, h as filterTypes, k as getLeftRelative, i as isRowType, a as isStretchPlugin, r as rowTypes } from './column.drag.plugin-7756231e.js';
import { B as BasePlugin } from './column.drag.plugin-6e6655d5.js';
export { A as AutoSizeColumnPlugin, B as BasePlugin, C as ColumnMovePlugin, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, d as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, e as FILTE_PANEL, f as FilterPlugin, G as GroupingRowPlugin, l as SortingPlugin, S as StretchColumn, c as columnTypes, g as filterCoreFunctionsIndexedByType, j as filterNames, h as filterTypes, k as getLeftRelative, i as isRowType, a as isStretchPlugin, r as rowTypes } from './column.drag.plugin-6e6655d5.js';
export { d as dispatch, a as dispatchByEvent } from './header-cell-renderer-f46a8010.js';

@@ -7,0 +7,0 @@ export { h } from './index-a61f225b.js';

/*!
* Built by Revolist OU ❤️
*/
import{B as _}from"./column.drag.plugin-7756231e.js";export{A as AutoSizeColumnPlugin,B as BasePlugin,C as ColumnMovePlugin,D as DimensionStore,b as ExportCsv,E as ExportFilePlugin,d as FILTER_CONFIG_CHANGED_EVENT,F as FILTER_TRIMMED_TYPE,e as FILTE_PANEL,f as FilterPlugin,G as GroupingRowPlugin,l as SortingPlugin,S as StretchColumn,c as columnTypes,g as filterCoreFunctionsIndexedByType,j as filterNames,h as filterTypes,k as getLeftRelative,i as isRowType,a as isStretchPlugin,r as rowTypes}from"./column.drag.plugin-7756231e.js";export{d as dispatch,a as dispatchByEvent}from"./header-cell-renderer-f46a8010.js";export{h}from"./index-a61f225b.js";export{C as CELL_CLASS,L as CELL_HANDLER_CLASS,x as DATA_COL,y as DATA_ROW,z as DISABLED_CLASS,I as DRAGGABLE_CLASS,O as DRAGG_TEXT,G as DRAG_ICON_CLASS,D as DataStore,N as EDIT_INPUT_WR,J as FOCUS_CLASS,P as GRID_INTERNALS,F as HEADER_ACTUAL_ROW_CLASS,H as HEADER_CLASS,E as HEADER_ROW_CLASS,B as HEADER_SORTABLE_CLASS,M as MIN_COL_SIZE,K as MOBILE_CLASS,R as RESIZE_INTERVAL,Q as ROW_FOCUSED_CLASS,A as ROW_HEADER_TYPE,S as SELECTION_BORDER_CLASS,T as TMP_SELECTION_BG_CLASS,v as applyMixins,i as calculateDimensionData,U as codesLetter,l as findPositionInArray,h as gatherTrimmedItems,k as getItemByIndex,j as getItemByPosition,g as getPhysical,o as getScrollbarSize,b as getSourceItem,f as getSourceItemVirtualIndexByProp,c as getSourcePhysicalIndex,a as getVisibleSourceItem,V as keyValues,n as mergeSortedArray,p as proxyPlugin,m as pushSorted,r as range,q as scaleValue,e as setItems,d as setSourceByPhysicalIndex,s as setSourceByVirtualIndex,w as setStore,u as timeout,t as trimmedPlugin}from"./dimension.helpers-d0d709c4.js";export{S as SortingSign}from"./sorting.sign-1a675bf7.js";export{T as TextEditor}from"./text-editor-148a17c1.js";export{S as SelectionStore,c as cropCellToMax,l as gatherGroup,b as getCellData,e as getCellDataParsed,d as getCellRaw,m as getColumnByProp,h as getColumnSizes,f as getColumnType,k as getColumns,g as getRange,j as isColGrouping,i as isHiddenStore,a as isRangeSingleCell,n as nextCell}from"./column.service-7a47e6d0.js";export{V as ViewportStore,a as addMissingItems,f as calculateRowHeaderSize,d as getFirstItem,b as getItems,e as getLastItem,g as getUpdatedItemsByPosition,i as isActiveRange,c as isActiveRangeOutsideLastItem,r as recombineByOffset,s as setItemSizes,u as updateMissingAndRange}from"./viewport.store-afa8c4fe.js";export{A as AND_OR_BUTTON,e as AndOrButton,a as FILTER_BUTTON_ACTIVE,F as FILTER_BUTTON_CLASS,b as FILTER_PROP,c as FilterButton,T as TRASH_BUTTON,d as TrashButton,i as isFilterBtn}from"./filter.button-d40ab17b.js";export{k as isAll,c as isClear,h as isCopy,a as isCtrlKey,b as isCtrlMetaKey,g as isCut,f as isEnterKeyValue,i as isMetaKey,j as isPaste,d as isTab,e as isTabKeyValue}from"./key.utils-7c3218d4.js";import"./debounce-b3166f78.js";const W=new Map([["contentsizechanged","contentsizechanged"],["beforeedit","beforeedit"],["beforerangeedit","beforerangeedit"],["afteredit","afteredit"],["beforeautofill","beforeautofill"],["beforerange","beforerange"],["afterfocus","afterfocus"],["roworderchanged","roworderchanged"],["beforesortingapply","beforesortingapply"],["beforesorting","beforesorting"],["rowdragstart","rowdragstart"],["headerclick","headerclick"],["beforecellfocus","beforecellfocus"],["beforefocuslost","beforefocuslost"],["beforesourceset","beforesourceset"],["beforeanysource","beforeanysource"],["aftersourceset","aftersourceset"],["afteranysource","afteranysource"],["beforecolumnsset","beforecolumnsset"],["beforecolumnapplied","beforecolumnapplied"],["aftercolumnsset","aftercolumnsset"],["beforefilterapply","beforefilterapply"],["beforefiltertrimmed","beforefiltertrimmed"],["beforetrimmed","beforetrimmed"],["aftertrimmed","aftertrimmed"],["viewportscroll","viewportscroll"],["beforeexport","beforeexport"],["beforeeditstart","beforeeditstart"],["aftercolumnresize","aftercolumnresize"],["beforerowdefinition","beforerowdefinition"],["filterconfigchanged","filterconfigchanged"],["sortingconfigchanged","sortingconfigchanged"],["rowheaderschanged","rowheaderschanged"],["beforegridrender","beforegridrender"],["aftergridrender","aftergridrender"],["aftergridinit","aftergridinit"],["additionaldatachanged","additionaldatachanged"],["afterthemechanged","afterthemechanged"],["created","created"],["beforepaste","beforepaste"],["beforepasteapply","beforepasteapply"],["pasteregion","pasteregion"],["afterpasteapply","afterpasteapply"],["beforecut","beforecut"],["clearregion","clearregion"],["beforecopy","beforecopy"],["beforecopyapply","beforecopyapply"],["copyregion","copyregion"],["beforerowrender","beforerowrender"],["afterrender","afterrender"],["beforecellrender","beforecellrender"],["beforedatarender","beforedatarender"],["dragstartcell","dragstartcell"],["celledit","celledit"],["closeedit","closeedit"],["filterChange","filterChange"],["resetChange","resetChange"],["beforefocusrender","beforefocusrender"],["beforescrollintoview","beforescrollintoview"],["afterfocus","afterfocus"],["beforeheaderclick","beforeheaderclick"],["headerresize","headerresize"],["beforeheaderresize","beforeheaderresize"],["headerdblclick","headerdblclick"],["beforeheaderrender","beforeheaderrender"],["afterheaderrender","afterheaderrender"],["rowdragstartinit","rowdragstartinit"],["rowdragendinit","rowdragendinit"],["rowdragmoveinit","rowdragmoveinit"],["rowdragmousemove","rowdragmousemove"],["rowdropinit","rowdropinit"],["roworderchange","roworderchange"],["beforecopyregion","beforecopyregion"],["beforepasteregion","beforepasteregion"],["celleditapply","celleditapply"],["beforecellfocusinit","beforecellfocusinit"],["beforenextvpfocus","beforenextvpfocus"],["setedit","setedit"],["beforeapplyrange","beforeapplyrange"],["beforesetrange","beforesetrange"],["setrange","setrange"],["beforeeditrender","beforeeditrender"],["selectall","selectall"],["canceledit","canceledit"],["settemprange","settemprange"],["beforesettemprange","beforesettemprange"],["applyfocus","applyfocus"],["focuscell","focuscell"],["beforerangedataapply","beforerangedataapply"],["selectionchangeinit","selectionchangeinit"],["beforerangecopyapply","beforerangecopyapply"],["rangeeditapply","rangeeditapply"],["clipboardrangecopy","clipboardrangecopy"],["clipboardrangepaste","clipboardrangepaste"],["beforekeydown","beforekeydown"],["beforekeyup","beforekeyup"],["beforecellsave","beforecellsave"],["scrollview","scrollview"],["ref","ref"],["scrollvirtual","scrollvirtual"],["scrollviewport","scrollviewport"],["resizeviewport","resizeviewport"],["scrollchange","scrollchange"],["scrollviewportsilent","scrollviewportsilent"],["html","html"]]);class Y extends _{constructor(e,r){super(e,r);this.addEventListener("beforepasteapply",(e=>this.handleBeforePasteApply(e)))}handleBeforePasteApply(e){const r=this.providers.selection.focused;const a=this.providers.selection.edit!=null;if(!r||a){return}const s=this.providers.data.stores.rgRow.store.get("items").length;const t=r.y+e.detail.parsed.length;if(s<t){const e=t-s;const r=Array.from({length:e},((e,r)=>({index:s+r,data:{}})));const a=this.emit("newRows",{newRows:r});if(a.defaultPrevented){return}const o=[...this.providers.data.stores.rgRow.store.get("source"),...a.detail.newRows.map((e=>e.data))];this.providers.data.setData(o)}}}export{Y as AutoAddRowsPlugin,W as REVOGRID_EVENTS};
import{B as _}from"./column.drag.plugin-6e6655d5.js";export{A as AutoSizeColumnPlugin,B as BasePlugin,C as ColumnMovePlugin,D as DimensionStore,b as ExportCsv,E as ExportFilePlugin,d as FILTER_CONFIG_CHANGED_EVENT,F as FILTER_TRIMMED_TYPE,e as FILTE_PANEL,f as FilterPlugin,G as GroupingRowPlugin,l as SortingPlugin,S as StretchColumn,c as columnTypes,g as filterCoreFunctionsIndexedByType,j as filterNames,h as filterTypes,k as getLeftRelative,i as isRowType,a as isStretchPlugin,r as rowTypes}from"./column.drag.plugin-6e6655d5.js";export{d as dispatch,a as dispatchByEvent}from"./header-cell-renderer-f46a8010.js";export{h}from"./index-a61f225b.js";export{C as CELL_CLASS,L as CELL_HANDLER_CLASS,x as DATA_COL,y as DATA_ROW,z as DISABLED_CLASS,I as DRAGGABLE_CLASS,O as DRAGG_TEXT,G as DRAG_ICON_CLASS,D as DataStore,N as EDIT_INPUT_WR,J as FOCUS_CLASS,P as GRID_INTERNALS,F as HEADER_ACTUAL_ROW_CLASS,H as HEADER_CLASS,E as HEADER_ROW_CLASS,B as HEADER_SORTABLE_CLASS,M as MIN_COL_SIZE,K as MOBILE_CLASS,R as RESIZE_INTERVAL,Q as ROW_FOCUSED_CLASS,A as ROW_HEADER_TYPE,S as SELECTION_BORDER_CLASS,T as TMP_SELECTION_BG_CLASS,v as applyMixins,i as calculateDimensionData,U as codesLetter,l as findPositionInArray,h as gatherTrimmedItems,k as getItemByIndex,j as getItemByPosition,g as getPhysical,o as getScrollbarSize,b as getSourceItem,f as getSourceItemVirtualIndexByProp,c as getSourcePhysicalIndex,a as getVisibleSourceItem,V as keyValues,n as mergeSortedArray,p as proxyPlugin,m as pushSorted,r as range,q as scaleValue,e as setItems,d as setSourceByPhysicalIndex,s as setSourceByVirtualIndex,w as setStore,u as timeout,t as trimmedPlugin}from"./dimension.helpers-d0d709c4.js";export{S as SortingSign}from"./sorting.sign-1a675bf7.js";export{T as TextEditor}from"./text-editor-148a17c1.js";export{S as SelectionStore,c as cropCellToMax,l as gatherGroup,b as getCellData,e as getCellDataParsed,d as getCellRaw,m as getColumnByProp,h as getColumnSizes,f as getColumnType,k as getColumns,g as getRange,j as isColGrouping,i as isHiddenStore,a as isRangeSingleCell,n as nextCell}from"./column.service-7a47e6d0.js";export{V as ViewportStore,a as addMissingItems,f as calculateRowHeaderSize,d as getFirstItem,b as getItems,e as getLastItem,g as getUpdatedItemsByPosition,i as isActiveRange,c as isActiveRangeOutsideLastItem,r as recombineByOffset,s as setItemSizes,u as updateMissingAndRange}from"./viewport.store-afa8c4fe.js";export{A as AND_OR_BUTTON,e as AndOrButton,a as FILTER_BUTTON_ACTIVE,F as FILTER_BUTTON_CLASS,b as FILTER_PROP,c as FilterButton,T as TRASH_BUTTON,d as TrashButton,i as isFilterBtn}from"./filter.button-d40ab17b.js";export{k as isAll,c as isClear,h as isCopy,a as isCtrlKey,b as isCtrlMetaKey,g as isCut,f as isEnterKeyValue,i as isMetaKey,j as isPaste,d as isTab,e as isTabKeyValue}from"./key.utils-7c3218d4.js";import"./debounce-b3166f78.js";const W=new Map([["contentsizechanged","contentsizechanged"],["beforeedit","beforeedit"],["beforerangeedit","beforerangeedit"],["afteredit","afteredit"],["beforeautofill","beforeautofill"],["beforerange","beforerange"],["afterfocus","afterfocus"],["roworderchanged","roworderchanged"],["beforesortingapply","beforesortingapply"],["beforesorting","beforesorting"],["rowdragstart","rowdragstart"],["headerclick","headerclick"],["beforecellfocus","beforecellfocus"],["beforefocuslost","beforefocuslost"],["beforesourceset","beforesourceset"],["beforeanysource","beforeanysource"],["aftersourceset","aftersourceset"],["afteranysource","afteranysource"],["beforecolumnsset","beforecolumnsset"],["beforecolumnapplied","beforecolumnapplied"],["aftercolumnsset","aftercolumnsset"],["beforefilterapply","beforefilterapply"],["beforefiltertrimmed","beforefiltertrimmed"],["beforetrimmed","beforetrimmed"],["aftertrimmed","aftertrimmed"],["viewportscroll","viewportscroll"],["beforeexport","beforeexport"],["beforeeditstart","beforeeditstart"],["aftercolumnresize","aftercolumnresize"],["beforerowdefinition","beforerowdefinition"],["filterconfigchanged","filterconfigchanged"],["sortingconfigchanged","sortingconfigchanged"],["rowheaderschanged","rowheaderschanged"],["beforegridrender","beforegridrender"],["aftergridrender","aftergridrender"],["aftergridinit","aftergridinit"],["additionaldatachanged","additionaldatachanged"],["afterthemechanged","afterthemechanged"],["created","created"],["beforepaste","beforepaste"],["beforepasteapply","beforepasteapply"],["pasteregion","pasteregion"],["afterpasteapply","afterpasteapply"],["beforecut","beforecut"],["clearregion","clearregion"],["beforecopy","beforecopy"],["beforecopyapply","beforecopyapply"],["copyregion","copyregion"],["beforerowrender","beforerowrender"],["afterrender","afterrender"],["beforecellrender","beforecellrender"],["beforedatarender","beforedatarender"],["dragstartcell","dragstartcell"],["celledit","celledit"],["closeedit","closeedit"],["filterChange","filterChange"],["resetChange","resetChange"],["beforefocusrender","beforefocusrender"],["beforescrollintoview","beforescrollintoview"],["afterfocus","afterfocus"],["beforeheaderclick","beforeheaderclick"],["headerresize","headerresize"],["beforeheaderresize","beforeheaderresize"],["headerdblclick","headerdblclick"],["beforeheaderrender","beforeheaderrender"],["afterheaderrender","afterheaderrender"],["rowdragstartinit","rowdragstartinit"],["rowdragendinit","rowdragendinit"],["rowdragmoveinit","rowdragmoveinit"],["rowdragmousemove","rowdragmousemove"],["rowdropinit","rowdropinit"],["roworderchange","roworderchange"],["beforecopyregion","beforecopyregion"],["beforepasteregion","beforepasteregion"],["celleditapply","celleditapply"],["beforecellfocusinit","beforecellfocusinit"],["beforenextvpfocus","beforenextvpfocus"],["setedit","setedit"],["beforeapplyrange","beforeapplyrange"],["beforesetrange","beforesetrange"],["setrange","setrange"],["beforeeditrender","beforeeditrender"],["selectall","selectall"],["canceledit","canceledit"],["settemprange","settemprange"],["beforesettemprange","beforesettemprange"],["applyfocus","applyfocus"],["focuscell","focuscell"],["beforerangedataapply","beforerangedataapply"],["selectionchangeinit","selectionchangeinit"],["beforerangecopyapply","beforerangecopyapply"],["rangeeditapply","rangeeditapply"],["clipboardrangecopy","clipboardrangecopy"],["clipboardrangepaste","clipboardrangepaste"],["beforekeydown","beforekeydown"],["beforekeyup","beforekeyup"],["beforecellsave","beforecellsave"],["scrollview","scrollview"],["ref","ref"],["scrollvirtual","scrollvirtual"],["scrollviewport","scrollviewport"],["resizeviewport","resizeviewport"],["scrollchange","scrollchange"],["scrollviewportsilent","scrollviewportsilent"],["html","html"]]);class Y extends _{constructor(e,r){super(e,r);this.addEventListener("beforepasteapply",(e=>this.handleBeforePasteApply(e)))}handleBeforePasteApply(e){const r=this.providers.selection.focused;const a=this.providers.selection.edit!=null;if(!r||a){return}const s=this.providers.data.stores.rgRow.store.get("items").length;const t=r.y+e.detail.parsed.length;if(s<t){const e=t-s;const r=Array.from({length:e},((e,r)=>({index:s+r,data:{}})));const a=this.emit("newRows",{newRows:r});if(a.defaultPrevented){return}const o=[...this.providers.data.stores.rgRow.store.get("source"),...a.detail.newRows.map((e=>e.data))];this.providers.data.setData(o)}}}export{Y as AutoAddRowsPlugin,W as REVOGRID_EVENTS};
//# sourceMappingURL=index.esm.js.map
/*!
* Built by Revolist OU ❤️
*/
import{h as e,r as t,c as r,H as o,a as i}from"./index-a61f225b.js";import{r as s,f as a,h as n,E as d,m as h,k as l,D as c}from"./column.service-7a47e6d0.js";import{c as g,m as v,r as u,i as f,D as p,B as m,G as w,S as b,a as x,A as C,f as y,E as S,l as k,C as R}from"./column.drag.plugin-7756231e.js";import{D as L,b as E,f as H,d as P,s as j,a as z,h as M,k as O,R as D,u as T}from"./dimension.helpers-d0d709c4.js";import{d as I}from"./debounce-b3166f78.js";import{V as N}from"./viewport.store-afa8c4fe.js";import{v as F,H as $,C as B,F as V,D as U}from"./viewport.helpers-7e7f9dad.js";import{g as A}from"./events-cf0893a3.js";import"./filter.button-d40ab17b.js";import"./header-cell-renderer-f46a8010.js";class Y{constructor(){this.defaultRowSize=32}}class X{constructor(){this.defaultRowSize=27}}class W{constructor(){this.defaultRowSize=42}}const G="default";const Z=[G,"material","compact","darkMaterial","darkCompact"];class _{get theme(){return this.currentTheme}get rowSize(){return this.customRowSize||this.currentTheme.defaultRowSize}set rowSize(e){this.customRowSize=e}constructor(e){this.customRowSize=0;this.customRowSize=e.rowSize;this.register("default")}register(e){const t=q(e);switch(t){case"material":case"darkMaterial":this.currentTheme=new W;break;case"compact":case"darkCompact":this.currentTheme=new Y;break;default:this.currentTheme=new X;break}}}function q(e){if(e&&Z.indexOf(e)>-1){return e}return G}class J{get order(){const e={};const t=this.sorting;if(t){Object.keys(t).forEach((r=>{e[r]=t[r].order}))}return e}get stores(){return this.dataSources}constructor(){this.sorting=null;this.collection=null;this.dataSources=g.reduce(((e,t)=>{e[t]=new L(t);return e}),{})}column(e,t="rgCol"){return this.getColumn(e,t)}getColumn(e,t){return E(this.dataSources[t].store,e)}getRawColumns(){return s(this.dataSources,((e,t,r)=>{e[r]=t.store.get("source");return e}),{rgCol:[],colPinStart:[],colPinEnd:[]})}getColumns(e="all"){const t=this.getRawColumns();if(e!=="all"){return t[e]}return g.reduce(((e,r)=>[...e,...t[r]]),[])}getColumnIndexByProp(e,t){return H(this.dataSources[t].store,e)}getColumnByProp(e){var t;return(t=this.collection)===null||t===void 0?void 0:t.columnByProp[e]}refreshByType(e){this.dataSources[e].refresh()}setColumns(e){g.forEach((t=>{this.dataSources[t].updateData(e.columns[t],{depth:e.maxLevel,groups:e.columnGrouping[t].reduce(((e,t)=>{if(!e[t.level]){e[t.level]=[]}e[t.level].push(t);return e}),{})})}));this.sorting=e.sort;this.collection=e;return e}updateColumns(e){const t=e.reduce(((e,t)=>{const r=a(t);if(!e[r]){e[r]={}}e[r][t.prop]=t;return e}),{});const r={};for(const e in t){if(!t.hasOwnProperty(e)){continue}const o=e;const i=t[o];const s=this.dataSources[o].store.get("source");r[o]={};for(let e=0;e<s.length;e++){const t=s[e];const a=i===null||i===void 0?void 0:i[t.prop];if(a){r[o][e]=a}}}for(const e in r){if(!r.hasOwnProperty(e)){continue}const t=e;P(this.dataSources[t].store,r[t]||{})}}updateColumn(e,t){const r=a(e);j(this.dataSources[r].store,{[t]:e})}updateColumnSorting(e,t,r,o){if(!o){this.clearSorting()}e.order=r;if(!this.sorting){this.sorting={}}this.sorting[e.prop]=e;this.updateColumn(e,t);return e}clearSorting(){const e=s(this.sorting,((e,t)=>{const r=a(t);e[r]=true;return e}),{});v(e,((e,t)=>{const r=this.dataSources[t].store.get("source");v(r,(e=>e.order=undefined));this.dataSources[t].setData({source:[...r]})}));this.sorting={}}}class K{constructor(e){this.dimensionProvider=e;this.stores=s(u,((e,t)=>{e[t]=new L(t);return e}),{})}setData(e,t="rgRow",r=false,o,i=false){this.stores[t].updateData([...e],o,i);const s=t!=="rgRow"||r;this.dimensionProvider.setData(e.length,t,s);return e}getModel(e,t="rgRow"){const r=this.stores[t].store;return E(r,e)}changeOrder({rowType:e="rgRow",from:t,to:r}){const o=this.stores[e];const i=[...o.store.get("proxyItems")];const s=o.store.get("items");const a=i.splice(i.indexOf(s[t]),1);i.splice(i.indexOf(s[r]),0,...a);o.setData({proxyItems:i});const n=o.store.get("items");this.dimensionProvider.updateSizesPositionByNewDataIndexes(e,n,s)}setCellData({type:e,rowIndex:t,prop:r,val:o},i=true){const s=this.getModel(t,e);s[r]=o;this.stores[e].setSourceData({[t]:s},i)}setRangeData(e,t){const r={};for(let o in e){const i=r[o]=E(this.stores[t].store,parseInt(o,10));if(!i){continue}for(let t in e[o]){i[t]=e[o][t]}}this.stores[t].setSourceData(r)}refresh(e="all"){if(f(e)){this.refreshItems(e)}u.forEach((e=>this.refreshItems(e)))}refreshItems(e="rgRow"){const t=this.stores[e].store.get("items");this.stores[e].setData({items:[...t]})}setGrouping({depth:e},t="rgRow"){this.stores[t].setData({groupingDepth:e})}setTrimmed(e,t="rgRow"){const r=this.stores[t];r.addTrimmed(e);this.dimensionProvider.setTrimmed(e,t);if(t==="rgRow"){this.dimensionProvider.setData(z(r.store).length,t)}}}class Q{constructor(e,t){this.viewports=e;const r=I((e=>t.realSizeChanged(e)),D);this.stores=s([...u,...g],((e,t)=>{e[t]=new p(t);e[t].store.onChange("realSize",(()=>r(t)));return e}),{})}clearSize(e,t){this.stores[e].drop();this.viewports.stores[e].setOriginalSizes(this.stores[e].store.get("originItemSize"));this.setItemCount(t,e)}setCustomSizes(e,t,r=false){let o=t;if(r){const r=this.stores[e].store.get("sizes");o=Object.assign(Object.assign({},r),t)}this.stores[e].setDimensionSize(o);this.setViewPortCoordinate({coordinate:this.viewports.stores[e].lastCoordinate,type:e,force:true})}setItemCount(e,t){this.viewports.stores[t].setViewport({realCount:e});this.stores[t].setStore({count:e})}setTrimmed(e,t){const r=M(e);const o=this.stores[t];o.setStore({trimmed:r});this.setViewPortCoordinate({coordinate:this.viewports.stores[t].lastCoordinate,type:t,force:true})}setData(e,t,r=false){this.setItemCount(e,t);if(r){const e=this.stores[t].getCurrentState();this.viewports.stores[t].setViewport({virtualSize:e.realSize})}this.setViewPortCoordinate({coordinate:this.viewports.stores[t].lastCoordinate,type:t})}applyNewColumns(e,t,r=false){for(let o of g){if(!r){this.stores[o].drop()}const i=e[o];const s=o!=="rgCol"||t;this.stores[o].setStore({count:i.length});const a=n(i);this.stores[o].setDimensionSize(a);const d={realCount:i.length};if(s){d.virtualSize=this.stores[o].getCurrentState().realSize}this.viewports.stores[o].setViewport(d);this.setViewPortCoordinate({coordinate:this.viewports.stores[o].lastCoordinate,type:o})}}getFullSize(){var e,t;let r=0;let o=0;for(let t of g){r+=((e=this.stores[t])===null||e===void 0?void 0:e.store.get("realSize"))||0}for(let e of u){o+=((t=this.stores[e])===null||t===void 0?void 0:t.store.get("realSize"))||0}return{y:o,x:r}}setViewPortCoordinate({coordinate:e,type:t,force:r=false}){const o=this.stores[t].getCurrentState();this.viewports.stores[t].setViewPortCoordinate(e,o,r)}getViewPortPos(e){const t=this.stores[e.dimension].getCurrentState();const r=O(t,e.coordinate);return r.start}setSettings(e,t){let r=[];switch(t){case"rgCol":r=g;break;case"rgRow":r=u;break}for(let t of r){this.stores[t].setStore(e)}}updateSizesPositionByNewDataIndexes(e,t,r=[]){this.stores[e].updateSizesPositionByIndexes(t,r);this.setViewPortCoordinate({coordinate:this.viewports.stores[e].lastCoordinate,type:e,force:true})}}class ee{constructor(){this.stores=s([...u,...g],((e,t)=>{e[t]=new N(t);return e}),{})}setViewport(e,t){this.stores[e].setViewport(t)}}function te(e){const t=e.dimensions[e.colType].store;const r=t.get("realSize");const o={contentWidth:r,class:e.colType,contentHeight:e.contentHeight,key:e.colType,colType:e.colType,onResizeviewport:e.onResizeviewport,style:e.fixWidth?{minWidth:`${r}px`}:undefined};const i={colData:z(e.colStore),dimensionCol:t,type:e.colType,groups:e.colStore.get("groups"),groupingDepth:e.colStore.get("groupingDepth"),resizeHandler:e.colType==="colPinEnd"?["l"]:undefined,onHeaderresize:e.onHeaderresize};return{prop:o,type:e.colType,position:e.position,headerProp:i,viewportCol:e.viewports[e.colType].store}}class re{constructor(e,t){var r,o;this.config=e;(r=this.config.selectionStoreConnector)===null||r===void 0?void 0:r.beforeUpdate();const i=[];let s=0;g.forEach((r=>{const o=e.columnProvider.stores[r].store;if(!o.get("items").length){return}const a={colType:r,position:{x:s,y:1},contentHeight:t,fixWidth:r!=="rgCol",viewports:e.viewportProvider.stores,dimensions:e.dimensionProvider.stores,rowStores:e.dataProvider.stores,colStore:o,onHeaderresize:e=>this.onColumnResize(r,e,o)};if(r==="rgCol"){a.onResizeviewport=t=>{var r;const o={clientSize:t.detail.size};if(t.detail.dimension==="rgRow"&&!e.disableVirtualY||t.detail.dimension==="rgCol"&&!e.disableVirtualX){o.virtualSize=t.detail.size}(r=e.viewportProvider)===null||r===void 0?void 0:r.setViewport(t.detail.dimension,o)}}const n=te(a);const d=this.registerCol(n.position.x,r);const h=this.dataViewPort(a).reduce(((t,o)=>{const i=this.registerSegment(o.position);i.setLastCell(o.lastCell);const s=this.registerRow(o.position.y,o.type);const a=Object.assign(Object.assign({colType:r},o),{rowSelectionStore:s,selectionStore:i.store,ref:t=>e.selectionStoreConnector.registerSection(t),onSetrange:e=>{i.setRangeArea(e.detail)},onSettemprange:e=>i.setTempArea(e.detail),onFocuscell:t=>{i.clearFocus();e.selectionStoreConnector.focus(i,t.detail)}});t.push(a);return t}),[]);i.push(Object.assign(Object.assign({},n),{columnSelectionStore:d,dataPorts:h}));s++}));this.columns=i;(o=this.config.scrollingService)===null||o===void 0?void 0:o.unregister()}onColumnResize(e,{detail:t},r){var o;(o=this.config.dimensionProvider)===null||o===void 0?void 0:o.setCustomSizes(e,t,true);const i={};for(const[e,o]of Object.entries(t||{})){const t=parseInt(e,10);const s=E(r,t);if(s){i[t]=Object.assign(Object.assign({},s),{size:o})}}this.config.resize(i)}registerSegment(e){return this.config.selectionStoreConnector.register(e)}registerRow(e,t){return this.config.selectionStoreConnector.registerRow(e,t).store}registerCol(e,t){return this.config.selectionStoreConnector.registerColumn(e,t).store}dataViewPort(e){const t={rowPinStart:$,rgRow:B,rowPinEnd:V};let r=0;return u.reduce(((o,i)=>{const s=e.viewports[i].store.get("realCount")||i==="rgRow";const a=Object.assign(Object.assign({},e),{position:Object.assign(Object.assign({},e.position),{y:s?r:d})});const n=F(a,i,t[i],i!=="rgRow");o.push(n);if(s){r++}return o}),[])}scrollToCell(e){for(let t in e){const r=e[t];if(typeof r==="number"){this.config.scrollingService.proxyScroll({dimension:t==="x"?"rgCol":"rgRow",coordinate:r})}}}clearFocused(){this.config.selectionStoreConnector.clearAll()}clearEdit(){this.config.selectionStoreConnector.setEdit(false)}getFocused(){const e=this.config.selectionStoreConnector.focusedStore;if(!e){return null}const t=this.config.selectionStoreConnector.storesXToType[e.position.x];const r=this.config.columnProvider.getColumn(e.cell.x,t);const o=this.config.selectionStoreConnector.storesYToType[e.position.y];const i=this.config.dataProvider.getModel(e.cell.y,o);return{column:r,model:i,cell:e.cell,colType:t,rowType:o}}getStoreCoordinateByType(e,t){const r=this.config.selectionStoreConnector.storesByType;if(typeof r[e]==="undefined"||typeof r[t]==="undefined"){return}return{x:r[e],y:r[t]}}setFocus(e,t,r,o){var i;const s=this.getStoreCoordinateByType(e,t);if(s){(i=this.config.selectionStoreConnector)===null||i===void 0?void 0:i.focusByCell(s,r,o)}}getSelectedRange(){return this.config.selectionStoreConnector.selectedRange}setEdit(e,t,r,o){var i;const s=this.getStoreCoordinateByType(r,o);if(s){(i=this.config.selectionStoreConnector)===null||i===void 0?void 0:i.setEditByCell(s,{x:t,y:e})}}}class oe{constructor(e){this.setViewport=e;this.elements={}}async proxyScroll(e,t){var r;let o;let i=e;for(let i in this.elements){if(e.dimension==="rgCol"&&i==="headerRow"){continue}else if(this.isPinnedColumn(t)&&e.dimension==="rgCol"){if(i===t||!e.delta){continue}for(let t of this.elements[i]){if(t.changeScroll){o=t.changeScroll(e)}}}else{for(let t of this.elements[i]){await((r=t.setScroll)===null||r===void 0?void 0:r.call(t,e))}}}const s=await o;if(s){i=s}this.setViewport(i)}async scrollSilentService(e,t){var r;for(let o in this.elements){if(o===t){continue}if(g.includes(t)&&(o==="headerRow"||g.includes(o))){for(let t of this.elements[o]){await((r=t.changeScroll)===null||r===void 0?void 0:r.call(t,e,true))}continue}}}isPinnedColumn(e){return!!e&&["colPinStart","colPinEnd"].indexOf(e)>-1}registerElements(e){this.elements=e}registerElement(e,t){if(!this.elements[t]){this.elements[t]=[]}if(e){this.elements[t].push(e)}else if(this.elements[t]){delete this.elements[t]}}unregister(){this.elements={}}}class ie{constructor(){this.parentY=0}start(e,{pos:t,text:r,event:o}){var i;const{top:s}=e.getBoundingClientRect();this.parentY=s;if(this.text){this.text.innerText=r}this.move(t);this.moveTip({x:o.x,y:o.y});(i=this.el)===null||i===void 0?void 0:i.classList.remove("hidden")}end(){var e;(e=this.el)===null||e===void 0?void 0:e.classList.add("hidden")}move(e){this.moveElement(e.end-this.parentY)}moveTip({x:e,y:t}){if(!this.draggable){return}this.draggable.style.left=`${e}px`;this.draggable.style.top=`${t}px`}moveElement(e){if(!this.rgRow){return}this.rgRow.style.transform=`translateY(${e}px)`}}const se=({ref:t})=>{const r=new ie;t(r);return e("div",{class:"draggable-wrapper hidden",ref:e=>r.el=e},e("div",{class:"draggable",ref:e=>r.draggable=e},e("span",{class:"revo-alt-icon"}),e("span",{ref:e=>r.text=e})),e("div",{class:"drag-position",ref:e=>r.rgRow=e}))};const ae=(e=[])=>{const t={};for(const r of e){let e=t[r.type];if(!e){e=t[r.type]={}}if(r.size){if(!e.sizes){e.sizes={}}e.sizes[r.index]=r.size}}return t};const ne=(e=[])=>{const t={};for(const r of e){let e=t[r.type];if(!e){e=t[r.type]=[]}if(r.size){e.push(r.index)}}return t};function de(){return/Mobi/i.test(navigator.userAgent)||/Android/i.test(navigator.userAgent)||navigator.maxTouchPoints>0}class he extends m{constructor(e,t){super(e,t);e.setAttribute("dir","ltr");e.setAttribute("role","treegrid");e.setAttribute("aria-keyshortcuts","Enter");e.setAttribute("aria-multiselectable","true");e.setAttribute("tabindex","0");this.addEventListener("beforecolumnsset",(({detail:t})=>{const r=[...t.columns.colPinStart,...t.columns.rgCol,...t.columns.colPinEnd];e.setAttribute("aria-colcount",`${r.length}`);r.forEach(((e,t)=>{const{columnProperties:r,cellProperties:o}=e;e.columnProperties=(...e)=>{const o=(r===null||r===void 0?void 0:r(...e))||{};o.role="columnheader";o["aria-colindex"]=t;return o};e.cellProperties=(...e)=>{const r={["role"]:"gridcell",["aria-colindex"]:t,["aria-rowindex"]:e[0].rowIndex,["tabindex"]:-1};const i=(o===null||o===void 0?void 0:o(...e))||{};return Object.assign(Object.assign({},r),i)}}))}));this.addEventListener("beforesourceset",(({detail:t})=>{e.setAttribute("aria-rowcount",`${t.source.length}`)}));this.addEventListener("beforerowrender",(({detail:e})=>{e.node.t=Object.assign(Object.assign({},e.node.t),{role:"row",["aria-rowindex"]:e.item.itemIndex})}));this.addEventListener("afterfocus",(async e=>{if(e.defaultPrevented){return}const t=this.revogrid.querySelector(`revogr-data[type="${e.detail.rowType}"][col-type="${e.detail.colType}"] [data-rgrow="${e.detail.rowIndex}"][data-rgcol="${e.detail.colIndex}"]`);if(t instanceof HTMLElement){t.focus()}}))}}class le{constructor(){this.internalPlugins=[]}get(){return[...this.internalPlugins]}add(e){this.internalPlugins.push(e)}addUserPluginsAndCreate(e,t=[],r,o){if(!o){return}const i=(r===null||r===void 0?void 0:r.filter((e=>!t.some((t=>t===e)))))||[];i.forEach((e=>{var t,r;const o=this.internalPlugins.findIndex((t=>t instanceof e));if(o!==-1){(r=(t=this.internalPlugins[o]).destroy)===null||r===void 0?void 0:r.call(t);this.internalPlugins.splice(o,1)}}));t===null||t===void 0?void 0:t.forEach((t=>{const r=this.internalPlugins.find((e=>e instanceof t));if(r){return}this.add(new t(e,o))}))}getByClass(e){return this.internalPlugins.find((t=>t instanceof e))}remove(e){var t,r;const o=this.internalPlugins.indexOf(e);if(o>-1){(r=(t=this.internalPlugins[o]).destroy)===null||r===void 0?void 0:r.call(t);this.internalPlugins.splice(o,1)}}destroy(){this.internalPlugins.forEach((e=>{var t;return(t=e.destroy)===null||t===void 0?void 0:t.call(e)}));this.internalPlugins=[]}}const ce='.revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:"::"}.revo-alt-icon{-webkit-mask-image:url("data:image/svg+xml,%3C%3Fxml version=\'1.0\' encoding=\'UTF-8\'%3F%3E%3Csvg viewBox=\'0 0 384 383\' xmlns=\'http://www.w3.org/2000/svg\' xmlns:xlink=\'http://www.w3.org/1999/xlink\'%3E%3Cg%3E%3Cpath d=\'M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z\'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3C%3Fxml version=\'1.0\' encoding=\'UTF-8\'%3F%3E%3Csvg viewBox=\'0 0 384 383\' xmlns=\'http://www.w3.org/2000/svg\' xmlns:xlink=\'http://www.w3.org/1999/xlink\'%3E%3Cg%3E%3Cpath d=\'M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z\'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revo-grid[theme=default],revo-grid:not([theme]){border:1px solid #cecece;font-size:12px}revo-grid[theme=default] .rowHeaders revogr-header,revo-grid:not([theme]) .rowHeaders revogr-header{box-shadow:-1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-header,revo-grid:not([theme]) revogr-header{text-align:center;line-height:30px;background-color:#f8f9fa}revo-grid[theme=default] revogr-header .group-rgRow,revo-grid:not([theme]) revogr-header .group-rgRow{box-shadow:none}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid[theme=default] revogr-header .group-rgRow,revo-grid:not([theme]) revogr-header .header-rgRow,revo-grid:not([theme]) revogr-header .group-rgRow{text-transform:uppercase;font-size:12px;color:#000}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid:not([theme]) revogr-header .header-rgRow{height:30px;box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-header .rgHeaderCell,revo-grid:not([theme]) revogr-header .rgHeaderCell{box-shadow:-1px 0 0 0 #cecece inset, 0 -1px 0 0 #cecece, 0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-header .rgHeaderCell.focused-cell,revo-grid:not([theme]) revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] .rowHeaders,revo-grid:not([theme]) .rowHeaders{background-color:#f8f9fa}revo-grid[theme=default] .rowHeaders revogr-data .rgCell,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell{color:#000}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:first-child,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:first-child{box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:not(:first-child),revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:not(:first-child){box-shadow:0 -1px 0 0 #cecece inset, 1px 0 0 0 #cecece inset}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:last-child,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:last-child{border-right:1px solid #cecece}revo-grid[theme=default] .rowHeaders revogr-data revogr-header,revo-grid:not([theme]) .rowHeaders revogr-data revogr-header{box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child,revo-grid:not([theme]) revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell,revo-grid:not([theme]) revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #cecece inset, -1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinEnd,revo-grid[theme=default] revogr-viewport-scroll.colPinEnd revogr-header,revo-grid:not([theme]) revogr-viewport-scroll.colPinEnd,revo-grid:not([theme]) revogr-viewport-scroll.colPinEnd revogr-header{box-shadow:1px 0 0 #cecece inset}revo-grid[theme=default] .footer-wrapper revogr-data .rgRow:first-child .rgCell,revo-grid:not([theme]) .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset, 0 -1px 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data,revo-grid:not([theme]) revogr-data{text-align:center}revo-grid[theme=default] revogr-data .revo-draggable,revo-grid:not([theme]) revogr-data .revo-draggable{float:left}revo-grid[theme=default] revogr-data .rgRow,revo-grid:not([theme]) revogr-data .rgRow{line-height:27px}revo-grid[theme=default] revogr-data .rgRow.focused-rgRow,revo-grid:not([theme]) revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] revogr-data .rgCell,revo-grid:not([theme]) revogr-data .rgCell{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data .rgCell.disabled,revo-grid:not([theme]) revogr-data .rgCell.disabled{background-color:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=material]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}revo-grid[theme=material] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=material] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=material] revogr-header .header-rgRow{height:50px}revo-grid[theme=material] revogr-data{text-align:left}revo-grid[theme=material] revogr-data .rgRow{line-height:42px}revo-grid[theme=material] revogr-data .rgCell{padding:0 15px}revo-grid[theme=material] .rowHeaders{background-color:#f7faff}revo-grid[theme=material] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=material] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=material] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=material] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=material] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=material] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=darkMaterial]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#d8d8d8}revo-grid[theme=darkMaterial] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkMaterial] revogr-header .header-rgRow{height:50px}revo-grid[theme=darkMaterial] revogr-data{text-align:left}revo-grid[theme=darkMaterial] revogr-data .rgRow{line-height:42px}revo-grid[theme=darkMaterial] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkMaterial] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkMaterial] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkMaterial] revogr-edit{background-color:#28272b}revo-grid[theme=darkMaterial] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkMaterial] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkMaterial] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=darkCompact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#d8d8d8}revo-grid[theme=darkCompact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkCompact] revogr-header .header-rgRow{height:45px}revo-grid[theme=darkCompact] revogr-data{text-align:left}revo-grid[theme=darkCompact] revogr-data .rgRow{line-height:32px}revo-grid[theme=darkCompact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkCompact] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkCompact] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkCompact] revogr-edit{background-color:#28272b}revo-grid[theme=darkCompact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkCompact] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkCompact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=compact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}revo-grid[theme=compact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=compact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=compact] revogr-header .header-rgRow{height:45px}revo-grid[theme=compact] revogr-data{text-align:left}revo-grid[theme=compact] revogr-data .rgRow{line-height:32px}revo-grid[theme=compact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=compact] .rowHeaders{background-color:#f7faff}revo-grid[theme=compact] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=compact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=compact] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=compact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=compact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=compact] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=compact] revo-dropdown .rv-dr-root{padding:0px 9px}revo-grid{display:block;height:100%;min-height:300px;font-family:Helvetica, Arial, Sans-Serif, serif;font-size:14px;position:relative;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column;width:100%;height:100%}revo-grid .attribution{position:absolute;bottom:0;left:0;right:0;z-index:1000;width:0;height:0;border-left:4px solid rgba(38, 106, 232, 0.9);border-bottom:4px solid rgba(38, 106, 232, 0.9);border-top:4px solid transparent;border-right:4px solid transparent;cursor:pointer}revo-grid .attribution .value{position:absolute;bottom:0;left:0;background-color:rgba(255, 255, 255, 0.9);padding:4px;border-radius:4px;box-shadow:0 1px 10px rgba(0, 0, 0, 0.2);white-space:nowrap;text-decoration:none;color:black;letter-spacing:0.3px;font-size:11px;opacity:0;width:4px;overflow:hidden;transition:opacity 0.5s ease-in-out, width 0.3s ease-in-out}revo-grid .attribution:hover .value{width:63px;opacity:1}revo-grid.column-draggable.column-drag-start:hover,revo-grid.column-draggable.column-drag-start *:hover{cursor:grabbing}revo-grid .footer-wrapper,revo-grid .header-wrapper{width:100%}revo-grid .footer-wrapper revogr-data,revo-grid .header-wrapper revogr-data{z-index:3}revo-grid revo-dropdown{width:100%}revo-grid revo-dropdown .rv-dr-root{max-height:100%}revo-grid revo-dropdown.shrink label{opacity:0}revo-grid .viewports{max-width:100%;display:flex;flex-direction:row;align-items:flex-start;flex-grow:1}revo-grid .main-viewport{flex-grow:1;height:0;display:flex;justify-content:space-between;flex-direction:row}revo-grid .draggable{position:fixed;height:30px;line-height:30px;background:#fff;border-radius:3px;display:block;z-index:100;margin-top:5px;margin-right:-20px;box-shadow:0 4px 20px 0 rgba(0, 0, 0, 0.15);padding-left:20px;padding-right:5px}revo-grid .draggable.hidden{display:none}revo-grid .draggable .revo-alt-icon{background-color:black;position:absolute;left:5px;top:10px}revo-grid .draggable-wrapper.hidden{display:none}revo-grid .drag-position{position:absolute;left:0;right:0;height:1px;z-index:2;background:gray;pointer-events:none}revo-grid .drag-position-y{position:absolute;top:0;left:0;bottom:0;width:1px;z-index:2;background:gray;pointer-events:none}revo-grid .drag-auto-scroll-y{pointer-events:none;position:absolute;left:0;top:0;height:50px;width:1px}revo-grid .clipboard{position:absolute;left:0;top:0}revo-grid revogr-scroll-virtual{position:relative}revo-grid revogr-scroll-virtual.vertical,revo-grid revogr-scroll-virtual.horizontal{z-index:3}';const ge=ce;const ve=class{constructor(e){t(this,e);this.contentsizechanged=r(this,"contentsizechanged",7);this.beforeedit=r(this,"beforeedit",7);this.beforerangeedit=r(this,"beforerangeedit",7);this.afteredit=r(this,"afteredit",7);this.beforeautofill=r(this,"beforeautofill",7);this.beforerange=r(this,"beforerange",7);this.afterfocus=r(this,"afterfocus",7);this.roworderchanged=r(this,"roworderchanged",7);this.beforesortingapply=r(this,"beforesortingapply",7);this.beforesorting=r(this,"beforesorting",7);this.rowdragstart=r(this,"rowdragstart",7);this.headerclick=r(this,"headerclick",7);this.beforecellfocus=r(this,"beforecellfocus",7);this.beforefocuslost=r(this,"beforefocuslost",7);this.beforesourceset=r(this,"beforesourceset",7);this.beforeanysource=r(this,"beforeanysource",7);this.aftersourceset=r(this,"aftersourceset",7);this.afteranysource=r(this,"afteranysource",7);this.beforecolumnsset=r(this,"beforecolumnsset",7);this.beforecolumnapplied=r(this,"beforecolumnapplied",7);this.aftercolumnsset=r(this,"aftercolumnsset",7);this.beforefilterapply=r(this,"beforefilterapply",7);this.beforefiltertrimmed=r(this,"beforefiltertrimmed",7);this.beforetrimmed=r(this,"beforetrimmed",7);this.aftertrimmed=r(this,"aftertrimmed",7);this.viewportscroll=r(this,"viewportscroll",7);this.beforeexport=r(this,"beforeexport",7);this.beforeeditstart=r(this,"beforeeditstart",7);this.aftercolumnresize=r(this,"aftercolumnresize",7);this.beforerowdefinition=r(this,"beforerowdefinition",7);this.filterconfigchanged=r(this,"filterconfigchanged",7);this.sortingconfigchanged=r(this,"sortingconfigchanged",7);this.rowheaderschanged=r(this,"rowheaderschanged",7);this.beforegridrender=r(this,"beforegridrender",7);this.aftergridrender=r(this,"aftergridrender",7);this.aftergridinit=r(this,"aftergridinit",7);this.additionaldatachanged=r(this,"additionaldatachanged",7);this.afterthemechanged=r(this,"afterthemechanged",7);this.created=r(this,"created",7);this.extraElements=[];this.pluginService=new le;this.viewport=null;this.isInited=false;this.rowHeaders=undefined;this.frameSize=1;this.rowSize=0;this.colSize=100;this.range=false;this.readonly=false;this.resize=false;this.canFocus=true;this.useClipboard=true;this.columns=[];this.source=[];this.pinnedTopSource=[];this.pinnedBottomSource=[];this.rowDefinitions=[];this.editors={};this.applyOnClose=false;this.plugins=[];this.columnTypes={};this.theme="default";this.rowClass="";this.autoSizeColumn=false;this.filter=false;this.sorting=undefined;this.focusTemplate=undefined;this.canMoveColumns=false;this.trimmedRows={};this.exporting=false;this.grouping=undefined;this.stretch=false;this.additionalData={};this.disableVirtualX=false;this.disableVirtualY=false;this.hideAttribution=false;this.jobsBeforeRender=[];this.registerVNode=[];this.accessible=true}async refresh(e="all"){if(!this.dataProvider){throw new Error("Not connected")}this.dataProvider.refresh(e)}async setDataAt({row:e,col:t,colType:r="rgCol",rowType:o="rgRow",val:i,skipDataUpdate:s=false}){var a;if(this.dataProvider&&this.columnProvider&&!s){const s=(a=this.columnProvider.getColumn(t,r))===null||a===void 0?void 0:a.prop;if(typeof s!=="undefined"){this.dataProvider.setCellData({type:o,rowIndex:e,prop:s,val:i},false)}}const n=this.element.querySelector(`revogr-data[type="${o}"][col-type="${r}"]`);return n===null||n===void 0?void 0:n.updateCell({row:e,col:t})}async scrollToRow(e=0){if(!this.dimensionProvider){throw new Error("Not connected")}const t=this.dimensionProvider.getViewPortPos({coordinate:e,dimension:"rgRow"});await this.scrollToCoordinate({y:t})}async scrollToColumnIndex(e=0){if(!this.dimensionProvider){throw new Error("Not connected")}const t=this.dimensionProvider.getViewPortPos({coordinate:e,dimension:"rgCol"});await this.scrollToCoordinate({x:t})}async scrollToColumnProp(e,t="rgCol"){if(!this.dimensionProvider||!this.columnProvider){throw new Error("Not connected")}const r=this.columnProvider.getColumnIndexByProp(e,t);if(r<0){return}const o=this.dimensionProvider.getViewPortPos({coordinate:r,dimension:t});await this.scrollToCoordinate({x:o})}async updateColumns(e){var t;(t=this.columnProvider)===null||t===void 0?void 0:t.updateColumns(e)}async addTrimmed(e,t="external",r="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}const o=this.beforetrimmed.emit({trimmed:e,trimmedType:t,type:r});if(o.defaultPrevented){return o}this.dataProvider.setTrimmed({[t]:o.detail.trimmed},r);this.aftertrimmed.emit();return o}async scrollToCoordinate(e){var t;(t=this.viewport)===null||t===void 0?void 0:t.scrollToCell(e)}async setCellEdit(e,t,r="rgRow"){var o;const i=h(this.columns,t);if(!i){return}await T();const s=i.pin||"rgCol";if(!this.columnProvider){throw new Error("Not connected")}(o=this.viewport)===null||o===void 0?void 0:o.setEdit(e,this.columnProvider.getColumnIndexByProp(t,s),s,r)}async setCellsFocus(e={x:0,y:0},t={x:0,y:0},r="rgCol",o="rgRow"){var i;(i=this.viewport)===null||i===void 0?void 0:i.setFocus(r,o,e,t)}async getSource(e="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}return this.dataProvider.stores[e].store.get("source")}async getVisibleSource(e="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}return z(this.dataProvider.stores[e].store)}async getSourceStore(e="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}return this.dataProvider.stores[e].store}async getColumnStore(e="rgCol"){if(!this.columnProvider){throw new Error("Not connected")}return this.columnProvider.stores[e].store}async updateColumnSorting(e,t,r,o){if(!this.columnProvider){throw new Error("Not connected")}return this.columnProvider.updateColumnSorting(e,t,r,o)}async clearSorting(){if(!this.columnProvider){throw new Error("Not connected")}this.columnProvider.clearSorting()}async getColumns(){if(!this.columnProvider){throw new Error("Not connected")}return this.columnProvider.getColumns()}async clearFocus(){var e,t;const r=(e=this.viewport)===null||e===void 0?void 0:e.getFocused();const o=this.beforefocuslost.emit(r);if(o.defaultPrevented){return}(t=this.selectionStoreConnector)===null||t===void 0?void 0:t.clearAll()}async getPlugins(){return this.pluginService.get()}async getFocused(){var e,t;return(t=(e=this.viewport)===null||e===void 0?void 0:e.getFocused())!==null&&t!==void 0?t:null}async getContentSize(){var e;if(!this.dimensionProvider){throw new Error("Not connected")}return(e=this.dimensionProvider)===null||e===void 0?void 0:e.getFullSize()}async getSelectedRange(){var e,t;return(t=(e=this.viewport)===null||e===void 0?void 0:e.getSelectedRange())!==null&&t!==void 0?t:null}async refreshExtraElements(){var e;(e=this.extraService)===null||e===void 0?void 0:e.refresh()}mousedownHandle(e){const t=A(e,"screenX");const r=A(e,"screenY");if(t===null||r===null){return}this.clickTrackForFocusClear=t+r}async mouseupHandle(e){var t;const r=A(e,"screenX");const o=A(e,"screenY");if(r===null||o===null){return}if(e.defaultPrevented){return}const i=r+o;if(Math.abs(((t=this.clickTrackForFocusClear)!==null&&t!==void 0?t:0)-i)>10){return}const s=e.composedPath();if(!s.includes(this.element)&&!(this.element.shadowRoot&&s.includes(this.element.shadowRoot))){await this.clearFocus()}}onRowDragStarted(e){var t;const r=this.rowdragstart.emit(e.detail);if(r.defaultPrevented){e.preventDefault();return}(t=this.orderService)===null||t===void 0?void 0:t.start(this.element,Object.assign(Object.assign({},e.detail),r.detail))}onRowDragEnd(){var e;(e=this.orderService)===null||e===void 0?void 0:e.end()}onRowOrderChange(e){var t;(t=this.dataProvider)===null||t===void 0?void 0:t.changeOrder(e.detail)}onRowDrag({detail:e}){var t;(t=this.orderService)===null||t===void 0?void 0:t.move(e)}onRowMouseMove(e){var t;(t=this.orderService)===null||t===void 0?void 0:t.moveTip(e.detail)}async onCellEdit(e){var t;const{defaultPrevented:r,detail:o}=this.beforeedit.emit(e.detail);await T();if(!r){(t=this.dataProvider)===null||t===void 0?void 0:t.setCellData(o);this.afteredit.emit(o)}}onRangeEdit(e){if(!this.dataProvider){throw new Error("Not connected")}const{defaultPrevented:t,detail:r}=this.beforerangeedit.emit(e.detail);if(t){e.preventDefault();return}this.dataProvider.setRangeData(r.data,r.type);this.afteredit.emit(r)}onRangeChanged(e){const t=this.beforerange.emit(e.detail);if(t.defaultPrevented){e.preventDefault()}const r=this.beforeautofill.emit(t.detail);if(r.defaultPrevented){e.preventDefault()}}onRowDropped(e){const{defaultPrevented:t}=this.roworderchanged.emit(e.detail);if(t){e.preventDefault()}}onHeaderClick(e){const{defaultPrevented:t}=this.headerclick.emit(Object.assign(Object.assign({},e.detail.column),{originalEvent:e.detail.originalEvent}));if(t){e.preventDefault()}}onCellFocus(e){const{defaultPrevented:t}=this.beforecellfocus.emit(e.detail);if(!this.canFocus||t){e.preventDefault()}}columnTypesChanged(){this.columnChanged(this.columns)}columnChanged(e=[],t=undefined,r="columns",o=false){if(!this.dimensionProvider||!this.columnProvider){return}const i=l(e,0,this.columnTypes);const s=this.beforecolumnsset.emit(i);if(s.defaultPrevented){return}this.dimensionProvider.applyNewColumns(s.detail.columns,this.disableVirtualX,o);const a=this.beforecolumnapplied.emit(i);if(a.defaultPrevented){return}const n=this.columnProvider.setColumns(a.detail);this.aftercolumnsset.emit({columns:n,order:this.columnProvider.order})}disableVirtualXChanged(e=false,t=false){if(e===t){return}this.columnChanged(this.columns)}rowSizeChanged(e){if(!this.dimensionProvider){return}this.dimensionProvider.setSettings({originItemSize:e},"rgRow");this.rowDefChanged(this.rowDefinitions,this.rowDefinitions,"rowSize",true)}themeChanged(e,t,r="theme",o=false){if(!this.dimensionProvider){return}this.themeService.register(e);this.dimensionProvider.setSettings({originItemSize:this.themeService.rowSize},"rgRow");this.dimensionProvider.setSettings({originItemSize:this.colSize},"rgCol");if(!o){this.dimensionProvider.setSettings({originItemSize:this.themeService.rowSize},"rgRow");this.rowDefChanged(this.rowDefinitions,this.rowDefinitions,"theme",true)}this.afterthemechanged.emit(e)}dataSourceChanged(e=[],t,r){if(!this.dataProvider){return}let o="rgRow";switch(r){case"pinnedBottomSource":o="rowPinEnd";break;case"pinnedTopSource":o="rowPinStart";break;case"source":o="rgRow";const t=this.beforesourceset.emit({type:o,source:e});e=t.detail.source;break}const i=this.beforeanysource.emit({type:o,source:e});const s=[...i.detail.source];this.dataProvider.setData(s,o,this.disableVirtualY);if(r==="source"){this.aftersourceset.emit({type:o,source:e})}this.afteranysource.emit({type:o,source:e})}disableVirtualYChanged(e=false,t=false){if(e===t){return}this.dataSourceChanged(this.source,this.source,"source")}rowDefChanged(e,t,r,o=true){if(!this.dimensionProvider||!this.dataProvider){return}const{detail:{vals:i,oldVals:s}}=this.beforerowdefinition.emit({vals:e,oldVals:t});const a=ae(i);if(s){const e=ne(s);for(const t in e){if(e.hasOwnProperty(t)){const e=t;const r=this.dataProvider.stores[e];const o=r.store.get("source").length;this.dimensionProvider.clearSize(e,o)}}}u.forEach((e=>{var t;const r=a[e];if(r||o){(t=this.dimensionProvider)===null||t===void 0?void 0:t.setCustomSizes(e,(r===null||r===void 0?void 0:r.sizes)||{})}}))}trimmedRowsChanged(e={}){this.addTrimmed(e)}groupingChanged(e={}){var t;(t=this.pluginService.getByClass(w))===null||t===void 0?void 0:t.setGrouping(e||{})}applyStretch(e){if(!this.dimensionProvider||!this.dataProvider||!this.columnProvider||!this.viewportProvider){return}if(e==="false"){e=false}const t=this.getPluginData();if(!t){return}const r=this.pluginService.getByClass(b);if(typeof e==="boolean"&&e||e==="true"){if(!r){this.pluginService.add(new b(this.element,t))}else if(x(r)){r.applyStretch(this.columnProvider.getRawColumns())}}else if(r){this.pluginService.remove(r)}}applyFilter(e){this.filterconfigchanged.emit(e)}applySorting(e){this.sortingconfigchanged.emit(e)}rowHeadersChange(e){this.rowheaderschanged.emit(e)}registerOutsideVNodes(e=[]){this.extraElements=e}additionalDataChanged(e){this.additionaldatachanged.emit(e)}pluginsChanged(e=[],t){this.pluginService.addUserPluginsAndCreate(this.element,e,t,this.getPluginData())}setPlugins(){this.removePlugins();const e=this.getPluginData();if(!e){return}this.setCorePlugins(e);this.pluginsChanged(this.plugins)}setCorePlugins(e){if(this.accessible){this.pluginService.add(new he(this.element,e))}if(this.autoSizeColumn){this.pluginService.add(new C(this.element,e,typeof this.autoSizeColumn==="object"?this.autoSizeColumn:undefined))}if(this.filter){this.pluginService.add(new y(this.element,e,typeof this.filter==="object"?this.filter:undefined))}if(this.exporting){this.pluginService.add(new S(this.element,e))}this.pluginService.add(new k(this.element,e));this.pluginService.add(new w(this.element,e));if(this.canMoveColumns){this.pluginService.add(new R(this.element,e))}}getPluginData(){if(!this.dimensionProvider||!this.dataProvider||!this.columnProvider||!this.viewportProvider||!this.selectionStoreConnector){return}const e={data:this.dataProvider,column:this.columnProvider,dimension:this.dimensionProvider,viewport:this.viewportProvider,selection:this.selectionStoreConnector,plugins:this.pluginService};return e}removePlugins(){this.pluginService.destroy()}connectedCallback(){if(this.isInited){this.setPlugins()}this.created.emit()}componentWillLoad(){var e;this.viewportProvider=new ee;this.themeService=new _({rowSize:this.rowSize});this.dimensionProvider=new Q(this.viewportProvider,{realSizeChanged:e=>this.contentsizechanged.emit(e)});this.columnProvider=new J;this.selectionStoreConnector=new c;this.dataProvider=new K(this.dimensionProvider);this.registerOutsideVNodes(this.registerVNode);this.setPlugins();this.applyStretch(this.stretch);this.themeChanged(this.theme,undefined,undefined,true);this.columnChanged(this.columns,undefined,undefined,true);this.dataSourceChanged(this.source,undefined,"source");this.dataSourceChanged(this.pinnedTopSource,undefined,"pinnedTopSource");this.dataSourceChanged(this.pinnedBottomSource,undefined,"pinnedBottomSource");if(Object.keys((e=this.trimmedRows)!==null&&e!==void 0?e:{}).length>0){this.trimmedRowsChanged(this.trimmedRows)}this.rowDefChanged(this.rowDefinitions);if(this.grouping&&Object.keys(this.grouping).length>0){this.groupingChanged(this.grouping)}this.scrollingService=new oe((e=>{var t;(t=this.dimensionProvider)===null||t===void 0?void 0:t.setViewPortCoordinate({coordinate:e.coordinate,type:e.dimension});this.viewportscroll.emit(e)}));this.aftergridinit.emit();this.isInited=true}componentWillRender(){const e=this.beforegridrender.emit();if(e.defaultPrevented){return false}return Promise.all(this.jobsBeforeRender)}componentDidRender(){this.aftergridrender.emit()}render(){if(!this.dimensionProvider||!this.dataProvider||!this.columnProvider||!this.viewportProvider||!this.selectionStoreConnector){return}const t=this.dimensionProvider.stores["rgRow"].store.get("realSize");this.viewport=new re({columnProvider:this.columnProvider,dataProvider:this.dataProvider,dimensionProvider:this.dimensionProvider,viewportProvider:this.viewportProvider,scrollingService:this.scrollingService,orderService:this.orderService,selectionStoreConnector:this.selectionStoreConnector,disableVirtualX:this.disableVirtualX,disableVirtualY:this.disableVirtualY,resize:e=>this.aftercolumnresize.emit(e)},t);const r=[];if(this.rowHeaders&&this.viewport.columns.length){const o=this.viewport.columns[0];r.push(e("revogr-row-headers",{additionalData:this.additionalData,height:t,rowClass:this.rowClass,resize:this.resize,dataPorts:o.dataPorts,headerProp:o.headerProp,jobsBeforeRender:this.jobsBeforeRender,rowHeaderColumn:typeof this.rowHeaders==="object"?this.rowHeaders:undefined,onScrollview:({detail:e})=>this.scrollingService.proxyScroll(e,"headerRow"),onRef:({detail:e})=>this.scrollingService.registerElement(e,"headerRow")}))}const i=de();const s=[];for(let t of this.viewport.columns){const r=Object.assign(Object.assign({},t.headerProp),{type:t.type,additionalData:this.additionalData,viewportCol:t.viewportCol,selectionStore:t.columnSelectionStore,canResize:this.resize,readonly:this.readonly,columnFilter:!!this.filter});const o=[e("revogr-header",Object.assign({},r,{slot:$}))];t.dataPorts.forEach((r=>{const s=`${r.type}_${t.type}`;const a=e("revogr-overlay-selection",Object.assign({},r,{isMobileDevice:i,onSelectall:()=>{var e;return(e=this.selectionStoreConnector)===null||e===void 0?void 0:e.selectAll()},editors:this.editors,readonly:this.readonly,range:this.range,useClipboard:this.useClipboard,applyChangesOnClose:this.applyOnClose,additionalData:this.additionalData,slot:r.slot,onBeforenextvpfocus:e=>{var t;return(t=this.selectionStoreConnector)===null||t===void 0?void 0:t.beforeNextFocusCell(e.detail)},onCanceledit:()=>{var e;return(e=this.selectionStoreConnector)===null||e===void 0?void 0:e.setEdit(false)},onSetedit:({detail:e})=>{var t;const r=this.beforeeditstart.emit(e);if(!r.defaultPrevented){(t=this.selectionStoreConnector)===null||t===void 0?void 0:t.setEdit(e.val)}}}),e("revogr-data",Object.assign({},r,{colType:t.type,key:s,readonly:this.readonly,range:this.range,rowClass:this.rowClass,rowSelectionStore:r.rowSelectionStore,additionalData:this.additionalData,jobsBeforeRender:this.jobsBeforeRender,slot:U}),e("slot",{name:`data-${t.type}-${r.type}`})),e("revogr-temp-range",{selectionStore:r.selectionStore,dimensionRow:r.dimensionRow,dimensionCol:r.dimensionCol}),e("revogr-focus",{colData:r.colData,dataStore:r.dataStore,focusTemplate:this.focusTemplate,rowType:r.type,colType:t.type,selectionStore:r.selectionStore,dimensionRow:r.dimensionRow,dimensionCol:r.dimensionCol},e("slot",{name:`focus-${t.type}-${r.type}`})));o.push(a)}));s.push(e("revogr-viewport-scroll",Object.assign({},t.prop,{ref:e=>this.scrollingService.registerElement(e,`${t.prop.key}`),onScrollviewport:e=>this.scrollingService.proxyScroll(e.detail,`${t.prop.key}`),onScrollviewportsilent:e=>this.scrollingService.scrollSilentService(e.detail,`${t.prop.key}`)}),o))}r.push(s);const a="rgRow";const n="rgCol";const d=this.viewportProvider.stores;const h=this.dimensionProvider.stores;return e(o,null,this.hideAttribution?null:e("revogr-attribution",{class:"attribution"}),e("div",{class:"main-viewport",onClick:e=>{var t;if(e.currentTarget===e.target){(t=this.viewport)===null||t===void 0?void 0:t.clearEdit()}}},e("div",{class:"viewports"},e("slot",{name:"viewport"}),r,e("revogr-scroll-virtual",{class:"vertical",dimension:a,viewportStore:d[a].store,dimensionStore:h[a].store,ref:e=>this.scrollingService.registerElement(e,"rowScroll"),onScrollvirtual:e=>this.scrollingService.proxyScroll(e.detail)}),e(se,{ref:e=>this.orderService=e}))),e("revogr-scroll-virtual",{class:"horizontal",dimension:n,viewportStore:d[n].store,dimensionStore:h[n].store,ref:e=>this.scrollingService.registerElement(e,"colScroll"),onScrollvirtual:e=>this.scrollingService.proxyScroll(e.detail)}),e("revogr-extra",{ref:e=>this.extraService=e,nodes:this.extraElements}))}disconnectedCallback(){this.removePlugins()}get element(){return i(this)}static get watchers(){return{columnTypes:["columnTypesChanged"],columns:["columnChanged"],disableVirtualX:["disableVirtualXChanged"],rowSize:["rowSizeChanged"],theme:["themeChanged"],source:["dataSourceChanged"],pinnedBottomSource:["dataSourceChanged"],pinnedTopSource:["dataSourceChanged"],disableVirtualY:["disableVirtualYChanged"],rowDefinitions:["rowDefChanged"],trimmedRows:["trimmedRowsChanged"],grouping:["groupingChanged"],stretch:["applyStretch"],filter:["applyFilter"],sorting:["applySorting"],rowHeaders:["rowHeadersChange"],registerVNode:["registerOutsideVNodes"],additionalData:["additionalDataChanged"],plugins:["pluginsChanged"]}}};ve.style=ge;export{ve as revo_grid};
import{h as e,r as t,c as r,H as o,a as i}from"./index-a61f225b.js";import{r as s,f as a,h as n,E as d,m as h,k as l,D as c}from"./column.service-7a47e6d0.js";import{c as g,m as v,r as u,i as f,D as p,B as m,G as w,S as b,a as x,A as C,f as y,E as S,l as k,C as R}from"./column.drag.plugin-6e6655d5.js";import{D as L,b as E,f as H,d as P,s as j,a as z,h as M,k as O,R as D,u as T}from"./dimension.helpers-d0d709c4.js";import{d as I}from"./debounce-b3166f78.js";import{V as N}from"./viewport.store-afa8c4fe.js";import{v as F,H as $,C as B,F as V,D as U}from"./viewport.helpers-7e7f9dad.js";import{g as A}from"./events-cf0893a3.js";import"./filter.button-d40ab17b.js";import"./header-cell-renderer-f46a8010.js";class Y{constructor(){this.defaultRowSize=32}}class X{constructor(){this.defaultRowSize=27}}class W{constructor(){this.defaultRowSize=42}}const G="default";const Z=[G,"material","compact","darkMaterial","darkCompact"];class _{get theme(){return this.currentTheme}get rowSize(){return this.customRowSize||this.currentTheme.defaultRowSize}set rowSize(e){this.customRowSize=e}constructor(e){this.customRowSize=0;this.customRowSize=e.rowSize;this.register("default")}register(e){const t=q(e);switch(t){case"material":case"darkMaterial":this.currentTheme=new W;break;case"compact":case"darkCompact":this.currentTheme=new Y;break;default:this.currentTheme=new X;break}}}function q(e){if(e&&Z.indexOf(e)>-1){return e}return G}class J{get order(){const e={};const t=this.sorting;if(t){Object.keys(t).forEach((r=>{e[r]=t[r].order}))}return e}get stores(){return this.dataSources}constructor(){this.sorting=null;this.collection=null;this.dataSources=g.reduce(((e,t)=>{e[t]=new L(t);return e}),{})}column(e,t="rgCol"){return this.getColumn(e,t)}getColumn(e,t){return E(this.dataSources[t].store,e)}getRawColumns(){return s(this.dataSources,((e,t,r)=>{e[r]=t.store.get("source");return e}),{rgCol:[],colPinStart:[],colPinEnd:[]})}getColumns(e="all"){const t=this.getRawColumns();if(e!=="all"){return t[e]}return g.reduce(((e,r)=>[...e,...t[r]]),[])}getColumnIndexByProp(e,t){return H(this.dataSources[t].store,e)}getColumnByProp(e){var t;return(t=this.collection)===null||t===void 0?void 0:t.columnByProp[e]}refreshByType(e){this.dataSources[e].refresh()}setColumns(e){g.forEach((t=>{this.dataSources[t].updateData(e.columns[t],{depth:e.maxLevel,groups:e.columnGrouping[t].reduce(((e,t)=>{if(!e[t.level]){e[t.level]=[]}e[t.level].push(t);return e}),{})})}));this.sorting=e.sort;this.collection=e;return e}updateColumns(e){const t=e.reduce(((e,t)=>{const r=a(t);if(!e[r]){e[r]={}}e[r][t.prop]=t;return e}),{});const r={};for(const e in t){if(!t.hasOwnProperty(e)){continue}const o=e;const i=t[o];const s=this.dataSources[o].store.get("source");r[o]={};for(let e=0;e<s.length;e++){const t=s[e];const a=i===null||i===void 0?void 0:i[t.prop];if(a){r[o][e]=a}}}for(const e in r){if(!r.hasOwnProperty(e)){continue}const t=e;P(this.dataSources[t].store,r[t]||{})}}updateColumn(e,t){const r=a(e);j(this.dataSources[r].store,{[t]:e})}updateColumnSorting(e,t,r,o){if(!o){this.clearSorting()}e.order=r;if(!this.sorting){this.sorting={}}this.sorting[e.prop]=e;this.updateColumn(e,t);return e}clearSorting(){const e=s(this.sorting,((e,t)=>{const r=a(t);e[r]=true;return e}),{});v(e,((e,t)=>{const r=this.dataSources[t].store.get("source");v(r,(e=>e.order=undefined));this.dataSources[t].setData({source:[...r]})}));this.sorting={}}}class K{constructor(e){this.dimensionProvider=e;this.stores=s(u,((e,t)=>{e[t]=new L(t);return e}),{})}setData(e,t="rgRow",r=false,o,i=false){this.stores[t].updateData([...e],o,i);const s=t!=="rgRow"||r;this.dimensionProvider.setData(e.length,t,s);return e}getModel(e,t="rgRow"){const r=this.stores[t].store;return E(r,e)}changeOrder({rowType:e="rgRow",from:t,to:r}){const o=this.stores[e];const i=[...o.store.get("proxyItems")];const s=o.store.get("items");const a=i.splice(i.indexOf(s[t]),1);i.splice(i.indexOf(s[r]),0,...a);o.setData({proxyItems:i});const n=o.store.get("items");this.dimensionProvider.updateSizesPositionByNewDataIndexes(e,n,s)}setCellData({type:e,rowIndex:t,prop:r,val:o},i=true){const s=this.getModel(t,e);s[r]=o;this.stores[e].setSourceData({[t]:s},i)}setRangeData(e,t){const r={};for(let o in e){const i=r[o]=E(this.stores[t].store,parseInt(o,10));if(!i){continue}for(let t in e[o]){i[t]=e[o][t]}}this.stores[t].setSourceData(r)}refresh(e="all"){if(f(e)){this.refreshItems(e)}u.forEach((e=>this.refreshItems(e)))}refreshItems(e="rgRow"){const t=this.stores[e].store.get("items");this.stores[e].setData({items:[...t]})}setGrouping({depth:e},t="rgRow"){this.stores[t].setData({groupingDepth:e})}setTrimmed(e,t="rgRow"){const r=this.stores[t];r.addTrimmed(e);this.dimensionProvider.setTrimmed(e,t);if(t==="rgRow"){this.dimensionProvider.setData(z(r.store).length,t)}}}class Q{constructor(e,t){this.viewports=e;const r=I((e=>t.realSizeChanged(e)),D);this.stores=s([...u,...g],((e,t)=>{e[t]=new p(t);e[t].store.onChange("realSize",(()=>r(t)));return e}),{})}clearSize(e,t){this.stores[e].drop();this.viewports.stores[e].setOriginalSizes(this.stores[e].store.get("originItemSize"));this.setItemCount(t,e)}setCustomSizes(e,t,r=false){let o=t;if(r){const r=this.stores[e].store.get("sizes");o=Object.assign(Object.assign({},r),t)}this.stores[e].setDimensionSize(o);this.setViewPortCoordinate({coordinate:this.viewports.stores[e].lastCoordinate,type:e,force:true})}setItemCount(e,t){this.viewports.stores[t].setViewport({realCount:e});this.stores[t].setStore({count:e})}setTrimmed(e,t){const r=M(e);const o=this.stores[t];o.setStore({trimmed:r});this.setViewPortCoordinate({coordinate:this.viewports.stores[t].lastCoordinate,type:t,force:true})}setData(e,t,r=false){this.setItemCount(e,t);if(r){const e=this.stores[t].getCurrentState();this.viewports.stores[t].setViewport({virtualSize:e.realSize})}this.setViewPortCoordinate({coordinate:this.viewports.stores[t].lastCoordinate,type:t})}applyNewColumns(e,t,r=false){for(let o of g){if(!r){this.stores[o].drop()}const i=e[o];const s=o!=="rgCol"||t;this.stores[o].setStore({count:i.length});const a=n(i);this.stores[o].setDimensionSize(a);const d={realCount:i.length};if(s){d.virtualSize=this.stores[o].getCurrentState().realSize}this.viewports.stores[o].setViewport(d);this.setViewPortCoordinate({coordinate:this.viewports.stores[o].lastCoordinate,type:o})}}getFullSize(){var e,t;let r=0;let o=0;for(let t of g){r+=((e=this.stores[t])===null||e===void 0?void 0:e.store.get("realSize"))||0}for(let e of u){o+=((t=this.stores[e])===null||t===void 0?void 0:t.store.get("realSize"))||0}return{y:o,x:r}}setViewPortCoordinate({coordinate:e,type:t,force:r=false}){const o=this.stores[t].getCurrentState();this.viewports.stores[t].setViewPortCoordinate(e,o,r)}getViewPortPos(e){const t=this.stores[e.dimension].getCurrentState();const r=O(t,e.coordinate);return r.start}setSettings(e,t){let r=[];switch(t){case"rgCol":r=g;break;case"rgRow":r=u;break}for(let t of r){this.stores[t].setStore(e)}}updateSizesPositionByNewDataIndexes(e,t,r=[]){this.stores[e].updateSizesPositionByIndexes(t,r);this.setViewPortCoordinate({coordinate:this.viewports.stores[e].lastCoordinate,type:e,force:true})}}class ee{constructor(){this.stores=s([...u,...g],((e,t)=>{e[t]=new N(t);return e}),{})}setViewport(e,t){this.stores[e].setViewport(t)}}function te(e){const t=e.dimensions[e.colType].store;const r=t.get("realSize");const o={contentWidth:r,class:e.colType,contentHeight:e.contentHeight,key:e.colType,colType:e.colType,onResizeviewport:e.onResizeviewport,style:e.fixWidth?{minWidth:`${r}px`}:undefined};const i={colData:z(e.colStore),dimensionCol:t,type:e.colType,groups:e.colStore.get("groups"),groupingDepth:e.colStore.get("groupingDepth"),resizeHandler:e.colType==="colPinEnd"?["l"]:undefined,onHeaderresize:e.onHeaderresize};return{prop:o,type:e.colType,position:e.position,headerProp:i,viewportCol:e.viewports[e.colType].store}}class re{constructor(e,t){var r,o;this.config=e;(r=this.config.selectionStoreConnector)===null||r===void 0?void 0:r.beforeUpdate();const i=[];let s=0;g.forEach((r=>{const o=e.columnProvider.stores[r].store;if(!o.get("items").length){return}const a={colType:r,position:{x:s,y:1},contentHeight:t,fixWidth:r!=="rgCol",viewports:e.viewportProvider.stores,dimensions:e.dimensionProvider.stores,rowStores:e.dataProvider.stores,colStore:o,onHeaderresize:e=>this.onColumnResize(r,e,o)};if(r==="rgCol"){a.onResizeviewport=t=>{var r;const o={clientSize:t.detail.size};if(t.detail.dimension==="rgRow"&&!e.disableVirtualY||t.detail.dimension==="rgCol"&&!e.disableVirtualX){o.virtualSize=t.detail.size}(r=e.viewportProvider)===null||r===void 0?void 0:r.setViewport(t.detail.dimension,o)}}const n=te(a);const d=this.registerCol(n.position.x,r);const h=this.dataViewPort(a).reduce(((t,o)=>{const i=this.registerSegment(o.position);i.setLastCell(o.lastCell);const s=this.registerRow(o.position.y,o.type);const a=Object.assign(Object.assign({colType:r},o),{rowSelectionStore:s,selectionStore:i.store,ref:t=>e.selectionStoreConnector.registerSection(t),onSetrange:e=>{i.setRangeArea(e.detail)},onSettemprange:e=>i.setTempArea(e.detail),onFocuscell:t=>{i.clearFocus();e.selectionStoreConnector.focus(i,t.detail)}});t.push(a);return t}),[]);i.push(Object.assign(Object.assign({},n),{columnSelectionStore:d,dataPorts:h}));s++}));this.columns=i;(o=this.config.scrollingService)===null||o===void 0?void 0:o.unregister()}onColumnResize(e,{detail:t},r){var o;(o=this.config.dimensionProvider)===null||o===void 0?void 0:o.setCustomSizes(e,t,true);const i={};for(const[e,o]of Object.entries(t||{})){const t=parseInt(e,10);const s=E(r,t);if(s){i[t]=Object.assign(Object.assign({},s),{size:o})}}this.config.resize(i)}registerSegment(e){return this.config.selectionStoreConnector.register(e)}registerRow(e,t){return this.config.selectionStoreConnector.registerRow(e,t).store}registerCol(e,t){return this.config.selectionStoreConnector.registerColumn(e,t).store}dataViewPort(e){const t={rowPinStart:$,rgRow:B,rowPinEnd:V};let r=0;return u.reduce(((o,i)=>{const s=e.viewports[i].store.get("realCount")||i==="rgRow";const a=Object.assign(Object.assign({},e),{position:Object.assign(Object.assign({},e.position),{y:s?r:d})});const n=F(a,i,t[i],i!=="rgRow");o.push(n);if(s){r++}return o}),[])}scrollToCell(e){for(let t in e){const r=e[t];if(typeof r==="number"){this.config.scrollingService.proxyScroll({dimension:t==="x"?"rgCol":"rgRow",coordinate:r})}}}clearFocused(){this.config.selectionStoreConnector.clearAll()}clearEdit(){this.config.selectionStoreConnector.setEdit(false)}getFocused(){const e=this.config.selectionStoreConnector.focusedStore;if(!e){return null}const t=this.config.selectionStoreConnector.storesXToType[e.position.x];const r=this.config.columnProvider.getColumn(e.cell.x,t);const o=this.config.selectionStoreConnector.storesYToType[e.position.y];const i=this.config.dataProvider.getModel(e.cell.y,o);return{column:r,model:i,cell:e.cell,colType:t,rowType:o}}getStoreCoordinateByType(e,t){const r=this.config.selectionStoreConnector.storesByType;if(typeof r[e]==="undefined"||typeof r[t]==="undefined"){return}return{x:r[e],y:r[t]}}setFocus(e,t,r,o){var i;const s=this.getStoreCoordinateByType(e,t);if(s){(i=this.config.selectionStoreConnector)===null||i===void 0?void 0:i.focusByCell(s,r,o)}}getSelectedRange(){return this.config.selectionStoreConnector.selectedRange}setEdit(e,t,r,o){var i;const s=this.getStoreCoordinateByType(r,o);if(s){(i=this.config.selectionStoreConnector)===null||i===void 0?void 0:i.setEditByCell(s,{x:t,y:e})}}}class oe{constructor(e){this.setViewport=e;this.elements={}}async proxyScroll(e,t){var r;let o;let i=e;for(let i in this.elements){if(e.dimension==="rgCol"&&i==="headerRow"){continue}else if(this.isPinnedColumn(t)&&e.dimension==="rgCol"){if(i===t||!e.delta){continue}for(let t of this.elements[i]){if(t.changeScroll){o=t.changeScroll(e)}}}else{for(let t of this.elements[i]){await((r=t.setScroll)===null||r===void 0?void 0:r.call(t,e))}}}const s=await o;if(s){i=s}this.setViewport(i)}async scrollSilentService(e,t){var r;for(let o in this.elements){if(o===t){continue}if(g.includes(t)&&(o==="headerRow"||g.includes(o))){for(let t of this.elements[o]){await((r=t.changeScroll)===null||r===void 0?void 0:r.call(t,e,true))}continue}}}isPinnedColumn(e){return!!e&&["colPinStart","colPinEnd"].indexOf(e)>-1}registerElements(e){this.elements=e}registerElement(e,t){if(!this.elements[t]){this.elements[t]=[]}if(e){this.elements[t].push(e)}else if(this.elements[t]){delete this.elements[t]}}unregister(){this.elements={}}}class ie{constructor(){this.parentY=0}start(e,{pos:t,text:r,event:o}){var i;const{top:s}=e.getBoundingClientRect();this.parentY=s;if(this.text){this.text.innerText=r}this.move(t);this.moveTip({x:o.x,y:o.y});(i=this.el)===null||i===void 0?void 0:i.classList.remove("hidden")}end(){var e;(e=this.el)===null||e===void 0?void 0:e.classList.add("hidden")}move(e){this.moveElement(e.end-this.parentY)}moveTip({x:e,y:t}){if(!this.draggable){return}this.draggable.style.left=`${e}px`;this.draggable.style.top=`${t}px`}moveElement(e){if(!this.rgRow){return}this.rgRow.style.transform=`translateY(${e}px)`}}const se=({ref:t})=>{const r=new ie;t(r);return e("div",{class:"draggable-wrapper hidden",ref:e=>r.el=e},e("div",{class:"draggable",ref:e=>r.draggable=e},e("span",{class:"revo-alt-icon"}),e("span",{ref:e=>r.text=e})),e("div",{class:"drag-position",ref:e=>r.rgRow=e}))};const ae=(e=[])=>{const t={};for(const r of e){let e=t[r.type];if(!e){e=t[r.type]={}}if(r.size){if(!e.sizes){e.sizes={}}e.sizes[r.index]=r.size}}return t};const ne=(e=[])=>{const t={};for(const r of e){let e=t[r.type];if(!e){e=t[r.type]=[]}if(r.size){e.push(r.index)}}return t};function de(){return/Mobi/i.test(navigator.userAgent)||/Android/i.test(navigator.userAgent)||navigator.maxTouchPoints>0}class he extends m{constructor(e,t){super(e,t);e.setAttribute("dir","ltr");e.setAttribute("role","treegrid");e.setAttribute("aria-keyshortcuts","Enter");e.setAttribute("aria-multiselectable","true");e.setAttribute("tabindex","0");this.addEventListener("beforecolumnsset",(({detail:t})=>{const r=[...t.columns.colPinStart,...t.columns.rgCol,...t.columns.colPinEnd];e.setAttribute("aria-colcount",`${r.length}`);r.forEach(((e,t)=>{const{columnProperties:r,cellProperties:o}=e;e.columnProperties=(...e)=>{const o=(r===null||r===void 0?void 0:r(...e))||{};o.role="columnheader";o["aria-colindex"]=t;return o};e.cellProperties=(...e)=>{const r={["role"]:"gridcell",["aria-colindex"]:t,["aria-rowindex"]:e[0].rowIndex,["tabindex"]:-1};const i=(o===null||o===void 0?void 0:o(...e))||{};return Object.assign(Object.assign({},r),i)}}))}));this.addEventListener("beforesourceset",(({detail:t})=>{e.setAttribute("aria-rowcount",`${t.source.length}`)}));this.addEventListener("beforerowrender",(({detail:e})=>{e.node.t=Object.assign(Object.assign({},e.node.t),{role:"row",["aria-rowindex"]:e.item.itemIndex})}));this.addEventListener("afterfocus",(async e=>{if(e.defaultPrevented){return}const t=this.revogrid.querySelector(`revogr-data[type="${e.detail.rowType}"][col-type="${e.detail.colType}"] [data-rgrow="${e.detail.rowIndex}"][data-rgcol="${e.detail.colIndex}"]`);if(t instanceof HTMLElement){t.focus()}}))}}class le{constructor(){this.internalPlugins=[]}get(){return[...this.internalPlugins]}add(e){this.internalPlugins.push(e)}addUserPluginsAndCreate(e,t=[],r,o){if(!o){return}const i=(r===null||r===void 0?void 0:r.filter((e=>!t.some((t=>t===e)))))||[];i.forEach((e=>{var t,r;const o=this.internalPlugins.findIndex((t=>t instanceof e));if(o!==-1){(r=(t=this.internalPlugins[o]).destroy)===null||r===void 0?void 0:r.call(t);this.internalPlugins.splice(o,1)}}));t===null||t===void 0?void 0:t.forEach((t=>{const r=this.internalPlugins.find((e=>e instanceof t));if(r){return}this.add(new t(e,o))}))}getByClass(e){return this.internalPlugins.find((t=>t instanceof e))}remove(e){var t,r;const o=this.internalPlugins.indexOf(e);if(o>-1){(r=(t=this.internalPlugins[o]).destroy)===null||r===void 0?void 0:r.call(t);this.internalPlugins.splice(o,1)}}destroy(){this.internalPlugins.forEach((e=>{var t;return(t=e.destroy)===null||t===void 0?void 0:t.call(e)}));this.internalPlugins=[]}}const ce='.revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:"::"}.revo-alt-icon{-webkit-mask-image:url("data:image/svg+xml,%3C%3Fxml version=\'1.0\' encoding=\'UTF-8\'%3F%3E%3Csvg viewBox=\'0 0 384 383\' xmlns=\'http://www.w3.org/2000/svg\' xmlns:xlink=\'http://www.w3.org/1999/xlink\'%3E%3Cg%3E%3Cpath d=\'M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z\'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3C%3Fxml version=\'1.0\' encoding=\'UTF-8\'%3F%3E%3Csvg viewBox=\'0 0 384 383\' xmlns=\'http://www.w3.org/2000/svg\' xmlns:xlink=\'http://www.w3.org/1999/xlink\'%3E%3Cg%3E%3Cpath d=\'M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z\'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revo-grid[theme=default],revo-grid:not([theme]){border:1px solid #cecece;font-size:12px}revo-grid[theme=default] .rowHeaders revogr-header,revo-grid:not([theme]) .rowHeaders revogr-header{box-shadow:-1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-header,revo-grid:not([theme]) revogr-header{text-align:center;line-height:30px;background-color:#f8f9fa}revo-grid[theme=default] revogr-header .group-rgRow,revo-grid:not([theme]) revogr-header .group-rgRow{box-shadow:none}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid[theme=default] revogr-header .group-rgRow,revo-grid:not([theme]) revogr-header .header-rgRow,revo-grid:not([theme]) revogr-header .group-rgRow{text-transform:uppercase;font-size:12px;color:#000}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid:not([theme]) revogr-header .header-rgRow{height:30px;box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-header .rgHeaderCell,revo-grid:not([theme]) revogr-header .rgHeaderCell{box-shadow:-1px 0 0 0 #cecece inset, 0 -1px 0 0 #cecece, 0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-header .rgHeaderCell.focused-cell,revo-grid:not([theme]) revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] .rowHeaders,revo-grid:not([theme]) .rowHeaders{background-color:#f8f9fa}revo-grid[theme=default] .rowHeaders revogr-data .rgCell,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell{color:#000}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:first-child,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:first-child{box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:not(:first-child),revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:not(:first-child){box-shadow:0 -1px 0 0 #cecece inset, 1px 0 0 0 #cecece inset}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:last-child,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:last-child{border-right:1px solid #cecece}revo-grid[theme=default] .rowHeaders revogr-data revogr-header,revo-grid:not([theme]) .rowHeaders revogr-data revogr-header{box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child,revo-grid:not([theme]) revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell,revo-grid:not([theme]) revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #cecece inset, -1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinEnd,revo-grid[theme=default] revogr-viewport-scroll.colPinEnd revogr-header,revo-grid:not([theme]) revogr-viewport-scroll.colPinEnd,revo-grid:not([theme]) revogr-viewport-scroll.colPinEnd revogr-header{box-shadow:1px 0 0 #cecece inset}revo-grid[theme=default] .footer-wrapper revogr-data .rgRow:first-child .rgCell,revo-grid:not([theme]) .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset, 0 -1px 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data,revo-grid:not([theme]) revogr-data{text-align:center}revo-grid[theme=default] revogr-data .revo-draggable,revo-grid:not([theme]) revogr-data .revo-draggable{float:left}revo-grid[theme=default] revogr-data .rgRow,revo-grid:not([theme]) revogr-data .rgRow{line-height:27px}revo-grid[theme=default] revogr-data .rgRow.focused-rgRow,revo-grid:not([theme]) revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] revogr-data .rgCell,revo-grid:not([theme]) revogr-data .rgCell{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data .rgCell.disabled,revo-grid:not([theme]) revogr-data .rgCell.disabled{background-color:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=material]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}revo-grid[theme=material] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=material] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=material] revogr-header .header-rgRow{height:50px}revo-grid[theme=material] revogr-data{text-align:left}revo-grid[theme=material] revogr-data .rgRow{line-height:42px}revo-grid[theme=material] revogr-data .rgCell{padding:0 15px}revo-grid[theme=material] .rowHeaders{background-color:#f7faff}revo-grid[theme=material] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=material] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=material] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=material] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=material] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=material] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=darkMaterial]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#d8d8d8}revo-grid[theme=darkMaterial] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkMaterial] revogr-header .header-rgRow{height:50px}revo-grid[theme=darkMaterial] revogr-data{text-align:left}revo-grid[theme=darkMaterial] revogr-data .rgRow{line-height:42px}revo-grid[theme=darkMaterial] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkMaterial] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkMaterial] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkMaterial] revogr-edit{background-color:#28272b}revo-grid[theme=darkMaterial] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkMaterial] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkMaterial] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=darkCompact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#d8d8d8}revo-grid[theme=darkCompact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkCompact] revogr-header .header-rgRow{height:45px}revo-grid[theme=darkCompact] revogr-data{text-align:left}revo-grid[theme=darkCompact] revogr-data .rgRow{line-height:32px}revo-grid[theme=darkCompact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkCompact] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkCompact] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkCompact] revogr-edit{background-color:#28272b}revo-grid[theme=darkCompact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkCompact] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkCompact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=compact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}revo-grid[theme=compact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=compact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=compact] revogr-header .header-rgRow{height:45px}revo-grid[theme=compact] revogr-data{text-align:left}revo-grid[theme=compact] revogr-data .rgRow{line-height:32px}revo-grid[theme=compact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=compact] .rowHeaders{background-color:#f7faff}revo-grid[theme=compact] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=compact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=compact] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=compact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=compact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=compact] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=compact] revo-dropdown .rv-dr-root{padding:0px 9px}revo-grid{display:block;height:100%;min-height:300px;font-family:Helvetica, Arial, Sans-Serif, serif;font-size:14px;position:relative;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column;width:100%;height:100%}revo-grid .attribution{position:absolute;bottom:0;left:0;right:0;z-index:1000;width:0;height:0;border-left:4px solid rgba(38, 106, 232, 0.9);border-bottom:4px solid rgba(38, 106, 232, 0.9);border-top:4px solid transparent;border-right:4px solid transparent;cursor:pointer}revo-grid .attribution .value{position:absolute;bottom:0;left:0;background-color:rgba(255, 255, 255, 0.9);padding:4px;border-radius:4px;box-shadow:0 1px 10px rgba(0, 0, 0, 0.2);white-space:nowrap;text-decoration:none;color:black;letter-spacing:0.3px;font-size:11px;opacity:0;width:4px;overflow:hidden;transition:opacity 0.5s ease-in-out, width 0.3s ease-in-out}revo-grid .attribution:hover .value{width:63px;opacity:1}revo-grid.column-draggable.column-drag-start:hover,revo-grid.column-draggable.column-drag-start *:hover{cursor:grabbing}revo-grid .footer-wrapper,revo-grid .header-wrapper{width:100%}revo-grid .footer-wrapper revogr-data,revo-grid .header-wrapper revogr-data{z-index:3}revo-grid revo-dropdown{width:100%}revo-grid revo-dropdown .rv-dr-root{max-height:100%}revo-grid revo-dropdown.shrink label{opacity:0}revo-grid .viewports{max-width:100%;display:flex;flex-direction:row;align-items:flex-start;flex-grow:1}revo-grid .main-viewport{flex-grow:1;height:0;display:flex;justify-content:space-between;flex-direction:row}revo-grid .draggable{position:fixed;height:30px;line-height:30px;background:#fff;border-radius:3px;display:block;z-index:100;margin-top:5px;margin-right:-20px;box-shadow:0 4px 20px 0 rgba(0, 0, 0, 0.15);padding-left:20px;padding-right:5px}revo-grid .draggable.hidden{display:none}revo-grid .draggable .revo-alt-icon{background-color:black;position:absolute;left:5px;top:10px}revo-grid .draggable-wrapper.hidden{display:none}revo-grid .drag-position{position:absolute;left:0;right:0;height:1px;z-index:2;background:gray;pointer-events:none}revo-grid .drag-position-y{position:absolute;top:0;left:0;bottom:0;width:1px;z-index:2;background:gray;pointer-events:none}revo-grid .drag-auto-scroll-y{pointer-events:none;position:absolute;left:0;top:0;height:50px;width:1px}revo-grid .clipboard{position:absolute;left:0;top:0}revo-grid revogr-scroll-virtual{position:relative}revo-grid revogr-scroll-virtual.vertical,revo-grid revogr-scroll-virtual.horizontal{z-index:3}';const ge=ce;const ve=class{constructor(e){t(this,e);this.contentsizechanged=r(this,"contentsizechanged",7);this.beforeedit=r(this,"beforeedit",7);this.beforerangeedit=r(this,"beforerangeedit",7);this.afteredit=r(this,"afteredit",7);this.beforeautofill=r(this,"beforeautofill",7);this.beforerange=r(this,"beforerange",7);this.afterfocus=r(this,"afterfocus",7);this.roworderchanged=r(this,"roworderchanged",7);this.beforesortingapply=r(this,"beforesortingapply",7);this.beforesorting=r(this,"beforesorting",7);this.rowdragstart=r(this,"rowdragstart",7);this.headerclick=r(this,"headerclick",7);this.beforecellfocus=r(this,"beforecellfocus",7);this.beforefocuslost=r(this,"beforefocuslost",7);this.beforesourceset=r(this,"beforesourceset",7);this.beforeanysource=r(this,"beforeanysource",7);this.aftersourceset=r(this,"aftersourceset",7);this.afteranysource=r(this,"afteranysource",7);this.beforecolumnsset=r(this,"beforecolumnsset",7);this.beforecolumnapplied=r(this,"beforecolumnapplied",7);this.aftercolumnsset=r(this,"aftercolumnsset",7);this.beforefilterapply=r(this,"beforefilterapply",7);this.beforefiltertrimmed=r(this,"beforefiltertrimmed",7);this.beforetrimmed=r(this,"beforetrimmed",7);this.aftertrimmed=r(this,"aftertrimmed",7);this.viewportscroll=r(this,"viewportscroll",7);this.beforeexport=r(this,"beforeexport",7);this.beforeeditstart=r(this,"beforeeditstart",7);this.aftercolumnresize=r(this,"aftercolumnresize",7);this.beforerowdefinition=r(this,"beforerowdefinition",7);this.filterconfigchanged=r(this,"filterconfigchanged",7);this.sortingconfigchanged=r(this,"sortingconfigchanged",7);this.rowheaderschanged=r(this,"rowheaderschanged",7);this.beforegridrender=r(this,"beforegridrender",7);this.aftergridrender=r(this,"aftergridrender",7);this.aftergridinit=r(this,"aftergridinit",7);this.additionaldatachanged=r(this,"additionaldatachanged",7);this.afterthemechanged=r(this,"afterthemechanged",7);this.created=r(this,"created",7);this.extraElements=[];this.pluginService=new le;this.viewport=null;this.isInited=false;this.rowHeaders=undefined;this.frameSize=1;this.rowSize=0;this.colSize=100;this.range=false;this.readonly=false;this.resize=false;this.canFocus=true;this.useClipboard=true;this.columns=[];this.source=[];this.pinnedTopSource=[];this.pinnedBottomSource=[];this.rowDefinitions=[];this.editors={};this.applyOnClose=false;this.plugins=[];this.columnTypes={};this.theme="default";this.rowClass="";this.autoSizeColumn=false;this.filter=false;this.sorting=undefined;this.focusTemplate=undefined;this.canMoveColumns=false;this.trimmedRows={};this.exporting=false;this.grouping=undefined;this.stretch=false;this.additionalData={};this.disableVirtualX=false;this.disableVirtualY=false;this.hideAttribution=false;this.jobsBeforeRender=[];this.registerVNode=[];this.accessible=true}async refresh(e="all"){if(!this.dataProvider){throw new Error("Not connected")}this.dataProvider.refresh(e)}async setDataAt({row:e,col:t,colType:r="rgCol",rowType:o="rgRow",val:i,skipDataUpdate:s=false}){var a;if(this.dataProvider&&this.columnProvider&&!s){const s=(a=this.columnProvider.getColumn(t,r))===null||a===void 0?void 0:a.prop;if(typeof s!=="undefined"){this.dataProvider.setCellData({type:o,rowIndex:e,prop:s,val:i},false)}}const n=this.element.querySelector(`revogr-data[type="${o}"][col-type="${r}"]`);return n===null||n===void 0?void 0:n.updateCell({row:e,col:t})}async scrollToRow(e=0){if(!this.dimensionProvider){throw new Error("Not connected")}const t=this.dimensionProvider.getViewPortPos({coordinate:e,dimension:"rgRow"});await this.scrollToCoordinate({y:t})}async scrollToColumnIndex(e=0){if(!this.dimensionProvider){throw new Error("Not connected")}const t=this.dimensionProvider.getViewPortPos({coordinate:e,dimension:"rgCol"});await this.scrollToCoordinate({x:t})}async scrollToColumnProp(e,t="rgCol"){if(!this.dimensionProvider||!this.columnProvider){throw new Error("Not connected")}const r=this.columnProvider.getColumnIndexByProp(e,t);if(r<0){return}const o=this.dimensionProvider.getViewPortPos({coordinate:r,dimension:t});await this.scrollToCoordinate({x:o})}async updateColumns(e){var t;(t=this.columnProvider)===null||t===void 0?void 0:t.updateColumns(e)}async addTrimmed(e,t="external",r="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}const o=this.beforetrimmed.emit({trimmed:e,trimmedType:t,type:r});if(o.defaultPrevented){return o}this.dataProvider.setTrimmed({[t]:o.detail.trimmed},r);this.aftertrimmed.emit();return o}async scrollToCoordinate(e){var t;(t=this.viewport)===null||t===void 0?void 0:t.scrollToCell(e)}async setCellEdit(e,t,r="rgRow"){var o;const i=h(this.columns,t);if(!i){return}await T();const s=i.pin||"rgCol";if(!this.columnProvider){throw new Error("Not connected")}(o=this.viewport)===null||o===void 0?void 0:o.setEdit(e,this.columnProvider.getColumnIndexByProp(t,s),s,r)}async setCellsFocus(e={x:0,y:0},t={x:0,y:0},r="rgCol",o="rgRow"){var i;(i=this.viewport)===null||i===void 0?void 0:i.setFocus(r,o,e,t)}async getSource(e="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}return this.dataProvider.stores[e].store.get("source")}async getVisibleSource(e="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}return z(this.dataProvider.stores[e].store)}async getSourceStore(e="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}return this.dataProvider.stores[e].store}async getColumnStore(e="rgCol"){if(!this.columnProvider){throw new Error("Not connected")}return this.columnProvider.stores[e].store}async updateColumnSorting(e,t,r,o){if(!this.columnProvider){throw new Error("Not connected")}return this.columnProvider.updateColumnSorting(e,t,r,o)}async clearSorting(){if(!this.columnProvider){throw new Error("Not connected")}this.columnProvider.clearSorting()}async getColumns(){if(!this.columnProvider){throw new Error("Not connected")}return this.columnProvider.getColumns()}async clearFocus(){var e,t;const r=(e=this.viewport)===null||e===void 0?void 0:e.getFocused();const o=this.beforefocuslost.emit(r);if(o.defaultPrevented){return}(t=this.selectionStoreConnector)===null||t===void 0?void 0:t.clearAll()}async getPlugins(){return this.pluginService.get()}async getFocused(){var e,t;return(t=(e=this.viewport)===null||e===void 0?void 0:e.getFocused())!==null&&t!==void 0?t:null}async getContentSize(){var e;if(!this.dimensionProvider){throw new Error("Not connected")}return(e=this.dimensionProvider)===null||e===void 0?void 0:e.getFullSize()}async getSelectedRange(){var e,t;return(t=(e=this.viewport)===null||e===void 0?void 0:e.getSelectedRange())!==null&&t!==void 0?t:null}async refreshExtraElements(){var e;(e=this.extraService)===null||e===void 0?void 0:e.refresh()}mousedownHandle(e){const t=A(e,"screenX");const r=A(e,"screenY");if(t===null||r===null){return}this.clickTrackForFocusClear=t+r}async mouseupHandle(e){var t;const r=A(e,"screenX");const o=A(e,"screenY");if(r===null||o===null){return}if(e.defaultPrevented){return}const i=r+o;if(Math.abs(((t=this.clickTrackForFocusClear)!==null&&t!==void 0?t:0)-i)>10){return}const s=e.composedPath();if(!s.includes(this.element)&&!(this.element.shadowRoot&&s.includes(this.element.shadowRoot))){await this.clearFocus()}}onRowDragStarted(e){var t;const r=this.rowdragstart.emit(e.detail);if(r.defaultPrevented){e.preventDefault();return}(t=this.orderService)===null||t===void 0?void 0:t.start(this.element,Object.assign(Object.assign({},e.detail),r.detail))}onRowDragEnd(){var e;(e=this.orderService)===null||e===void 0?void 0:e.end()}onRowOrderChange(e){var t;(t=this.dataProvider)===null||t===void 0?void 0:t.changeOrder(e.detail)}onRowDrag({detail:e}){var t;(t=this.orderService)===null||t===void 0?void 0:t.move(e)}onRowMouseMove(e){var t;(t=this.orderService)===null||t===void 0?void 0:t.moveTip(e.detail)}async onCellEdit(e){var t;const{defaultPrevented:r,detail:o}=this.beforeedit.emit(e.detail);await T();if(!r){(t=this.dataProvider)===null||t===void 0?void 0:t.setCellData(o);this.afteredit.emit(o)}}onRangeEdit(e){if(!this.dataProvider){throw new Error("Not connected")}const{defaultPrevented:t,detail:r}=this.beforerangeedit.emit(e.detail);if(t){e.preventDefault();return}this.dataProvider.setRangeData(r.data,r.type);this.afteredit.emit(r)}onRangeChanged(e){const t=this.beforerange.emit(e.detail);if(t.defaultPrevented){e.preventDefault()}const r=this.beforeautofill.emit(t.detail);if(r.defaultPrevented){e.preventDefault()}}onRowDropped(e){const{defaultPrevented:t}=this.roworderchanged.emit(e.detail);if(t){e.preventDefault()}}onHeaderClick(e){const{defaultPrevented:t}=this.headerclick.emit(Object.assign(Object.assign({},e.detail.column),{originalEvent:e.detail.originalEvent}));if(t){e.preventDefault()}}onCellFocus(e){const{defaultPrevented:t}=this.beforecellfocus.emit(e.detail);if(!this.canFocus||t){e.preventDefault()}}columnTypesChanged(){this.columnChanged(this.columns)}columnChanged(e=[],t=undefined,r="columns",o=false){if(!this.dimensionProvider||!this.columnProvider){return}const i=l(e,0,this.columnTypes);const s=this.beforecolumnsset.emit(i);if(s.defaultPrevented){return}this.dimensionProvider.applyNewColumns(s.detail.columns,this.disableVirtualX,o);const a=this.beforecolumnapplied.emit(i);if(a.defaultPrevented){return}const n=this.columnProvider.setColumns(a.detail);this.aftercolumnsset.emit({columns:n,order:this.columnProvider.order})}disableVirtualXChanged(e=false,t=false){if(e===t){return}this.columnChanged(this.columns)}rowSizeChanged(e){if(!this.dimensionProvider){return}this.dimensionProvider.setSettings({originItemSize:e},"rgRow");this.rowDefChanged(this.rowDefinitions,this.rowDefinitions,"rowSize",true)}themeChanged(e,t,r="theme",o=false){if(!this.dimensionProvider){return}this.themeService.register(e);this.dimensionProvider.setSettings({originItemSize:this.themeService.rowSize},"rgRow");this.dimensionProvider.setSettings({originItemSize:this.colSize},"rgCol");if(!o){this.dimensionProvider.setSettings({originItemSize:this.themeService.rowSize},"rgRow");this.rowDefChanged(this.rowDefinitions,this.rowDefinitions,"theme",true)}this.afterthemechanged.emit(e)}dataSourceChanged(e=[],t,r){if(!this.dataProvider){return}let o="rgRow";switch(r){case"pinnedBottomSource":o="rowPinEnd";break;case"pinnedTopSource":o="rowPinStart";break;case"source":o="rgRow";const t=this.beforesourceset.emit({type:o,source:e});e=t.detail.source;break}const i=this.beforeanysource.emit({type:o,source:e});const s=[...i.detail.source];this.dataProvider.setData(s,o,this.disableVirtualY);if(r==="source"){this.aftersourceset.emit({type:o,source:e})}this.afteranysource.emit({type:o,source:e})}disableVirtualYChanged(e=false,t=false){if(e===t){return}this.dataSourceChanged(this.source,this.source,"source")}rowDefChanged(e,t,r,o=true){if(!this.dimensionProvider||!this.dataProvider){return}const{detail:{vals:i,oldVals:s}}=this.beforerowdefinition.emit({vals:e,oldVals:t});const a=ae(i);if(s){const e=ne(s);for(const t in e){if(e.hasOwnProperty(t)){const e=t;const r=this.dataProvider.stores[e];const o=r.store.get("source").length;this.dimensionProvider.clearSize(e,o)}}}u.forEach((e=>{var t;const r=a[e];if(r||o){(t=this.dimensionProvider)===null||t===void 0?void 0:t.setCustomSizes(e,(r===null||r===void 0?void 0:r.sizes)||{})}}))}trimmedRowsChanged(e={}){this.addTrimmed(e)}groupingChanged(e={}){var t;(t=this.pluginService.getByClass(w))===null||t===void 0?void 0:t.setGrouping(e||{})}applyStretch(e){if(!this.dimensionProvider||!this.dataProvider||!this.columnProvider||!this.viewportProvider){return}if(e==="false"){e=false}const t=this.getPluginData();if(!t){return}const r=this.pluginService.getByClass(b);if(typeof e==="boolean"&&e||e==="true"){if(!r){this.pluginService.add(new b(this.element,t))}else if(x(r)){r.applyStretch(this.columnProvider.getRawColumns())}}else if(r){this.pluginService.remove(r)}}applyFilter(e){this.filterconfigchanged.emit(e)}applySorting(e){this.sortingconfigchanged.emit(e)}rowHeadersChange(e){this.rowheaderschanged.emit(e)}registerOutsideVNodes(e=[]){this.extraElements=e}additionalDataChanged(e){this.additionaldatachanged.emit(e)}pluginsChanged(e=[],t){this.pluginService.addUserPluginsAndCreate(this.element,e,t,this.getPluginData())}setPlugins(){this.removePlugins();const e=this.getPluginData();if(!e){return}this.setCorePlugins(e);this.pluginsChanged(this.plugins)}setCorePlugins(e){if(this.accessible){this.pluginService.add(new he(this.element,e))}if(this.autoSizeColumn){this.pluginService.add(new C(this.element,e,typeof this.autoSizeColumn==="object"?this.autoSizeColumn:undefined))}if(this.filter){this.pluginService.add(new y(this.element,e,typeof this.filter==="object"?this.filter:undefined))}if(this.exporting){this.pluginService.add(new S(this.element,e))}this.pluginService.add(new k(this.element,e));this.pluginService.add(new w(this.element,e));if(this.canMoveColumns){this.pluginService.add(new R(this.element,e))}}getPluginData(){if(!this.dimensionProvider||!this.dataProvider||!this.columnProvider||!this.viewportProvider||!this.selectionStoreConnector){return}const e={data:this.dataProvider,column:this.columnProvider,dimension:this.dimensionProvider,viewport:this.viewportProvider,selection:this.selectionStoreConnector,plugins:this.pluginService};return e}removePlugins(){this.pluginService.destroy()}connectedCallback(){if(this.isInited){this.setPlugins()}this.created.emit()}componentWillLoad(){var e;this.viewportProvider=new ee;this.themeService=new _({rowSize:this.rowSize});this.dimensionProvider=new Q(this.viewportProvider,{realSizeChanged:e=>this.contentsizechanged.emit(e)});this.columnProvider=new J;this.selectionStoreConnector=new c;this.dataProvider=new K(this.dimensionProvider);this.registerOutsideVNodes(this.registerVNode);this.setPlugins();this.applyStretch(this.stretch);this.themeChanged(this.theme,undefined,undefined,true);this.columnChanged(this.columns,undefined,undefined,true);this.dataSourceChanged(this.source,undefined,"source");this.dataSourceChanged(this.pinnedTopSource,undefined,"pinnedTopSource");this.dataSourceChanged(this.pinnedBottomSource,undefined,"pinnedBottomSource");if(Object.keys((e=this.trimmedRows)!==null&&e!==void 0?e:{}).length>0){this.trimmedRowsChanged(this.trimmedRows)}this.rowDefChanged(this.rowDefinitions);if(this.grouping&&Object.keys(this.grouping).length>0){this.groupingChanged(this.grouping)}this.scrollingService=new oe((e=>{var t;(t=this.dimensionProvider)===null||t===void 0?void 0:t.setViewPortCoordinate({coordinate:e.coordinate,type:e.dimension});this.viewportscroll.emit(e)}));this.aftergridinit.emit();this.isInited=true}componentWillRender(){const e=this.beforegridrender.emit();if(e.defaultPrevented){return false}return Promise.all(this.jobsBeforeRender)}componentDidRender(){this.aftergridrender.emit()}render(){if(!this.dimensionProvider||!this.dataProvider||!this.columnProvider||!this.viewportProvider||!this.selectionStoreConnector){return}const t=this.dimensionProvider.stores["rgRow"].store.get("realSize");this.viewport=new re({columnProvider:this.columnProvider,dataProvider:this.dataProvider,dimensionProvider:this.dimensionProvider,viewportProvider:this.viewportProvider,scrollingService:this.scrollingService,orderService:this.orderService,selectionStoreConnector:this.selectionStoreConnector,disableVirtualX:this.disableVirtualX,disableVirtualY:this.disableVirtualY,resize:e=>this.aftercolumnresize.emit(e)},t);const r=[];if(this.rowHeaders&&this.viewport.columns.length){const o=this.viewport.columns[0];r.push(e("revogr-row-headers",{additionalData:this.additionalData,height:t,rowClass:this.rowClass,resize:this.resize,dataPorts:o.dataPorts,headerProp:o.headerProp,jobsBeforeRender:this.jobsBeforeRender,rowHeaderColumn:typeof this.rowHeaders==="object"?this.rowHeaders:undefined,onScrollview:({detail:e})=>this.scrollingService.proxyScroll(e,"headerRow"),onRef:({detail:e})=>this.scrollingService.registerElement(e,"headerRow")}))}const i=de();const s=[];for(let t of this.viewport.columns){const r=Object.assign(Object.assign({},t.headerProp),{type:t.type,additionalData:this.additionalData,viewportCol:t.viewportCol,selectionStore:t.columnSelectionStore,canResize:this.resize,readonly:this.readonly,columnFilter:!!this.filter});const o=[e("revogr-header",Object.assign({},r,{slot:$}))];t.dataPorts.forEach((r=>{const s=`${r.type}_${t.type}`;const a=e("revogr-overlay-selection",Object.assign({},r,{isMobileDevice:i,onSelectall:()=>{var e;return(e=this.selectionStoreConnector)===null||e===void 0?void 0:e.selectAll()},editors:this.editors,readonly:this.readonly,range:this.range,useClipboard:this.useClipboard,applyChangesOnClose:this.applyOnClose,additionalData:this.additionalData,slot:r.slot,onBeforenextvpfocus:e=>{var t;return(t=this.selectionStoreConnector)===null||t===void 0?void 0:t.beforeNextFocusCell(e.detail)},onCanceledit:()=>{var e;return(e=this.selectionStoreConnector)===null||e===void 0?void 0:e.setEdit(false)},onSetedit:({detail:e})=>{var t;const r=this.beforeeditstart.emit(e);if(!r.defaultPrevented){(t=this.selectionStoreConnector)===null||t===void 0?void 0:t.setEdit(e.val)}}}),e("revogr-data",Object.assign({},r,{colType:t.type,key:s,readonly:this.readonly,range:this.range,rowClass:this.rowClass,rowSelectionStore:r.rowSelectionStore,additionalData:this.additionalData,jobsBeforeRender:this.jobsBeforeRender,slot:U}),e("slot",{name:`data-${t.type}-${r.type}`})),e("revogr-temp-range",{selectionStore:r.selectionStore,dimensionRow:r.dimensionRow,dimensionCol:r.dimensionCol}),e("revogr-focus",{colData:r.colData,dataStore:r.dataStore,focusTemplate:this.focusTemplate,rowType:r.type,colType:t.type,selectionStore:r.selectionStore,dimensionRow:r.dimensionRow,dimensionCol:r.dimensionCol},e("slot",{name:`focus-${t.type}-${r.type}`})));o.push(a)}));s.push(e("revogr-viewport-scroll",Object.assign({},t.prop,{ref:e=>this.scrollingService.registerElement(e,`${t.prop.key}`),onScrollviewport:e=>this.scrollingService.proxyScroll(e.detail,`${t.prop.key}`),onScrollviewportsilent:e=>this.scrollingService.scrollSilentService(e.detail,`${t.prop.key}`)}),o))}r.push(s);const a="rgRow";const n="rgCol";const d=this.viewportProvider.stores;const h=this.dimensionProvider.stores;return e(o,null,this.hideAttribution?null:e("revogr-attribution",{class:"attribution"}),e("div",{class:"main-viewport",onClick:e=>{var t;if(e.currentTarget===e.target){(t=this.viewport)===null||t===void 0?void 0:t.clearEdit()}}},e("div",{class:"viewports"},e("slot",{name:"viewport"}),r,e("revogr-scroll-virtual",{class:"vertical",dimension:a,viewportStore:d[a].store,dimensionStore:h[a].store,ref:e=>this.scrollingService.registerElement(e,"rowScroll"),onScrollvirtual:e=>this.scrollingService.proxyScroll(e.detail)}),e(se,{ref:e=>this.orderService=e}))),e("revogr-scroll-virtual",{class:"horizontal",dimension:n,viewportStore:d[n].store,dimensionStore:h[n].store,ref:e=>this.scrollingService.registerElement(e,"colScroll"),onScrollvirtual:e=>this.scrollingService.proxyScroll(e.detail)}),e("revogr-extra",{ref:e=>this.extraService=e,nodes:this.extraElements}))}disconnectedCallback(){this.removePlugins()}get element(){return i(this)}static get watchers(){return{columnTypes:["columnTypesChanged"],columns:["columnChanged"],disableVirtualX:["disableVirtualXChanged"],rowSize:["rowSizeChanged"],theme:["themeChanged"],source:["dataSourceChanged"],pinnedBottomSource:["dataSourceChanged"],pinnedTopSource:["dataSourceChanged"],disableVirtualY:["disableVirtualYChanged"],rowDefinitions:["rowDefChanged"],trimmedRows:["trimmedRowsChanged"],grouping:["groupingChanged"],stretch:["applyStretch"],filter:["applyFilter"],sorting:["applySorting"],rowHeaders:["rowHeadersChange"],registerVNode:["registerOutsideVNodes"],additionalData:["additionalDataChanged"],plugins:["pluginsChanged"]}}};ve.style=ge;export{ve as revo_grid};
//# sourceMappingURL=revo-grid.entry.js.map
/*!
* Built by Revolist OU ❤️
*/
import{r as t,h as e,H as i,c as s,a as o}from"./index-a61f225b.js";import{b as r,j as n,k as l,J as a,U as h,u as c,R as d,L as u,K as g,S as p,D as f,A as v,o as b,T as L}from"./dimension.helpers-d0d709c4.js";import{g as C,v as x}from"./events-cf0893a3.js";import{g as w,F as m,b as y,a as k}from"./column.service-7a47e6d0.js";import{i as E}from"./edit.utils-0ae0db50.js";import{c as j,d as S,f as O,h as z,g as F,j as R,k as D}from"./key.utils-7c3218d4.js";import{d as T}from"./debounce-b3166f78.js";import{V as M,f as A}from"./viewport.store-afa8c4fe.js";import{H as U}from"./viewport.helpers-7e7f9dad.js";import{L as $,a as _,g as B,t as P}from"./throttle-394e489c.js";const Z=class{constructor(e){t(this,e)}render(){return e(i,{key:"3d66475a019010c24b6c610ccc047e01c35178f9"},e("a",{key:"45b2270dcfe2e0eeaddf8445e773b15349a6b3df",href:"https://rv-grid.com/guide/attribution",title:"Made with ❤️ by Revolist OU Team",class:"value"},"RevoGrid"))}};const H=class{constructor(e){t(this,e);this.nodes=[];this.update=1}async refresh(){this.update*=-1}render(){var t;return(t=this.nodes)===null||t===void 0?void 0:t.map((t=>{if(typeof t==="function"){const i={};const s=()=>[t({refresh:()=>{var t;return(t=i.refresh)===null||t===void 0?void 0:t.call(i)}})];return e("revogr-extra",{nodes:s(),ref:t=>{if(t){i.refresh=()=>{t.nodes=s()}}}})}return t}))}};function W(t,e){const i={};for(let s in t){const t=parseInt(s,10);i[t]=r(e,t)}return i}function I(t,e){if(t.defaultPrevented){return null}const i=C(t,"clientX");const s=C(t,"clientY");if(i===null||s===null){return null}const o=K({x:i,y:s},e);if(N(o,e.lastCell)){return null}return o}function K({x:t,y:e},{el:i,rows:s,cols:o}){const{top:r,left:l,height:a,width:h}=i.getBoundingClientRect();let c=e-r;let d=t-l;if(c>=a){c=a-1}if(d>=h){d=h-1}const u=n(s,c);const g=n(o,d);if(g.itemIndex<0){g.itemIndex=0}if(u.itemIndex<0){u.itemIndex=0}return{x:g.itemIndex,y:u.itemIndex}}function X(t,e,i,s=false){const o=(i,o=0)=>{const r={x:t.x,y:t.y};const n=s?{x:t.x1,y:t.y1}:r;const l=n[i]>e[i]?n:r;l[i]+=o;return{start:r,end:n}};if(i.x){return o("x",i["x"])}if(i.y){return o("y",i["y"])}return null}function N({x:t,y:e},i){return t>=i.x||e>=i.y}function Y({x:t,y:e}){return t<0||e<0}function G(t){return{left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`}}function J({x:t,y:e,x1:i,y1:s},o,r){const n=l(o,e).start;const a=l(r,t).start;const h=l(o,s).end;const c=l(r,i).end;return{left:a,right:c,top:n,bottom:h,width:c-a,height:h-n}}const V=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-focus.focused-cell{box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset;position:absolute;pointer-events:none;z-index:9;display:block !important}";const q=V;const Q=class{constructor(e){t(this,e);this.beforeFocusRender=s(this,"beforefocusrender",7);this.beforeScrollIntoView=s(this,"beforescrollintoview",7);this.afterFocus=s(this,"afterfocus",7);this.activeFocus=null;this.colType=undefined;this.rowType=undefined;this.selectionStore=undefined;this.dimensionRow=undefined;this.dimensionCol=undefined;this.dataStore=undefined;this.colData=undefined;this.focusTemplate=null}componentDidRender(){var t,e;const i=this.selectionStore.get("focus");if(((t=this.activeFocus)===null||t===void 0?void 0:t.x)===(i===null||i===void 0?void 0:i.x)&&((e=this.activeFocus)===null||e===void 0?void 0:e.y)===(i===null||i===void 0?void 0:i.y)){return}this.activeFocus=i;if(i&&this.el){const t=this.beforeScrollIntoView.emit({el:this.el});if(!t.defaultPrevented){this.el.scrollIntoView({block:"nearest",inline:"nearest"})}const e=r(this.dataStore,i.y);const s=r(this.colData,i.x);this.afterFocus.emit({model:e,column:s,rowType:this.rowType,colType:this.colType,rowIndex:i.y,colIndex:i.x})}}render(){var t;const s=this.selectionStore.get("edit");if(s){return}const o=this.selectionStore.get("focus");if(!o){return}const r=this.beforeFocusRender.emit({range:Object.assign(Object.assign({},o),{x1:o.x,y1:o.y}),rowType:this.rowType,colType:this.colType,rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)});if(r.defaultPrevented){return e("slot",null)}const{detail:n}=r;const l=J(n.range,r.detail.rowDimension,r.detail.colDimension);const h=G(l);const c=(t=this.focusTemplate)===null||t===void 0?void 0:t.call(this,e,n);const d={class:{[a]:true},style:h};return e(i,Object.assign({},d),e("slot",null),c)}get el(){return o(this)}};Q.style=q;const tt=[h.TAB,h.ARROW_UP,h.ARROW_DOWN,h.ARROW_LEFT,h.ARROW_RIGHT];class et{constructor(t){this.sv=t}async keyDown(t,e,i,{range:s,focus:o}){if(i){switch(t.code){case h.ESCAPE:this.sv.cancel();break;case h.TAB:this.keyChangeSelection(t,e);break}return}if(s&&j(t.code)){this.sv.clearCell();return}if(!o){return}if(S(t.code)){this.keyChangeSelection(t,e);return}if(O(t.key)){this.sv.change();return}if(z(t)){return}if(F(t)){return}if(R(t)){this.sv.internalPaste();return}if(D(t)){if(e){this.selectAll(t)}return}if(t.key.length===1){this.sv.change(t.key);return}if(await this.keyChangeSelection(t,e)){return}}selectAll(t){const e=this.sv.selectionStore.get("range");const i=this.sv.selectionStore.get("focus");if(!e||!i){return}t.preventDefault();this.sv.selectAll()}async keyChangeSelection(t,e){const i=this.changeDirectionKey(t,e);if(!i){return false}await c(d+30);const s=this.sv.selectionStore.get("range");const o=this.sv.selectionStore.get("focus");return this.keyPositionChange(i.changes,s,o,i.isMulti)}keyPositionChange(t,e,i,s=false){if(!e||!i){return false}const o=X(e,i,t,s);if(!o){return false}const r=this.sv.getData();if(s){if(N(o.end,r.lastCell)||Y(o.start)){return false}const t=w(o.start,o.end);return this.sv.range(t)}return this.sv.focus(o.start,t,N(o.start,r.lastCell)?1:Y(o.start)?-1:0)}changeDirectionKey(t,e){const i=e&&t.shiftKey;if(tt.includes(t.code)){t.preventDefault()}if(t.shiftKey){switch(t.code){case h.TAB:return{changes:{x:-1},isMulti:false}}}switch(t.code){case h.ARROW_UP:return{changes:{y:-1},isMulti:i};case h.ARROW_DOWN:return{changes:{y:1},isMulti:i};case h.ARROW_LEFT:return{changes:{x:-1},isMulti:i};case h.TAB:case h.ARROW_RIGHT:return{changes:{x:1},isMulti:i}}}}class it{constructor(t){this.sv=t;this.autoFillType=null;this.autoFillInitial=null;this.autoFillStart=null;this.autoFillLast=null}renderAutofill(t,i){let s;if(t){s=J(t,this.sv.dimensionRow.state,this.sv.dimensionCol.state)}else{s=J(Object.assign(Object.assign({},i),{x1:i.x,y1:i.y}),this.sv.dimensionRow.state,this.sv.dimensionCol.state)}return e("div",{class:{[u]:true,[g]:true},style:{left:`${s.right}px`,top:`${s.bottom}px`},onMouseDown:t=>this.autoFillHandler(t),onTouchStart:t=>this.autoFillHandler(t)})}autoFillHandler(t,e="AutoFill"){let i=null;if(t.target instanceof Element){i=t.target}if(!i){return}this.selectionStart(i,this.sv.getData(),e);t.preventDefault()}get isAutoFill(){return!!this.autoFillType}selectionMouseMove(t){if(!this.onMouseMoveAutofill){this.onMouseMoveAutofill=T(((t,e)=>this.doAutofillMouseMove(t,e)),5)}if(this.isAutoFill){this.onMouseMoveAutofill(t,this.sv.getData())}}getFocus(t,e){if(!t&&e){t={x:e.x,y:e.y}}return t||null}doAutofillMouseMove(t,e){if(!this.autoFillInitial){return}const i=C(t,"clientX",g);const s=C(t,"clientY",g);if(i===null||s===null){return}const o=K({x:i,y:s},e);if(!this.autoFillLast){if(!this.autoFillLast){this.autoFillLast=this.autoFillStart}}if(N(o,e.lastCell)){return}this.autoFillLast=o;const r=o.x===this.autoFillInitial.x&&o.y===this.autoFillInitial.y;if(r){this.sv.setTempRange(null)}else{const t=w(this.autoFillInitial,this.autoFillLast);this.sv.setTempRange({area:t,type:this.autoFillType})}}selectionStart(t,e,i="Selection"){const{top:s,left:o}=t.getBoundingClientRect();this.autoFillInitial=this.getFocus(e.focus,e.range);this.autoFillType=i;this.autoFillStart=K({x:o,y:s},e)}clearAutoFillSelection(t,e){if(this.autoFillInitial){this.autoFillInitial=this.getFocus(t,e);if(this.autoFillType==="AutoFill"){const t=w(this.autoFillInitial,this.autoFillLast);if(t){const{defaultPrevented:i,detail:{range:s}}=this.sv.clearRangeDataApply({range:t});if(!i&&e){this.applyRangeWithData(s,e)}else{this.sv.setTempRange(null)}}}else{this.applyRangeOnly(this.autoFillInitial,this.autoFillLast)}}this.resetAutoFillState()}resetAutoFillState(){this.autoFillType=null;this.autoFillInitial=null;this.autoFillLast=null;this.autoFillStart=null}onRangeApply(t,e){this.sv.rangeDataApply({data:t,models:W(t,this.sv.dataStore),type:this.sv.dataStore.get("type")});this.sv.setRange(e)}applyRangeWithData(t,e){const i={type:this.sv.dataStore.get("type"),colType:this.sv.columnService.type,newData:{},mapping:{},newRange:t,oldRange:e};const{mapping:s,changed:o}=this.sv.columnService.getRangeData(i,this.sv.columnService.columns);i.newData=o;i.mapping=s;let r=this.sv.selectionChanged(i);if(r.defaultPrevented){this.sv.setTempRange(null);return}r=this.sv.rangeCopy(i);if(r.defaultPrevented){this.sv.setRange(t);return}this.onRangeApply(i.newData,t)}applyRangeOnly(t,e){if(!t||!e){return}const i=w(t,e);this.sv.setRange(i)}}const st=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-overlay-selection{display:block;position:relative;width:100%}revogr-overlay-selection .autofill-handle{position:absolute;width:14px;height:14px;margin-left:-13px;margin-top:-13px;z-index:10;cursor:crosshair}revogr-overlay-selection .autofill-handle::before{content:\"\";position:absolute;right:0;bottom:0;width:10px;height:10px;background:#0d63e8;border:1px solid white;box-sizing:border-box}revogr-overlay-selection.mobile .autofill-handle{position:absolute;width:30px;height:30px;margin-left:-29px;margin-top:-29px;z-index:10;cursor:crosshair}revogr-overlay-selection.mobile .autofill-handle::before{content:\"\";position:absolute;right:0;bottom:0;width:12px;height:12px;background:#0d63e8;border:1px solid white;box-sizing:border-box}revogr-overlay-selection .selection-border-range{position:absolute;pointer-events:none;z-index:9;box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset}revogr-overlay-selection .selection-border-range .range-handlers{height:100%;background-color:transparent;width:75%;max-width:50px;min-width:20px;left:50%;transform:translateX(-50%);position:absolute}revogr-overlay-selection .selection-border-range .range-handlers>span{pointer-events:auto;height:20px;width:20px;position:absolute;left:50%;transform:translateX(-50%)}revogr-overlay-selection .selection-border-range .range-handlers>span:before,revogr-overlay-selection .selection-border-range .range-handlers>span:after{position:absolute;border-radius:5px;width:15px;height:5px;left:50%;transform:translateX(-50%);background-color:rgba(0, 0, 0, 0.2)}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child{top:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child:before{content:\"\";top:0}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child{bottom:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child:after{content:\"\";bottom:0}revogr-overlay-selection revogr-edit{z-index:10}";const ot=st;const rt=class{constructor(e){t(this,e);this.beforeCopyRegion=s(this,"beforecopyregion",7);this.beforeRegionPaste=s(this,"beforepasteregion",7);this.cellEditApply=s(this,"celleditapply",7);this.beforeFocusCell=s(this,"beforecellfocusinit",7);this.beforeNextViewportFocus=s(this,"beforenextvpfocus",7);this.setEdit=s(this,"setedit",7);this.beforeApplyRange=s(this,"beforeapplyrange",7);this.beforeSetRange=s(this,"beforesetrange",7);this.setRange=s(this,"setrange",7);this.beforeEditRender=s(this,"beforeeditrender",7);this.selectAll=s(this,"selectall",7);this.cancelEdit=s(this,"canceledit",7);this.setTempRange=s(this,"settemprange",7);this.beforeSetTempRange=s(this,"beforesettemprange",7);this.applyFocus=s(this,"applyfocus",7);this.focusCell=s(this,"focuscell",7);this.beforeRangeDataApply=s(this,"beforerangedataapply",7);this.selectionChange=s(this,"selectionchangeinit",7);this.beforeRangeCopyApply=s(this,"beforerangecopyapply",7);this.rangeEditApply=s(this,"rangeeditapply",7);this.rangeClipboardCopy=s(this,"clipboardrangecopy",7);this.rangeClipboardPaste=s(this,"clipboardrangepaste",7);this.beforeKeyDown=s(this,"beforekeydown",7);this.beforeKeyUp=s(this,"beforekeyup",7);this.beforeCellSave=s(this,"beforecellsave",7);this.keyboardService=null;this.autoFillService=null;this.unsubscribeSelectionStore=[];this.readonly=undefined;this.range=undefined;this.canDrag=undefined;this.useClipboard=undefined;this.selectionStore=undefined;this.dimensionRow=undefined;this.dimensionCol=undefined;this.dataStore=undefined;this.colData=undefined;this.lastCell=undefined;this.editors=undefined;this.applyChangesOnClose=false;this.additionalData=undefined;this.isMobileDevice=undefined}onMouseMove(t){var e;if(this.selectionStore.get("focus")){(e=this.autoFillService)===null||e===void 0?void 0:e.selectionMouseMove(t)}}onMouseUp(){var t;(t=this.autoFillService)===null||t===void 0?void 0:t.clearAutoFillSelection(this.selectionStore.get("focus"),this.selectionStore.get("range"))}onCellDrag(t){var e;(e=this.orderEditor)===null||e===void 0?void 0:e.dragStart(t.detail)}onKeyUp(t){this.beforeKeyUp.emit(Object.assign({original:t},this.getData()))}onKeyDown(t){var e;const i=this.beforeKeyDown.emit(Object.assign({original:t},this.getData()));if(t.defaultPrevented||i.defaultPrevented){return}(e=this.keyboardService)===null||e===void 0?void 0:e.keyDown(t,this.range,!!this.selectionStore.get("edit"),{focus:this.selectionStore.get("focus"),range:this.selectionStore.get("range")})}selectionServiceSet(t){this.unsubscribeSelectionStore.forEach((t=>t()));this.unsubscribeSelectionStore.length=0;this.unsubscribeSelectionStore.push(t.onChange("nextFocus",(t=>t&&this.doFocus(t,t))));this.keyboardService=new et({selectionStore:t,range:t=>!!t&&this.triggerRangeEvent(t),focus:(t,e,i)=>{if(i){this.beforeNextViewportFocus.emit(t);return false}else{return this.doFocus(t,t,e)}},change:t=>{if(this.readonly){return}this.doEdit(t)},cancel:async()=>{var t;await((t=this.revogrEdit)===null||t===void 0?void 0:t.cancelChanges());this.closeEdit()},clearCell:()=>!this.readonly&&this.clearCell(),internalPaste:()=>!this.readonly&&this.beforeRegionPaste.emit(),getData:()=>this.getData(),selectAll:()=>this.selectAll.emit()});this.createAutoFillService()}createAutoFillService(){this.autoFillService=new it({dimensionRow:this.dimensionRow,dimensionCol:this.dimensionCol,columnService:this.columnService,dataStore:this.dataStore,clearRangeDataApply:t=>this.beforeRangeDataApply.emit(Object.assign(Object.assign(Object.assign({},t),this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)})),setTempRange:t=>{const e=this.beforeSetTempRange.emit(Object.assign(Object.assign({tempRange:t},this.getData()),this.types));if(e.defaultPrevented){return null}return this.setTempRange.emit(e.detail.tempRange)},selectionChanged:t=>this.selectionChange.emit(t),rangeCopy:t=>this.beforeRangeCopyApply.emit(t),rangeDataApply:t=>this.rangeEditApply.emit(t),setRange:t=>!!t&&this.triggerRangeEvent(t),getData:()=>this.getData()})}columnServiceSet(){var t;(t=this.columnService)===null||t===void 0?void 0:t.destroy();this.columnService=new m(this.dataStore,this.colData);this.createAutoFillService()}connectedCallback(){this.columnServiceSet();this.selectionServiceSet(this.selectionStore)}disconnectedCallback(){var t;this.unsubscribeSelectionStore.forEach((t=>t()));this.unsubscribeSelectionStore.length=0;(t=this.columnService)===null||t===void 0?void 0:t.destroy()}async componentWillRender(){var t,e;const i=this.selectionStore.get("edit");if(!i){await((e=(t=this.revogrEdit)===null||t===void 0?void 0:t.beforeDisconnect)===null||e===void 0?void 0:e.call(t))}}renderRange(t){const i=J(t,this.dimensionRow.state,this.dimensionCol.state);const s=G(i);return[e("div",{class:p,style:s},this.isMobileDevice&&e("div",{class:"range-handlers"},e("span",{class:g}),e("span",{class:g})))]}renderEditor(){const t=this.selectionStore.get("edit");if(this.readonly||!t){return null}const i=t.val||y(this.columnService.rowDataModel(t.y,t.x).value);const s=Object.assign(Object.assign({},t),this.columnService.getSaveData(t.y,t.x,i));const o=this.beforeEditRender.emit(Object.assign(Object.assign({range:Object.assign(Object.assign({},t),{x1:t.x,y1:t.y})},this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)}));if(o.defaultPrevented){return null}const r=J(o.detail.range,o.detail.rowDimension,o.detail.colDimension);const n=G(r);return e("revogr-edit",{style:n,ref:t=>this.revogrEdit=t,additionalData:this.additionalData,editCell:s,saveOnClose:this.applyChangesOnClose,column:this.columnService.rowDataModel(t.y,t.x),editor:this.columnService.getCellEditor(t.y,t.x,this.editors),onCloseedit:t=>this.closeEdit(t),onCelledit:t=>{const e=this.beforeCellSave.emit(t.detail);if(!e.defaultPrevented){this.cellEdit(e.detail)}if(!e.detail.preventFocus){this.focusNext()}}})}render(){var t;const s=[];const o=this.renderEditor();if(o){s.push(o)}else{const i=this.selectionStore.get("range");const o=this.selectionStore.get("focus");if((i||o)&&this.useClipboard){s.push(e("revogr-clipboard",{readonly:this.readonly,onCopyregion:t=>this.onCopy(t.detail),onClearregion:()=>!this.readonly&&this.clearCell(),ref:t=>this.clipboard=t,onPasteregion:t=>this.onPaste(t.detail)}))}if(i){s.push(...this.renderRange(i))}if(o&&!this.readonly&&this.range){s.push((t=this.autoFillService)===null||t===void 0?void 0:t.renderAutofill(i,o))}if(this.canDrag){s.push(e("revogr-order-editor",{ref:t=>this.orderEditor=t,dataStore:this.dataStore,dimensionRow:this.dimensionRow,dimensionCol:this.dimensionCol,parent:this.element,rowType:this.types.rowType,onRowdragstartinit:t=>this.rowDragStart(t)}))}}return e(i,{key:"16eb46317cda519daf53f0b347700e8c1cdbd144",class:{mobile:this.isMobileDevice},onDblClick:t=>this.onElementDblClick(t),onMouseDown:t=>this.onElementMouseDown(t),onTouchStart:t=>this.onElementMouseDown(t,true)},s,e("slot",{key:"8e71ab9946f8b8251aaee867c6551e1fada92c6d",name:"data"}))}doFocus(t,e,i){const{defaultPrevented:s}=this.beforeFocusCell.emit(this.columnService.getSaveData(t.y,t.x));if(s){return false}const o=Object.assign(Object.assign({range:Object.assign(Object.assign({},t),{x1:e.x,y1:e.y}),next:i},this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)});const r=this.applyFocus.emit(o);if(r.defaultPrevented){return false}const{range:n}=r.detail;return!this.focusCell.emit(Object.assign({focus:{x:n.x,y:n.y},end:{x:n.x1,y:n.y1}},r.detail)).defaultPrevented}triggerRangeEvent(t){const e=this.types.rowType;const i=this.beforeApplyRange.emit(Object.assign(Object.assign({range:Object.assign({},t)},this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)}));if(i.defaultPrevented){return false}const s=this.columnService.getRangeTransformedToProps(i.detail.range,this.dataStore);let o=this.beforeSetRange.emit(s);if(o.defaultPrevented){return false}o=this.setRange.emit(Object.assign(Object.assign({},i.detail.range),{type:e}));if(o.defaultPrevented){return false}return!o.defaultPrevented}onElementDblClick(t){if(t.defaultPrevented){return}const e=this.getData();const i=I(t,e);if(!i){return}this.doEdit()}onElementMouseDown(t,e=false){var i;const s=t.target;if(E(s)||t.defaultPrevented){return}const o=this.getData();const r=I(t,o);if(!r){return}this.focus(r,this.range&&t.shiftKey);if(this.range){s&&((i=this.autoFillService)===null||i===void 0?void 0:i.selectionStart(s,this.getData()));if(!e){t.preventDefault()}else if(x(t.touches[0],g)){t.preventDefault()}}}doEdit(t=""){var e;if(this.canEdit()){const i=this.selectionStore.get("focus");if(!i){return}const s=this.columnService.getSaveData(i.y,i.x);(e=this.setEdit)===null||e===void 0?void 0:e.emit(Object.assign(Object.assign({},s),{val:t}))}}async closeEdit(t){this.cancelEdit.emit();if(t===null||t===void 0?void 0:t.detail){await this.focusNext()}}cellEdit(t){const e=this.columnService.getSaveData(t.rgRow,t.rgCol,t.val);this.cellEditApply.emit(e)}getRegion(){const t=this.selectionStore.get("focus");let e=this.selectionStore.get("range");if(!e){e=w(t,t)}return e}onCopy(t){var e;const i=this.getRegion();const s=this.beforeCopyRegion.emit(i);if(s.defaultPrevented){return false}let o;if(i){const{data:t,mapping:e}=this.columnService.copyRangeArray(i,this.dataStore);const s=this.rangeClipboardCopy.emit(Object.assign({range:i,data:t,mapping:e},this.types));if(!s.defaultPrevented){o=s.detail.data}}(e=this.clipboard)===null||e===void 0?void 0:e.doCopy(t,o);return true}onPaste(t){var e;const i=this.selectionStore.get("focus");const s=this.selectionStore.get("edit")!==null;if(!i||s){return}let{changed:o,range:r}=this.columnService.getTransformedDataToApply(i,t);const{defaultPrevented:n}=this.rangeClipboardPaste.emit(Object.assign({data:o,models:W(o,this.dataStore),range:r},this.types));if(n){return}(e=this.autoFillService)===null||e===void 0?void 0:e.onRangeApply(o,r)}async focusNext(){var t;const e=await((t=this.keyboardService)===null||t===void 0?void 0:t.keyChangeSelection(new KeyboardEvent("keydown",{code:h.ARROW_DOWN}),this.range));if(!e){this.closeEdit()}}clearCell(){var t;const e=this.selectionStore.get("range");if(e&&!k(e)){const i=this.columnService.getRangeStaticData(e,"");(t=this.autoFillService)===null||t===void 0?void 0:t.onRangeApply(i,e)}else if(this.canEdit()){const t=this.selectionStore.get("focus");if(!t){return}const e=this.columnService.getSaveData(t.y,t.x);this.cellEdit({rgRow:t.y,rgCol:t.x,val:"",type:e.type,prop:e.prop})}}rowDragStart({detail:t}){t.text=y(this.columnService.rowDataModel(t.cell.y,t.cell.x).value)}canEdit(){var t;if(this.readonly){return false}const e=this.selectionStore.get("focus");return e&&!((t=this.columnService)===null||t===void 0?void 0:t.isReadOnly(e.y,e.x))}get edited(){return this.selectionStore.get("edit")}focus(t,e=false){if(!t)return false;const i=t;const s=this.selectionStore.get("focus");if(e&&s){const t=w(s,i);if(t){return this.triggerRangeEvent(t)}}return this.doFocus(t,i)}get types(){return{rowType:this.dataStore.get("type"),colType:this.columnService.type}}getData(){return{el:this.element,rows:this.dimensionRow.state,cols:this.dimensionCol.state,lastCell:this.lastCell,focus:this.selectionStore.get("focus"),range:this.selectionStore.get("range"),edit:this.selectionStore.get("edit")}}get element(){return o(this)}static get watchers(){return{selectionStore:["selectionServiceSet"],dimensionRow:["createAutoFillService"],dimensionCol:["createAutoFillService"],dataStore:["columnServiceSet"],colData:["columnServiceSet"]}}};rt.style=ot;const nt=t=>(e,{rowIndex:i})=>t+i;const lt=class{constructor(e){t(this,e);this.scrollViewport=s(this,"scrollview",3);this.elementToScroll=s(this,"ref",3);this.height=undefined;this.dataPorts=undefined;this.headerProp=undefined;this.rowClass=undefined;this.resize=undefined;this.rowHeaderColumn=undefined;this.additionalData=undefined;this.jobsBeforeRender=[]}render(){const t=[];const s=new M("colPinStart");let o=1;for(let i of this.dataPorts){const r=i.dataStore.get("items").length;const n=new f(i.type,Object.assign({},i.dataStore.state));const l=new f("colPinStart");const a=Object.assign({cellTemplate:nt(o)},this.rowHeaderColumn);l.updateData([a]);t.push(e("revogr-data",Object.assign({},i,{colType:"rowHeaders",jobsBeforeRender:this.jobsBeforeRender,rowClass:this.rowClass,dataStore:n.store,colData:l.store,viewportCol:s.store,readonly:true,range:false})));o+=r}const r=A(o,this.rowHeaderColumn);s.setViewport({realCount:1,virtualSize:0,items:[{size:r,start:0,end:r,itemIndex:0}]});const n={contentHeight:this.height,contentWidth:0,style:{minWidth:`${r}px`},colType:"rowHeaders",ref:t=>this.elementToScroll.emit(t),onScrollviewport:t=>this.scrollViewport.emit(t.detail)};const l=Object.assign(Object.assign({},this.headerProp),{colData:typeof this.rowHeaderColumn==="object"?[this.rowHeaderColumn]:[],viewportCol:s.store,canResize:false,type:v,slot:U});return e(i,{class:{[v]:true},key:v},e("revogr-viewport-scroll",Object.assign({key:"addb87ab3406b5691cecf810119582bda3a4b4a2"},n,{"row-header":true}),e("revogr-header",Object.assign({key:"8621e76b132e7d1507794b515b40f525577413e2"},l)),t))}};class at{constructor(t){this.element=t;this.autohideScrollTimeout=0}setScrollSize(t){if(!t){this.element.setAttribute("autohide","true")}else{this.element.removeAttribute("autohide")}}checkScroll({scrollSize:t,contentSize:e,virtualSize:i}){const s=e>i;const o=!t&&s;if(o){this.element.setAttribute("visible","true");this.autohideScrollTimeout=this.show(this.element,this.autohideScrollTimeout)}}show(t,e){clearTimeout(e);return Number(setTimeout((()=>{t===null||t===void 0?void 0:t.removeAttribute("visible")}),1e3))}clear(){clearTimeout(this.autohideScrollTimeout)}}const ht=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-scroll-virtual[autohide]{position:absolute;z-index:100 !important}revogr-scroll-virtual[autohide].vertical{top:0;right:0}revogr-scroll-virtual[autohide].vertical[visible]{min-width:20px !important}revogr-scroll-virtual[autohide].horizontal{bottom:0;left:0}revogr-scroll-virtual[autohide].horizontal[visible]{min-height:20px !important}revogr-scroll-virtual.vertical{overflow-y:auto;overflow-x:hidden;height:100%}revogr-scroll-virtual.vertical>div{width:1px}revogr-scroll-virtual.horizontal{overflow-x:auto;overflow-y:hidden;width:100%}revogr-scroll-virtual.horizontal>div{height:1px}";const ct=ht;const dt=class{constructor(e){t(this,e);this.scrollVirtual=s(this,"scrollvirtual",7);this.scrollSize=0;this.dimension="rgRow";this.viewportStore=undefined;this.dimensionStore=undefined}async setScroll(t){var e;if(this.dimension!==t.dimension){return}this.localScrollTimer.latestScrollUpdate(t.dimension);(e=this.localScrollService)===null||e===void 0?void 0:e.setScroll(t);if(t.coordinate){this.autohideScrollPlugin.checkScroll({scrollSize:this.scrollSize,contentSize:this.dimensionStore.get("realSize"),virtualSize:this.viewportStore.get("virtualSize")})}}async changeScroll(t){if(t.delta){switch(t.dimension){case"rgCol":t.coordinate=this.element.scrollLeft+t.delta;break;case"rgRow":t.coordinate=this.element.scrollTop+t.delta;break}this.setScroll(t)}return t}set size(t){this.autohideScrollPlugin.setScrollSize(t);if(this.dimension==="rgRow"){this.element.style.minWidth=`${t}px`;return}this.element.style.minHeight=`${t}px`}get size(){if(this.dimension==="rgRow"){return this.element.clientHeight}return this.element.clientWidth}connectedCallback(){this.autohideScrollPlugin=new at(this.element);this.localScrollTimer=new $("ontouchstart"in document.documentElement?0:10);this.localScrollService=new _({runScroll:t=>this.scrollVirtual.emit(t),applyScroll:t=>{this.localScrollTimer.setCoordinate(t);const e=t.dimension==="rgRow"?"scrollTop":"scrollLeft";this.element[e]=t.coordinate}})}disconnectedCallback(){this.autohideScrollPlugin.clear()}componentWillLoad(){this.scrollSize=b(document)}componentDidRender(){const t=this.dimension==="rgRow"?"scrollHeight":"scrollWidth";if(this.element[t]>this.size){this.size=this.scrollSize}else{this.size=0}this.localScrollService.setParams({contentSize:this.dimensionStore.get("realSize"),clientSize:this.size,virtualSize:this.viewportStore.get("clientSize")},this.dimension)}onScroll(t){var e;if(!(t.target instanceof Element)){return}const i=t.target;let s="scrollLeft";if(this.dimension==="rgRow"){s="scrollTop"}if(this.localScrollTimer.isReady(this.dimension,i[s]||0)){(e=this.localScrollService)===null||e===void 0?void 0:e.scroll(i[s]||0,this.dimension)}}render(){const t=this.dimension==="rgRow"?"height":"width";const s=B(this.dimensionStore.get("realSize"),this.size,this.viewportStore.get("clientSize"));return e(i,{key:"2d11902403db45b805bde88b6fc40acff4b6b910",onScroll:t=>this.onScroll(t)},e("div",{key:"74978e90cbf66e3fb6dcc25bd5882346f1515c39",style:{[t]:`${s}px`}}))}get element(){return o(this)}};dt.style=ct;const ut=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}.temp-bg-range{display:block !important;position:absolute;pointer-events:none;z-index:9;border:1px solid rgb(255, 94, 0);box-sizing:border-box}.temp-bg-range.Selection{border:1px dashed gray}.temp-bg-range>div{width:1px;height:1px;position:absolute}.temp-bg-range>div.top{top:-1px}.temp-bg-range>div.bottom{bottom:-1px}.temp-bg-range>div.left{left:-1px}.temp-bg-range>div.right{right:-1px}";const gt=ut;const pt=class{constructor(e){t(this,e);this.onChange=P((t=>this.doChange(t)),300);this.selectionStore=undefined;this.dimensionRow=undefined;this.dimensionCol=undefined}doChange(t){t===null||t===void 0?void 0:t.scrollIntoView({block:"nearest",inline:"nearest"})}componentDidRender(){if(this.el){this.onChange(this.el)}}render(){const t=this.selectionStore.get("tempRange");const s=this.selectionStore.get("tempRangeType");if(!t){return}let o="bottom";let r="right";const n=this.getRange();if(!n){return}if(t.y<n.y){o="top"}if(t.x<n.x){r="left"}const l=`${r} ${o}`;const a=J(t,this.dimensionRow.state,this.dimensionCol.state);const h=G(a);const c={class:{[L]:true,[s||""]:true},style:h,hidden:false};return e(i,Object.assign({},c),e("div",{class:l,ref:t=>this.el=t}))}getRange(){const t=this.selectionStore.get("range");if(t){return t}const e=this.selectionStore.get("focus");if(!e){return null}return Object.assign(Object.assign({},e),{x1:e.x,y1:e.y})}};pt.style=gt;export{Z as revogr_attribution,H as revogr_extra,Q as revogr_focus,rt as revogr_overlay_selection,lt as revogr_row_headers,dt as revogr_scroll_virtual,pt as revogr_temp_range};
import{r as t,h as e,H as i,c as s,a as o}from"./index-a61f225b.js";import{b as r,j as n,k as l,J as a,U as h,u as c,R as d,L as u,K as g,S as p,D as f,A as v,o as b,T as L}from"./dimension.helpers-d0d709c4.js";import{g as C,v as x}from"./events-cf0893a3.js";import{g as w,F as m,b as y,a as k}from"./column.service-7a47e6d0.js";import{i as E}from"./edit.utils-0ae0db50.js";import{c as j,d as S,f as O,h as z,g as R,j as F,k as D}from"./key.utils-7c3218d4.js";import{d as T}from"./debounce-b3166f78.js";import{V as M,f as A}from"./viewport.store-afa8c4fe.js";import{H as U}from"./viewport.helpers-7e7f9dad.js";import{L as $,a as _,g as B,t as P}from"./throttle-394e489c.js";const Z=class{constructor(e){t(this,e)}render(){return e(i,{key:"3d66475a019010c24b6c610ccc047e01c35178f9"},e("a",{key:"45b2270dcfe2e0eeaddf8445e773b15349a6b3df",href:"https://rv-grid.com/guide/attribution",title:"Made with ❤️ by Revolist OU Team",class:"value"},"RevoGrid"))}};const H=class{constructor(e){t(this,e);this.nodes=[];this.update=1}async refresh(){this.update*=-1}render(){var t;return(t=this.nodes)===null||t===void 0?void 0:t.map((t=>{if(typeof t==="function"){const i={};const s=()=>[t({refresh:()=>{var t;return(t=i.refresh)===null||t===void 0?void 0:t.call(i)}})];return e("revogr-extra",{nodes:s(),ref:t=>{if(t){i.refresh=()=>{t.nodes=s()}}}})}return t}))}};function W(t,e){const i={};for(let s in t){const t=parseInt(s,10);i[t]=r(e,t)}return i}function I(t,e){if(t.defaultPrevented){return null}const i=C(t,"clientX");const s=C(t,"clientY");if(i===null||s===null){return null}const o=K({x:i,y:s},e);if(N(o,e.lastCell)){return null}return o}function K({x:t,y:e},{el:i,rows:s,cols:o}){const{top:r,left:l,height:a,width:h}=i.getBoundingClientRect();let c=e-r;let d=t-l;if(c>=a){c=a-1}if(d>=h){d=h-1}const u=n(s,c);const g=n(o,d);if(g.itemIndex<0){g.itemIndex=0}if(u.itemIndex<0){u.itemIndex=0}return{x:g.itemIndex,y:u.itemIndex}}function X(t,e,i,s=false){const o=(i,o=0)=>{const r={x:t.x,y:t.y};const n=s?{x:t.x1,y:t.y1}:r;const l=n[i]>e[i]?n:r;l[i]+=o;return{start:r,end:n}};if(i.x){return o("x",i["x"])}if(i.y){return o("y",i["y"])}return null}function N({x:t,y:e},i){return t>=i.x||e>=i.y}function Y({x:t,y:e}){return t<0||e<0}function G(t){return{left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`}}function J({x:t,y:e,x1:i,y1:s},o,r){const n=l(o,e).start;const a=l(r,t).start;const h=l(o,s).end;const c=l(r,i).end;return{left:a,right:c,top:n,bottom:h,width:c-a,height:h-n}}const V=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-focus.focused-cell{box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset;position:absolute;pointer-events:none;z-index:9;display:block !important}";const q=V;const Q=class{constructor(e){t(this,e);this.beforeFocusRender=s(this,"beforefocusrender",7);this.beforeScrollIntoView=s(this,"beforescrollintoview",7);this.afterFocus=s(this,"afterfocus",7);this.activeFocus=null;this.colType=undefined;this.rowType=undefined;this.selectionStore=undefined;this.dimensionRow=undefined;this.dimensionCol=undefined;this.dataStore=undefined;this.colData=undefined;this.focusTemplate=null}componentDidRender(){var t,e;const i=this.selectionStore.get("focus");if(((t=this.activeFocus)===null||t===void 0?void 0:t.x)===(i===null||i===void 0?void 0:i.x)&&((e=this.activeFocus)===null||e===void 0?void 0:e.y)===(i===null||i===void 0?void 0:i.y)){return}this.activeFocus=i;if(i&&this.el){const t=this.beforeScrollIntoView.emit({el:this.el});if(!t.defaultPrevented){this.el.scrollIntoView({block:"nearest",inline:"nearest"})}const e=r(this.dataStore,i.y);const s=r(this.colData,i.x);this.afterFocus.emit({model:e,column:s,rowType:this.rowType,colType:this.colType,rowIndex:i.y,colIndex:i.x})}}render(){var t;const s=this.selectionStore.get("edit");if(s){return}const o=this.selectionStore.get("focus");if(!o){return}const r=this.beforeFocusRender.emit({range:Object.assign(Object.assign({},o),{x1:o.x,y1:o.y}),rowType:this.rowType,colType:this.colType,rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)});if(r.defaultPrevented){return e("slot",null)}const{detail:n}=r;const l=J(n.range,r.detail.rowDimension,r.detail.colDimension);const h=G(l);const c=(t=this.focusTemplate)===null||t===void 0?void 0:t.call(this,e,n);const d={class:{[a]:true},style:h};return e(i,Object.assign({},d),e("slot",null),c)}get el(){return o(this)}};Q.style=q;const tt=[h.TAB,h.ARROW_UP,h.ARROW_DOWN,h.ARROW_LEFT,h.ARROW_RIGHT];class et{constructor(t){this.sv=t}async keyDown(t,e,i,{range:s,focus:o}){if(i){switch(t.code){case h.ESCAPE:this.sv.cancel();break;case h.TAB:this.keyChangeSelection(t,e);break}return}if(s&&j(t.code)){this.sv.clearCell();return}if(!o){return}if(S(t.code)){this.keyChangeSelection(t,e);return}if(O(t.key)){this.sv.change();return}if(z(t)){return}if(R(t)){return}if(F(t)){this.sv.internalPaste();return}if(D(t)){if(e){this.selectAll(t)}return}if(t.key.length===1){this.sv.change(t.key);return}if(await this.keyChangeSelection(t,e)){return}}selectAll(t){const e=this.sv.selectionStore.get("range");const i=this.sv.selectionStore.get("focus");if(!e||!i){return}t.preventDefault();this.sv.selectAll()}async keyChangeSelection(t,e){const i=this.changeDirectionKey(t,e);if(!i){return false}await c(d+30);const s=this.sv.selectionStore.get("range");const o=this.sv.selectionStore.get("focus");return this.keyPositionChange(i.changes,s,o,i.isMulti)}keyPositionChange(t,e,i,s=false){if(!e||!i){return false}const o=X(e,i,t,s);if(!o){return false}const r=this.sv.getData();if(s){if(N(o.end,r.lastCell)||Y(o.start)){return false}const t=w(o.start,o.end);return this.sv.range(t)}return this.sv.focus(o.start,t,N(o.start,r.lastCell)?1:Y(o.start)?-1:0)}changeDirectionKey(t,e){const i=e&&t.shiftKey;if(tt.includes(t.code)){t.preventDefault()}if(t.shiftKey){switch(t.code){case h.TAB:return{changes:{x:-1},isMulti:false}}}switch(t.code){case h.ARROW_UP:return{changes:{y:-1},isMulti:i};case h.ARROW_DOWN:return{changes:{y:1},isMulti:i};case h.ARROW_LEFT:return{changes:{x:-1},isMulti:i};case h.TAB:case h.ARROW_RIGHT:return{changes:{x:1},isMulti:i}}}}class it{constructor(t){this.sv=t;this.autoFillType=null;this.autoFillInitial=null;this.autoFillStart=null;this.autoFillLast=null}renderAutofill(t,i){let s;if(t){s=J(t,this.sv.dimensionRow.state,this.sv.dimensionCol.state)}else{s=J(Object.assign(Object.assign({},i),{x1:i.x,y1:i.y}),this.sv.dimensionRow.state,this.sv.dimensionCol.state)}return e("div",{class:{[u]:true,[g]:true},style:{left:`${s.right}px`,top:`${s.bottom}px`},onMouseDown:t=>this.autoFillHandler(t),onTouchStart:t=>this.autoFillHandler(t)})}autoFillHandler(t,e="AutoFill"){let i=null;if(t.target instanceof Element){i=t.target}if(!i){return}this.selectionStart(i,this.sv.getData(),e);t.preventDefault()}get isAutoFill(){return!!this.autoFillType}selectionMouseMove(t){if(!this.onMouseMoveAutofill){this.onMouseMoveAutofill=T(((t,e)=>this.doAutofillMouseMove(t,e)),5)}if(this.isAutoFill){this.onMouseMoveAutofill(t,this.sv.getData())}}getFocus(t,e){if(!t&&e){t={x:e.x,y:e.y}}return t||null}doAutofillMouseMove(t,e){if(!this.autoFillInitial){return}const i=C(t,"clientX",g);const s=C(t,"clientY",g);if(i===null||s===null){return}const o=K({x:i,y:s},e);if(!this.autoFillLast){if(!this.autoFillLast){this.autoFillLast=this.autoFillStart}}if(N(o,e.lastCell)){return}this.autoFillLast=o;const r=o.x===this.autoFillInitial.x&&o.y===this.autoFillInitial.y;if(r){this.sv.setTempRange(null)}else{const t=w(this.autoFillInitial,this.autoFillLast);this.sv.setTempRange({area:t,type:this.autoFillType})}}selectionStart(t,e,i="Selection"){const{top:s,left:o}=t.getBoundingClientRect();this.autoFillInitial=this.getFocus(e.focus,e.range);this.autoFillType=i;this.autoFillStart=K({x:o,y:s},e)}clearAutoFillSelection(t,e){if(this.autoFillInitial){this.autoFillInitial=this.getFocus(t,e);if(this.autoFillType==="AutoFill"){const t=w(this.autoFillInitial,this.autoFillLast);if(t){const{defaultPrevented:i,detail:{range:s}}=this.sv.clearRangeDataApply({range:t});if(!i&&e){this.applyRangeWithData(s,e)}else{this.sv.setTempRange(null)}}}else{this.applyRangeOnly(this.autoFillInitial,this.autoFillLast)}}this.resetAutoFillState()}resetAutoFillState(){this.autoFillType=null;this.autoFillInitial=null;this.autoFillLast=null;this.autoFillStart=null}onRangeApply(t,e,i){this.sv.rangeDataApply({data:t,models:W(t,this.sv.dataStore),type:this.sv.dataStore.get("type"),oldRange:i,newRange:e});this.sv.setRange(e)}applyRangeWithData(t,e){const i={type:this.sv.dataStore.get("type"),colType:this.sv.columnService.type,newData:{},mapping:{},newRange:t,oldRange:e};const{mapping:s,changed:o}=this.sv.columnService.getRangeData(i,this.sv.columnService.columns);i.newData=o;i.mapping=s;let r=this.sv.selectionChanged(i);if(r.defaultPrevented){this.sv.setTempRange(null);return}r=this.sv.rangeCopy(i);if(r.defaultPrevented){this.sv.setRange(t);return}this.onRangeApply(i.newData,t,e)}applyRangeOnly(t,e){if(!t||!e){return}const i=w(t,e);this.sv.setRange(i)}}const st=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-overlay-selection{display:block;position:relative;width:100%}revogr-overlay-selection .autofill-handle{position:absolute;width:14px;height:14px;margin-left:-13px;margin-top:-13px;z-index:10;cursor:crosshair}revogr-overlay-selection .autofill-handle::before{content:\"\";position:absolute;right:0;bottom:0;width:10px;height:10px;background:#0d63e8;border:1px solid white;box-sizing:border-box}revogr-overlay-selection.mobile .autofill-handle{position:absolute;width:30px;height:30px;margin-left:-29px;margin-top:-29px;z-index:10;cursor:crosshair}revogr-overlay-selection.mobile .autofill-handle::before{content:\"\";position:absolute;right:0;bottom:0;width:12px;height:12px;background:#0d63e8;border:1px solid white;box-sizing:border-box}revogr-overlay-selection .selection-border-range{position:absolute;pointer-events:none;z-index:9;box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset}revogr-overlay-selection .selection-border-range .range-handlers{height:100%;background-color:transparent;width:75%;max-width:50px;min-width:20px;left:50%;transform:translateX(-50%);position:absolute}revogr-overlay-selection .selection-border-range .range-handlers>span{pointer-events:auto;height:20px;width:20px;position:absolute;left:50%;transform:translateX(-50%)}revogr-overlay-selection .selection-border-range .range-handlers>span:before,revogr-overlay-selection .selection-border-range .range-handlers>span:after{position:absolute;border-radius:5px;width:15px;height:5px;left:50%;transform:translateX(-50%);background-color:rgba(0, 0, 0, 0.2)}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child{top:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child:before{content:\"\";top:0}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child{bottom:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child:after{content:\"\";bottom:0}revogr-overlay-selection revogr-edit{z-index:10}";const ot=st;const rt=class{constructor(e){t(this,e);this.beforeCopyRegion=s(this,"beforecopyregion",7);this.beforeRegionPaste=s(this,"beforepasteregion",7);this.cellEditApply=s(this,"celleditapply",7);this.beforeFocusCell=s(this,"beforecellfocusinit",7);this.beforeNextViewportFocus=s(this,"beforenextvpfocus",7);this.setEdit=s(this,"setedit",7);this.beforeApplyRange=s(this,"beforeapplyrange",7);this.beforeSetRange=s(this,"beforesetrange",7);this.setRange=s(this,"setrange",7);this.beforeEditRender=s(this,"beforeeditrender",7);this.selectAll=s(this,"selectall",7);this.cancelEdit=s(this,"canceledit",7);this.setTempRange=s(this,"settemprange",7);this.beforeSetTempRange=s(this,"beforesettemprange",7);this.applyFocus=s(this,"applyfocus",7);this.focusCell=s(this,"focuscell",7);this.beforeRangeDataApply=s(this,"beforerangedataapply",7);this.selectionChange=s(this,"selectionchangeinit",7);this.beforeRangeCopyApply=s(this,"beforerangecopyapply",7);this.rangeEditApply=s(this,"rangeeditapply",7);this.rangeClipboardCopy=s(this,"clipboardrangecopy",7);this.rangeClipboardPaste=s(this,"clipboardrangepaste",7);this.beforeKeyDown=s(this,"beforekeydown",7);this.beforeKeyUp=s(this,"beforekeyup",7);this.beforeCellSave=s(this,"beforecellsave",7);this.keyboardService=null;this.autoFillService=null;this.unsubscribeSelectionStore=[];this.readonly=undefined;this.range=undefined;this.canDrag=undefined;this.useClipboard=undefined;this.selectionStore=undefined;this.dimensionRow=undefined;this.dimensionCol=undefined;this.dataStore=undefined;this.colData=undefined;this.lastCell=undefined;this.editors=undefined;this.applyChangesOnClose=false;this.additionalData=undefined;this.isMobileDevice=undefined}onMouseMove(t){var e;if(this.selectionStore.get("focus")){(e=this.autoFillService)===null||e===void 0?void 0:e.selectionMouseMove(t)}}onMouseUp(){var t;(t=this.autoFillService)===null||t===void 0?void 0:t.clearAutoFillSelection(this.selectionStore.get("focus"),this.selectionStore.get("range"))}onCellDrag(t){var e;(e=this.orderEditor)===null||e===void 0?void 0:e.dragStart(t.detail)}onKeyUp(t){this.beforeKeyUp.emit(Object.assign({original:t},this.getData()))}onKeyDown(t){var e;const i=this.beforeKeyDown.emit(Object.assign({original:t},this.getData()));if(t.defaultPrevented||i.defaultPrevented){return}(e=this.keyboardService)===null||e===void 0?void 0:e.keyDown(t,this.range,!!this.selectionStore.get("edit"),{focus:this.selectionStore.get("focus"),range:this.selectionStore.get("range")})}selectionServiceSet(t){this.unsubscribeSelectionStore.forEach((t=>t()));this.unsubscribeSelectionStore.length=0;this.unsubscribeSelectionStore.push(t.onChange("nextFocus",(t=>t&&this.doFocus(t,t))));this.keyboardService=new et({selectionStore:t,range:t=>!!t&&this.triggerRangeEvent(t),focus:(t,e,i)=>{if(i){this.beforeNextViewportFocus.emit(t);return false}else{return this.doFocus(t,t,e)}},change:t=>{if(this.readonly){return}this.doEdit(t)},cancel:async()=>{var t;await((t=this.revogrEdit)===null||t===void 0?void 0:t.cancelChanges());this.closeEdit()},clearCell:()=>!this.readonly&&this.clearCell(),internalPaste:()=>!this.readonly&&this.beforeRegionPaste.emit(),getData:()=>this.getData(),selectAll:()=>this.selectAll.emit()});this.createAutoFillService()}createAutoFillService(){this.autoFillService=new it({dimensionRow:this.dimensionRow,dimensionCol:this.dimensionCol,columnService:this.columnService,dataStore:this.dataStore,clearRangeDataApply:t=>this.beforeRangeDataApply.emit(Object.assign(Object.assign(Object.assign({},t),this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)})),setTempRange:t=>{const e=this.beforeSetTempRange.emit(Object.assign(Object.assign({tempRange:t},this.getData()),this.types));if(e.defaultPrevented){return null}return this.setTempRange.emit(e.detail.tempRange)},selectionChanged:t=>this.selectionChange.emit(t),rangeCopy:t=>this.beforeRangeCopyApply.emit(t),rangeDataApply:t=>this.rangeEditApply.emit(t),setRange:t=>!!t&&this.triggerRangeEvent(t),getData:()=>this.getData()})}columnServiceSet(){var t;(t=this.columnService)===null||t===void 0?void 0:t.destroy();this.columnService=new m(this.dataStore,this.colData);this.createAutoFillService()}connectedCallback(){this.columnServiceSet();this.selectionServiceSet(this.selectionStore)}disconnectedCallback(){var t;this.unsubscribeSelectionStore.forEach((t=>t()));this.unsubscribeSelectionStore.length=0;(t=this.columnService)===null||t===void 0?void 0:t.destroy()}async componentWillRender(){var t,e;const i=this.selectionStore.get("edit");if(!i){await((e=(t=this.revogrEdit)===null||t===void 0?void 0:t.beforeDisconnect)===null||e===void 0?void 0:e.call(t))}}renderRange(t){const i=J(t,this.dimensionRow.state,this.dimensionCol.state);const s=G(i);return[e("div",{class:p,style:s},this.isMobileDevice&&e("div",{class:"range-handlers"},e("span",{class:g}),e("span",{class:g})))]}renderEditor(){const t=this.selectionStore.get("edit");if(this.readonly||!t){return null}const i=t.val||y(this.columnService.rowDataModel(t.y,t.x).value);const s=Object.assign(Object.assign({},t),this.columnService.getSaveData(t.y,t.x,i));const o=this.beforeEditRender.emit(Object.assign(Object.assign({range:Object.assign(Object.assign({},t),{x1:t.x,y1:t.y})},this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)}));if(o.defaultPrevented){return null}const r=J(o.detail.range,o.detail.rowDimension,o.detail.colDimension);const n=G(r);return e("revogr-edit",{style:n,ref:t=>this.revogrEdit=t,additionalData:this.additionalData,editCell:s,saveOnClose:this.applyChangesOnClose,column:this.columnService.rowDataModel(t.y,t.x),editor:this.columnService.getCellEditor(t.y,t.x,this.editors),onCloseedit:t=>this.closeEdit(t),onCelledit:t=>{const e=this.beforeCellSave.emit(t.detail);if(!e.defaultPrevented){this.cellEdit(e.detail)}if(!e.detail.preventFocus){this.focusNext()}}})}render(){var t;const s=[];const o=this.renderEditor();if(o){s.push(o)}else{const i=this.selectionStore.get("range");const o=this.selectionStore.get("focus");if((i||o)&&this.useClipboard){s.push(e("revogr-clipboard",{readonly:this.readonly,onCopyregion:t=>this.onCopy(t.detail),onClearregion:()=>!this.readonly&&this.clearCell(),ref:t=>this.clipboard=t,onPasteregion:t=>this.onPaste(t.detail)}))}if(i){s.push(...this.renderRange(i))}if(o&&!this.readonly&&this.range){s.push((t=this.autoFillService)===null||t===void 0?void 0:t.renderAutofill(i,o))}if(this.canDrag){s.push(e("revogr-order-editor",{ref:t=>this.orderEditor=t,dataStore:this.dataStore,dimensionRow:this.dimensionRow,dimensionCol:this.dimensionCol,parent:this.element,rowType:this.types.rowType,onRowdragstartinit:t=>this.rowDragStart(t)}))}}return e(i,{key:"16eb46317cda519daf53f0b347700e8c1cdbd144",class:{mobile:this.isMobileDevice},onDblClick:t=>this.onElementDblClick(t),onMouseDown:t=>this.onElementMouseDown(t),onTouchStart:t=>this.onElementMouseDown(t,true)},s,e("slot",{key:"8e71ab9946f8b8251aaee867c6551e1fada92c6d",name:"data"}))}doFocus(t,e,i){const{defaultPrevented:s}=this.beforeFocusCell.emit(this.columnService.getSaveData(t.y,t.x));if(s){return false}const o=Object.assign(Object.assign({range:Object.assign(Object.assign({},t),{x1:e.x,y1:e.y}),next:i},this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)});const r=this.applyFocus.emit(o);if(r.defaultPrevented){return false}const{range:n}=r.detail;return!this.focusCell.emit(Object.assign({focus:{x:n.x,y:n.y},end:{x:n.x1,y:n.y1}},r.detail)).defaultPrevented}triggerRangeEvent(t){const e=this.types.rowType;const i=this.beforeApplyRange.emit(Object.assign(Object.assign({range:Object.assign({},t)},this.types),{rowDimension:Object.assign({},this.dimensionRow.state),colDimension:Object.assign({},this.dimensionCol.state)}));if(i.defaultPrevented){return false}const s=this.columnService.getRangeTransformedToProps(i.detail.range,this.dataStore);let o=this.beforeSetRange.emit(s);if(o.defaultPrevented){return false}o=this.setRange.emit(Object.assign(Object.assign({},i.detail.range),{type:e}));if(o.defaultPrevented){return false}return!o.defaultPrevented}onElementDblClick(t){if(t.defaultPrevented){return}const e=this.getData();const i=I(t,e);if(!i){return}this.doEdit()}onElementMouseDown(t,e=false){var i;const s=t.target;if(E(s)||t.defaultPrevented){return}const o=this.getData();const r=I(t,o);if(!r){return}this.focus(r,this.range&&t.shiftKey);if(this.range){s&&((i=this.autoFillService)===null||i===void 0?void 0:i.selectionStart(s,this.getData()));if(!e){t.preventDefault()}else if(x(t.touches[0],g)){t.preventDefault()}}}doEdit(t=""){var e;if(this.canEdit()){const i=this.selectionStore.get("focus");if(!i){return}const s=this.columnService.getSaveData(i.y,i.x);(e=this.setEdit)===null||e===void 0?void 0:e.emit(Object.assign(Object.assign({},s),{val:t}))}}async closeEdit(t){this.cancelEdit.emit();if(t===null||t===void 0?void 0:t.detail){await this.focusNext()}}cellEdit(t){const e=this.columnService.getSaveData(t.rgRow,t.rgCol,t.val);this.cellEditApply.emit(e)}getRegion(){const t=this.selectionStore.get("focus");let e=this.selectionStore.get("range");if(!e){e=w(t,t)}return e}onCopy(t){var e;const i=this.getRegion();const s=this.beforeCopyRegion.emit(i);if(s.defaultPrevented){return false}let o;if(i){const{data:t,mapping:e}=this.columnService.copyRangeArray(i,this.dataStore);const s=this.rangeClipboardCopy.emit(Object.assign({range:i,data:t,mapping:e},this.types));if(!s.defaultPrevented){o=s.detail.data}}(e=this.clipboard)===null||e===void 0?void 0:e.doCopy(t,o);return true}onPaste(t){var e;const i=this.selectionStore.get("focus");const s=this.selectionStore.get("edit")!==null;if(!i||s){return}let{changed:o,range:r}=this.columnService.getTransformedDataToApply(i,t);const{defaultPrevented:n}=this.rangeClipboardPaste.emit(Object.assign({data:o,models:W(o,this.dataStore),range:r},this.types));if(n){return}(e=this.autoFillService)===null||e===void 0?void 0:e.onRangeApply(o,r,r)}async focusNext(){var t;const e=await((t=this.keyboardService)===null||t===void 0?void 0:t.keyChangeSelection(new KeyboardEvent("keydown",{code:h.ARROW_DOWN}),this.range));if(!e){this.closeEdit()}}clearCell(){var t;const e=this.selectionStore.get("range");if(e&&!k(e)){const i=this.columnService.getRangeStaticData(e,"");(t=this.autoFillService)===null||t===void 0?void 0:t.onRangeApply(i,e,e)}else if(this.canEdit()){const t=this.selectionStore.get("focus");if(!t){return}const e=this.columnService.getSaveData(t.y,t.x);this.cellEdit({rgRow:t.y,rgCol:t.x,val:"",type:e.type,prop:e.prop})}}rowDragStart({detail:t}){t.text=y(this.columnService.rowDataModel(t.cell.y,t.cell.x).value)}canEdit(){var t;if(this.readonly){return false}const e=this.selectionStore.get("focus");return e&&!((t=this.columnService)===null||t===void 0?void 0:t.isReadOnly(e.y,e.x))}get edited(){return this.selectionStore.get("edit")}focus(t,e=false){if(!t)return false;const i=t;const s=this.selectionStore.get("focus");if(e&&s){const t=w(s,i);if(t){return this.triggerRangeEvent(t)}}return this.doFocus(t,i)}get types(){return{rowType:this.dataStore.get("type"),colType:this.columnService.type}}getData(){return{el:this.element,rows:this.dimensionRow.state,cols:this.dimensionCol.state,lastCell:this.lastCell,focus:this.selectionStore.get("focus"),range:this.selectionStore.get("range"),edit:this.selectionStore.get("edit")}}get element(){return o(this)}static get watchers(){return{selectionStore:["selectionServiceSet"],dimensionRow:["createAutoFillService"],dimensionCol:["createAutoFillService"],dataStore:["columnServiceSet"],colData:["columnServiceSet"]}}};rt.style=ot;const nt=t=>(e,{rowIndex:i})=>t+i;const lt=class{constructor(e){t(this,e);this.scrollViewport=s(this,"scrollview",3);this.elementToScroll=s(this,"ref",3);this.height=undefined;this.dataPorts=undefined;this.headerProp=undefined;this.rowClass=undefined;this.resize=undefined;this.rowHeaderColumn=undefined;this.additionalData=undefined;this.jobsBeforeRender=[]}render(){const t=[];const s=new M("colPinStart");let o=1;for(let i of this.dataPorts){const r=i.dataStore.get("items").length;const n=new f(i.type,Object.assign({},i.dataStore.state));const l=new f("colPinStart");const a=Object.assign({cellTemplate:nt(o)},this.rowHeaderColumn);l.updateData([a]);t.push(e("revogr-data",Object.assign({},i,{colType:"rowHeaders",jobsBeforeRender:this.jobsBeforeRender,rowClass:this.rowClass,dataStore:n.store,colData:l.store,viewportCol:s.store,readonly:true,range:false})));o+=r}const r=A(o,this.rowHeaderColumn);s.setViewport({realCount:1,virtualSize:0,items:[{size:r,start:0,end:r,itemIndex:0}]});const n={contentHeight:this.height,contentWidth:0,style:{minWidth:`${r}px`},colType:"rowHeaders",ref:t=>this.elementToScroll.emit(t),onScrollviewport:t=>this.scrollViewport.emit(t.detail)};const l=Object.assign(Object.assign({},this.headerProp),{colData:typeof this.rowHeaderColumn==="object"?[this.rowHeaderColumn]:[],viewportCol:s.store,canResize:false,type:v,slot:U});return e(i,{class:{[v]:true},key:v},e("revogr-viewport-scroll",Object.assign({key:"addb87ab3406b5691cecf810119582bda3a4b4a2"},n,{"row-header":true}),e("revogr-header",Object.assign({key:"8621e76b132e7d1507794b515b40f525577413e2"},l)),t))}};class at{constructor(t){this.element=t;this.autohideScrollTimeout=0}setScrollSize(t){if(!t){this.element.setAttribute("autohide","true")}else{this.element.removeAttribute("autohide")}}checkScroll({scrollSize:t,contentSize:e,virtualSize:i}){const s=e>i;const o=!t&&s;if(o){this.element.setAttribute("visible","true");this.autohideScrollTimeout=this.show(this.element,this.autohideScrollTimeout)}}show(t,e){clearTimeout(e);return Number(setTimeout((()=>{t===null||t===void 0?void 0:t.removeAttribute("visible")}),1e3))}clear(){clearTimeout(this.autohideScrollTimeout)}}const ht=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-scroll-virtual[autohide]{position:absolute;z-index:100 !important}revogr-scroll-virtual[autohide].vertical{top:0;right:0}revogr-scroll-virtual[autohide].vertical[visible]{min-width:20px !important}revogr-scroll-virtual[autohide].horizontal{bottom:0;left:0}revogr-scroll-virtual[autohide].horizontal[visible]{min-height:20px !important}revogr-scroll-virtual.vertical{overflow-y:auto;overflow-x:hidden;height:100%}revogr-scroll-virtual.vertical>div{width:1px}revogr-scroll-virtual.horizontal{overflow-x:auto;overflow-y:hidden;width:100%}revogr-scroll-virtual.horizontal>div{height:1px}";const ct=ht;const dt=class{constructor(e){t(this,e);this.scrollVirtual=s(this,"scrollvirtual",7);this.scrollSize=0;this.dimension="rgRow";this.viewportStore=undefined;this.dimensionStore=undefined}async setScroll(t){var e;if(this.dimension!==t.dimension){return}this.localScrollTimer.latestScrollUpdate(t.dimension);(e=this.localScrollService)===null||e===void 0?void 0:e.setScroll(t);if(t.coordinate){this.autohideScrollPlugin.checkScroll({scrollSize:this.scrollSize,contentSize:this.dimensionStore.get("realSize"),virtualSize:this.viewportStore.get("virtualSize")})}}async changeScroll(t){if(t.delta){switch(t.dimension){case"rgCol":t.coordinate=this.element.scrollLeft+t.delta;break;case"rgRow":t.coordinate=this.element.scrollTop+t.delta;break}this.setScroll(t)}return t}set size(t){this.autohideScrollPlugin.setScrollSize(t);if(this.dimension==="rgRow"){this.element.style.minWidth=`${t}px`;return}this.element.style.minHeight=`${t}px`}get size(){if(this.dimension==="rgRow"){return this.element.clientHeight}return this.element.clientWidth}connectedCallback(){this.autohideScrollPlugin=new at(this.element);this.localScrollTimer=new $("ontouchstart"in document.documentElement?0:10);this.localScrollService=new _({runScroll:t=>this.scrollVirtual.emit(t),applyScroll:t=>{this.localScrollTimer.setCoordinate(t);const e=t.dimension==="rgRow"?"scrollTop":"scrollLeft";this.element[e]=t.coordinate}})}disconnectedCallback(){this.autohideScrollPlugin.clear()}componentWillLoad(){this.scrollSize=b(document)}componentDidRender(){const t=this.dimension==="rgRow"?"scrollHeight":"scrollWidth";if(this.element[t]>this.size){this.size=this.scrollSize}else{this.size=0}this.localScrollService.setParams({contentSize:this.dimensionStore.get("realSize"),clientSize:this.size,virtualSize:this.viewportStore.get("clientSize")},this.dimension)}onScroll(t){var e;if(!(t.target instanceof Element)){return}const i=t.target;let s="scrollLeft";if(this.dimension==="rgRow"){s="scrollTop"}if(this.localScrollTimer.isReady(this.dimension,i[s]||0)){(e=this.localScrollService)===null||e===void 0?void 0:e.scroll(i[s]||0,this.dimension)}}render(){const t=this.dimension==="rgRow"?"height":"width";const s=B(this.dimensionStore.get("realSize"),this.size,this.viewportStore.get("clientSize"));return e(i,{key:"2d11902403db45b805bde88b6fc40acff4b6b910",onScroll:t=>this.onScroll(t)},e("div",{key:"74978e90cbf66e3fb6dcc25bd5882346f1515c39",style:{[t]:`${s}px`}}))}get element(){return o(this)}};dt.style=ct;const ut=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}.temp-bg-range{display:block !important;position:absolute;pointer-events:none;z-index:9;border:1px solid rgb(255, 94, 0);box-sizing:border-box}.temp-bg-range.Selection{border:1px dashed gray}.temp-bg-range>div{width:1px;height:1px;position:absolute}.temp-bg-range>div.top{top:-1px}.temp-bg-range>div.bottom{bottom:-1px}.temp-bg-range>div.left{left:-1px}.temp-bg-range>div.right{right:-1px}";const gt=ut;const pt=class{constructor(e){t(this,e);this.onChange=P((t=>this.doChange(t)),300);this.selectionStore=undefined;this.dimensionRow=undefined;this.dimensionCol=undefined}doChange(t){t===null||t===void 0?void 0:t.scrollIntoView({block:"nearest",inline:"nearest"})}componentDidRender(){if(this.el){this.onChange(this.el)}}render(){const t=this.selectionStore.get("tempRange");const s=this.selectionStore.get("tempRangeType");if(!t){return}let o="bottom";let r="right";const n=this.getRange();if(!n){return}if(t.y<n.y){o="top"}if(t.x<n.x){r="left"}const l=`${r} ${o}`;const a=J(t,this.dimensionRow.state,this.dimensionCol.state);const h=G(a);const c={class:{[L]:true,[s||""]:true},style:h,hidden:false};return e(i,Object.assign({},c),e("div",{class:l,ref:t=>this.el=t}))}getRange(){const t=this.selectionStore.get("range");if(t){return t}const e=this.selectionStore.get("focus");if(!e){return null}return Object.assign(Object.assign({},e),{x1:e.x,y1:e.y})}};pt.style=gt;export{Z as revogr_attribution,H as revogr_extra,Q as revogr_focus,rt as revogr_overlay_selection,lt as revogr_row_headers,dt as revogr_scroll_virtual,pt as revogr_temp_range};
//# sourceMappingURL=revogr-attribution_7.entry.js.map

@@ -71,3 +71,3 @@ import { EventData } from './selection.utils';

*/
onRangeApply(newData: DataLookup, range: RangeArea | null): void;
onRangeApply(newData: DataLookup, newRange: RangeArea | null, oldRange: RangeArea | null): void;
/** Apply range and copy data during range application */

@@ -74,0 +74,0 @@ private applyRangeWithData;

@@ -561,4 +561,4 @@ import { type VNode, EventEmitter } from '../../stencil-public-runtime';

onCellEdit(e: CustomEvent<BeforeSaveDataDetails>): Promise<void>;
onRangeEdit(e: CustomEvent<BeforeRangeSaveDataDetails>): void;
onRangeChanged(e: CustomEvent<ChangedRange>): void;
onRangeEdit(e: CustomEvent<HTMLRevogrOverlaySelectionElementEventMap['rangeeditapply']>): void;
onRangeChanged(e: CustomEvent<HTMLRevogrOverlaySelectionElementEventMap['selectionchangeinit']>): void;
onRowDropped(e: CustomEvent<{

@@ -565,0 +565,0 @@ from: number;

@@ -111,2 +111,4 @@ import { type VNode } from '../stencil-public-runtime';

type: DimensionRows;
newRange: RangeArea | null;
oldRange: RangeArea | null;
};

@@ -113,0 +115,0 @@ export type AfterEditEvent = BeforeRangeSaveDataDetails | BeforeSaveDataDetails;

{
"name": "@revolist/revogrid",
"version": "4.11.0",
"version": "4.11.1",
"type": "module",

@@ -5,0 +5,0 @@ "description": "Virtual reactive data grid spreadsheet component - RevoGrid.",

@@ -322,3 +322,3 @@ /*!

*/
onRangeApply(newData, range) {
onRangeApply(newData, newRange, oldRange) {
this.sv.rangeDataApply({

@@ -328,4 +328,6 @@ data: newData,

type: this.sv.dataStore.get('type'),
oldRange,
newRange
});
this.sv.setRange(range);
this.sv.setRange(newRange);
}

@@ -356,3 +358,3 @@ /** Apply range and copy data during range application */

}
this.onRangeApply(rangeData.newData, newRange);
this.onRangeApply(rangeData.newData, newRange, rangeToCopy);
}

@@ -795,3 +797,3 @@ /**

}
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(changed, range);
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(changed, range, range);
}

@@ -812,3 +814,3 @@ async focusNext() {

const data = this.columnService.getRangeStaticData(range, '');
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(data, range);
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(data, range, range);
}

@@ -815,0 +817,0 @@ else if (this.canEdit()) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc